Imported Upstream version 3.8 upstream/3.8
authorTizenOpenSource <tizenopensrc@samsung.com>
Tue, 27 Dec 2022 03:15:44 +0000 (12:15 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Tue, 27 Dec 2022 03:15:44 +0000 (12:15 +0900)
1052 files changed:
.tarball-version
AUTHORS
ChangeLog
ChangeLog-2008
GNUmakefile
INSTALL
Makefile.am
Makefile.in
NEWS
README
aclocal.m4
bootstrap
build-aux/announce-gen
build-aux/compile
build-aux/config.guess
build-aux/config.rpath
build-aux/config.sub
build-aux/depcomp
build-aux/do-release-commit-and-tag
build-aux/gendocs.sh
build-aux/git-version-gen
build-aux/gitlog-to-changelog
build-aux/gnu-web-doc-update
build-aux/gnupload
build-aux/install-sh
build-aux/mdate-sh
build-aux/missing
build-aux/test-driver
build-aux/texinfo.tex
build-aux/update-copyright
build-aux/useless-if-before-free
build-aux/vc-list-files
cfg.mk
configure
configure.ac
doc/Makefile.am
doc/Makefile.in
doc/diffutils.info
doc/diffutils.texi
doc/fdl.texi
doc/stamp-vti
doc/version.texi
exgettext
gnulib-tests/Makefile.in
gnulib-tests/_Noreturn.h
gnulib-tests/accept.c
gnulib-tests/alloca.c [new file with mode: 0644]
gnulib-tests/altstack-util.h [new file with mode: 0644]
gnulib-tests/arg-nonnull.h
gnulib-tests/arpa_inet.in.h
gnulib-tests/atoll.c [new file with mode: 0644]
gnulib-tests/bind.c
gnulib-tests/c++defs.h
gnulib-tests/connect.c
gnulib-tests/dtotimespec.c
gnulib-tests/fdopen.c
gnulib-tests/fpucw.h
gnulib-tests/ftruncate.c
gnulib-tests/getcwd-lgpl.c
gnulib-tests/glthread/thread.c [new file with mode: 0644]
gnulib-tests/glthread/thread.h [new file with mode: 0644]
gnulib-tests/gnulib.mk
gnulib-tests/hash-pjw.c
gnulib-tests/hash-pjw.h
gnulib-tests/inet_pton.c
gnulib-tests/init.sh
gnulib-tests/ioctl.c
gnulib-tests/listen.c
gnulib-tests/locale.c [new file with mode: 0644]
gnulib-tests/macros.h
gnulib-tests/mmap-anon-util.h [new file with mode: 0644]
gnulib-tests/nanosleep.c
gnulib-tests/nap.h
gnulib-tests/netinet_in.in.h
gnulib-tests/perror.c
gnulib-tests/pipe.c
gnulib-tests/pthread-thread.c [new file with mode: 0644]
gnulib-tests/pthread.in.h [new file with mode: 0644]
gnulib-tests/pthread_sigmask.c [new file with mode: 0644]
gnulib-tests/putenv.c
gnulib-tests/same-inode.h
gnulib-tests/sched.in.h [new file with mode: 0644]
gnulib-tests/select.c
gnulib-tests/setlocale.c [deleted file]
gnulib-tests/setsockopt.c
gnulib-tests/sig-handler.c [new file with mode: 0644]
gnulib-tests/sig-handler.h [moved from lib/sig-handler.h with 73% similarity]
gnulib-tests/sigaction.c [moved from lib/sigaction.c with 92% similarity]
gnulib-tests/signature.h
gnulib-tests/sigprocmask.c [moved from lib/sigprocmask.c with 94% similarity]
gnulib-tests/sleep.c
gnulib-tests/snprintf.c
gnulib-tests/socket.c
gnulib-tests/sockets.c
gnulib-tests/sockets.h
gnulib-tests/strerror_r.c
gnulib-tests/symlink.c
gnulib-tests/sys_ioctl.in.h
gnulib-tests/sys_select.in.h
gnulib-tests/sys_socket.c
gnulib-tests/sys_socket.in.h
gnulib-tests/sys_uio.in.h
gnulib-tests/test-accept.c
gnulib-tests/test-alloca-opt.c
gnulib-tests/test-areadlink.c
gnulib-tests/test-areadlink.h
gnulib-tests/test-argmatch.c
gnulib-tests/test-arpa_inet.c
gnulib-tests/test-binary-io.c
gnulib-tests/test-binary-io.sh
gnulib-tests/test-bind.c
gnulib-tests/test-bitrotate.c
gnulib-tests/test-btowc.c
gnulib-tests/test-btowc1.sh
gnulib-tests/test-btowc2.sh
gnulib-tests/test-c-ctype.c
gnulib-tests/test-c-stack.c
gnulib-tests/test-c-stack.sh
gnulib-tests/test-c-stack2.sh
gnulib-tests/test-c-strcase.sh
gnulib-tests/test-c-strcasecmp.c
gnulib-tests/test-c-strncasecmp.c
gnulib-tests/test-calloc-gnu.c [new file with mode: 0644]
gnulib-tests/test-cloexec.c
gnulib-tests/test-close.c
gnulib-tests/test-connect.c
gnulib-tests/test-ctype.c
gnulib-tests/test-dirname.c
gnulib-tests/test-dup2.c
gnulib-tests/test-dynarray.c [new file with mode: 0644]
gnulib-tests/test-environ.c
gnulib-tests/test-errno.c
gnulib-tests/test-exclude.c
gnulib-tests/test-exclude1.sh
gnulib-tests/test-exclude2.sh
gnulib-tests/test-exclude3.sh
gnulib-tests/test-exclude4.sh
gnulib-tests/test-exclude5.sh
gnulib-tests/test-exclude6.sh
gnulib-tests/test-exclude7.sh
gnulib-tests/test-exclude8.sh
gnulib-tests/test-fcntl-h.c
gnulib-tests/test-fcntl.c
gnulib-tests/test-fdopen.c
gnulib-tests/test-fgetc.c
gnulib-tests/test-filenamecat.c
gnulib-tests/test-float.c
gnulib-tests/test-fnmatch-h.c
gnulib-tests/test-fnmatch.c
gnulib-tests/test-fopen-gnu.c [new file with mode: 0644]
gnulib-tests/test-fopen.c [moved from lib/xstrndup.h with 62% similarity]
gnulib-tests/test-fopen.h [new file with mode: 0644]
gnulib-tests/test-fputc.c
gnulib-tests/test-fread.c
gnulib-tests/test-free.c [new file with mode: 0644]
gnulib-tests/test-freopen-safer.c [deleted file]
gnulib-tests/test-freopen.c
gnulib-tests/test-fstat.c
gnulib-tests/test-ftruncate.c
gnulib-tests/test-ftruncate.sh
gnulib-tests/test-fwrite.c
gnulib-tests/test-getcwd-lgpl.c
gnulib-tests/test-getdtablesize.c
gnulib-tests/test-getopt-gnu.c
gnulib-tests/test-getopt-main.h
gnulib-tests/test-getopt-posix.c
gnulib-tests/test-getopt.h
gnulib-tests/test-getopt_long.h
gnulib-tests/test-getprogname.c
gnulib-tests/test-getrandom.c [new file with mode: 0644]
gnulib-tests/test-gettimeofday.c
gnulib-tests/test-hard-locale.c [new file with mode: 0644]
gnulib-tests/test-hash.c
gnulib-tests/test-iconv-h.c
gnulib-tests/test-iconv.c
gnulib-tests/test-ignore-value.c
gnulib-tests/test-inet_pton.c
gnulib-tests/test-init.sh
gnulib-tests/test-intprops.c
gnulib-tests/test-inttostr.c
gnulib-tests/test-inttypes.c
gnulib-tests/test-ioctl.c
gnulib-tests/test-isblank.c
gnulib-tests/test-iswblank.c
gnulib-tests/test-iswdigit.c [new file with mode: 0644]
gnulib-tests/test-iswdigit.sh [new file with mode: 0755]
gnulib-tests/test-iswxdigit.c [new file with mode: 0644]
gnulib-tests/test-iswxdigit.sh [new file with mode: 0755]
gnulib-tests/test-langinfo.c
gnulib-tests/test-limits-h.c
gnulib-tests/test-listen.c
gnulib-tests/test-localcharset.c
gnulib-tests/test-locale.c
gnulib-tests/test-localeconv.c
gnulib-tests/test-lstat.c
gnulib-tests/test-lstat.h
gnulib-tests/test-malloc-gnu.c [new file with mode: 0644]
gnulib-tests/test-malloca.c
gnulib-tests/test-mbrtowc-w32-1.sh
gnulib-tests/test-mbrtowc-w32-2.sh
gnulib-tests/test-mbrtowc-w32-3.sh
gnulib-tests/test-mbrtowc-w32-4.sh
gnulib-tests/test-mbrtowc-w32-5.sh
gnulib-tests/test-mbrtowc-w32-6.sh [new file with mode: 0755]
gnulib-tests/test-mbrtowc-w32-7.sh [new file with mode: 0755]
gnulib-tests/test-mbrtowc-w32.c
gnulib-tests/test-mbrtowc.c
gnulib-tests/test-mbrtowc1.sh
gnulib-tests/test-mbrtowc2.sh
gnulib-tests/test-mbrtowc3.sh
gnulib-tests/test-mbrtowc4.sh
gnulib-tests/test-mbrtowc5.sh
gnulib-tests/test-mbscasecmp.c
gnulib-tests/test-mbscasecmp.sh
gnulib-tests/test-mbsinit.c
gnulib-tests/test-mbsinit.sh
gnulib-tests/test-mbsrtowcs.c
gnulib-tests/test-mbsrtowcs1.sh
gnulib-tests/test-mbsrtowcs2.sh
gnulib-tests/test-mbsrtowcs3.sh
gnulib-tests/test-mbsrtowcs4.sh
gnulib-tests/test-mbsstr1.c
gnulib-tests/test-mbsstr2.c
gnulib-tests/test-mbsstr2.sh
gnulib-tests/test-mbsstr3.c
gnulib-tests/test-mbsstr3.sh
gnulib-tests/test-memchr.c
gnulib-tests/test-mkdir.c
gnulib-tests/test-mkdir.h
gnulib-tests/test-nanosleep.c
gnulib-tests/test-netinet_in.c
gnulib-tests/test-nl_langinfo-mt.c [new file with mode: 0644]
gnulib-tests/test-nl_langinfo.c
gnulib-tests/test-nl_langinfo.sh
gnulib-tests/test-nstrftime.c
gnulib-tests/test-open.c
gnulib-tests/test-open.h
gnulib-tests/test-pathmax.c
gnulib-tests/test-perror.c
gnulib-tests/test-perror.sh
gnulib-tests/test-perror2.c
gnulib-tests/test-pipe.c
gnulib-tests/test-pthread-thread.c [new file with mode: 0644]
gnulib-tests/test-pthread.c [new file with mode: 0644]
gnulib-tests/test-pthread_sigmask1.c [new file with mode: 0644]
gnulib-tests/test-pthread_sigmask2.c [new file with mode: 0644]
gnulib-tests/test-quotearg-simple.c
gnulib-tests/test-quotearg.h
gnulib-tests/test-raise.c
gnulib-tests/test-rawmemchr.c
gnulib-tests/test-readlink.c
gnulib-tests/test-readlink.h
gnulib-tests/test-realloc-gnu.c [new file with mode: 0644]
gnulib-tests/test-reallocarray.c [new file with mode: 0644]
gnulib-tests/test-regex.c
gnulib-tests/test-sched.c [new file with mode: 0644]
gnulib-tests/test-select-fd.c
gnulib-tests/test-select-in.sh
gnulib-tests/test-select-out.sh
gnulib-tests/test-select-stdin.c
gnulib-tests/test-select.c
gnulib-tests/test-select.h
gnulib-tests/test-setenv.c
gnulib-tests/test-setlocale1.c [deleted file]
gnulib-tests/test-setlocale1.sh [deleted file]
gnulib-tests/test-setlocale2.c [deleted file]
gnulib-tests/test-setlocale2.sh [deleted file]
gnulib-tests/test-setlocale_null-mt-all.c [new file with mode: 0644]
gnulib-tests/test-setlocale_null-mt-one.c [new file with mode: 0644]
gnulib-tests/test-setlocale_null.c [new file with mode: 0644]
gnulib-tests/test-setsockopt.c
gnulib-tests/test-sh-quote.c
gnulib-tests/test-sigaction.c
gnulib-tests/test-signal-h.c
gnulib-tests/test-sigprocmask.c
gnulib-tests/test-sigsegv-catch-segv1.c [new file with mode: 0644]
gnulib-tests/test-sigsegv-catch-segv2.c [new file with mode: 0644]
gnulib-tests/test-sigsegv-catch-stackoverflow1.c [new file with mode: 0644]
gnulib-tests/test-sigsegv-catch-stackoverflow2.c [new file with mode: 0644]
gnulib-tests/test-sleep.c
gnulib-tests/test-snprintf.c
gnulib-tests/test-sockets.c
gnulib-tests/test-stat-time.c
gnulib-tests/test-stat.c
gnulib-tests/test-stat.h
gnulib-tests/test-stdalign.c
gnulib-tests/test-stdbool.c
gnulib-tests/test-stddef.c
gnulib-tests/test-stdint.c
gnulib-tests/test-stdio.c
gnulib-tests/test-stdlib.c
gnulib-tests/test-strerror.c
gnulib-tests/test-strerror_r.c
gnulib-tests/test-striconv.c
gnulib-tests/test-string.c
gnulib-tests/test-strings.c
gnulib-tests/test-strnlen.c
gnulib-tests/test-strtoimax.c [moved from gnulib-tests/test-strtoumax.c with 68% similarity]
gnulib-tests/test-strtoll.c [moved from gnulib-tests/test-strtoull.c with 53% similarity]
gnulib-tests/test-symlink.c
gnulib-tests/test-symlink.h
gnulib-tests/test-sys_ioctl.c
gnulib-tests/test-sys_random.c [new file with mode: 0644]
gnulib-tests/test-sys_select.c
gnulib-tests/test-sys_socket.c
gnulib-tests/test-sys_stat.c
gnulib-tests/test-sys_time.c
gnulib-tests/test-sys_types.c
gnulib-tests/test-sys_uio.c
gnulib-tests/test-sys_wait.c
gnulib-tests/test-sys_wait.h
gnulib-tests/test-thread_create.c [new file with mode: 0644]
gnulib-tests/test-thread_self.c [new file with mode: 0644]
gnulib-tests/test-time.c
gnulib-tests/test-timespec.c
gnulib-tests/test-unistd.c
gnulib-tests/test-unsetenv.c
gnulib-tests/test-update-copyright.sh
gnulib-tests/test-vasnprintf.c
gnulib-tests/test-vasprintf.c
gnulib-tests/test-vc-list-files-cvs.sh
gnulib-tests/test-vc-list-files-git.sh
gnulib-tests/test-verify-try.c
gnulib-tests/test-verify.c
gnulib-tests/test-version-etc.c
gnulib-tests/test-version-etc.sh
gnulib-tests/test-wchar.c
gnulib-tests/test-wcrtomb-w32-1.sh
gnulib-tests/test-wcrtomb-w32-2.sh
gnulib-tests/test-wcrtomb-w32-3.sh
gnulib-tests/test-wcrtomb-w32-4.sh
gnulib-tests/test-wcrtomb-w32-5.sh
gnulib-tests/test-wcrtomb-w32-6.sh [new file with mode: 0755]
gnulib-tests/test-wcrtomb-w32-7.sh [new file with mode: 0755]
gnulib-tests/test-wcrtomb-w32.c
gnulib-tests/test-wcrtomb.c
gnulib-tests/test-wcrtomb.sh
gnulib-tests/test-wctype-h.c
gnulib-tests/test-wcwidth.c
gnulib-tests/test-xalloc-die.c
gnulib-tests/test-xalloc-die.sh
gnulib-tests/test-xstdopen.c [moved from lib/strtoul.c with 70% similarity]
gnulib-tests/test-xstdopen.sh [new file with mode: 0755]
gnulib-tests/test-xstrtoimax.c [new file with mode: 0644]
gnulib-tests/test-xstrtoimax.sh [moved from gnulib-tests/test-xstrtoumax.sh with 55% similarity]
gnulib-tests/test-xstrtol.c
gnulib-tests/test-xstrtol.sh
gnulib-tests/test-xstrtoumax.c [deleted file]
gnulib-tests/test-xvasprintf.c
gnulib-tests/timespec-add.c
gnulib-tests/timespec-sub.c
gnulib-tests/unistr/test-u8-mbtoucr.c
gnulib-tests/unistr/test-u8-uctomb.c
gnulib-tests/uniwidth/test-uc_width.c
gnulib-tests/uniwidth/test-uc_width2.c
gnulib-tests/uniwidth/test-uc_width2.sh
gnulib-tests/unused-parameter.h [deleted file]
gnulib-tests/w32sock.h
gnulib-tests/warn-on-use.h
gnulib-tests/wctob.c
gnulib-tests/wctomb-impl.h
gnulib-tests/wctomb.c
gnulib-tests/windows-thread.c [new file with mode: 0644]
gnulib-tests/windows-thread.h [new file with mode: 0644]
gnulib-tests/windows-tls.c [new file with mode: 0644]
gnulib-tests/windows-tls.h [new file with mode: 0644]
gnulib-tests/xstrtol-error.c [moved from lib/xstrtol-error.c with 96% similarity]
gnulib-tests/xstrtol-error.h [new file with mode: 0644]
gnulib-tests/zerosize-ptr.h
lib/Makefile.am
lib/Makefile.in
lib/_Noreturn.h
lib/alloca.c [deleted file]
lib/alloca.in.h
lib/allocator.c
lib/allocator.h
lib/anytostr.c
lib/areadlink.c
lib/areadlink.h
lib/arg-nonnull.h
lib/argmatch.c
lib/argmatch.h
lib/asnprintf.c
lib/asprintf.c
lib/assure.h
lib/attribute.h [new file with mode: 0644]
lib/basename-lgpl.c
lib/basename-lgpl.h [new file with mode: 0644]
lib/basename.c
lib/binary-io.c
lib/binary-io.h
lib/bitrotate.c
lib/bitrotate.h
lib/btowc.c
lib/c++defs.h
lib/c-ctype.c
lib/c-ctype.h
lib/c-stack.c
lib/c-stack.h
lib/c-strcase.h
lib/c-strcasecmp.c
lib/c-strcaseeq.h
lib/c-strncasecmp.c
lib/calloc.c [new file with mode: 0644]
lib/careadlinkat.c
lib/careadlinkat.h
lib/cdefs.h
lib/cloexec.c
lib/cloexec.h
lib/close.c
lib/cmpbuf.c
lib/cmpbuf.h
lib/config.hin
lib/ctype.in.h
lib/diffseq.h
lib/dirname-lgpl.c
lib/dirname.c
lib/dirname.h
lib/dosname.h [deleted file]
lib/dup2.c
lib/dynarray.h [new file with mode: 0644]
lib/errno.in.h
lib/error.c
lib/error.h
lib/exclude.c
lib/exclude.h
lib/exitfail.c
lib/exitfail.h
lib/fcntl.c
lib/fcntl.in.h
lib/fd-hook.c
lib/fd-hook.h
lib/file-type.c
lib/file-type.h
lib/filename.h
lib/filenamecat-lgpl.c
lib/filenamecat.c
lib/filenamecat.h
lib/flexmember.h
lib/float+.h
lib/float.c
lib/float.in.h
lib/fnmatch.c
lib/fnmatch.in.h
lib/fnmatch_loop.c
lib/fopen.c [new file with mode: 0644]
lib/free.c [new file with mode: 0644]
lib/freopen-safer.c [deleted file]
lib/freopen.c
lib/fstat.c
lib/getdtablesize.c
lib/getopt-cdefs.in.h
lib/getopt-core.h
lib/getopt-ext.h
lib/getopt-pfx-core.h
lib/getopt-pfx-ext.h
lib/getopt.c
lib/getopt.in.h
lib/getopt1.c
lib/getopt_int.h
lib/getpagesize.c [moved from gnulib-tests/getpagesize.c with 57% similarity]
lib/getprogname.c
lib/getprogname.h
lib/getrandom.c [new file with mode: 0644]
lib/gettext.h
lib/gettime.c
lib/gettimeofday.c
lib/glthread/lock.c [new file with mode: 0644]
lib/glthread/lock.h [new file with mode: 0644]
lib/glthread/threadlib.c [new file with mode: 0644]
lib/gnulib.mk
lib/hard-locale.c
lib/hard-locale.h
lib/hash.c
lib/hash.h
lib/ialloc.c [new file with mode: 0644]
lib/ialloc.h [new file with mode: 0644]
lib/iconv.c
lib/iconv.in.h
lib/iconv_close.c
lib/iconv_open-aix.gperf
lib/iconv_open-aix.h
lib/iconv_open-hpux.gperf
lib/iconv_open-hpux.h
lib/iconv_open-irix.gperf
lib/iconv_open-irix.h
lib/iconv_open-osf.gperf
lib/iconv_open-osf.h
lib/iconv_open-solaris.gperf
lib/iconv_open-solaris.h
lib/iconv_open-zos.gperf [new file with mode: 0644]
lib/iconv_open-zos.h [new file with mode: 0644]
lib/iconv_open.c
lib/idx.h [new file with mode: 0644]
lib/ignore-value.h
lib/imaxtostr.c
lib/intprops.h
lib/inttostr.c
lib/inttostr.h
lib/inttypes.in.h
lib/isblank.c
lib/iswblank.c
lib/iswdigit.c [new file with mode: 0644]
lib/iswxdigit.c [new file with mode: 0644]
lib/itold.c
lib/langinfo.in.h
lib/lc-charset-dispatch.c [new file with mode: 0644]
lib/lc-charset-dispatch.h [new file with mode: 0644]
lib/libc-config.h
lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
lib/locale.in.h
lib/localeconv.c
lib/localtime-buffer.c [deleted file]
lib/localtime-buffer.h [deleted file]
lib/lstat.c
lib/malloc.c
lib/malloc/dynarray-skeleton.c [new file with mode: 0644]
lib/malloc/dynarray.h [new file with mode: 0644]
lib/malloc/dynarray_at_failure.c [new file with mode: 0644]
lib/malloc/dynarray_emplace_enlarge.c [new file with mode: 0644]
lib/malloc/dynarray_finalize.c [new file with mode: 0644]
lib/malloc/dynarray_resize.c [new file with mode: 0644]
lib/malloc/dynarray_resize_clear.c [new file with mode: 0644]
lib/malloca.c
lib/malloca.h
lib/mbchar.c
lib/mbchar.h
lib/mbiter.c
lib/mbiter.h
lib/mbrtowc-impl-utf8.h [new file with mode: 0644]
lib/mbrtowc-impl.h [new file with mode: 0644]
lib/mbrtowc.c
lib/mbscasecmp.c
lib/mbsinit.c
lib/mbslen.c
lib/mbsrtowcs-impl.h
lib/mbsrtowcs-state.c
lib/mbsrtowcs.c
lib/mbsstr.c
lib/mbtowc-impl.h
lib/mbtowc-lock.c [new file with mode: 0644]
lib/mbtowc-lock.h [new file with mode: 0644]
lib/mbtowc.c
lib/mbuiter.c
lib/mbuiter.h
lib/memchr.c
lib/memchr.valgrind
lib/mempcpy.c [new file with mode: 0644]
lib/minmax.h
lib/mkdir.c
lib/mkstemp.c
lib/mktime-internal.h
lib/mktime.c
lib/msvc-inval.c
lib/msvc-inval.h
lib/msvc-nothrow.c
lib/msvc-nothrow.h
lib/nl_langinfo-lock.c [new file with mode: 0644]
lib/nl_langinfo.c
lib/nstrftime.c
lib/offtostr.c
lib/open.c
lib/pathmax.h
lib/prepargs.c
lib/printf-args.c
lib/printf-args.h
lib/printf-parse.c
lib/printf-parse.h
lib/progname.c
lib/progname.h
lib/propername.c
lib/propername.h
lib/quote.h
lib/quotearg.c
lib/quotearg.h
lib/raise.c
lib/rawmemchr.c
lib/rawmemchr.valgrind
lib/readlink.c
lib/realloc.c [new file with mode: 0644]
lib/reallocarray.c [new file with mode: 0644]
lib/regcomp.c
lib/regex.c
lib/regex.h
lib/regex_internal.c
lib/regex_internal.h
lib/regexec.c
lib/setenv.c
lib/setlocale-lock.c [new file with mode: 0644]
lib/setlocale_null.c [new file with mode: 0644]
lib/setlocale_null.h [new file with mode: 0644]
lib/sh-quote.c
lib/sh-quote.h
lib/sig-handler.c [deleted file]
lib/signal.in.h
lib/sigsegv.c [new file with mode: 0644]
lib/sigsegv.in.h [new file with mode: 0644]
lib/size_max.h
lib/stackvma.c [new file with mode: 0644]
lib/stackvma.h [new file with mode: 0644]
lib/stat-macros.h
lib/stat-time.c
lib/stat-time.h
lib/stat-w32.c
lib/stat-w32.h
lib/stat.c
lib/stdalign.in.h [moved from gnulib-tests/stdalign.in.h with 69% similarity]
lib/stdarg.in.h
lib/stdbool.in.h
lib/stddef.in.h
lib/stdint.in.h
lib/stdio.in.h
lib/stdlib.in.h
lib/stdopen.c [new file with mode: 0644]
lib/stdopen.h [moved from lib/stdio--.h with 57% similarity]
lib/str-kmp.h
lib/strcasecmp.c
lib/streq.h
lib/strerror-override.c
lib/strerror-override.h
lib/strerror.c
lib/strftime.h
lib/striconv.c
lib/striconv.h
lib/string.in.h
lib/strings.in.h
lib/stripslash.c
lib/strncasecmp.c
lib/strndup.c [deleted file]
lib/strnlen.c
lib/strnlen1.c
lib/strnlen1.h
lib/strptime.c
lib/strtoimax.c
lib/strtol.c
lib/strtoll.c [new file with mode: 0644]
lib/strtoull.c [deleted file]
lib/strtoumax.c [deleted file]
lib/sys_random.in.h [new file with mode: 0644]
lib/sys_stat.in.h
lib/sys_time.in.h
lib/sys_types.in.h
lib/sys_wait.in.h
lib/system-quote.c
lib/system-quote.h
lib/tempname.c
lib/tempname.h
lib/time-internal.h
lib/time.in.h
lib/time_r.c
lib/time_rz.c
lib/timegm.c
lib/timespec.c
lib/timespec.h
lib/trim.c
lib/trim.h
lib/tzset.c
lib/uinttostr.c
lib/umaxtostr.c
lib/unistd.c
lib/unistd.in.h
lib/unistr.in.h
lib/unistr/u8-mbtoucr.c
lib/unistr/u8-uctomb-aux.c
lib/unistr/u8-uctomb.c
lib/unitypes.in.h
lib/uniwidth.in.h
lib/uniwidth/cjk.h
lib/uniwidth/width.c
lib/unlocked-io.h
lib/unsetenv.c
lib/unused-parameter.h [deleted file]
lib/vasnprintf.c
lib/vasnprintf.h
lib/vasprintf.c
lib/verify.h
lib/version-etc-fsf.c
lib/version-etc.c
lib/version-etc.h
lib/warn-on-use.h
lib/wchar.in.h
lib/wcrtomb.c
lib/wctype-h.c
lib/wctype.in.h
lib/wcwidth.c
lib/windows-initguard.h [new file with mode: 0644]
lib/windows-mutex.c [new file with mode: 0644]
lib/windows-mutex.h [new file with mode: 0644]
lib/windows-once.c [new file with mode: 0644]
lib/windows-once.h [new file with mode: 0644]
lib/windows-recmutex.c [new file with mode: 0644]
lib/windows-recmutex.h [new file with mode: 0644]
lib/windows-rwlock.c [new file with mode: 0644]
lib/windows-rwlock.h [new file with mode: 0644]
lib/wmemchr-impl.h [new file with mode: 0644]
lib/wmemchr.c [new file with mode: 0644]
lib/wmempcpy.c [new file with mode: 0644]
lib/xalloc-die.c
lib/xalloc-oversized.h
lib/xalloc.h
lib/xasprintf.c
lib/xfreopen.c
lib/xfreopen.h
lib/xmalloc.c
lib/xmalloca.c [moved from lib/xstrndup.c with 62% similarity]
lib/xmalloca.h [new file with mode: 0644]
lib/xreadlink.c
lib/xreadlink.h
lib/xsize.c
lib/xsize.h
lib/xstdopen.c [new file with mode: 0644]
lib/xstdopen.h [moved from lib/stdio-safer.h with 58% similarity]
lib/xstriconv.c
lib/xstriconv.h
lib/xstrtoimax.c [new file with mode: 0644]
lib/xstrtol.c
lib/xstrtol.h
lib/xstrtoul.c
lib/xstrtoumax.c [deleted file]
lib/xvasprintf.c
lib/xvasprintf.h
m4/00gnulib.m4
m4/__inline.m4
m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
m4/asm-underscore.m4 [new file with mode: 0644]
m4/atoll.m4 [new file with mode: 0644]
m4/btowc.m4
m4/builtin-expect.m4
m4/c-stack.m4
m4/calloc.m4 [new file with mode: 0644]
m4/clock_time.m4
m4/close.m4
m4/codeset.m4
m4/config-h.m4
m4/ctype.m4 [deleted file]
m4/ctype_h.m4 [new file with mode: 0644]
m4/dirname.m4 [deleted file]
m4/double-slash-root.m4
m4/dup2.m4
m4/eealloc.m4
m4/environ.m4
m4/errno_h.m4
m4/error.m4
m4/exponentd.m4
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
m4/fcntl.m4
m4/fcntl_h.m4
m4/fdopen.m4
m4/filenamecat.m4
m4/flexmember.m4
m4/float_h.m4
m4/fnmatch.m4
m4/fnmatch_h.m4
m4/fopen.m4 [new file with mode: 0644]
m4/fpieee.m4
m4/free.m4 [new file with mode: 0644]
m4/freopen.m4
m4/fstat.m4
m4/ftruncate.m4
m4/getcwd.m4
m4/getdtablesize.m4
m4/getopt.m4
m4/getpagesize.m4
m4/getprogname.m4
m4/getrandom.m4 [new file with mode: 0644]
m4/gettime.m4
m4/gettimeofday.m4
m4/glibc21.m4 [deleted file]
m4/gnu-make.m4
m4/gnulib-common.m4
m4/gnulib-comp.m4
m4/host-cpu-c-abi.m4
m4/iconv.m4
m4/iconv_h.m4
m4/iconv_open.m4
m4/include_next.m4
m4/inet_pton.m4
m4/inline.m4
m4/intmax_t.m4
m4/inttostr.m4
m4/inttypes-pri.m4 [deleted file]
m4/inttypes.m4
m4/inttypes_h.m4
m4/ioctl.m4
m4/isblank.m4
m4/iswblank.m4
m4/iswdigit.m4 [new file with mode: 0644]
m4/iswxdigit.m4 [new file with mode: 0644]
m4/langinfo_h.m4
m4/largefile.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/libsigsegv.m4
m4/libunistring-base.m4
m4/limits-h.m4
m4/localcharset.m4
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-tr.m4
m4/locale-zh.m4
m4/locale_h.m4
m4/localeconv.m4
m4/localtime-buffer.m4 [deleted file]
m4/lock.m4 [new file with mode: 0644]
m4/longlong.m4 [deleted file]
m4/lstat.m4
m4/malloc.m4
m4/malloca.m4
m4/manywarnings.m4
m4/mbchar.m4
m4/mbiter.m4
m4/mbrtowc.m4
m4/mbsinit.m4
m4/mbslen.m4
m4/mbsrtowcs.m4
m4/mbstate_t.m4
m4/mbtowc.m4
m4/memchr.m4
m4/mempcpy.m4 [new file with mode: 0644]
m4/minmax.m4
m4/mkdir.m4
m4/mkstemp.m4
m4/mktime.m4
m4/mmap-anon.m4
m4/mode_t.m4
m4/msvc-inval.m4
m4/msvc-nothrow.m4
m4/multiarch.m4
m4/musl.m4 [new file with mode: 0644]
m4/nanosleep.m4
m4/netinet_in_h.m4
m4/nl_langinfo.m4
m4/nocrash.m4
m4/nstrftime.m4
m4/off_t.m4
m4/open-cloexec.m4
m4/open-slash.m4 [new file with mode: 0644]
m4/open.m4
m4/pathmax.m4
m4/perror.m4
m4/pipe.m4
m4/printf.m4
m4/pthread-thread.m4 [new file with mode: 0644]
m4/pthread_h.m4 [new file with mode: 0644]
m4/pthread_rwlock_rdlock.m4 [new file with mode: 0644]
m4/pthread_sigmask.m4 [new file with mode: 0644]
m4/putenv.m4
m4/quote.m4
m4/quotearg.m4
m4/raise.m4
m4/rawmemchr.m4
m4/readlink.m4
m4/realloc.m4 [new file with mode: 0644]
m4/reallocarray.m4 [new file with mode: 0644]
m4/regex.m4
m4/sched_h.m4 [new file with mode: 0644]
m4/select.m4
m4/setenv.m4
m4/setlocale.m4 [deleted file]
m4/setlocale_null.m4 [new file with mode: 0644]
m4/sigaction.m4
m4/sigaltstack.m4 [new file with mode: 0644]
m4/signal_h.m4
m4/signalblocking.m4
m4/size_max.m4
m4/sleep.m4
m4/snprintf.m4
m4/socketlib.m4
m4/sockets.m4
m4/socklen.m4
m4/sockpfaf.m4
m4/ssize_t.m4
m4/stack-direction.m4 [new file with mode: 0644]
m4/stat-time.m4
m4/stat.m4
m4/stdalign.m4
m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
m4/stdint_h.m4
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strcase.m4
m4/strerror.m4
m4/strerror_r.m4
m4/string_h.m4
m4/strings_h.m4
m4/strndup.m4 [deleted file]
m4/strnlen.m4
m4/strptime.m4
m4/strtoimax.m4 [new file with mode: 0644]
m4/strtoll.m4 [new file with mode: 0644]
m4/strtoull.m4 [deleted file]
m4/strtoumax.m4 [deleted file]
m4/symlink.m4
m4/sys_ioctl_h.m4
m4/sys_random_h.m4 [new file with mode: 0644]
m4/sys_select_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
m4/sys_time_h.m4
m4/sys_types_h.m4
m4/sys_uio_h.m4
m4/sys_wait_h.m4
m4/tempname.m4
m4/thread.m4 [new file with mode: 0644]
m4/threadlib.m4 [new file with mode: 0644]
m4/time_h.m4
m4/time_r.m4
m4/time_rz.m4
m4/timegm.m4
m4/timespec.m4
m4/tm_gmtoff.m4
m4/tzset.m4
m4/unistd_h.m4
m4/unlocked-io.m4
m4/vararrays.m4 [deleted file]
m4/vasnprintf.m4
m4/vasprintf.m4
m4/version-etc.m4
m4/visibility.m4 [new file with mode: 0644]
m4/warn-on-use.m4
m4/warnings.m4
m4/wchar_h.m4
m4/wchar_t.m4
m4/wcrtomb.m4
m4/wctob.m4
m4/wctomb.m4
m4/wctype_h.m4
m4/wcwidth.m4
m4/wint_t.m4
m4/wmemchr.m4 [new file with mode: 0644]
m4/wmempcpy.m4 [new file with mode: 0644]
m4/xalloc.m4
m4/xsize.m4
m4/xstrndup.m4 [deleted file]
m4/xstrtol.m4
m4/xvasprintf.m4
m4/year2038.m4 [new file with mode: 0644]
m4/zzgnulib.m4 [new file with mode: 0644]
maint.mk
man/Makefile.am
man/Makefile.in
man/cmp.1
man/diff.1
man/diff3.1
man/help2man
man/sdiff.1
po/Makevars
po/POTFILES.in
po/bg.gmo
po/bg.po
po/ca.gmo
po/ca.po
po/cs.gmo
po/cs.po
po/da.gmo
po/da.po
po/de.gmo
po/de.po
po/diffutils.pot
po/el.gmo
po/el.po
po/eo.gmo
po/eo.po
po/es.gmo
po/es.po
po/fi.gmo
po/fi.po
po/fr.gmo
po/fr.po
po/ga.gmo
po/ga.po
po/gl.gmo
po/gl.po
po/he.gmo
po/he.po
po/hr.gmo
po/hr.po
po/hu.gmo
po/hu.po
po/id.gmo
po/id.po
po/it.gmo
po/it.po
po/ja.gmo
po/ja.po
po/lv.gmo
po/lv.po
po/ms.gmo
po/ms.po
po/nb.gmo
po/nb.po
po/nl.gmo
po/nl.po
po/pl.gmo
po/pl.po
po/pt.gmo
po/pt.po
po/pt_BR.gmo
po/pt_BR.po
po/ro.gmo
po/ro.po
po/ru.gmo
po/ru.po
po/sr.gmo
po/sr.po
po/sv.gmo
po/sv.po
po/tr.gmo
po/tr.po
po/uk.gmo
po/uk.po
po/vi.gmo
po/vi.po
po/zh_CN.gmo
po/zh_CN.po
po/zh_TW.gmo
po/zh_TW.po
src/Makefile.am
src/Makefile.in
src/analyze.c
src/cmp.c
src/context.c
src/die.h
src/diff.c
src/diff.h
src/diff3.c
src/dir.c
src/ed.c
src/ifdef.c
src/io.c
src/normal.c
src/sdiff.c
src/side.c
src/system.h
src/util.c
tests/Makefile.in
tests/cmp
tests/envvar-check
tests/help-version
tests/init.cfg
tests/init.sh
tests/new-file

index 475ba51..cc1923a 100644 (file)
@@ -1 +1 @@
-3.7
+3.8
diff --git a/AUTHORS b/AUTHORS
index d70cf1a..c1d2ea0 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -33,7 +33,7 @@ Patrick D'Cruze
 Eli Zaretskii
 
 
-Copyright (C) 2001, 2006, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+Copyright (C) 2001, 2006, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 This file is part of GNU diffutils.
 
index 98fade3..53b731a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,323 @@
+2021-08-01  Jim Meyering  <meyering@fb.com>
+
+       version 3.8
+       * NEWS: Record release date.
+
+       build: update gnulib to latest
+
+2021-07-31  Jim Meyering  <meyering@fb.com>
+
+       cmp: avoid reading uninitialized memory
+       [This *is* useful, so reapply. ]
+       When comparing buffers a word at a time, cmp could read up to
+       sizeof (word) - 1 uninitialized bytes.
+       * src/cmp.c (cmp): Set not just a single guaranteed-differing
+       sentinel byte just beyond any final read byte, but also ensure
+       that any following bytes are defined, if those may be read via
+       block_compare's word-at-a-time comparison.  Reported by Bruno Haible
+       in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html
+
+2021-07-28  Bruno Haible  <bruno@clisp.org>
+
+       cmp: avoid reading uninitialized memory
+       One or both of the sentinel bytes were copies of uninitialized values.
+       * src/cmp.c (cmp): Use arbitrary initialized values for the
+       sentinel bytes.
+
+2021-07-28  Jim Meyering  <meyering@fb.com>
+
+       cmp: revert preceding change
+       It did not solve the problem. The next patch does.
+
+2021-07-27  Jim Meyering  <meyering@fb.com>
+
+       cmp: avoid reading uninitialized memory
+       When comparing buffers a word at a time, cmp could read up to
+       sizeof (word) - 1 uninitialized bytes.
+       * src/cmp.c (cmp): Set not just a single guaranteed-differing
+       sentinel byte just beyond any final read byte, but also ensure
+       that any following bytes are defined, if those may be read via
+       block_compare's word-at-a-time comparison.  Reported by Bruno Haible
+       in https://lists.gnu.org/r/diffutils-devel/2021-07/msg00003.html
+
+2021-07-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       build: update gnulib submodule to latest
+
+2021-05-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diff: better --color help
+       * src/diff.c (option_help_msgid): Reword --color help without
+       using the confusing word “default”.  Problem reported
+       by Peter Oliver (Bug#48532).
+
+2021-05-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       doc: fix URL in HACKING
+
+2021-03-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diff: pacify compiler re style
+       * src/diff.c (usage): Prefer &"string"[N] to "string" + N.
+       Some compilers complain about the latter, as they worry C++
+       refugees will think it’s string concatnation.
+
+       diff3: avoid signed int overflow
+       * src/diff3.c (main): Avoid signed integer overflow in the very
+       unlikely case of more than INT_MAX incompatible options.  Instead,
+       use one bit to record the presence of each type of incompatible
+       option, and report an error if more than one bit is set.
+
+       maint: don’t bother with -Wno-return-local-addr
+       * configure.ac (WERROR_CFLAGS): Don’t bother with
+       -Wno-return-local-addr as it doesn’t seem to work.
+       Anyway, it’s no longer needed on Ubuntu 20.10.
+
+       maint: disable -Wstack-protector
+       * configure.ac (WERROR_CFLAGS): Disable -Wstack-protector, as it
+       has a false alarm with lib/vasnprintf.c on Ubuntu 20.10 and it’s
+       not worth working around.  Coreutils already disables it.
+
+       diff: plug memory leak in ifdef.c
+       Problem reported by Than (Bug#47362).
+       Fix the bug by using xmalloca instead of vararrays.
+       * bootstrap.conf (gnulib_modules): Add xmalloca; remove vararrays.
+       * configure.ac: Remove AC_C_VARARRAYS.
+       * src/ifdef.c: Include xmalloca.h instead of xalloc.h.
+       (do_printf_spec): Use xmalloca instead of an xmalloc
+       that lacks a corresponding ‘free’ if HAVE_C_VARARRAYS
+       due to a typo in 2017-05-18T05:51:31Z!meyering@fb.com.
+
+       build: update gnulib submodule to latest
+
+2021-01-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       maint: work around GCC -Wreturn-local-addr bug
+       * configure.ac: Do not use -Wreturn-local-addr in Gnulib,
+       to suppress a false alarm in vasnprintf.c.
+
+2021-01-01  Jim Meyering  <meyering@fb.com>
+
+       maint: update all copyright year number ranges
+       Run "make update-copyright" and then...
+       * gnulib: Update to latest with copyright year adjusted.
+       * tests/init.sh: Sync with gnulib to pick up copyright year.
+       * bootstrap: Likewise.
+
+2020-12-05  Jim Meyering  <meyering@fb.com>
+
+       build: require autoconf-2.64
+       * configure.ac: Require 2.64, up from 2.63, to align with gnulib.
+
+2020-03-15  Jim Meyering  <meyering@fb.com>
+
+       build: update gnulib to latest
+
+       doc: adjust formatting to make apropos (man -k) work better
+       * man/Makefile.am $(dist_man1_MANS): Adjust sed substitution
+       to also remove the space after "GNU". This avoids the single
+       leading space on each man page title line.  I'm guessing that
+       interfered with indexing/searching, causing "man -k diff3" to
+       print this: diff3 (1) - (unknown subject).
+       Reported by Dan Jacobon in http://bugs.gnu.org/39769.
+
+2020-01-19  Jim Meyering  <meyering@fb.com>
+
+       doc: correct an ancient "At present"
+       * doc/diffutils.texi (Unified Format): Correct the now
+       seriously outdated "At present" (referring to early 1990s)
+       statement to be more of a historical note.
+       Reported by Roland Illig in http://bugs.gnu.org/39184.
+
+2020-01-05  Jim Meyering  <meyering@fb.com>
+
+       doc: use program name, not "GNU", in the nroff/man header
+       * man/Makefile.am (dist_man1_MANS): Elide "GNU " prefix
+       from the generated prog+one-line-summary, so that help2man
+       uses the program name rather than "GNU" as the nroff "name".
+       Reported by Dan Jacobson in http://bugs.gnu.org/38574.
+
+2020-01-01  Jim Meyering  <meyering@fb.com>
+
+       maint: update all copyright year number ranges
+       Run "make update-copyright" and then...
+       * gnulib: Update to latest with copyright year adjusted.
+       * tests/init.sh: Sync with gnulib to pick up copyright year.
+       * bootstrap: Likewise.
+
+2019-12-29  Jim Meyering  <meyering@fb.com>
+
+       maint: avoid gnulib-tool deprecation warnings, and build failure
+       * bootstrap.conf (gnulib_modules): Use getopt-gnu, rather than
+       obsolete "getopt" module. Use nstrftime in place of strftime.
+       (avoided_gnulib_modules): Do not avoid the "lock" module. That
+       would lead to a build failure due to "glthread/lock.h not found".
+
+       maint: avoid syntax-check failure
+       * po/POTFILES.in: Add argmatch.h; remove xstrtol-error.c
+
+       maint: disable two and reenable many warning options
+       * configure.ac (GNULIB_WARN_CFLAGS): Disable -Wduplicated-branches
+       and -Wreturn-local-addr, due to a couple of false-positive warnings.
+       (WARN_CFLAGS): Reenable many warnings that now (with recent gcc)
+       provoke no false positive.
+
+       maint: avoid gnulib's lock-tests module
+       * bootstrap.conf (avoided_gnulib_modules): Also --avoid=lock-tests
+       to avoid gnulib-related build failure.
+
+2019-12-23  Jim Meyering  <meyering@fb.com>
+
+       build: update gnulib to latest
+       * gnulib: Update submodule to latest.
+       * bootstrap: Copy from gnulib.
+       * tests/init.sh: Likewise.
+
+2019-12-20  Jim Meyering  <meyering@fb.com>
+
+       maint: tweak bootstrap.conf
+       * bootstrap.conf (buildreq): Require at least autoconf 2.62,
+       up from 2.61, just as grep and coreutils do.
+       (bootstrap_post_import_hook): "Copy pkg-config's pkg.m4 ...",
+       copied from grep's bootstrap.conf.
+       (avoided_gnulib_modules): Pull this definition to the top.
+       Formatting.
+
+2019-10-01  Dave Odell  <dmo2118@gmail.com>  (tiny change)
+
+       cmp: add test case for Bug#37558
+       * tests/cmp: New test case (Bug#37558).
+
+2019-10-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       cmp: fix -l width bug
+       Problem reported by Dave Odell (Bug#37558).
+       * src/cmp.c (cmp): Treat negative ‘bytes’ as infinite, fixing a
+       bug introduced in the 2019-08-27 patch that fixed Bug#35256.
+
+2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diff: don’t mistreat -N in arg as a large number
+       Problem reported by alec (Bug#35256).
+       * NEWS: Mention the fix.
+       * bootstrap.conf (gnulib_modules): Use strtoimax and xstrtoimax,
+       not strtoumax and strtoumax.
+       * src/cmp.c (bytes): Now signed, with -1 representing no limit.
+       All uses changed.
+       * src/cmp.c (specify_ignore_initial, main):
+       * src/diff.c (main):
+       * src/ifdef.c (format_group):
+       * src/sdiff.c (interact):
+       Use strtoimax, not strtoumax.
+
+       build: update gnulib submodule to latest
+
+2019-07-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       maint: ignore ‘configure’ temporaries
+       * .gitignore: Ignore confdefs*, conftest*.
+
+       maint: avoid Gnulib setlocale module
+       Problem reported for MS-Windows by Richard Gering (Bug#34376).
+       Diffutils doesn’t need any of the Gnulib fixes for setlocale.
+       * bootstrap.conf (gnulib_tool_option_extras):
+       Avoid the setlocale module.
+
+2019-05-24  KO Myung-Hun  <komh@chollian.net>
+
+       tests: init.cfg: use $PATH_SEPARATOR not ':'
+       On OS/2, a path separator is semi-colon ';' not colon ':'.
+       * tests/init.cfg: Replace ':' with $PATH_SEPARATOR.
+
+2019-01-20  Jim Meyering  <meyering@fb.com>
+
+       build: ensure no VLA is used
+       Cause developer builds to fail for any use of a VLA.
+       VLAs (variable length arrays) limit portability.
+       * configure.ac (nw): Remove -Wvla from the list of disabled warnings,
+       thus enabling the warning when configured with --enable-gcc-warnings.
+       (GNULIB_NO_VLA) Define, disabling use of VLAs in gnulib.  This commit
+       is functionally equivalent to coreutils' v8.30-44-gd26dece5d.
+
+       build: update gnulib to latest
+       * gnulib: Update to latest.
+       * po/POTFILES.in: Add lib/xstdopen.c.
+
+2019-01-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diff: use xstdopen, not stdopen
+       * bootstrap.conf (gnulib_modules):
+       * src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (main):
+       Use xstdopen, not stdopen.
+
+       build: update gnulib submodule to latest
+
+2019-01-05  Jim Meyering  <meyering@fb.com>
+
+       maint: convert all TABs to equivalent spaces in indentation
+       Using this file,
+
+       cat > leading-blank.exempt <<\EOF
+       (\.gitmodules|help2man|pre-commit)$
+       (?:^|\/)ChangeLog[^/]*$
+       (?:^|\/)(?:GNU)?[Mm]akefile[^/]*$
+       \.(?:am|mk)$
+       EOF
+
+       run the following command to convert all non-conforming leading white
+       space to be all spaces:
+
+       git ls-files \
+         | pcregrep -vf leading-blank.exempt \
+         | xargs pcregrep -l '^ *\t' \
+         | xargs perl -MText::Tabs -ni -le \
+           '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
+
+       Since that changed old NEWS, I also ran "make update-NEWS-hash"
+       to update the old_NEWS_hash value in cfg.mk.
+
+2019-01-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       diff: fix cmp, diff3, sdiff with stdin closed
+       * NEWS: Mention this.
+       * src/cmp.c, src/diff3.c, src/sdiff.c: Include stdopen.h.
+       (main): Call stdopen early.
+       * src/cmp.c (main): Simplify now that we need not worry about
+       stdin being closed.
+       * src/diff.c (main): Translate stdopen diagnostic.
+
+       diff: remove unportable ‘diff -N - f <&-’ feature
+       * NEWS: Mention this.
+       * bootstrap.conf (gnulib_modules): Add stdopen.
+       * doc/diffutils.texi (Comparing Directories):
+       Do not document behavior if stdin is closed.
+       * src/diff.c: Include stdopen.h.
+       (main): Call stdopen early.
+       (compare_files) [__hpux]: Remove recently-introduced
+       special case for HP-UX exec with stdin closed.
+       * tests/new-file: Remove tests of the removed feature.
+
+       build: update gnulib submodule to latest
+
+2019-01-03  Bruno Haible  <bruno@clisp.org>
+
+       diff: recognize file descriptors closed by the parent process on HP-UX
+       * src/diff.c (compare_files): Use fcntl to distinguish a file
+       descriptor closed by the parent process from a file descriptor
+       that references /dev/null.
+
+2019-01-01  Jim Meyering  <meyering@fb.com>
+
+       maint: update all copyright dates via "make update-copyright"
+       * gnulib: Also update submodule for its copyright updates.
+
 2018-12-31  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.7
        * NEWS: Record release date.
 
index c62c7dc..bde0ffe 100644 (file)
@@ -4265,7 +4265,7 @@ Thu Nov  3 16:30:24 1988  Randall Smith  (randy at gluteus.ai.mit.edu)
 
        -----
 
-       Copyright (C) 1988-1994, 1997-2002, 2004, 2006, 2009-2013, 2015-2018
+       Copyright (C) 1988-1994, 1997-2002, 2004, 2006, 2009-2013, 2015-2021
        Free Software Foundation, Inc.
 
        Copying and distribution of this file, with or without
index 7ee0965..0c99d58 100644 (file)
@@ -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-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2006-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -104,7 +104,7 @@ endif
 
 abort-due-to-no-makefile:
        @echo There seems to be no Makefile in this directory.   1>&2
-       @echo "You must run ./configure before running 'make'." 1>&2
+       @echo "You must run ./configure before running '$(MAKE)'." 1>&2
        @exit 1
 
 endif
diff --git a/INSTALL b/INSTALL
index 8865734..e82fd21 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,8 @@
 Installation Instructions
 *************************
 
-   Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
-Foundation, Inc.
+   Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
+Software Foundation, Inc.
 
    Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -225,7 +225,7 @@ order to use an ANSI C compiler:
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
-   HP-UX 'make' updates targets which have the same time stamps 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.
 
index 5041753..8e96ebe 100644 (file)
@@ -1,6 +1,6 @@
 # Main Automakefile for GNU diffutils.
 
-# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free Software
+# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2021 Free Software
 # Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
index a182a54..1a08785 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 
 # Main Automakefile for GNU diffutils.
 
-# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free Software
+# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2021 Free Software
 # Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -110,11 +110,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -124,13 +126,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -138,49 +141,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -188,30 +199,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(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 \
@@ -274,9 +288,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
-CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in \
        $(top_srcdir)/build-aux/compile \
@@ -328,6 +339,8 @@ am__relativize = \
 GZIP_ENV = --best
 DIST_ARCHIVES = $(distdir).tar.xz
 DIST_TARGETS = dist-xz
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -352,9 +365,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -369,321 +385,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -718,13 +824,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -746,17 +853,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -772,7 +883,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -781,7 +891,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -804,11 +914,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -825,10 +994,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -842,14 +1016,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -863,23 +1042,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -918,12 +1098,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -944,20 +1127,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -966,8 +1163,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -988,6 +1187,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -997,6 +1198,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -1020,6 +1222,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -1029,6 +1233,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -1053,31 +1258,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1097,6 +1314,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1104,10 +1322,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1129,7 +1350,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1141,29 +1364,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1175,6 +1454,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1185,6 +1465,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1211,6 +1496,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1219,6 +1505,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1232,10 +1519,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1456,7 +1745,6 @@ cscopelist-am: $(am__tagged_files)
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
        -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1542,6 +1830,10 @@ dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
        $(am__post_remove_distdir)
 
+dist-zstd: distdir
+       tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+       $(am__post_remove_distdir)
+
 dist-tarZ: distdir
        @echo WARNING: "Support for distribution archives compressed with" \
                       "legacy program 'compress' is deprecated." >&2
@@ -1584,6 +1876,8 @@ distcheck: dist
          eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
+       *.tar.zst*) \
+         zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
@@ -1600,7 +1894,7 @@ distcheck: dist
            $(DISTCHECK_CONFIGURE_FLAGS) \
            --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -1761,16 +2055,17 @@ uninstall-am:
        am--refresh check check-am clean clean-cscope clean-generic \
        cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
        dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
-       dist-zip distcheck distclean distclean-generic distclean-tags \
-       distcleancheck distdir distuninstallcheck dvi dvi-am html \
-       html-am info info-am install install-am install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-pdf install-pdf-am \
-       install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am tags tags-am uninstall uninstall-am
+       dist-zip dist-zstd distcheck distclean distclean-generic \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
+       uninstall-am
 
 .PRECIOUS: Makefile
 
diff --git a/NEWS b/NEWS
index 202a504..96cc5f6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,29 @@
 GNU diffutils NEWS                                    -*- outline -*-
 
+* Noteworthy changes in release 3.8 (2021-08-01) [stable]
+
+** Incompatible changes
+
+  diff no longer treats a closed stdin as representing an absent file
+  in usage like 'diff --new-file - foo <&-'.  This feature was rarely
+  if ever used and was not portable to POSIX platforms that reopen
+  stdin on exec, such as SELinux if the process underwent an AT_SECURE
+  transition, or HP-UX even if not setuid.
+  [bug#33965 introduced in 2.8]
+
+** Bug fixes
+
+  diff and related programs no longer get confused if stdin, stdout,
+  or stderr are closed.  Previously, they sometimes opened files into
+  file descriptors 0, 1, or 2 and then mistakenly did I/O with them
+  that was intended for stdin, stdout, or stderr.
+  [bug#33965 present since "the beginning"]
+
+  cmp, diff and sdiff no longer treat negative command-line
+  option-arguments as if they were large positive numbers.
+  [bug#35256 introduced in 2.8]
+
+
 * Noteworthy changes in release 3.7 (2018-12-31) [stable]
 
 ** Bug fixes
@@ -323,12 +347,12 @@ User-visible changes in version 2.4:
       printed according to the printf specification.
       E.g. '%5df' prints the number of the first line in the
       group in the old file using the "%5d" format.
-       e: line number just before the group in old file; equals f - 1
-       f: first line number in group in the old file
-       l: last line number in group in the old file
-       m: line number just after the group in old file; equals l + 1
-       n: number of lines in group in the old file; equals l - f + 1
-       E, F, L, M, N: likewise, for lines in the new file
+        e: line number just before the group in old file; equals f - 1
+        f: first line number in group in the old file
+        l: last line number in group in the old file
+        m: line number just after the group in old file; equals l + 1
+        n: number of lines in group in the old file; equals l - f + 1
+        E, F, L, M, N: likewise, for lines in the new file
   %(A=B?T:E)
       If A equals B then T else E.  A and B are each either a decimal
       constant or a single letter interpreted as above.  T and E are
@@ -418,7 +442,7 @@ User-visible changes in version 2.0:
 
 \f
 
-Copyright (C) 1993-1994, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free
+Copyright (C) 1993-1994, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2021 Free
 Software Foundation, Inc.
 
 This file is part of GNU Diffutils.
diff --git a/README b/README
index 3c214ab..57d080e 100644 (file)
--- a/README
+++ b/README
@@ -51,7 +51,7 @@ Please report bugs to <bug-diffutils@gnu.org>.
 
 -----
 
-Copyright (C) 1992, 1998, 2001-2002, 2004, 2009-2013, 2015-2018 Free Software
+Copyright (C) 1992, 1998, 2001-2002, 2004, 2009-2013, 2015-2021 Free Software
 Foundation, Inc.
 
 This file is part of GNU Diffutils.
index 57ec6c8..5da573b 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16a -*- Autoconf -*-
+# generated automatically by aclocal 1.16d -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 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.69.197-b8fd7],,
-[m4_warning([this file was generated for autoconf 2.69.197-b8fd7.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
 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-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16a], [],
+m4_if([$1], [1.16d], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16a])dnl
+[AM_AUTOMAKE_VERSION([1.16d])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 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_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -371,7 +371,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   done
   if test $am_rc -ne 0; then
     AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
-    for automatic dependency tracking.  Try re-running configure with the
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE="gmake" (or whatever is
+    necessary).  You can also try re-running configure with the
     '--disable-dependency-tracking' option to at least be able to build
     the package (albeit without support for automatic dependency tracking).])
   fi
@@ -398,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -462,7 +464,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
 [_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 m4_if(
-  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
   [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
@@ -514,6 +516,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [m4_define([AC_PROG_OBJCXX],
                             m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+  ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
 AC_REQUIRE([AM_SILENT_RULES])dnl
 dnl The testsuite driver may need to know about EXEEXT, so add the
 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
@@ -595,7 +611,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-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -616,7 +632,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -637,7 +653,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -680,7 +696,7 @@ AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -701,12 +717,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -719,7 +730,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -748,7 +759,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -795,7 +806,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -814,7 +825,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -895,7 +906,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -955,7 +966,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -983,7 +994,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1002,7 +1013,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1138,15 +1149,17 @@ m4_include([m4/__inline.m4])
 m4_include([m4/absolute-header.m4])
 m4_include([m4/alloca.m4])
 m4_include([m4/arpa_inet_h.m4])
+m4_include([m4/asm-underscore.m4])
+m4_include([m4/atoll.m4])
 m4_include([m4/btowc.m4])
 m4_include([m4/builtin-expect.m4])
 m4_include([m4/c-stack.m4])
+m4_include([m4/calloc.m4])
 m4_include([m4/clock_time.m4])
 m4_include([m4/close.m4])
 m4_include([m4/codeset.m4])
 m4_include([m4/config-h.m4])
-m4_include([m4/ctype.m4])
-m4_include([m4/dirname.m4])
+m4_include([m4/ctype_h.m4])
 m4_include([m4/double-slash-root.m4])
 m4_include([m4/dup2.m4])
 m4_include([m4/eealloc.m4])
@@ -1165,7 +1178,9 @@ m4_include([m4/flexmember.m4])
 m4_include([m4/float_h.m4])
 m4_include([m4/fnmatch.m4])
 m4_include([m4/fnmatch_h.m4])
+m4_include([m4/fopen.m4])
 m4_include([m4/fpieee.m4])
+m4_include([m4/free.m4])
 m4_include([m4/freopen.m4])
 m4_include([m4/fstat.m4])
 m4_include([m4/ftruncate.m4])
@@ -1174,10 +1189,10 @@ m4_include([m4/getdtablesize.m4])
 m4_include([m4/getopt.m4])
 m4_include([m4/getpagesize.m4])
 m4_include([m4/getprogname.m4])
+m4_include([m4/getrandom.m4])
 m4_include([m4/gettext.m4])
 m4_include([m4/gettime.m4])
 m4_include([m4/gettimeofday.m4])
-m4_include([m4/glibc21.m4])
 m4_include([m4/gnu-make.m4])
 m4_include([m4/gnulib-common.m4])
 m4_include([m4/gnulib-comp.m4])
@@ -1191,12 +1206,13 @@ m4_include([m4/inline.m4])
 m4_include([m4/intlmacosx.m4])
 m4_include([m4/intmax_t.m4])
 m4_include([m4/inttostr.m4])
-m4_include([m4/inttypes-pri.m4])
 m4_include([m4/inttypes.m4])
 m4_include([m4/inttypes_h.m4])
 m4_include([m4/ioctl.m4])
 m4_include([m4/isblank.m4])
 m4_include([m4/iswblank.m4])
+m4_include([m4/iswdigit.m4])
+m4_include([m4/iswxdigit.m4])
 m4_include([m4/langinfo_h.m4])
 m4_include([m4/largefile.m4])
 m4_include([m4/lib-ld.m4])
@@ -1212,8 +1228,7 @@ m4_include([m4/locale-tr.m4])
 m4_include([m4/locale-zh.m4])
 m4_include([m4/locale_h.m4])
 m4_include([m4/localeconv.m4])
-m4_include([m4/localtime-buffer.m4])
-m4_include([m4/longlong.m4])
+m4_include([m4/lock.m4])
 m4_include([m4/lstat.m4])
 m4_include([m4/malloc.m4])
 m4_include([m4/malloca.m4])
@@ -1227,6 +1242,7 @@ m4_include([m4/mbsrtowcs.m4])
 m4_include([m4/mbstate_t.m4])
 m4_include([m4/mbtowc.m4])
 m4_include([m4/memchr.m4])
+m4_include([m4/mempcpy.m4])
 m4_include([m4/minmax.m4])
 m4_include([m4/mkdir.m4])
 m4_include([m4/mkstemp.m4])
@@ -1236,6 +1252,7 @@ m4_include([m4/mode_t.m4])
 m4_include([m4/msvc-inval.m4])
 m4_include([m4/msvc-nothrow.m4])
 m4_include([m4/multiarch.m4])
+m4_include([m4/musl.m4])
 m4_include([m4/nanosleep.m4])
 m4_include([m4/netinet_in_h.m4])
 m4_include([m4/nl_langinfo.m4])
@@ -1244,6 +1261,7 @@ m4_include([m4/nocrash.m4])
 m4_include([m4/nstrftime.m4])
 m4_include([m4/off_t.m4])
 m4_include([m4/open-cloexec.m4])
+m4_include([m4/open-slash.m4])
 m4_include([m4/open.m4])
 m4_include([m4/pathmax.m4])
 m4_include([m4/perror.m4])
@@ -1251,17 +1269,25 @@ m4_include([m4/pipe.m4])
 m4_include([m4/po.m4])
 m4_include([m4/printf.m4])
 m4_include([m4/progtest.m4])
+m4_include([m4/pthread-thread.m4])
+m4_include([m4/pthread_h.m4])
+m4_include([m4/pthread_rwlock_rdlock.m4])
+m4_include([m4/pthread_sigmask.m4])
 m4_include([m4/putenv.m4])
 m4_include([m4/quote.m4])
 m4_include([m4/quotearg.m4])
 m4_include([m4/raise.m4])
 m4_include([m4/rawmemchr.m4])
 m4_include([m4/readlink.m4])
+m4_include([m4/realloc.m4])
+m4_include([m4/reallocarray.m4])
 m4_include([m4/regex.m4])
+m4_include([m4/sched_h.m4])
 m4_include([m4/select.m4])
 m4_include([m4/setenv.m4])
-m4_include([m4/setlocale.m4])
+m4_include([m4/setlocale_null.m4])
 m4_include([m4/sigaction.m4])
+m4_include([m4/sigaltstack.m4])
 m4_include([m4/signal_h.m4])
 m4_include([m4/signalblocking.m4])
 m4_include([m4/size_max.m4])
@@ -1272,6 +1298,7 @@ m4_include([m4/sockets.m4])
 m4_include([m4/socklen.m4])
 m4_include([m4/sockpfaf.m4])
 m4_include([m4/ssize_t.m4])
+m4_include([m4/stack-direction.m4])
 m4_include([m4/stat-time.m4])
 m4_include([m4/stat.m4])
 m4_include([m4/stdalign.m4])
@@ -1287,13 +1314,13 @@ m4_include([m4/strerror.m4])
 m4_include([m4/strerror_r.m4])
 m4_include([m4/string_h.m4])
 m4_include([m4/strings_h.m4])
-m4_include([m4/strndup.m4])
 m4_include([m4/strnlen.m4])
 m4_include([m4/strptime.m4])
-m4_include([m4/strtoull.m4])
-m4_include([m4/strtoumax.m4])
+m4_include([m4/strtoimax.m4])
+m4_include([m4/strtoll.m4])
 m4_include([m4/symlink.m4])
 m4_include([m4/sys_ioctl_h.m4])
+m4_include([m4/sys_random_h.m4])
 m4_include([m4/sys_select_h.m4])
 m4_include([m4/sys_socket_h.m4])
 m4_include([m4/sys_stat_h.m4])
@@ -1302,6 +1329,8 @@ m4_include([m4/sys_types_h.m4])
 m4_include([m4/sys_uio_h.m4])
 m4_include([m4/sys_wait_h.m4])
 m4_include([m4/tempname.m4])
+m4_include([m4/thread.m4])
+m4_include([m4/threadlib.m4])
 m4_include([m4/time_h.m4])
 m4_include([m4/time_r.m4])
 m4_include([m4/time_rz.m4])
@@ -1311,10 +1340,10 @@ m4_include([m4/tm_gmtoff.m4])
 m4_include([m4/tzset.m4])
 m4_include([m4/unistd_h.m4])
 m4_include([m4/unlocked-io.m4])
-m4_include([m4/vararrays.m4])
 m4_include([m4/vasnprintf.m4])
 m4_include([m4/vasprintf.m4])
 m4_include([m4/version-etc.m4])
+m4_include([m4/visibility.m4])
 m4_include([m4/warn-on-use.m4])
 m4_include([m4/warnings.m4])
 m4_include([m4/wchar_h.m4])
@@ -1325,8 +1354,11 @@ m4_include([m4/wctomb.m4])
 m4_include([m4/wctype_h.m4])
 m4_include([m4/wcwidth.m4])
 m4_include([m4/wint_t.m4])
+m4_include([m4/wmemchr.m4])
+m4_include([m4/wmempcpy.m4])
 m4_include([m4/xalloc.m4])
 m4_include([m4/xsize.m4])
-m4_include([m4/xstrndup.m4])
 m4_include([m4/xstrtol.m4])
 m4_include([m4/xvasprintf.m4])
+m4_include([m4/year2038.m4])
+m4_include([m4/zzgnulib.m4])
index 5264d9f..7523f65 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2018-10-13.05; # UTC
+scriptversion=2020-11-18.17; # UTC
 
 # Bootstrap this package from checked-out sources.
 
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -71,7 +71,9 @@ Options:
  --no-git                 do not use git to update gnulib.  Requires that
                           --gnulib-srcdir point to a correct gnulib snapshot
  --skip-po                do not download po files
-
+EOF
+  bootstrap_print_option_usage_hook
+  cat <<EOF
 If the file $me.conf exists in the same directory as this script, its
 contents are read as shell variables to configure the bootstrap.
 
@@ -154,6 +156,18 @@ gnulib_files=
 : ${AUTOPOINT=autopoint}
 : ${AUTORECONF=autoreconf}
 
+# A function to be called for each unrecognized option.  Returns 0 if
+# the option in $1 has been processed by the function.  Returns 1 if
+# the option has not been processed by the function.  Override it via
+# your own definition in bootstrap.conf
+
+bootstrap_option_hook() { return 1; }
+
+# A function to be called in order to print the --help information
+# corresponding to user-defined command-line options.
+
+bootstrap_print_option_usage_hook() { :; }
+
 # A function to be called right after gnulib-tool is run.
 # Override it via your own definition in bootstrap.conf.
 bootstrap_post_import_hook() { :; }
@@ -166,7 +180,7 @@ bootstrap_epilogue() { :; }
 # specified directory.  Fill in the first %s with the destination
 # directory and the second with the domain name.
 po_download_command_format=\
-"wget --mirror --level=1 -nd -q -A.po -P '%s' \
+"wget --mirror --level=1 -nd -nv -A.po -P '%s' \
  https://translationproject.org/latest/%s/"
 
 # Prefer a non-empty tarname (4th argument of AC_INIT if given), else
@@ -335,7 +349,7 @@ do
   --no-git)
     use_git=false;;
   *)
-    die "$option: unknown option";;
+    bootstrap_option_hook $option || die "$option: unknown option";;
   esac
 done
 
@@ -963,6 +977,16 @@ fi
 bootstrap_post_import_hook \
   || die "bootstrap_post_import_hook failed"
 
+# Don't proceed if there are uninitialized submodules.  In particular,
+# the next step will remove dangling links, which might be links into
+# uninitialized submodules.
+#
+# Uninitialized submodules are listed with an initial dash.
+if $use_git && git submodule | grep '^-' >/dev/null; then
+  die "some git submodules are not initialized. "     \
+      "Run 'git submodule update --init' and bootstrap again."
+fi
+
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual
index eeb9071..daa478c 100755 (executable)
@@ -1,40 +1,56 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
-  & eval 'exec perl -wS "$0" $argv:q'
-    if 0;
-# Generate a release announcement message.
+#!/bin/sh
+#! -*-perl-*-
 
-my $VERSION = '2018-03-07 03:46'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
-
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Generate a release announcement message.
 
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
+#
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
+#
 # Written by Jim Meyering
 
-use strict;
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by perl, the next two lines are a no-op.
+eval 'exec perl -wSx "$0" "$@"'
+     if 0;
+
+my $VERSION = '2021-04-11 8:42'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job.  Otherwise, update this string manually.
 
+my $copyright_year = '2021';
+
+use strict;
 use Getopt::Long;
 use POSIX qw(strftime);
 
 (my $ME = $0) =~ s|.*/||;
 
 my %valid_release_types = map {$_ => 1} qw (alpha beta stable);
-my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz');
+my @archive_suffixes = qw (tar.gz tar.bz2 tar.lz tar.lzma tar.xz);
 my %digest_classes =
   (
    'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'),
@@ -357,8 +373,8 @@ sub get_tool_versions ($$)
 }
 
 {
-  # Neutralize the locale, so that, for instance, "du" does not
-  # issue "1,2" instead of "1.2", what confuses our regexps.
+  # Use the C locale so that, for instance, "du" does not
+  # print "1,2" instead of "1.2", which would confuse our regexps.
   $ENV{LC_ALL} = "C";
 
   my $mail_headers;
@@ -399,7 +415,19 @@ sub get_tool_versions ($$)
      'archive-suffix=s'   => \@archive_suffixes,
 
      help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
+     version =>
+       sub
+       {
+         print "$ME version $VERSION\n";
+         print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n";
+         print "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n"
+             . "This is free software: you are free to change and redistribute it.\n"
+             . "There is NO WARRANTY, to the extent permitted by law.\n";
+         print "\n";
+         my $author = "Jim Meyering";
+         print "Written by $author.\n";
+         exit
+       },
     ) or usage 1;
 
   my $fail = 0;
@@ -550,6 +578,7 @@ EOF
 ## perl-extra-newline-before-brace: t
 ## perl-merge-trailing-else: nil
 ## eval: (add-hook 'before-save-hook 'time-stamp)
+## time-stamp-line-limit: 50
 ## time-stamp-start: "my $VERSION = '"
 ## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
 ## time-stamp-time-zone: "UTC0"
index 99e5052..df363c8 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ func_file_conv ()
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -67,7 +67,7 @@ func_file_conv ()
        mingw/*)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin/*)
+       cygwin/* | msys/*)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine/*)
index 28bec27..e81d3ae 100755 (executable)
@@ -1,8 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2018 Free Software Foundation, Inc.
+#   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2018-12-07'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-06-03'
 
 # 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
@@ -27,11 +29,19 @@ timestamp='2018-12-07'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -50,7 +60,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2021 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."
@@ -84,6 +94,9 @@ if test $# != 0; then
   exit 1
 fi
 
+# Just in case it came from the environment.
+GUESS=
+
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
 # temporary files to be created and, as you can see below, it is a
@@ -99,8 +112,10 @@ tmp=
 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
 
 set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
     : "${TMPDIR=/tmp}"
-    # shellcheck disable=SC2039
+    # shellcheck disable=SC2039,SC3028
     { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
        { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
        { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
@@ -110,7 +125,7 @@ set_cc_for_build() {
        ,,)    echo "int x;" > "$dummy.c"
               for driver in cc gcc c89 c99 ; do
                   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
-                      CC_FOR_BUILD="$driver"
+                      CC_FOR_BUILD=$driver
                       break
                   fi
               done
@@ -131,14 +146,12 @@ fi
 
 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "$UNAME_SYSTEM" in
+case $UNAME_SYSTEM in
 Linux|GNU|GNU/*)
-       # If the system lacks a compiler, then just pick glibc.
-       # We could probably try harder.
-       LIBC=gnu
+       LIBC=unknown
 
        set_cc_for_build
        cat <<-EOF > "$dummy.c"
@@ -147,24 +160,37 @@ Linux|GNU|GNU/*)
        LIBC=uclibc
        #elif defined(__dietlibc__)
        LIBC=dietlibc
-       #else
+       #elif defined(__GLIBC__)
        LIBC=gnu
+       #else
+       #include <stdarg.h>
+       /* First heuristic to detect musl libc.  */
+       #ifdef __DEFINED_va_list
+       LIBC=musl
+       #endif
        #endif
        EOF
-       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+       cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       eval "$cc_set_libc"
 
-       # If ldd exists, use it to detect musl libc.
-       if command -v ldd >/dev/null && \
-               ldd --version 2>&1 | grep -q ^musl
-       then
-           LIBC=musl
+       # Second heuristic to detect musl libc.
+       if [ "$LIBC" = unknown ] &&
+          command -v ldd >/dev/null &&
+          ldd --version 2>&1 | grep -q ^musl; then
+               LIBC=musl
+       fi
+
+       # If the system lacks a compiler, then just pick glibc.
+       # We could probably try harder.
+       if [ "$LIBC" = unknown ]; then
+               LIBC=gnu
        fi
        ;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -176,12 +202,12 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
        #
        # Note: NetBSD doesn't particularly care about the vendor
        # portion of the name.  We always set it to "unknown".
-       sysctl="sysctl -n hw.machine_arch"
        UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-           "/sbin/$sysctl" 2>/dev/null || \
-           "/usr/sbin/$sysctl" 2>/dev/null || \
+           /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+           /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
            echo unknown)`
-       case "$UNAME_MACHINE_ARCH" in
+       case $UNAME_MACHINE_ARCH in
+           aarch64eb) machine=aarch64_be-unknown ;;
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
@@ -190,13 +216,13 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
            earmv*)
                arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
                endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
-               machine="${arch}${endian}"-unknown
+               machine=${arch}${endian}-unknown
                ;;
-           *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
+           *) machine=$UNAME_MACHINE_ARCH-unknown ;;
        esac
        # The Operating System including object format, if it has switched
        # to ELF recently (or will in the future) and ABI.
-       case "$UNAME_MACHINE_ARCH" in
+       case $UNAME_MACHINE_ARCH in
            earm*)
                os=netbsdelf
                ;;
@@ -217,7 +243,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
                ;;
        esac
        # Determine ABI tags.
-       case "$UNAME_MACHINE_ARCH" in
+       case $UNAME_MACHINE_ARCH in
            earm*)
                expr='s/^earmv[0-9]/-eabi/;s/eb$//'
                abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
@@ -228,7 +254,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
        # thus, need a distinct triplet. However, they do not need
        # kernel version information, so it can be replaced with a
        # suitable tag, in the style of linux-gnu.
-       case "$UNAME_VERSION" in
+       case $UNAME_VERSION in
            Debian*)
                release='-gnu'
                ;;
@@ -239,45 +265,57 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "$machine-${os}${release}${abi-}"
-       exit ;;
+       GUESS=$machine-${os}${release}${abi-}
+       ;;
     *:Bitrig:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-       echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+       ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+       ;;
+    *:SecBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+       GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+       ;;
     *:LibertyBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-       echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+       ;;
     *:MidnightBSD:*:*)
-       echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+       ;;
     *:ekkoBSD:*:*)
-       echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+       ;;
     *:SolidBSD:*:*)
-       echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+       ;;
+    *:OS108:*:*)
+       GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+       ;;
     macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+       ;;
     *:MirBSD:*:*)
-       echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+       ;;
     *:Sortix:*:*)
-       echo "$UNAME_MACHINE"-unknown-sortix
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-sortix
+       ;;
+    *:Twizzler:*:*)
+       GUESS=$UNAME_MACHINE-unknown-twizzler
+       ;;
     *:Redox:*:*)
-       echo "$UNAME_MACHINE"-unknown-redox
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-redox
+       ;;
     mips:OSF1:*.*)
-        echo mips-dec-osf1
-        exit ;;
+       GUESS=mips-dec-osf1
+       ;;
     alpha:OSF1:*:*)
+       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+       trap '' 0
        case $UNAME_RELEASE in
        *4.0)
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -291,7 +329,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
        # covers most systems running today.  This code pipes the CPU
        # types through head -n 1, so we only detect the type of CPU 0.
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-       case "$ALPHA_CPU_TYPE" in
+       case $ALPHA_CPU_TYPE in
            "EV4 (21064)")
                UNAME_MACHINE=alpha ;;
            "EV4.5 (21064)")
@@ -328,75 +366,76 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
-       # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
-       exitcode=$?
-       trap '' 0
-       exit $exitcode ;;
+       OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+       ;;
     Amiga*:UNIX_System_V:4.0:*)
-       echo m68k-unknown-sysv4
-       exit ;;
+       GUESS=m68k-unknown-sysv4
+       ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-       echo "$UNAME_MACHINE"-unknown-amigaos
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-amigaos
+       ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-       echo "$UNAME_MACHINE"-unknown-morphos
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-morphos
+       ;;
     *:OS/390:*:*)
-       echo i370-ibm-openedition
-       exit ;;
+       GUESS=i370-ibm-openedition
+       ;;
     *:z/VM:*:*)
-       echo s390-ibm-zvmoe
-       exit ;;
+       GUESS=s390-ibm-zvmoe
+       ;;
     *:OS400:*:*)
-       echo powerpc-ibm-os400
-       exit ;;
+       GUESS=powerpc-ibm-os400
+       ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix"$UNAME_RELEASE"
-       exit ;;
+       GUESS=arm-acorn-riscix$UNAME_RELEASE
+       ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
-       echo arm-unknown-riscos
-       exit ;;
+       GUESS=arm-unknown-riscos
+       ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-       echo hppa1.1-hitachi-hiuxmpp
-       exit ;;
+       GUESS=hppa1.1-hitachi-hiuxmpp
+       ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-       if test "`(/bin/universe) 2>/dev/null`" = att ; then
-               echo pyramid-pyramid-sysv3
-       else
-               echo pyramid-pyramid-bsd
-       fi
-       exit ;;
+       case `(/bin/universe) 2>/dev/null` in
+           att) GUESS=pyramid-pyramid-sysv3 ;;
+           *)   GUESS=pyramid-pyramid-bsd   ;;
+       esac
+       ;;
     NILE*:*:*:dcosx)
-       echo pyramid-pyramid-svr4
-       exit ;;
+       GUESS=pyramid-pyramid-svr4
+       ;;
     DRS?6000:unix:4.0:6*)
-       echo sparc-icl-nx6
-       exit ;;
+       GUESS=sparc-icl-nx6
+       ;;
     DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
        case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7; exit ;;
-       esac ;;
+           sparc) GUESS=sparc-icl-nx7 ;;
+       esac
+       ;;
     s390x:SunOS:*:*)
-       echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+       ;;
     sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=sparc-hal-solaris2$SUN_REL
+       ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=sparc-sun-solaris2$SUN_REL
+       ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-       echo i386-pc-auroraux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=i386-pc-auroraux$UNAME_RELEASE
+       ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        set_cc_for_build
        SUN_ARCH=i386
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
                (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
@@ -404,41 +443,44 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
                SUN_ARCH=x86_64
            fi
        fi
-       echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+       ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
        # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=sparc-sun-solaris3$SUN_REL
+       ;;
     sun4*:SunOS:*:*)
-       case "`/usr/bin/arch -k`" in
+       case `/usr/bin/arch -k` in
            Series*|S4*)
                UNAME_RELEASE=`uname -v`
                ;;
        esac
        # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+       GUESS=sparc-sun-sunos$SUN_REL
+       ;;
     sun3*:SunOS:*:*)
-       echo m68k-sun-sunos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-sun-sunos$UNAME_RELEASE
+       ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
        test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
-       case "`/bin/arch`" in
+       case `/bin/arch` in
            sun3)
-               echo m68k-sun-sunos"$UNAME_RELEASE"
+               GUESS=m68k-sun-sunos$UNAME_RELEASE
                ;;
            sun4)
-               echo sparc-sun-sunos"$UNAME_RELEASE"
+               GUESS=sparc-sun-sunos$UNAME_RELEASE
                ;;
        esac
-       exit ;;
+       ;;
     aushp:SunOS:*:*)
-       echo sparc-auspex-sunos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sparc-auspex-sunos$UNAME_RELEASE
+       ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -448,41 +490,41 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-atari-mint$UNAME_RELEASE
+       ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-atari-mint$UNAME_RELEASE
+       ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-       echo m68k-atari-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-atari-mint$UNAME_RELEASE
+       ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-       echo m68k-milan-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-milan-mint$UNAME_RELEASE
+       ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-       echo m68k-hades-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-hades-mint$UNAME_RELEASE
+       ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-       echo m68k-unknown-mint"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-unknown-mint$UNAME_RELEASE
+       ;;
     m68k:machten:*:*)
-       echo m68k-apple-machten"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-apple-machten$UNAME_RELEASE
+       ;;
     powerpc:machten:*:*)
-       echo powerpc-apple-machten"$UNAME_RELEASE"
-       exit ;;
+       GUESS=powerpc-apple-machten$UNAME_RELEASE
+       ;;
     RISC*:Mach:*:*)
-       echo mips-dec-mach_bsd4.3
-       exit ;;
+       GUESS=mips-dec-mach_bsd4.3
+       ;;
     RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix"$UNAME_RELEASE"
-       exit ;;
+       GUESS=mips-dec-ultrix$UNAME_RELEASE
+       ;;
     VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix"$UNAME_RELEASE"
-       exit ;;
+       GUESS=vax-dec-ultrix$UNAME_RELEASE
+       ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix"$UNAME_RELEASE"
-       exit ;;
+       GUESS=clipper-intergraph-clix$UNAME_RELEASE
+       ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
        set_cc_for_build
        sed 's/^        //' << EOF > "$dummy.c"
@@ -510,75 +552,76 @@ EOF
          dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
          SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
            { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=mips-mips-riscos$UNAME_RELEASE
+       ;;
     Motorola:PowerMAX_OS:*:*)
-       echo powerpc-motorola-powermax
-       exit ;;
+       GUESS=powerpc-motorola-powermax
+       ;;
     Motorola:*:4.3:PL8-*)
-       echo powerpc-harris-powermax
-       exit ;;
+       GUESS=powerpc-harris-powermax
+       ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-       echo powerpc-harris-powermax
-       exit ;;
+       GUESS=powerpc-harris-powermax
+       ;;
     Night_Hawk:Power_UNIX:*:*)
-       echo powerpc-harris-powerunix
-       exit ;;
+       GUESS=powerpc-harris-powerunix
+       ;;
     m88k:CX/UX:7*:*)
-       echo m88k-harris-cxux7
-       exit ;;
+       GUESS=m88k-harris-cxux7
+       ;;
     m88k:*:4*:R4*)
-       echo m88k-motorola-sysv4
-       exit ;;
+       GUESS=m88k-motorola-sysv4
+       ;;
     m88k:*:3*:R3*)
-       echo m88k-motorola-sysv3
-       exit ;;
+       GUESS=m88k-motorola-sysv3
+       ;;
     AViiON:dgux:*:*)
        # DG/UX returns AViiON for all architectures
        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+       if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
        then
-           if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
-              [ "$TARGET_BINARY_INTERFACE"x = x ]
+           if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+              test "$TARGET_BINARY_INTERFACE"x = x
            then
-               echo m88k-dg-dgux"$UNAME_RELEASE"
+               GUESS=m88k-dg-dgux$UNAME_RELEASE
            else
-               echo m88k-dg-dguxbcs"$UNAME_RELEASE"
+               GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
            fi
        else
-           echo i586-dg-dgux"$UNAME_RELEASE"
+           GUESS=i586-dg-dgux$UNAME_RELEASE
        fi
-       exit ;;
+       ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
-       echo m88k-dolphin-sysv3
-       exit ;;
+       GUESS=m88k-dolphin-sysv3
+       ;;
     M88*:*:R3*:*)
        # Delta 88k system running SVR3
-       echo m88k-motorola-sysv3
-       exit ;;
+       GUESS=m88k-motorola-sysv3
+       ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-       echo m88k-tektronix-sysv3
-       exit ;;
+       GUESS=m88k-tektronix-sysv3
+       ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-       echo m68k-tektronix-bsd
-       exit ;;
+       GUESS=m68k-tektronix-bsd
+       ;;
     *:IRIX*:*:*)
-       echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
-       exit ;;
+       IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+       GUESS=mips-sgi-irix$IRIX_REL
+       ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+       GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+       ;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
-       echo i386-ibm-aix
-       exit ;;
+       GUESS=i386-ibm-aix
+       ;;
     ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
+       if test -x /usr/bin/oslevel ; then
                IBM_REV=`/usr/bin/oslevel`
        else
-               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+               IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
        fi
-       echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
-       exit ;;
+       GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+       ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
                set_cc_for_build
@@ -595,16 +638,16 @@ EOF
 EOF
                if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
                then
-                       echo "$SYSTEM_NAME"
+                       GUESS=$SYSTEM_NAME
                else
-                       echo rs6000-ibm-aix3.2.5
+                       GUESS=rs6000-ibm-aix3.2.5
                fi
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-               echo rs6000-ibm-aix3.2.4
+               GUESS=rs6000-ibm-aix3.2.4
        else
-               echo rs6000-ibm-aix3.2
+               GUESS=rs6000-ibm-aix3.2
        fi
-       exit ;;
+       ;;
     *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
@@ -612,56 +655,56 @@ EOF
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/lslpp ] ; then
-               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+       if test -x /usr/bin/lslpp ; then
+               IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
-               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
+               IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
        fi
-       echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
-       exit ;;
+       GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+       ;;
     *:AIX:*:*)
-       echo rs6000-ibm-aix
-       exit ;;
+       GUESS=rs6000-ibm-aix
+       ;;
     ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
-       echo romp-ibm-bsd4.4
-       exit ;;
+       GUESS=romp-ibm-bsd4.4
+       ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
-       exit ;;                             # report: romp-ibm BSD 4.3
+       GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+       ;;                                  # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
-       echo rs6000-bull-bosx
-       exit ;;
+       GUESS=rs6000-bull-bosx
+       ;;
     DPX/2?00:B.O.S.:*:*)
-       echo m68k-bull-sysv3
-       exit ;;
+       GUESS=m68k-bull-sysv3
+       ;;
     9000/[34]??:4.3bsd:1.*:*)
-       echo m68k-hp-bsd
-       exit ;;
+       GUESS=m68k-hp-bsd
+       ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-       echo m68k-hp-bsd4.4
-       exit ;;
+       GUESS=m68k-hp-bsd4.4
+       ;;
     9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-       case "$UNAME_MACHINE" in
+       HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+       case $UNAME_MACHINE in
            9000/31?)            HP_ARCH=m68000 ;;
            9000/[34]??)         HP_ARCH=m68k ;;
            9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
+               if test -x /usr/bin/getconf; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                   case "$sc_cpu_version" in
+                   case $sc_cpu_version in
                      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
                      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
-                       case "$sc_kernel_bits" in
+                       case $sc_kernel_bits in
                          32) HP_ARCH=hppa2.0n ;;
                          64) HP_ARCH=hppa2.0w ;;
                          '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
-               if [ "$HP_ARCH" = "" ]; then
+               if test "$HP_ARCH" = ""; then
                    set_cc_for_build
                    sed 's/^            //' << EOF > "$dummy.c"
 
@@ -700,7 +743,7 @@ EOF
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ "$HP_ARCH" = hppa2.0w ]
+       if test "$HP_ARCH" = hppa2.0w
        then
            set_cc_for_build
 
@@ -721,12 +764,12 @@ EOF
                HP_ARCH=hppa64
            fi
        fi
-       echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
-       exit ;;
+       GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+       ;;
     ia64:HP-UX:*:*)
-       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux"$HPUX_REV"
-       exit ;;
+       HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+       GUESS=ia64-hp-hpux$HPUX_REV
+       ;;
     3050*:HI-UX:*:*)
        set_cc_for_build
        sed 's/^        //' << EOF > "$dummy.c"
@@ -756,36 +799,36 @@ EOF
 EOF
        $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
                { echo "$SYSTEM_NAME"; exit; }
-       echo unknown-hitachi-hiuxwe2
-       exit ;;
+       GUESS=unknown-hitachi-hiuxwe2
+       ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
-       echo hppa1.1-hp-bsd
-       exit ;;
+       GUESS=hppa1.1-hp-bsd
+       ;;
     9000/8??:4.3bsd:*:*)
-       echo hppa1.0-hp-bsd
-       exit ;;
+       GUESS=hppa1.0-hp-bsd
+       ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-       echo hppa1.0-hp-mpeix
-       exit ;;
+       GUESS=hppa1.0-hp-mpeix
+       ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
-       echo hppa1.1-hp-osf
-       exit ;;
+       GUESS=hppa1.1-hp-osf
+       ;;
     hp8??:OSF1:*:*)
-       echo hppa1.0-hp-osf
-       exit ;;
+       GUESS=hppa1.0-hp-osf
+       ;;
     i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
-           echo "$UNAME_MACHINE"-unknown-osf1mk
+       if test -x /usr/sbin/sysversion ; then
+           GUESS=$UNAME_MACHINE-unknown-osf1mk
        else
-           echo "$UNAME_MACHINE"-unknown-osf1
+           GUESS=$UNAME_MACHINE-unknown-osf1
        fi
-       exit ;;
+       ;;
     parisc*:Lites*:*:*)
-       echo hppa1.1-hp-lites
-       exit ;;
+       GUESS=hppa1.1-hp-lites
+       ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-       echo c1-convex-bsd
-       exit ;;
+       GUESS=c1-convex-bsd
+       ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
@@ -793,17 +836,18 @@ EOF
        fi
        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-       echo c34-convex-bsd
-       exit ;;
+       GUESS=c34-convex-bsd
+       ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-       echo c38-convex-bsd
-       exit ;;
+       GUESS=c38-convex-bsd
+       ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-       echo c4-convex-bsd
-       exit ;;
+       GUESS=c4-convex-bsd
+       ;;
     CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+       GUESS=ymp-cray-unicos$CRAY_REL
+       ;;
     CRAY*[A-Z]90:*:*:*)
        echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
@@ -811,114 +855,126 @@ EOF
              -e 's/\.[^.]*$/.X/'
        exit ;;
     CRAY*TS:*:*:*)
-       echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+       GUESS=t90-cray-unicos$CRAY_REL
+       ;;
     CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+       GUESS=alphaev5-cray-unicosmk$CRAY_REL
+       ;;
     CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+       GUESS=sv1-cray-unicos$CRAY_REL
+       ;;
     *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+       GUESS=craynv-cray-unicosmp$CRAY_REL
+       ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
        FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
-       echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
+       GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+       ;;
     5000:UNIX_System_V:4.*:*)
        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
        FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
-       echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-       exit ;;
+       GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+       ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+       ;;
     sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+       ;;
     *:BSD/OS:*:*)
-       echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+       ;;
     arm:FreeBSD:*:*)
        UNAME_PROCESSOR=`uname -p`
        set_cc_for_build
        if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_PCS_VFP
        then
-           echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi
+           FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+           GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
        else
-           echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf
+           FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+           GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
        fi
-       exit ;;
+       ;;
     *:FreeBSD:*:*)
        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       case "$UNAME_PROCESSOR" in
+       case $UNAME_PROCESSOR in
            amd64)
                UNAME_PROCESSOR=x86_64 ;;
            i386)
                UNAME_PROCESSOR=i586 ;;
        esac
-       echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-       exit ;;
+       FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+       GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+       ;;
     i*:CYGWIN*:*)
-       echo "$UNAME_MACHINE"-pc-cygwin
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-cygwin
+       ;;
     *:MINGW64*:*)
-       echo "$UNAME_MACHINE"-pc-mingw64
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-mingw64
+       ;;
     *:MINGW*:*)
-       echo "$UNAME_MACHINE"-pc-mingw32
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-mingw32
+       ;;
     *:MSYS*:*)
-       echo "$UNAME_MACHINE"-pc-msys
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-msys
+       ;;
     i*:PW*:*)
-       echo "$UNAME_MACHINE"-pc-pw32
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-pw32
+       ;;
     *:Interix*:*)
-       case "$UNAME_MACHINE" in
+       case $UNAME_MACHINE in
            x86)
-               echo i586-pc-interix"$UNAME_RELEASE"
-               exit ;;
+               GUESS=i586-pc-interix$UNAME_RELEASE
+               ;;
            authenticamd | genuineintel | EM64T)
-               echo x86_64-unknown-interix"$UNAME_RELEASE"
-               exit ;;
+               GUESS=x86_64-unknown-interix$UNAME_RELEASE
+               ;;
            IA64)
-               echo ia64-unknown-interix"$UNAME_RELEASE"
-               exit ;;
+               GUESS=ia64-unknown-interix$UNAME_RELEASE
+               ;;
        esac ;;
     i*:UWIN*:*)
-       echo "$UNAME_MACHINE"-pc-uwin
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-uwin
+       ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-       echo x86_64-pc-cygwin
-       exit ;;
+       GUESS=x86_64-pc-cygwin
+       ;;
     prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
-       exit ;;
+       SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+       GUESS=powerpcle-unknown-solaris2$SUN_REL
+       ;;
     *:GNU:*:*)
        # the GNU system
-       echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
-       exit ;;
+       GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+       GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+       GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+       ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
-       exit ;;
+       GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+       GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+       GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+       ;;
     *:Minix:*:*)
-       echo "$UNAME_MACHINE"-unknown-minix
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-minix
+       ;;
     aarch64:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
          EV56)  UNAME_MACHINE=alphaev56 ;;
          PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -929,183 +985,225 @@ EOF
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
        if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     arm*:Linux:*:*)
        set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+           GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
+               GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
            else
-               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
+               GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
            fi
        fi
-       exit ;;
+       ;;
     avr32*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     cris:Linux:*:*)
-       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+       ;;
     crisv32:Linux:*:*)
-       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+       ;;
     e2k:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     frv:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     hexagon:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     i*86:Linux:*:*)
-       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+       ;;
     ia64:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     k1om:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     m32r*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     m68*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     mips:Linux:*:* | mips64:Linux:*:*)
        set_cc_for_build
+       IS_GLIBC=0
+       test x"${LIBC}" = xgnu && IS_GLIBC=1
        sed 's/^        //' << EOF > "$dummy.c"
        #undef CPU
-       #undef ${UNAME_MACHINE}
-       #undef ${UNAME_MACHINE}el
+       #undef mips
+       #undef mipsel
+       #undef mips64
+       #undef mips64el
+       #if ${IS_GLIBC} && defined(_ABI64)
+       LIBCABI=gnuabi64
+       #else
+       #if ${IS_GLIBC} && defined(_ABIN32)
+       LIBCABI=gnuabin32
+       #else
+       LIBCABI=${LIBC}
+       #endif
+       #endif
+
+       #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+       CPU=mipsisa64r6
+       #else
+       #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+       CPU=mipsisa32r6
+       #else
+       #if defined(__mips64)
+       CPU=mips64
+       #else
+       CPU=mips
+       #endif
+       #endif
+       #endif
+
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=${UNAME_MACHINE}el
+       MIPS_ENDIAN=el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=${UNAME_MACHINE}
+       MIPS_ENDIAN=
        #else
-       CPU=
+       MIPS_ENDIAN=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
-       test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
+       cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+       eval "$cc_set_vars"
+       test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
        ;;
     mips64el:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     openrisc*:Linux:*:*)
-       echo or1k-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=or1k-unknown-linux-$LIBC
+       ;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=sparc-unknown-linux-$LIBC
+       ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=hppa64-unknown-linux-$LIBC
+       ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
-         PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
-         *)    echo hppa-unknown-linux-"$LIBC" ;;
+         PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+         PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+         *)    GUESS=hppa-unknown-linux-$LIBC ;;
        esac
-       exit ;;
+       ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=powerpc64-unknown-linux-$LIBC
+       ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=powerpc-unknown-linux-$LIBC
+       ;;
     ppc64le:Linux:*:*)
-       echo powerpc64le-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=powerpc64le-unknown-linux-$LIBC
+       ;;
     ppcle:Linux:*:*)
-       echo powerpcle-unknown-linux-"$LIBC"
-       exit ;;
-    riscv32:Linux:*:* | riscv64:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=powerpcle-unknown-linux-$LIBC
+       ;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+       ;;
     sh64*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     sh*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     tile*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     vax:Linux:*:*)
-       echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+       ;;
     x86_64:Linux:*:*)
-       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
-       exit ;;
+       set_cc_for_build
+       LIBCABI=$LIBC
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
+           if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_X32 >/dev/null
+           then
+               LIBCABI=${LIBC}x32
+           fi
+       fi
+       GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+       ;;
     xtensa*:Linux:*:*)
-       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+       ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
        # sysname and nodename.
-       echo i386-sequent-sysv4
-       exit ;;
+       GUESS=i386-sequent-sysv4
+       ;;
     i*86:UNIX_SV:4.2MP:2.*)
        # Unixware is an offshoot of SVR4, but it has its own version
        # number series starting with 2...
        # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
        # Use sysv4.2uw... so that sysv4* matches it.
-       echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+       ;;
     i*86:OS/2:*:*)
        # If we were able to find `uname', then EMX Unix compatibility
        # is probably installed.
-       echo "$UNAME_MACHINE"-pc-os2-emx
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-os2-emx
+       ;;
     i*86:XTS-300:*:STOP)
-       echo "$UNAME_MACHINE"-unknown-stop
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-stop
+       ;;
     i*86:atheos:*:*)
-       echo "$UNAME_MACHINE"-unknown-atheos
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-atheos
+       ;;
     i*86:syllable:*:*)
-       echo "$UNAME_MACHINE"-pc-syllable
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-syllable
+       ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-       echo i386-unknown-lynxos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=i386-unknown-lynxos$UNAME_RELEASE
+       ;;
     i*86:*DOS:*:*)
-       echo "$UNAME_MACHINE"-pc-msdosdjgpp
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+       ;;
     i*86:*:4.*:*)
        UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
+               GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
        else
-               echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
+               GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
        fi
-       exit ;;
+       ;;
     i*86:*:5:[678]*)
        # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
@@ -1113,12 +1211,12 @@ EOF
            *Pentium)        UNAME_MACHINE=i586 ;;
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
        esac
-       echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       ;;
     i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
+               GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1128,11 +1226,11 @@ EOF
                        && UNAME_MACHINE=i686
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
                        && UNAME_MACHINE=i686
-               echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
+               GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
        else
-               echo "$UNAME_MACHINE"-pc-sysv32
+               GUESS=$UNAME_MACHINE-pc-sysv32
        fi
-       exit ;;
+       ;;
     pc:*:*:*)
        # Left here for compatibility:
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
@@ -1140,31 +1238,31 @@ EOF
        # Note: whatever this is, it MUST be the same as what config.sub
        # prints for the "djgpp" host, or else GDB configure will decide that
        # this is a cross-build.
-       echo i586-pc-msdosdjgpp
-       exit ;;
+       GUESS=i586-pc-msdosdjgpp
+       ;;
     Intel:Mach:3*:*)
-       echo i386-pc-mach3
-       exit ;;
+       GUESS=i386-pc-mach3
+       ;;
     paragon:*:*:*)
-       echo i860-intel-osf1
-       exit ;;
+       GUESS=i860-intel-osf1
+       ;;
     i860:*:4.*:*) # i860-SVR4
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
+         GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
        else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
+         GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
        fi
-       exit ;;
+       ;;
     mini*:CTIX:SYS*5:*)
        # "miniframe"
-       echo m68010-convergent-sysv
-       exit ;;
+       GUESS=m68010-convergent-sysv
+       ;;
     mc68k:UNIX:SYSTEM5:3.51m)
-       echo m68k-convergent-sysv
-       exit ;;
+       GUESS=m68k-convergent-sysv
+       ;;
     M680?0:D-NIX:5.3:*)
-       echo m68k-diab-dnix
-       exit ;;
+       GUESS=m68k-diab-dnix
+       ;;
     M68*:*:R3V[5678]*:*)
        test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
@@ -1189,253 +1287,401 @@ EOF
        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
            && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+       ;;
     mc68030:UNIX_System_V:4.*:*)
-       echo m68k-atari-sysv4
-       exit ;;
+       GUESS=m68k-atari-sysv4
+       ;;
     TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+       ;;
     rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+       ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-       echo powerpc-unknown-lynxos"$UNAME_RELEASE"
-       exit ;;
+       GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+       ;;
     SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv"$UNAME_RELEASE"
-       exit ;;
+       GUESS=mips-dde-sysv$UNAME_RELEASE
+       ;;
     RM*:ReliantUNIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
+       GUESS=mips-sni-sysv4
+       ;;
     RM*:SINIX-*:*:*)
-       echo mips-sni-sysv4
-       exit ;;
+       GUESS=mips-sni-sysv4
+       ;;
     *:SINIX-*:*:*)
        if uname -p 2>/dev/null >/dev/null ; then
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo "$UNAME_MACHINE"-sni-sysv4
+               GUESS=$UNAME_MACHINE-sni-sysv4
        else
-               echo ns32k-sni-sysv
+               GUESS=ns32k-sni-sysv
        fi
-       exit ;;
+       ;;
     PENTIUM:*:4.0*:*)  # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                        # says <Richard.M.Bartel@ccMail.Census.GOV>
-       echo i586-unisys-sysv4
-       exit ;;
+       GUESS=i586-unisys-sysv4
+       ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
-       echo hppa1.1-stratus-sysv4
-       exit ;;
+       GUESS=hppa1.1-stratus-sysv4
+       ;;
     *:*:*:FTX*)
        # From seanf@swdc.stratus.com.
-       echo i860-stratus-sysv4
-       exit ;;
+       GUESS=i860-stratus-sysv4
+       ;;
     i*86:VOS:*:*)
        # From Paul.Green@stratus.com.
-       echo "$UNAME_MACHINE"-stratus-vos
-       exit ;;
+       GUESS=$UNAME_MACHINE-stratus-vos
+       ;;
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
-       echo hppa1.1-stratus-vos
-       exit ;;
+       GUESS=hppa1.1-stratus-vos
+       ;;
     mc68*:A/UX:*:*)
-       echo m68k-apple-aux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=m68k-apple-aux$UNAME_RELEASE
+       ;;
     news*:NEWS-OS:6*:*)
-       echo mips-sony-newsos6
-       exit ;;
+       GUESS=mips-sony-newsos6
+       ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
-               echo mips-nec-sysv"$UNAME_RELEASE"
+       if test -d /usr/nec; then
+               GUESS=mips-nec-sysv$UNAME_RELEASE
        else
-               echo mips-unknown-sysv"$UNAME_RELEASE"
+               GUESS=mips-unknown-sysv$UNAME_RELEASE
        fi
-       exit ;;
+       ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
-       echo powerpc-be-beos
-       exit ;;
+       GUESS=powerpc-be-beos
+       ;;
     BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
-       echo powerpc-apple-beos
-       exit ;;
+       GUESS=powerpc-apple-beos
+       ;;
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
-       echo i586-pc-beos
-       exit ;;
+       GUESS=i586-pc-beos
+       ;;
     BePC:Haiku:*:*)    # Haiku running on Intel PC compatible.
-       echo i586-pc-haiku
-       exit ;;
+       GUESS=i586-pc-haiku
+       ;;
     x86_64:Haiku:*:*)
-       echo x86_64-unknown-haiku
-       exit ;;
+       GUESS=x86_64-unknown-haiku
+       ;;
     SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx4-nec-superux$UNAME_RELEASE
+       ;;
     SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx5-nec-superux$UNAME_RELEASE
+       ;;
     SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx6-nec-superux$UNAME_RELEASE
+       ;;
     SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx7-nec-superux$UNAME_RELEASE
+       ;;
     SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx8-nec-superux$UNAME_RELEASE
+       ;;
     SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sx8r-nec-superux$UNAME_RELEASE
+       ;;
     SX-ACE:SUPER-UX:*:*)
-       echo sxace-nec-superux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=sxace-nec-superux$UNAME_RELEASE
+       ;;
     Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody"$UNAME_RELEASE"
-       exit ;;
+       GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+       ;;
     *:Rhapsody:*:*)
-       echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+       ;;
+    arm64:Darwin:*:*)
+       GUESS=aarch64-apple-darwin$UNAME_RELEASE
+       ;;
     *:Darwin:*:*)
-       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       set_cc_for_build
-       if test "$UNAME_PROCESSOR" = unknown ; then
-           UNAME_PROCESSOR=powerpc
+       UNAME_PROCESSOR=`uname -p`
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       if command -v xcode-select > /dev/null 2> /dev/null && \
+               ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+           # Avoid executing cc if there is no toolchain installed as
+           # cc will be a stub that puts up a graphical alert
+           # prompting the user to install developer tools.
+           CC_FOR_BUILD=no_compiler_found
+       else
+           set_cc_for_build
        fi
-       if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
-           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-                      grep IS_64BIT_ARCH >/dev/null
-               then
-                   case $UNAME_PROCESSOR in
-                       i386) UNAME_PROCESSOR=x86_64 ;;
-                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
-                   esac
-               fi
-               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
-               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
-                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-                      grep IS_PPC >/dev/null
-               then
-                   UNAME_PROCESSOR=powerpc
-               fi
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
+           if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                  (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                  grep IS_64BIT_ARCH >/dev/null
+           then
+               case $UNAME_PROCESSOR in
+                   i386) UNAME_PROCESSOR=x86_64 ;;
+                   powerpc) UNAME_PROCESSOR=powerpc64 ;;
+               esac
+           fi
+           # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+           if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                  (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                  grep IS_PPC >/dev/null
+           then
+               UNAME_PROCESSOR=powerpc
            fi
        elif test "$UNAME_PROCESSOR" = i386 ; then
-           # Avoid executing cc on OS X 10.9, as it ships with a stub
-           # that puts up a graphical alert prompting to install
-           # developer tools.  Any system running Mac OS X 10.7 or
-           # later (Darwin 11 and later) is required to have a 64-bit
-           # processor. This is not true of the ARM version of Darwin
-           # that Apple uses in portable devices.
-           UNAME_PROCESSOR=x86_64
+           # uname -m returns i386 or x86_64
+           UNAME_PROCESSOR=$UNAME_MACHINE
        fi
-       echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+       ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
        if test "$UNAME_PROCESSOR" = x86; then
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
-       echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+       ;;
     *:QNX:*:4*)
-       echo i386-pc-qnx
-       exit ;;
+       GUESS=i386-pc-qnx
+       ;;
     NEO-*:NONSTOP_KERNEL:*:*)
-       echo neo-tandem-nsk"$UNAME_RELEASE"
-       exit ;;
+       GUESS=neo-tandem-nsk$UNAME_RELEASE
+       ;;
     NSE-*:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk"$UNAME_RELEASE"
-       exit ;;
+       GUESS=nse-tandem-nsk$UNAME_RELEASE
+       ;;
     NSR-*:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk"$UNAME_RELEASE"
-       exit ;;
+       GUESS=nsr-tandem-nsk$UNAME_RELEASE
+       ;;
     NSV-*:NONSTOP_KERNEL:*:*)
-       echo nsv-tandem-nsk"$UNAME_RELEASE"
-       exit ;;
+       GUESS=nsv-tandem-nsk$UNAME_RELEASE
+       ;;
     NSX-*:NONSTOP_KERNEL:*:*)
-       echo nsx-tandem-nsk"$UNAME_RELEASE"
-       exit ;;
+       GUESS=nsx-tandem-nsk$UNAME_RELEASE
+       ;;
     *:NonStop-UX:*:*)
-       echo mips-compaq-nonstopux
-       exit ;;
+       GUESS=mips-compaq-nonstopux
+       ;;
     BS2000:POSIX*:*:*)
-       echo bs2000-siemens-sysv
-       exit ;;
+       GUESS=bs2000-siemens-sysv
+       ;;
     DS/*:UNIX_System_V:*:*)
-       echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+       ;;
     *:Plan9:*:*)
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
        # operating systems.
-       # shellcheck disable=SC2154
-       if test "$cputype" = 386; then
+       if test "${cputype-}" = 386; then
            UNAME_MACHINE=i386
-       else
-           UNAME_MACHINE="$cputype"
+       elif test "x${cputype-}" != x; then
+           UNAME_MACHINE=$cputype
        fi
-       echo "$UNAME_MACHINE"-unknown-plan9
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-plan9
+       ;;
     *:TOPS-10:*:*)
-       echo pdp10-unknown-tops10
-       exit ;;
+       GUESS=pdp10-unknown-tops10
+       ;;
     *:TENEX:*:*)
-       echo pdp10-unknown-tenex
-       exit ;;
+       GUESS=pdp10-unknown-tenex
+       ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-       echo pdp10-dec-tops20
-       exit ;;
+       GUESS=pdp10-dec-tops20
+       ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-       echo pdp10-xkl-tops20
-       exit ;;
+       GUESS=pdp10-xkl-tops20
+       ;;
     *:TOPS-20:*:*)
-       echo pdp10-unknown-tops20
-       exit ;;
+       GUESS=pdp10-unknown-tops20
+       ;;
     *:ITS:*:*)
-       echo pdp10-unknown-its
-       exit ;;
+       GUESS=pdp10-unknown-its
+       ;;
     SEI:*:*:SEIUX)
-       echo mips-sei-seiux"$UNAME_RELEASE"
-       exit ;;
+       GUESS=mips-sei-seiux$UNAME_RELEASE
+       ;;
     *:DragonFly:*:*)
-       echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
-       exit ;;
+       DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+       GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+       ;;
     *:*VMS:*:*)
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "$UNAME_MACHINE" in
-           A*) echo alpha-dec-vms ; exit ;;
-           I*) echo ia64-dec-vms ; exit ;;
-           V*) echo vax-dec-vms ; exit ;;
+       case $UNAME_MACHINE in
+           A*) GUESS=alpha-dec-vms ;;
+           I*) GUESS=ia64-dec-vms ;;
+           V*) GUESS=vax-dec-vms ;;
        esac ;;
     *:XENIX:*:SysV)
-       echo i386-pc-xenix
-       exit ;;
+       GUESS=i386-pc-xenix
+       ;;
     i*86:skyos:*:*)
-       echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
-       exit ;;
+       SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+       GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+       ;;
     i*86:rdos:*:*)
-       echo "$UNAME_MACHINE"-pc-rdos
-       exit ;;
-    i*86:AROS:*:*)
-       echo "$UNAME_MACHINE"-pc-aros
-       exit ;;
+       GUESS=$UNAME_MACHINE-pc-rdos
+       ;;
+    *:AROS:*:*)
+       GUESS=$UNAME_MACHINE-unknown-aros
+       ;;
     x86_64:VMkernel:*:*)
-       echo "$UNAME_MACHINE"-unknown-esx
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-esx
+       ;;
     amd64:Isilon\ OneFS:*:*)
-       echo x86_64-unknown-onefs
-       exit ;;
+       GUESS=x86_64-unknown-onefs
+       ;;
     *:Unleashed:*:*)
-       echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
-       exit ;;
+       GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+       ;;
 esac
 
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
 echo "$0: unable to guess system type" >&2
 
-case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+case $UNAME_MACHINE:$UNAME_SYSTEM in
     mips:Linux | mips64:Linux)
        # If we got here on MIPS GNU/Linux, output extra information.
        cat >&2 <<EOF
@@ -1452,9 +1698,17 @@ This script (version $timestamp), has failed to recognize the
 operating system you are using. If your script is old, overwrite *all*
 copies of config.guess and config.sub with the latest versions from:
 
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
 and
-  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
 
 If $0 has already been updated, send the following data and any
 information you think might be pertinent to config-patches@gnu.org to
@@ -1482,6 +1736,7 @@ UNAME_RELEASE = "$UNAME_RELEASE"
 UNAME_SYSTEM  = "$UNAME_SYSTEM"
 UNAME_VERSION = "$UNAME_VERSION"
 EOF
+fi
 
 exit 1
 
index fc5913d..4b7dc49 100755 (executable)
@@ -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-2018 Free Software Foundation, Inc.
+#   Copyright 1996-2021 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
@@ -371,7 +371,7 @@ else
       hardcode_direct=yes
       hardcode_minus_L=yes
       ;;
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       ;;
@@ -547,7 +547,7 @@ case "$host_os" in
   freebsd[23].*)
     library_names_spec='$libname$shrext$versuffix'
     ;;
-  freebsd* | dragonfly*)
+  freebsd* | dragonfly* | midnightbsd*)
     library_names_spec='$libname$shrext'
     ;;
   gnu*)
index a5081b8..d80c5d7 100755 (executable)
@@ -1,8 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2018 Free Software Foundation, Inc.
+#   Copyright 1992-2021 Free Software Foundation, Inc.
 
-timestamp='2018-12-16'
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-07-03'
 
 # 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
@@ -33,7 +35,7 @@ timestamp='2018-12-16'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -50,6 +52,13 @@ timestamp='2018-12-16'
 #      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
@@ -67,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2018 Free Software Foundation, Inc.
+Copyright 1992-2021 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."
@@ -111,6 +120,7 @@ case $# in
 esac
 
 # Split fields of configuration type
+# shellcheck disable=SC2162
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
@@ -123,28 +133,27 @@ case $1 in
                ;;
        *-*-*-*)
                basic_machine=$field1-$field2
-               os=$field3-$field4
+               basic_os=$field3-$field4
                ;;
        *-*-*)
                # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
                # parts
                maybe_os=$field2-$field3
                case $maybe_os in
-                       nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
-                       | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+                       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*)
                                basic_machine=$field1
-                               os=$maybe_os
+                               basic_os=$maybe_os
                                ;;
                        android-linux)
                                basic_machine=$field1-unknown
-                               os=linux-android
+                               basic_os=linux-android
                                ;;
                        *)
                                basic_machine=$field1-$field2
-                               os=$field3
+                               basic_os=$field3
                                ;;
                esac
                ;;
@@ -153,7 +162,7 @@ case $1 in
                case $field1-$field2 in
                        decstation-3100)
                                basic_machine=mips-dec
-                               os=
+                               basic_os=
                                ;;
                        *-*)
                                # Second component is usually, but not always the OS
@@ -161,7 +170,7 @@ case $1 in
                                        # Prevent following clause from handling this valid os
                                        sun*os*)
                                                basic_machine=$field1
-                                               os=$field2
+                                               basic_os=$field2
                                                ;;
                                        # Manufacturers
                                        dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
@@ -174,11 +183,11 @@ case $1 in
                                        | microblaze* | sim | cisco \
                                        | oki | wec | wrs | winbond)
                                                basic_machine=$field1-$field2
-                                               os=
+                                               basic_os=
                                                ;;
                                        *)
                                                basic_machine=$field1
-                                               os=$field2
+                                               basic_os=$field2
                                                ;;
                                esac
                        ;;
@@ -190,450 +199,451 @@ case $1 in
                case $field1 in
                        386bsd)
                                basic_machine=i386-pc
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        a29khif)
                                basic_machine=a29k-amd
-                               os=udi
+                               basic_os=udi
                                ;;
                        adobe68k)
                                basic_machine=m68010-adobe
-                               os=scout
+                               basic_os=scout
                                ;;
                        alliant)
                                basic_machine=fx80-alliant
-                               os=
+                               basic_os=
                                ;;
                        altos | altos3068)
                                basic_machine=m68k-altos
-                               os=
+                               basic_os=
                                ;;
                        am29k)
                                basic_machine=a29k-none
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        amdahl)
                                basic_machine=580-amdahl
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        amiga)
                                basic_machine=m68k-unknown
-                               os=
+                               basic_os=
                                ;;
                        amigaos | amigados)
                                basic_machine=m68k-unknown
-                               os=amigaos
+                               basic_os=amigaos
                                ;;
                        amigaunix | amix)
                                basic_machine=m68k-unknown
-                               os=sysv4
+                               basic_os=sysv4
                                ;;
                        apollo68)
                                basic_machine=m68k-apollo
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        apollo68bsd)
                                basic_machine=m68k-apollo
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        aros)
                                basic_machine=i386-pc
-                               os=aros
+                               basic_os=aros
                                ;;
                        aux)
                                basic_machine=m68k-apple
-                               os=aux
+                               basic_os=aux
                                ;;
                        balance)
                                basic_machine=ns32k-sequent
-                               os=dynix
+                               basic_os=dynix
                                ;;
                        blackfin)
                                basic_machine=bfin-unknown
-                               os=linux
+                               basic_os=linux
                                ;;
                        cegcc)
                                basic_machine=arm-unknown
-                               os=cegcc
+                               basic_os=cegcc
                                ;;
                        convex-c1)
                                basic_machine=c1-convex
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        convex-c2)
                                basic_machine=c2-convex
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        convex-c32)
                                basic_machine=c32-convex
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        convex-c34)
                                basic_machine=c34-convex
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        convex-c38)
                                basic_machine=c38-convex
-                               os=bsd
+                               basic_os=bsd
                                ;;
                        cray)
                                basic_machine=j90-cray
-                               os=unicos
+                               basic_os=unicos
                                ;;
                        crds | unos)
                                basic_machine=m68k-crds
-                               os=
+                               basic_os=
                                ;;
                        da30)
                                basic_machine=m68k-da30
-                               os=
+                               basic_os=
                                ;;
                        decstation | pmax | pmin | dec3100 | decstatn)
                                basic_machine=mips-dec
-                               os=
+                               basic_os=
                                ;;
                        delta88)
                                basic_machine=m88k-motorola
-                               os=sysv3
+                               basic_os=sysv3
                                ;;
                        dicos)
                                basic_machine=i686-pc
-                               os=dicos
+                               basic_os=dicos
                                ;;
                        djgpp)
                                basic_machine=i586-pc
-                               os=msdosdjgpp
+                               basic_os=msdosdjgpp
                                ;;
                        ebmon29k)
                                basic_machine=a29k-amd
-                               os=ebmon
+                               basic_os=ebmon
                                ;;
                        es1800 | OSE68k | ose68k | ose | OSE)
                                basic_machine=m68k-ericsson
-                               os=ose
+                               basic_os=ose
                                ;;
                        gmicro)
                                basic_machine=tron-gmicro
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        go32)
                                basic_machine=i386-pc
-                               os=go32
+                               basic_os=go32
                                ;;
                        h8300hms)
                                basic_machine=h8300-hitachi
-                               os=hms
+                               basic_os=hms
                                ;;
                        h8300xray)
                                basic_machine=h8300-hitachi
-                               os=xray
+                               basic_os=xray
                                ;;
                        h8500hms)
                                basic_machine=h8500-hitachi
-                               os=hms
+                               basic_os=hms
                                ;;
                        harris)
                                basic_machine=m88k-harris
-                               os=sysv3
+                               basic_os=sysv3
                                ;;
-                       hp300)
+                       hp300 | hp300hpux)
                                basic_machine=m68k-hp
+                               basic_os=hpux
                                ;;
                        hp300bsd)
                                basic_machine=m68k-hp
-                               os=bsd
-                               ;;
-                       hp300hpux)
-                               basic_machine=m68k-hp
-                               os=hpux
+                               basic_os=bsd
                                ;;
                        hppaosf)
                                basic_machine=hppa1.1-hp
-                               os=osf
+                               basic_os=osf
                                ;;
                        hppro)
                                basic_machine=hppa1.1-hp
-                               os=proelf
+                               basic_os=proelf
                                ;;
                        i386mach)
                                basic_machine=i386-mach
-                               os=mach
-                               ;;
-                       vsta)
-                               basic_machine=i386-pc
-                               os=vsta
+                               basic_os=mach
                                ;;
                        isi68 | isi)
                                basic_machine=m68k-isi
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        m68knommu)
                                basic_machine=m68k-unknown
-                               os=linux
+                               basic_os=linux
                                ;;
                        magnum | m3230)
                                basic_machine=mips-mips
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        merlin)
                                basic_machine=ns32k-utek
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        mingw64)
                                basic_machine=x86_64-pc
-                               os=mingw64
+                               basic_os=mingw64
                                ;;
                        mingw32)
                                basic_machine=i686-pc
-                               os=mingw32
+                               basic_os=mingw32
                                ;;
                        mingw32ce)
                                basic_machine=arm-unknown
-                               os=mingw32ce
+                               basic_os=mingw32ce
                                ;;
                        monitor)
                                basic_machine=m68k-rom68k
-                               os=coff
+                               basic_os=coff
                                ;;
                        morphos)
                                basic_machine=powerpc-unknown
-                               os=morphos
+                               basic_os=morphos
                                ;;
                        moxiebox)
                                basic_machine=moxie-unknown
-                               os=moxiebox
+                               basic_os=moxiebox
                                ;;
                        msdos)
                                basic_machine=i386-pc
-                               os=msdos
+                               basic_os=msdos
                                ;;
                        msys)
                                basic_machine=i686-pc
-                               os=msys
+                               basic_os=msys
                                ;;
                        mvs)
                                basic_machine=i370-ibm
-                               os=mvs
+                               basic_os=mvs
                                ;;
                        nacl)
                                basic_machine=le32-unknown
-                               os=nacl
+                               basic_os=nacl
                                ;;
                        ncr3000)
                                basic_machine=i486-ncr
-                               os=sysv4
+                               basic_os=sysv4
                                ;;
                        netbsd386)
                                basic_machine=i386-pc
-                               os=netbsd
+                               basic_os=netbsd
                                ;;
                        netwinder)
                                basic_machine=armv4l-rebel
-                               os=linux
+                               basic_os=linux
                                ;;
                        news | news700 | news800 | news900)
                                basic_machine=m68k-sony
-                               os=newsos
+                               basic_os=newsos
                                ;;
                        news1000)
                                basic_machine=m68030-sony
-                               os=newsos
+                               basic_os=newsos
                                ;;
                        necv70)
                                basic_machine=v70-nec
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        nh3000)
                                basic_machine=m68k-harris
-                               os=cxux
+                               basic_os=cxux
                                ;;
                        nh[45]000)
                                basic_machine=m88k-harris
-                               os=cxux
+                               basic_os=cxux
                                ;;
                        nindy960)
                                basic_machine=i960-intel
-                               os=nindy
+                               basic_os=nindy
                                ;;
                        mon960)
                                basic_machine=i960-intel
-                               os=mon960
+                               basic_os=mon960
                                ;;
                        nonstopux)
                                basic_machine=mips-compaq
-                               os=nonstopux
+                               basic_os=nonstopux
                                ;;
                        os400)
                                basic_machine=powerpc-ibm
-                               os=os400
+                               basic_os=os400
                                ;;
                        OSE68000 | ose68000)
                                basic_machine=m68000-ericsson
-                               os=ose
+                               basic_os=ose
                                ;;
                        os68k)
                                basic_machine=m68k-none
-                               os=os68k
+                               basic_os=os68k
                                ;;
                        paragon)
                                basic_machine=i860-intel
-                               os=osf
+                               basic_os=osf
                                ;;
                        parisc)
                                basic_machine=hppa-unknown
-                               os=linux
+                               basic_os=linux
+                               ;;
+                       psp)
+                               basic_machine=mipsallegrexel-sony
+                               basic_os=psp
                                ;;
                        pw32)
                                basic_machine=i586-unknown
-                               os=pw32
+                               basic_os=pw32
                                ;;
                        rdos | rdos64)
                                basic_machine=x86_64-pc
-                               os=rdos
+                               basic_os=rdos
                                ;;
                        rdos32)
                                basic_machine=i386-pc
-                               os=rdos
+                               basic_os=rdos
                                ;;
                        rom68k)
                                basic_machine=m68k-rom68k
-                               os=coff
+                               basic_os=coff
                                ;;
                        sa29200)
                                basic_machine=a29k-amd
-                               os=udi
+                               basic_os=udi
                                ;;
                        sei)
                                basic_machine=mips-sei
-                               os=seiux
+                               basic_os=seiux
                                ;;
                        sequent)
                                basic_machine=i386-sequent
-                               os=
+                               basic_os=
                                ;;
                        sps7)
                                basic_machine=m68k-bull
-                               os=sysv2
+                               basic_os=sysv2
                                ;;
                        st2000)
                                basic_machine=m68k-tandem
-                               os=
+                               basic_os=
                                ;;
                        stratus)
                                basic_machine=i860-stratus
-                               os=sysv4
+                               basic_os=sysv4
                                ;;
                        sun2)
                                basic_machine=m68000-sun
-                               os=
+                               basic_os=
                                ;;
                        sun2os3)
                                basic_machine=m68000-sun
-                               os=sunos3
+                               basic_os=sunos3
                                ;;
                        sun2os4)
                                basic_machine=m68000-sun
-                               os=sunos4
+                               basic_os=sunos4
                                ;;
                        sun3)
                                basic_machine=m68k-sun
-                               os=
+                               basic_os=
                                ;;
                        sun3os3)
                                basic_machine=m68k-sun
-                               os=sunos3
+                               basic_os=sunos3
                                ;;
                        sun3os4)
                                basic_machine=m68k-sun
-                               os=sunos4
+                               basic_os=sunos4
                                ;;
                        sun4)
                                basic_machine=sparc-sun
-                               os=
+                               basic_os=
                                ;;
                        sun4os3)
                                basic_machine=sparc-sun
-                               os=sunos3
+                               basic_os=sunos3
                                ;;
                        sun4os4)
                                basic_machine=sparc-sun
-                               os=sunos4
+                               basic_os=sunos4
                                ;;
                        sun4sol2)
                                basic_machine=sparc-sun
-                               os=solaris2
+                               basic_os=solaris2
                                ;;
                        sun386 | sun386i | roadrunner)
                                basic_machine=i386-sun
-                               os=
+                               basic_os=
                                ;;
                        sv1)
                                basic_machine=sv1-cray
-                               os=unicos
+                               basic_os=unicos
                                ;;
                        symmetry)
                                basic_machine=i386-sequent
-                               os=dynix
+                               basic_os=dynix
                                ;;
                        t3e)
                                basic_machine=alphaev5-cray
-                               os=unicos
+                               basic_os=unicos
                                ;;
                        t90)
                                basic_machine=t90-cray
-                               os=unicos
+                               basic_os=unicos
                                ;;
                        toad1)
                                basic_machine=pdp10-xkl
-                               os=tops20
+                               basic_os=tops20
                                ;;
                        tpf)
                                basic_machine=s390x-ibm
-                               os=tpf
+                               basic_os=tpf
                                ;;
                        udi29k)
                                basic_machine=a29k-amd
-                               os=udi
+                               basic_os=udi
                                ;;
                        ultra3)
                                basic_machine=a29k-nyu
-                               os=sym1
+                               basic_os=sym1
                                ;;
                        v810 | necv810)
                                basic_machine=v810-nec
-                               os=none
+                               basic_os=none
                                ;;
                        vaxv)
                                basic_machine=vax-dec
-                               os=sysv
+                               basic_os=sysv
                                ;;
                        vms)
                                basic_machine=vax-dec
-                               os=vms
+                               basic_os=vms
+                               ;;
+                       vsta)
+                               basic_machine=i386-pc
+                               basic_os=vsta
                                ;;
                        vxworks960)
                                basic_machine=i960-wrs
-                               os=vxworks
+                               basic_os=vxworks
                                ;;
                        vxworks68)
                                basic_machine=m68k-wrs
-                               os=vxworks
+                               basic_os=vxworks
                                ;;
                        vxworks29k)
                                basic_machine=a29k-wrs
-                               os=vxworks
+                               basic_os=vxworks
                                ;;
                        xbox)
                                basic_machine=i686-pc
-                               os=mingw32
+                               basic_os=mingw32
                                ;;
                        ymp)
                                basic_machine=ymp-cray
-                               os=unicos
+                               basic_os=unicos
                                ;;
                        *)
                                basic_machine=$1
-                               os=
+                               basic_os=
                                ;;
                esac
                ;;
@@ -685,17 +695,17 @@ case $basic_machine in
        bluegene*)
                cpu=powerpc
                vendor=ibm
-               os=cnk
+               basic_os=cnk
                ;;
        decsystem10* | dec10*)
                cpu=pdp10
                vendor=dec
-               os=tops10
+               basic_os=tops10
                ;;
        decsystem20* | dec20*)
                cpu=pdp10
                vendor=dec
-               os=tops20
+               basic_os=tops20
                ;;
        delta | 3300 | motorola-3300 | motorola-delta \
              | 3300-motorola | delta-motorola)
@@ -705,7 +715,7 @@ case $basic_machine in
        dpx2*)
                cpu=m68k
                vendor=bull
-               os=sysv3
+               basic_os=sysv3
                ;;
        encore | umax | mmax)
                cpu=ns32k
@@ -714,7 +724,7 @@ case $basic_machine in
        elxsi)
                cpu=elxsi
                vendor=elxsi
-               os=${os:-bsd}
+               basic_os=${basic_os:-bsd}
                ;;
        fx2800)
                cpu=i860
@@ -727,7 +737,7 @@ case $basic_machine in
        h3050r* | hiux*)
                cpu=hppa1.1
                vendor=hitachi
-               os=hiuxwe2
+               basic_os=hiuxwe2
                ;;
        hp3k9[0-9][0-9] | hp9[0-9][0-9])
                cpu=hppa1.0
@@ -770,36 +780,36 @@ case $basic_machine in
        i*86v32)
                cpu=`echo "$1" | sed -e 's/86.*/86/'`
                vendor=pc
-               os=sysv32
+               basic_os=sysv32
                ;;
        i*86v4*)
                cpu=`echo "$1" | sed -e 's/86.*/86/'`
                vendor=pc
-               os=sysv4
+               basic_os=sysv4
                ;;
        i*86v)
                cpu=`echo "$1" | sed -e 's/86.*/86/'`
                vendor=pc
-               os=sysv
+               basic_os=sysv
                ;;
        i*86sol2)
                cpu=`echo "$1" | sed -e 's/86.*/86/'`
                vendor=pc
-               os=solaris2
+               basic_os=solaris2
                ;;
        j90 | j90-cray)
                cpu=j90
                vendor=cray
-               os=${os:-unicos}
+               basic_os=${basic_os:-unicos}
                ;;
        iris | iris4d)
                cpu=mips
                vendor=sgi
-               case $os in
+               case $basic_os in
                    irix*)
                        ;;
                    *)
-                       os=irix4
+                       basic_os=irix4
                        ;;
                esac
                ;;
@@ -810,24 +820,26 @@ case $basic_machine in
        *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
                cpu=m68k
                vendor=atari
-               os=mint
+               basic_os=mint
                ;;
        news-3600 | risc-news)
                cpu=mips
                vendor=sony
-               os=newsos
+               basic_os=newsos
                ;;
        next | m*-next)
                cpu=m68k
                vendor=next
-               case $os in
-                   nextstep* )
+               case $basic_os in
+                   openstep*)
+                       ;;
+                   nextstep*)
                        ;;
                    ns2*)
-                     os=nextstep2
+                     basic_os=nextstep2
                        ;;
                    *)
-                     os=nextstep3
+                     basic_os=nextstep3
                        ;;
                esac
                ;;
@@ -838,12 +850,12 @@ case $basic_machine in
        op50n-* | op60c-*)
                cpu=hppa1.1
                vendor=oki
-               os=proelf
+               basic_os=proelf
                ;;
        pa-hitachi)
                cpu=hppa1.1
                vendor=hitachi
-               os=hiuxwe2
+               basic_os=hiuxwe2
                ;;
        pbd)
                cpu=sparc
@@ -880,12 +892,12 @@ case $basic_machine in
        sde)
                cpu=mipsisa32
                vendor=sde
-               os=${os:-elf}
+               basic_os=${basic_os:-elf}
                ;;
        simso-wrs)
                cpu=sparclite
                vendor=wrs
-               os=vxworks
+               basic_os=vxworks
                ;;
        tower | tower-32)
                cpu=m68k
@@ -902,7 +914,7 @@ case $basic_machine in
        w89k-*)
                cpu=hppa1.1
                vendor=winbond
-               os=proelf
+               basic_os=proelf
                ;;
        none)
                cpu=none
@@ -918,6 +930,7 @@ case $basic_machine in
                ;;
 
        *-*)
+               # shellcheck disable=SC2162
                IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
@@ -954,11 +967,11 @@ case $cpu-$vendor in
        # some cases the only manufacturer, in others, it is the most popular.
        craynv-unknown)
                vendor=cray
-               os=${os:-unicosmp}
+               basic_os=${basic_os:-unicosmp}
                ;;
        c90-unknown | c90-cray)
                vendor=cray
-               os=${os:-unicos}
+               basic_os=${Basic_os:-unicos}
                ;;
        fx80-unknown)
                vendor=alliant
@@ -1002,7 +1015,7 @@ case $cpu-$vendor in
        dpx20-unknown | dpx20-bull)
                cpu=rs6000
                vendor=bull
-               os=${os:-bosx}
+               basic_os=${basic_os:-bosx}
                ;;
 
        # Here we normalize CPU types irrespective of the vendor
@@ -1011,7 +1024,7 @@ case $cpu-$vendor in
                ;;
        blackfin-*)
                cpu=bfin
-               os=linux
+               basic_os=linux
                ;;
        c54x-*)
                cpu=tic54x
@@ -1024,7 +1037,7 @@ case $cpu-$vendor in
                ;;
        e500v[12]-*)
                cpu=powerpc
-               os=$os"spe"
+               basic_os=${basic_os}"spe"
                ;;
        mips3*-*)
                cpu=mips64
@@ -1034,7 +1047,7 @@ case $cpu-$vendor in
                ;;
        m68knommu-*)
                cpu=m68k
-               os=linux
+               basic_os=linux
                ;;
        m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
                cpu=s12z
@@ -1044,7 +1057,7 @@ case $cpu-$vendor in
                ;;
        parisc-*)
                cpu=hppa
-               os=linux
+               basic_os=linux
                ;;
        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
                cpu=i586
@@ -1100,11 +1113,14 @@ case $cpu-$vendor in
        xscale-* | xscalee[bl]-*)
                cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
                ;;
+       arm64-*)
+               cpu=aarch64
+               ;;
 
        # Recognize the canonical CPU Types that limit and/or modify the
        # company names they are paired with.
        cr16-*)
-               os=${os:-elf}
+               basic_os=${basic_os:-elf}
                ;;
        crisv32-* | etraxfs*-*)
                cpu=crisv32
@@ -1115,7 +1131,7 @@ case $cpu-$vendor in
                vendor=axis
                ;;
        crx-*)
-               os=${os:-elf}
+               basic_os=${basic_os:-elf}
                ;;
        neo-tandem)
                cpu=neo
@@ -1137,16 +1153,12 @@ case $cpu-$vendor in
                cpu=nsx
                vendor=tandem
                ;;
-       s390-*)
-               cpu=s390
-               vendor=ibm
-               ;;
-       s390x-*)
-               cpu=s390x
-               vendor=ibm
+       mipsallegrexel-sony)
+               cpu=mipsallegrexel
+               vendor=sony
                ;;
        tile*-*)
-               os=${os:-linux-gnu}
+               basic_os=${basic_os:-linux-gnu}
                ;;
 
        *)
@@ -1162,13 +1174,13 @@ case $cpu-$vendor in
                        | alphapca5[67] | alpha64pca5[67] \
                        | am33_2.0 \
                        | amdgcn \
-                       | arc | arceb \
-                       | arm  | arm[lb]e | arme[lb] | armv* \
+                       | arc | arceb | arc32 | arc64 \
+                       | arm | arm[lb]e | arme[lb] | armv* \
                        | avr | avr32 \
                        | asmjs \
                        | ba \
                        | be32 | be64 \
-                       | bfin | bs2000 \
+                       | bfin | bpf | bs2000 \
                        | c[123]* | c30 | [cjt]90 | c4x \
                        | c8051 | clipper | craynv | csky | cydra \
                        | d10v | d30v | dlx | dsp16xx \
@@ -1182,14 +1194,15 @@ case $cpu-$vendor in
                        | k1om \
                        | le32 | le64 \
                        | lm32 \
+                       | loongarch32 | loongarch64 | loongarchx32 \
                        | m32c | m32r | m32rle \
-                       | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
-                       | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
+                       | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+                       | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
                        | m88110 | m88k | maxq | mb | mcore | mep | metag \
                        | microblaze | microblazeel \
                        | mips | mipsbe | mipseb | mipsel | mipsle \
                        | mips16 \
-                       | mips64 | mips64el \
+                       | mips64 | mips64eb | mips64el \
                        | mips64octeon | mips64octeonel \
                        | mips64orion | mips64orionel \
                        | mips64r5900 | mips64r5900el \
@@ -1200,9 +1213,13 @@ case $cpu-$vendor in
                        | mips64vr5900 | mips64vr5900el \
                        | mipsisa32 | mipsisa32el \
                        | mipsisa32r2 | mipsisa32r2el \
+                       | mipsisa32r3 | mipsisa32r3el \
+                       | mipsisa32r5 | mipsisa32r5el \
                        | mipsisa32r6 | mipsisa32r6el \
                        | mipsisa64 | mipsisa64el \
                        | mipsisa64r2 | mipsisa64r2el \
+                       | mipsisa64r3 | mipsisa64r3el \
+                       | mipsisa64r5 | mipsisa64r5el \
                        | mipsisa64r6 | mipsisa64r6el \
                        | mipsisa64sb1 | mipsisa64sb1el \
                        | mipsisa64sr71k | mipsisa64sr71kel \
@@ -1216,32 +1233,37 @@ case $cpu-$vendor in
                        | nds32 | nds32le | nds32be \
                        | nfp \
                        | nios | nios2 | nios2eb | nios2el \
-                       | none | np1 | ns16k | ns32k \
+                       | none | np1 | ns16k | ns32k | nvptx \
                        | open8 \
                        | or1k* \
                        | or32 \
                        | orion \
+                       | picochip \
                        | pdp10 | pdp11 | pj | pjl | pn | power \
                        | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
                        | pru \
                        | pyramid \
-                       | riscv | riscv32 | riscv64 \
+                       | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
                        | rl78 | romp | rs6000 | rx \
+                       | s390 | s390x \
                        | score \
-                       | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+                       | sh | shl \
+                       | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
                        | sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
                        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
                        | sparclite \
                        | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
                        | spu \
                        | tahoe \
+                       | thumbv7* \
                        | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
                        | tron \
                        | ubicom32 \
-                       | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+                       | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
                        | vax \
                        | visium \
-                       | wasm32 \
+                       | w65 \
+                       | wasm32 | wasm64 \
                        | we32k \
                        | x86 | x86_64 | xc16x | xgate | xps100 \
                        | xstormy16 | xtensa* \
@@ -1271,8 +1293,47 @@ esac
 
 # Decode manufacturer-specific aliases for certain operating systems.
 
-if [ x$os != x ]
+if test x$basic_os != x
 then
+
+# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+       gnu/linux*)
+               kernel=linux
+               os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+               ;;
+       os2-emx)
+               kernel=os2
+               os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+               ;;
+       nto-qnx*)
+               kernel=nto
+               os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+               ;;
+       *-*)
+               # shellcheck disable=SC2162
+               IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+               ;;
+       # Default OS when just kernel was specified
+       nto*)
+               kernel=nto
+               os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+               ;;
+       linux*)
+               kernel=linux
+               os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+               ;;
+       *)
+               kernel=
+               os=$basic_os
+               ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
 case $os in
        # First match some system type aliases that might get confused
        # with valid system types.
@@ -1284,7 +1345,7 @@ case $os in
                os=cnk
                ;;
        solaris1 | solaris1.*)
-               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
                ;;
        solaris)
                os=solaris2
@@ -1292,9 +1353,6 @@ case $os in
        unixware*)
                os=sysv4.2uw
                ;;
-       gnu/linux*)
-               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-               ;;
        # es1800 is here to avoid being matched by es* (a different OS)
        es1800*)
                os=ose
@@ -1316,12 +1374,9 @@ case $os in
                os=sco3.2v4
                ;;
        sco3.2.[4-9]*)
-               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
                ;;
-       sco3.2v[4-9]* | sco5v6*)
-               # Don't forget version if it is 3.2v4 or newer.
-               ;;
-       scout)
+       sco*v* | scout)
                # Don't match below
                ;;
        sco*)
@@ -1330,77 +1385,25 @@ case $os in
        psos*)
                os=psos
                ;;
-       # Now accept the basic system types.
-       # The portable systems comes first.
-       # Each alternative MUST end in a * to match a version number.
-       # sysv* is not here because it comes later, after sysvr4.
-       gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
-            | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
-            | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
-            | sym* | kopensolaris* | plan9* \
-            | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-            | aos* | aros* | cloudabi* | sortix* \
-            | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
-            | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
-            | knetbsd* | mirbsd* | netbsd* \
-            | bitrig* | openbsd* | solidbsd* | libertybsd* \
-            | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
-            | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
-            | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
-            | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
-            | chorusrdb* | cegcc* | glidix* \
-            | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
-            | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
-            | linux-newlib* | linux-musl* | linux-uclibc* \
-            | uxpv* | beos* | mpeix* | udk* | moxiebox* \
-            | interix* | uwin* | mks* | rhapsody* | darwin* \
-            | openstep* | oskit* | conix* | pw32* | nonstopux* \
-            | storm-chaos* | tops10* | tenex* | tops20* | its* \
-            | os2* | vos* | palmos* | uclinux* | nucleus* \
-            | morphos* | superux* | rtmk* | windiss* \
-            | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
-            | skyos* | haiku* | rdos* | toppers* | drops* | es* \
-            | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-            | midnightbsd* | amdhsa* | unleashed*)
-       # Remember, each alternative MUST END IN *, to match a version number.
-               ;;
        qnx*)
-               case $cpu in
-                   x86 | i*86)
-                       ;;
-                   *)
-                       os=nto-$os
-                       ;;
-               esac
+               os=qnx
                ;;
        hiux*)
                os=hiuxwe2
                ;;
-       nto-qnx*)
-               ;;
-       nto*)
-               os=`echo $os | sed -e 's|nto|nto-qnx|'`
-               ;;
-       sim | xray | os68k* | v88r* \
-           | windows* | osx | abug | netware* | os9* \
-           | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
-               ;;
-       linux-dietlibc)
-               os=linux-dietlibc
-               ;;
-       linux*)
-               os=`echo $os | sed -e 's|linux|linux-gnu|'`
-               ;;
        lynx*178)
                os=lynxos178
                ;;
        lynx*5)
                os=lynxos5
                ;;
+       lynxos*)
+               # don't get caught up in next wildcard
+               ;;
        lynx*)
                os=lynxos
                ;;
-       mac*)
+       mac[0-9]*)
                os=`echo "$os" | sed -e 's|mac|macos|'`
                ;;
        opened*)
@@ -1445,12 +1448,9 @@ case $os in
        ns2)
                os=nextstep2
                ;;
-       nsk*)
-               os=nsk
-               ;;
        # Preserve the version number of sinix5.
        sinix5.*)
-               os=`echo $os | sed -e 's|sinix|sysv|'`
+               os=`echo "$os" | sed -e 's|sinix|sysv|'`
                ;;
        sinix*)
                os=sysv4
@@ -1473,18 +1473,12 @@ case $os in
        sysvr4)
                os=sysv4
                ;;
-       # This must come after sysvr4.
-       sysv*)
-               ;;
        ose*)
                os=ose
                ;;
        *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
                os=mint
                ;;
-       zvmoe)
-               os=zvmoe
-               ;;
        dicos*)
                os=dicos
                ;;
@@ -1501,19 +1495,11 @@ case $os in
                        ;;
                esac
                ;;
-       nacl*)
-               ;;
-       ios)
-               ;;
-       none)
-               ;;
-       *-eabi)
-               ;;
        *)
-               echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
-               exit 1
+               # No normalization, but not necessarily accepted, that comes below.
                ;;
 esac
+
 else
 
 # Here we handle the default operating systems that come with various machines.
@@ -1526,6 +1512,7 @@ else
 # will signal an error saying that MANUFACTURER isn't an operating
 # system, and we'll never get to this point.
 
+kernel=
 case $cpu-$vendor in
        score-*)
                os=elf
@@ -1537,7 +1524,8 @@ case $cpu-$vendor in
                os=riscix1.2
                ;;
        arm*-rebel)
-               os=linux
+               kernel=linux
+               os=gnu
                ;;
        arm*-semi)
                os=aout
@@ -1703,84 +1691,178 @@ case $cpu-$vendor in
                os=none
                ;;
 esac
+
 fi
 
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+       # Sometimes we do "kernel-libc", so those need to count as OSes.
+       musl* | newlib* | uclibc*)
+               ;;
+       # Likewise for "kernel-abi"
+       eabi* | gnueabi*)
+               ;;
+       # VxWorks passes extra cpu info in the 4th filed.
+       simlinux | simwindows | spe)
+               ;;
+       # Now accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST end in a * to match a version number.
+       gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+            | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+            | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+            | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+            | hiux* | abug | nacl* | netware* | windows* \
+            | os9* | macos* | osx* | ios* \
+            | mpw* | magic* | mmixware* | mon960* | lnews* \
+            | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+            | aos* | aros* | cloudabi* | sortix* | twizzler* \
+            | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+            | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+            | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+            | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+            | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+            | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+            | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+            | udi* | lites* | ieee* | go32* | aux* | hcos* \
+            | chorusrdb* | cegcc* | glidix* | serenity* \
+            | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+            | midipix* | mingw32* | mingw64* | mint* \
+            | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+            | interix* | uwin* | mks* | rhapsody* | darwin* \
+            | openstep* | oskit* | conix* | pw32* | nonstopux* \
+            | storm-chaos* | tops10* | tenex* | tops20* | its* \
+            | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+            | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+            | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+            | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+            | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+            | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+            | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+               ;;
+       # This one is extra strict with allowed versions
+       sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               ;;
+       none)
+               ;;
+       *)
+               echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+       linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+               ;;
+       uclinux-uclibc* )
+               ;;
+       -dietlibc* | -newlib* | -musl* | -uclibc* )
+               # 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
+               ;;
+       kfreebsd*-gnu* | kopensolaris*-gnu*)
+               ;;
+       vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+               ;;
+       nto-qnx*)
+               ;;
+       os2-emx)
+               ;;
+       *-eabi* | *-gnueabi*)
+               ;;
+       -*)
+               # Blank kernel with real OS is always fine.
+               ;;
+       *-*)
+               echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+               exit 1
+               ;;
+esac
+
 # Here we handle the case where we know the os, and the CPU type, but not the
 # manufacturer.  We pick the logical manufacturer.
 case $vendor in
        unknown)
-               case $os in
-                       riscix*)
+               case $cpu-$os in
+                       *-riscix*)
                                vendor=acorn
                                ;;
-                       sunos*)
+                       *-sunos*)
                                vendor=sun
                                ;;
-                       cnk*|-aix*)
+                       *-cnk* | *-aix*)
                                vendor=ibm
                                ;;
-                       beos*)
+                       *-beos*)
                                vendor=be
                                ;;
-                       hpux*)
+                       *-hpux*)
                                vendor=hp
                                ;;
-                       mpeix*)
+                       *-mpeix*)
                                vendor=hp
                                ;;
-                       hiux*)
+                       *-hiux*)
                                vendor=hitachi
                                ;;
-                       unos*)
+                       *-unos*)
                                vendor=crds
                                ;;
-                       dgux*)
+                       *-dgux*)
                                vendor=dg
                                ;;
-                       luna*)
+                       *-luna*)
                                vendor=omron
                                ;;
-                       genix*)
+                       *-genix*)
                                vendor=ns
                                ;;
-                       clix*)
+                       *-clix*)
                                vendor=intergraph
                                ;;
-                       mvs* | opened*)
+                       *-mvs* | *-opened*)
+                               vendor=ibm
+                               ;;
+                       *-os400*)
                                vendor=ibm
                                ;;
-                       os400*)
+                       s390-* | s390x-*)
                                vendor=ibm
                                ;;
-                       ptx*)
+                       *-ptx*)
                                vendor=sequent
                                ;;
-                       tpf*)
+                       *-tpf*)
                                vendor=ibm
                                ;;
-                       vxsim* | vxworks* | windiss*)
+                       *-vxsim* | *-vxworks* | *-windiss*)
                                vendor=wrs
                                ;;
-                       aux*)
+                       *-aux*)
                                vendor=apple
                                ;;
-                       hms*)
+                       *-hms*)
                                vendor=hitachi
                                ;;
-                       mpw* | macos*)
+                       *-mpw* | *-macos*)
                                vendor=apple
                                ;;
-                       *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+                       *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
                                vendor=atari
                                ;;
-                       vos*)
+                       *-vos*)
                                vendor=stratus
                                ;;
                esac
                ;;
 esac
 
-echo "$cpu-$vendor-$os"
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
 exit
 
 # Local variables:
index 65cbf70..715e343 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 4472ff5..5605f42 100755 (executable)
@@ -7,7 +7,7 @@ VERSION=2018-03-07.03 # UTC
 
 # Note: this is a bash script (could be zsh or dash)
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 91c058d..1241ee3 100755 (executable)
@@ -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=2018-03-06.19
+scriptversion=2021-07-19.18
 
-# Copyright 2003-2018 Free Software Foundation, Inc.
+# Copyright 2003-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ EMAIL=webmasters@gnu.org  # please override with --email
 commonarg= # passed to all makeinfo/texi2html invcations.
 dirargs=   # passed to all tools (-I dir).
 dirs=      # -I directories.
-htmlarg="--css-ref=/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
+htmlarg="--css-ref=https://www.gnu.org/software/gnulib/manual.css -c TOP_NODE_UP_URL=/manual"
 default_htmlarg=true
 infoarg=--no-split
 generate_ascii=true
@@ -73,7 +73,7 @@ texarg="-t @finalout"
 
 version="gendocs.sh $scriptversion
 
-Copyright 2018 Free Software Foundation, Inc.
+Copyright 2021 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."
@@ -202,7 +202,7 @@ base=$PACKAGE
 
 if $default_htmlarg && test -n "$use_texi2html"; then
   # The legacy texi2html doesn't support TOP_NODE_UP_URL
-  htmlarg="--css-ref=/software/gnulib/manual.css"
+  htmlarg="--css-ref=https://www.gnu.org/software/gnulib/manual.css"
 fi
 
 if test -n "$srcfile"; then
index 6d073fc..da525aa 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2019-10-13.15; # UTC
 
-# Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -72,12 +72,13 @@ scriptversion=2018-03-07.03; # UTC
 
 me=$0
 
+year=`expr "$scriptversion" : '\([^-]*\)'`
 version="git-version-gen $scriptversion
 
-Copyright 2011 Free Software Foundation, Inc.
-There is NO warranty.  You may redistribute this software
-under the terms of the GNU General Public License.
-For more information about these matters, see the files named COPYING."
+Copyright (C) ${year} Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law."
 
 usage="\
 Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
@@ -141,11 +142,9 @@ then
     v=`cat $tarball_version_file` || v=
     case $v in
         *$nl*) v= ;; # reject multi-line output
-        [0-9]*) ;;
-        *) v= ;;
     esac
     test "x$v" = x \
-        && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
+        && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
 fi
 
 if test "x$v" != x
index 1e73f42..9ff15f6 100755 (executable)
@@ -1,31 +1,46 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" "$@"'
-  & eval 'exec perl -wS "$0" $argv:q'
-    if 0;
-# Convert git log output to ChangeLog format.
-
-my $VERSION = '2018-03-07 03:47'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
+#!/bin/sh
+#! -*-perl-*-
 
-# Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# Convert git log output to ChangeLog format.
 
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+#
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
+#
 # Written by Jim Meyering
 
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by perl, the next two lines are a no-op.
+eval 'exec perl -wSx "$0" "$@"'
+     if 0;
+
+my $VERSION = '2021-02-24 23:42'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job.  Otherwise, update this string manually.
+
 use strict;
 use warnings;
 use Getopt::Long;
@@ -174,7 +189,7 @@ sub parse_amend_file($)
 
       if (!$in_code)
         {
-          $line =~ /^([0-9a-fA-F]{40})$/
+          $line =~ /^([[:xdigit:]]{40})$/
             or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
               $fail = 1, next;
           $sha = lc $1;
@@ -288,7 +303,7 @@ sub git_dir_option($)
       my ($sha, $rest) = split ':', $log, 2;
       defined $sha
         or die "$ME:$.: malformed log entry\n";
-      $sha =~ /^[0-9a-fA-F]{40}$/
+      $sha =~ /^[[:xdigit:]]{40}$/
         or die "$ME:$.: invalid SHA1: $sha\n";
 
       my $skipflag = 0;
@@ -376,7 +391,7 @@ sub git_dir_option($)
                   @skipshas = ();
                   next;
               }
-              if ($found && $_ =~ /^([0-9a-fA-F]{7,}) [^ ]/)
+              if ($found && $_ =~ /^([[:xdigit:]]{7,}) [^ ]/)
               {
                   push ( @skipshas, $1 );
               }
@@ -440,7 +455,8 @@ sub git_dir_option($)
           # If there were any lines
           if (@line == 0)
             {
-              warn "$ME: warning: empty commit message:\n  $date_line\n";
+              warn "$ME: warning: empty commit message:\n"
+                   . "  commit $sha\n  $date_line\n";
             }
           else
             {
@@ -492,6 +508,7 @@ sub git_dir_option($)
 # mode: perl
 # indent-tabs-mode: nil
 # eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-line-limit: 50
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d %02H:%02M"
 # time-stamp-time-zone: "UTC0"
index 356c561..cc553f9 100755 (executable)
@@ -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=2018-03-07.03; # UTC
+VERSION=2021-01-09.09; # UTC
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -41,6 +41,7 @@ Options:
   -C, --builddir=DIR  location of (configured) Makefile (default: .)
   -n, --dry-run       don't actually commit anything
   -m, --mirror        remove out of date files from document server
+  -u, --user          the name of the CVS user on Savannah
   --help              print this help, then exit
   --version           print version number, then exit
 
@@ -109,6 +110,7 @@ find_tool XARGS gxargs xargs
 builddir=.
 dryrun=
 rm_stale='echo'
+cvs_user="$USER"
 while test $# != 0
 do
   # Handle --option=value by splitting apart and putting back on argv.
@@ -126,6 +128,7 @@ do
     -C|--builddir) shift; builddir=$1; shift ;;
     -n|--dry-run) dryrun=echo; shift;;
     -m|--mirror) rm_stale=''; shift;;
+    -u|--user) shift; cvs_user=$1; shift ;;
     --*) die "unrecognized option: $1";;
     *) break;;
   esac
@@ -172,7 +175,7 @@ set +e
 
 tmp=$(mktemp -d web-doc-update.XXXXXX) || exit 1
 ( cd $tmp \
-    && $CVS -d $USER@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
+    && $CVS -d $cvs_user@cvs.sv.gnu.org:/webcvs/$pkg co $pkg )
 $RSYNC -avP "$builddir"/doc/manual/ $tmp/$pkg/manual
 
 (
index 8f05700..e7822ae 100755 (executable)
@@ -1,13 +1,13 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2018-05-19.18; # UTC
+scriptversion=2021-04-11.09; # UTC
 
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
+# the Free Software Foundation; either version 2, or (at your option)
 # any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -27,8 +27,8 @@ set -e
 GPG=gpg
 # Choose the proper version of gpg, so as to avoid a
 # "gpg-agent is not available in this session" error
-# when gpg-agent is version 3 but gpg is still version 1.
-# FIXME-2020: remove, once all major distros ship gpg version 3 as /usr/bin/gpg
+# when gpg-agent is version 2 but gpg is still version 1.
+# FIXME-2020: remove, once all major distros ship gpg version 2 as /usr/bin/gpg
 gpg_agent_version=`(gpg-agent --version) 2>/dev/null | sed -e '2,$d' -e 's/^[^0-9]*//'`
 case "$gpg_agent_version" in
   2.*)
@@ -116,12 +116,22 @@ Examples:
            --symlink-regex \\
            foobar-1.0.tar.gz foobar-1.0.tar.xz
 
-4. Upload foobar-0.9.90.tar.gz to two sites:
+4. Create a symbolic link foobar-latest.tar.gz -> foobar-1.0.tar.gz
+   and likewise for the corresponding .sig file:
+  gnupload --to ftp.gnu.org:foobar \\
+           --symlink foobar-1.0.tar.gz     foobar-latest.tar.gz \\
+                     foobar-1.0.tar.gz.sig foobar-latest.tar.gz.sig
+  or (equivalent):
+  gnupload --to ftp.gnu.org:foobar \\
+           --symlink foobar-1.0.tar.gz     foobar-latest.tar.gz \\
+           --symlink foobar-1.0.tar.gz.sig foobar-latest.tar.gz.sig
+
+5. Upload foobar-0.9.90.tar.gz to two sites:
   gnupload --to alpha.gnu.org:foobar \\
            --to sources.redhat.com:~ftp/pub/foobar \\
            foobar-0.9.90.tar.gz
 
-5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
+6. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
    (the -- terminates the list of files to delete):
   gnupload --to alpha.gnu.org:foobar \\
            --to sources.redhat.com:~ftp/pub/foobar \\
@@ -135,6 +145,12 @@ the build-aux/ directory of the gnulib package
 
 Send patches and bug reports to <bug-gnulib@gnu.org>."
 
+copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'`
+copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law."
+
 # Read local configuration file
 if test -r "$conffile"; then
   echo "$0: Reading configuration file $conffile"
@@ -199,7 +215,8 @@ while test -n "$1"; do
       ;;
     --version)
       echo "gnupload $scriptversion"
-      exit $?
+      echo "$copyright"
+      exit 0
       ;;
     --)
       shift
index 8175c64..ec298b5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2020-11-14.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@ posix_mkdir=
 # Desired mode of installed file.
 mode=0755
 
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
 chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
@@ -99,18 +104,28 @@ Options:
      --version  display version info and exit.
 
   -c            (ignored)
-  -C            install only if different (preserve the last data modification time)
+  -C            install only if different (preserve data modification time)
   -d            create directories instead of installing files.
   -g GROUP      $chgrpprog installed files to GROUP.
   -m MODE       $chmodprog installed files to MODE.
   -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
   -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
   -t DIRECTORY  install into DIRECTORY.
   -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
   CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
 "
 
 while test $# -ne 0; do
@@ -137,8 +152,13 @@ while test $# -ne 0; do
     -o) chowncmd="$chownprog $2"
         shift;;
 
+    -p) cpprog="$cpprog -p";;
+
     -s) stripcmd=$stripprog;;
 
+    -S) backupsuffix="$2"
+        shift;;
+
     -t)
         is_target_a_directory=always
         dst_arg=$2
@@ -255,6 +275,10 @@ do
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -301,22 +325,6 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
-
         # With -d, create the new directory with the user-specified mode.
         # Otherwise, rely on $mkdir_umask.
         if test -n "$dir_arg"; then
@@ -326,52 +334,49 @@ do
         fi
 
         posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
-            # here however when possible just to lower collision chance.
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-            # Because "mkdir -p" follows existing symlinks and we likely work
-            # directly in world-writeable /tmp, make sure that the '$tmpdir'
-            # directory is successfully created first before we actually test
-            # 'mkdir -p' feature.
-            if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+       # The $RANDOM variable is not portable (e.g., dash).  Use it
+       # here however when possible just to lower collision chance.
+       tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+       trap '
+         ret=$?
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+         exit $ret
+       ' 0
+
+       # Because "mkdir -p" follows existing symlinks and we likely work
+       # directly in world-writeable /tmp, make sure that the '$tmpdir'
+       # directory is successfully created first before we actually test
+       # 'mkdir -p'.
+       if (umask $mkdir_umask &&
+           $mkdirprog $mkdir_mode "$tmpdir" &&
+           exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+       then
+         if test -z "$dir_arg" || {
+              # Check for POSIX incompatibilities with -m.
+              # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+              # other-writable bit of parent directory when it shouldn't.
+              # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+              test_tmpdir="$tmpdir/a"
+              ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+              case $ls_ld_tmpdir in
+                d????-?r-*) different_mode=700;;
+                d????-?--*) different_mode=755;;
+                *) false;;
+              esac &&
+              $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+              }
+            }
+         then posix_mkdir=:
+         fi
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+       else
+         # Remove any dirs left behind by ancient mkdir implementations.
+         rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+       fi
+       trap '' 0;;
     esac
 
     if
@@ -382,7 +387,7 @@ do
     then :
     else
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # mkdir does not conform to POSIX,
       # or it failed possibly due to a race condition.  Create the
       # directory the slow way, step by step, checking for races as we go.
 
@@ -411,7 +416,7 @@ do
           prefixes=
         else
           if $posix_mkdir; then
-            (umask=$mkdir_umask &&
+            (umask $mkdir_umask &&
              $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
             # Don't fail if two instances are running concurrently.
             test -d "$prefix" || exit 1
@@ -451,7 +456,18 @@ do
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
     # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+        # Create $dsttmp read-write so that cp doesn't create it read-only,
+        # which would cause strip to fail.
+        if test -z "$doit"; then
+          : >"$dsttmp" # No need to fork-exec 'touch'.
+        else
+          $doit touch "$dsttmp"
+        fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -477,6 +493,13 @@ do
     then
       rm -f "$dsttmp"
     else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
       # Rename the file to the real destination.
       $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
@@ -491,9 +514,9 @@ do
         # file should still install successfully.
         {
           test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
           } ||
           { echo "$0: cannot unlink or rename $dst" >&2
             (exit 1); exit 1
index 8c7a590..e6d572d 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1995-2018 Free Software Foundation, Inc.
+# Copyright (C) 1995-2021 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
index 625aeb1..1fe1611 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2021 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
index b8521a4..be73b80 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -42,11 +42,13 @@ print_usage ()
 {
   cat <<END
 Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
+  test-driver --test-name NAME --log-file PATH --trs-file PATH
+              [--expect-failure {yes|no}] [--color-tests {yes|no}]
+              [--enable-hard-errors {yes|no}] [--]
               TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
 END
 }
 
@@ -103,8 +105,11 @@ trap "st=130; $do_exit" 2
 trap "st=141; $do_exit" 13
 trap "st=143; $do_exit" 15
 
-# Test script is run here.
-"$@" >$log_file 2>&1
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
 estatus=$?
 
 if test $enable_hard_errors = no && test $estatus -eq 99; then
@@ -126,7 +131,7 @@ esac
 # know whether the test passed or failed simply by looking at the '.log'
 # file, without the need of also peaking into the corresponding '.trs'
 # file (automake bug#11814).
-echo "$res $test_name (exit status: $estatus)" >>$log_file
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
 
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
index 5840aff..e48383d 100644 (file)
@@ -1,14 +1,11 @@
 % texinfo.tex -- TeX macros to handle Texinfo files.
-% 
+%
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2018-09-21.20}
+\def\texinfoversion{2021-04-25.21}
 %
-% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
-% Free Software Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990-2021 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
@@ -36,7 +33,7 @@
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
-% Send bug reports to bug-texinfo@gnu.org.  Please include including a
+% Send bug reports to bug-texinfo@gnu.org.  Please include a
 % complete document in each bug report with which we can reproduce the
 % problem.  Patches are, of course, greatly appreciated.
 %
 % @errormsg{MSG}.  Do the index-like expansions on MSG, but if things
 % aren't perfect, it's not the end of the world, being an error message,
 % after all.
-% 
+%
 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
 \def\doerrormsg#1{\errmessage{#1}}
 
 %
 \def\finalout{\overfullrule=0pt }
 
-% Do @cropmarks to get crop marks.
-%
-\newif\ifcropmarks
-\let\cropmarks = \cropmarkstrue
-%
-% Dimensions to add cropmarks at corners.
-% Added by P. A. MacKay, 12 Nov. 1986
-%
 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
-\newdimen\cornerlong  \cornerlong=1pc
-\newdimen\cornerthick \cornerthick=.3pt
 \newdimen\topandbottommargin \topandbottommargin=.75in
 
 % Output a mark which sets \thischapter, \thissection and \thiscolor.
 
 % \domark is called twice inside \chapmacro, to add one
 % mark before the section break, and one after.
-%   In the second call \prevchapterdefs is the same as \lastchapterdefs,
-% and \prevsectiondefs is the same as \lastsectiondefs.
+%   In the second call \prevchapterdefs is the same as \currentchapterdefs,
+% and \prevsectiondefs is the same as \currentsectiondefs.
 %   Then if the page is not broken at the mark, some of the previous
 % section appears on the page, and we can get the name of this section
 % from \firstmark for @everyheadingmarks top.
 %
 % See page 260 of The TeXbook.
 \def\domark{%
-  \toks0=\expandafter{\lastchapterdefs}%
-  \toks2=\expandafter{\lastsectiondefs}%
+  \toks0=\expandafter{\currentchapterdefs}%
+  \toks2=\expandafter{\currentsectiondefs}%
   \toks4=\expandafter{\prevchapterdefs}%
   \toks6=\expandafter{\prevsectiondefs}%
-  \toks8=\expandafter{\lastcolordefs}%
+  \toks8=\expandafter{\currentcolordefs}%
   \mark{%
                    \the\toks0 \the\toks2  % 0: marks for @everyheadingmarks top
       \noexpand\or \the\toks4 \the\toks6  % 1: for @everyheadingmarks bottom
 % @setcolor (or @url, or @link, etc.) between @contents and the very
 % first @chapter.
 \def\gettopheadingmarks{%
-  \ifcase0\topmark\fi
+  \ifcase0\the\savedtopmark\fi
   \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
 }
 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
-\def\getcolormarks{\ifcase2\topmark\fi}
+\def\getcolormarks{\ifcase2\the\savedtopmark\fi}
 
 % Avoid "undefined control sequence" errors.
-\def\lastchapterdefs{}
-\def\lastsectiondefs{}
-\def\lastsection{}
+\def\currentchapterdefs{}
+\def\currentsectiondefs{}
+\def\currentsection{}
 \def\prevchapterdefs{}
 \def\prevsectiondefs{}
-\def\lastcolordefs{}
+\def\currentcolordefs{}
 
 % Margin to add to right of even pages, to left of odd pages.
 \newdimen\bindingoffset
 % Main output routine.
 %
 \chardef\PAGE = 255
-\output = {\onepageout{\pagecontents\PAGE}}
+\newtoks\defaultoutput
+\defaultoutput = {\savetopmark\onepageout{\pagecontents\PAGE}}
+\output=\expandafter{\the\defaultoutput}
 
 \newbox\headlinebox
 \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.)
+%
+\newtoks\savedtopmark
+\newif\iftopmarksaved
+\topmarksavedtrue
+\def\savetopmark{%
+  \iftopmarksaved\else
+    \global\savedtopmark=\expandafter{\topmark}%
+    \global\topmarksavedtrue
+  \fi
+}
+
 % \onepageout takes a vbox as an argument.
-% \shipout a vbox for a single page, adding an optional header, footer,
-% cropmarks, and footnote.  This also causes index entries for this page
-% to be written to the auxiliary files.
+% \shipout a vbox for a single page, adding an optional header, footer
+% and footnote.  This also causes index entries for this page to be written
+% to the auxiliary files.
 %
 \def\onepageout#1{%
-  \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+  \hoffset=\normaloffset
   %
   \ifodd\pageno  \advance\hoffset by \bindingoffset
   \else \advance\hoffset by -\bindingoffset\fi
   %
-  % 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).
-  \def\commmonheadfootline{\let\hsize=\txipagewidth \texinfochars}
+  \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.
   %
-  % This is used to check if we are on the first page of a chapter.
-  \ifcase1\topmark\fi
-  \let\prevchaptername\thischaptername
-  \ifcase0\firstmark\fi
-  \let\curchaptername\thischaptername
+  % 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).
+  \def\commonheadfootline{\let\hsize=\txipagewidth \texinfochars}
   %
   \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
+  \global\setbox\headlinebox = \vbox{\commonheadfootline \makeheadline}%
   \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
-  %
-  \ifx\curchaptername\prevchaptername
-    \let\thischapterheading\thischapter
-  \else
-    % \thischapterheading is the same as \thischapter except it is blank
-    % for the first page of a chapter.  This is to prevent the chapter name 
-    % being shown twice.
-    \def\thischapterheading{}%
-  \fi
-  %
-  \global\setbox\headlinebox = \vbox{\commmonheadfootline \makeheadline}%
-  \global\setbox\footlinebox = \vbox{\commmonheadfootline \makefootline}%
+  \global\setbox\footlinebox = \vbox{\commonheadfootline \makefootline}%
   %
   {%
     % Set context for writing to auxiliary files like index files.
     % take effect in \write's, yet the group defined by the \vbox ends
     % before the \shipout runs.
     %
-    \indexdummies         % don't expand commands in the output.
-    \normalturnoffactive  % \ in index entries must not stay \, e.g., if
-               % the page break happens to be in the middle of an example.
-               % We don't want .vr (or whatever) entries like this:
-               % \entry{{\indexbackslash }acronym}{32}{\code {\acronym}}
-               % "\acronym" won't work when it's read back in;
-               % it needs to be
-               % {\code {{\backslashcurfont }acronym}
+    \atdummies         % don't expand commands in the output.
+    \turnoffactive
     \shipout\vbox{%
       % Do this early so pdf references go to the beginning of the page.
       \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
       %
-      \ifcropmarks \vbox to \outervsize\bgroup
-        \hsize = \outerhsize
-        \vskip-\topandbottommargin
-        \vtop to0pt{%
-          \line{\ewtop\hfil\ewtop}%
-          \nointerlineskip
-          \line{%
-            \vbox{\moveleft\cornerthick\nstop}%
-            \hfill
-            \vbox{\moveright\cornerthick\nstop}%
-          }%
-          \vss}%
-        \vskip\topandbottommargin
-        \line\bgroup
-          \hfil % center the page within the outer (page) hsize.
-          \ifodd\pageno\hskip\bindingoffset\fi
-          \vbox\bgroup
-      \fi
-      %
       \unvbox\headlinebox
       \pagebody{#1}%
       \ifdim\ht\footlinebox > 0pt
         \unvbox\footlinebox
       \fi
       %
-      \ifcropmarks
-          \egroup % end of \vbox\bgroup
-        \hfil\egroup % end of (centering) \line\bgroup
-        \vskip\topandbottommargin plus1fill minus1fill
-        \boxmaxdepth = \cornerthick
-        \vbox to0pt{\vss
-          \line{%
-            \vbox{\moveleft\cornerthick\nsbot}%
-            \hfill
-            \vbox{\moveright\cornerthick\nsbot}%
-          }%
-          \nointerlineskip
-          \line{\ewbot\hfil\ewbot}%
-        }%
-      \egroup % \vbox from first cropmarks clause
-      \fi
-    }% end of \shipout\vbox
-  }% end of group with \indexdummies
+    }%
+  }%
+  \global\topmarksavedfalse
   \advancepageno
   \ifnum\outputpenalty>-20000 \else\dosupereject\fi
 }
 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
 }
 
-% Here are the rules for the cropmarks.  Note that they are
-% offset so that the space between them is truly \outerhsize or \outervsize
-% (P. A. MacKay, 12 November, 1986)
-%
-\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
-\def\nstop{\vbox
-  {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
-\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
-\def\nsbot{\vbox
-  {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
-
+% Check if we are on the first page of a chapter.  Used for printing headings.
+\newif\ifchapterpage
+\def\checkchapterpage{%
+  % Get the chapter that was current at the end of the last page
+  \ifcase1\the\savedtopmark\fi
+  \let\prevchaptername\thischaptername
+  %
+  \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
+  \let\curchaptername\thischaptername
+  %
+  \ifx\curchaptername\prevchaptername
+    \chapterpagefalse
+  \else
+    \chapterpagetrue
+  \fi
+}
 
 % Argument parsing
 
   }%
 }
 
-% First remove any @comment, then any @c comment.  Also remove a @texinfoc
-% comment (see \scanmacro for details).  Pass the result on to \argcheckspaces.
+% First remove any @comment, then any @c comment.  Pass the result on to
+% \argcheckspaces.
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argremovetexinfoc #1\texinfoc\ArgTerm}
-\def\argremovetexinfoc#1\texinfoc#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
 
 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
 %
   \fi
 }
 
-% @end foo executes the definition of \Efoo.
-% But first, it executes a specialized version of \checkenv
-%
+
+% @end foo calls \checkenv and executes the definition of \Efoo.
 \parseargdef\end{%
   \if 1\csname iscond.#1\endcsname
   \else
@@ -1042,6 +1002,14 @@ where each line of input produces a line of output.}
   \global\everypar = {}%
 }
 
+% leave vertical mode without cancelling any first paragraph indent
+\gdef\imageindent{%
+  \toks0=\everypar
+  \everypar={}%
+  \ptexnoindent
+  \global\everypar=\toks0
+}
+
 
 % @refill is a no-op.
 \let\refill=\relax
@@ -1050,7 +1018,7 @@ where each line of input produces a line of output.}
 \let\setfilename=\comment
 
 % @bye.
-\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
 
 
 \message{pdf,}
@@ -1092,7 +1060,7 @@ where each line of input produces a line of output.}
             tex.sprint(
               string.format(string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o',
-                            (c / 256), (c % 256)))
+                            math.floor(c / 256), math.floor(c % 256)))
           else
             c = c - 0x10000
             local c_hi = c / 1024 + 0xd800
@@ -1102,8 +1070,8 @@ where each line of input produces a line of output.}
                             string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o' ..
                             string.char(0x5c) .. string.char(0x25) .. '03o',
-                            (c_hi / 256), (c_hi % 256),
-                            (c_lo / 256), (c_lo % 256)))
+                            math.floor(c_hi / 256), math.floor(c_hi % 256),
+                            math.floor(c_lo / 256), math.floor(c_lo % 256)))
           end
         end
       end
@@ -1116,15 +1084,19 @@ where each line of input produces a line of output.}
       function PDFescstr(str)
         for c in string.bytes(str) do
           if c <= 0x20 or c >= 0x80 or c == 0x28 or c == 0x29 or c == 0x5c then
-            tex.sprint(
+            tex.sprint(-2,
               string.format(string.char(0x5c) .. string.char(0x25) .. '03o',
                             c))
           else
-            tex.sprint(string.char(c))
+            tex.sprint(-2, string.char(c))
           end
         end
       end
     }
+    % The -2 in the arguments here gives all the input to TeX catcode 12
+    % (other) or 10 (space), preventing undefined control sequence errors. See
+    % https://lists.gnu.org/archive/html/bug-texinfo/2019-08/msg00031.html
+    %
   \endgroup
   \def\pdfescapestring#1{\directlua{PDFescstr('\luaescapestring{#1}')}}
   \ifnum\luatexversion>84
@@ -1163,11 +1135,60 @@ where each line of input produces a line of output.}
   \fi
 \fi
 
+\newif\ifpdforxetex
+\pdforxetexfalse
+\ifpdf
+  \pdforxetextrue
+\fi
+\ifx\XeTeXrevision\thisisundefined\else
+  \pdforxetextrue
+\fi
+
+
+% Output page labels information.
+% See PDF reference v.1.7 p.594, section 8.3.1.
+\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
+  \else
+    \pdfcatalog{/PageLabels << /Nums [\title \arabic \roman ] >> }\relax
+  \fi
+}
+\else
+  \let\pagelabels\relax
+\fi
+
+\newcount\pagecount \pagecount=0
+\newcount\romancount \romancount=0
+\newcount\arabiccount \arabiccount=0
+\ifpdf
+  \let\ptxadvancepageno\advancepageno
+  \def\advancepageno{%
+    \ptxadvancepageno\global\advance\pagecount by 1
+  }
+\fi
+
+
 % PDF uses PostScript string constants for the names of xref targets,
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-% 
+%
 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
 % related messages.  The final outcome is that it is up to the TeX user
 % to double the backslashes and otherwise make the string valid, so
@@ -1219,7 +1240,7 @@ output) for that.)}
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
   \def\setcolor#1{%
-    \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
     \domark
     \pdfsetcolor{#1}%
   }
@@ -1227,7 +1248,7 @@ output) for that.)}
   \def\maincolor{\rgbBlack}
   \pdfsetcolor{\maincolor}
   \edef\thiscolor{\maincolor}
-  \def\lastcolordefs{}
+  \def\currentcolordefs{}
   %
   \def\makefootline{%
     \baselineskip24pt
@@ -1453,7 +1474,13 @@ output) for that.)}
       % subentries, which we calculated on our first read of the .toc above.
       %
       % We use the node names as the destinations.
+      %
+      % Currently we prefix the section name with the section number
+      % for chapter and appendix headings only in order to avoid too much
+      % horizontal space being required in the PDF viewer.
       \def\numchapentry##1##2##3##4{%
+        \dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+      \def\unnchapentry##1##2##3##4{%
         \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
       \def\numsecentry##1##2##3##4{%
         \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
@@ -1472,7 +1499,7 @@ output) for that.)}
       % their "best" equivalent, based on the @documentencoding.  Too
       % much work for too little return.  Just use the ASCII equivalents
       % we use for the index sort strings.
-      % 
+      %
       \indexnofonts
       \setupdatafile
       % We can have normal brace characters in the PDF outlines, unlike
@@ -1605,7 +1632,7 @@ output) for that.)}
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
   \def\setcolor#1{%
-    \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+    \xdef\currentcolordefs{\gdef\noexpand\thiscolor{#1}}%
     \domark
     \pdfsetcolor{#1}%
   }
@@ -1613,7 +1640,7 @@ output) for that.)}
   \def\maincolor{\rgbBlack}
   \pdfsetcolor{\maincolor}
   \edef\thiscolor{\maincolor}
-  \def\lastcolordefs{}
+  \def\currentcolordefs{}
   %
   \def\makefootline{%
     \baselineskip24pt
@@ -1695,9 +1722,13 @@ output) for that.)}
       % Therefore, we read toc only once.
       %
       % We use node names as destinations.
+      %
+      % Currently we prefix the section name with the section number
+      % for chapter and appendix headings only in order to avoid too much
+      % horizontal space being required in the PDF viewer.
       \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
-        \dopdfoutline{##1}{1}{##3}{##4}}%
+        \dopdfoutline{##2 ##1}{1}{##3}{##4}}%
       \def\numsecentry##1##2##3##4{%
         \dopdfoutline{##1}{2}{##3}{##4}}%
       \def\numsubsecentry##1##2##3##4{%
@@ -1709,7 +1740,8 @@ output) for that.)}
       \let\appsecentry\numsecentry%
       \let\appsubsecentry\numsubsecentry%
       \let\appsubsubsecentry\numsubsubsecentry%
-      \let\unnchapentry\numchapentry%
+      \def\unnchapentry##1##2##3##4{%
+        \dopdfoutline{##1}{1}{##3}{##4}}%
       \let\unnsecentry\numsecentry%
       \let\unnsubsecentry\numsubsecentry%
       \let\unnsubsubsecentry\numsubsubsecentry%
@@ -1838,19 +1870,23 @@ output) for that.)}
       \closein 1
     \endgroup
     %
-    \def\xetexpdfext{pdf}%
-    \ifx\xeteximgext\xetexpdfext
-      \XeTeXpdffile "#1".\xeteximgext ""
-    \else
-      \def\xetexpdfext{PDF}%
+    % Putting an \hbox around the image can prevent an over-long line
+    % after the image.
+    \hbox\bgroup
+      \def\xetexpdfext{pdf}%
       \ifx\xeteximgext\xetexpdfext
         \XeTeXpdffile "#1".\xeteximgext ""
       \else
-        \XeTeXpicfile "#1".\xeteximgext ""
+        \def\xetexpdfext{PDF}%
+        \ifx\xeteximgext\xetexpdfext
+          \XeTeXpdffile "#1".\xeteximgext ""
+        \else
+          \XeTeXpicfile "#1".\xeteximgext ""
+        \fi
       \fi
-    \fi
-    \ifdim \wd0 >0pt width \xeteximagewidth \fi
-    \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+      \ifdim \wd0 >0pt width \xeteximagewidth \fi
+      \ifdim \wd2 >0pt height \xeteximageheight \fi \relax
+    \egroup
   }
 \fi
 
@@ -2205,7 +2241,7 @@ end
 % A few fonts for @defun names and args.
 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
-\setfont\defsl\slshape{10}{\magstep1}{OT1TT}
+\setfont\defsl\slshape{10}{\magstep1}{OT1}
 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
 \let\ttslfont=\defttsl \let\slfont=\defsl \bf}
@@ -2353,7 +2389,7 @@ end
 % A few fonts for @defun names and args.
 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
-\setfont\defsl\slshape{10}{\magstephalf}{OT1TT}
+\setfont\defsl\slshape{10}{\magstephalf}{OT1}
 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
 \def\df{\let\ttfont=\deftt \let\bffont = \defbf
 \let\slfont=\defsl \let\ttslfont=\defttsl \bf}
@@ -2522,7 +2558,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\tt{\fam=\ttfam \setfontstyle{tt}}\def\ttstylename{tt}
 
 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
 % So we set up a \sf.
@@ -2648,8 +2684,6 @@ end
 \definetextfontsizexi
 
 
-\message{markup,}
-
 % 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
@@ -2657,68 +2691,14 @@ end
 %
 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
 
-% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
-% define and register \INITMACRO to be called on markup style changes.
-% \INITMACRO can check \currentmarkupstyle for the innermost
-% style.
-
-\let\currentmarkupstyle\empty
-
-\def\setupmarkupstyle#1{%
-  \def\currentmarkupstyle{#1}%
-  \markupstylesetup
-}
-
-\let\markupstylesetup\empty
-
-\def\defmarkupstylesetup#1{%
-  \expandafter\def\expandafter\markupstylesetup
-    \expandafter{\markupstylesetup #1}%
-  \def#1%
-}
-
-% Markup style setup for left and right quotes.
-\defmarkupstylesetup\markupsetuplq{%
-  \expandafter\let\expandafter \temp
-    \csname markupsetuplq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
-}
-
-\defmarkupstylesetup\markupsetuprq{%
-  \expandafter\let\expandafter \temp
-    \csname markupsetuprq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
-}
-
 {
 \catcode`\'=\active
 \catcode`\`=\active
 
-\gdef\markupsetuplqdefault{\let`\lq}
-\gdef\markupsetuprqdefault{\let'\rq}
-
-\gdef\markupsetcodequoteleft{\let`\codequoteleft}
-\gdef\markupsetcodequoteright{\let'\codequoteright}
+\gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
+\gdef\setregularquotes{\let`\lq \let'\rq}
 }
 
-\let\markupsetuplqcode \markupsetcodequoteleft
-\let\markupsetuprqcode \markupsetcodequoteright
-%
-\let\markupsetuplqexample \markupsetcodequoteleft
-\let\markupsetuprqexample \markupsetcodequoteright
-%
-\let\markupsetuplqkbd     \markupsetcodequoteleft
-\let\markupsetuprqkbd     \markupsetcodequoteright
-%
-\let\markupsetuplqsamp \markupsetcodequoteleft
-\let\markupsetuprqsamp \markupsetcodequoteright
-%
-\let\markupsetuplqverb \markupsetcodequoteleft
-\let\markupsetuprqverb \markupsetcodequoteright
-%
-\let\markupsetuplqverbatim \markupsetcodequoteleft
-\let\markupsetuprqverbatim \markupsetcodequoteright
-
 % 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
@@ -2756,7 +2736,7 @@ end
 }
 
 % Commands to set the quote options.
-% 
+%
 \parseargdef\codequoteundirected{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -2797,7 +2777,7 @@ end
 % If we are in a monospaced environment, however, 1) always use \ttsl,
 % and 2) do not add an italic correction.
 \def\dosmartslant#1#2{%
-  \ifusingtt 
+  \ifusingtt
     {{\ttsl #2}\let\next=\relax}%
     {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
   \next
@@ -2876,12 +2856,12 @@ end
 
 % @t, explicit typewriter.
 \def\t#1{%
-  {\tt \rawbackslash \plainfrenchspacing #1}%
+  {\tt \plainfrenchspacing #1}%
   \null
 }
 
 % @samp.
-\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+\def\samp#1{{\setcodequotes\lq\tclose{#1}\rq\null}}
 
 % @indicateurl is \samp, that is, with quotes.
 \let\indicateurl=\samp
@@ -2903,7 +2883,6 @@ end
     % Turn off hyphenation.
     \nohyphenation
     %
-    \rawbackslash
     \plainfrenchspacing
     #1%
   }%
@@ -2925,8 +2904,7 @@ end
   \global\let'=\rq \global\let`=\lq  % default definitions
   %
   \global\def\code{\begingroup
-    \setupmarkupstyle{code}%
-    % The following should really be moved into \setupmarkupstyle handlers.
+    \setcodequotes
     \catcode\dashChar=\active  \catcode\underChar=\active
     \ifallowcodebreaks
      \let-\codedash
@@ -2945,14 +2923,14 @@ end
   \gdef\codedash{\futurelet\next\codedashfinish}
   \gdef\codedashfinish{%
     \normaldash % always output the dash character itself.
-    % 
+    %
     % Now, output a discretionary to allow a line break, unless
     % (a) the next character is a -, or
     % (b) the preceding character is a -.
     % 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\codedashprev\codedash
       \else \discretionary{}{}{}\fi
     \fi
     % we need the space after the = for the case when \next itself is a
@@ -3014,10 +2992,18 @@ end
 % arg (if given), and not the url (which is then just the link target).
 \newif\ifurefurlonlylink
 
+% The default \pretolerance setting stops the penalty inserted in
+% \urefallowbreak being a discouragement to line breaking.  Set it to
+% a negative value for this paragraph only.  Hopefully this does not
+% conflict with redefinitions of \par done elsewhere.
+\def\nopretolerance{%
+\pretolerance=-1
+\def\par{\endgraf\pretolerance=100 \let\par\endgraf}%
+}
+
 % The main macro is \urefbreak, which allows breaking at expected
-% places within the url.  (There used to be another version, which
-% didn't support automatic breaking.)
-\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+% places within the url.
+\def\urefbreak{\nopretolerance \begingroup \urefcatcodes \dourefbreak}
 \let\uref=\urefbreak
 %
 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
@@ -3034,7 +3020,7 @@ end
         % For pdfTeX and LuaTeX
         \ifurefurlonlylink
           % PDF plus option to not display url, show just arg
-          \unhbox0             
+          \unhbox0
         \else
           % PDF, normally display both arg and url for consistency,
           % visibility, if the pdf is eventually used to print, etc.
@@ -3047,7 +3033,7 @@ end
           % For XeTeX
           \ifurefurlonlylink
             % PDF plus option to not display url, show just arg
-            \unhbox0             
+            \unhbox0
           \else
             % PDF, normally display both arg and url for consistency,
             % visibility, if the pdf is eventually used to print, etc.
@@ -3072,7 +3058,7 @@ end
   \urefcatcodes
   %
   \global\def\urefcode{\begingroup
-    \setupmarkupstyle{code}%
+    \setcodequotes
     \urefcatcodes
     \let&\urefcodeamp
     \let.\urefcodedot
@@ -3090,41 +3076,33 @@ end
   \global\def/{\normalslash}
 }
 
-% we put a little stretch before and after the breakable chars, to help
-% line breaking of long url's.  The unequal skips make look better in
-% cmtt at least, especially for dots.
-\def\urefprestretchamount{.13em}
-\def\urefpoststretchamount{.1em}
-\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax}
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax}
-%
-\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
-\def\urefcodedot{\urefprestretch .\urefpoststretch}
-\def\urefcodehash{\urefprestretch \#\urefpoststretch}
-\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeamp{\urefprebreak \&\urefpostbreak}
+\def\urefcodedot{\urefprebreak .\urefpostbreak}
+\def\urefcodehash{\urefprebreak \#\urefpostbreak}
+\def\urefcodequest{\urefprebreak ?\urefpostbreak}
 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
 {
   \catcode`\/=\active
   \global\def\urefcodeslashfinish{%
-    \urefprestretch \slashChar
+    \urefprebreak \slashChar
     % Allow line break only after the final / in a sequence of
     % slashes, to avoid line break between the slashes in http://.
-    \ifx\next/\else \urefpoststretch \fi
+    \ifx\next/\else \urefpostbreak \fi
   }
 }
 
-% One more complication: by default we'll break after the special
-% characters, but some people like to break before the special chars, so
-% allow that.  Also allow no breaking at all, for manual control.
-% 
+% By default we'll break after the special characters, but some people like to
+% break before the special chars, so allow that.  Also allow no breaking at
+% all, for manual control.
+%
 \parseargdef\urefbreakstyle{%
   \def\txiarg{#1}%
   \ifx\txiarg\wordnone
     \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
   \else\ifx\txiarg\wordbefore
-    \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+    \def\urefprebreak{\urefallowbreak}\def\urefpostbreak{\nobreak}
   \else\ifx\txiarg\wordafter
-    \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+    \def\urefprebreak{\nobreak}\def\urefpostbreak{\urefallowbreak}
   \else
     \errhelp = \EMsimple
     \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
@@ -3134,6 +3112,19 @@ end
 \def\wordbefore{before}
 \def\wordnone{none}
 
+% Allow a ragged right output to aid breaking long URL's.  There can
+% be a break at the \allowbreak with no extra glue (if the existing stretch in
+% the line is sufficient), a break at the \penalty with extra glue added
+% at the end of the line, or no break at all here.
+%   Changing the value of the penalty and/or the amount of stretch affects how
+% preferable one choice is over the other.
+\def\urefallowbreak{%
+  \penalty0\relax
+  \hskip 0pt plus 2 em\relax
+  \penalty1000\relax
+  \hskip 0pt plus -2 em\relax
+}
+
 \urefbreakstyle after
 
 % @url synonym for @uref, since that's how everyone uses it.
@@ -3144,7 +3135,7 @@ end
 % So now @email is just like @uref, unless we are pdf.
 %
 %\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
+\ifpdforxetex
   \def\email#1{\doemail#1,,\finish}
   \def\doemail#1,#2,#3\finish{\begingroup
     \unsepspaces
@@ -3154,18 +3145,7 @@ end
     \endlink
   \endgroup}
 \else
-  \ifx\XeTeXrevision\thisisundefined
-    \let\email=\uref
-  \else
-    \def\email#1{\doemail#1,,\finish}
-    \def\doemail#1,#2,#3\finish{\begingroup
-      \unsepspaces
-      \pdfurl{mailto:#1}%
-      \setbox0 = \hbox{\ignorespaces #2}%
-      \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
-      \endlink
-    \endgroup}
-  \fi
+  \let\email=\uref
 \fi
 
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
@@ -3199,8 +3179,8 @@ end
 \def\kbdsub#1#2#3\par{%
   \def\one{#1}\def\three{#3}\def\threex{??}%
   \ifx\one\xkey\ifx\threex\three \key{#2}%
-  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setcodequotes\look}}\fi
+  \else{\tclose{\kbdfont\setcodequotes\look}}\fi
 }
 
 % definition of @key that produces a lozenge.  Doesn't adjust to text size.
@@ -3217,7 +3197,7 @@ end
 % monospace, don't change it; that way, we respect @kbdinputstyle.  But
 % if it isn't monospace, then use \tt.
 %
-\def\key#1{{\setupmarkupstyle{key}%
+\def\key#1{{\setregularquotes
   \nohyphenation
   \ifmonospace\else\tt\fi
   #1}\null}
@@ -3338,10 +3318,33 @@ end
 \def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi}
 \def\finishsup#1{$\ptexsp{\hbox{\switchtolllsize #1}}$}%
 
+% provide this command from LaTeX as it is very common
+\def\frac#1#2{{{#1}\over{#2}}}
+
+% @displaymath.
+% \globaldefs is needed to recognize the end lines in \tex and
+% \end tex.  Set \thisenv as @end displaymath is seen before @end tex.
+{\obeylines
+\globaldefs=1
+\envdef\displaymath{%
+\tex%
+\def\thisenv{\displaymath}%
+\begingroup\let\end\displaymathend%
+$$%
+}
+
+\def\displaymathend{$$\endgroup\end}%
+
+\def\Edisplaymath{%
+\def\thisenv{\tex}%
+\end tex
+}}
+
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
-% 
+%
 \def\outfmtnametex{tex}
 %
 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
@@ -3349,7 +3352,7 @@ end
   \def\inlinefmtname{#1}%
   \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
 }
-% 
+%
 % @inlinefmtifelse{FMTNAME,THEN-TEXT,ELSE-TEXT} expands THEN-TEXT if
 % FMTNAME is tex, else ELSE-TEXT.
 \long\def\inlinefmtifelse#1{\doinlinefmtifelse #1,,,\finish}
@@ -3365,7 +3368,7 @@ end
 % *right* brace they would have to use a command anyway, so they may as
 % well use a command to get a left brace too.  We could re-use the
 % delimiter character idea from \verb, but it seems like overkill.
-% 
+%
 \long\def\inlineraw{\tex \doinlineraw}
 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
 \def\doinlinerawtwo#1,#2,\finish{%
@@ -3542,7 +3545,7 @@ end
 
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
-\def\pounds{{\it\$}}
+\def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi}
 
 % @euro{} comes from a separate font, depending on the current style.
 % We use the free feym* fonts from the eurosym package by Henrik
@@ -3642,7 +3645,7 @@ end
 % for non-CM glyphs.  That is ec* for regular text and tc* for the text
 % companion symbols (LaTeX TS1 encoding).  Both are part of the ec
 % package and follow the same conventions.
-% 
+%
 \def\ecfont{\etcfont{e}}
 \def\tcfont{\etcfont{t}}
 %
@@ -3691,11 +3694,19 @@ end
 \fi
 
 % Quotes.
-\chardef\quotedblleft="5C
-\chardef\quotedblright=`\"
 \chardef\quoteleft=`\`
 \chardef\quoteright=`\'
 
+% 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
+}
+
+\def\quotedblright{%
+  \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi
+}
+
 
 \message{page headings,}
 
@@ -3714,7 +3725,7 @@ end
               after the title page.}}%
 \def\setshortcontentsaftertitlepage{%
   \errmessage{@setshortcontentsaftertitlepage has been removed as a Texinfo
-              command; move your @shortcontents and @contents commands if you 
+              command; move your @shortcontents and @contents commands if you
               want the contents after the title page.}}%
 
 \parseargdef\shorttitlepage{%
@@ -3769,7 +3780,7 @@ end
 % don't worry much about spacing, ragged right.  This should be used
 % inside a \vbox, and fonts need to be set appropriately first. \par should
 % be specified before the end of the \vbox, since a vbox is a group.
-% 
+%
 \def\raggedtitlesettings{%
   \rm
   \hyphenpenalty=10000
@@ -3817,12 +3828,19 @@ end
 
 \newtoks\evenheadline    % headline on even pages
 \newtoks\oddheadline     % headline on odd pages
+\newtoks\evenchapheadline% headline on even pages with a new chapter
+\newtoks\oddchapheadline % headline on odd pages with a new chapter
 \newtoks\evenfootline    % footline on even pages
 \newtoks\oddfootline     % footline on odd pages
 
 % Now make \makeheadline and \makefootline in Plain TeX use those variables
-\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
-                            \else \the\evenheadline \fi}}
+\headline={{\textfonts\rm
+            \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}
 \let\HEADINGShook=\relax
@@ -3838,12 +3856,14 @@ end
 \def\evenheading{\parsearg\evenheadingxxx}
 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
 \def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
-\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+  \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}
+  \global\evenchapheadline=\evenheadline}
 
 \def\oddheading{\parsearg\oddheadingxxx}
 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
 \def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
-\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+  \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+  \global\oddchapheadline=\oddheadline}
 
 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
 
@@ -3910,37 +3930,34 @@ end
 \parseargdef\headings{\csname HEADINGS#1\endcsname}
 
 \def\headingsoff{% non-global headings elimination
-  \evenheadline={\hfil}\evenfootline={\hfil}%
-   \oddheadline={\hfil}\oddfootline={\hfil}%
+  \evenheadline={\hfil}\evenfootline={\hfil}\evenchapheadline={\hfil}%
+   \oddheadline={\hfil}\oddfootline={\hfil}\oddchapheadline={\hfil}%
 }
 
 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
 \HEADINGSoff  % it's the default
 
 % When we turn headings on, set the page number to 1.
+\def\pageone{
+  \global\pageno=1
+  \global\arabiccount = \pagecount
+}
+
 % 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{%
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapterheading\hfil\folio}}
-\global\let\contentsalignmacro = \chapoddpage
+\pageone
+\HEADINGSdoublex
 }
 \let\contentsalignmacro = \chappager
 
 % For single-sided printing, chapter title goes across top left of page,
 % page number on top right.
 \def\HEADINGSsingle{%
-\global\pageno=1
-\global\evenfootline={\hfil}
-\global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapterheading\hfil\folio}}
-\global\oddheadline={\line{\thischapterheading\hfil\folio}}
-\global\let\contentsalignmacro = \chappager
+\pageone
+\HEADINGSsinglex
 }
 \def\HEADINGSon{\HEADINGSdouble}
 
@@ -3950,7 +3967,9 @@ end
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
 \global\evenheadline={\line{\folio\hfil\thistitle}}
-\global\oddheadline={\line{\thischapterheading\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenchapheadline={\line{\folio\hfil}}
+\global\oddchapheadline={\line{\hfil\folio}}
 \global\let\contentsalignmacro = \chapoddpage
 }
 
@@ -3958,8 +3977,22 @@ end
 \def\HEADINGSsinglex{%
 \global\evenfootline={\hfil}
 \global\oddfootline={\hfil}
-\global\evenheadline={\line{\thischapterheading\hfil\folio}}
-\global\oddheadline={\line{\thischapterheading\hfil\folio}}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenchapheadline={\line{\hfil\folio}}
+\global\oddchapheadline={\line{\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% for @setchapternewpage off
+\def\HEADINGSsinglechapoff{%
+\pageone
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\evenchapheadline=\evenheadline
+\global\oddchapheadline=\oddheadline
 \global\let\contentsalignmacro = \chappager
 }
 
@@ -4268,82 +4301,8 @@ end
   \doitemize{#1.}\flushcr
 }
 
-% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
-% to @enumerate.
-%
-\def\alphaenumerate{\enumerate{a}}
-\def\capsenumerate{\enumerate{A}}
-\def\Ealphaenumerate{\Eenumerate}
-\def\Ecapsenumerate{\Eenumerate}
-
 
 % @multitable macros
-% Amy Hendrickson, 8/18/94, 3/6/96
-%
-% @multitable ... @end multitable will make as many columns as desired.
-% Contents of each column will wrap at width given in preamble.  Width
-% can be specified either with sample text given in a template line,
-% or in percent of \hsize, the current width of text on page.
-
-% Table can continue over pages but will only break between lines.
-
-% To make preamble:
-%
-% Either define widths of columns in terms of percent of \hsize:
-%   @multitable @columnfractions .25 .3 .45
-%   @item ...
-%
-%   Numbers following @columnfractions are the percent of the total
-%   current hsize to be used for each column. You may use as many
-%   columns as desired.
-
-
-% Or use a template:
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item ...
-%   using the widest term desired in each column.
-
-% Each new table line starts with @item, each subsequent new column
-% starts with @tab. Empty columns may be produced by supplying @tab's
-% with nothing between them for as many times as empty columns are needed,
-% ie, @tab@tab@tab will produce two empty columns.
-
-% @item, @tab do not need to be on their own lines, but it will not hurt
-% if they are.
-
-% Sample multitable:
-
-%   @multitable {Column 1 template} {Column 2 template} {Column 3 template}
-%   @item first col stuff @tab second col stuff @tab third col
-%   @item
-%   first col stuff
-%   @tab
-%   second col stuff
-%   @tab
-%   third col
-%   @item first col stuff @tab second col stuff
-%   @tab Many paragraphs of text may be used in any column.
-%
-%         They will wrap at the width determined by the template.
-%   @item@tab@tab This will be in third column.
-%   @end multitable
-
-% Default dimensions may be reset by user.
-% @multitableparskip is vertical space between paragraphs in table.
-% @multitableparindent is paragraph indent in table.
-% @multitablecolmargin is horizontal space to be left between columns.
-% @multitablelinespace is space to leave between table items, baseline
-%                                                            to baseline.
-%   0pt means it depends on current normal line spacing.
-%
-\newskip\multitableparskip
-\newskip\multitableparindent
-\newdimen\multitablecolspace
-\newskip\multitablelinespace
-\multitableparskip=0pt
-\multitableparindent=6pt
-\multitablecolspace=12pt
-\multitablelinespace=0pt
 
 % Macros used to set up halign preamble:
 %
@@ -4391,8 +4350,6 @@ end
   \go
 }
 
-% multitable-only commands.
-% 
 % @headitem starts a heading row, which we typeset in bold.  Assignments
 % have to be global since we are inside the implicit group of an
 % alignment entry.  \everycr below resets \everytab so we don't have to
@@ -4409,14 +4366,8 @@ end
 % default for tables with no headings.
 \let\headitemcrhook=\relax
 %
-% A \tab used to include \hskip1sp.  But then the space in a template
-% line is not enough.  That is bad.  So let's go back to just `&' until
-% we again encounter the problem the 1sp was intended to solve.
-%                                      --karl, nathan@acm.org, 20apr99.
 \def\tab{\checkenv\multitable &\the\everytab}%
 
-% @multitable ... @end multitable definitions:
-%
 \newtoks\everytab  % insert after every tab.
 %
 \envdef\multitable{%
@@ -4431,9 +4382,8 @@ end
   %
   \tolerance=9500
   \hbadness=9500
-  \setmultitablespacing
-  \parskip=\multitableparskip
-  \parindent=\multitableparindent
+  \parskip=0pt
+  \parindent=6pt
   \overfullrule=0pt
   \global\colcount=0
   %
@@ -4463,47 +4413,24 @@ end
   % continue for many paragraphs if desired.
   \halign\bgroup &%
     \global\advance\colcount by 1
-    \multistrut
+    \strut
     \vtop{%
-      % Use the current \colcount to find the correct column width:
+      \advance\hsize by -1\leftskip
+      % Find the correct column width
       \hsize=\expandafter\csname col\the\colcount\endcsname
       %
-      % In order to keep entries from bumping into each other
-      % we will add a \leftskip of \multitablecolspace to all columns after
-      % the first one.
-      %
-      % If a template has been used, we will add \multitablecolspace
-      % to the width of each template entry.
-      %
-      % If the user has set preamble in terms of percent of \hsize we will
-      % use that dimension as the width of the column, and the \leftskip
-      % will keep entries from bumping into each other.  Table will start at
-      % left margin and final column will justify at right margin.
-      %
-      % Make sure we don't inherit \rightskip from the outer environment.
       \rightskip=0pt
       \ifnum\colcount=1
-       % The first column will be indented with the surrounding text.
-       \advance\hsize by\leftskip
+        \advance\hsize by\leftskip % Add indent of surrounding text
       \else
-       \ifsetpercent \else
-         % If user has not set preamble in terms of percent of \hsize
-         % we will advance \hsize by \multitablecolspace.
-         \advance\hsize by \multitablecolspace
-       \fi
-       % In either case we will make \leftskip=\multitablecolspace:
-      \leftskip=\multitablecolspace
+        % In order to keep entries from bumping into each other.
+        \leftskip=12pt
+        \ifsetpercent \else
+          % If a template has been used
+          \advance\hsize by \leftskip
+        \fi
       \fi
-      % Ignoring space at the beginning and end avoids an occasional spurious
-      % blank line, when TeX decides to break the line at the space before the
-      % box from the multistrut, so the strut ends up on a line by itself.
-      % For example:
-      % @multitable @columnfractions .11 .89
-      % @item @code{#}
-      % @tab Legal holiday which is valid in major parts of the whole country.
-      % Is automatically provided with highlighting sequences respectively
-      % marking characters.
-      \noindent\ignorespaces##\unskip\multistrut
+      \noindent\ignorespaces##\unskip\strut
     }\cr
 }
 \def\Emultitable{%
@@ -4512,31 +4439,6 @@ end
   \global\setpercentfalse
 }
 
-\def\setmultitablespacing{%
-  \def\multistrut{\strut}% just use the standard line spacing
-  %
-  % Compute \multitablelinespace (if not defined by user) for use in
-  % \multitableparskip calculation.  We used define \multistrut based on
-  % this, but (ironically) that caused the spacing to be off.
-  % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
-\ifdim\multitablelinespace=0pt
-\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
-\global\advance\multitablelinespace by-\ht0
-\fi
-% Test to see if parskip is larger than space between lines of
-% table. If not, do nothing.
-%        If so, set to same dimension as multitablelinespace.
-\ifdim\multitableparskip>\multitablelinespace
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
-                                      % than skip between lines in the table.
-\fi%
-\ifdim\multitableparskip=0pt
-\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
-                                      % than skip between lines in the table.
-\fi}
-
 
 \message{conditionals,}
 
@@ -4699,19 +4601,6 @@ end
   }
 }
 
-% We have this subroutine so that we can handle at least some @value's
-% properly in indexes (we call \makevalueexpandable in \indexdummies).
-% The command has to be fully expandable (if the variable is set), since
-% the result winds up in the index file.  This means that if the
-% variable's value contains other Texinfo commands, it's almost certain
-% it will fail (although perhaps we could fix that with sufficient work
-% to do a one-level expansion on the result, instead of complete).
-% 
-% Unfortunately, this has the consequence that when _ is in the *value*
-% of an @set, it does not print properly in the roman fonts (get the cmr
-% dot accent at position 126 instead).  No fix comes to mind, and it's
-% been this way since 2003 or earlier, so just ignore it.
-% 
 \def\expandablevalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
     {[No value for ``#1'']}%
@@ -4724,13 +4613,13 @@ end
 % Like \expandablevalue, but completely expandable (the \message in the
 % definition above operates at the execution level of TeX).  Used when
 % writing to auxiliary files, due to the expansion that \write does.
-% If flag is undefined, pass through an unexpanded @value command: maybe it 
+% If flag is undefined, pass through an unexpanded @value command: maybe it
 % will be set by the time it is read back in.
 %
 % NB flag names containing - or _ may not work here.
 \def\dummyvalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
-    \noexpand\value{#1}%
+    \string\value{#1}%
   \else
     \csname SET#1\endcsname
   \fi
@@ -4740,7 +4629,7 @@ end
 % if possible, otherwise sort late.
 \def\indexnofontsvalue#1{%
   \expandafter\ifx\csname SET#1\endcsname\relax
-    ZZZZZZZ
+    ZZZZZZZ%
   \else
     \csname SET#1\endcsname
   \fi
@@ -4748,7 +4637,7 @@ end
 
 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
 % with @set.
-% 
+%
 % To get the special treatment we need for `@end ifset,' we call
 % \makecond and then redefine.
 %
@@ -4781,7 +4670,7 @@ end
 % without the @) is in fact defined.  We can only feasibly check at the
 % TeX level, so something like `mathcode' is going to considered
 % defined even though it is not a Texinfo command.
-% 
+%
 \makecond{ifcommanddefined}
 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
 %
@@ -4887,32 +4776,18 @@ end
 
 % like the previous two, but they put @code around the argument.
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
-\def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
+\def\docodeindexxxx #1{\docind{\indexname}{#1}}
 
-\f
-% Used when writing an index entry out to an index file to prevent
-% expansion of Texinfo commands that can appear in an index entry.
-%
-\def\indexdummies{%
-  \escapechar = `\\     % use backslash in output files.
-  \definedummyletter\@%
-  \definedummyletter\ %
-  %
-  % For texindex which always views { and } as separators.
-  \def\{{\lbracechar{}}%
-  \def\}{\rbracechar{}}%
-  %
-  % Do the redefinitions.
-  \definedummies
-}
 
-% Used for the aux and toc files, where @ is the escape character.
+% 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
@@ -4936,8 +4811,7 @@ end
 \def\definedummyletter#1{\def#1{\string#1}}%
 \let\definedummyaccent\definedummyletter
 
-% Called from \indexdummies and \atdummies, to effectively prevent
-% the expansion of commands.
+% Called from \atdummies to prevent the expansion of commands.
 %
 \def\definedummies{%
   %
@@ -4984,8 +4858,10 @@ end
   \definedummyword\TeX
   %
   % Assorted special characters.
+  \definedummyword\ampchar
   \definedummyword\atchar
   \definedummyword\arrow
+  \definedummyword\backslashchar
   \definedummyword\bullet
   \definedummyword\comma
   \definedummyword\copyright
@@ -5022,6 +4898,8 @@ end
   \definedummyword\sup
   \definedummyword\textdegree
   %
+  \definedummyword\subentry
+  %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
   \let\value\dummyvalue
@@ -5102,11 +4980,10 @@ end
   \commondummyword\xref
 }
 
-% For testing: output @{ and @} in index sort strings as \{ and \}.
-\newif\ifusebracesinindexes
-
 \let\indexlbrace\relax
 \let\indexrbrace\relax
+\let\indexatchar\relax
+\let\indexbackslash\relax
 
 {\catcode`\@=0
 \catcode`\\=13
@@ -5140,10 +5017,8 @@ end
   }
 
   \gdef\indexnonalnumreappear{%
-    \useindexbackslash
     \let-\normaldash
     \let<\normalless
-    \def\@{@}%
   }
 }
 
@@ -5198,43 +5073,44 @@ end
   \def\ss{ss}%
   \def\th{th}%
   %
-  \def\LaTeX{LaTeX}%
-  \def\TeX{TeX}%
-  %
-  % Assorted special characters.  \defglyph gives the control sequence a
-  % definition that removes the {} that follows its use.
-  \defglyph\atchar{@}%
-  \defglyph\arrow{->}%
-  \defglyph\bullet{bullet}%
-  \defglyph\comma{,}%
-  \defglyph\copyright{copyright}%
-  \defglyph\dots{...}%
-  \defglyph\enddots{...}%
-  \defglyph\equiv{==}%
-  \defglyph\error{error}%
-  \defglyph\euro{euro}%
-  \defglyph\expansion{==>}%
-  \defglyph\geq{>=}%
-  \defglyph\guillemetleft{<<}%
-  \defglyph\guillemetright{>>}%
-  \defglyph\guilsinglleft{<}%
-  \defglyph\guilsinglright{>}%
-  \defglyph\leq{<=}%
-  \defglyph\lbracechar{\{}%
-  \defglyph\minus{-}%
-  \defglyph\point{.}%
-  \defglyph\pounds{pounds}%
-  \defglyph\print{-|}%
-  \defglyph\quotedblbase{"}%
-  \defglyph\quotedblleft{"}%
-  \defglyph\quotedblright{"}%
-  \defglyph\quoteleft{`}%
-  \defglyph\quoteright{'}%
-  \defglyph\quotesinglbase{,}%
-  \defglyph\rbracechar{\}}%
-  \defglyph\registeredsymbol{R}%
-  \defglyph\result{=>}%
-  \defglyph\textdegree{o}%
+  \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.
@@ -5249,41 +5125,38 @@ end
   \macrolist
   \let\value\indexnofontsvalue
 }
-\def\defglyph#1#2{\def#1##1{#2}} % see above
-
-\f
 
+% 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}}%
 
-\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
 
-% Most index entries go through here, but \dosubind is the general case.
-% #1 is the index name, #2 is the entry text.
-\def\doind#1#2{\dosubind{#1}{#2}{}}
 
-% There is also \dosubind {index}{topic}{subtopic}
-% which makes an entry in a two-level index such as the operation index.
-% TODO: Two-level index?  Operation index?
 
-% Workhorse for all indexes.
-% #1 is name of index, #2 is stuff to put there, #3 is subentry --
-% empty if called from \doind, as we usually are (the main exception
-% is with most defuns, which call us directly).
-%
-\def\dosubind#1#2#3{%
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{%
   \iflinks
   {%
+    %
     \requireopenindexfile{#1}%
-    % Store the main index entry text (including the third arg).
-    \toks0 = {#2}%
-    % If third arg is present, precede it with a space.
-    \def\thirdarg{#3}%
-    \ifx\thirdarg\empty \else
-      \toks0 = \expandafter{\the\toks0 \space #3}%
-    \fi
+    \edef\writeto{\csname#1indfile\endcsname}%
     %
+    \def\indextext{#2}%
+    \safewhatsit\doindwrite
+  }%
+  \fi
+}
+
+% Same as \doind, but for code indices
+\def\docind#1#2{%
+  \iflinks
+  {%
+    %
+    \requireopenindexfile{#1}%
     \edef\writeto{\csname#1indfile\endcsname}%
     %
-    \safewhatsit\dosubindwrite
+    \def\indextext{#2}%
+    \safewhatsit\docindwrite
   }%
   \fi
 }
@@ -5298,28 +5171,14 @@ end
   \ifx\suffix\indexisfl\def\suffix{f1}\fi
   % Open the file
   \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
-  % Using \immediate above here prevents an object entering into the current 
+  % Using \immediate above here prevents an object entering into the current
   % box, which could confound checks such as those in \safewhatsit for
   % preceding skips.
   \typeout{Writing index file \jobname.\suffix}%
 \fi}
 \def\indexisfl{fl}
 
-% Output \ as {\indexbackslash}, because \ is an escape character in
-% the index files.
-\let\indexbackslash=\relax
-{\catcode`\@=0 \catcode`\\=\active
-  @gdef@useindexbackslash{@def\{{@indexbackslash}}}
-}
-
-% Definition for writing index entry text.
-\def\sortas#1{\ignorespaces}%
-
-% Definition for writing index entry sort key.  Should occur at the at
-% the beginning of the index entry, like
-%     @cindex @sortas{september} \september
-% The \ignorespaces takes care of following space, but there's no way
-% to remove space before it.
+% Definition for writing index entry sort key.
 {
 \catcode`\-=13
 \gdef\indexwritesortas{%
@@ -5330,51 +5189,158 @@ end
   \xdef\indexsortkey{#1}\endgroup}
 }
 
+\def\indexwriteseealso#1{
+  \gdef\pagenumbertext{\string\seealso{#1}}%
+}
+\def\indexwriteseeentry#1{
+  \gdef\pagenumbertext{\string\seeentry{#1}}%
+}
+
+% The default definitions
+\def\sortas#1{}%
+\def\seealso#1{\i{\putwordSeeAlso}\ #1}% for sorted index file only
+\def\putwordSeeAlso{See also}
+\def\seeentry#1{\i{\putwordSee}\ #1}% for sorted index file only
+
 
-% Write the entry in \toks0 to the index file.
+% Given index entry text like "aaa @subentry bbb @sortas{ZZZ}":
+%   * Set \bracedtext to "{aaa}{bbb}"
+%   * Set \fullindexsortkey to "aaa @subentry ZZZ"
+%   * If @seealso occurs, set \pagenumbertext
 %
-\def\dosubindwrite{%
-  % Put the index entry in the margin if desired.
-  \ifx\SETmarginindex\relax\else
-    \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+\def\splitindexentry#1{%
+  \gdef\fullindexsortkey{}%
+  \xdef\bracedtext{}%
+  \def\sep{}%
+  \def\seealso##1{}%
+  \def\seeentry##1{}%
+  \expandafter\doindexsegment#1\subentry\finish\subentry
+}
+
+% append the results from the next segment
+\def\doindexsegment#1\subentry{%
+  \def\segment{#1}%
+  \ifx\segment\isfinish
+  \else
+    %
+    % Fully expand the segment, throwing away any @sortas directives, and
+    % trim spaces.
+    \edef\trimmed{\segment}%
+    \edef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
+    \ifincodeindex
+      \edef\trimmed{\noexpand\code{\trimmed}}%
+    \fi
+    %
+    \xdef\bracedtext{\bracedtext{\trimmed}}%
+    %
+    % Get the string to sort by.  Process the segment with all
+    % font commands turned off.
+    \bgroup
+      \let\sortas\indexwritesortas
+      \let\seealso\indexwriteseealso
+      \let\seeentry\indexwriteseeentry
+      \indexnofonts
+      % The braces around the commands are recognized by texindex.
+      \def\lbracechar{{\string\indexlbrace}}%
+      \def\rbracechar{{\string\indexrbrace}}%
+      \let\{=\lbracechar
+      \let\}=\rbracechar
+      \def\@{{\string\indexatchar}}%
+      \def\atchar##1{\@}%
+      \def\backslashchar{{\string\indexbackslash}}%
+      \uccode`\~=`\\ \uppercase{\let~\backslashchar}%
+      %
+      \let\indexsortkey\empty
+      \global\let\pagenumbertext\empty
+      % Execute the segment and throw away the typeset output.  This executes
+      % any @sortas or @seealso commands in this segment.
+      \setbox\dummybox = \hbox{\segment}%
+      \ifx\indexsortkey\empty{%
+        \indexnonalnumdisappear
+        \xdef\trimmed{\segment}%
+        \xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
+        \xdef\indexsortkey{\trimmed}%
+        \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
+      }\fi
+      %
+      % Append to \fullindexsortkey.
+      \edef\tmp{\gdef\noexpand\fullindexsortkey{%
+                  \fullindexsortkey\sep\indexsortkey}}%
+      \tmp
+    \egroup
+    \def\sep{\subentry}%
+    %
+    \expandafter\doindexsegment
   \fi
+}
+\def\isfinish{\finish}%
+\newbox\dummybox % used above
+
+\let\subentry\relax
+
+% Use \ instead of @ in index files.  To support old texi2dvi and texindex.
+% This works without changing the escape character used in the toc or aux
+% files because the index entries are fully expanded here, and \string uses
+% the current value of \escapechar.
+\def\escapeisbackslash{\escapechar=`\\}
+
+% Use \ in index files by default.  texi2dvi didn't support @ as the escape
+% character (as it checked for "\entry" in the files, and not "@entry").  When
+% the new version of texi2dvi has had a chance to become more prevalent, then
+% the escape character can change back to @ again.  This should be an easy
+% change to make now because both @ and \ are only used as escape characters in
+% index files, never standing for themselves.
+%
+\set txiindexescapeisbackslash
+
+% Write the entry in \indextext to the index file.
+%
+
+\newif\ifincodeindex
+\def\doindwrite{\incodeindexfalse\doindwritex}
+\def\docindwrite{\incodeindextrue\doindwritex}
+
+\def\doindwritex{%
+  \maybemarginindex
   %
-  % Remember, we are within a group.
-  \indexdummies % Must do this here, since \bf, etc expand at this stage
-  \useindexbackslash % \indexbackslash isn't defined now so it will be output 
-                     % as is; and it will print as backslash.
-  % The braces around \indexbrace are recognized by texindex.
-  %
-  % Get the string to sort by, by processing the index entry with all
-  % font commands turned off.
-  {\indexnofonts
-   \def\lbracechar{{\indexlbrace}}%
-   \def\rbracechar{{\indexrbrace}}%
-   \let\{=\lbracechar
-   \let\}=\rbracechar
-   \indexnonalnumdisappear
-   \xdef\indexsortkey{}%
-   \let\sortas=\indexwritesortas
-   \edef\temp{\the\toks0}%
-   \setbox\dummybox = \hbox{\temp}% Make sure to execute any \sortas
-   \ifx\indexsortkey\empty
-     \xdef\indexsortkey{\temp}%
-     \ifx\indexsortkey\empty\xdef\indexsortkey{ }\fi
-   \fi
-  }%
+  \atdummies
+  %
+  \expandafter\ifx\csname SETtxiindexescapeisbackslash\endcsname\relax\else
+    \escapeisbackslash
+  \fi
+  %
+  % For texindex which always views { and } as separators.
+  \def\{{\lbracechar{}}%
+  \def\}{\rbracechar{}}%
+  \uccode`\~=`\\ \uppercase{\def~{\backslashchar{}}}%
+  %
+  % Split the entry into primary entry and any subentries, and get the index
+  % sort key.
+  \splitindexentry\indextext
   %
   % Set up the complete index entry, with both the sort key and
   % the original text, including any font commands.  We write
   % three arguments to \entry to the .?? file (four in the
   % subentry case), texindex reduces to two when writing the .??s
   % sorted result.
+  %
   \edef\temp{%
     \write\writeto{%
-      \string\entry{\indexsortkey}{\noexpand\folio}{\the\toks0}}%
+      \string\entry{\fullindexsortkey}%
+        {\ifx\pagenumbertext\empty\noexpand\folio\else\pagenumbertext\fi}%
+        \bracedtext}%
   }%
   \temp
 }
-\newbox\dummybox % used above
+
+% Put the index entry in the margin if desired (undocumented).
+\def\maybemarginindex{%
+  \ifx\SETmarginindex\relax\else
+    \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \relax\indextext}}%
+  \fi
+}
+\let\SETmarginindex=\relax
+
 
 % Take care of unwanted page breaks/skips around a whatsit:
 %
@@ -5462,9 +5428,14 @@ end
 %  \entry {topic}{pagelist}
 %     for a topic that is used without subtopics
 %  \primary {topic}
+%  \entry {topic}{}
 %     for the beginning of a topic that is used with subtopics
 %  \secondary {subtopic}{pagelist}
 %     for each subtopic.
+%  \secondary {subtopic}{}
+%     for a subtopic with sub-subtopics
+%  \tertiary {subtopic}{subsubtopic}{pagelist}
+%     for each sub-subtopic.
 
 % Define the user-accessible indexing commands
 % @findex, @vindex, @kindex, @cindex.
@@ -5476,11 +5447,6 @@ end
 \def\tindex {\tpindex}
 \def\pindex {\pgindex}
 
-\def\cindexsub {\begingroup\obeylines\cindexsub}
-{\obeylines %
-\gdef\cindexsub "#1" #2^^M{\endgroup %
-\dosubind{cp}{#2}{#1}}}
-
 % Define the macros used in formatting output of the sorted index material.
 
 % @printindex causes a particular index (the ??s file) to get printed.
@@ -5494,14 +5460,10 @@ end
   \plainfrenchspacing
   \everypar = {}% don't want the \kern\-parindent from indentation suppression.
   %
-  % See if the index file exists and is nonempty.
-  % Change catcode of @ here so that if the index file contains
-  % \initial {@}
-  % as its first line, TeX doesn't complain about mismatched braces
-  % (because it thinks @} is a control sequence).
-  \catcode`\@ = 12
   % See comment in \requireopenindexfile.
   \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
+  %
+  % See if the index file exists and is nonempty.
   \openin 1 \jobname.\indexname s
   \ifeof 1
     % \enddoublecolumns gets confused if there is no text in the index,
@@ -5511,8 +5473,6 @@ end
     \putwordIndexNonexistent
     \typeout{No file \jobname.\indexname s.}%
   \else
-    \catcode`\\ = 0
-    %
     % If the index file exists but is empty, then \openin leaves \ifeof
     % false.  We have to make TeX try to read something from the file, so
     % it can discover if there is anything in it.
@@ -5520,47 +5480,55 @@ end
     \ifeof 1
       \putwordIndexIsEmpty
     \else
-      % Index files are almost Texinfo source, but we use \ as the escape
-      % character.  It would be better to use @, but that's too big a change
-      % to make right now.
-      \def\indexbackslash{\ttbackslash}%
-      \let\indexlbrace\{   % Likewise, set these sequences for braces
-      \let\indexrbrace\}   % used in the sort key.
-      \begindoublecolumns
-      \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
-      %
-      % Read input from the index file line by line.
-      \loopdo
-        \ifeof1 \else
-          \read 1 to \nextline
-        \fi
-        %
-        \indexinputprocessing
-        \thisline
-        %
-        \ifeof1\else
-        \let\thisline\nextline
-      \repeat
-      %%
-      \enddoublecolumns
+      \expandafter\printindexzz\thisline\relax\relax\finish%
     \fi
   \fi
   \closein 1
 \endgroup}
-\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
-\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
 
-\def\indexinputprocessing{%
-  \ifeof1
-    \let\firsttoken\relax
+% If the index file starts with a backslash, forgo reading the index
+% file altogether.  If somebody upgrades texinfo.tex they may still have
+% 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
+    \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
+      \expandafter\ifx\csname SETtxiskipindexfileswithbackslash\endcsname\relax
+\errmessage{%
+ERROR: A sorted index file in an obsolete format was skipped.
+To fix this problem, please upgrade your version of 'texi2dvi'
+or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
+If you are using an old version of 'texindex' (part of the Texinfo
+distribution), you may also need to upgrade to a newer version (at least 6.0).
+You may be able to typeset the index if you run
+'texindex \jobname.\indexname' yourself.
+You could also try setting the 'txiindexescapeisbackslash' flag by
+running a command like
+'texi2dvi -t "@set txiindexescapeisbackslash" \jobname.texi'.  If you do
+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
-    \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
-    \act
+    \begindoublecolumns
+    \catcode`\\=0\relax
+    %
+    % Make @ an escape character to give macros a chance to work.  This
+    % should work because we (hopefully) don't otherwise use @ in index files.
+    %\catcode`\@=12\relax
+    \catcode`\@=0\relax
+    \input \jobname.\indexname s
+    \enddoublecolumns
   \fi
 }
-\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
-\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
-
 
 % These macros are used by the sorted index file itself.
 % Change them to control the appearance of the index.
@@ -5569,12 +5537,19 @@ end
 \catcode`\|=13 \catcode`\<=13 \catcode`\>=13 \catcode`\+=13 \catcode`\"=13
 \catcode`\$=3
 \gdef\initialglyphs{%
+  % special control sequences used in the index sort key
+  \let\indexlbrace\{%
+  \let\indexrbrace\}%
+  \let\indexatchar\@%
+  \def\indexbackslash{\math{\backslash}}%
+  %
   % Some changes for non-alphabetic characters.  Using the glyphs from the
   % math fonts looks more consistent than the typewriter font used elsewhere
   % for these characters.
-  \def\indexbackslash{\math{\backslash}}%
-  \let\\=\indexbackslash
+  \uccode`\~=`\\ \uppercase{\def~{\math{\backslash}}}
   %
+  % In case @\ is used for backslash
+  \uppercase{\let\\=~}
   % Can't get bold backslash so don't use bold forward slash
   \catcode`\/=13
   \def/{{\secrmnotbold \normalslash}}%
@@ -5604,7 +5579,7 @@ end
   % bottom of a column to reduce an increase in inter-line spacing.
   \nobreak
   \vskip 0pt plus 5\baselineskip
-  \penalty -300 
+  \penalty -300
   \vskip 0pt plus -5\baselineskip
   %
   % Typeset the initial.  Making this add up to a whole number of
@@ -5634,12 +5609,6 @@ end
 \def\entry{%
   \begingroup
     %
-    % For pdfTeX and XeTeX.
-    % The redefinition of \domark stops marks being added in \pdflink to 
-    % preserve coloured links across page boundaries.  Otherwise the marks
-    % would get in the way of \lastbox in \insertentrybox.
-    \let\domark\relax
-    %
     % Start a new paragraph if necessary, so our assignments below can't
     % affect previous text.
     \par
@@ -5672,35 +5641,31 @@ end
 \gdef\finishentry#1{%
     \egroup % end box A
     \dimen@ = \wd\boxA % Length of text of entry
-    \global\setbox\boxA=\hbox\bgroup\unhbox\boxA
-    % #1 is the page number.
-    %
-    % Get the width of the page numbers, and only use
-    % leaders if they are present.
-    \global\setbox\boxB = \hbox{#1}%
-    \ifdim\wd\boxB = 0pt
-      \null\nobreak\hfill\ %
-    \else
-      %
-      \null\nobreak\indexdotfill % Have leaders before the page number.
+    \global\setbox\boxA=\hbox\bgroup
+      \unhbox\boxA
+      % #1 is the page number.
       %
-      \ifpdf
-        \pdfgettoks#1.%
-        \hskip\skip\thinshrinkable\the\toksA
+      % Get the width of the page numbers, and only use
+      % leaders if they are present.
+      \global\setbox\boxB = \hbox{#1}%
+      \ifdim\wd\boxB = 0pt
+        \null\nobreak\hfill\ %
       \else
-        \ifx\XeTeXrevision\thisisundefined
-          \hskip\skip\thinshrinkable #1%
-        \else
+        %
+        \null\nobreak\indexdotfill % Have leaders before the page number.
+        %
+        \ifpdforxetex
           \pdfgettoks#1.%
           \hskip\skip\thinshrinkable\the\toksA
+        \else
+          \hskip\skip\thinshrinkable #1%
         \fi
       \fi
-    \fi
     \egroup % end \boxA
     \ifdim\wd\boxB = 0pt
-      \global\setbox\entrybox=\vbox{\unhbox\boxA}%
-    \else
-    \global\setbox\entrybox=\vbox\bgroup
+      \noindent\unhbox\boxA\par
+      \nobreak
+    \else\bgroup
       % We want the text of the entries to be aligned to the left, and the
       % page numbers to be aligned to the right.
       %
@@ -5730,7 +5695,7 @@ end
       \advance\dimen@ii by 1\dimen@i
       \ifdim\wd\boxA > \dimen@ii % If the entry doesn't fit in one line
       \ifdim\dimen@ > 0.8\dimen@ii   % due to long index text
-        % Try to split the text roughly evenly.  \dimen@ will be the length of 
+        % Try to split the text roughly evenly.  \dimen@ will be the length of
         % the first line.
         \dimen@ = 0.7\dimen@
         \dimen@ii = \hsize
@@ -5766,55 +5731,11 @@ end
     \egroup % The \vbox
     \fi
   \endgroup
-  \dotheinsertentrybox
 }}
 
 \newskip\thinshrinkable
 \skip\thinshrinkable=.15em minus .15em
 
-\newbox\entrybox
-\def\insertentrybox{%
-  \ourunvbox\entrybox
-}
-
-% default definition
-\let\dotheinsertentrybox\insertentrybox
-
-% Use \lastbox to take apart vbox box by box, and add each sub-box
-% to the current vertical list.
-\def\ourunvbox#1{%
-\bgroup % for local binding of \delayedbox
-  % Remove the last box from box #1
-  \global\setbox#1=\vbox{%
-    \unvbox#1%
-    \unskip % remove any glue
-    \unpenalty
-    \global\setbox\interbox=\lastbox
-  }%
-  \setbox\delayedbox=\box\interbox
-  \ifdim\ht#1=0pt\else
-    \ourunvbox#1 % Repeat on what's left of the box
-    \nobreak
-  \fi
-  \box\delayedbox
-\egroup
-}
-\newbox\delayedbox
-\newbox\interbox
-
-% Used from \printindex.  \firsttoken should be the first token
-% after the \entry.  If it's not another \entry, we are at the last
-% line of a group of index entries, so insert a penalty to discourage
-% widowed index entries.
-\def\dotheinsertentryboxwithpenalty{%
-  \ifx\firsttoken\isentry
-  \else
-    \penalty 9000
-  \fi
-  \insertentrybox
-}
-\def\isentry{\entry}%
-
 % Like plain.tex's \dotfill, except uses up at least 1 em.
 % The filll stretch here overpowers both the fil and fill stretch to push
 % the page number to the right.
@@ -5824,24 +5745,15 @@ end
 
 \def\primary #1{\line{#1\hfil}}
 
-\newskip\secondaryindent \secondaryindent=0.5cm
-\def\secondary#1#2{{%
-  \parfillskip=0in
-  \parskip=0in
-  \hangindent=1in
-  \hangafter=1
-  \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
-  \ifpdf
-    \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
-  \else
-    \ifx\XeTeXrevision\thisisundefined
-      #2
-    \else
-      \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
-    \fi
-  \fi
-  \par
-}}
+\def\secondary{\indententry{0.5cm}}
+\def\tertiary{\indententry{1cm}}
+
+\def\indententry#1#2#3{%
+  \bgroup
+  \leftskip=#1
+  \entry{#2}{#3}%
+  \egroup
+}
 
 % Define two-column mode, which we use to typeset indexes.
 % Adapted from the TeXbook, page 416, which is to say,
@@ -5851,60 +5763,21 @@ end
 \newbox\partialpage
 \newdimen\doublecolumnhsize
 
-% Use inside an output routine to save \topmark and \firstmark
-\def\savemarks{%
-  \global\savedtopmark=\expandafter{\topmark }%
-  \global\savedfirstmark=\expandafter{\firstmark }%
-}
-\newtoks\savedtopmark
-\newtoks\savedfirstmark
-
-% Set \topmark and \firstmark for next time \output runs.
-% Can't be run from withinside \output (because any material
-% added while an output routine is active, including 
-% penalties, is saved for after it finishes).  The page so far
-% should be empty, otherwise what's on it will be thrown away.
-\def\restoremarks{%
-  \mark{\the\savedtopmark}%
-  \bgroup\output = {%
-    \setbox\dummybox=\box\PAGE
-  }abc\eject\egroup
-  % "abc" because output routine doesn't fire for a completely empty page.
-  \mark{\the\savedfirstmark}%
-}
-
 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
   % If not much space left on page, start a new page.
   \ifdim\pagetotal>0.8\vsize\vfill\eject\fi
   %
   % Grab any single-column material above us.
   \output = {%
-    %
-    % Here is a possibility not foreseen in manmac: if we accumulate a
-    % whole lot of material, we might end up calling this \output
-    % routine twice in a row (see the doublecol-lose test, which is
-    % essentially a couple of indexes with @setchapternewpage off).  In
-    % that case we just ship out what is in \partialpage with the normal
-    % output routine.  Generally, \partialpage will be empty when this
-    % runs and this will be a no-op.  See the indexspread.tex test case.
-    \ifvoid\partialpage \else
-      \onepageout{\pagecontents\partialpage}%
-    \fi
+    \savetopmark
     %
     \global\setbox\partialpage = \vbox{%
       % Unvbox the main output page.
       \unvbox\PAGE
       \kern-\topskip \kern\baselineskip
     }%
-    \savemarks
   }%
   \eject % run that output routine to set \partialpage
-  \restoremarks
-  %
-  % We recover the two marks that the last output routine saved in order
-  % to propagate the information in marks added around a chapter heading,
-  % which could be otherwise be lost by the time the final page is output.
-  %
   %
   % Use the double-column output routine for subsequent pages.
   \output = {\doublecolumnout}%
@@ -5930,7 +5803,9 @@ end
     \divide\doublecolumnhsize by 2
   \hsize = \doublecolumnhsize
   %
-  % Double the \vsize as well.
+  % Get the available space for the double columns -- the normal
+  % (undoubled) page height minus any material left over from the
+  % previous page.
   \advance\vsize by -\ht\partialpage
   \vsize = 2\vsize
   %
@@ -5943,17 +5818,15 @@ end
 %
 \def\doublecolumnout{%
   %
+  \savetopmark
   \splittopskip=\topskip \splitmaxdepth=\maxdepth
-  % Get the available space for the double columns -- the normal
-  % (undoubled) page height minus any material left over from the
-  % previous page.
   \dimen@ = \vsize
   \divide\dimen@ by 2
   %
   % box0 will be the left-hand column, box2 the right.
   \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
   \global\advance\vsize by 2\ht\partialpage
-  \onepageout\pagesofar
+  \onepageout\pagesofar % empty except for the first time we are called
   \unvbox\PAGE
   \penalty\outputpenalty
 }
@@ -5969,7 +5842,7 @@ end
 }
 
 
-% Finished with with double columns.
+% Finished with double columns.
 \def\enddoublecolumns{%
   % The following penalty ensures that the page builder is exercised
   % _before_ we change the output routine.  This is necessary in the
@@ -6001,7 +5874,7 @@ end
   %
   \output = {%
     % Split the last of the double-column material.
-    \savemarks
+    \savetopmark
     \balancecolumns
   }%
   \eject % call the \output just set
@@ -6009,10 +5882,9 @@ end
     % Having called \balancecolumns once, we do not
     % want to call it again.  Therefore, reset \output to its normal
     % definition right away.
-    \global\output = {\onepageout{\pagecontents\PAGE}}%
+    \global\output=\expandafter{\the\defaultoutput}
     %
     \endgroup % started in \begindoublecolumns
-    \restoremarks
     % Leave the double-column material on the current page, no automatic
     % page break.
     \box\balancedcolumns
@@ -6031,18 +5903,19 @@ end
 \newbox\balancedcolumns
 \setbox\balancedcolumns=\vbox{shouldnt see this}%
 %
-% Only called for the last of the double column material.  \doublecolumnout 
+% Only called for the last of the double column material.  \doublecolumnout
 % does the others.
 \def\balancecolumns{%
   \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
   \dimen@ = \ht0
-  \advance\dimen@ by \topskip
-  \advance\dimen@ by-\baselineskip
-  \ifdim\dimen@<5\baselineskip
+  \ifdim\dimen@<7\baselineskip
     % Don't split a short final column in two.
     \setbox2=\vbox{}%
     \global\setbox\balancedcolumns=\vbox{\pagesofar}%
   \else
+    % double the leading vertical space
+    \advance\dimen@ by \topskip
+    \advance\dimen@ by-\baselineskip
     \divide\dimen@ by 2 % target to split to
     \dimen@ii = \dimen@
     \splittopskip = \topskip
@@ -6058,7 +5931,7 @@ end
     }%
     % Now the left column is in box 1, and the right column in box 3.
     %
-    % Check whether the left column has come out higher than the page itself.  
+    % Check whether the left column has come out higher than the page itself.
     % (Note that we have doubled \vsize for the double columns, so
     % the actual height of the page is 0.5\vsize).
     \ifdim2\ht1>\vsize
@@ -6177,11 +6050,9 @@ end
 
 % @raisesections: treat @section as chapter, @subsection as section, etc.
 \def\raisesections{\global\advance\secbase by -1}
-\let\up=\raisesections % original BFox name
 
 % @lowersections: treat @chapter as section, @section as subsection, etc.
 \def\lowersections{\global\advance\secbase by 1}
-\let\down=\lowersections % original BFox name
 
 % we only have subsub.
 \chardef\maxseclevel = 3
@@ -6357,7 +6228,7 @@ end
 \let\top\unnumbered
 
 % Sections.
-% 
+%
 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
 \def\seczzz#1{%
   \global\subsecno=0 \global\subsubsecno=0  \global\advance\secno by 1
@@ -6380,7 +6251,7 @@ end
 }
 
 % Subsections.
-% 
+%
 % normally calls numberedsubseczzz:
 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
 \def\numberedsubseczzz#1{%
@@ -6405,7 +6276,7 @@ end
 }
 
 % Subsubsections.
-% 
+%
 % normally numberedsubsubseczzz:
 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
 \def\numberedsubsubseczzz#1{%
@@ -6495,18 +6366,16 @@ end
 \def\CHAPPAGoff{%
 \global\let\contentsalignmacro = \chappager
 \global\let\pchapsepmacro=\chapbreak
-\global\let\pagealignmacro=\chappager}
+\global\def\HEADINGSon{\HEADINGSsinglechapoff}}
 
 \def\CHAPPAGon{%
 \global\let\contentsalignmacro = \chappager
 \global\let\pchapsepmacro=\chappager
-\global\let\pagealignmacro=\chappager
 \global\def\HEADINGSon{\HEADINGSsingle}}
 
 \def\CHAPPAGodd{%
 \global\let\contentsalignmacro = \chapoddpage
 \global\let\pchapsepmacro=\chapoddpage
-\global\let\pagealignmacro=\chapoddpage
 \global\def\HEADINGSon{\HEADINGSdouble}}
 
 \CHAPPAGon
@@ -6526,27 +6395,22 @@ end
   \expandafter\ifx\thisenv\titlepage\else
     \checkenv{}% chapters, etc., should not start inside an environment.
   \fi
-  % FIXME: \chapmacro is currently called from inside \titlepage when
-  % \setcontentsaftertitlepage to print the "Table of Contents" heading, but
-  % this should probably be done by \sectionheading with an option to print
-  % in chapter size.
-  %
   % Insert the first mark before the heading break (see notes for \domark).
-  \let\prevchapterdefs=\lastchapterdefs
-  \let\prevsectiondefs=\lastsectiondefs
-  \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+  \let\prevchapterdefs=\currentchapterdefs
+  \let\prevsectiondefs=\currentsectiondefs
+  \gdef\currentsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
                         \gdef\thissection{}}%
   %
   \def\temptype{#2}%
   \ifx\temptype\Ynothingkeyword
-    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+    \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
                           \gdef\thischapter{\thischaptername}}%
   \else\ifx\temptype\Yomitfromtockeyword
-    \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+    \gdef\currentchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
                           \gdef\thischapter{}}%
   \else\ifx\temptype\Yappendixkeyword
     \toks0={#1}%
-    \xdef\lastchapterdefs{%
+    \xdef\currentchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\appendixletter}%
       % \noexpand\putwordAppendix avoids expanding indigestible
@@ -6557,7 +6421,7 @@ end
     }%
   \else
     \toks0={#1}%
-    \xdef\lastchapterdefs{%
+    \xdef\currentchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\the\chapno}%
       % \noexpand\putwordChapter avoids expanding indigestible
@@ -6577,18 +6441,18 @@ end
   %
   % Now the second mark, after the heading break.  No break points
   % between here and the heading.
-  \let\prevchapterdefs=\lastchapterdefs
-  \let\prevsectiondefs=\lastsectiondefs
+  \let\prevchapterdefs=\currentchapterdefs
+  \let\prevsectiondefs=\currentsectiondefs
   \domark
   %
   {%
     \chapfonts \rm
     \let\footnote=\errfootnoteheading % give better error message
     %
-    % Have to define \lastsection before calling \donoderef, because the
+    % Have to define \currentsection before calling \donoderef, because the
     % xref code eventually uses it.  On the other hand, it has to be called
     % after \pchapsepmacro, or the headline will change too soon.
-    \gdef\lastsection{#1}%
+    \gdef\currentsection{#1}%
     %
     % Only insert the separating space if we have a chapter/appendix
     % number, and don't print the unnumbered ``number''.
@@ -6677,10 +6541,10 @@ end
     \csname #2fonts\endcsname \rm
     %
     % Insert first mark before the heading break (see notes for \domark).
-    \let\prevsectiondefs=\lastsectiondefs
+    \let\prevsectiondefs=\currentsectiondefs
     \ifx\temptype\Ynothingkeyword
       \ifx\sectionlevel\seckeyword
-        \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+        \gdef\currentsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
                               \gdef\thissection{\thissectionname}}%
       \fi
     \else\ifx\temptype\Yomitfromtockeyword
@@ -6688,7 +6552,7 @@ end
     \else\ifx\temptype\Yappendixkeyword
       \ifx\sectionlevel\seckeyword
         \toks0={#1}%
-        \xdef\lastsectiondefs{%
+        \xdef\currentsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
           % \noexpand\putwordSection avoids expanding indigestible
@@ -6701,7 +6565,7 @@ end
     \else
       \ifx\sectionlevel\seckeyword
         \toks0={#1}%
-        \xdef\lastsectiondefs{%
+        \xdef\currentsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
           % \noexpand\putwordSection avoids expanding indigestible
@@ -6727,28 +6591,28 @@ end
     %
     % Now the second mark, after the heading break.  No break points
     % between here and the heading.
-    \global\let\prevsectiondefs=\lastsectiondefs
+    \global\let\prevsectiondefs=\currentsectiondefs
     \domark
     %
     % Only insert the space after the number if we have a section number.
     \ifx\temptype\Ynothingkeyword
       \setbox0 = \hbox{}%
       \def\toctype{unn}%
-      \gdef\lastsection{#1}%
+      \gdef\currentsection{#1}%
     \else\ifx\temptype\Yomitfromtockeyword
       % for @headings -- no section number, don't include in toc,
-      % and don't redefine \lastsection.
+      % and don't redefine \currentsection.
       \setbox0 = \hbox{}%
       \def\toctype{omit}%
       \let\sectionlevel=\empty
     \else\ifx\temptype\Yappendixkeyword
       \setbox0 = \hbox{#4\enspace}%
       \def\toctype{app}%
-      \gdef\lastsection{#1}%
+      \gdef\currentsection{#1}%
     \else
       \setbox0 = \hbox{#4\enspace}%
       \def\toctype{num}%
-      \gdef\lastsection{#1}%
+      \gdef\currentsection{#1}%
     \fi\fi\fi
     %
     % Write the toc entry (before \donoderef).  See comments in \chapmacro.
@@ -6838,13 +6702,8 @@ end
   % 1 and 2 (the page numbers aren't printed), and so are the first
   % two pages of the document.  Thus, we'd have two destinations named
   % `1', and two named `2'.
-  \ifpdf
+  \ifpdforxetex
     \global\pdfmakepagedesttrue
-  \else
-    \ifx\XeTeXrevision\thisisundefined
-    \else
-      \global\pdfmakepagedesttrue
-    \fi
   \fi
 }
 
@@ -6881,9 +6740,7 @@ end
 %
 \def\startcontents#1{%
   % If @setchapternewpage on, and @headings double, the contents should
-  % start on an odd page, unlike chapters.  Thus, we maintain
-  % \contentsalignmacro in parallel with \pagealignmacro.
-  % From: Torbjorn Granlund <tege@matematik.su.se>
+  % start on an odd page, unlike chapters.
   \contentsalignmacro
   \immediate\closeout\tocfile
   %
@@ -6898,6 +6755,9 @@ end
     %
     % Roman numerals for page numbers.
     \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+    \def\thistitle{}% no title in double-sided headings
+    % Record where the Roman numerals started.
+    \ifnum\romancount=0 \global\romancount=\pagecount \fi
 }
 
 % redefined for the two-volume lispref.  We always output on
@@ -6920,8 +6780,7 @@ end
     \fi
     \closein 1
   \endgroup
-  \lastnegativepageno = \pageno
-  \global\pageno = \savepageno
+  \contentsendroman
 }
 
 % And just the chapters.
@@ -6956,10 +6815,20 @@ end
     \vfill \eject
     \contentsalignmacro % in case @setchapternewpage odd is in effect
   \endgroup
+  \contentsendroman
+}
+\let\shortcontents = \summarycontents
+
+% 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
 }
-\let\shortcontents = \summarycontents
 
 % Typeset the label for a chapter or appendix for the short contents.
 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
@@ -7101,7 +6970,7 @@ end
 % But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
-  \setupmarkupstyle{tex}%
+  \setregularquotes
   \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
   \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
   \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -7207,11 +7076,7 @@ end
 
 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
 % environment contents.
-\font\circle=lcircle10
-\newdimen\circthick
-\newdimen\cartouter\newdimen\cartinner
-\newskip\normbskip\newskip\normpskip\newskip\normlskip
-\circthick=\fontdimen8\circle
+
 %
 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
 \def\ctr{{\hskip 6pt\circle\char'010}}
@@ -7226,7 +7091,18 @@ end
 %
 \newskip\lskip\newskip\rskip
 
+% only require the font if @cartouche is actually used
+\def\cartouchefontdefs{%
+  \font\circle=lcircle10\relax
+  \circthick=\fontdimen8\circle
+}
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+
+
 \envdef\cartouche{%
+  \cartouchefontdefs
   \ifhmode\par\fi  % can't be in the midst of a paragraph.
   \startsavinginserts
   \lskip=\leftskip \rskip=\rightskip
@@ -7320,7 +7196,7 @@ end
 % If you want all examples etc. small: @set dispenvsize small.
 % If you want even small examples the full size: @set dispenvsize nosmall.
 % This affects the following displayed environments:
-%    @example, @display, @format, @lisp
+%    @example, @display, @format, @lisp, @verbatim
 %
 \def\smallword{small}
 \def\nosmallword{nosmall}
@@ -7366,9 +7242,9 @@ end
 %
 \maketwodispenvdef{lisp}{example}{%
   \nonfillstart
-  \tt\setupmarkupstyle{example}%
+  \tt\setcodequotes
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble % eat return
+  \parsearg\gobble
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
@@ -7405,13 +7281,9 @@ end
 
 
 % @raggedright does more-or-less normal line breaking but no right
-% justification.  From plain.tex.  Don't stretch around special
-% characters in urls in this environment, since the stretch at the right
-% should be enough.
+% justification.  From plain.tex.
 \envdef\raggedright{%
   \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax
-  \def\urefprestretchamount{0pt}%
-  \def\urefpoststretchamount{0pt}%
 }
 \let\Eraggedright\par
 
@@ -7470,7 +7342,7 @@ end
 
 % @indentedblock is like @quotation, but indents only on the left and
 % has no optional argument.
-% 
+%
 \makedispenvdef{indentedblock}{\indentedblockstart}
 %
 \def\indentedblockstart{%
@@ -7530,7 +7402,7 @@ end
 \def\setupverb{%
   \tt  % easiest (and conventionally used) font for verbatim
   \def\par{\leavevmode\endgraf}%
-  \setupmarkupstyle{verb}%
+  \setcodequotes
   \tabeightspaces
   % Respect line breaks,
   % print special symbols as themselves, and
@@ -7545,13 +7417,9 @@ end
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
 % We typeset each line of the verbatim in an \hbox, so we can handle
-% tabs.  The \global is in case the verbatim line starts with an accent,
-% or some other command that starts with a begin-group.  Otherwise, the
-% entire \verbbox would disappear at the corresponding end-group, before
-% it is typeset.  Meanwhile, we can't have nested verbatim commands
-% (can we?), so the \global won't be overwriting itself.
+% tabs.
 \newbox\verbbox
-\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
+\def\starttabbox{\setbox\verbbox=\hbox\bgroup}
 %
 \begingroup
   \catcode`\^^I=\active
@@ -7562,7 +7430,8 @@ end
       \divide\dimen\verbbox by\tabw
       \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
       \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
-      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
+      \wd\verbbox=\dimen\verbbox
+      \leavevmode\box\verbbox \starttabbox
     }%
   }
 \endgroup
@@ -7572,17 +7441,14 @@ end
   \let\nonarrowing = t%
   \nonfillstart
   \tt % easiest (and conventionally used) font for verbatim
-  % The \leavevmode here is for blank lines.  Otherwise, we would
-  % never \starttabox and the \egroup would end verbatim mode.
-  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
+  \def\par{\egroup\leavevmode\box\verbbox\endgraf\starttabbox}%
   \tabexpand
-  \setupmarkupstyle{verbatim}%
+  \setcodequotes
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count.
   % Must do in this order:
   \obeylines \uncatcodespecials \sepspaces
-  \everypar{\starttabbox}%
 }
 
 % Do the @verb magic: verbatim text is quoted by unique
@@ -7617,13 +7483,16 @@ end
   % ignore everything up to the first ^^M, that's the newline at the end
   % of the @verbatim input line itself.  Otherwise we get an extra blank
   % line in the output.
-  \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
+  \xdef\doverbatim#1^^M#2@end verbatim{%
+    \starttabbox#2\egroup\noexpand\end\gobble verbatim}%
   % We really want {...\end verbatim} in the body of the macro, but
   % without the active space; thus we have to use \xdef and \gobble.
+  % The \egroup ends the \verbbox started at the end of the last line in
+  % the block.
 \endgroup
 %
 \envdef\verbatim{%
-    \setupverbatim\doverbatim
+    \setnormaldispenv\setupverbatim\doverbatim
 }
 \let\Everbatim = \afterenvbreak
 
@@ -7636,9 +7505,12 @@ end
   {%
     \makevalueexpandable
     \setupverbatim
-    \indexnofonts       % Allow `@@' and other weird things in file names.
-    \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
-    \input #1
+    {%
+      \indexnofonts       % Allow `@@' and other weird things in file names.
+      \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
+      \edef\tmp{\noexpand\input #1 }
+      \expandafter
+    }\expandafter\starttabbox\tmp\egroup
     \afterenvbreak
   }%
 }
@@ -7767,7 +7639,7 @@ end
 % @deftypefnnewline on|off says whether the return type of typed functions
 % are printed on their own line.  This affects @deftypefn, @deftypefun,
 % @deftypeop, and @deftypemethod.
-% 
+%
 \parseargdef\deftypefnnewline{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -7783,6 +7655,21 @@ end
   \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
@@ -7797,7 +7684,6 @@ end
 % \deffngeneral {subind}category name args
 %
 \def\deffngeneral#1#2 #3 #4\endheader{%
-  % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
   \dosubind{fn}{\code{#3}}{#1}%
   \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
 }
@@ -7948,7 +7834,7 @@ end
       \tclose{\temp}% typeset the return type
       \ifrettypeownline
         % put return type on its own line; prohibit line break following:
-        \hfil\vadjust{\nobreak}\break  
+        \hfil\vadjust{\nobreak}\break
       \else
         \space  % type on same line, so just followed by a space
       \fi
@@ -7976,7 +7862,7 @@ end
   % 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{{\setupmarkupstyle{var}\ttslanted{##1}}}%
+  \def\var##1{{\setregularquotes\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
 }
@@ -8085,36 +7971,25 @@ end
   }
 \fi
 
-% alias because \c means cedilla in @tex or @math
-\let\texinfoc=\c
-
-\newcount\savedcatcodeone
-\newcount\savedcatcodetwo
+\let\E=\expandafter
 
 % Used at the time of macro expansion.
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
-  \def\xeatspaces{\eatspaces}%
-  %
-  % Temporarily undo catcode changes of \printindex.  Set catcode of @ to
-  % 0 so that @-commands in macro expansions aren't printed literally when 
-  % formatting an index file, where \ is used as the escape character.
-  \savedcatcodeone=\catcode`\@
-  \savedcatcodetwo=\catcode`\\
-  \catcode`\@=0
-  \catcode`\\=\active
+  % expand the expansion of \eatleadingcr twice to maybe remove a leading
+  % newline (and \else and \fi tokens), then call \eatspaces on the result.
+  \def\xeatspaces##1{%
+    \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
+  }}%
+  \def\xempty##1{}%
   %
   % Process the macro body under the current catcode regime.
-  \scantokens{#1@texinfoc}%
+  \scantokens{#1@comment}%
   %
-  \catcode`\@=\savedcatcodeone
-  \catcode`\\=\savedcatcodetwo
-  %
-  % The \texinfoc is to remove the \newlinechar added by \scantokens, and
-  % can be noticed by \parsearg.
-  %   We avoid surrounding the call to \scantokens with \bgroup and \egroup
-  % to allow macros to open or close groups themselves.
+  % The \comment is to remove the \newlinechar added by \scantokens, and
+  % can be noticed by \parsearg.  Note \c isn't used because this means cedilla
+  % in math mode.
 }
 
 % Used for copying and captions
@@ -8160,6 +8035,11 @@ end
 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
 }
 
+{\catcode`\^^M=\other%
+\gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
+% Warning: this won't work for a delimited argument
+% or for an empty argument
+
 % Trim a single trailing ^^M off a string.
 {\catcode`\^^M=\other \catcode`\Q=3%
 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
@@ -8215,12 +8095,14 @@ end
 \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
 }
@@ -8312,7 +8194,7 @@ end
 % list to some hook where the argument is to be expanded.  If there are
 % less than 10 arguments that hook is to be replaced by ##N where N
 % is the position in that list, that is to say the macro arguments are to be
-% defined `a la TeX in the macro body.  
+% defined `a la TeX in the macro body.
 %
 % That gets used by \mbodybackslash (above).
 %
@@ -8324,6 +8206,7 @@ end
   \let\hash\relax
   % \hash is redefined to `#' later to get it into definitions
   \let\xeatspaces\relax
+  \let\xempty\relax
   \parsemargdefxxx#1,;,%
   \ifnum\paramno<10\relax\else
     \paramno0\relax
@@ -8335,16 +8218,18 @@ end
   \else \let\next=\parsemargdefxxx
     \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
-        {\xeatspaces{\hash\the\paramno}}%
+        {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
+% the \xempty{} is to give \eatleadingcr an argument in the case of an
+% empty macro argument.
 
 % \parsemacbody, \parsermacbody
 %
 % Read recursive and nonrecursive macro bodies. (They're different since
 % rec and nonrec macros end differently.)
-% 
-% We are in \macrobodyctxt, and the \xdef causes backslashshes in the macro 
+%
+% 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.
 %
@@ -8378,7 +8263,7 @@ end
 % twice the \macarg.BLAH macros does not cost too much processing power.
 \def\parsemmanyargdef@@#1,{%
   \if#1;\let\next=\relax
-  \else 
+  \else
     \let\next=\parsemmanyargdef@@
     \edef\tempb{\eatspaces{#1}}%
     \expandafter\def\expandafter\tempa
@@ -8463,7 +8348,7 @@ end
 
 % Replace arguments by their values in the macro body, and place the result
 % in macro \@tempa.
-% 
+%
 \def\macvalstoargs@{%
   %  To do this we use the property that token registers that are \the'ed
   % within an \edef  expand only once. So we are going to place all argument
@@ -8487,9 +8372,9 @@ end
   \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
   }
 
-% Define the named-macro outside of this group and then close this group. 
-% 
-\def\macargexpandinbody@{% 
+% Define the named-macro outside of this group and then close this group.
+%
+\def\macargexpandinbody@{%
   \expandafter
   \endgroup
   \macargdeflist@
@@ -8527,7 +8412,7 @@ end
 }
 
 % Trailing missing arguments are set to empty.
-% 
+%
 \def\setemptyargvalues@{%
   \ifx\paramlist\nilm@
     \let\next\macargexpandinbody@
@@ -8604,7 +8489,7 @@ end
   \else % at most 9
     \ifnum\paramno<10\relax
       % @MACNAME sets the context for reading the macro argument
-      % @MACNAME@@ gets the argument, processes backslashes and appends a 
+      % @MACNAME@@ gets the argument, processes backslashes and appends a
       % comma.
       % @MACNAME@@@ removes braces surrounding the argument list.
       % @MACNAME@@@@ scans the macro body with arguments substituted.
@@ -8648,11 +8533,11 @@ end
 % Call #1 with a list of tokens #2, with any doubled backslashes in #2
 % compressed to one.
 %
-% This implementation works by expansion, and not execution (so we cannot use 
-% \def or similar).  This reduces the risk of this failing in contexts where 
-% complete expansion is done with no execution (for example, in writing out to 
+% This implementation works by expansion, and not execution (so we cannot use
+% \def or similar).  This reduces the risk of this failing in contexts where
+% complete expansion is done with no execution (for example, in writing out to
 % an auxiliary file for an index entry).
-% 
+%
 % State is kept in the input stream: the argument passed to
 % @look_ahead, @gobble_and_check_finish and @add_segment is
 %
@@ -8674,11 +8559,11 @@ end
 % #3 - NEXT_TOKEN
 % #4 used to look ahead
 %
-% If the next token is not a backslash, process the rest of the argument; 
+% If the next token is not a backslash, process the rest of the argument;
 % otherwise, remove the next token.
 @gdef@look_ahead#1!#2#3#4{%
   @ifx#4\%
-   @expandafter@gobble_and_check_finish 
+   @expandafter@gobble_and_check_finish
   @else
    @expandafter@add_segment
   @fi#1!{#2}#4#4%
@@ -8702,9 +8587,9 @@ end
 % #3 - NEXT_TOKEN
 % #4 is input stream until next backslash
 %
-% Input stream is either at the start of the argument, or just after a 
-% backslash sequence, either a lone backslash, or a doubled backslash.  
-% NEXT_TOKEN contains the first token in the input stream: if it is \finish, 
+% Input stream is either at the start of the argument, or just after a
+% backslash sequence, either a lone backslash, or a doubled backslash.
+% NEXT_TOKEN contains the first token in the input stream: if it is \finish,
 % finish; otherwise, append to ARG_RESULT the segment of the argument up until
 % the next backslash.  PENDING_BACKSLASH contains a backslash to represent
 % a backslash just before the start of the input stream that has not been
@@ -8716,13 +8601,13 @@ end
   % append the pending backslash to the result, followed by the next segment
   @expandafter@is_fi@look_ahead#1#2#4!{\}@fi
   % this @fi is discarded by @look_ahead.
-  % we can't get rid of it with \expandafter because we don't know how 
+  % we can't get rid of it with \expandafter because we don't know how
   % long #4 is.
 }
 
 % #1 - THE_MACRO
 % #2 - ARG_RESULT
-% #3 discards the res of the conditional in @add_segment, and @is_fi ends the 
+% #3 discards the res of the conditional in @add_segment, and @is_fi ends the
 % conditional.
 @gdef@call_the_macro#1#2!#3@fi{@is_fi #1{#2}}
 
@@ -8734,7 +8619,7 @@ end
 % for reading the argument (slightly different in the two cases).  Then,
 % to read the argument, in the whole-line case, it then calls the regular
 % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC.
-% 
+%
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup
@@ -8784,9 +8669,29 @@ end
 % also remove a trailing comma, in case of something like this:
 % @node Help-Cross,  ,  , Cross-refs
 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
-\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}\omittopnode}
+
+% Used so that the @top node doesn't have to be wrapped in an @ifnottex
+% conditional.
+% \doignore goes to more effort to skip nested conditionals but we don't need
+% that here.
+\def\omittopnode{%
+   \ifx\lastnode\wordTop
+   \expandafter\ignorenode\fi
+}
+\def\wordTop{Top}
+
+% Until the next @node or @bye command, divert output to a box that is not
+% output.
+\def\ignorenode{\setbox\dummybox\vbox\bgroup\def\node{\egroup\node}%
+\ignorenodebye
+}
+
+{\let\bye\relax
+\gdef\ignorenodebye{\let\bye\ignorenodebyedef}
+\gdef\ignorenodebyedef{\egroup(`Top' node ignored)\bye}}
+% The redefinition of \bye here is because it is declared \outer
 
-\let\nwnode=\node
 \let\lastnode=\empty
 
 % Write a cross-reference definition for the current node.  #1 is the
@@ -8809,7 +8714,7 @@ end
 
 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
 % anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \lastsection,
+% 1) NAME-title - the current sectioning name taken from \currentsection,
 %                 or the anchor name.
 % 2) NAME-snt   - section number and type, passed as the SNT arg, or
 %                 empty for anchors.
@@ -8831,7 +8736,7 @@ end
        \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
          ##1}{##2}}% these are parameters of \writexrdef
       }%
-      \toks0 = \expandafter{\lastsection}%
+      \toks0 = \expandafter{\currentsection}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
       \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
@@ -8843,7 +8748,7 @@ end
 % automatically in xrefs, if the third arg is not explicitly specified.
 % This was provided as a "secret" @set xref-automatic-section-title
 % variable, now it's official.
-% 
+%
 \parseargdef\xrefautomaticsectiontitle{%
   \def\temp{#1}%
   \ifx\temp\onword
@@ -8859,7 +8764,7 @@ end
   \fi\fi
 }
 
-% \f
+%
 % @xref, @pxref, and @ref generate cross-references.  For \xrefX, #1 is
 % the node name, #2 the name of the Info cross-reference, #3 the printed
 % node name, #4 the name of the Info file, #5 the name of the printed
@@ -8906,7 +8811,7 @@ end
       \else
         \ifhavexrefs
           % We (should) know the real title if we have the xref values.
-          \def\printedrefname{\refx{#1-title}{}}%
+          \def\printedrefname{\refx{#1-title}}%
         \else
           % Otherwise just copy the Info node name.
           \def\printedrefname{\ignorespaces #1}%
@@ -9000,7 +8905,7 @@ end
     % If the user specified the print name (third arg) to the ref,
     % print it instead of our usual "Figure 1.2".
     \ifdim\wd\printedrefnamebox = 0pt
-      \refx{#1-snt}{}%
+      \refx{#1-snt}%
     \else
       \printedrefname
     \fi
@@ -9012,77 +8917,73 @@ end
     \fi
   \else
     % node/anchor (non-float) references.
-    % 
+    %
     % If we use \unhbox to print the node names, TeX does not insert
     % empty discretionaries after hyphens, which means that it will not
     % find a line break at a hyphen in a node names.  Since some manuals
     % are best written with fairly long node names, containing hyphens,
     % this is a loss.  Therefore, we give the text of the node name
     % again, so it is as if TeX is seeing it for the first time.
-    % 
+    %
     \ifdim \wd\printedmanualbox > 0pt
       % Cross-manual reference with a printed manual name.
-      % 
+      %
       \crossmanualxref{\cite{\printedmanual\unskip}}%
     %
     \else\ifdim \wd\infofilenamebox > 0pt
       % Cross-manual reference with only an info filename (arg 4), no
       % printed manual name (arg 5).  This is essentially the same as
       % the case above; we output the filename, since we have nothing else.
-      % 
+      %
       \crossmanualxref{\code{\infofilename\unskip}}%
     %
     \else
       % Reference within this manual.
       %
-      % _ (for example) has to be the character _ for the purposes of the
-      % control sequence corresponding to the node, but it has to expand
-      % into the usual \leavevmode...\vrule stuff for purposes of
-      % printing. So we \turnoffactive for the \refx-snt, back on for the
-      % printing, back off for the \refx-pg.
-      {\turnoffactive
-       % Only output a following space if the -snt ref is nonempty; for
-       % @unnumbered and @anchor, it won't be.
-       \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
-       \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
-      }%
+      % Only output a following space if the -snt ref is nonempty, as the ref
+      % will be empty for @unnumbered and @anchor.
+      \setbox2 = \hbox{\ignorespaces \refx{#1-snt}}%
+      \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+      %
       % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
       %
-      % But we always want a comma and a space:
-      ,\space
-      %
-      % output the `page 3'.
-      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
-      % Add a , if xref followed by a space
-      \if\space\noexpand\tokenafterxref ,%
-      \else\ifx\       \tokenafterxref ,% @TAB
-      \else\ifx\*\tokenafterxref ,%   @*
-      \else\ifx\ \tokenafterxref ,%   @SPACE
-      \else\ifx\
-                \tokenafterxref ,%    @NL
-      \else\ifx\tie\tokenafterxref ,% @tie
-      \fi\fi\fi\fi\fi\fi
+      \expandafter\ifx\csname SETtxiomitxrefpg\endcsname\relax
+        % But we always want a comma and a space:
+        ,\space
+        %
+        % output the `page 3'.
+        \turnoffactive \putwordpage\tie\refx{#1-pg}%
+        % Add a , if xref followed by a space
+        \if\space\noexpand\tokenafterxref ,%
+        \else\ifx\     \tokenafterxref ,% @TAB
+        \else\ifx\*\tokenafterxref ,%   @*
+        \else\ifx\ \tokenafterxref ,%   @SPACE
+        \else\ifx\
+                  \tokenafterxref ,%    @NL
+        \else\ifx\tie\tokenafterxref ,% @tie
+        \fi\fi\fi\fi\fi\fi
+      \fi
     \fi\fi
   \fi
   \endlink
 \endgroup}
 
 % Output a cross-manual xref to #1.  Used just above (twice).
-% 
+%
 % Only include the text "Section ``foo'' in" if the foo is neither
 % missing or Top.  Thus, @xref{,,,foo,The Foo Manual} outputs simply
 % "see The Foo Manual", the idea being to refer to the whole manual.
-% 
+%
 % But, this being TeX, we can't easily compare our node name against the
 % string "Top" while ignoring the possible spaces before and after in
 % the input.  By adding the arbitrary 7sp below, we make it much less
 % likely that a real node name would have the same width as "Top" (e.g.,
 % in a monospaced font).  Hopefully it will never happen in practice.
-% 
+%
 % For the same basic reason, we retypeset the "Top" at every
 % reference, since the current font is indeterminate.
-% 
+%
 \def\crossmanualxref#1{%
   \setbox\toprefbox = \hbox{Top\kern7sp}%
   \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
@@ -9129,13 +9030,12 @@ end
   \fi\fi\fi
 }
 
-% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME.  SUFFIX 
-% is output afterwards if non-empty.
-\def\refx#1#2{%
+% \refx{NAME} - reference a cross-reference string named NAME.
+\def\refx#1{%
   \requireauxfile
   {%
     \indexnofonts
-    \otherbackslash
+    \turnoffactive
     \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\thisrefX
       \csname XR#1\endcsname
@@ -9158,12 +9058,11 @@ end
     % It's defined, so just use it.
     \thisrefX
   \fi
-  #2% Output the suffix in any case.
 }
 
-% This is the macro invoked by entries in the aux file.  Define a control 
-% sequence for a cross-reference target (we prepend XR to the control sequence 
-% name to avoid collisions).  The value is the page number.  If this is a float 
+% This is the macro invoked by entries in the aux file.  Define a control
+% sequence for a cross-reference target (we prepend XR to the control sequence
+% name to avoid collisions).  The value is the page number.  If this is a float
 % type, we have more work to do.
 %
 \def\xrdef#1#2{%
@@ -9179,10 +9078,10 @@ end
   \bgroup
     \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
   \egroup
-  % We put the \gdef inside a group to avoid the definitions building up on 
-  % TeX's save stack, which can cause it to run out of space for aux files with 
+  % We put the \gdef inside a group to avoid the definitions building up on
+  % TeX's save stack, which can cause it to run out of space for aux files with
   % thousands of lines.  \gdef doesn't use the save stack, but \csname does
-  % when it defines an unknown control sequence as \relax. 
+  % when it defines an unknown control sequence as \relax.
   %
   % Was that xref control sequence that we just defined for a float?
   \expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -9261,19 +9160,6 @@ end
   \catcode`\^^]=\other
   \catcode`\^^^=\other
   \catcode`\^^_=\other
-  % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
-  % in xref tags, i.e., node names.  But since ^^e4 notation isn't
-  % supported in the main text, it doesn't seem desirable.  Furthermore,
-  % that is not enough: for node names that actually contain a ^
-  % character, we would end up writing a line like this: 'xrdef {'hat
-  % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
-  % argument, and \hat is not an expandable control sequence.  It could
-  % all be worked out, but why?  Either we support ^^ or we don't.
-  %
-  % The other change necessary for this was to define \auxhat:
-  % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
-  % and then to call \auxhat in \setq.
-  %
   \catcode`\^=\other
   %
   % Special characters.  Should be turned off anyway, but...
@@ -9281,24 +9167,17 @@ end
   \catcode`\[=\other
   \catcode`\]=\other
   \catcode`\"=\other
-  \catcode`\_=\other
-  \catcode`\|=\other
-  \catcode`\<=\other
-  \catcode`\>=\other
+  \catcode`\_=\active
+  \catcode`\|=\active
+  \catcode`\<=\active
+  \catcode`\>=\active
   \catcode`\$=\other
   \catcode`\#=\other
   \catcode`\&=\other
   \catcode`\%=\other
   \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
   %
-  % This is to support \ in node names and titles, since the \
-  % characters end up in a \csname.  It's easier than
-  % leaving it active and making its active definition an actual \
-  % character.  What I don't understand is why it works in the *value*
-  % of the xrdef.  Seems like it should be a catcode12 \, and that
-  % should not typeset properly.  But it works, so I'm moving on for
-  % now.  --karl, 15jan04.
-  \catcode`\\=\other
+  \catcode`\\=\active
   %
   % @ is our escape character in .aux files, and we need braces.
   \catcode`\{=1
@@ -9512,7 +9391,7 @@ end
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
   \normalturnoffactive  % allow _ et al. in names
-  \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
+  \makevalueexpandable
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
@@ -9538,7 +9417,7 @@ end
   % 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 \noindent \fi
+  \ifx\centersub\centerV \else \imageindent \fi
   %
   % Output the image.
   \ifpdf
@@ -9561,7 +9440,7 @@ end
   %
   \ifimagevmode
     \medskip  % space after a standalone image
-  \fi  
+  \fi
   \ifx\centersub\centerV \egroup \fi
 \endgroup}
 
@@ -9629,13 +9508,13 @@ end
       \global\advance\floatno by 1
       %
       {%
-        % This magic value for \lastsection is output by \setref as the
+        % This magic value for \currentsection is output by \setref as the
         % XREFLABEL-title value.  \xrefX uses it to distinguish float
         % labels (which have a completely different output format) from
         % node and anchor labels.  And \xrdef uses it to construct the
         % lists of floats.
         %
-        \edef\lastsection{\floatmagic=\safefloattype}%
+        \edef\currentsection{\floatmagic=\safefloattype}%
         \setref{\floatlabel}{Yfloat}%
       }%
     \fi
@@ -9758,7 +9637,7 @@ end
 
 % #1 is the control sequence we are passed; we expand into a conditional
 % which is true if #1 represents a float ref.  That is, the magic
-% \lastsection value which we \setref above.
+% \currentsection value which we \setref above.
 %
 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
 %
@@ -10392,7 +10271,7 @@ directory should work if nowhere else does.}
         \uppercase{.}
       \endgroup
     \else
-      \errhelp = \EMsimple     
+      \errhelp = \EMsimple
       \errmessage{Unicode character U+#1 not supported, sorry}%
     \fi
   \else
@@ -10425,7 +10304,7 @@ directory should work if nowhere else does.}
     \countUTFz = "#1\relax
     \begingroup
       \parseXMLCharref
-    
+
       % Give \u8:... its definition.  The sequence of seven \expandafter's
       % expands after the \gdef three times, e.g.
       %
@@ -10437,7 +10316,7 @@ directory should work if nowhere else does.}
       \expandafter\expandafter
       \expandafter\expandafter
       \expandafter\gdef       \UTFviiiTmp{#2}%
-      % 
+      %
       \expandafter\ifx\csname uni:#1\endcsname \relax \else
        \message{Internal error, already defined: #1}%
       \fi
@@ -10476,7 +10355,7 @@ directory should work if nowhere else does.}
     \divide\countUTFz by 64
     \countUTFy = \countUTFz  % Save to be the future value of \countUTFz.
     \multiply\countUTFz by 64
-    
+
     % \countUTFz is now \countUTFx with the last 5 bits cleared.  Subtract
     % in order to get the last five bits.
     \advance\countUTFx by -\countUTFz
@@ -10511,7 +10390,7 @@ directory should work if nowhere else does.}
 % U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
 % U+0100..U+017F = https://en.wikipedia.org/wiki/Latin_Extended-A
 % U+0180..U+024F = https://en.wikipedia.org/wiki/Latin_Extended-B
-% 
+%
 % Many of our renditions are less than wonderful, and all the missing
 % characters are available somewhere.  Loading the necessary fonts
 % awaits user request.  We can't truly support Unicode without
@@ -10812,6 +10691,8 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{0233}{\=y}%
   \DeclareUnicodeCharacter{0237}{\dotless{j}}%
   %
+  \DeclareUnicodeCharacter{02BC}{'}%
+  %
   \DeclareUnicodeCharacter{02DB}{\ogonek{ }}%
   %
   % Greek letters upper case
@@ -11246,21 +11127,14 @@ directory should work if nowhere else does.}
    \relax
 }
 
-% define all Unicode characters we know about, for the sake of @U.
+% Define all Unicode characters we know about.  This makes UTF-8 the default
+% input encoding and allows @U to work.
 \iftxinativeunicodecapable
   \nativeunicodechardefsatu
 \else
   \utfeightchardefs
 \fi
 
-
-% Make non-ASCII characters printable again for compatibility with
-% existing Texinfo documents that may use them, even without declaring a
-% document encoding.
-%
-\setnonasciicharscatcode \other
-
-
 \message{formatting,}
 
 \newdimen\defaultparindent \defaultparindent = 15pt
@@ -11453,6 +11327,18 @@ directory should work if nowhere else does.}
   \globaldefs = 0
 }}
 
+\def\bsixpaper{{\globaldefs = 1
+  \afourpaper
+  \internalpagesizes{140mm}{100mm}%
+                    {-6.35mm}{-12.7mm}%
+                    {\bindingoffset}{14pt}%
+                    {176mm}{125mm}%
+  \let\SETdispenvsize=\smallword
+  \lispnarrowing = 0.2in
+  \globaldefs = 0
+}}
+
+
 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
 % Perhaps we should allow setting the margins, \topskip, \parskip,
 % and/or leading, also. Or perhaps we should compute them somehow.
@@ -11466,12 +11352,12 @@ directory should work if nowhere else does.}
   \setleading{\textleading}%
   %
   \dimen0 = #1\relax
-  \advance\dimen0 by \voffset
-  \advance\dimen0 by 1in % reference point for DVI is 1 inch from top of page
+  \advance\dimen0 by 2.5in % default 1in margin above heading line
+                           % and 1.5in to include heading, footing and
+                           % bottom margin
   %
   \dimen2 = \hsize
-  \advance\dimen2 by \normaloffset
-  \advance\dimen2 by 1in % reference point is 1 inch from left edge of page
+  \advance\dimen2 by 2in % default to 1 inch margin on each side
   %
   \internalpagesizes{#1}{\hsize}%
                     {\voffset}{\normaloffset}%
@@ -11556,9 +11442,9 @@ directory should work if nowhere else does.}
 \def\texinfochars{%
   \let< = \activeless
   \let> = \activegtr
-  \let~ = \activetilde 
+  \let~ = \activetilde
   \let^ = \activehat
-  \markupsetuplqdefault \markupsetuprqdefault 
+  \setregularquotes
   \let\b = \strong
   \let\i = \smartitalic
   % in principle, all other definitions in \tex have to be undone too.
@@ -11576,11 +11462,9 @@ directory should work if nowhere else does.}
 % \backslashcurfont outputs one backslash character in current font,
 % as in \char`\\.
 \global\chardef\backslashcurfont=`\\
-\global\let\rawbackslashxx=\backslashcurfont  % let existing .??s files work
 
-% \realbackslash is an actual character `\' with catcode other, and
-% \doublebackslash is two of them (for the pdf outlines).
-{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+% \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.
@@ -11598,10 +11482,8 @@ directory should work if nowhere else does.}
 @def@ttbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
 @let@backslashchar = @ttbackslash % @backslashchar{} is for user documents.
 
-% \rawbackslash defines an active \ to do \backslashcurfont.
 % \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.  We switch back and forth between these.
-@gdef@rawbackslash{@let\=@backslashcurfont}
+% catcode other.
 @gdef@otherbackslash{@let\=@realbackslash}
 
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
@@ -11621,8 +11503,7 @@ directory should work if nowhere else does.}
    @let|=@normalverticalbar
    @let~=@normaltilde
    @let\=@ttbackslash
-   @markupsetuplqdefault
-   @markupsetuprqdefault
+   @setregularquotes
    @unsepspaces
  }
 }
@@ -11673,7 +11554,7 @@ directory should work if nowhere else does.}
   @ifx\@eatinput @let\ = @ttbackslash @fi
   @catcode13=5 % regular end of line
   @enableemergencynewline
-  @let@c=@texinfoc
+  @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.
@@ -11715,8 +11596,7 @@ 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
-@markupsetuplqdefault
-@markupsetuprqdefault
+@setregularquotes
 
 @c Local variables:
 @c eval: (add-hook 'before-save-hook 'time-stamp)
@@ -11729,3 +11609,4 @@ directory should work if nowhere else does.}
 @c vim:sw=2:
 
 @enablebackslashhack
+
index f2fc97e..fae3a5f 100755 (executable)
@@ -1,11 +1,9 @@
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
-  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
-    if 0;
-# Update an FSF copyright year list to include the current year.
+#!/bin/sh
+#! -*-perl-*-
 
-my $VERSION = '2018-03-07.03:47'; # UTC
+# Update an FSF copyright year list to include the current year.
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,9 +17,12 @@ my $VERSION = '2018-03-07.03:47'; # UTC
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
+#
 # Written by Jim Meyering and Joel E. Denny
 
+# This script updates an FSF copyright year list to include the current year.
+# Usage: update-copyright [FILE...]
+#
 # The arguments to this script should be names of files that contain
 # copyright statements to be updated.  The copyright holder's name
 # defaults to "Free Software Foundation, Inc." but may be changed to
@@ -97,7 +98,7 @@ my $VERSION = '2018-03-07.03:47'; # UTC
 #   6. Blank lines, even if preceded by the prefix, do not appear
 #      within the FSF copyright statement.
 #   7. Each copyright year is 2 or 4 digits, and years are separated by
-#      commas or dashes.  Whitespace may appear after commas.
+#      commas, "-", or "--".  Whitespace may appear after commas.
 #
 # Environment variables:
 #
@@ -121,6 +122,27 @@ my $VERSION = '2018-03-07.03:47'; # UTC
 #   5. Set UPDATE_COPYRIGHT_HOLDER if the copyright holder is other
 #      than "Free Software Foundation, Inc.".
 
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by perl, the next two lines are a no-op.
+eval 'exec perl -wSx -0777 -pi "$0" "$@"'
+     if 0;
+
+my $VERSION = '2020-04-04.15:07'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job.  Otherwise, update this string manually.
+
 use strict;
 use warnings;
 
@@ -170,7 +192,7 @@ while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
     $holder_re =~ s/\s/$ws_re/g;
     my $stmt_remainder_re =
       "(?:$ws_re$circle_c_re)?"
-      . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+      . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|--?))*"
       . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
     if (/\G$stmt_remainder_re/)
       {
@@ -209,26 +231,28 @@ if (defined $stmt_re)
         # Make the use of intervals consistent.
         if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
           {
-            $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+            $stmt =~ s/(\d{4})--?(\d{4})/join(', ', $1..$2)/eg;
           }
         else
           {
+            my $ndash = $ARGV =~ /\.tex(i(nfo)?)?$/ ? "--" : "-";
+
             $stmt =~
               s/
                 (\d{4})
                 (?:
-                  (,\ |-)
+                  (,\ |--?)
                   ((??{
-                    if    ($2 eq '-') { '\d{4}'; }
+                    if   ($2 ne ', ') { '\d{4}'; }
                     elsif (!$3)       { $1 + 1;  }
                     else              { $3 + 1;  }
                   }))
                 )+
-              /$1-$3/gx;
+              /$1$ndash$3/gx;
 
             # When it's 2, emit a single range encompassing all year numbers.
             $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
-              and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
+              and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1$ndash$2/;
           }
 
         # Format within margin.
@@ -270,6 +294,7 @@ else
 # mode: perl
 # indent-tabs-mode: nil
 # eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-line-limit: 200
 # time-stamp-start: "my $VERSION = '"
 # time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
 # time-stamp-time-zone: "UTC0"
index 2d4d13f..5bbbc44 100755 (executable)
@@ -1,32 +1,49 @@
-eval '(exit $?0)' && eval 'exec perl -wST "$0" "$@"'
-  & eval 'exec perl -wST "$0" $argv:q'
-    if 0;
+#!/bin/sh
+#! -*-perl-*-
+
 # Detect instances of "if (p) free (p);".
 # Likewise "if (p != 0)", "if (0 != p)", or with NULL; and with braces.
 
-my $VERSION = '2018-03-07 03:47'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
-
-# Copyright (C) 2008-2018 Free Software Foundation, Inc.
-
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+#
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
+#
 # Written by Jim Meyering
 
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by perl, the next two lines are a no-op.
+eval 'exec perl -wSx "$0" "$@"'
+     if 0;
+
+my $VERSION = '2021-04-11 10:11'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job.  Otherwise, update this string manually.
+
+my $copyright_year = '2021';
+
 use strict;
 use warnings;
 use Getopt::Long;
@@ -103,7 +120,19 @@ sub is_NULL ($)
   GetOptions
     (
      help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
+     version =>
+       sub
+       {
+         print "$ME version $VERSION\n";
+         print "Copyright (C) $copyright_year Free Software Foundation, Inc.\n";
+         print "License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n"
+             . "This is free software: you are free to change and redistribute it.\n"
+             . "There is NO WARRANTY, to the extent permitted by law.\n";
+         print "\n";
+         my $author = "Jim Meyering";
+         print "Written by $author.\n";
+         exit
+       },
      list => \$list,
      'name=s@' => \@name,
     ) or usage 1;
@@ -203,6 +232,7 @@ EOF
 ## mode: perl
 ## indent-tabs-mode: nil
 ## eval: (add-hook 'before-save-hook 'time-stamp)
+## time-stamp-line-limit: 50
 ## time-stamp-start: "my $VERSION = '"
 ## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
 ## time-stamp-time-zone: "UTC0"
index 12f191b..cf168ea 100755 (executable)
@@ -4,7 +4,7 @@
 # Print a version string.
 scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ scriptversion=2018-03-07.03; # UTC
 # list the version-controlled files in that directory.
 
 # If there's an argument, it must be a single, "."-relative directory name.
-# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
+# cvsu is part of the cvsutils package: https://www.red-bean.com/cvsutils/
 
 postprocess=
 case $1 in
diff --git a/cfg.mk b/cfg.mk
index 4a84901..970af0a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize maint.mk                           -*- makefile -*-
-# Copyright (C) 2003-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ announcement_Cc_ = $(translation_project_), $(PACKAGE)-devel@gnu.org
 # Now that we have better tests, make this the default.
 export VERBOSE = yes
 
-old_NEWS_hash = 773368daadfe6d96f43de867c87f45e7
+old_NEWS_hash = 883954bcb25c48755004736540de39e7
 
 # Tell maint.mk's syntax-check rules that diff gets config.h directly or
 # via diff.h or system.h.
index a76b881..ee2c39a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,11 +1,12 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69.197-b8fd7 for GNU diffutils 3.7.
+# Generated by GNU Autoconf 2.71 for GNU diffutils 3.8.
 #
 # Report bugs to <bug-diffutils@gnu.org>.
 #
 #
-# Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -16,6 +17,7 @@
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
@@ -24,7 +26,7 @@ then :
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -34,6 +36,44 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" ""       $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
+
 # The user is always right.
 if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
@@ -44,16 +84,6 @@ if ${PATH_SEPARATOR+false} :; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-export as_nl
-IFS=" ""       $as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -83,26 +113,6 @@ if test ! -f "$as_myself"; then
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test \${$as_var+y} \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 # Use a proper internal environment variable to ensure we don't fall
   # into an infinite loop, continuously re-executing ourselves.
@@ -125,12 +135,13 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 # Admittedly, this is quite paranoid, since all the known shells bail
 # out after a failed `exec'.
 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
+exit 255
   fi
   # We don't want this to propagate to other subprocesses.
           { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+  as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
   NULLCMD=:
@@ -138,7 +149,7 @@ then :
   # is contrary to our usage.  Disable this feature.
   alias -g '\${1+\"\$@\"}'='\"\$@\"'
   setopt NO_GLOB_SUBST
-else
+else \$as_nop
   case \`(set -o) 2>/dev/null\` in #(
   *posix*) :
     set -o posix ;; #(
@@ -161,10 +172,12 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
 then :
 
-else
+else \$as_nop
   exitcode=1; echo positional parameters were not saved.
 fi
 test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
 test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
@@ -174,13 +187,13 @@ test \$(( 1 + 1 )) = 2 || exit 1"
   if (eval "$as_required") 2>/dev/null
 then :
   as_have_required=yes
-else
+else $as_nop
   as_have_required=no
 fi
   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
 then :
 
-else
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_found=false
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
@@ -198,10 +211,10 @@ do
             # Try only shells that exist, to save several forks.
             as_shell=$as_dir$as_base
             if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-                   { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
+                   as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
 then :
   CONFIG_SHELL=$as_shell as_have_required=yes
-                  if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
+                  if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
 then :
   break 2
 fi
@@ -211,11 +224,16 @@ fi
   as_found=false
 done
 IFS=$as_save_IFS
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-             { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
+if $as_found
+then :
+
+else $as_nop
+  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+             as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
 then :
   CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
+fi
+fi
 
 
       if test "x$CONFIG_SHELL" != x
@@ -277,6 +295,7 @@ as_fn_unset ()
 }
 as_unset=as_fn_unset
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -294,6 +313,14 @@ as_fn_exit ()
   as_fn_set_status $1
   exit $1
 } # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_mkdir_p
 # -------------
@@ -362,7 +389,7 @@ then :
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -380,13 +407,21 @@ then :
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
   }
 fi # as_fn_arith
 
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+  return $?
+}
+as_nop=as_fn_nop
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 # ----------------------------------------
@@ -485,6 +520,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   exit
 }
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -498,6 +537,13 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -565,8 +611,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU diffutils'
 PACKAGE_TARNAME='diffutils'
-PACKAGE_VERSION='3.7'
-PACKAGE_STRING='GNU diffutils 3.7'
+PACKAGE_VERSION='3.8'
+PACKAGE_STRING='GNU diffutils 3.8'
 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
 
@@ -574,17 +620,14 @@ ac_unique_file="src/diff.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
 #endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
 #endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
+#ifdef HAVE_STRING_H
+# include <string.h>
 #endif
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
@@ -592,11 +635,22 @@ ac_includes_default="\
 #ifdef HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
 ac_header_c_list=
+gl_use_threads_default=
+gl_use_winpthreads_default=
 ac_func_c_list=
 gl_fnmatch_required=POSIX
 gl_getopt_required=POSIX
@@ -638,9 +692,136 @@ NEXT_SYS_UIO_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
 NEXT_SYS_IOCTL_H
 HAVE_SYS_IOCTL_H
-GL_GENERATE_STDALIGN_H_FALSE
-GL_GENERATE_STDALIGN_H_TRUE
-STDALIGN_H
+GL_GNULIB_SELECT
+GL_GNULIB_PSELECT
+GL_GNULIB_SCHED_YIELD
+HAVE_STRUCT_SCHED_PARAM
+HAVE_SCHED_H
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H
+NEXT_SCHED_H
+REPLACE_SCHED_YIELD
+HAVE_SCHED_YIELD
+LIB_PTHREAD_SIGMASK
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK
+GL_GNULIB_PTHREAD_SPIN
+GL_GNULIB_PTHREAD_TSS
+GL_GNULIB_PTHREAD_COND
+GL_GNULIB_PTHREAD_RWLOCK
+GL_GNULIB_PTHREAD_MUTEX
+GL_GNULIB_PTHREAD_ONCE
+GL_GNULIB_PTHREAD_THREAD
+LIB_PTHREAD
+HAVE_PTHREAD_H
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H
+NEXT_PTHREAD_H
+REPLACE_PTHREAD_SPIN_DESTROY
+REPLACE_PTHREAD_SPIN_UNLOCK
+REPLACE_PTHREAD_SPIN_TRYLOCK
+REPLACE_PTHREAD_SPIN_LOCK
+REPLACE_PTHREAD_SPIN_INIT
+REPLACE_PTHREAD_KEY_DELETE
+REPLACE_PTHREAD_GETSPECIFIC
+REPLACE_PTHREAD_SETSPECIFIC
+REPLACE_PTHREAD_KEY_CREATE
+REPLACE_PTHREAD_COND_DESTROY
+REPLACE_PTHREAD_COND_BROADCAST
+REPLACE_PTHREAD_COND_SIGNAL
+REPLACE_PTHREAD_COND_TIMEDWAIT
+REPLACE_PTHREAD_COND_WAIT
+REPLACE_PTHREAD_CONDATTR_DESTROY
+REPLACE_PTHREAD_CONDATTR_INIT
+REPLACE_PTHREAD_COND_INIT
+REPLACE_PTHREAD_RWLOCK_DESTROY
+REPLACE_PTHREAD_RWLOCK_UNLOCK
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK
+REPLACE_PTHREAD_RWLOCK_WRLOCK
+REPLACE_PTHREAD_RWLOCK_RDLOCK
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY
+REPLACE_PTHREAD_RWLOCKATTR_INIT
+REPLACE_PTHREAD_RWLOCK_INIT
+REPLACE_PTHREAD_MUTEX_DESTROY
+REPLACE_PTHREAD_MUTEX_UNLOCK
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK
+REPLACE_PTHREAD_MUTEX_TRYLOCK
+REPLACE_PTHREAD_MUTEX_LOCK
+REPLACE_PTHREAD_MUTEXATTR_DESTROY
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE
+REPLACE_PTHREAD_MUTEXATTR_INIT
+REPLACE_PTHREAD_MUTEX_INIT
+REPLACE_PTHREAD_ONCE
+REPLACE_PTHREAD_EXIT
+REPLACE_PTHREAD_JOIN
+REPLACE_PTHREAD_DETACH
+REPLACE_PTHREAD_EQUAL
+REPLACE_PTHREAD_SELF
+REPLACE_PTHREAD_ATTR_DESTROY
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE
+REPLACE_PTHREAD_ATTR_INIT
+REPLACE_PTHREAD_CREATE
+HAVE_PTHREAD_SPIN_DESTROY
+HAVE_PTHREAD_SPIN_UNLOCK
+HAVE_PTHREAD_SPIN_TRYLOCK
+HAVE_PTHREAD_SPIN_LOCK
+HAVE_PTHREAD_SPIN_INIT
+HAVE_PTHREAD_KEY_DELETE
+HAVE_PTHREAD_GETSPECIFIC
+HAVE_PTHREAD_SETSPECIFIC
+HAVE_PTHREAD_KEY_CREATE
+HAVE_PTHREAD_COND_DESTROY
+HAVE_PTHREAD_COND_BROADCAST
+HAVE_PTHREAD_COND_SIGNAL
+HAVE_PTHREAD_COND_TIMEDWAIT
+HAVE_PTHREAD_COND_WAIT
+HAVE_PTHREAD_CONDATTR_DESTROY
+HAVE_PTHREAD_CONDATTR_INIT
+HAVE_PTHREAD_COND_INIT
+HAVE_PTHREAD_RWLOCK_DESTROY
+HAVE_PTHREAD_RWLOCK_UNLOCK
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK
+HAVE_PTHREAD_RWLOCK_WRLOCK
+HAVE_PTHREAD_RWLOCK_RDLOCK
+HAVE_PTHREAD_RWLOCKATTR_DESTROY
+HAVE_PTHREAD_RWLOCKATTR_INIT
+HAVE_PTHREAD_RWLOCK_INIT
+HAVE_PTHREAD_MUTEX_DESTROY
+HAVE_PTHREAD_MUTEX_UNLOCK
+HAVE_PTHREAD_MUTEX_TIMEDLOCK
+HAVE_PTHREAD_MUTEX_TRYLOCK
+HAVE_PTHREAD_MUTEX_LOCK
+HAVE_PTHREAD_MUTEXATTR_DESTROY
+HAVE_PTHREAD_MUTEXATTR_SETROBUST
+HAVE_PTHREAD_MUTEXATTR_GETROBUST
+HAVE_PTHREAD_MUTEXATTR_SETTYPE
+HAVE_PTHREAD_MUTEXATTR_GETTYPE
+HAVE_PTHREAD_MUTEXATTR_INIT
+HAVE_PTHREAD_MUTEX_INIT
+HAVE_PTHREAD_ONCE
+HAVE_PTHREAD_EXIT
+HAVE_PTHREAD_JOIN
+HAVE_PTHREAD_DETACH
+HAVE_PTHREAD_EQUAL
+HAVE_PTHREAD_SELF
+HAVE_PTHREAD_ATTR_DESTROY
+HAVE_PTHREAD_ATTR_SETDETACHSTATE
+HAVE_PTHREAD_ATTR_GETDETACHSTATE
+HAVE_PTHREAD_ATTR_INIT
+HAVE_PTHREAD_CREATE
+HAVE_PTHREAD_PROCESS_SHARED
+HAVE_PTHREAD_MUTEX_ROBUST
+HAVE_PTHREAD_MUTEX_RECURSIVE
+HAVE_PTHREAD_CREATE_DETACHED
+HAVE_PTHREAD_SPINLOCK_T
+HAVE_PTHREAD_T
 GL_GENERATE_NETINET_IN_H_FALSE
 GL_GENERATE_NETINET_IN_H_TRUE
 NETINET_IN_H
@@ -656,10 +837,11 @@ NEXT_SYS_SELECT_H
 REPLACE_SELECT
 REPLACE_PSELECT
 HAVE_PSELECT
-GNULIB_SELECT
-GNULIB_PSELECT
+GL_GNULIB_IOCTL
 INET_PTON_LIB
 LOCALE_TR_UTF8
+GL_GNULIB_INET_PTON
+GL_GNULIB_INET_NTOP
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
 NEXT_ARPA_INET_H
 HAVE_ARPA_INET_H
@@ -667,8 +849,21 @@ REPLACE_INET_PTON
 REPLACE_INET_NTOP
 HAVE_DECL_INET_PTON
 HAVE_DECL_INET_NTOP
-GNULIB_INET_PTON
-GNULIB_INET_NTOP
+GL_GNULIB_ACCEPT4
+GL_GNULIB_SHUTDOWN
+GL_GNULIB_SETSOCKOPT
+GL_GNULIB_SENDTO
+GL_GNULIB_RECVFROM
+GL_GNULIB_SEND
+GL_GNULIB_RECV
+GL_GNULIB_LISTEN
+GL_GNULIB_GETSOCKOPT
+GL_GNULIB_GETSOCKNAME
+GL_GNULIB_GETPEERNAME
+GL_GNULIB_BIND
+GL_GNULIB_ACCEPT
+GL_GNULIB_CONNECT
+GL_GNULIB_SOCKET
 HAVE_WS2TCPIP_H
 HAVE_SYS_SOCKET_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
@@ -677,22 +872,9 @@ HAVE_ACCEPT4
 HAVE_SA_FAMILY_T
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
 HAVE_STRUCT_SOCKADDR_STORAGE
-GNULIB_ACCEPT4
-GNULIB_SHUTDOWN
-GNULIB_SETSOCKOPT
-GNULIB_SENDTO
-GNULIB_RECVFROM
-GNULIB_SEND
-GNULIB_RECV
-GNULIB_LISTEN
-GNULIB_GETSOCKOPT
-GNULIB_GETSOCKNAME
-GNULIB_GETPEERNAME
-GNULIB_BIND
-GNULIB_ACCEPT
-GNULIB_CONNECT
-GNULIB_SOCKET
 gltests_WITNESS
+GL_CXXFLAG_ALLOW_WARNINGS
+GL_CFLAG_ALLOW_WARNINGS
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
 NEXT_WCHAR_H
 HAVE_FEATURES_H
@@ -708,19 +890,24 @@ LIBUNISTRING_UNISTR_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
+TIME_H_DEFINES_TIME_UTC
 UNISTD_H_DEFINES_STRUCT_TIMESPEC
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
 TIME_H_DEFINES_STRUCT_TIMESPEC
 NEXT_AS_FIRST_DIRECTIVE_TIME_H
 NEXT_TIME_H
+GL_GNULIB_WAITPID
 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
 NEXT_SYS_WAIT_H
-GNULIB_WAITPID
 WINDOWS_STAT_INODES
 WINDOWS_64_BIT_OFF_T
 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
 NEXT_SYS_TYPES_H
+HAVE_SYS_RANDOM_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
+NEXT_SYS_RANDOM_H
+GL_GNULIB_FFS
 HAVE_STRINGS_H
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
 NEXT_STRINGS_H
@@ -729,7 +916,6 @@ NEXT_STRING_H
 HAVE_DECL_STRNCASECMP
 HAVE_STRCASECMP
 HAVE_FFS
-GNULIB_FFS
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
 NEXT_STDLIB_H
 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
@@ -743,9 +929,23 @@ 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_GENERATE_SIGSEGV_H_FALSE
+GL_GENERATE_SIGSEGV_H_TRUE
+SIGSEGV_H
+LIBSIGSEGV_PREFIX
+LTLIBSIGSEGV
+LIBSIGSEGV
+HAVE_LIBSIGSEGV
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
 NEXT_SIGNAL_H
-GLIBC21
+GL_GNULIB_SIGACTION
+GL_GNULIB_SIGPROCMASK
+GL_GNULIB_SIGNAL_H_SIGPIPE
+GL_GNULIB_RAISE
+GL_GNULIB_PTHREAD_SIGMASK
 REPLACE_RAISE
 REPLACE_PTHREAD_SIGMASK
 HAVE_SIGHANDLER_T
@@ -757,13 +957,38 @@ HAVE_SIGSET_T
 HAVE_RAISE
 HAVE_PTHREAD_SIGMASK
 HAVE_POSIX_SIGNALBLOCKING
-GNULIB_SIGACTION
-GNULIB_SIGPROCMASK
-GNULIB_SIGNAL_H_SIGPIPE
-GNULIB_RAISE
-GNULIB_PTHREAD_SIGMASK
+LIB_NL_LANGINFO
+GL_GNULIB_MDA_TZSET
+GL_GNULIB_TZSET
+GL_GNULIB_TIME_RZ
+GL_GNULIB_TIME_R
+GL_GNULIB_TIMESPEC_GET
+GL_GNULIB_TIMEGM
+GL_GNULIB_STRPTIME
+GL_GNULIB_STRFTIME
+GL_GNULIB_NANOSLEEP
+GL_GNULIB_LOCALTIME
+GL_GNULIB_MKTIME
+GL_GNULIB_CTIME
+REPLACE_LOCALTIME
+REPLACE_GMTIME
+GNULIB_GETTIMEOFDAY
+REPLACE_TZSET
+REPLACE_TIMEGM
+REPLACE_STRFTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+REPLACE_CTIME
+HAVE_TIMEZONE_T
+HAVE_TIMESPEC_GET
+HAVE_TIMEGM
+HAVE_STRPTIME
+HAVE_NANOSLEEP
+HAVE_DECL_LOCALTIME_R
 UNDEFINE_STRTOK_R
 REPLACE_STRSIGNAL
+REPLACE_STRERRORNAME_NP
 REPLACE_STRERROR_R
 REPLACE_STRERROR
 REPLACE_STRTOK_R
@@ -777,8 +1002,12 @@ REPLACE_STRCHRNUL
 REPLACE_STPNCPY
 REPLACE_MEMMEM
 REPLACE_MEMCHR
+REPLACE_FFSLL
 HAVE_STRVERSCMP
 HAVE_DECL_STRSIGNAL
+HAVE_SIGDESCR_NP
+HAVE_SIGABBREV_NP
+HAVE_STRERRORNAME_NP
 HAVE_DECL_STRERROR_R
 HAVE_DECL_STRTOK_R
 HAVE_STRCASESTR
@@ -794,136 +1023,67 @@ HAVE_RAWMEMCHR
 HAVE_DECL_MEMRCHR
 HAVE_MEMPCPY
 HAVE_DECL_MEMMEM
-HAVE_MEMCHR
 HAVE_FFSLL
 HAVE_FFSL
 HAVE_EXPLICIT_BZERO
 HAVE_MBSLEN
-GNULIB_STRVERSCMP
-GNULIB_STRSIGNAL
-GNULIB_STRERROR_R
-GNULIB_STRERROR
-GNULIB_MBSTOK_R
-GNULIB_MBSSEP
-GNULIB_MBSSPN
-GNULIB_MBSPBRK
-GNULIB_MBSCSPN
-GNULIB_MBSCASESTR
-GNULIB_MBSPCASECMP
-GNULIB_MBSNCASECMP
-GNULIB_MBSCASECMP
-GNULIB_MBSSTR
-GNULIB_MBSRCHR
-GNULIB_MBSCHR
-GNULIB_MBSNLEN
-GNULIB_MBSLEN
-GNULIB_STRTOK_R
-GNULIB_STRCASESTR
-GNULIB_STRSTR
-GNULIB_STRSEP
-GNULIB_STRPBRK
-GNULIB_STRNLEN
-GNULIB_STRNDUP
-GNULIB_STRNCAT
-GNULIB_STRDUP
-GNULIB_STRCHRNUL
-GNULIB_STPNCPY
-GNULIB_STPCPY
-GNULIB_RAWMEMCHR
-GNULIB_MEMRCHR
-GNULIB_MEMPCPY
-GNULIB_MEMMEM
-GNULIB_MEMCHR
-GNULIB_FFSLL
-GNULIB_FFSL
-GNULIB_EXPLICIT_BZERO
-LOCALE_FR_UTF8
-LOCALE_ZH_CN
-LOCALE_JA
-REPLACE_WCTOMB
-REPLACE_UNSETENV
-REPLACE_STRTOD
-REPLACE_SETENV
-REPLACE_REALPATH
-REPLACE_REALLOC
-REPLACE_RANDOM_R
-REPLACE_QSORT_R
-REPLACE_PUTENV
-REPLACE_PTSNAME_R
-REPLACE_PTSNAME
-REPLACE_MKSTEMP
-REPLACE_MBTOWC
-REPLACE_MALLOC
-REPLACE_CANONICALIZE_FILE_NAME
-REPLACE_CALLOC
-HAVE_DECL_UNSETENV
-HAVE_UNLOCKPT
-HAVE_SYS_LOADAVG_H
-HAVE_STRUCT_RANDOM_DATA
-HAVE_STRTOULL
-HAVE_STRTOLL
-HAVE_STRTOD
-HAVE_DECL_SETSTATE
-HAVE_DECL_SETENV
-HAVE_SETENV
-HAVE_SECURE_GETENV
-HAVE_RPMATCH
-HAVE_REALPATH
-HAVE_REALLOCARRAY
-HAVE_RANDOM_R
-HAVE_RANDOM_H
-HAVE_RANDOM
-HAVE_QSORT_R
-HAVE_PTSNAME_R
-HAVE_PTSNAME
-HAVE_POSIX_OPENPT
-HAVE_MKSTEMPS
-HAVE_MKSTEMP
-HAVE_MKOSTEMPS
-HAVE_MKOSTEMP
-HAVE_MKDTEMP
-HAVE_DECL_INITSTATE
-HAVE_GRANTPT
-HAVE_GETSUBOPT
-HAVE_DECL_GETLOADAVG
-HAVE_CANONICALIZE_FILE_NAME
-HAVE_ATOLL
-HAVE__EXIT
-GNULIB_WCTOMB
-GNULIB_UNSETENV
-GNULIB_UNLOCKPT
-GNULIB_SYSTEM_POSIX
-GNULIB_STRTOULL
-GNULIB_STRTOLL
-GNULIB_STRTOD
-GNULIB_SETENV
-GNULIB_SECURE_GETENV
-GNULIB_RPMATCH
-GNULIB_REALPATH
-GNULIB_REALLOC_POSIX
-GNULIB_REALLOCARRAY
-GNULIB_RANDOM_R
-GNULIB_RANDOM
-GNULIB_QSORT_R
-GNULIB_PUTENV
-GNULIB_PTSNAME_R
-GNULIB_PTSNAME
-GNULIB_POSIX_OPENPT
-GNULIB_MKSTEMPS
-GNULIB_MKSTEMP
-GNULIB_MKOSTEMPS
-GNULIB_MKOSTEMP
-GNULIB_MKDTEMP
-GNULIB_MBTOWC
-GNULIB_MALLOC_POSIX
-GNULIB_GRANTPT
-GNULIB_GETSUBOPT
-GNULIB_GETLOADAVG
-GNULIB_CANONICALIZE_FILE_NAME
-GNULIB_CALLOC_POSIX
-GNULIB_ATOLL
-GNULIB__EXIT
+GL_GNULIB_MDA_STRDUP
+GL_GNULIB_MDA_MEMCCPY
+GL_GNULIB_STRVERSCMP
+GL_GNULIB_STRSIGNAL
+GL_GNULIB_SIGDESCR_NP
+GL_GNULIB_SIGABBREV_NP
+GL_GNULIB_STRERRORNAME_NP
+GL_GNULIB_STRERROR_R
+GL_GNULIB_STRERROR
+GL_GNULIB_MBSTOK_R
+GL_GNULIB_MBSSEP
+GL_GNULIB_MBSSPN
+GL_GNULIB_MBSPBRK
+GL_GNULIB_MBSCSPN
+GL_GNULIB_MBSCASESTR
+GL_GNULIB_MBSPCASECMP
+GL_GNULIB_MBSNCASECMP
+GL_GNULIB_MBSCASECMP
+GL_GNULIB_MBSSTR
+GL_GNULIB_MBSRCHR
+GL_GNULIB_MBSCHR
+GL_GNULIB_MBSNLEN
+GL_GNULIB_MBSLEN
+GL_GNULIB_STRTOK_R
+GL_GNULIB_STRCASESTR
+GL_GNULIB_STRSTR
+GL_GNULIB_STRSEP
+GL_GNULIB_STRPBRK
+GL_GNULIB_STRNLEN
+GL_GNULIB_STRNDUP
+GL_GNULIB_STRNCAT
+GL_GNULIB_STRDUP
+GL_GNULIB_STRCHRNUL
+GL_GNULIB_STPNCPY
+GL_GNULIB_STPCPY
+GL_GNULIB_RAWMEMCHR
+GL_GNULIB_MEMRCHR
+GL_GNULIB_MEMPCPY
+GL_GNULIB_MEMMEM
+GL_GNULIB_MEMCHR
+GL_GNULIB_FFSLL
+GL_GNULIB_FFSL
+GL_GNULIB_EXPLICIT_BZERO
+HAVE_VISIBILITY
+CFLAG_VISIBILITY
+LIB_MBRTOWC
 SED
+LTLIBMULTITHREAD
+LIBMULTITHREAD
+LTLIBTHREAD
+LIBTHREAD
+LIBSTDTHREAD
+GL_GNULIB_LOCALENAME
+GL_GNULIB_DUPLOCALE
+GL_GNULIB_SETLOCALE_NULL
+GL_GNULIB_SETLOCALE
+GL_GNULIB_LOCALECONV
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
 NEXT_LOCALE_H
 HAVE_XLOCALE_H
@@ -935,6 +1095,7 @@ STDDEF_H
 HAVE_WCHAR_T
 HAVE_MAX_ALIGN_T
 REPLACE_NULL
+LOCALENAME_ENHANCE_LOCALE_FUNCS
 REPLACE_STRUCT_LCONV
 REPLACE_FREELOCALE
 REPLACE_DUPLOCALE
@@ -944,11 +1105,8 @@ REPLACE_LOCALECONV
 HAVE_FREELOCALE
 HAVE_DUPLOCALE
 HAVE_NEWLOCALE
-GNULIB_LOCALENAME
-GNULIB_DUPLOCALE
-GNULIB_SETLOCALE
-GNULIB_LOCALECONV
 LOCALCHARSET_TESTS_ENVIRONMENT
+GL_GNULIB_NL_LANGINFO
 HAVE_LANGINFO_YESEXPR
 HAVE_LANGINFO_ERA
 HAVE_LANGINFO_ALTMON
@@ -959,7 +1117,16 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
 NEXT_LANGINFO_H
 REPLACE_NL_LANGINFO
 HAVE_NL_LANGINFO
-GNULIB_NL_LANGINFO
+LOCALE_ZH_CN
+LOCALE_FR_UTF8
+LOCALE_JA
+GL_GNULIB_TOWCTRANS
+GL_GNULIB_WCTRANS
+GL_GNULIB_ISWCTYPE
+GL_GNULIB_WCTYPE
+GL_GNULIB_ISWXDIGIT
+GL_GNULIB_ISWDIGIT
+GL_GNULIB_ISWBLANK
 REPLACE_TOWLOWER
 REPLACE_ISWCNTRL
 HAVE_WCTYPE_H
@@ -968,21 +1135,21 @@ NEXT_WCTYPE_H
 HAVE_CRTDEFS_H
 HAVE_WINT_T
 HAVE_ISWCNTRL
+REPLACE_ISWXDIGIT
+REPLACE_ISWDIGIT
 REPLACE_ISWBLANK
 HAVE_WCTRANS_T
 HAVE_WCTYPE_T
 HAVE_ISWBLANK
-GNULIB_TOWCTRANS
-GNULIB_WCTRANS
-GNULIB_ISWCTYPE
-GNULIB_WCTYPE
-GNULIB_ISWBLANK
+GL_GNULIB_STRTOUMAX
+GL_GNULIB_STRTOIMAX
+GL_GNULIB_IMAXDIV
+GL_GNULIB_IMAXABS
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
 NEXT_INTTYPES_H
 UINT64_MAX_EQ_ULONG_MAX
 UINT32_MAX_LT_UINTMAX_MAX
 PRIPTR_PREFIX
-PRI_MACROS_BROKEN
 INT64_MAX_EQ_LONG_MAX
 INT32_MAX_LT_INTMAX_MAX
 REPLACE_STRTOUMAX
@@ -992,10 +1159,6 @@ HAVE_DECL_STRTOUMAX
 HAVE_DECL_STRTOIMAX
 HAVE_DECL_IMAXDIV
 HAVE_DECL_IMAXABS
-GNULIB_STRTOUMAX
-GNULIB_STRTOIMAX
-GNULIB_IMAXDIV
-GNULIB_IMAXABS
 GL_GENERATE_STDINT_H_FALSE
 GL_GENERATE_STDINT_H_TRUE
 STDINT_H
@@ -1022,9 +1185,7 @@ NEXT_STDINT_H
 HAVE_SYS_TYPES_H
 HAVE_INTTYPES_H
 HAVE_WCHAR_H
-HAVE_UNSIGNED_LONG_LONG_INT
-HAVE_LONG_LONG_INT
-GNULIB_OVERRIDES_WINT_T
+GNULIBHEADERS_OVERRIDE_WINT_T
 GL_GENERATE_LIMITS_H_FALSE
 GL_GENERATE_LIMITS_H_TRUE
 LIMITS_H
@@ -1032,6 +1193,7 @@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
 NEXT_LIMITS_H
 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
 NEXT_ICONV_H
+GL_GNULIB_ICONV
 GL_GENERATE_ICONV_H_FALSE
 GL_GENERATE_ICONV_H_TRUE
 ICONV_H
@@ -1039,36 +1201,18 @@ REPLACE_ICONV_UTF
 REPLACE_ICONV_OPEN
 REPLACE_ICONV
 ICONV_CONST
-GNULIB_ICONV
 LTLIBICONV
 LIBICONV
+HOST_CPU_C_ABI
+HOST_CPU
+LIB_HARD_LOCALE
+LIB_SETLOCALE_NULL
+LIB_SCHED_YIELD
+LIBPMULTITHREAD
+LIBPTHREAD
 GNU_MAKE_FALSE
 GNU_MAKE_TRUE
-REPLACE_LOCALTIME
-REPLACE_GMTIME
-REPLACE_TZSET
-REPLACE_TIMEGM
-REPLACE_STRFTIME
-REPLACE_NANOSLEEP
-REPLACE_MKTIME
-REPLACE_LOCALTIME_R
-REPLACE_CTIME
-HAVE_TIMEZONE_T
-HAVE_TZSET
-HAVE_TIMEGM
-HAVE_STRPTIME
-HAVE_NANOSLEEP
-HAVE_DECL_LOCALTIME_R
-GNULIB_TZSET
-GNULIB_TIME_RZ
-GNULIB_TIME_R
-GNULIB_TIMEGM
-GNULIB_STRPTIME
-GNULIB_STRFTIME
-GNULIB_NANOSLEEP
-GNULIB_LOCALTIME
-GNULIB_MKTIME
-GNULIB_CTIME
+GL_GNULIB_GETTIMEOFDAY
 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
 NEXT_SYS_TIME_H
 REPLACE_STRUCT_TIMEVAL
@@ -1076,29 +1220,53 @@ REPLACE_GETTIMEOFDAY
 HAVE_SYS_TIME_H
 HAVE_STRUCT_TIMEVAL
 HAVE_GETTIMEOFDAY
-GNULIB_GETTIMEOFDAY
 LTLIBINTL
 LIBINTL
-GNULIB_GL_UNISTD_H_GETOPT
+GL_GNULIB_GETRANDOM
+LIB_GETRANDOM
+REPLACE_GETRANDOM
+HAVE_GETRANDOM
 GETOPT_CDEFS_H
 GETOPT_H
 HAVE_SYS_CDEFS_H
 HAVE_GETOPT_H
 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
 NEXT_GETOPT_H
+GL_GNULIB_MDA_UMASK
+GL_GNULIB_MDA_MKDIR
+GL_GNULIB_MDA_CHMOD
+GL_GNULIB_OVERRIDES_STRUCT_STAT
+GL_GNULIB_UTIMENSAT
+GL_GNULIB_STAT
+GL_GNULIB_MKNODAT
+GL_GNULIB_MKNOD
+GL_GNULIB_MKFIFOAT
+GL_GNULIB_MKFIFO
+GL_GNULIB_MKDIRAT
+GL_GNULIB_MKDIR
+GL_GNULIB_LSTAT
+GL_GNULIB_LCHMOD
+GL_GNULIB_GETUMASK
+GL_GNULIB_FUTIMENS
+GL_GNULIB_FSTATAT
+GL_GNULIB_FSTAT
+GL_GNULIB_FCHMODAT
 WINDOWS_64_BIT_ST_SIZE
 WINDOWS_STAT_TIMESPEC
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
 NEXT_SYS_STAT_H
 REPLACE_UTIMENSAT
 REPLACE_STAT
+REPLACE_MKNODAT
 REPLACE_MKNOD
+REPLACE_MKFIFOAT
 REPLACE_MKFIFO
 REPLACE_MKDIR
 REPLACE_LSTAT
 REPLACE_FUTIMENS
 REPLACE_FSTATAT
 REPLACE_FSTAT
+REPLACE_FCHMODAT
 HAVE_UTIMENSAT
 HAVE_MKNODAT
 HAVE_MKNOD
@@ -1107,23 +1275,69 @@ HAVE_MKFIFO
 HAVE_MKDIRAT
 HAVE_LSTAT
 HAVE_LCHMOD
+HAVE_GETUMASK
 HAVE_FUTIMENS
 HAVE_FSTATAT
 HAVE_FCHMODAT
-GNULIB_OVERRIDES_STRUCT_STAT
-GNULIB_UTIMENSAT
-GNULIB_STAT
-GNULIB_MKNODAT
-GNULIB_MKNOD
-GNULIB_MKFIFOAT
-GNULIB_MKFIFO
-GNULIB_MKDIRAT
-GNULIB_LSTAT
-GNULIB_LCHMOD
-GNULIB_FUTIMENS
-GNULIB_FSTATAT
-GNULIB_FSTAT
-GNULIB_FCHMODAT
+GL_GNULIB_MDA_TEMPNAM
+GL_GNULIB_MDA_PUTW
+GL_GNULIB_MDA_GETW
+GL_GNULIB_MDA_FILENO
+GL_GNULIB_MDA_FDOPEN
+GL_GNULIB_MDA_FCLOSEALL
+GL_GNULIB_VSPRINTF_POSIX
+GL_GNULIB_VSNPRINTF
+GL_GNULIB_VPRINTF_POSIX
+GL_GNULIB_VPRINTF
+GL_GNULIB_VFPRINTF_POSIX
+GL_GNULIB_VFPRINTF
+GL_GNULIB_VDPRINTF
+GL_GNULIB_VSCANF
+GL_GNULIB_VFSCANF
+GL_GNULIB_VASPRINTF
+GL_GNULIB_TMPFILE
+GL_GNULIB_STDIO_H_SIGPIPE
+GL_GNULIB_STDIO_H_NONBLOCKING
+GL_GNULIB_SPRINTF_POSIX
+GL_GNULIB_SNPRINTF
+GL_GNULIB_SCANF
+GL_GNULIB_RENAMEAT
+GL_GNULIB_RENAME
+GL_GNULIB_REMOVE
+GL_GNULIB_PUTS
+GL_GNULIB_PUTCHAR
+GL_GNULIB_PUTC
+GL_GNULIB_PRINTF_POSIX
+GL_GNULIB_PRINTF
+GL_GNULIB_POPEN
+GL_GNULIB_PERROR
+GL_GNULIB_PCLOSE
+GL_GNULIB_OBSTACK_PRINTF_POSIX
+GL_GNULIB_OBSTACK_PRINTF
+GL_GNULIB_GETLINE
+GL_GNULIB_GETDELIM
+GL_GNULIB_GETCHAR
+GL_GNULIB_GETC
+GL_GNULIB_FWRITE
+GL_GNULIB_FTELLO
+GL_GNULIB_FTELL
+GL_GNULIB_FSEEKO
+GL_GNULIB_FSEEK
+GL_GNULIB_FSCANF
+GL_GNULIB_FREOPEN
+GL_GNULIB_FREAD
+GL_GNULIB_FPUTS
+GL_GNULIB_FPUTC
+GL_GNULIB_FPURGE
+GL_GNULIB_FPRINTF_POSIX
+GL_GNULIB_FPRINTF
+GL_GNULIB_FOPEN
+GL_GNULIB_FGETS
+GL_GNULIB_FGETC
+GL_GNULIB_FFLUSH
+GL_GNULIB_FDOPEN
+GL_GNULIB_FCLOSE
+GL_GNULIB_DPRINTF
 REPLACE_VSPRINTF
 REPLACE_VSNPRINTF
 REPLACE_VPRINTF
@@ -1172,59 +1386,8 @@ HAVE_DECL_GETDELIM
 HAVE_DECL_FTELLO
 HAVE_DECL_FSEEKO
 HAVE_DECL_FPURGE
-GNULIB_VSPRINTF_POSIX
-GNULIB_VSNPRINTF
-GNULIB_VPRINTF_POSIX
-GNULIB_VPRINTF
-GNULIB_VFPRINTF_POSIX
-GNULIB_VFPRINTF
-GNULIB_VDPRINTF
-GNULIB_VSCANF
-GNULIB_VFSCANF
-GNULIB_VASPRINTF
-GNULIB_TMPFILE
-GNULIB_STDIO_H_SIGPIPE
-GNULIB_STDIO_H_NONBLOCKING
-GNULIB_SPRINTF_POSIX
-GNULIB_SNPRINTF
-GNULIB_SCANF
-GNULIB_RENAMEAT
-GNULIB_RENAME
-GNULIB_REMOVE
-GNULIB_PUTS
-GNULIB_PUTCHAR
-GNULIB_PUTC
-GNULIB_PRINTF_POSIX
-GNULIB_PRINTF
-GNULIB_POPEN
-GNULIB_PERROR
-GNULIB_PCLOSE
-GNULIB_OBSTACK_PRINTF_POSIX
-GNULIB_OBSTACK_PRINTF
-GNULIB_GETLINE
-GNULIB_GETDELIM
-GNULIB_GETCHAR
-GNULIB_GETC
-GNULIB_FWRITE
-GNULIB_FTELLO
-GNULIB_FTELL
-GNULIB_FSEEKO
-GNULIB_FSEEK
-GNULIB_FSCANF
-GNULIB_FREOPEN
-GNULIB_FREAD
-GNULIB_FPUTS
-GNULIB_FPUTC
-GNULIB_FPURGE
-GNULIB_FPRINTF_POSIX
-GNULIB_FPRINTF
-GNULIB_FOPEN
-GNULIB_FGETS
-GNULIB_FGETC
-GNULIB_FFLUSH
-GNULIB_FDOPEN
-GNULIB_FCLOSE
-GNULIB_DPRINTF
+HAVE_DECL_FCLOSEALL
+GL_GNULIB_FNMATCH
 GL_GENERATE_FNMATCH_H_FALSE
 GL_GENERATE_FNMATCH_H_TRUE
 FNMATCH_H
@@ -1233,7 +1396,6 @@ NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
 NEXT_FNMATCH_H
 REPLACE_FNMATCH
 HAVE_FNMATCH
-GNULIB_FNMATCH
 REPLACE_ITOLD
 GL_GENERATE_FLOAT_H_FALSE
 GL_GENERATE_FLOAT_H_TRUE
@@ -1242,15 +1404,19 @@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
 NEXT_FLOAT_H
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
 NEXT_FCNTL_H
+GL_GNULIB_MDA_OPEN
+GL_GNULIB_MDA_CREAT
+GL_GNULIB_OPENAT
+GL_GNULIB_OPEN
+GL_GNULIB_NONBLOCKING
+GL_GNULIB_FCNTL
+GL_GNULIB_CREAT
 REPLACE_OPENAT
 REPLACE_OPEN
 REPLACE_FCNTL
+REPLACE_CREAT
 HAVE_OPENAT
 HAVE_FCNTL
-GNULIB_OPENAT
-GNULIB_OPEN
-GNULIB_NONBLOCKING
-GNULIB_FCNTL
 EOVERFLOW_VALUE
 EOVERFLOW_HIDDEN
 ENOLINK_VALUE
@@ -1262,6 +1428,7 @@ GL_GENERATE_ERRNO_H_TRUE
 ERRNO_H
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
 NEXT_ERRNO_H
+GL_GNULIB_ISBLANK
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
 NEXT_CTYPE_H
 PRAGMA_COLUMNS
@@ -1269,15 +1436,97 @@ PRAGMA_SYSTEM_HEADER
 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
 INCLUDE_NEXT
 HAVE_ISBLANK
-GNULIB_ISBLANK
+GL_GNULIB_MDA_WRITE
+GL_GNULIB_MDA_UNLINK
+GL_GNULIB_MDA_SWAB
+GL_GNULIB_MDA_RMDIR
+GL_GNULIB_MDA_READ
+GL_GNULIB_MDA_LSEEK
+GL_GNULIB_MDA_ISATTY
+GL_GNULIB_MDA_GETPID
+GL_GNULIB_MDA_GETCWD
+GL_GNULIB_MDA_EXECVPE
+GL_GNULIB_MDA_EXECVP
+GL_GNULIB_MDA_EXECVE
+GL_GNULIB_MDA_EXECV
+GL_GNULIB_MDA_EXECLP
+GL_GNULIB_MDA_EXECLE
+GL_GNULIB_MDA_EXECL
+GL_GNULIB_MDA_DUP2
+GL_GNULIB_MDA_DUP
+GL_GNULIB_MDA_CLOSE
+GL_GNULIB_MDA_CHDIR
+GL_GNULIB_MDA_ACCESS
+GL_GNULIB_WRITE
+GL_GNULIB_USLEEP
+GL_GNULIB_UNLINKAT
+GL_GNULIB_UNLINK
+GL_GNULIB_UNISTD_H_SIGPIPE
+GL_GNULIB_UNISTD_H_NONBLOCKING
+GL_GNULIB_UNISTD_H_GETOPT
+GL_GNULIB_TTYNAME_R
+GL_GNULIB_TRUNCATE
+GL_GNULIB_SYMLINKAT
+GL_GNULIB_SYMLINK
+GL_GNULIB_SLEEP
+GL_GNULIB_SETHOSTNAME
+GL_GNULIB_RMDIR
+GL_GNULIB_READLINKAT
+GL_GNULIB_READLINK
+GL_GNULIB_READ
+GL_GNULIB_PWRITE
+GL_GNULIB_PREAD
+GL_GNULIB_PIPE2
+GL_GNULIB_PIPE
+GL_GNULIB_LSEEK
+GL_GNULIB_LINKAT
+GL_GNULIB_LINK
+GL_GNULIB_LCHOWN
+GL_GNULIB_ISATTY
+GL_GNULIB_GROUP_MEMBER
+GL_GNULIB_GETUSERSHELL
+GL_GNULIB_GETPASS
+GL_GNULIB_GETPAGESIZE
+GL_GNULIB_GETOPT_POSIX
+GL_GNULIB_GETLOGIN_R
+GL_GNULIB_GETLOGIN
+GL_GNULIB_GETHOSTNAME
+GL_GNULIB_GETGROUPS
+GL_GNULIB_GETENTROPY
+GL_GNULIB_GETDTABLESIZE
+GL_GNULIB_GETDOMAINNAME
+GL_GNULIB_GETCWD
+GL_GNULIB_FTRUNCATE
+GL_GNULIB_FSYNC
+GL_GNULIB_FDATASYNC
+GL_GNULIB_FCHOWNAT
+GL_GNULIB_FCHDIR
+GL_GNULIB_FACCESSAT
+GL_GNULIB_EXECVPE
+GL_GNULIB_EXECVP
+GL_GNULIB_EXECVE
+GL_GNULIB_EXECV
+GL_GNULIB_EXECLP
+GL_GNULIB_EXECLE
+GL_GNULIB_EXECL
+GL_GNULIB_EUIDACCESS
+GL_GNULIB_ENVIRON
+GL_GNULIB_DUP3
+GL_GNULIB_DUP2
+GL_GNULIB_DUP
+GL_GNULIB_COPY_FILE_RANGE
+GL_GNULIB_CLOSE
+GL_GNULIB_CHOWN
+GL_GNULIB_CHDIR
+GL_GNULIB_ACCESS
 HAVE_WINSOCK2_H
 REPLACE_IOCTL
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 SYS_IOCTL_H_HAVE_WINSOCK2_H
-GNULIB_IOCTL
 HAVE_MSVC_INVALID_PARAMETER_HANDLER
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
+UNISTD_H_HAVE_SYS_RANDOM_H
 REPLACE_WRITE
 REPLACE_USLEEP
 REPLACE_UNLINKAT
@@ -1308,10 +1557,18 @@ REPLACE_GETCWD
 REPLACE_FTRUNCATE
 REPLACE_FCHOWNAT
 REPLACE_FACCESSAT
+REPLACE_EXECVPE
+REPLACE_EXECVP
+REPLACE_EXECVE
+REPLACE_EXECV
+REPLACE_EXECLP
+REPLACE_EXECLE
+REPLACE_EXECL
 REPLACE_DUP2
 REPLACE_DUP
 REPLACE_CLOSE
 REPLACE_CHOWN
+REPLACE_ACCESS
 HAVE_SYS_PARAM_H
 HAVE_OS_H
 HAVE_DECL_TTYNAME_R
@@ -1324,6 +1581,7 @@ HAVE_DECL_GETLOGIN
 HAVE_DECL_GETDOMAINNAME
 HAVE_DECL_FDATASYNC
 HAVE_DECL_FCHDIR
+HAVE_DECL_EXECVPE
 HAVE_DECL_ENVIRON
 HAVE_USLEEP
 HAVE_UNLINKAT
@@ -1346,6 +1604,7 @@ HAVE_GETPAGESIZE
 HAVE_GETLOGIN
 HAVE_GETHOSTNAME
 HAVE_GETGROUPS
+HAVE_GETENTROPY
 HAVE_GETDTABLESIZE
 HAVE_FTRUNCATE
 HAVE_FSYNC
@@ -1353,68 +1612,175 @@ HAVE_FDATASYNC
 HAVE_FCHOWNAT
 HAVE_FCHDIR
 HAVE_FACCESSAT
+HAVE_EXECVPE
 HAVE_EUIDACCESS
 HAVE_DUP3
-HAVE_DUP2
+HAVE_COPY_FILE_RANGE
 HAVE_CHOWN
-GNULIB_WRITE
-GNULIB_USLEEP
-GNULIB_UNLINKAT
-GNULIB_UNLINK
-GNULIB_UNISTD_H_SIGPIPE
-GNULIB_UNISTD_H_NONBLOCKING
-GNULIB_TTYNAME_R
-GNULIB_TRUNCATE
-GNULIB_SYMLINKAT
-GNULIB_SYMLINK
-GNULIB_SLEEP
-GNULIB_SETHOSTNAME
-GNULIB_RMDIR
-GNULIB_READLINKAT
-GNULIB_READLINK
-GNULIB_READ
-GNULIB_PWRITE
-GNULIB_PREAD
-GNULIB_PIPE2
-GNULIB_PIPE
-GNULIB_LSEEK
-GNULIB_LINKAT
-GNULIB_LINK
-GNULIB_LCHOWN
-GNULIB_ISATTY
-GNULIB_GROUP_MEMBER
-GNULIB_GETUSERSHELL
-GNULIB_GETPASS
-GNULIB_GETPAGESIZE
-GNULIB_GETLOGIN_R
-GNULIB_GETLOGIN
-GNULIB_GETHOSTNAME
-GNULIB_GETGROUPS
-GNULIB_GETDTABLESIZE
-GNULIB_GETDOMAINNAME
-GNULIB_GETCWD
-GNULIB_FTRUNCATE
-GNULIB_FSYNC
-GNULIB_FDATASYNC
-GNULIB_FCHOWNAT
-GNULIB_FCHDIR
-GNULIB_FACCESSAT
-GNULIB_EUIDACCESS
-GNULIB_ENVIRON
-GNULIB_DUP3
-GNULIB_DUP2
-GNULIB_DUP
-GNULIB_CLOSE
-GNULIB_CHOWN
-GNULIB_CHDIR
 LIB_CLOCK_GETTIME
+GL_GNULIB_MDA_PUTENV
+GL_GNULIB_MDA_MKTEMP
+GL_GNULIB_MDA_GCVT
+GL_GNULIB_MDA_FCVT
+GL_GNULIB_MDA_ECVT
+GL_GNULIB_WCTOMB
+GL_GNULIB_UNSETENV
+GL_GNULIB_UNLOCKPT
+GL_GNULIB_SYSTEM_POSIX
+GL_GNULIB_STRTOULL
+GL_GNULIB_STRTOUL
+GL_GNULIB_STRTOLL
+GL_GNULIB_STRTOLD
+GL_GNULIB_STRTOL
+GL_GNULIB_STRTOD
+GL_GNULIB_SETENV
+GL_GNULIB_SECURE_GETENV
+GL_GNULIB_RPMATCH
+GL_GNULIB_REALPATH
+GL_GNULIB_REALLOC_POSIX
+GL_GNULIB_REALLOCARRAY
+GL_GNULIB_RANDOM_R
+GL_GNULIB_RANDOM
+GL_GNULIB_QSORT_R
+GL_GNULIB_PUTENV
+GL_GNULIB_PTSNAME_R
+GL_GNULIB_PTSNAME
+GL_GNULIB_POSIX_OPENPT
+GL_GNULIB_POSIX_MEMALIGN
+GL_GNULIB_MKSTEMPS
+GL_GNULIB_MKSTEMP
+GL_GNULIB_MKOSTEMPS
+GL_GNULIB_MKOSTEMP
+GL_GNULIB_MKDTEMP
+GL_GNULIB_MBTOWC
+GL_GNULIB_MALLOC_POSIX
+GL_GNULIB_GRANTPT
+GL_GNULIB_GETSUBOPT
+GL_GNULIB_GETLOADAVG
+GL_GNULIB_FREE_POSIX
+GL_GNULIB_CANONICALIZE_FILE_NAME
+GL_GNULIB_CALLOC_POSIX
+GL_GNULIB_ATOLL
+GL_GNULIB_ALIGNED_ALLOC
+GL_GNULIB__EXIT
+REPLACE_WCTOMB
+REPLACE_UNSETENV
+REPLACE_STRTOULL
+REPLACE_STRTOUL
+REPLACE_STRTOLL
+REPLACE_STRTOLD
+REPLACE_STRTOL
+REPLACE_STRTOD
+REPLACE_SETSTATE
+REPLACE_SETENV
+REPLACE_REALPATH
+REPLACE_REALLOCARRAY
+REPLACE_REALLOC
+REPLACE_RANDOM_R
+REPLACE_RANDOM
+REPLACE_QSORT_R
+REPLACE_PUTENV
+REPLACE_PTSNAME_R
+REPLACE_PTSNAME
+REPLACE_POSIX_MEMALIGN
+REPLACE_MKSTEMP
+REPLACE_MBTOWC
+REPLACE_MALLOC
+REPLACE_INITSTATE
+REPLACE_FREE
+REPLACE_CANONICALIZE_FILE_NAME
+REPLACE_CALLOC
+REPLACE_ALIGNED_ALLOC
+HAVE_DECL_UNSETENV
+HAVE_UNLOCKPT
+HAVE_SYS_LOADAVG_H
+HAVE_STRUCT_RANDOM_DATA
+HAVE_STRTOULL
+HAVE_STRTOUL
+HAVE_STRTOLL
+HAVE_STRTOLD
+HAVE_STRTOL
+HAVE_STRTOD
+HAVE_DECL_SETSTATE
+HAVE_SETSTATE
+HAVE_DECL_SETENV
+HAVE_SETENV
+HAVE_SECURE_GETENV
+HAVE_RPMATCH
+HAVE_REALPATH
+HAVE_REALLOCARRAY
+HAVE_RANDOM_R
+HAVE_RANDOM_H
+HAVE_RANDOM
+HAVE_QSORT_R
+HAVE_PTSNAME_R
+HAVE_PTSNAME
+HAVE_POSIX_OPENPT
+HAVE_POSIX_MEMALIGN
+HAVE_MKSTEMPS
+HAVE_MKSTEMP
+HAVE_MKOSTEMPS
+HAVE_MKOSTEMP
+HAVE_MKDTEMP
+HAVE_MBTOWC
+HAVE_DECL_INITSTATE
+HAVE_INITSTATE
+HAVE_GRANTPT
+HAVE_GETSUBOPT
+HAVE_DECL_GETLOADAVG
+HAVE_DECL_GCVT
+HAVE_DECL_FCVT
+HAVE_DECL_ECVT
+HAVE_CANONICALIZE_FILE_NAME
+HAVE_ATOLL
+HAVE_ALIGNED_ALLOC
+HAVE__EXIT
 LTLIBCSTACK
 LIBCSTACK
-LIBSIGSEGV_PREFIX
-LTLIBSIGSEGV
-LIBSIGSEGV
-HAVE_LIBSIGSEGV
+GL_GNULIB_MDA_WCSDUP
+GL_GNULIB_WCSFTIME
+GL_GNULIB_WCSWIDTH
+GL_GNULIB_WCSTOK
+GL_GNULIB_WCSSTR
+GL_GNULIB_WCSPBRK
+GL_GNULIB_WCSSPN
+GL_GNULIB_WCSCSPN
+GL_GNULIB_WCSRCHR
+GL_GNULIB_WCSCHR
+GL_GNULIB_WCSDUP
+GL_GNULIB_WCSXFRM
+GL_GNULIB_WCSCOLL
+GL_GNULIB_WCSNCASECMP
+GL_GNULIB_WCSCASECMP
+GL_GNULIB_WCSNCMP
+GL_GNULIB_WCSCMP
+GL_GNULIB_WCSNCAT
+GL_GNULIB_WCSCAT
+GL_GNULIB_WCPNCPY
+GL_GNULIB_WCSNCPY
+GL_GNULIB_WCPCPY
+GL_GNULIB_WCSCPY
+GL_GNULIB_WCSNLEN
+GL_GNULIB_WCSLEN
+GL_GNULIB_WMEMSET
+GL_GNULIB_WMEMPCPY
+GL_GNULIB_WMEMMOVE
+GL_GNULIB_WMEMCPY
+GL_GNULIB_WMEMCMP
+GL_GNULIB_WMEMCHR
+GL_GNULIB_WCWIDTH
+GL_GNULIB_WCSNRTOMBS
+GL_GNULIB_WCSRTOMBS
+GL_GNULIB_WCRTOMB
+GL_GNULIB_MBSNRTOWCS
+GL_GNULIB_MBSRTOWCS
+GL_GNULIB_MBRLEN
+GL_GNULIB_MBRTOWC
+GL_GNULIB_MBSINIT
+GL_GNULIB_WCTOB
+GL_GNULIB_BTOWC
 LOCALE_FR
+REPLACE_WCSTOK
 REPLACE_WCSFTIME
 REPLACE_WCSWIDTH
 REPLACE_WCWIDTH
@@ -1430,6 +1796,7 @@ REPLACE_WCTOB
 REPLACE_BTOWC
 REPLACE_MBSTATE_T
 HAVE_DECL_WCWIDTH
+HAVE_DECL_WCSDUP
 HAVE_DECL_WCTOB
 HAVE_WCSFTIME
 HAVE_WCSWIDTH
@@ -1456,6 +1823,7 @@ HAVE_WCSCPY
 HAVE_WCSNLEN
 HAVE_WCSLEN
 HAVE_WMEMSET
+HAVE_WMEMPCPY
 HAVE_WMEMMOVE
 HAVE_WMEMCPY
 HAVE_WMEMCMP
@@ -1469,52 +1837,18 @@ HAVE_MBRLEN
 HAVE_MBRTOWC
 HAVE_MBSINIT
 HAVE_BTOWC
-GNULIB_WCSFTIME
-GNULIB_WCSWIDTH
-GNULIB_WCSTOK
-GNULIB_WCSSTR
-GNULIB_WCSPBRK
-GNULIB_WCSSPN
-GNULIB_WCSCSPN
-GNULIB_WCSRCHR
-GNULIB_WCSCHR
-GNULIB_WCSDUP
-GNULIB_WCSXFRM
-GNULIB_WCSCOLL
-GNULIB_WCSNCASECMP
-GNULIB_WCSCASECMP
-GNULIB_WCSNCMP
-GNULIB_WCSCMP
-GNULIB_WCSNCAT
-GNULIB_WCSCAT
-GNULIB_WCPNCPY
-GNULIB_WCSNCPY
-GNULIB_WCPCPY
-GNULIB_WCSCPY
-GNULIB_WCSNLEN
-GNULIB_WCSLEN
-GNULIB_WMEMSET
-GNULIB_WMEMMOVE
-GNULIB_WMEMCPY
-GNULIB_WMEMCMP
-GNULIB_WMEMCHR
-GNULIB_WCWIDTH
-GNULIB_WCSNRTOMBS
-GNULIB_WCSRTOMBS
-GNULIB_WCRTOMB
-GNULIB_MBSNRTOWCS
-GNULIB_MBSRTOWCS
-GNULIB_MBRLEN
-GNULIB_MBRTOWC
-GNULIB_MBSINIT
-GNULIB_WCTOB
-GNULIB_BTOWC
+HAVE_ALLOCA_H
 GL_GENERATE_ALLOCA_H_FALSE
 GL_GENERATE_ALLOCA_H_TRUE
 ALLOCA_H
 ALLOCA
 GL_COND_LIBTOOL_FALSE
 GL_COND_LIBTOOL_TRUE
+ARFLAGS
+AR
+EGREP
+GREP
+CPP
 host_os
 host_vendor
 host_cpu
@@ -1523,11 +1857,6 @@ build_os
 build_vendor
 build_cpu
 build
-ARFLAGS
-AR
-EGREP
-GREP
-CPP
 RANLIB
 HELP2MAN
 am__fastdepCC_FALSE
@@ -1550,6 +1879,9 @@ AM_BACKSLASH
 AM_DEFAULT_VERBOSITY
 AM_DEFAULT_V
 AM_V
+CSCOPE
+ETAGS
+CTAGS
 am__untar
 am__tar
 AMTAR
@@ -1619,11 +1951,15 @@ enable_option_checking
 enable_silent_rules
 enable_dependency_tracking
 enable_largefile
+enable_year2038
+enable_threads
+enable_cross_guesses
 with_gnu_ld
 enable_rpath
-with_libsigsegv_prefix
 with_libiconv_prefix
 with_included_regex
+with_libsigsegv
+with_libsigsegv_prefix
 with_packager
 with_packager_version
 with_packager_bug_reports
@@ -1708,8 +2044,6 @@ do
   *)    ac_optarg=yes ;;
   esac
 
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
   case $ac_dashdash$ac_option in
   --)
     ac_dashdash=yes ;;
@@ -2190,7 +2524,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 diffutils 3.7 to adapt to many kinds of systems.
+\`configure' configures GNU diffutils 3.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -2261,7 +2595,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU diffutils 3.7:";;
+     short | recursive ) echo "Configuration of GNU diffutils 3.8:";;
    esac
   cat <<\_ACEOF
 
@@ -2276,6 +2610,12 @@ 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
+  --enable-cross-guesses={conservative|risky}
+                          specify policy for cross-compilation guesses
   --disable-rpath         do not hardcode runtime library paths
   --enable-gcc-warnings   turn on lots of GCC warnings (for developers)
   --disable-nls           do not use Native Language Support
@@ -2284,14 +2624,16 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
-  --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
   --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --without-included-regex
                           don't compile regex; this is the default on systems
                           with recent-enough versions of the GNU C Library
                           (use with caution on other systems).
+  --with-libsigsegv       use the GNU libsigsegv library, when present,
+                          instead of the gnulib module 'sigsegv'
+  --with-libsigsegv-prefix[=DIR]  search for libsigsegv in DIR/include and DIR/lib
+  --without-libsigsegv-prefix     don't search for libsigsegv in includedir and libdir
   --with-packager         String identifying the packager of this software
   --with-packager-version Packager-specific version information
   --with-packager-bug-reports
@@ -2360,7 +2702,8 @@ esac
 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
     cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
+    # Check for configure.gnu first; this name is used for a wrapper for
+    # Metaconfig's "Configure" on case-insensitive file systems.
     if test -f "$ac_srcdir/configure.gnu"; then
       echo &&
       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
@@ -2377,10 +2720,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU diffutils configure 3.7
-generated by GNU Autoconf 2.69.197-b8fd7
+GNU diffutils configure 3.8
+generated by GNU Autoconf 2.71
 
-Copyright (C) 2017 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -2397,7 +2740,7 @@ fi
 ac_fn_c_try_compile ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
+  rm -f conftest.$ac_objext conftest.beam
   if { { ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -2419,7 +2762,7 @@ printf "%s\n" "$ac_try_echo"; } >&5
        } && test -s conftest.$ac_objext
 then :
   ac_retval=0
-else
+else $as_nop
   printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -2442,7 +2785,7 @@ printf %s "checking for $2... " >&6; }
 if eval test \${$3+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
@@ -2451,10 +2794,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$3
               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2490,7 +2833,7 @@ printf "%s\n" "$ac_try_echo"; } >&5
        }
 then :
   ac_retval=0
-else
+else $as_nop
   printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -2513,7 +2856,7 @@ printf %s "checking for $2... " >&6; }
 if eval test \${$3+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   eval "$3=no"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -2544,12 +2887,12 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-else
+else $as_nop
   eval "$3=yes"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$3
               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2564,7 +2907,7 @@ printf "%s\n" "$ac_res" >&6; }
 ac_fn_c_try_link ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
+  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
   if { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -2589,7 +2932,7 @@ printf "%s\n" "$ac_try_echo"; } >&5
        }
 then :
   ac_retval=0
-else
+else $as_nop
   printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -2605,6 +2948,49 @@ fi
 
 } # ac_fn_c_try_link
 
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+then :
+  ac_retval=0
+else $as_nop
+  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+       printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2616,7 +3002,7 @@ printf %s "checking for $2... " >&6; }
 if eval test \${$3+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
@@ -2654,10 +3040,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   eval "$3=yes"
-else
+else $as_nop
   eval "$3=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 eval ac_res=\$$3
@@ -2667,101 +3053,6 @@ printf "%s\n" "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
-# executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-printf "%s\n" "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-then :
-  ac_retval=0
-else
-  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
-       printf "%s\n" "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
-      as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-printf %s "checking whether $as_decl_name is declared... " >&6; }
-if eval test \${$3+y}
-then :
-  printf %s "(cached) " >&6
-else
-  ac_save_werror_flag=$ac_c_werror_flag
-  ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main (void)
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_c_werror_flag=$ac_save_werror_flag
-fi
-eval ac_res=\$$3
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -2807,7 +3098,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_hi=$ac_mid; break
-else
+else $as_nop
   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
                        if test $ac_lo -le $ac_mid; then
                          ac_lo= ac_hi=
@@ -2815,9 +3106,9 @@ else
                        fi
                        as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   done
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
@@ -2853,7 +3144,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_lo=$ac_mid; break
-else
+else $as_nop
   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
                        if test $ac_mid -le $ac_hi; then
                          ac_lo= ac_hi=
@@ -2861,14 +3152,14 @@ else
                        fi
                        as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   done
-else
+else $as_nop
   ac_lo= ac_hi=
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 # Binary search between lo and hi bounds.
 while test "x$ac_lo" != "x$ac_hi"; do
   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
@@ -2889,10 +3180,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_hi=$ac_mid
-else
+else $as_nop
   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 done
 case $ac_lo in #((
 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
@@ -2902,8 +3193,8 @@ esac
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -2938,7 +3229,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
+else $as_nop
   ac_retval=1
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -2951,6 +3242,63 @@ rm -f conftest.val
 
 } # ac_fn_c_compute_int
 
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
+{
+  ac_save_ac_compile="$ac_compile"
+  if test -n "$ac_compile_for_check_decl"; then
+    ac_compile="$ac_compile_for_check_decl"
+  fi
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  eval ac_save_FLAGS=\$$6
+  as_fn_append $6 " $5"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main (void)
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  eval "$3=yes"
+else $as_nop
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  eval $6=\$ac_save_FLAGS
+
+fi
+eval ac_res=\$$3
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  ac_compile="$ac_save_ac_compile"
+
+} # ac_fn_check_decl
+
 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
 # ----------------------------------------------------
 # Tries to find if the field MEMBER exists in type AGGR, after including
@@ -2963,7 +3311,7 @@ printf %s "checking for $2.$3... " >&6; }
 if eval test \${$4+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $5
@@ -2980,7 +3328,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   eval "$4=yes"
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $5
@@ -2997,12 +3345,12 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   eval "$4=yes"
-else
+else $as_nop
   eval "$4=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$4
               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -3034,8 +3382,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 diffutils $as_me 3.7, which was
-generated by GNU Autoconf 2.69.197-b8fd7.  Invocation command line was
+It was created by GNU diffutils $as_me 3.8, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
 
@@ -3260,26 +3608,23 @@ printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
 
 # Let the site file select an alternate cache file if it wants to.
 # Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
+  ac_site_files="$CONFIG_SITE"
 elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
+  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
 else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
+  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+
+for ac_site_file in $ac_site_files
 do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+  case $ac_site_file in #(
+  */*) :
+     ;; #(
+  *) :
+    ac_site_file=./$ac_site_file ;;
+esac
+  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
@@ -3308,32 +3653,335 @@ printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
-as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
-as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
-as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+   Do not test the value of __STDC__, because some compilers set it to 0
+   while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+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;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* 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
+   as an "x".  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
+   array size at least.  It is necessary to write \x00 == 0 to get something
+   that is true only with -std.  */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+               int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+  #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str = "";
+  int number = 0;
+  float fnumber = 0;
+
+  while (*format)
+    {
+      switch (*format++)
+       {
+       case '\''s'\'': // string
+         str = va_arg (args_copy, const char *);
+         break;
+       case '\''d'\'': // int
+         number = va_arg (args_copy, int);
+         break;
+       case '\''f'\'': // float
+         fnumber = va_arg (args_copy, double);
+         break;
+       default:
+         break;
+       }
+    }
+  va_end (args_copy);
+  va_end (args);
+
+  return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+  // Check bool.
+  _Bool success = false;
+  success |= (argc != 0);
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+  test_varargs_macros ();
+
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
+
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[0] = argv[0][0];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+        || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+  int_alignment = _Alignof (int),
+  int_array_alignment = _Alignof (int[100]),
+  char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+  int x;
+  _Static_assert (sizeof (int) <= sizeof (long int),
+                  "_Static_assert does not work in struct");
+  long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+  union {
+    struct { int i; int j; };
+    struct { int k; long int l; } w;
+  };
+  int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+  _Static_assert ((offsetof (struct anonymous, i)
+                  == offsetof (struct anonymous, w.k)),
+                 "Anonymous union alignment botch");
+  v1.i = 2;
+  v1.w.k = 5;
+  ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  ${ac_c_conftest_c11_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  ${ac_c_conftest_c99_main}
+  return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+  int ok = 0;
+  ${ac_c_conftest_c89_main}
+  return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
 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 " setrlimit HAVE_SETRLIMIT"
-as_fn_append ac_header_c_list " ucontext.h ucontext_h HAVE_UCONTEXT_H"
-as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
 as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT"
 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 " strerror_r HAVE_STRERROR_R"
 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 " 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 " isblank HAVE_ISBLANK"
-as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
-as_fn_append ac_func_c_list " wmemchr HAVE_WMEMCHR"
-as_fn_append ac_func_c_list " wmemcpy HAVE_WMEMCPY"
-as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
-as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
 gl_fnmatch_required=GNU
 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
 gl_getopt_required=GNU
@@ -3341,13 +3989,16 @@ 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_func_c_list " getrandom HAVE_GETRANDOM"
 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
+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"
 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
-as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+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"
@@ -3358,18 +4009,20 @@ 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 " mkstemp HAVE_MKSTEMP"
-as_fn_append ac_func_c_list " tzset HAVE_TZSET"
 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
+as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
-as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
-as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
+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_func_c_list " strerror_r HAVE_STRERROR_R"
 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
-as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
-as_fn_append ac_func_c_list " strtoumax HAVE_STRTOUMAX"
+as_fn_append ac_func_c_list " strtoimax HAVE_STRTOIMAX"
+as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H"
 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
 as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
@@ -3378,13 +4031,19 @@ as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
 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 " 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_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
+as_fn_append ac_header_c_list " pthread.h pthread_h HAVE_PTHREAD_H"
+as_fn_append ac_func_c_list " pthread_sigmask HAVE_PTHREAD_SIGMASK"
+as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
+as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
 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"
@@ -3398,6 +4057,104 @@ as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
 as_fn_append ac_func_c_list " fork HAVE_FORK"
 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
 gt_needs="$gt_needs need-ngettext"
+
+# Auxiliary files required by this configure script.
+ac_aux_files="config.rpath config.guess config.sub compile missing install-sh"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+  as_found=:
+
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
+  ac_aux_dir_found=yes
+  ac_install_sh=
+  for ac_aux in $ac_aux_files
+  do
+    # As a special case, if "install-sh" is required, that requirement
+    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+    # and $ac_install_sh is set appropriately for whichever one is found.
+    if test x"$ac_aux" = x"install-sh"
+    then
+      if test -f "${as_dir}install-sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
+        ac_install_sh="${as_dir}install-sh -c"
+      elif test -f "${as_dir}install.sh"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
+        ac_install_sh="${as_dir}install.sh -c"
+      elif test -f "${as_dir}shtool"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
+        ac_install_sh="${as_dir}shtool install -c"
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+        else
+          break
+        fi
+      fi
+    else
+      if test -f "${as_dir}${ac_aux}"; then
+        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
+      else
+        ac_aux_dir_found=no
+        if $ac_first_candidate; then
+          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+        else
+          break
+        fi
+      fi
+    fi
+  done
+  if test "$ac_aux_dir_found" = yes; then
+    ac_aux_dir="$as_dir"
+    break
+  fi
+  ac_first_candidate=false
+
+  as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+  ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
@@ -3453,7 +4210,8 @@ if $ac_cache_corrupted; then
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+           and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -3468,41 +4226,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-ac_aux_dir=
-for ac_dir in build-aux "$srcdir"/build-aux
-do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
-fi
 
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
+am__api_version='1.16'
 
 
-am__api_version='1.16'
 
-# Find a good install program.  We prefer a C program (faster),
+  # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
 # SysV /etc/install, /usr/sbin/install
@@ -3522,7 +4253,7 @@ if test -z "$INSTALL"; then
 if test ${ac_cv_path_install+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
@@ -3677,16 +4408,13 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
 
+
 # Expand $ac_aux_dir to an absolute path.
 am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
-if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+
+  if test x"${MISSING+set}" != xset; then
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -3719,7 +4447,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_STRIP+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
@@ -3764,7 +4492,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_STRIP+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_STRIP"; then
   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
 else
@@ -3816,13 +4544,14 @@ fi
 fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
-printf %s "checking for a thread-safe mkdir -p... " >&6; }
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
   if test ${ac_cv_path_mkdir+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
 do
@@ -3872,7 +4601,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_AWK+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
@@ -3917,7 +4646,7 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat >conftest.make <<\_ACEOF
 SHELL = /bin/sh
 all:
@@ -3968,7 +4697,7 @@ printf %s "checking whether $am_make supports nested variables... " >&6; }
 if test ${am_cv_make_support_nested_variables+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if printf "%s\n" 'TRUE=$(BAR$(V))
 BAR0=false
 BAR1=true
@@ -4014,7 +4743,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='diffutils'
- VERSION='3.7'
+ VERSION='3.8'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -4060,6 +4789,20 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+  CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+  ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+  CSCOPE=cscope
+fi
+
+
 
 # POSIX will say in a future version that running "rm -f" with no argument
 # is OK; and we want to be able to make that assumption in our Makefile
@@ -4120,7 +4863,7 @@ printf %s "checking whether $am_make supports nested variables... " >&6; }
 if test ${am_cv_make_support_nested_variables+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if printf "%s\n" 'TRUE=$(BAR$(V))
 BAR0=false
 BAR1=true
@@ -4157,7 +4900,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_AWK+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
@@ -4195,6 +4938,15 @@ fi
   test -n "$AWK" && break
 done
 
+
+
+
+
+
+
+
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4208,7 +4960,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -4253,7 +5005,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -4311,7 +5063,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -4356,7 +5108,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -4420,7 +5172,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -4469,7 +5221,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -4530,7 +5282,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
@@ -4575,7 +5327,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_CC+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
 else
@@ -4734,7 +5486,7 @@ do
 done
 test "$ac_cv_exeext" = no && ac_cv_exeext=
 
-else
+else $as_nop
   ac_file=''
 fi
 if test -z "$ac_file"
@@ -4748,7 +5500,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error 77 "C compiler cannot create executables
 See \`config.log' for more details" "$LINENO" 5; }
-else
+else $as_nop
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
 fi
@@ -4787,7 +5539,7 @@ for ac_file in conftest.exe conftest conftest.*; do
     * ) break;;
   esac
 done
-else
+else $as_nop
   { { 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 $? "cannot compute suffix of executables: cannot compile and link
@@ -4818,9 +5570,7 @@ ac_clean_files="$ac_clean_files conftest.out"
 # the compiler is broken, or we cross compile.
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
 printf %s "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
-  cross_compiling=yes
-elif test "$cross_compiling" != yes; then
+if test "$cross_compiling" != yes; then
   { { ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4850,7 +5600,7 @@ printf "%s\n" "$ac_try_echo"; } >&5
     else
        { { 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 $? "cannot run C compiled programs.
+as_fn_error 77 "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details" "$LINENO" 5; }
     fi
@@ -4866,7 +5616,7 @@ printf %s "checking for suffix of object files... " >&6; }
 if test ${ac_cv_objext+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4899,7 +5649,7 @@ then :
        break;;
   esac
 done
-else
+else $as_nop
   printf "%s\n" "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
@@ -4919,7 +5669,7 @@ printf %s "checking whether the compiler supports GNU C... " >&6; }
 if test ${ac_cv_c_compiler_gnu+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4937,15 +5687,17 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_compiler_gnu=yes
-else
+else $as_nop
   ac_compiler_gnu=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
 if test $ac_compiler_gnu = yes; then
   GCC=yes
 else
@@ -4958,7 +5710,7 @@ printf %s "checking whether $CC accepts -g... " >&6; }
 if test ${ac_cv_prog_cc_g+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
@@ -4977,7 +5729,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
-else
+else $as_nop
   CFLAGS=""
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -4993,7 +5745,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-else
+else $as_nop
   ac_c_werror_flag=$ac_save_c_werror_flag
         CFLAGS="-g"
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5011,11 +5763,11 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_g=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
@@ -5035,206 +5787,20 @@ else
     CFLAGS=
   fi
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
 printf %s "checking for $CC option to enable C11 features... " >&6; }
 if test ${ac_cv_prog_cc_c11+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_prog_cc_c11=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
-  int x = 1234;
-  int y = 5678;
-  debug ("Flag");
-  debug ("X = %d\n", x);
-  showlist (The first, second, and third items.);
-  report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
-  int datasize;
-  double data[];
-};
-
-struct named_init {
-  int number;
-  const wchar_t *name;
-  double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
-  // See if C++-style comments work.
-  // Iterate through items via the restricted pointer.
-  // Also check for declarations in for loops.
-  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
-    continue;
-  return 0;
-}
-
-// Check varargs and va_copy.
-static bool
-test_varargs (const char *format, ...)
-{
-  va_list args;
-  va_start (args, format);
-  va_list args_copy;
-  va_copy (args_copy, args);
-
-  const char *str = "";
-  int number = 0;
-  float fnumber = 0;
-
-  while (*format)
-    {
-      switch (*format++)
-       {
-       case 's': // string
-         str = va_arg (args_copy, const char *);
-         break;
-       case 'd': // int
-         number = va_arg (args_copy, int);
-         break;
-       case 'f': // float
-         fnumber = va_arg (args_copy, double);
-         break;
-       default:
-         break;
-       }
-    }
-  va_end (args_copy);
-  va_end (args);
-
-  return *str && number && fnumber;
-}
-// Check _Alignas.
-char _Alignas (double) aligned_as_double;
-char _Alignas (0) no_special_alignment;
-extern char aligned_as_int;
-char _Alignas (0) _Alignas (int) aligned_as_int;
-
-// Check _Alignof.
-enum
-{
-  int_alignment = _Alignof (int),
-  int_array_alignment = _Alignof (int[100]),
-  char_alignment = _Alignof (char)
-};
-_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
-
-// Check _Noreturn.
-int _Noreturn does_not_return (void) { for (;;) continue; }
-
-// Check _Static_assert.
-struct test_static_assert
-{
-  int x;
-  _Static_assert (sizeof (int) <= sizeof (long int),
-                  "_Static_assert does not work in struct");
-  long int y;
-};
-
-// Check UTF-8 literals.
-#define u8 syntax error!
-char const utf8_literal[] = u8"happens to be ASCII" "another string";
-
-// Check duplicate typedefs.
-typedef long *long_ptr;
-typedef long int *long_ptr;
-typedef long_ptr long_ptr;
-
-// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
-struct anonymous
-{
-  union {
-    struct { int i; int j; };
-    struct { int k; long int l; } w;
-  };
-  int m;
-} v1;
-
-int
-main (void)
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
-  test_varargs_macros ();
-
-  // Check flexible array members.
-  struct incomplete_array *ia =
-    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
-  ia->datasize = 10;
-  for (int i = 0; i < ia->datasize; ++i)
-    ia->data[i] = i * 1.234;
-
-  // Check named initializers.
-  struct named_init ni = {
-    .number = 34,
-    .name = L"Test wide string",
-    .average = 543.34343,
-  };
-
-  ni.number = 58;
-
-  int dynamic_array[ni.number];
-  dynamic_array[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  v1.i = 2;
-  v1.w.k = 5;
-  _Static_assert ((offsetof (struct anonymous, i)
-                  == offsetof (struct anonymous, w.k)),
-                 "Anonymous union alignment botch");
-
-  ;
-  return 0;
-}
+$ac_c_conftest_c11_program
 _ACEOF
 for ac_arg in '' -std=gnu11
 do
 then :
   ac_cv_prog_cc_c11=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c11" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-ac_prog_cc_stdc_options=
-case "x$ac_cv_prog_cc_c11" in
-  x)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; } ;;
-  xno)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; } ;;
-  *)
-    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
-    CC=$CC$ac_prog_cc_stdc_options
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
-printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c11" != xno
+
+if test "x$ac_cv_prog_cc_c11" = xno
 then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c11" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+     CC="$CC $ac_cv_prog_cc_c11"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
   ac_prog_cc_stdc=c11
-                ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
-else
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
 printf %s "checking for $CC option to enable C99 features... " >&6; }
 if test ${ac_cv_prog_cc_c99+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_prog_cc_c99=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-
-// Check varargs macros.  These examples are taken from C99 6.10.3.5.
-#define debug(...) fprintf (stderr, __VA_ARGS__)
-#define showlist(...) puts (#__VA_ARGS__)
-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
-static void
-test_varargs_macros (void)
-{
-  int x = 1234;
-  int y = 5678;
-  debug ("Flag");
-  debug ("X = %d\n", x);
-  showlist (The first, second, and third items.);
-  report (x>y, "x is %d but y is %d", x, y);
-}
-
-// Check long long types.
-#define BIG64 18446744073709551615ull
-#define BIG32 4294967295ul
-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
-#if !BIG_OK
-  your preprocessor is broken;
-#endif
-#if BIG_OK
-#else
-  your preprocessor is broken;
-#endif
-static long long int bignum = -9223372036854775807LL;
-static unsigned long long int ubignum = BIG64;
-
-struct incomplete_array
-{
-  int datasize;
-  double data[];
-};
-
-struct named_init {
-  int number;
-  const wchar_t *name;
-  double average;
-};
-
-typedef const char *ccp;
-
-static inline int
-test_restrict (ccp restrict text)
-{
-  // See if C++-style comments work.
-  // Iterate through items via the restricted pointer.
-  // Also check for declarations in for loops.
-  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
-    continue;
-  return 0;
-}
-
-// Check varargs and va_copy.
-static bool
-test_varargs (const char *format, ...)
-{
-  va_list args;
-  va_start (args, format);
-  va_list args_copy;
-  va_copy (args_copy, args);
-
-  const char *str = "";
-  int number = 0;
-  float fnumber = 0;
-
-  while (*format)
-    {
-      switch (*format++)
-       {
-       case 's': // string
-         str = va_arg (args_copy, const char *);
-         break;
-       case 'd': // int
-         number = va_arg (args_copy, int);
-         break;
-       case 'f': // float
-         fnumber = va_arg (args_copy, double);
-         break;
-       default:
-         break;
-       }
-    }
-  va_end (args_copy);
-  va_end (args);
-
-  return *str && number && fnumber;
-}
-int
-main (void)
-{
-
-  // Check bool.
-  _Bool success = false;
-
-  // Check restrict.
-  if (test_restrict ("String literal") == 0)
-    success = true;
-  char *restrict newvar = "Another string";
-
-  // Check varargs.
-  success &= test_varargs ("s, d' f .", "string", 65, 34.234);
-  test_varargs_macros ();
-
-  // Check flexible array members.
-  struct incomplete_array *ia =
-    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
-  ia->datasize = 10;
-  for (int i = 0; i < ia->datasize; ++i)
-    ia->data[i] = i * 1.234;
-
-  // Check named initializers.
-  struct named_init ni = {
-    .number = 34,
-    .name = L"Test wide string",
-    .average = 543.34343,
-  };
-
-  ni.number = 58;
-
-  int dynamic_array[ni.number];
-  dynamic_array[ni.number - 1] = 543;
-
-  // work around unused variable warnings
-  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
-         || dynamic_array[ni.number - 1] != 543);
-
-  ;
-  return 0;
-}
+$ac_c_conftest_c99_program
 _ACEOF
-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
 do
   CC="$ac_save_CC $ac_arg"
   if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_c99=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c99" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-ac_prog_cc_stdc_options=
-case "x$ac_cv_prog_cc_c99" in
-  x)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; } ;;
-  xno)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; } ;;
-  *)
-    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
-    CC=$CC$ac_prog_cc_stdc_options
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
-printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c99" != xno
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c99" = x
 then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+     CC="$CC $ac_cv_prog_cc_c99"
+fi
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
   ac_prog_cc_stdc=c99
-                   ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
-else
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
 printf %s "checking for $CC option to enable C89 features... " >&6; }
 if test ${ac_cv_prog_cc_c89+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* 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 don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main (void)
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
+$ac_c_conftest_c89_program
 _ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_prog_cc_c89=$ac_arg
 fi
-rm -f core conftest.err conftest.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.beam
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
 rm -f conftest.$ac_ext
 CC=$ac_save_CC
-
 fi
-# AC_CACHE_VAL
-ac_prog_cc_stdc_options=
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-printf "%s\n" "none needed" >&6; } ;;
-  xno)
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-printf "%s\n" "unsupported" >&6; } ;;
-  *)
-    ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
-    CC=$CC$ac_prog_cc_stdc_options
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno
+
+if test "x$ac_cv_prog_cc_c89" = xno
 then :
-  ac_prog_cc_stdc=c89
-                      ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
-else
-  ac_prog_cc_stdc=no
-                      ac_cv_prog_cc_stdc=no
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+  if test "x$ac_cv_prog_cc_c89" = x
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+     CC="$CC $ac_cv_prog_cc_c89"
 fi
-
+  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+  ac_prog_cc_stdc=c89
 fi
-
 fi
 
 ac_ext=c
@@ -5562,7 +5933,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
+
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5572,7 +5944,7 @@ printf %s "checking whether $CC understands -c and -o together... " >&6; }
 if test ${am_cv_prog_cc_c_o+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5621,6 +5993,84 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
+printf %s "checking whether the compiler is clang... " >&6; }
+if test ${gl_cv_compiler_clang+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+           #ifdef __clang__
+           barfbarf
+           #endif
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_compiler_clang=no
+else $as_nop
+  gl_cv_compiler_clang=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
+printf "%s\n" "$gl_cv_compiler_clang" >&6; }
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
+printf %s "checking for compiler option needed when checking for declarations... " >&6; }
+if test ${gl_cv_compiler_check_decl_option+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test $gl_cv_compiler_clang = yes; then
+                     save_ac_compile="$ac_compile"
+       ac_compile="$ac_compile -Werror=implicit-function-declaration"
+                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
+else $as_nop
+  gl_cv_compiler_check_decl_option=none
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       ac_compile="$save_ac_compile"
+     else
+       gl_cv_compiler_check_decl_option=none
+     fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
+printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
+  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
+    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
+  else
+    ac_compile_for_check_decl="$ac_compile"
+  fi
+
 DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
@@ -5693,7 +6143,7 @@ printf %s "checking dependency style of $depcc... " >&6; }
 if test ${am_cv_CC_dependencies_compiler_type+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
@@ -5827,7 +6277,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
@@ -5872,7 +6322,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
@@ -5943,35 +6393,18 @@ done
 
 
 
-printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
-
-printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
 
-
-  ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
 then :
-  MINIX=yes
-else
-  MINIX=
-fi
-
-  if test "$MINIX" = yes; then
-
-printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
 
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
 
-printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
+fi
 
-printf "%s\n" "#define _MINIX 1" >>confdefs.h
 
 
-printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
 
-  fi
 
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
@@ -5979,7 +6412,7 @@ printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
 if test ${ac_cv_safe_to_define___extensions__+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5996,52 +6429,24 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_safe_to_define___extensions__=yes
-else
+else $as_nop
   ac_cv_safe_to_define___extensions__=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
-
-  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
-
-  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
-
-  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
-
-  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
-
-  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
-
-  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
-
-  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_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
-
-  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
-
-  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
-
-  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
 
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
 if test ${ac_cv_should_define__xopen_source+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_should_define__xopen_source=no
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    if test $ac_cv_header_wchar_h = yes
+then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
           #include <wchar.h>
@@ -6057,13 +6462,13 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-             #define _XOPEN_SOURCE 500
-             #include <wchar.h>
-             mbstate_t x;
+            #define _XOPEN_SOURCE 500
+            #include <wchar.h>
+            mbstate_t x;
 int
 main (void)
 {
@@ -6076,23 +6481,153 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_should_define__xopen_source=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
-  test $ac_cv_should_define__xopen_source = yes &&
-    printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
 
   printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
 
+  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_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
+
+  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+  if test $ac_cv_header_minix_config_h = yes
+then :
+  MINIX=yes
+    printf "%s\n" "#define _MINIX 1" >>confdefs.h
 
+    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
 
+    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+  MINIX=
+fi
+  if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+  if test $ac_cv_should_define__xopen_source = yes
+then :
+  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
 
+fi
 
 
 
+  # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+
+
+
+  case "$host_os" in
+    openbsd*)
+
+printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
+
+      ;;
+  esac
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -6109,9 +6644,9 @@ if test -z "$CPP"; then
   if test ${ac_cv_prog_CPP+y}
 then :
   printf %s "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+else $as_nop
+      # Double quotes because $CC needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
     do
       ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
@@ -6128,7 +6663,7 @@ _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
 
-else
+else $as_nop
   # Broken: fails on valid input.
 continue
 fi
@@ -6144,7 +6679,7 @@ if ac_fn_c_try_cpp "$LINENO"
 then :
   # Broken: success on invalid input.
 continue
-else
+else $as_nop
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -6184,7 +6719,7 @@ _ACEOF
 if ac_fn_c_try_cpp "$LINENO"
 then :
 
-else
+else $as_nop
   # Broken: fails on valid input.
 continue
 fi
@@ -6200,7 +6735,7 @@ if ac_fn_c_try_cpp "$LINENO"
 then :
   # Broken: success on invalid input.
 continue
-else
+else $as_nop
   # Passes both tests.
 ac_preproc_ok=:
 break
@@ -6213,7 +6748,7 @@ rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok
 then :
 
-else
+else $as_nop
   { { 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 $? "C preprocessor \"$CPP\" fails sanity check
@@ -6232,7 +6767,7 @@ printf %s "checking for grep that handles long lines and -e... " >&6; }
 if test ${ac_cv_path_GREP+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -z "$GREP"; then
   ac_path_GREP_found=false
   # Loop through the user's path and test for each of PROGNAME-LIST
@@ -6301,7 +6836,7 @@ printf %s "checking for egrep... " >&6; }
 if test ${ac_cv_path_EGREP+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
@@ -6377,7 +6912,7 @@ printf %s "checking for Minix Amsterdam compiler... " >&6; }
 if test ${gl_cv_c_amsterdam_compiler+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6391,7 +6926,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Amsterdam" >/dev/null 2>&1
 then :
   gl_cv_c_amsterdam_compiler=yes
-else
+else $as_nop
   gl_cv_c_amsterdam_compiler=no
 fi
 rm -rf conftest*
@@ -6420,7 +6955,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_AR+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
@@ -6465,7 +7000,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_AR+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_AR"; then
   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
@@ -6532,7 +7067,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
@@ -6577,7 +7112,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_prog_ac_ct_RANLIB+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test -n "$ac_ct_RANLIB"; then
   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
 else
@@ -6630,79 +7165,6 @@ fi
   fi
 
 
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-printf %s "checking build system type... " >&6; }
-if test ${ac_cv_build+y}
-then :
-  printf %s "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-printf "%s\n" "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-printf %s "checking host system type... " >&6; }
-if test ${ac_cv_host+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-printf "%s\n" "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
 
 
 
@@ -6738,14 +7200,14 @@ then :
   enableval=$enable_largefile;
 fi
 
-if test "$enable_largefile" != no; then
-
+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}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_sys_largefile_CC=no
      if test "$GCC" != yes; then
        ac_save_CC=$CC
@@ -6759,10 +7221,10 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1];
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main (void)
 {
@@ -6775,13 +7237,13 @@ _ACEOF
 then :
   break
 fi
-rm -f core conftest.err conftest.$ac_objext
+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
+rm -f core conftest.err conftest.$ac_objext conftest.beam
          break
        done
        CC=$ac_save_CC
@@ -6799,7 +7261,7 @@ printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6;
 if test ${ac_cv_sys_file_offset_bits+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   while :; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6808,10 +7270,10 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1];
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main (void)
 {
@@ -6824,19 +7286,20 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_sys_file_offset_bits=no; break
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam 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,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1];
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main (void)
 {
@@ -6849,7 +7312,7 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_sys_file_offset_bits=64; break
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cv_sys_file_offset_bits=unknown
   break
 done
@@ -6863,13 +7326,14 @@ printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs
 ;;
 esac
 rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
+  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
+else $as_nop
   while :; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6878,10 +7342,10 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1];
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main (void)
 {
@@ -6894,19 +7358,20 @@ 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.$ac_ext
+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 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                       && LARGE_OFF_T % 2147483647 == 1)
-                      ? 1 : -1];
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 int
 main (void)
 {
@@ -6919,7 +7384,7 @@ 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.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cv_sys_large_files=unknown
   break
 done
@@ -6932,14 +7397,206 @@ case $ac_cv_sys_large_files in #(
 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
 ;;
 esac
-rm -rf conftest*
+rm -rf conftest* ;; #(
+  64) :
+
+ # Check whether --enable-year2038 was given.
+if test ${enable_year2038+y}
+then :
+  enableval=$enable_year2038;
+fi
+
+ if test "$enable_year2038" != no
+then :
+
+                            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t" >&5
+printf %s "checking for 64-bit time_t... " >&6; }
+if test ${gl_cv_type_time_t_64+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  #include <time.h>
+  /* Check that time_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_TIME_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+  #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
+  int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
+                           && LARGE_TIME_T % 2147483647 == 1)
+                          ? 1 : -1];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_type_time_t_64=yes
+else $as_nop
+  gl_cv_type_time_t_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_64" >&5
+printf "%s\n" "$gl_cv_type_time_t_64" >&6; }
+  if test "$gl_cv_type_time_t_64" = 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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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**63 - 1 correctly.
+     We can't simply define LARGE_TIME_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+  #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
+  int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
+                           && LARGE_TIME_T % 2147483647 == 1)
+                          ? 1 : -1];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_type_time_t_bits_macro=yes
+else $as_nop
+  gl_cv_type_time_t_bits_macro=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+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" "#define _TIME_BITS 64" >>confdefs.h
+
+
+printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+
+      gl_cv_type_time_t_64=yes
+    fi
+  fi
+  if test $gl_cv_type_time_t_64 = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef _USE_32BIT_TIME_T
+             int ok;
+           #else
+             error fail
+           #endif
+
+_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 $? "This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+  # If not cross-compiling and  says we should check,
+       # and 'touch' works with a large timestamp, then evidently 64-bit 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_64_bit_time_t" != yes; then
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&5
+printf "%s\n" "$as_me: WARNING: This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS=\"-m64\" LDFLAGS=\"-m64\"'?" >&2;}
+         gl_warned_about_64_bit_time_t=yes
+       fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   fi
+fi
+ ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+
+  case "$host_os" in
+    mingw*)
+
+printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+
 
 
-printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
+
+
+  # Check whether --enable-threads was given.
+if test ${enable_threads+y}
+then :
+  enableval=$enable_threads; gl_use_threads=$enableval
+else $as_nop
+  if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+       case "$host_os" in
+                                    osf*) gl_use_threads=no ;;
+                                    cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+                  mingw*)
+               case "$gl_use_winpthreads_default" in
+                 yes) gl_use_threads=posix ;;
+                 no)  gl_use_threads=windows ;;
+                 *)   gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+     fi
 
 fi
 
+  if test "$gl_use_threads" = yes \
+     || test "$gl_use_threads" = isoc \
+     || test "$gl_use_threads" = posix \
+     || test "$gl_use_threads" = isoc+posix; then
+    # For using <threads.h> or <pthread.h>:
+
+
+  if test -z "$gl_anythreadlib_early_done"; then
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+    gl_anythreadlib_early_done=done
+  fi
+
+  fi
 
 
 
@@ -6963,6 +7620,9 @@ fi
   # Code from module arpa_inet:
   # Code from module arpa_inet-tests:
   # Code from module assure:
+  # Code from module atoll:
+  # Code from module attribute:
+  # Code from module basename-lgpl:
   # Code from module binary-io:
   # Code from module binary-io-tests:
   # Code from module bind:
@@ -6979,6 +7639,10 @@ fi
   # Code from module c-strcase:
   # Code from module c-strcase-tests:
   # Code from module c-strcaseeq:
+  # Code from module c99:
+  # Code from module calloc-gnu:
+  # Code from module calloc-gnu-tests:
+  # Code from module calloc-posix:
   # Code from module careadlinkat:
   # Code from module clock-time:
   # Code from module cloexec:
@@ -6995,11 +7659,12 @@ fi
   # Code from module dirname-lgpl:
   # Code from module dirname-tests:
   # Code from module do-release-commit-and-tag:
-  # Code from module dosname:
   # Code from module double-slash-root:
   # Code from module dtotimespec:
   # 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:
@@ -7032,14 +7697,18 @@ fi
   # Code from module fnmatch-h:
   # Code from module fnmatch-h-tests:
   # Code from module fnmatch-tests:
+  # Code from module fopen:
+  # Code from module fopen-gnu:
+  # Code from module fopen-gnu-tests:
+  # Code from module fopen-tests:
   # Code from module fpieee:
 
   # Code from module fpucw:
   # Code from module fputc-tests:
   # Code from module fread-tests:
+  # Code from module free-posix:
+  # Code from module free-posix-tests:
   # Code from module freopen:
-  # Code from module freopen-safer:
-  # Code from module freopen-safer-tests:
   # Code from module freopen-tests:
   # Code from module fstat:
   # Code from module fstat-tests:
@@ -7051,7 +7720,6 @@ fi
   # Code from module getcwd-lgpl-tests:
   # Code from module getdtablesize:
   # Code from module getdtablesize-tests:
-  # Code from module getopt:
   # Code from module getopt-gnu:
   # Code from module getopt-gnu-tests:
   # Code from module getopt-posix:
@@ -7059,6 +7727,8 @@ fi
   # Code from module getpagesize:
   # Code from module getprogname:
   # Code from module getprogname-tests:
+  # Code from module getrandom:
+  # Code from module getrandom-tests:
   # Code from module gettext-h:
   # Code from module gettime:
   # Code from module gettimeofday:
@@ -7071,15 +7741,19 @@ fi
   # Code from module gnupload:
   # Code from module gperf:
   # Code from module hard-locale:
+  # Code from module hard-locale-tests:
   # Code from module hash:
   # Code from module hash-pjw:
   # Code from module hash-tests:
   # Code from module havelib:
+  # Code from module host-cpu-c-abi:
+  # Code from module ialloc:
   # Code from module iconv:
   # Code from module iconv-h:
   # Code from module iconv-h-tests:
   # Code from module iconv-tests:
   # Code from module iconv_open:
+  # Code from module idx:
   # Code from module ignore-value:
   # Code from module ignore-value-tests:
   # Code from module include_next:
@@ -7099,12 +7773,16 @@ fi
   # Code from module isblank-tests:
   # Code from module iswblank:
   # Code from module iswblank-tests:
+  # Code from module iswdigit:
+  # Code from module iswdigit-tests:
+  # Code from module iswxdigit:
+  # Code from module iswxdigit-tests:
   # Code from module langinfo:
   # Code from module langinfo-tests:
   # Code from module largefile:
 
+
   # Code from module libc-config:
-  # Code from module libsigsegv:
   # Code from module limits-h:
   # Code from module limits-h-tests:
   # Code from module listen:
@@ -7115,10 +7793,12 @@ fi
   # Code from module locale-tests:
   # Code from module localeconv:
   # Code from module localeconv-tests:
-  # Code from module localtime-buffer:
+  # Code from module lock:
   # Code from module lstat:
   # Code from module lstat-tests:
   # Code from module maintainer-makefile:
+  # Code from module malloc-gnu:
+  # Code from module malloc-gnu-tests:
   # Code from module malloc-posix:
   # Code from module malloca:
   # Code from module malloca-tests:
@@ -7140,6 +7820,7 @@ fi
   # Code from module mbuiter:
   # Code from module memchr:
   # Code from module memchr-tests:
+  # Code from module mempcpy:
   # Code from module minmax:
   # Code from module mkdir:
   # Code from module mkdir-tests:
@@ -7168,6 +7849,36 @@ fi
   # Code from module pipe-posix-tests:
   # Code from module progname:
   # Code from module propername:
+  # Code from module pthread-h:
+
+
+  if test -z "$gl_anythreadlib_early_done"; then
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+    gl_anythreadlib_early_done=done
+  fi
+
+  # Code from module pthread-h-tests:
+  # Code from module pthread-thread:
+  # Code from module pthread-thread-tests:
+  # Code from module pthread_sigmask:
+  # Code from module pthread_sigmask-tests:
   # Code from module putenv:
   # Code from module quote:
   # Code from module quotearg:
@@ -7180,15 +7891,22 @@ fi
   # Code from module readlink:
   # Code from module readlink-tests:
   # Code from module readme-release:
+  # Code from module realloc-gnu:
+  # Code from module realloc-gnu-tests:
+  # Code from module realloc-posix:
+  # Code from module reallocarray:
+  # Code from module reallocarray-tests:
   # Code from module regex:
   # Code from module regex-tests:
   # Code from module same-inode:
+  # Code from module sched:
+  # Code from module sched-tests:
   # Code from module select:
   # Code from module select-tests:
   # Code from module setenv:
   # Code from module setenv-tests:
-  # Code from module setlocale:
-  # Code from module setlocale-tests:
+  # Code from module setlocale-null:
+  # Code from module setlocale-null-tests:
   # Code from module setsockopt:
   # Code from module setsockopt-tests:
   # Code from module sh-quote:
@@ -7200,13 +7918,14 @@ fi
   # Code from module signal-h-tests:
   # Code from module sigprocmask:
   # Code from module sigprocmask-tests:
+  # Code from module sigsegv:
+  # Code from module sigsegv-tests:
   # Code from module size_max:
   # Code from module sleep:
   # Code from module sleep-tests:
   # Code from module snippet/_Noreturn:
   # Code from module snippet/arg-nonnull:
   # Code from module snippet/c++defs:
-  # Code from module snippet/unused-parameter:
   # Code from module snippet/warn-on-use:
   # Code from module snprintf:
   # Code from module snprintf-tests:
@@ -7221,12 +7940,14 @@ fi
   # Code from module stat-tests:
   # 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:
 
 
 
+  # Code from module stdarg-tests:
   # Code from module stdbool:
   # Code from module stdbool-tests:
   # Code from module stddef:
@@ -7237,6 +7958,7 @@ fi
   # Code from module stdio-tests:
   # Code from module stdlib:
   # Code from module stdlib-tests:
+  # Code from module stdopen:
   # Code from module strcase:
   # Code from module streq:
   # Code from module strerror:
@@ -7244,26 +7966,26 @@ fi
   # Code from module strerror-tests:
   # Code from module strerror_r-posix:
   # Code from module strerror_r-posix-tests:
-  # Code from module strftime:
   # Code from module striconv:
   # Code from module striconv-tests:
   # Code from module string:
   # Code from module string-tests:
   # Code from module strings:
   # Code from module strings-tests:
-  # Code from module strndup:
   # Code from module strnlen:
   # Code from module strnlen-tests:
   # Code from module strnlen1:
   # Code from module strptime:
-  # Code from module strtoull:
-  # Code from module strtoull-tests:
-  # Code from module strtoumax:
-  # Code from module strtoumax-tests:
+  # Code from module strtoimax:
+  # Code from module strtoimax-tests:
+  # Code from module strtoll:
+  # Code from module strtoll-tests:
   # Code from module symlink:
   # Code from module symlink-tests:
   # Code from module sys_ioctl:
   # Code from module sys_ioctl-tests:
+  # Code from module sys_random:
+  # Code from module sys_random-tests:
   # Code from module sys_select:
   # Code from module sys_select-tests:
   # Code from module sys_socket:
@@ -7282,6 +8004,12 @@ fi
   # Code from module tempname:
   # Code from module test-framework-sh:
   # Code from module test-framework-sh-tests:
+  # Code from module thread:
+  # Code from module thread-tests:
+  # Code from module threadlib:
+
+
+
   # Code from module time:
   # Code from module time-tests:
   # Code from module time_r:
@@ -7305,12 +8033,12 @@ fi
   # Code from module uniwidth/width:
   # Code from module uniwidth/width-tests:
   # Code from module unlocked-io:
+  # Code from module unlocked-io-internal:
   # Code from module unsetenv:
   # Code from module unsetenv-tests:
   # Code from module update-copyright:
   # Code from module update-copyright-tests:
   # Code from module useless-if-before-free:
-  # Code from module vararrays:
   # Code from module vasnprintf:
   # Code from module vasnprintf-tests:
   # Code from module vasprintf:
@@ -7333,19 +8061,30 @@ fi
   # Code from module wctype-h-tests:
   # Code from module wcwidth:
   # Code from module wcwidth-tests:
+  # Code from module windows-mutex:
+  # Code from module windows-once:
+  # Code from module windows-recmutex:
+  # Code from module windows-rwlock:
+  # Code from module windows-thread:
+  # Code from module windows-tls:
+  # Code from module wmemchr:
+  # Code from module wmempcpy:
   # Code from module xalloc:
   # Code from module xalloc-die:
   # Code from module xalloc-die-tests:
   # Code from module xalloc-oversized:
   # Code from module xfreopen:
+  # Code from module xmalloca:
   # Code from module xreadlink:
   # Code from module xsize:
+  # Code from module xstdopen:
+  # Code from module xstdopen-tests:
   # Code from module xstriconv:
-  # Code from module xstrndup:
+  # Code from module xstrtoimax:
+  # Code from module xstrtoimax-tests:
   # Code from module xstrtol:
+  # Code from module xstrtol-error:
   # Code from module xstrtol-tests:
-  # Code from module xstrtoumax:
-  # Code from module xstrtoumax-tests:
   # Code from module xvasprintf:
   # Code from module xvasprintf-tests:
 
@@ -7355,14 +8094,38 @@ fi
 
 
 
+
+
+
+                        # Check whether --enable-cross-guesses was given.
+if test ${enable_cross_guesses+y}
+then :
+  enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
+printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
+       enableval=conservative
+     fi
+     gl_cross_guesses="$enableval"
+else $as_nop
+  gl_cross_guesses=conservative
+fi
+
+  if test $gl_cross_guesses = risky; then
+    gl_cross_guess_normal="guessing yes"
+    gl_cross_guess_inverted="guessing no"
+  else
+    gl_cross_guess_normal="guessing no"
+    gl_cross_guess_inverted="guessing yes"
+  fi
           LIBC_FATAL_STDERR_=1
   export LIBC_FATAL_STDERR_
 
+
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 if test "x$ac_cv_type_size_t" = xyes
 then :
 
-else
+else $as_nop
 
 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
 
@@ -7375,7 +8138,7 @@ printf %s "checking for working alloca.h... " >&6; }
 if test ${ac_cv_working_alloca_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <alloca.h>
@@ -7391,10 +8154,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_working_alloca_h=yes
-else
+else $as_nop
   ac_cv_working_alloca_h=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
@@ -7410,7 +8173,7 @@ printf %s "checking for alloca... " >&6; }
 if test ${ac_cv_func_alloca_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test $ac_cv_working_alloca_h = yes; then
   ac_cv_func_alloca_works=yes
 else
@@ -7444,10 +8207,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   ac_cv_func_alloca_works=yes
-else
+else $as_nop
   ac_cv_func_alloca_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
@@ -7473,58 +8236,16 @@ ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if test ${ac_cv_os_cray+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "webecray" >/dev/null 2>&1
-then :
-  ac_cv_os_cray=yes
-else
-  ac_cv_os_cray=no
-fi
-rm -rf conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-printf "%s\n" "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"
-then :
-
-printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
-
-    break
-fi
-
-  done
-fi
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
 printf %s "checking stack direction for C alloca... " >&6; }
 if test ${ac_cv_c_stack_direction+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   ac_cv_c_stack_direction=0
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
@@ -7548,7 +8269,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   ac_cv_c_stack_direction=1
-else
+else $as_nop
   ac_cv_c_stack_direction=-1
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -7564,46 +8285,6 @@ printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
 fi
 
 
-  GNULIB_BTOWC=0;
-  GNULIB_WCTOB=0;
-  GNULIB_MBSINIT=0;
-  GNULIB_MBRTOWC=0;
-  GNULIB_MBRLEN=0;
-  GNULIB_MBSRTOWCS=0;
-  GNULIB_MBSNRTOWCS=0;
-  GNULIB_WCRTOMB=0;
-  GNULIB_WCSRTOMBS=0;
-  GNULIB_WCSNRTOMBS=0;
-  GNULIB_WCWIDTH=0;
-  GNULIB_WMEMCHR=0;
-  GNULIB_WMEMCMP=0;
-  GNULIB_WMEMCPY=0;
-  GNULIB_WMEMMOVE=0;
-  GNULIB_WMEMSET=0;
-  GNULIB_WCSLEN=0;
-  GNULIB_WCSNLEN=0;
-  GNULIB_WCSCPY=0;
-  GNULIB_WCPCPY=0;
-  GNULIB_WCSNCPY=0;
-  GNULIB_WCPNCPY=0;
-  GNULIB_WCSCAT=0;
-  GNULIB_WCSNCAT=0;
-  GNULIB_WCSCMP=0;
-  GNULIB_WCSNCMP=0;
-  GNULIB_WCSCASECMP=0;
-  GNULIB_WCSNCASECMP=0;
-  GNULIB_WCSCOLL=0;
-  GNULIB_WCSXFRM=0;
-  GNULIB_WCSDUP=0;
-  GNULIB_WCSCHR=0;
-  GNULIB_WCSRCHR=0;
-  GNULIB_WCSCSPN=0;
-  GNULIB_WCSSPN=0;
-  GNULIB_WCSPBRK=0;
-  GNULIB_WCSSTR=0;
-  GNULIB_WCSTOK=0;
-  GNULIB_WCSWIDTH=0;
-  GNULIB_WCSFTIME=0;
     HAVE_BTOWC=1;
   HAVE_MBSINIT=1;
   HAVE_MBRTOWC=1;
@@ -7617,6 +8298,7 @@ fi
   HAVE_WMEMCMP=1;
   HAVE_WMEMCPY=1;
   HAVE_WMEMMOVE=1;
+  HAVE_WMEMPCPY=1;
   HAVE_WMEMSET=1;
   HAVE_WCSLEN=1;
   HAVE_WCSNLEN=1;
@@ -7643,6 +8325,7 @@ fi
   HAVE_WCSWIDTH=1;
   HAVE_WCSFTIME=1;
   HAVE_DECL_WCTOB=1;
+  HAVE_DECL_WCSDUP=1;
   HAVE_DECL_WCWIDTH=1;
   REPLACE_MBSTATE_T=0;
   REPLACE_BTOWC=0;
@@ -7658,70 +8341,64 @@ fi
   REPLACE_WCWIDTH=0;
   REPLACE_WCSWIDTH=0;
   REPLACE_WCSFTIME=0;
+  REPLACE_WCSTOK=0;
 
 
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
 if test ${gl_cv_header_wchar_h_correct_inline+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gl_cv_header_wchar_h_correct_inline=yes
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+     case "$host_os" in
+       *-gnu* | gnu*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-extern int zero (void);
-int main () { return zero(); }
+
+             #define wcstod renamed_wcstod
+             #include <wchar.h>
+             extern int zero (void);
+             int main () { return zero(); }
 
 _ACEOF
-                              save_ac_compile="$ac_compile"
-     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
-     if echo '#include "conftest.c"' >conftest1.c &&
-        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+                                                      save_ac_compile="$ac_compile"
+         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+         if echo '#include "conftest.c"' >conftest1.c \
+            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-         #define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int zero (void) { return 0; }
+
+               #define wcstod renamed_wcstod
+               #include <wchar.h>
+               int zero (void) { return 0; }
 
 _ACEOF
-              ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
-       if echo '#include "conftest.c"' >conftest2.c &&
-          { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+                      ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+           if echo '#include "conftest.c"' >conftest2.c \
+              && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
-           :
-         else
-           gl_cv_header_wchar_h_correct_inline=no
+             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+               :
+             else
+               gl_cv_header_wchar_h_correct_inline=no
+             fi
+           fi
          fi
-       fi
-     fi
-     ac_compile="$save_ac_compile"
-     rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
+         ac_compile="$save_ac_compile"
+         rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
+         ;;
+     esac
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
@@ -7757,7 +8434,7 @@ printf %s "checking for nl_langinfo and CODESET... " >&6; }
 if test ${am_cv_langinfo_codeset+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <langinfo.h>
@@ -7772,10 +8449,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   am_cv_langinfo_codeset=yes
-else
+else $as_nop
   am_cv_langinfo_codeset=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 
 fi
@@ -7795,7 +8472,7 @@ printf %s "checking for a traditional french locale... " >&6; }
 if test ${gt_cv_locale_fr+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -7932,1563 +8609,552 @@ printf "%s\n" "$gt_cv_locale_fr" >&6; }
 
 
 
+  GL_GNULIB_BTOWC=0
 
 
 
+  GL_GNULIB_WCTOB=0
 
 
-            case "$host_os" in
-     sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
-       FAULT_YIELDS_SIGBUS=1 ;;
-     hpux*) # HP-UX
-       FAULT_YIELDS_SIGBUS=1 ;;
-     macos* | darwin*) # Mac OS X
-       FAULT_YIELDS_SIGBUS=1 ;;
-     gnu*) # Hurd
-       FAULT_YIELDS_SIGBUS=1 ;;
-     *)
-       FAULT_YIELDS_SIGBUS=0 ;;
-   esac
 
-printf "%s\n" "#define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS" >>confdefs.h
+  GL_GNULIB_MBSINIT=0
 
 
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
-printf %s "checking for working C stack overflow detection... " >&6; }
-if test ${ac_cv_sys_stack_overflow_works+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                   # Guess no on native Windows.
-           mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
-           *)      ac_cv_sys_stack_overflow_works=cross-compiling ;;
-         esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_MBRTOWC=0
 
-            #include <unistd.h>
-            #include <signal.h>
-            #if HAVE_SETRLIMIT
-            # include <sys/types.h>
-            # include <sys/time.h>
-            # include <sys/resource.h>
-            #endif
-            #ifndef SIGSTKSZ
-            # define SIGSTKSZ 16384
-            #endif
 
-            static union
-            {
-              char buffer[2 * SIGSTKSZ];
-              long double ld;
-              long u;
-              void *p;
-            } alternate_signal_stack;
-
-            static void
-            segv_handler (int signo)
-            {
-              _exit (0);
-            }
 
-            static int
-            c_stack_action ()
-            {
-              stack_t st;
-              struct sigaction act;
-              int r;
-
-              st.ss_flags = 0;
-              /* Use the midpoint to avoid Irix sigaltstack bug.  */
-              st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
-              st.ss_size = SIGSTKSZ;
-              r = sigaltstack (&st, 0);
-              if (r != 0)
-                return 1;
+  GL_GNULIB_MBRLEN=0
 
-              sigemptyset (&act.sa_mask);
-              act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
-              act.sa_handler = segv_handler;
-              #if FAULT_YIELDS_SIGBUS
-              if (sigaction (SIGBUS, &act, 0) < 0)
-                return 2;
-              #endif
-              if (sigaction (SIGSEGV, &act, 0) < 0)
-                return 3;
-              return 0;
-            }
-            static volatile int *
-            recurse_1 (volatile int n, volatile int *p)
-            {
-              if (n >= 0)
-                *recurse_1 (n + 1, p) += n;
-              return p;
-            }
-            static int
-            recurse (volatile int n)
-            {
-              int sum = 0;
-              return *recurse_1 (n, &sum);
-            }
-            int
-            main ()
-            {
-              int result;
-              #if HAVE_SETRLIMIT && defined RLIMIT_STACK
-              /* Before starting the endless recursion, try to be friendly
-                 to the user's machine.  On some Linux 2.2.x systems, there
-                 is no stack limit for user processes at all.  We don't want
-                 to kill such systems.  */
-              struct rlimit rl;
-              rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
-              setrlimit (RLIMIT_STACK, &rl);
-              #endif
 
-              result = c_stack_action ();
-              if (result != 0)
-                return result;
-              return recurse (0);
-            }
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  ac_cv_sys_stack_overflow_works=yes
-else
-  ac_cv_sys_stack_overflow_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB_MBSRTOWCS=0
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
-printf "%s\n" "$ac_cv_sys_stack_overflow_works" >&6; }
 
-  if test "$ac_cv_sys_stack_overflow_works" = yes; then
+  GL_GNULIB_MBSNRTOWCS=0
 
-printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
 
 
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
-printf %s "checking for correct stack_t interpretation... " >&6; }
-if test ${gl_cv_sigaltstack_low_base+y}
-then :
-  printf %s "(cached) " >&6
-else
+  GL_GNULIB_WCRTOMB=0
 
-      if test "$cross_compiling" = yes
-then :
-  gl_cv_sigaltstack_low_base=cross-compiling
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
 
-#include <stdlib.h>
-#include <signal.h>
-#if HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-#endif
-#ifndef SIGSTKSZ
-# define SIGSTKSZ 16384
-#endif
-volatile char *stack_lower_bound;
-volatile char *stack_upper_bound;
-static void check_stack_location (volatile char *addr)
-{
-  if (addr >= stack_lower_bound && addr <= stack_upper_bound)
-    exit (0);
-  else
-    exit (1);
-}
-static void stackoverflow_handler (int sig)
-{
-  char dummy;
-  check_stack_location (&dummy);
-}
-int main ()
-{
-  char mystack[2 * SIGSTKSZ];
-  stack_t altstack;
-  struct sigaction action;
-  /* Install the alternate stack.  */
-  altstack.ss_sp = mystack + SIGSTKSZ;
-  altstack.ss_size = SIGSTKSZ;
-  stack_lower_bound = (char *) altstack.ss_sp;
-  stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
-  altstack.ss_flags = 0; /* no SS_DISABLE */
-  if (sigaltstack (&altstack, NULL) < 0)
-    exit (2);
-  /* Install the SIGSEGV handler.  */
-  sigemptyset (&action.sa_mask);
-  action.sa_handler = &stackoverflow_handler;
-  action.sa_flags = SA_ONSTACK;
-  if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
-    exit(3);
-  /* Provoke a SIGSEGV.  */
-  raise (SIGSEGV);
-  exit (4);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_sigaltstack_low_base=yes
-else
-  gl_cv_sigaltstack_low_base=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB_WCSRTOMBS=0
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
-printf "%s\n" "$gl_cv_sigaltstack_low_base" >&6; }
-   if test "$gl_cv_sigaltstack_low_base" = no; then
 
-printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
 
-    fi
+  GL_GNULIB_WCSNRTOMBS=0
 
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
-printf %s "checking for precise C stack overflow detection... " >&6; }
-if test ${ac_cv_sys_xsi_stack_overflow_heuristic+y}
-then :
-  printf %s "(cached) " >&6
-else
-                          case "${host_os}--${host_cpu}" in
-        linux*--sparc*)
-          ac_cv_sys_xsi_stack_overflow_heuristic=no
-          ;;
-        *)
-          if test "$cross_compiling" = yes
-then :
-  ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-                #include <unistd.h>
-                #include <signal.h>
-                #if HAVE_UCONTEXT_H
-                # include <ucontext.h>
-                #endif
-                #if HAVE_SETRLIMIT
-                # include <sys/types.h>
-                # include <sys/time.h>
-                # include <sys/resource.h>
-                #endif
-                #ifndef SIGSTKSZ
-                # define SIGSTKSZ 16384
-                #endif
 
-                static union
-                {
-                  char buffer[2 * SIGSTKSZ];
-                  long double ld;
-                  long u;
-                  void *p;
-                } alternate_signal_stack;
-
-                #if STACK_DIRECTION
-                # define find_stack_direction(ptr) STACK_DIRECTION
-                #else
-                static int
-                find_stack_direction (char const *addr)
-                {
-                  char dummy;
-                  return (! addr ? find_stack_direction (&dummy)
-                          : addr < &dummy ? 1 : -1);
-                }
-                #endif
+  GL_GNULIB_WCWIDTH=0
 
-                static void
-                segv_handler (int signo, siginfo_t *info, void *context)
-                {
-                  if (0 < info->si_code)
-                    {
-                      /* For XSI heuristics to work, we need uc_stack to
-                         describe the interrupted stack (as on Solaris), and
-                         not the currently executing stack (as on Linux).  */
-                      ucontext_t const *user_context = context;
-                      char const *stack_min = user_context->uc_stack.ss_sp;
-                      size_t stack_size = user_context->uc_stack.ss_size;
-                      char const *faulting_address = info->si_addr;
-                      size_t s = faulting_address - stack_min;
-                      size_t page_size = sysconf (_SC_PAGESIZE);
-                      if (find_stack_direction (0) < 0)
-                        s += page_size;
-                      if (s < stack_size + page_size)
-                        _exit (0);
-                      _exit (4);
-                    }
-                  _exit (5);
-                }
 
-                static int
-                c_stack_action ()
-                {
-                  stack_t st;
-                  struct sigaction act;
-                  int r;
-
-                  st.ss_flags = 0;
-                  /* Use the midpoint to avoid Irix sigaltstack bug.  */
-                  st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
-                  st.ss_size = SIGSTKSZ;
-                  r = sigaltstack (&st, 0);
-                  if (r != 0)
-                    return 1;
 
-                  sigemptyset (&act.sa_mask);
-                  act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
-                  act.sa_sigaction = segv_handler;
-                  #if FAULT_YIELDS_SIGBUS
-                  if (sigaction (SIGBUS, &act, 0) < 0)
-                    return 2;
-                  #endif
-                  if (sigaction (SIGSEGV, &act, 0) < 0)
-                    return 3;
-                  return 0;
-                }
-                static volatile int *
-                recurse_1 (volatile int n, volatile int *p)
-                {
-                  if (n >= 0)
-                    *recurse_1 (n + 1, p) += n;
-                  return p;
-                }
-                static int
-                recurse (volatile int n)
-                {
-                  int sum = 0;
-                  return *recurse_1 (n, &sum);
-                }
-                int
-                main ()
-                {
-                  int result;
-                  #if HAVE_SETRLIMIT && defined RLIMIT_STACK
-                  /* Before starting the endless recursion, try to be friendly
-                     to the user's machine.  On some Linux 2.2.x systems, there
-                     is no stack limit for user processes at all.  We don't want
-                     to kill such systems.  */
-                  struct rlimit rl;
-                  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
-                  setrlimit (RLIMIT_STACK, &rl);
-                  #endif
+  GL_GNULIB_WMEMCHR=0
 
-                  result = c_stack_action ();
-                  if (result != 0)
-                    return result;
-                  return recurse (0);
-                }
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  ac_cv_sys_xsi_stack_overflow_heuristic=yes
-else
-  ac_cv_sys_xsi_stack_overflow_heuristic=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-          ;;
-      esac
+  GL_GNULIB_WMEMCMP=0
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
-printf "%s\n" "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
 
-   if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
 
-printf "%s\n" "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
+  GL_GNULIB_WMEMCPY=0
 
-   fi
-  fi
 
-      if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
 
+  GL_GNULIB_WMEMMOVE=0
 
 
-# Check whether --with-gnu-ld was given.
-if test ${with_gnu_ld+y}
-then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
 
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
-  # contains only /bin. Note that ksh looks also at the FPATH variable,
-  # so we have to set that as well for the test.
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
-    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
-           || PATH_SEPARATOR=';'
-       }
-fi
+  GL_GNULIB_WMEMPCPY=0
 
-if test -n "$LD"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
-printf %s "checking for ld... " >&6; }
-elif test "$GCC" = yes; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-printf %s "checking for ld used by $CC... " >&6; }
-elif test "$with_gnu_ld" = yes; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
-printf %s "checking for GNU ld... " >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-printf %s "checking for non-GNU ld... " >&6; }
-fi
-if test -n "$LD"; then
-  # Let the user override the test with a path.
-  :
-else
-  if test ${acl_cv_path_LD+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-    acl_cv_path_LD= # Final result of this test
-    ac_prog=ld # Program to search in $PATH
-    if test "$GCC" = yes; then
-      # Check if gcc -print-prog-name=ld gives a path.
-      case $host in
-        *-*-mingw*)
-          # gcc leaves a trailing carriage return which upsets mingw
-          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-        *)
-          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
-      esac
-      case $acl_output in
-        # Accept absolute paths.
-        [\\/]* | ?:[\\/]*)
-          re_direlt='/[^/][^/]*/\.\./'
-          # Canonicalize the pathname of ld
-          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
-          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
-            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
-          done
-          # Got the pathname. No search in PATH is needed.
-          acl_cv_path_LD="$acl_output"
-          ac_prog=
-          ;;
-        "")
-          # If it fails, then pretend we aren't using GCC.
-          ;;
-        *)
-          # If it is relative, then search for the first ld in PATH.
-          with_gnu_ld=unknown
-          ;;
-      esac
-    fi
-    if test -n "$ac_prog"; then
-      # Search for $ac_prog in $PATH.
-      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-      for ac_dir in $PATH; do
-        IFS="$acl_save_ifs"
-        test -z "$ac_dir" && ac_dir=.
-        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-          acl_cv_path_LD="$ac_dir/$ac_prog"
-          # Check to see if the program is GNU ld.  I'd rather use --version,
-          # but apparently some variants of GNU ld only accept -v.
-          # Break only if it was the GNU/non-GNU ld that we prefer.
-          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
-            *GNU* | *'with BFD'*)
-              test "$with_gnu_ld" != no && break
-              ;;
-            *)
-              test "$with_gnu_ld" != yes && break
-              ;;
-          esac
-        fi
-      done
-      IFS="$acl_save_ifs"
-    fi
-    case $host in
-      *-*-aix*)
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __powerpc64__ || defined _ARCH_PPC64
-                int ok;
-               #else
-                error fail
-               #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  # The compiler produces 64-bit code. Add option '-b64' so that the
-           # linker groks 64-bit object files.
-           case "$acl_cv_path_LD " in
-             *" -b64 "*) ;;
-             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
-           esac
+  GL_GNULIB_WMEMSET=0
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        ;;
-      sparc64-*-netbsd*)
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __sparcv9 || defined __arch64__
-                int ok;
-               #else
-                error fail
-               #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
 
-else
-  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
-           # so that the linker groks 32-bit object files.
-           case "$acl_cv_path_LD " in
-             *" -m elf32_sparc "*) ;;
-             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
-           esac
+  GL_GNULIB_WCSLEN=0
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        ;;
-    esac
 
-fi
 
-  LD="$acl_cv_path_LD"
-fi
-if test -n "$LD"; then
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-printf "%s\n" "$LD" >&6; }
-else
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
-if test ${acl_cv_prog_gnu_ld+y}
-then :
-  printf %s "(cached) " >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes
-  ;;
-*)
-  acl_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
-printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
+  GL_GNULIB_WCSNLEN=0
 
 
 
+  GL_GNULIB_WCSCPY=0
 
-                                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-printf %s "checking for shared library run path origin... " >&6; }
-if test ${acl_cv_rpath+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-printf "%s\n" "$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  acl_libext="$acl_cv_libext"
-  acl_shlibext="$acl_cv_shlibext"
-  acl_libname_spec="$acl_cv_libname_spec"
-  acl_library_names_spec="$acl_cv_library_names_spec"
-  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  acl_hardcode_direct="$acl_cv_hardcode_direct"
-  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
-    # Check whether --enable-rpath was given.
-if test ${enable_rpath+y}
-then :
-  enableval=$enable_rpath; :
-else
-  enable_rpath=yes
-fi
+  GL_GNULIB_WCPCPY=0
 
 
 
+  GL_GNULIB_WCSNCPY=0
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
-printf %s "checking 32-bit host C ABI... " >&6; }
-if test ${gl_cv_host_cpu_c_abi_32bit+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test -n "$gl_cv_host_cpu_c_abi"; then
-       case "$gl_cv_host_cpu_c_abi" in
-         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
-           gl_cv_host_cpu_c_abi_32bit=yes ;;
-         *)
-           gl_cv_host_cpu_c_abi_32bit=no ;;
-       esac
-     else
-       case "$host_cpu" in
 
-         i[4567]86 )
-           gl_cv_host_cpu_c_abi_32bit=yes
-           ;;
 
-         x86_64 )
-           # On x86_64 systems, the C compiler may be generating code in one of
-           # these ABIs:
-           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
-           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
-           #   with native Windows (mingw, MSVC).
-           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
-           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if (defined __x86_64__ || defined __amd64__ \
-                       || defined _M_X64 || defined _M_AMD64) \
-                      && !(defined __ILP32__ || defined _ILP32)
-                   int ok;
-                  #else
-                   error fail
-                  #endif
+  GL_GNULIB_WCPNCPY=0
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         arm* | aarch64 )
-           # Assume arm with EABI.
-           # On arm64 systems, the C compiler may be generating code in one of
-           # these ABIs:
-           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
-           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
-           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
-                   int ok;
-                  #else
-                   error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
+  GL_GNULIB_WCSCAT=0
 
-         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
-           # On hppa, the C compiler may be generating 32-bit code or 64-bit
-           # code. In the latter case, it defines _LP64 and __LP64__.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __LP64__
-                   int ok;
-                  #else
-                   error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         ia64* )
-           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
-           # 32-bit code. In the latter case, it defines _ILP32.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef _ILP32
-                   int ok;
-                  #else
-                   error fail
-                  #endif
+  GL_GNULIB_WCSNCAT=0
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=yes
-else
-  gl_cv_host_cpu_c_abi_32bit=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         mips* )
-           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
-           # at 32.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
-                   int ok;
-                  #else
-                   error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
+  GL_GNULIB_WCSCMP=0
 
-         powerpc* )
-           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
-           # No need to distinguish them here; the caller may distinguish
-           # them based on the OS.
-           # On powerpc64 systems, the C compiler may still be generating
-           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
-           # be generating 64-bit code.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __powerpc64__ || defined _ARCH_PPC64
-                   int ok;
-                  #else
-                   error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         rs6000 )
-           gl_cv_host_cpu_c_abi_32bit=yes
-           ;;
+  GL_GNULIB_WCSNCMP=0
 
-         riscv32 | riscv64 )
-           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
-           # Size of 'long' and 'void *':
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __LP64__
-                    int ok;
-                  #else
-                    error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         s390* )
-           # On s390x, the C compiler may be generating 64-bit (= s390x) code
-           # or 31-bit (= s390) code.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __LP64__ || defined __s390x__
-                    int ok;
-                  #else
-                    error fail
-                  #endif
+  GL_GNULIB_WCSCASECMP=0
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
 
-         sparc | sparc64 )
-           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
-           # C compiler still generates 32-bit code.
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __sparcv9 || defined __arch64__
-                   int ok;
-                  #else
-                   error fail
-                  #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_host_cpu_c_abi_32bit=no
-else
-  gl_cv_host_cpu_c_abi_32bit=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-           ;;
+  GL_GNULIB_WCSNCASECMP=0
 
-         *)
-           gl_cv_host_cpu_c_abi_32bit=no
-           ;;
-       esac
-     fi
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
-printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
 
-  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+  GL_GNULIB_WCSCOLL=0
 
 
 
+  GL_GNULIB_WCSXFRM=0
 
 
-  case "$host_os" in
-    solaris*)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
-printf %s "checking for 64-bit host... " >&6; }
-if test ${gl_cv_solaris_64bit+y}
+
+  GL_GNULIB_WCSDUP=0
+
+
+
+  GL_GNULIB_WCSCHR=0
+
+
+
+  GL_GNULIB_WCSRCHR=0
+
+
+
+  GL_GNULIB_WCSCSPN=0
+
+
+
+  GL_GNULIB_WCSSPN=0
+
+
+
+  GL_GNULIB_WCSPBRK=0
+
+
+
+  GL_GNULIB_WCSSTR=0
+
+
+
+  GL_GNULIB_WCSTOK=0
+
+
+
+  GL_GNULIB_WCSWIDTH=0
+
+
+
+  GL_GNULIB_WCSFTIME=0
+
+
+
+  GL_GNULIB_MDA_WCSDUP=1
+
+
+
+
+    HAVE__EXIT=1;
+  HAVE_ALIGNED_ALLOC=1;
+  HAVE_ATOLL=1;
+  HAVE_CANONICALIZE_FILE_NAME=1;
+  HAVE_DECL_ECVT=1;
+  HAVE_DECL_FCVT=1;
+  HAVE_DECL_GCVT=1;
+  HAVE_DECL_GETLOADAVG=1;
+  HAVE_GETSUBOPT=1;
+  HAVE_GRANTPT=1;
+  HAVE_INITSTATE=1;
+  HAVE_DECL_INITSTATE=1;
+  HAVE_MBTOWC=1;
+  HAVE_MKDTEMP=1;
+  HAVE_MKOSTEMP=1;
+  HAVE_MKOSTEMPS=1;
+  HAVE_MKSTEMP=1;
+  HAVE_MKSTEMPS=1;
+  HAVE_POSIX_MEMALIGN=1;
+  HAVE_POSIX_OPENPT=1;
+  HAVE_PTSNAME=1;
+  HAVE_PTSNAME_R=1;
+  HAVE_QSORT_R=1;
+  HAVE_RANDOM=1;
+  HAVE_RANDOM_H=1;
+  HAVE_RANDOM_R=1;
+  HAVE_REALLOCARRAY=1;
+  HAVE_REALPATH=1;
+  HAVE_RPMATCH=1;
+  HAVE_SECURE_GETENV=1;
+  HAVE_SETENV=1;
+  HAVE_DECL_SETENV=1;
+  HAVE_SETSTATE=1;
+  HAVE_DECL_SETSTATE=1;
+  HAVE_STRTOD=1;
+  HAVE_STRTOL=1;
+  HAVE_STRTOLD=1;
+  HAVE_STRTOLL=1;
+  HAVE_STRTOUL=1;
+  HAVE_STRTOULL=1;
+  HAVE_STRUCT_RANDOM_DATA=1;
+  HAVE_SYS_LOADAVG_H=0;
+  HAVE_UNLOCKPT=1;
+  HAVE_DECL_UNSETENV=1;
+  REPLACE_ALIGNED_ALLOC=0;
+  REPLACE_CALLOC=0;
+  REPLACE_CANONICALIZE_FILE_NAME=0;
+  REPLACE_FREE=0;
+  REPLACE_INITSTATE=0;
+  REPLACE_MALLOC=0;
+  REPLACE_MBTOWC=0;
+  REPLACE_MKSTEMP=0;
+  REPLACE_POSIX_MEMALIGN=0;
+  REPLACE_PTSNAME=0;
+  REPLACE_PTSNAME_R=0;
+  REPLACE_PUTENV=0;
+  REPLACE_QSORT_R=0;
+  REPLACE_RANDOM=0;
+  REPLACE_RANDOM_R=0;
+  REPLACE_REALLOC=0;
+  REPLACE_REALLOCARRAY=0;
+  REPLACE_REALPATH=0;
+  REPLACE_SETENV=0;
+  REPLACE_SETSTATE=0;
+  REPLACE_STRTOD=0;
+  REPLACE_STRTOL=0;
+  REPLACE_STRTOLD=0;
+  REPLACE_STRTOLL=0;
+  REPLACE_STRTOUL=0;
+  REPLACE_STRTOULL=0;
+  REPLACE_UNSETENV=0;
+  REPLACE_WCTOMB=0;
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
+printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
+if test ${gl_cv_malloc_ptrdiff+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifdef _LP64
-                 int ok;
-                #else
-                 error fail
-                #endif
+#include <stdint.h>
+
+int
+main (void)
+{
+/* 64-bit ptrdiff_t is so wide that no practical platform
+               can exceed it.  */
+            #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
+
+            /* On rare machines where size_t fits in ptrdiff_t there
+               is no problem.  */
+            #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
+
+            /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
+               bounds even on 32-bit platforms.  We don't know which
+               non-glibc systems are safe.  */
+            #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
+
+            #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
+              return 0;
+            #else
+              #error "malloc might not be ptrdiff_t safe"
+              syntax error
+            #endif
 
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_solaris_64bit=yes
-else
-  gl_cv_solaris_64bit=no
+  gl_cv_malloc_ptrdiff=yes
+else $as_nop
+  gl_cv_malloc_ptrdiff=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
-printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
-  esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
+printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
-printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
-if test ${acl_cv_libdirstems+y}
+
+
+
+  test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
+printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
+if test ${gl_cv_func_malloc_posix+y}
 then :
   printf %s "(cached) " >&6
-else
-  acl_libdirstem=lib
-     acl_libdirstem2=
-     case "$host_os" in
-       solaris*)
-                                                      if test $gl_cv_solaris_64bit = yes; then
-           acl_libdirstem=lib/64
-           case "$host_cpu" in
-             sparc*)        acl_libdirstem2=lib/sparcv9 ;;
-             i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
-           esac
-         fi
-         ;;
-       *)
-                           if test "$HOST_CPU_C_ABI_32BIT" != yes; then
-                                            searchpath=`(if test -f /usr/bin/gcc \
-                           && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
-                          LC_ALL=C /usr/bin/gcc -print-search-dirs; \
-                        else \
-                          LC_ALL=C $CC -print-search-dirs; \
-                        fi) 2>/dev/null \
-                       | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-           if test -n "$searchpath"; then
-             acl_save_IFS="${IFS=      }"; IFS=":"
-             for searchdir in $searchpath; do
-               if test -d "$searchdir"; then
-                 case "$searchdir" in
-                   */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-                   */../ | */.. )
-                     # Better ignore directories of this form. They are misleading.
-                     ;;
-                   *) searchdir=`cd "$searchdir" && pwd`
-                      case "$searchdir" in
-                        */lib64 ) acl_libdirstem=lib64 ;;
-                      esac ;;
-                 esac
-               fi
-             done
-             IFS="$acl_save_IFS"
-           fi
-         fi
-         ;;
-     esac
-     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
-     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+else $as_nop
+
+                                    case "$host_os" in
+        mingw*)
+          gl_cv_func_malloc_posix=no ;;
+        irix* | solaris*)
+
+          gl_cv_func_malloc_posix=no ;;
+        *)
+          gl_cv_func_malloc_posix=yes ;;
+      esac
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
-printf "%s\n" "$acl_cv_libdirstems" >&6; }
-  # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
-  acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
-  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
 
 
 
 
 
+  if test "$gl_cv_func_malloc_posix" = yes; then
 
+printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
+  else
+    REPLACE_MALLOC=1
+  fi
 
 
 
 
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_CALLOC=1
+  fi
 
 
 
-    use_additional=yes
+  GL_GNULIB__EXIT=0
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
 
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  GL_GNULIB_ALIGNED_ALLOC=0
 
 
-# Check whether --with-libsigsegv-prefix was given.
-if test ${with_libsigsegv_prefix+y}
-then :
-  withval=$with_libsigsegv_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+  GL_GNULIB_ATOLL=0
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && test ! -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
+  GL_GNULIB_CALLOC_POSIX=0
 
-fi
 
-      LIBSIGSEGV=
-  LTLIBSIGSEGV=
-  INCSIGSEGV=
-  LIBSIGSEGV_PREFIX=
-      HAVE_LIBSIGSEGV=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='sigsegv '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBSIGSEGV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  GL_GNULIB_CANONICALIZE_FILE_NAME=0
 
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBSIGSEGV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
-              else
-                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'sigsegv'; then
-                  LIBSIGSEGV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'sigsegv'; then
-                  LIBSIGSEGV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCSIGSEGV; do
+  GL_GNULIB_FREE_POSIX=0
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBSIGSEGV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  GL_GNULIB_GETLOADAVG=0
 
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBSIGSEGV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
-                    LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
-            LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
-    done
-  fi
+  GL_GNULIB_GETSUBOPT=0
 
 
 
+  GL_GNULIB_GRANTPT=0
 
 
 
-        ac_save_CPPFLAGS="$CPPFLAGS"
+  GL_GNULIB_MALLOC_POSIX=0
 
-  for element in $INCSIGSEGV; do
-    haveit=
-    for x in $CPPFLAGS; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
+  GL_GNULIB_MBTOWC=0
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
-printf %s "checking for libsigsegv... " >&6; }
-if test ${ac_cv_libsigsegv+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-    ac_save_LIBS="$LIBS"
-                                case " $LIBSIGSEGV" in
-      *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
-      *)       LIBS="$LIBSIGSEGV $LIBS" ;;
-    esac
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sigsegv.h>
-int
-main (void)
-{
-sigsegv_deinstall_handler();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_libsigsegv=yes
-else
-  ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
+  GL_GNULIB_MKDTEMP=0
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
-printf "%s\n" "$ac_cv_libsigsegv" >&6; }
-  if test "$ac_cv_libsigsegv" = yes; then
-    HAVE_LIBSIGSEGV=yes
 
-printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
-printf %s "checking how to link with libsigsegv... " >&6; }
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
-printf "%s\n" "$LIBSIGSEGV" >&6; }
-  else
-    HAVE_LIBSIGSEGV=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBSIGSEGV=
-    LTLIBSIGSEGV=
-    LIBSIGSEGV_PREFIX=
-  fi
+  GL_GNULIB_MKOSTEMP=0
 
 
 
+  GL_GNULIB_MKOSTEMPS=0
 
 
 
+  GL_GNULIB_MKSTEMP=0
 
-    gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
 
 
-# The Clang compiler raises a warning for an undeclared identifier that matches
-# a compiler builtin function.  All extant Clang versions are affected, as of
-# Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
-# C and Objective C languages, but Clang does report an error under C++ and
-# Objective C++.
-#
-# Passing -fno-builtin to the compiler would suppress this problem.  That
-# strategy would have the advantage of being insensitive to stray warnings, but
-# it would make tests less realistic.
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
-printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
-if test ${ac_cv_c_decl_report+y}
+  GL_GNULIB_MKSTEMPS=0
+
+
+
+  GL_GNULIB_POSIX_MEMALIGN=0
+
+
+
+  GL_GNULIB_POSIX_OPENPT=0
+
+
+
+  GL_GNULIB_PTSNAME=0
+
+
+
+  GL_GNULIB_PTSNAME_R=0
+
+
+
+  GL_GNULIB_PUTENV=0
+
+
+
+  GL_GNULIB_QSORT_R=0
+
+
+
+  GL_GNULIB_RANDOM=0
+
+
+
+  GL_GNULIB_RANDOM_R=0
+
+
+
+  GL_GNULIB_REALLOCARRAY=0
+
+
+
+  GL_GNULIB_REALLOC_POSIX=0
+
+
+
+  GL_GNULIB_REALPATH=0
+
+
+
+  GL_GNULIB_RPMATCH=0
+
+
+
+  GL_GNULIB_SECURE_GETENV=0
+
+
+
+  GL_GNULIB_SETENV=0
+
+
+
+  GL_GNULIB_STRTOD=0
+
+
+
+  GL_GNULIB_STRTOL=0
+
+
+
+  GL_GNULIB_STRTOLD=0
+
+
+
+  GL_GNULIB_STRTOLL=0
+
+
+
+  GL_GNULIB_STRTOUL=0
+
+
+
+  GL_GNULIB_STRTOULL=0
+
+
+
+  GL_GNULIB_SYSTEM_POSIX=0
+
+
+
+  GL_GNULIB_UNLOCKPT=0
+
+
+
+  GL_GNULIB_UNSETENV=0
+
+
+
+  GL_GNULIB_WCTOMB=0
+
+
+
+  GL_GNULIB_MDA_ECVT=1
+
+
+
+  GL_GNULIB_MDA_FCVT=1
+
+
+
+  GL_GNULIB_MDA_GCVT=1
+
+
+
+  GL_GNULIB_MDA_MKTEMP=1
+
+
+
+  GL_GNULIB_MDA_PUTENV=1
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+printf %s "checking for C/C++ restrict keyword... " >&6; }
+if test ${ac_cv_c_restrict+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_cv_c_restrict=no
+   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
+   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
+   # Put 'restrict' last, because C++ lacks it.
+   for ac_kw in __restrict__ __restrict _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+typedef int *int_ptr;
+          int foo (int_ptr $ac_kw ip) { return ip[0]; }
+          int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+          int bar (int ip[$ac_kw]) { return ip[0]; }
 
 int
 main (void)
 {
-(void) strchr;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  if test -s conftest.err
-then :
-      # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
-    # valid AC_CHECK_DECL input.  No library function is consistently available
-    # on freestanding implementations, so test against a dummy declaration.
-    # Include always-available headers on the off chance that they somehow
-    # elicit warnings.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <float.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <stddef.h>
-extern void ac_decl (int, char *);
-int
-main (void)
-{
-#ifdef __cplusplus
-  (void) ac_decl ((int) 0, (char *) 0);
-  (void) ac_decl;
-#else
-  (void) ac_decl;
-#endif
+int s[1];
+          int *$ac_kw t = s;
+          t[0] = 0;
+          return foo (t) + bar (t);
 
   ;
   return 0;
@@ -9496,97 +9162,31 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  if test -s conftest.err
-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 $? "cannot detect from compiler exit status or warnings
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  ac_cv_c_decl_report=warning
-fi
-else
-  { { 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 $? "cannot compile a simple declaration test
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  { { 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 $? "compiler does not report undeclared identifiers
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-else
-  ac_cv_c_decl_report=error
+  ac_cv_c_restrict=$ac_kw
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
-printf "%s\n" "$ac_cv_c_decl_report" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+printf "%s\n" "$ac_cv_c_restrict" >&6; }
 
-case $ac_cv_c_decl_report in
-  warning) ac_c_decl_warn_flag=yes ;;
-  *) ac_c_decl_warn_flag= ;;
-esac
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
+ ;;
+ esac
 
 
 
-  GNULIB_CHDIR=0;
-  GNULIB_CHOWN=0;
-  GNULIB_CLOSE=0;
-  GNULIB_DUP=0;
-  GNULIB_DUP2=0;
-  GNULIB_DUP3=0;
-  GNULIB_ENVIRON=0;
-  GNULIB_EUIDACCESS=0;
-  GNULIB_FACCESSAT=0;
-  GNULIB_FCHDIR=0;
-  GNULIB_FCHOWNAT=0;
-  GNULIB_FDATASYNC=0;
-  GNULIB_FSYNC=0;
-  GNULIB_FTRUNCATE=0;
-  GNULIB_GETCWD=0;
-  GNULIB_GETDOMAINNAME=0;
-  GNULIB_GETDTABLESIZE=0;
-  GNULIB_GETGROUPS=0;
-  GNULIB_GETHOSTNAME=0;
-  GNULIB_GETLOGIN=0;
-  GNULIB_GETLOGIN_R=0;
-  GNULIB_GETPAGESIZE=0;
-  GNULIB_GETPASS=0;
-  GNULIB_GETUSERSHELL=0;
-  GNULIB_GROUP_MEMBER=0;
-  GNULIB_ISATTY=0;
-  GNULIB_LCHOWN=0;
-  GNULIB_LINK=0;
-  GNULIB_LINKAT=0;
-  GNULIB_LSEEK=0;
-  GNULIB_PIPE=0;
-  GNULIB_PIPE2=0;
-  GNULIB_PREAD=0;
-  GNULIB_PWRITE=0;
-  GNULIB_READ=0;
-  GNULIB_READLINK=0;
-  GNULIB_READLINKAT=0;
-  GNULIB_RMDIR=0;
-  GNULIB_SETHOSTNAME=0;
-  GNULIB_SLEEP=0;
-  GNULIB_SYMLINK=0;
-  GNULIB_SYMLINKAT=0;
-  GNULIB_TRUNCATE=0;
-  GNULIB_TTYNAME_R=0;
-  GNULIB_UNISTD_H_NONBLOCKING=0;
-  GNULIB_UNISTD_H_SIGPIPE=0;
-  GNULIB_UNLINK=0;
-  GNULIB_UNLINKAT=0;
-  GNULIB_USLEEP=0;
-  GNULIB_WRITE=0;
     HAVE_CHOWN=1;
-  HAVE_DUP2=1;
+  HAVE_COPY_FILE_RANGE=1;
   HAVE_DUP3=1;
   HAVE_EUIDACCESS=1;
+  HAVE_EXECVPE=1;
   HAVE_FACCESSAT=1;
   HAVE_FCHDIR=1;
   HAVE_FCHOWNAT=1;
@@ -9594,6 +9194,7 @@ esac
   HAVE_FSYNC=1;
   HAVE_FTRUNCATE=1;
   HAVE_GETDTABLESIZE=1;
+  HAVE_GETENTROPY=1;
   HAVE_GETGROUPS=1;
   HAVE_GETHOSTNAME=1;
   HAVE_GETLOGIN=1;
@@ -9616,6 +9217,7 @@ esac
   HAVE_UNLINKAT=1;
   HAVE_USLEEP=1;
   HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_EXECVPE=1;
   HAVE_DECL_FCHDIR=1;
   HAVE_DECL_FDATASYNC=1;
   HAVE_DECL_GETDOMAINNAME=1;
@@ -9628,10 +9230,18 @@ esac
   HAVE_DECL_TTYNAME_R=1;
   HAVE_OS_H=0;
   HAVE_SYS_PARAM_H=0;
+  REPLACE_ACCESS=0;
   REPLACE_CHOWN=0;
   REPLACE_CLOSE=0;
   REPLACE_DUP=0;
   REPLACE_DUP2=0;
+  REPLACE_EXECL=0;
+  REPLACE_EXECLE=0;
+  REPLACE_EXECLP=0;
+  REPLACE_EXECV=0;
+  REPLACE_EXECVE=0;
+  REPLACE_EXECVP=0;
+  REPLACE_EXECVPE=0;
   REPLACE_FACCESSAT=0;
   REPLACE_FCHOWNAT=0;
   REPLACE_FTRUNCATE=0;
@@ -9662,6 +9272,7 @@ esac
   REPLACE_UNLINKAT=0;
   REPLACE_USLEEP=0;
   REPLACE_WRITE=0;
+  UNISTD_H_HAVE_SYS_RANDOM_H=0;
   UNISTD_H_HAVE_WINSOCK2_H=0;
   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
 
@@ -9680,7 +9291,6 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
 
 
-  GNULIB_IOCTL=0;
     SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
 
@@ -9688,54 +9298,387 @@ printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
 
 
 
-  GNULIB_ISBLANK=0;
-    HAVE_ISBLANK=1;
 
+  GL_GNULIB_ACCESS=0
 
 
-  { 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
-  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
+
+  GL_GNULIB_CHDIR=0
+
+
+
+  GL_GNULIB_CHOWN=0
+
+
+
+  GL_GNULIB_CLOSE=0
+
+
+
+  GL_GNULIB_COPY_FILE_RANGE=0
+
+
+
+  GL_GNULIB_DUP=0
+
+
+
+  GL_GNULIB_DUP2=0
+
+
+
+  GL_GNULIB_DUP3=0
+
+
+
+  GL_GNULIB_ENVIRON=0
+
+
+
+  GL_GNULIB_EUIDACCESS=0
+
+
+
+  GL_GNULIB_EXECL=0
+
+
+
+  GL_GNULIB_EXECLE=0
+
+
+
+  GL_GNULIB_EXECLP=0
+
+
+
+  GL_GNULIB_EXECV=0
+
+
+
+  GL_GNULIB_EXECVE=0
+
+
+
+  GL_GNULIB_EXECVP=0
+
+
+
+  GL_GNULIB_EXECVPE=0
+
+
+
+  GL_GNULIB_FACCESSAT=0
+
+
+
+  GL_GNULIB_FCHDIR=0
+
+
+
+  GL_GNULIB_FCHOWNAT=0
+
+
+
+  GL_GNULIB_FDATASYNC=0
+
+
+
+  GL_GNULIB_FSYNC=0
+
+
+
+  GL_GNULIB_FTRUNCATE=0
+
+
+
+  GL_GNULIB_GETCWD=0
+
+
+
+  GL_GNULIB_GETDOMAINNAME=0
+
+
+
+  GL_GNULIB_GETDTABLESIZE=0
+
+
+
+  GL_GNULIB_GETENTROPY=0
+
+
+
+  GL_GNULIB_GETGROUPS=0
+
+
+
+  GL_GNULIB_GETHOSTNAME=0
+
+
+
+  GL_GNULIB_GETLOGIN=0
+
+
+
+  GL_GNULIB_GETLOGIN_R=0
+
+
+
+  GL_GNULIB_GETOPT_POSIX=0
+
+
+
+  GL_GNULIB_GETPAGESIZE=0
+
+
+
+  GL_GNULIB_GETPASS=0
+
+
+
+  GL_GNULIB_GETUSERSHELL=0
+
+
+
+  GL_GNULIB_GROUP_MEMBER=0
+
+
+
+  GL_GNULIB_ISATTY=0
+
+
+
+  GL_GNULIB_LCHOWN=0
+
+
+
+  GL_GNULIB_LINK=0
+
+
+
+  GL_GNULIB_LINKAT=0
+
+
+
+  GL_GNULIB_LSEEK=0
+
+
+
+  GL_GNULIB_PIPE=0
+
+
+
+  GL_GNULIB_PIPE2=0
+
+
+
+  GL_GNULIB_PREAD=0
+
+
+
+  GL_GNULIB_PWRITE=0
+
+
+
+  GL_GNULIB_READ=0
+
+
+
+  GL_GNULIB_READLINK=0
+
+
+
+  GL_GNULIB_READLINKAT=0
+
+
+
+  GL_GNULIB_RMDIR=0
+
+
+
+  GL_GNULIB_SETHOSTNAME=0
+
+
+
+  GL_GNULIB_SLEEP=0
+
+
+
+  GL_GNULIB_SYMLINK=0
+
+
+
+  GL_GNULIB_SYMLINKAT=0
+
+
+
+  GL_GNULIB_TRUNCATE=0
+
+
+
+  GL_GNULIB_TTYNAME_R=0
+
+
+
+  GL_GNULIB_UNISTD_H_GETOPT=0
+
+
+
+  GL_GNULIB_UNISTD_H_NONBLOCKING=0
+
+
+
+  GL_GNULIB_UNISTD_H_SIGPIPE=0
+
+
+
+  GL_GNULIB_UNLINK=0
+
+
+
+  GL_GNULIB_UNLINKAT=0
+
+
+
+  GL_GNULIB_USLEEP=0
+
+
+
+  GL_GNULIB_WRITE=0
+
+
+
+  GL_GNULIB_MDA_ACCESS=1
+
+
+
+  GL_GNULIB_MDA_CHDIR=1
+
+
+
+  GL_GNULIB_MDA_CLOSE=1
+
+
+
+  GL_GNULIB_MDA_DUP=1
+
+
+
+  GL_GNULIB_MDA_DUP2=1
+
+
+
+  GL_GNULIB_MDA_EXECL=1
+
+
+
+  GL_GNULIB_MDA_EXECLE=1
+
+
+
+  GL_GNULIB_MDA_EXECLP=1
+
+
+
+  GL_GNULIB_MDA_EXECV=1
+
+
+
+  GL_GNULIB_MDA_EXECVE=1
+
+
+
+  GL_GNULIB_MDA_EXECVP=1
+
+
+
+  GL_GNULIB_MDA_EXECVPE=1
+
+
+
+  GL_GNULIB_MDA_GETCWD=1
+
+
+
+  GL_GNULIB_MDA_GETPID=1
+
+
+
+  GL_GNULIB_MDA_ISATTY=1
+
+
+
+  GL_GNULIB_MDA_LSEEK=1
+
+
+
+  GL_GNULIB_MDA_READ=1
+
+
+
+  GL_GNULIB_MDA_RMDIR=1
+
+
+
+  GL_GNULIB_MDA_SWAB=1
+
+
+
+  GL_GNULIB_MDA_UNLINK=1
+
+
+
+  GL_GNULIB_MDA_WRITE=1
+
+
+
+
+    HAVE_ISBLANK=1;
+
+
+
+  { 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 $as_nop
+  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
+else $as_nop
   CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -9744,13 +9687,13 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_have_include_next=buggy
-else
+else $as_nop
   gl_cv_have_include_next=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
      CPPFLAGS="$gl_save_CPPFLAGS"
      rm -rf conftestd1a conftestd1b conftestd2
 
@@ -9776,13 +9719,14 @@ printf "%s\n" "$gl_cv_have_include_next" >&6; }
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
-printf %s "checking whether system header files limit the line length... " >&6; }
-if test ${gl_cv_pragma_columns+y}
+
+      { 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
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #ifdef __TANDEM
@@ -9793,17 +9737,17 @@ _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "choke me" >/dev/null 2>&1
 then :
-  gl_cv_pragma_columns=yes
-else
-  gl_cv_pragma_columns=no
+  gl_cv_source_line_length_unlimited=no
+else $as_nop
+  gl_cv_source_line_length_unlimited=yes
 fi
 rm -rf conftest*
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
-printf "%s\n" "$gl_cv_pragma_columns" >&6; }
-  if test $gl_cv_pragma_columns = yes; then
+{ 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=
@@ -9812,43 +9756,78 @@ printf "%s\n" "$gl_cv_pragma_columns" >&6; }
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
-printf %s "checking whether // is distinct from /... " >&6; }
-if test ${gl_cv_double_slash_root+y}
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_ctype_h='<'ctype.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
+printf %s "checking absolute name of <ctype.h>... " >&6; }
+if test ${gl_cv_next_ctype_h+y}
 then :
   printf %s "(cached) " >&6
-else
-   if test x"$cross_compiling" = xyes ; then
-        # When cross-compiling, there is no way to tell whether // is special
-        # short of a list of hosts.  However, the only known hosts to date
-        # that have a distinct // are Apollo DomainOS (too old to port to),
-        # Cygwin, and z/OS.  If anyone knows of another system for which // has
-        # special semantics and is distinct from /, please report it to
-        # <bug-gnulib@gnu.org>.
-        case $host in
-          *-cygwin | i370-ibm-openedition)
-            gl_cv_double_slash_root=yes ;;
-          *)
-            # Be optimistic and assume that / and // are the same when we
-            # don't know.
-            gl_cv_double_slash_root='unknown, assuming no' ;;
-        esac
-      else
-        set x `ls -di / // 2>/dev/null`
-        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
-          gl_cv_double_slash_root=no
-        else
-          gl_cv_double_slash_root=yes
-        fi
-      fi
+else $as_nop
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.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 'ctype.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_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_ctype_h
+           gl_cv_next_ctype_h='"'$gl_header'"'
+
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
-printf "%s\n" "$gl_cv_double_slash_root" >&6; }
-  if test "$gl_cv_double_slash_root" = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
+printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
+     fi
+     NEXT_CTYPE_H=$gl_cv_next_ctype_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='<'ctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_ctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
 
-printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
 
-  fi
 
 
 
@@ -9857,6 +9836,68 @@ printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
 
 
 
+  GL_GNULIB_ISBLANK=0
+
+
+
+gl_mda_defines='
+#if defined _WIN32 && !defined __CYGWIN__
+#define access    _access
+#define chdir     _chdir
+#define chmod     _chmod
+#define close     _close
+#define creat     _creat
+#define dup       _dup
+#define dup2      _dup2
+#define ecvt      _ecvt
+#define execl     _execl
+#define execle    _execle
+#define execlp    _execlp
+#define execv     _execv
+#define execve    _execve
+#define execvp    _execvp
+#define execvpe   _execvpe
+#define fcloseall _fcloseall
+#define fcvt      _fcvt
+#define fdopen    _fdopen
+#define fileno    _fileno
+#define gcvt      _gcvt
+#define getcwd    _getcwd
+#define getpid    _getpid
+#define getw      _getw
+#define isatty    _isatty
+#define j0        _j0
+#define j1        _j1
+#define jn        _jn
+#define lfind     _lfind
+#define lsearch   _lsearch
+#define lseek     _lseek
+#define memccpy   _memccpy
+#define mkdir     _mkdir
+#define mktemp    _mktemp
+#define open      _open
+#define putenv    _putenv
+#define putw      _putw
+#define read      _read
+#define rmdir     _rmdir
+#define strdup    _strdup
+#define swab      _swab
+#define tempnam   _tempnam
+#define tzset     _tzset
+#define umask     _umask
+#define unlink    _unlink
+#define utime     _utime
+#define wcsdup    _wcsdup
+#define write     _write
+#define y0        _y0
+#define y1        _y1
+#define yn        _yn
+#endif
+'
+
+
+
+
 
 
 
@@ -9866,7 +9907,7 @@ printf %s "checking if environ is properly declared... " >&6; }
 if test ${gt_cv_var_environ_declaration+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if HAVE_UNISTD_H
@@ -9875,7 +9916,8 @@ else
      /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
      #include <stdlib.h>
 
-            extern struct { int foo; } environ;
+            typedef struct { int foo; } foo_t;
+            extern foo_t environ;
 int
 main (void)
 {
@@ -9887,10 +9929,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gt_cv_var_environ_declaration=no
-else
+else $as_nop
   gt_cv_var_environ_declaration=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
@@ -9912,7 +9954,7 @@ printf %s "checking for complete errno.h... " >&6; }
 if test ${gl_cv_header_errno_h_complete+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -9975,7 +10017,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "booboo" >/dev/null 2>&1
 then :
   gl_cv_header_errno_h_complete=no
-else
+else $as_nop
   gl_cv_header_errno_h_complete=yes
 fi
 rm -rf conftest*
@@ -10003,7 +10045,7 @@ printf %s "checking absolute name of <errno.h>... " >&6; }
 if test ${gl_cv_next_errno_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
 
 
@@ -10077,7 +10119,7 @@ printf %s "checking for EMULTIHOP value... " >&6; }
 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -10092,7 +10134,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "yes" >/dev/null 2>&1
 then :
   gl_cv_header_errno_h_EMULTIHOP=yes
-else
+else $as_nop
   gl_cv_header_errno_h_EMULTIHOP=no
 fi
 rm -rf conftest*
@@ -10152,7 +10194,7 @@ printf %s "checking for ENOLINK value... " >&6; }
 if test ${gl_cv_header_errno_h_ENOLINK+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -10167,7 +10209,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "yes" >/dev/null 2>&1
 then :
   gl_cv_header_errno_h_ENOLINK=yes
-else
+else $as_nop
   gl_cv_header_errno_h_ENOLINK=no
 fi
 rm -rf conftest*
@@ -10227,7 +10269,7 @@ printf %s "checking for EOVERFLOW value... " >&6; }
 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -10242,7 +10284,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "yes" >/dev/null 2>&1
 then :
   gl_cv_header_errno_h_EOVERFLOW=yes
-else
+else $as_nop
   gl_cv_header_errno_h_EOVERFLOW=no
 fi
 rm -rf conftest*
@@ -10296,31 +10338,117 @@ printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
   fi
 
 
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+{ 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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_save_CFLAGS=$CFLAGS
+   ac_cv_c_undeclared_builtin_options='cannot detect'
+   for ac_arg in '' -fno-builtin; do
+     CFLAGS="$ac_save_CFLAGS $ac_arg"
+     # This test program should *not* compile successfully.
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+(void) strchr;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+  # This test program should compile successfully.
+        # No library function is consistently available on
+        # freestanding implementations, so test against a dummy
+        # declaration.  Include always-available headers on the
+        # off chance that they somehow elicit warnings.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+  (void) ac_decl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  if test x"$ac_arg" = x
+then :
+  ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+  ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+          break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    done
+    CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+  case $ac_cv_c_undeclared_builtin_options in #(
+  'cannot detect') :
+    { { 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 $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+  'none needed') :
+    ac_c_undeclared_builtin_options='' ;; #(
+  *) :
+    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+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 :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
-
 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
 
 
+if test $ac_cv_have_decl_strerror_r = yes; then
+  # For backward compatibility's sake, define HAVE_STRERROR_R.
+  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
+  # as AC_CHECK_DECLS_ONCE.)
+
+printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
 
+fi
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
 printf %s "checking whether strerror_r returns char *... " >&6; }
 if test ${ac_cv_func_strerror_r_char_p+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     ac_cv_func_strerror_r_char_p=no
     if test $ac_cv_have_decl_strerror_r = yes; then
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <string.h>
 int
 main (void)
 {
@@ -10338,39 +10466,7 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_func_strerror_r_char_p=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    else
-      # strerror_r is not declared.  Choose between
-      # systems that have relatively inaccessible declarations for the
-      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
-      # former has a strerror_r that returns char*, while the latter
-      # has a strerror_r that returns `int'.
-      # This test should segfault on the DEC system.
-      if test "$cross_compiling" = yes
-then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-       extern char *strerror_r ();
-int
-main (void)
-{
-char buf[100];
-         char x = *strerror_r (0, buf, sizeof buf);
-         return ! isalpha (x);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  ac_cv_func_strerror_r_char_p=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
     fi
 
 
 
 
-  GNULIB_FCNTL=0;
-  GNULIB_NONBLOCKING=0;
-  GNULIB_OPEN=0;
-  GNULIB_OPENAT=0;
     HAVE_FCNTL=1;
   HAVE_OPENAT=1;
+  REPLACE_CREAT=0;
   REPLACE_FCNTL=0;
   REPLACE_OPEN=0;
   REPLACE_OPENAT=0;
 
 
 
+  GL_GNULIB_CREAT=0
 
 
 
+  GL_GNULIB_FCNTL=0
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
-printf %s "checking for working fcntl.h... " >&6; }
-if test ${gl_cv_header_working_fcntl_h+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                  # Guess 'no' on native Windows.
-          mingw*) gl_cv_header_working_fcntl_h='no' ;;
-          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-           #include <sys/stat.h>
-           #if HAVE_UNISTD_H
-           # include <unistd.h>
-           #else /* on Windows with MSVC */
+
+  GL_GNULIB_NONBLOCKING=0
+
+
+
+  GL_GNULIB_OPEN=0
+
+
+
+  GL_GNULIB_OPENAT=0
+
+
+
+  GL_GNULIB_MDA_CREAT=1
+
+
+
+  GL_GNULIB_MDA_OPEN=1
+
+
+
+
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+printf %s "checking for working fcntl.h... " >&6; }
+if test ${gl_cv_header_working_fcntl_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                  # Guess 'no' on native Windows.
+          mingw*) gl_cv_header_working_fcntl_h='no' ;;
+          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
+        esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
            # include <io.h>
            # include <stdlib.h>
            # defined sleep(n) _sleep ((n) * 1000)
            #endif
            #include <fcntl.h>
+
+
+$gl_mda_defines
+
            #ifndef O_NOATIME
             #define O_NOATIME 0
            #endif
@@ -10520,7 +10647,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_header_working_fcntl_h=yes
-else
+else $as_nop
   case $? in #(
         4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
         64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
@@ -10553,21 +10680,48 @@ printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
 
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+
+  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
 if test "x$ac_cv_type_pid_t" = xyes
 then :
 
-else
+else $as_nop
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_pid_type='int'
+else $as_nop
+  ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
 
-printf "%s\n" "#define pid_t int" >>confdefs.h
 
 fi
 
+
 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
 if test "x$ac_cv_type_mode_t" = xyes
 then :
 
-else
+else $as_nop
 
 printf "%s\n" "#define mode_t int" >>confdefs.h
 
 
 
 
-  GNULIB_FNMATCH=0;
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_fcntl_h='<'fcntl.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+printf %s "checking absolute name of <fcntl.h>... " >&6; }
+if test ${gl_cv_next_fcntl_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.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 'fcntl.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_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_fcntl_h
+           gl_cv_next_fcntl_h='"'$gl_header'"'
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
+     fi
+     NEXT_FCNTL_H=$gl_cv_next_fcntl_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='<'fcntl.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_fcntl_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
     HAVE_FNMATCH=1;
   REPLACE_FNMATCH=0;
 
@@ -10604,7 +10841,7 @@ printf %s "checking absolute name of <fnmatch.h>... " >&6; }
 if test ${gl_cv_next_fnmatch_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
              if test $ac_cv_header_fnmatch_h = yes; then
 
 
 
 
+  GL_GNULIB_FNMATCH=0
+
+
+
+
+
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
 printf %s "checking for mbstate_t... " >&6; }
 if test ${ac_cv_type_mbstate_t+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+             #include <wchar.h>
 int
 main (void)
 {
@@ -10730,10 +10966,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_type_mbstate_t=yes
-else
+else $as_nop
   ac_cv_type_mbstate_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
@@ -10749,66 +10985,8 @@ printf "%s\n" "#define mbstate_t int" >>confdefs.h
 
 
 
-
-
-
-
-
-
-  GNULIB_DPRINTF=0;
-  GNULIB_FCLOSE=0;
-  GNULIB_FDOPEN=0;
-  GNULIB_FFLUSH=0;
-  GNULIB_FGETC=0;
-  GNULIB_FGETS=0;
-  GNULIB_FOPEN=0;
-  GNULIB_FPRINTF=0;
-  GNULIB_FPRINTF_POSIX=0;
-  GNULIB_FPURGE=0;
-  GNULIB_FPUTC=0;
-  GNULIB_FPUTS=0;
-  GNULIB_FREAD=0;
-  GNULIB_FREOPEN=0;
-  GNULIB_FSCANF=0;
-  GNULIB_FSEEK=0;
-  GNULIB_FSEEKO=0;
-  GNULIB_FTELL=0;
-  GNULIB_FTELLO=0;
-  GNULIB_FWRITE=0;
-  GNULIB_GETC=0;
-  GNULIB_GETCHAR=0;
-  GNULIB_GETDELIM=0;
-  GNULIB_GETLINE=0;
-  GNULIB_OBSTACK_PRINTF=0;
-  GNULIB_OBSTACK_PRINTF_POSIX=0;
-  GNULIB_PCLOSE=0;
-  GNULIB_PERROR=0;
-  GNULIB_POPEN=0;
-  GNULIB_PRINTF=0;
-  GNULIB_PRINTF_POSIX=0;
-  GNULIB_PUTC=0;
-  GNULIB_PUTCHAR=0;
-  GNULIB_PUTS=0;
-  GNULIB_REMOVE=0;
-  GNULIB_RENAME=0;
-  GNULIB_RENAMEAT=0;
-  GNULIB_SCANF=0;
-  GNULIB_SNPRINTF=0;
-  GNULIB_SPRINTF_POSIX=0;
-  GNULIB_STDIO_H_NONBLOCKING=0;
-  GNULIB_STDIO_H_SIGPIPE=0;
-  GNULIB_TMPFILE=0;
-  GNULIB_VASPRINTF=0;
-  GNULIB_VFSCANF=0;
-  GNULIB_VSCANF=0;
-  GNULIB_VDPRINTF=0;
-  GNULIB_VFPRINTF=0;
-  GNULIB_VFPRINTF_POSIX=0;
-  GNULIB_VPRINTF=0;
-  GNULIB_VPRINTF_POSIX=0;
-  GNULIB_VSNPRINTF=0;
-  GNULIB_VSPRINTF_POSIX=0;
-    HAVE_DECL_FPURGE=1;
+    HAVE_DECL_FCLOSEALL=1;
+  HAVE_DECL_FPURGE=1;
   HAVE_DECL_FSEEKO=1;
   HAVE_DECL_FTELLO=1;
   HAVE_DECL_GETDELIM=1;
@@ -10858,23 +11036,248 @@ printf "%s\n" "#define mbstate_t int" >>confdefs.h
   REPLACE_VSPRINTF=0;
 
 
-     GNULIB_FCHMODAT=0;
-  GNULIB_FSTAT=0;
-  GNULIB_FSTATAT=0;
-  GNULIB_FUTIMENS=0;
-  GNULIB_LCHMOD=0;
-  GNULIB_LSTAT=0;
-  GNULIB_MKDIRAT=0;
-  GNULIB_MKFIFO=0;
-  GNULIB_MKFIFOAT=0;
-  GNULIB_MKNOD=0;
-  GNULIB_MKNODAT=0;
-  GNULIB_STAT=0;
-  GNULIB_UTIMENSAT=0;
-  GNULIB_OVERRIDES_STRUCT_STAT=0;
+
+  GL_GNULIB_DPRINTF=0
+
+
+
+  GL_GNULIB_FCLOSE=0
+
+
+
+  GL_GNULIB_FDOPEN=0
+
+
+
+  GL_GNULIB_FFLUSH=0
+
+
+
+  GL_GNULIB_FGETC=0
+
+
+
+  GL_GNULIB_FGETS=0
+
+
+
+  GL_GNULIB_FOPEN=0
+
+
+
+  GL_GNULIB_FPRINTF=0
+
+
+
+  GL_GNULIB_FPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_FPURGE=0
+
+
+
+  GL_GNULIB_FPUTC=0
+
+
+
+  GL_GNULIB_FPUTS=0
+
+
+
+  GL_GNULIB_FREAD=0
+
+
+
+  GL_GNULIB_FREOPEN=0
+
+
+
+  GL_GNULIB_FSCANF=0
+
+
+
+  GL_GNULIB_FSEEK=0
+
+
+
+  GL_GNULIB_FSEEKO=0
+
+
+
+  GL_GNULIB_FTELL=0
+
+
+
+  GL_GNULIB_FTELLO=0
+
+
+
+  GL_GNULIB_FWRITE=0
+
+
+
+  GL_GNULIB_GETC=0
+
+
+
+  GL_GNULIB_GETCHAR=0
+
+
+
+  GL_GNULIB_GETDELIM=0
+
+
+
+  GL_GNULIB_GETLINE=0
+
+
+
+  GL_GNULIB_OBSTACK_PRINTF=0
+
+
+
+  GL_GNULIB_OBSTACK_PRINTF_POSIX=0
+
+
+
+  GL_GNULIB_PCLOSE=0
+
+
+
+  GL_GNULIB_PERROR=0
+
+
+
+  GL_GNULIB_POPEN=0
+
+
+
+  GL_GNULIB_PRINTF=0
+
+
+
+  GL_GNULIB_PRINTF_POSIX=0
+
+
+
+  GL_GNULIB_PUTC=0
+
+
+
+  GL_GNULIB_PUTCHAR=0
+
+
+
+  GL_GNULIB_PUTS=0
+
+
+
+  GL_GNULIB_REMOVE=0
+
+
+
+  GL_GNULIB_RENAME=0
+
+
+
+  GL_GNULIB_RENAMEAT=0
+
+
+
+  GL_GNULIB_SCANF=0
+
+
+
+  GL_GNULIB_SNPRINTF=0
+
+
+
+  GL_GNULIB_SPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_STDIO_H_NONBLOCKING=0
+
+
+
+  GL_GNULIB_STDIO_H_SIGPIPE=0
+
+
+
+  GL_GNULIB_TMPFILE=0
+
+
+
+  GL_GNULIB_VASPRINTF=0
+
+
+
+  GL_GNULIB_VFSCANF=0
+
+
+
+  GL_GNULIB_VSCANF=0
+
+
+
+  GL_GNULIB_VDPRINTF=0
+
+
+
+  GL_GNULIB_VFPRINTF=0
+
+
+
+  GL_GNULIB_VFPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_VPRINTF=0
+
+
+
+  GL_GNULIB_VPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_VSNPRINTF=0
+
+
+
+  GL_GNULIB_VSPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_MDA_FCLOSEALL=1
+
+
+
+  GL_GNULIB_MDA_FDOPEN=1
+
+
+
+  GL_GNULIB_MDA_FILENO=1
+
+
+
+  GL_GNULIB_MDA_GETW=1
+
+
+
+  GL_GNULIB_MDA_PUTW=1
+
+
+
+  GL_GNULIB_MDA_TEMPNAM=1
+
+
+
+
     HAVE_FCHMODAT=1;
   HAVE_FSTATAT=1;
   HAVE_FUTIMENS=1;
+  HAVE_GETUMASK=1;
   HAVE_LCHMOD=1;
   HAVE_LSTAT=1;
   HAVE_MKDIRAT=1;
@@ -10883,13 +11286,16 @@ printf "%s\n" "#define mbstate_t int" >>confdefs.h
   HAVE_MKNOD=1;
   HAVE_MKNODAT=1;
   HAVE_UTIMENSAT=1;
+  REPLACE_FCHMODAT=0;
   REPLACE_FSTAT=0;
   REPLACE_FSTATAT=0;
   REPLACE_FUTIMENS=0;
   REPLACE_LSTAT=0;
   REPLACE_MKDIR=0;
   REPLACE_MKFIFO=0;
+  REPLACE_MKFIFOAT=0;
   REPLACE_MKNOD=0;
+  REPLACE_MKNODAT=0;
   REPLACE_STAT=0;
   REPLACE_UTIMENSAT=0;
 
@@ -10898,7 +11304,7 @@ printf %s "checking whether stat file-mode macros are broken... " >&6; }
 if test ${ac_cv_header_stat_broken+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
@@ -10924,10 +11330,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_header_stat_broken=no
-else
+else $as_nop
   ac_cv_header_stat_broken=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
@@ -10946,7 +11352,7 @@ printf %s "checking for 64-bit off_t... " >&6; }
 if test ${gl_cv_type_off_t_64+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
@@ -10963,10 +11369,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_type_off_t_64=yes
-else
+else $as_nop
   gl_cv_type_off_t_64=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
@@ -10981,7 +11387,7 @@ printf %s "checking for 64-bit st_size... " >&6; }
 if test ${gl_cv_member_st_size_64+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
@@ -10999,10 +11405,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_member_st_size_64=yes
-else
+else $as_nop
   gl_cv_member_st_size_64=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
@@ -11041,7 +11447,7 @@ printf %s "checking absolute name of <sys/stat.h>... " >&6; }
 if test ${gl_cv_next_sys_stat_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
              if test $ac_cv_header_sys_stat_h = yes; then
 
@@ -11122,7 +11528,7 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
 if test "x$ac_cv_type_nlink_t" = xyes
 then :
 
-else
+else $as_nop
 
 printf "%s\n" "#define nlink_t int" >>confdefs.h
 
 
 
 
-ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
+
+
+
+  case "$host_os" in
+    mingw*)
+      ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
+if test "x$ac_cv_header_sdkddkver_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
+
+fi
+
+      ;;
+  esac
+
+
+
+
+
+
+
+  GL_GNULIB_FCHMODAT=0
+
+
+
+  GL_GNULIB_FSTAT=0
+
+
+
+  GL_GNULIB_FSTATAT=0
+
+
+
+  GL_GNULIB_FUTIMENS=0
+
+
+
+  GL_GNULIB_GETUMASK=0
+
+
+
+  GL_GNULIB_LCHMOD=0
+
+
+
+  GL_GNULIB_LSTAT=0
+
+
+
+  GL_GNULIB_MKDIR=0
+
+
+
+  GL_GNULIB_MKDIRAT=0
+
+
+
+  GL_GNULIB_MKFIFO=0
+
+
+
+  GL_GNULIB_MKFIFOAT=0
+
+
+
+  GL_GNULIB_MKNOD=0
+
+
+
+  GL_GNULIB_MKNODAT=0
+
+
+
+  GL_GNULIB_STAT=0
+
+
+
+  GL_GNULIB_UTIMENSAT=0
+
+
+
+  GL_GNULIB_OVERRIDES_STRUCT_STAT=0
+
+
+
+  GL_GNULIB_MDA_CHMOD=1
+
+
+
+  GL_GNULIB_MDA_MKDIR=1
+
+
+
+  GL_GNULIB_MDA_UMASK=1
+
+
+
+
+ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_getdtablesize" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
-
 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
 
 
@@ -11166,7 +11669,7 @@ printf %s "checking absolute name of <getopt.h>... " >&6; }
 if test ${gl_cv_next_getopt_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
              if test $ac_cv_header_getopt_h = yes; then
 
@@ -11238,14 +11741,14 @@ printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
   gl_replace_getopt=
 
     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
-    for ac_header in getopt.h
+           for ac_header in getopt.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
 if test "x$ac_cv_header_getopt_h" = xyes
 then :
   printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
 
-else
+else $as_nop
   gl_replace_getopt=yes
 fi
 
@@ -11253,14 +11756,15 @@ done
   fi
 
     if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
-    for ac_func in getopt_long_only
+
+  for ac_func in getopt_long_only
 do :
   ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
 if test "x$ac_cv_func_getopt_long_only" = xyes
 then :
   printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
 
-else
+else $as_nop
   gl_replace_getopt=yes
 fi
 
@@ -11273,7 +11777,7 @@ printf %s "checking whether getopt is POSIX compatible... " >&6; }
 if test ${gl_cv_func_getopt_posix+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
                                                 if test $cross_compiling = no; then
                               if test "$cross_compiling" = yes
@@ -11282,7 +11786,7 @@ then :
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
 See \`config.log' for more details" "$LINENO" 5; }
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -11315,7 +11819,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_getopt_posix=maybe
-else
+else $as_nop
   gl_cv_func_getopt_posix=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11329,7 +11833,7 @@ then :
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
 See \`config.log' for more details" "$LINENO" 5; }
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -11376,7 +11880,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_getopt_posix=maybe
-else
+else $as_nop
   gl_cv_func_getopt_posix=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11391,7 +11895,7 @@ then :
 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
 See \`config.log' for more details" "$LINENO" 5; }
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -11420,7 +11924,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_getopt_posix=yes
-else
+else $as_nop
   gl_cv_func_getopt_posix=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11449,7 +11953,7 @@ printf %s "checking for working GNU getopt function... " >&6; }
 if test ${gl_cv_func_getopt_gnu+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
        # optstring is necessary for programs like m4 that have POSIX-mandated
        # semantics for supporting options interspersed with files.
@@ -11466,9 +11970,9 @@ else
        export POSIXLY_CORRECT
        if test "$cross_compiling" = yes
 then :
-           gl_cv_func_getopt_gnu="guessing no"
+                             gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <getopt.h>
@@ -11512,7 +12016,7 @@ nocrash_init (void)
   /* Allocate a port on which the thread shall listen for exceptions.  */
   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
       == KERN_SUCCESS) {
-    /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
+    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
                                 MACH_MSG_TYPE_MAKE_SEND)
         == KERN_SUCCESS) {
@@ -11531,7 +12035,7 @@ nocrash_init (void)
            for a particular thread.  This has the effect that when our exception
            port gets the message, the thread specific exception port has already
            been asked, and we don't need to bother about it.
-           See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
+           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
         task_set_exception_ports (self, mask, our_exception_port,
                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
       }
@@ -11671,7 +12175,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_getopt_gnu=yes
-else
+else $as_nop
   gl_cv_func_getopt_gnu=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11695,7 +12199,7 @@ printf %s "checking for working GNU getopt_long function... " >&6; }
 if test ${gl_cv_func_getopt_long_gnu+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
               case "$host_os" in
@@ -11703,7 +12207,7 @@ then :
               *)        gl_cv_func_getopt_long_gnu="guessing yes";;
             esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <getopt.h>
@@ -11740,7 +12244,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_getopt_long_gnu=yes
-else
+else $as_nop
   gl_cv_func_getopt_long_gnu=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -11761,64 +12265,26 @@ printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
 
 
 
+
+    HAVE_GETRANDOM=1;
+  REPLACE_GETRANDOM=0;
+
+
+
+
+  GL_GNULIB_GETRANDOM=0
+
+
+
 :
 
 
-  GNULIB_GETTIMEOFDAY=0;
     HAVE_GETTIMEOFDAY=1;
   HAVE_STRUCT_TIMEVAL=1;
   HAVE_SYS_TIME_H=1;
   REPLACE_GETTIMEOFDAY=0;
   REPLACE_STRUCT_TIMEVAL=0;
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
-printf %s "checking for C/C++ restrict keyword... " >&6; }
-if test ${ac_cv_c_restrict+y}
-then :
-  printf %s "(cached) " >&6
-else
-  ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-typedef int *int_ptr;
-           int foo (int_ptr $ac_kw ip) { return ip[0]; }
-           int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
-           int bar (int ip[$ac_kw]) { return ip[0]; }
-
-int
-main (void)
-{
-int s[1];
-           int *$ac_kw t = s;
-           t[0] = 0;
-           return foo (t) + bar (t);
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_c_restrict=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     test "$ac_cv_c_restrict" != no && break
-   done
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
-printf "%s\n" "$ac_cv_c_restrict" >&6; }
-
- case $ac_cv_c_restrict in
-   restrict) ;;
-   no) printf "%s\n" "#define restrict /**/" >>confdefs.h
- ;;
-   *)  printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
- ;;
- esac
-
 
 
 
@@ -11841,7 +12307,7 @@ printf %s "checking absolute name of <sys/time.h>... " >&6; }
 if test ${gl_cv_next_sys_time_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
              if test $ac_cv_header_sys_time_h = yes; then
 
@@ -11935,7 +12401,7 @@ printf %s "checking for struct timeval... " >&6; }
 if test ${gl_cv_sys_struct_timeval+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if HAVE_SYS_TIME_H
@@ -11957,10 +12423,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_sys_struct_timeval=yes
-else
+else $as_nop
   gl_cv_sys_struct_timeval=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
@@ -11973,7 +12439,7 @@ printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if HAVE_SYS_TIME_H
@@ -11999,10 +12465,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_sys_struct_timeval_tv_sec=yes
-else
+else $as_nop
   gl_cv_sys_struct_timeval_tv_sec=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
@@ -12018,498 +12484,369 @@ printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 
 
 
+  GL_GNULIB_GETTIMEOFDAY=0
 
 
-  NEED_LOCALTIME_BUFFER=0
 
 
-  GNULIB_CTIME=0;
-  GNULIB_MKTIME=0;
-  GNULIB_LOCALTIME=0;
-  GNULIB_NANOSLEEP=0;
-  GNULIB_STRFTIME=0;
-  GNULIB_STRPTIME=0;
-  GNULIB_TIMEGM=0;
-  GNULIB_TIME_R=0;
-  GNULIB_TIME_RZ=0;
-  GNULIB_TZSET=0;
-    HAVE_DECL_LOCALTIME_R=1;
-  HAVE_NANOSLEEP=1;
-  HAVE_STRPTIME=1;
-  HAVE_TIMEGM=1;
-  HAVE_TZSET=1;
-    HAVE_TIMEZONE_T=0;
-        REPLACE_CTIME=GNULIB_PORTCHECK;
-  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
-  REPLACE_MKTIME=GNULIB_PORTCHECK;
-  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
-  REPLACE_STRFTIME=GNULIB_PORTCHECK;
-  REPLACE_TIMEGM=GNULIB_PORTCHECK;
-  REPLACE_TZSET=GNULIB_PORTCHECK;
 
-      : ${GNULIB_GETTIMEOFDAY=0};
-        REPLACE_GMTIME=0;
-  REPLACE_LOCALTIME=0;
 
 
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+  gl_have_pthread_h=yes
+else $as_nop
+  gl_have_pthread_h=no
+fi
 
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
 
+int
+main (void)
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:12549: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:12550: LIBPTHREAD=$LIBPTHREAD" >&5
 
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1
+then :
+  gl_pthread_in_glibc=yes
+fi
+rm -rf conftest*
 
+          ;;
+      esac
+      echo "$as_me:12576: 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.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
 
+printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
-    use_additional=yes
+             esac
+           fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+fi
 
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+/* 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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
+fi
 
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+printf %s "checking for pthread_kill in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_pthread_kill+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-# Check whether --with-libiconv-prefix was given.
-if test ${with_libiconv_prefix+y}
+/* 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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  withval=$with_libiconv_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
+  ac_cv_lib_c_r_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
+then :
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
+fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+        fi
+      fi
+      echo "$as_me:12730: 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; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+printf "%s\n" "$gl_pthread_api" >&6; }
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+    if test $gl_pthread_api = yes; then
+
+printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && test ! -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
     fi
 
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main (void)
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  LIB_SCHED_YIELD=
+
+else $as_nop
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+printf %s "checking for sched_yield in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sched_yield+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $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.  */
+char sched_yield ();
+int
+main (void)
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_rt_sched_yield=yes
+else $as_nop
+  ac_cv_lib_rt_sched_yield=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+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
+else $as_nop
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+printf %s "checking for sched_yield in -lposix4... " >&6; }
+if test ${ac_cv_lib_posix4_sched_yield+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-      LIBICONV=
-  LTLIBICONV=
-  INCICONV=
-  LIBICONV_PREFIX=
-      HAVE_LIBICONV=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='iconv '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBICONV; do
+/* 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.  */
+char sched_yield ();
+int
+main (void)
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_posix4_sched_yield=yes
+else $as_nop
+  ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+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
+fi
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+fi
 
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBICONV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
-              else
-                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'iconv'; then
-                  LIBICONV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCICONV; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+    gl_pthreadlib_body_done=done
+  fi
 
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBICONV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
-                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
-            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
-    done
-  fi
 
 
 
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
+printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
+if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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*)
+         gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
+       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
+     esac
 
-  GNULIB_ICONV=0;
-    ICONV_CONST=;
-  REPLACE_ICONV=0;
-  REPLACE_ICONV_OPEN=0;
-  REPLACE_ICONV_UTF=0;
-  ICONV_H='';
-  if false; then
-              ICONV_H='iconv.h'
-     fi
-
-   if test -n "$ICONV_H"; then
-  GL_GENERATE_ICONV_H_TRUE=
-  GL_GENERATE_ICONV_H_FALSE='#'
-else
-  GL_GENERATE_ICONV_H_TRUE='#'
-  GL_GENERATE_ICONV_H_FALSE=
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
+printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_all_mtsafe" in
+    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
+  esac
 
+printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
 
 
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
+printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
+if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case "$host_os" in
+       # Guess no on OpenBSD, AIX.
+       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*)
+         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
+     esac
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
+printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_one_mtsafe" in
+    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
+  esac
 
+printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
 
 
-          am_save_CPPFLAGS="$CPPFLAGS"
-
-  for element in $INCICONV; do
-    haveit=
-    for x in $CPPFLAGS; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
+    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    case "$host_os" in
+      mingw*) LIB_SETLOCALE_NULL= ;;
+      *)
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
-printf %s "checking for iconv... " >&6; }
-if test ${am_cv_func_iconv+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+printf %s "checking whether imported symbols can be declared weak... " >&6; }
+if test ${gl_cv_have_weak+y}
 then :
   printf %s "(cached) " >&6
-else
-
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  gl_cv_have_weak=no
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <iconv.h>
-
+extern void xyzzy ();
+#pragma weak xyzzy
 int
 main (void)
 {
-iconv_t cd = iconv_open("","");
-           iconv(cd,NULL,NULL,NULL,NULL);
-           iconv_close(cd);
+xyzzy();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  am_cv_func_iconv=yes
+  gl_cv_have_weak=maybe
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $LIBICONV"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+     if test $gl_cv_have_weak = maybe; then
+                     if test "$cross_compiling" = yes
+then :
+                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#ifdef __ELF__
+             Extensible Linking Format
+             #endif
 
-#include <stdlib.h>
-#include <iconv.h>
-
-int
-main (void)
-{
-iconv_t cd = iconv_open("","");
-             iconv(cd,NULL,NULL,NULL,NULL);
-             iconv_close(cd);
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1
 then :
-  am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes
+  gl_cv_have_weak="guessing yes"
+else $as_nop
+  gl_cv_have_weak="guessing no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      LIBS="$am_save_LIBS"
-    fi
+rm -rf conftest*
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
-printf "%s\n" "$am_cv_func_iconv" >&6; }
-  if test "$am_cv_func_iconv" = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
-printf %s "checking for working iconv... " >&6; }
-if test ${am_cv_func_iconv_works+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-                  am_save_LIBS="$LIBS"
-      if test $am_cv_lib_iconv = yes; then
-        LIBS="$LIBS $LIBICONV"
-      fi
-      am_cv_func_iconv_works=no
-      for ac_iconv_const in '' 'const'; do
-        if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
-             *)            am_cv_func_iconv_works="guessing yes" ;;
-           esac
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <iconv.h>
-#include <string.h>
-
-#ifndef ICONV_CONST
-# define ICONV_CONST $ac_iconv_const
-#endif
-
-int
-main (void)
+#include <stdio.h>
+#pragma weak fputs
+int main ()
 {
-int result = 0;
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
-  {
-    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
-    if (cd_utf8_to_88591 != (iconv_t)(-1))
-      {
-        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
-        char buf[10];
-        ICONV_CONST char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_utf8_to_88591,
-                            &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          result |= 1;
-        iconv_close (cd_utf8_to_88591);
-      }
-  }
-  /* Test against Solaris 10 bug: Failures are not distinguishable from
-     successful returns.  */
-  {
-    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
-    if (cd_ascii_to_88591 != (iconv_t)(-1))
-      {
-        static ICONV_CONST char input[] = "\263";
-        char buf[10];
-        ICONV_CONST char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_ascii_to_88591,
-                            &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res == 0)
-          result |= 2;
-        iconv_close (cd_ascii_to_88591);
-      }
-  }
-  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static ICONV_CONST char input[] = "\304";
-        static char buf[2] = { (char)0xDE, (char)0xAD };
-        ICONV_CONST char *inptr = input;
-        size_t inbytesleft = 1;
-        char *outptr = buf;
-        size_t outbytesleft = 1;
-        size_t res = iconv (cd_88591_to_utf8,
-                            &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
-          result |= 4;
-        iconv_close (cd_88591_to_utf8);
-      }
-  }
-#if 0 /* This bug could be worked around by the caller.  */
-  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
-  {
-    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
-    if (cd_88591_to_utf8 != (iconv_t)(-1))
-      {
-        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
-        char buf[50];
-        ICONV_CONST char *inptr = input;
-        size_t inbytesleft = strlen (input);
-        char *outptr = buf;
-        size_t outbytesleft = sizeof (buf);
-        size_t res = iconv (cd_88591_to_utf8,
-                            &inptr, &inbytesleft,
-                            &outptr, &outbytesleft);
-        if ((int)res > 0)
-          result |= 8;
-        iconv_close (cd_88591_to_utf8);
-      }
-  }
-#endif
-  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
-     provided.  */
-  {
-    /* Try standardized names.  */
-    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
-    /* Try IRIX, OSF/1 names.  */
-    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
-    /* Try AIX names.  */
-    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
-    /* Try HP-UX names.  */
-    iconv_t cd4 = iconv_open ("utf8", "eucJP");
-    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
-        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
-      result |= 16;
-    if (cd1 != (iconv_t)(-1))
-      iconv_close (cd1);
-    if (cd2 != (iconv_t)(-1))
-      iconv_close (cd2);
-    if (cd3 != (iconv_t)(-1))
-      iconv_close (cd3);
-    if (cd4 != (iconv_t)(-1))
-      iconv_close (cd4);
-  }
-  return result;
-
-  ;
-  return 0;
+  return (fputs == NULL);
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  am_cv_func_iconv_works=yes
+  gl_cv_have_weak=yes
+else $as_nop
+  gl_cv_have_weak=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-        test "$am_cv_func_iconv_works" = no || break
-      done
-      LIBS="$am_save_LIBS"
+     fi
+          case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+                    case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
-printf "%s\n" "$am_cv_func_iconv_works" >&6; }
-    case "$am_cv_func_iconv_works" in
-      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
-      *)   am_func_iconv=yes ;;
-    esac
-  else
-    am_func_iconv=no am_cv_lib_iconv=no
-  fi
-  if test "$am_func_iconv" = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+printf "%s\n" "$gl_cv_have_weak" >&6; }
+  case "$gl_cv_have_weak" in
+    *yes)
 
-printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
+printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
 
-  fi
-  if test "$am_cv_lib_iconv" = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
-printf %s "checking how to link with libiconv... " >&6; }
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
-printf "%s\n" "$LIBICONV" >&6; }
+      ;;
+  esac
+
+        case "$gl_cv_have_weak" in
+          *yes) LIB_SETLOCALE_NULL= ;;
+          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+        esac
+        ;;
+    esac
   else
-            CPPFLAGS="$am_save_CPPFLAGS"
-    LIBICONV=
-    LTLIBICONV=
+    LIB_SETLOCALE_NULL=
   fi
 
 
 
-  if test "$am_cv_func_iconv" = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
-printf %s "checking for iconv declaration... " >&6; }
-    if test ${am_cv_proto_iconv+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
+#ifdef _MSC_VER
+MicrosoftCompiler
 #endif
 
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "MicrosoftCompiler" >/dev/null 2>&1
 then :
-  am_cv_proto_iconv_arg1=""
-else
-  am_cv_proto_iconv_arg1="const"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
-fi
+            rm -f conftest*
+     echo 'int dummy;' > conftest.c
+     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null 2>&1
+     if test -f conftest.o; then
+       gl_asmext='s'
+       gl_c_asm_opt='-S'
+     else
+       gl_asmext='asm'
+       gl_c_asm_opt='-c -Fa'
+     fi
+     rm -f conftest*
 
-    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
-         $am_cv_proto_iconv" >&5
-printf "%s\n" "
-         $am_cv_proto_iconv" >&6; }
-  else
-            am_cv_proto_iconv_arg1=""
-  fi
+else $as_nop
+  gl_asmext='s'
+     gl_c_asm_opt='-S'
 
-printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
+fi
+rm -rf conftest*
 
 
-     if test -n "$am_cv_proto_iconv_arg1"; then
-       ICONV_CONST="const"
-     fi
 
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-printf %s "checking for inline... " >&6; }
-if test ${ac_cv_c_inline+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host CPU and C ABI" >&5
+printf %s "checking host CPU and C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi+y}
 then :
   printf %s "(cached) " >&6
-else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
+else $as_nop
+  case "$host_cpu" in
+
+       i[34567]86 )
+         gl_cv_host_cpu_c_abi=i386
+         ;;
+
+       x86_64 )
+         # On x86_64 systems, the C compiler may be generating code in one of
+         # these ABIs:
+         # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+         # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+         #   with native Windows (mingw, MSVC).
+         # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+         # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if (defined __x86_64__ || defined __amd64__ \
+                     || defined _M_X64 || defined _M_AMD64)
+                 int ok;
+                #else
+                 error fail
+                #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
+#if defined __ILP32__ || defined _ILP32
+                    int ok;
+                   #else
+                    error fail
+                   #endif
 
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_c_inline=$ac_kw
+  gl_cv_host_cpu_c_abi=x86_64-x32
+else $as_nop
+  gl_cv_host_cpu_c_abi=x86_64
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+  gl_cv_host_cpu_c_abi=i386
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-printf "%s\n" "$ac_cv_c_inline" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
-    ;;
-esac
+       alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+         gl_cv_host_cpu_c_abi=alpha
+         ;;
 
-ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes
-then :
+       arm* | aarch64 )
+         # Assume arm with EABI.
+         # On arm64 systems, the C compiler may be generating code in one of
+         # these ABIs:
+         # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+         # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+         # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __aarch64__
+                 int ok;
+                #else
+                 error fail
+                #endif
 
-else
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __ILP32__ || defined _ILP32
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
-printf "%s\n" "#define off_t long int" >>confdefs.h
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi=arm64-ilp32
+else $as_nop
+  gl_cv_host_cpu_c_abi=arm64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+  # Don't distinguish little-endian and big-endian arm, since they
+            # don't require different machine code for simple operations and
+            # since the user can distinguish them through the preprocessor
+            # defines __ARMEL__ vs. __ARMEB__.
+            # But distinguish arm which passes floating-point arguments and
+            # return values in integer registers (r0, r1, ...) - this is
+            # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+            # passes them in float registers (s0, s1, ...) and double registers
+            # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+            # sets the preprocessor defines __ARM_PCS (for the first case) and
+            # __ARM_PCS_VFP (for the second case), but older GCC does not.
+            echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+            # Look for a reference to the register d0 in the .s file.
+            { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null 2>&1
+            if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+              gl_cv_host_cpu_c_abi=armhf
+            else
+              gl_cv_host_cpu_c_abi=arm
+            fi
+            rm -f conftest*
 
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
-
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_limits_h='<'limits.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
-printf %s "checking absolute name of <limits.h>... " >&6; }
-if test ${gl_cv_next_limits_h+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_limits_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+         # On hppa, the C compiler may be generating 32-bit code or 64-bit
+         # code. In the latter case, it defines _LP64 and __LP64__.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.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 'limits.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_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_limits_h
-           gl_cv_next_limits_h='"'$gl_header'"'
-          else
-               gl_cv_next_limits_h='<'limits.h'>'
-             fi
-
+#ifdef __LP64__
+                 int ok;
+                #else
+                 error fail
+                #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi=hppa64
+else $as_nop
+  gl_cv_host_cpu_c_abi=hppa
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
-printf "%s\n" "$gl_cv_next_limits_h" >&6; }
-     fi
-     NEXT_LIMITS_H=$gl_cv_next_limits_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='<'limits.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_limits_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
-
-
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
-printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
-if test ${gl_cv_header_limits_width+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       ia64* )
+         # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+         # 32-bit code. In the latter case, it defines _ILP32.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-            #endif
-            #include <limits.h>
-            long long llm = LLONG_MAX;
-            int wb = WORD_BIT;
-            int ullw = ULLONG_WIDTH;
-
-int
-main (void)
-{
+#ifdef _ILP32
+                 int ok;
+                #else
+                 error fail
+                #endif
 
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_limits_width=yes
-else
-  gl_cv_header_limits_width=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
-printf "%s\n" "$gl_cv_header_limits_width" >&6; }
-  if test "$gl_cv_header_limits_width" = yes; then
-    LIMITS_H=
-  else
-    LIMITS_H=limits.h
-  fi
-
-   if test -n "$LIMITS_H"; then
-  GL_GENERATE_LIMITS_H_TRUE=
-  GL_GENERATE_LIMITS_H_FALSE='#'
-else
-  GL_GENERATE_LIMITS_H_TRUE='#'
-  GL_GENERATE_LIMITS_H_FALSE=
+  gl_cv_host_cpu_c_abi=ia64-ilp32
+else $as_nop
+  gl_cv_host_cpu_c_abi=ia64
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
+       mips* )
+         # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+         # at 32.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+                 int ok;
+                #else
+                 error fail
+                #endif
 
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-printf %s "checking for wint_t... " >&6; }
-if test ${gt_cv_c_wint_t+y}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_cv_host_cpu_c_abi=mips64
+else $as_nop
+  # In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+            # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+            # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+            # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if (_MIPS_SIM == _ABIN32)
+                    int ok;
+                   #else
+                    error fail
+                   #endif
 
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-            wint_t foo = (wchar_t)'\0';
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gt_cv_c_wint_t=yes
-else
-  gt_cv_c_wint_t=no
+  gl_cv_host_cpu_c_abi=mipsn32
+else $as_nop
+  gl_cv_host_cpu_c_abi=mips
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
-printf "%s\n" "$gt_cv_c_wint_t" >&6; }
-  if test $gt_cv_c_wint_t = yes; then
-
-printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
+       powerpc* )
+         # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+         # No need to distinguish them here; the caller may distinguish
+         # them based on the OS.
+         # On powerpc64 systems, the C compiler may still be generating
+         # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+         # be generating 64-bit code.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __powerpc64__ || defined __LP64__
+                 int ok;
+                #else
+                 error fail
+                #endif
 
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
-printf %s "checking whether wint_t is too small... " >&6; }
-if test ${gl_cv_type_wint_t_too_small+y}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # On powerpc64, there are two ABIs on Linux: The AIX compatible
+            # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if defined _CALL_ELF && _CALL_ELF == 2
+                    int ok;
+                   #else
+                    error fail
+                   #endif
 
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
-#include <wchar.h>
-              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_type_wint_t_too_small=no
-else
-  gl_cv_type_wint_t_too_small=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  gl_cv_host_cpu_c_abi=powerpc64-elfv2
+else $as_nop
+  gl_cv_host_cpu_c_abi=powerpc64
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
-printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
-    if test $gl_cv_type_wint_t_too_small = yes; then
-      GNULIB_OVERRIDES_WINT_T=1
-    else
-      GNULIB_OVERRIDES_WINT_T=0
-    fi
-  else
-    GNULIB_OVERRIDES_WINT_T=0
-  fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+else $as_nop
+  gl_cv_host_cpu_c_abi=powerpc
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
+       rs6000 )
+         gl_cv_host_cpu_c_abi=powerpc
+         ;;
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-printf %s "checking for unsigned long long int... " >&6; }
-if test ${ac_cv_type_unsigned_long_long_int+y}
-then :
-  printf %s "(cached) " >&6
-else
-  ac_cv_type_unsigned_long_long_int=yes
-     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       riscv32 | riscv64 )
+         # There are 2 architectures (with variants): rv32* and rv64*.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-  /* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;
-int
-main (void)
-{
-/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));
-  ;
-  return 0;
-}
+#if __riscv_xlen == 64
+                  int ok;
+                #else
+                  error fail
+                #endif
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-
-else
-  ac_cv_type_unsigned_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-     fi
+  cpu=riscv64
+else $as_nop
+  cpu=riscv32
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-
-printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
-
-  fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+         # Size of 'long' and 'void *':
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __LP64__
+                  int ok;
+                #else
+                  error fail
+                #endif
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-printf %s "checking for long long int... " >&6; }
-if test ${ac_cv_type_long_long_int+y}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
-  ac_cv_type_long_long_int=yes
-      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
-        if test $ac_cv_type_long_long_int = yes; then
-                                        if test "$cross_compiling" = yes
+  main_abi=lp64
+else $as_nop
+  main_abi=ilp32
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         # Float ABIs:
+         # __riscv_float_abi_double:
+         #   'float' and 'double' are passed in floating-point registers.
+         # __riscv_float_abi_single:
+         #   'float' are passed in floating-point registers.
+         # __riscv_float_abi_soft:
+         #   No values are passed in floating-point registers.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __riscv_float_abi_double
+                  int ok;
+                #else
+                  error fail
+                #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  :
-else
+  float_abi=d
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
-                 #ifndef LLONG_MAX
-                 # define HALF \
-                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-                 # define LLONG_MAX (HALF - 1 + HALF)
-                 #endif
-int
-main (void)
-{
-long long int n = 1;
-                 int i;
-                 for (i = 0; ; i++)
-                   {
-                     long long int m = n << i;
-                     if (m >> i != n)
-                       return 1;
-                     if (LLONG_MAX / 2 < m)
-                       break;
-                   }
-                 return 0;
-  ;
-  return 0;
-}
+#if defined __riscv_float_abi_single
+                     int ok;
+                   #else
+                     error fail
+                   #endif
+
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-
-else
-  ac_cv_type_long_long_int=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  float_abi=f
+else $as_nop
+  float_abi=''
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-        fi
-      fi
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
-  if test $ac_cv_type_long_long_int = yes; then
-
-printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
-
-  fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+         ;;
 
-    gl_cv_c_multiarch=no
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+       s390* )
+         # On s390x, the C compiler may be generating 64-bit (= s390x) code
+         # or 31-bit (= s390) code.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
+#if defined __LP64__ || defined __s390x__
+                  int ok;
+                #else
+                  error fail
+                #endif
 
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-
-               arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
-             fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
-
+  gl_cv_host_cpu_c_abi=s390x
+else $as_nop
+  gl_cv_host_cpu_c_abi=s390
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  if test $gl_cv_c_multiarch = yes; then
-    APPLE_UNIVERSAL_BUILD=1
-  else
-    APPLE_UNIVERSAL_BUILD=0
-  fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
+       sparc | sparc64 )
+         # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+         # C compiler still generates 32-bit code.
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __sparcv9 || defined __arch64__
+                 int ok;
+                #else
+                 error fail
+                #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi=sparc64
+else $as_nop
+  gl_cv_host_cpu_c_abi=sparc
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         ;;
 
+       *)
+         gl_cv_host_cpu_c_abi="$host_cpu"
+         ;;
+     esac
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi" >&6; }
 
+    HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+  HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
 
 
-  if test $ac_cv_type_long_long_int = yes; then
-    HAVE_LONG_LONG_INT=1
-  else
-    HAVE_LONG_LONG_INT=0
-  fi
 
+  # This was
+  #   AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+  #   AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+  # earlier, but KAI C++ 3.2d doesn't like this.
+  sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
 
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    HAVE_UNSIGNED_LONG_LONG_INT=1
-  else
-    HAVE_UNSIGNED_LONG_LONG_INT=0
-  fi
 
 
 
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
   else
-    HAVE_WCHAR_H=0
+    acl_final_prefix="$prefix"
   fi
-
-
-      if test $ac_cv_header_inttypes_h = yes; then
-    HAVE_INTTYPES_H=1
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
   else
-    HAVE_INTTYPES_H=0
+    acl_final_exec_prefix="$exec_prefix"
   fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
 
 
-      if test $ac_cv_header_sys_types_h = yes; then
-    HAVE_SYS_TYPES_H=1
-  else
-    HAVE_SYS_TYPES_H=0
-  fi
 
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else $as_nop
+  with_gnu_ld=no
+fi
 
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
 
+if test -n "$LD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
+printf %s "checking for ld... " >&6; }
+elif test "$GCC" = yes; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+elif test "$with_gnu_ld" = yes; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test -n "$LD"; then
+  # Let the user override the test with a path.
+  :
+else
+  if test ${acl_cv_path_LD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+    acl_cv_path_LD= # Final result of this test
+    ac_prog=ld # Program to search in $PATH
+    if test "$GCC" = yes; then
+      # Check if gcc -print-prog-name=ld gives a path.
+      case $host in
+        *-*-mingw*)
+          # gcc leaves a trailing carriage return which upsets mingw
+          acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+        *)
+          acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+      esac
+      case $acl_output in
+        # Accept absolute paths.
+        [\\/]* | ?:[\\/]*)
+          re_direlt='/[^/][^/]*/\.\./'
+          # Canonicalize the pathname of ld
+          acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+          while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+            acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+          done
+          # Got the pathname. No search in PATH is needed.
+          acl_cv_path_LD="$acl_output"
+          ac_prog=
+          ;;
+        "")
+          # If it fails, then pretend we aren't using GCC.
+          ;;
+        *)
+          # If it is relative, then search for the first ld in PATH.
+          with_gnu_ld=unknown
+          ;;
+      esac
+    fi
+    if test -n "$ac_prog"; then
+      # Search for $ac_prog in $PATH.
+      acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+      for ac_dir in $PATH; do
+        IFS="$acl_save_ifs"
+        test -z "$ac_dir" && ac_dir=.
+        if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+          acl_cv_path_LD="$ac_dir/$ac_prog"
+          # Check to see if the program is GNU ld.  I'd rather use --version,
+          # but apparently some variants of GNU ld only accept -v.
+          # Break only if it was the GNU/non-GNU ld that we prefer.
+          case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+            *GNU* | *'with BFD'*)
+              test "$with_gnu_ld" != no && break
+              ;;
+            *)
+              test "$with_gnu_ld" != yes && break
+              ;;
+          esac
+        fi
+      done
+      IFS="$acl_save_ifs"
+    fi
+    case $host in
+      *-*-aix*)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __powerpc64__ || defined __LP64__
+                int ok;
+               #else
+                error fail
+               #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # The compiler produces 64-bit code. Add option '-b64' so that the
+           # linker groks 64-bit object files.
+           case "$acl_cv_path_LD " in
+             *" -b64 "*) ;;
+             *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+           esac
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+        ;;
+      sparc64-*-netbsd*)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __sparcv9 || defined __arch64__
+                int ok;
+               #else
+                error fail
+               #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
 
+else $as_nop
+  # The compiler produces 32-bit code. Add option '-m elf32_sparc'
+           # so that the linker groks 32-bit object files.
+           case "$acl_cv_path_LD " in
+             *" -m elf32_sparc "*) ;;
+             *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+           esac
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+        ;;
+    esac
 
+fi
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdint_h='<'stdint.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-printf %s "checking absolute name of <stdint.h>... " >&6; }
-if test ${gl_cv_next_stdint_h+y}
+  LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+  as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${acl_cv_prog_gnu_ld+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
 
-             if test $ac_cv_header_stdint_h = yes; then
 
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdint.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+                                                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+printf %s "checking for shared library run path origin... " >&6; }
+if test ${acl_cv_rpath+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdint.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
-    }'
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
 
-        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+printf "%s\n" "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test ${enable_rpath+y}
+then :
+  enableval=$enable_rpath; :
+else $as_nop
+  enable_rpath=yes
+fi
 
-           gl_header=$gl_cv_absolute_stdint_h
-           gl_cv_next_stdint_h='"'$gl_header'"'
-          else
-               gl_cv_next_stdint_h='<'stdint.h'>'
-             fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
-printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
-     fi
-     NEXT_STDINT_H=$gl_cv_next_stdint_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='<'stdint.h'>'
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
+printf %s "checking 32-bit host C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi_32bit+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test -n "$gl_cv_host_cpu_c_abi"; then
+       case "$gl_cv_host_cpu_c_abi" in
+         i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+           gl_cv_host_cpu_c_abi_32bit=yes ;;
+         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+           gl_cv_host_cpu_c_abi_32bit=no ;;
+         *)
+           gl_cv_host_cpu_c_abi_32bit=unknown ;;
+       esac
      else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdint_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
-
+       case "$host_cpu" in
 
+         # CPUs that only support a 32-bit ABI.
+         arc \
+         | bfin \
+         | cris* \
+         | csky \
+         | epiphany \
+         | ft32 \
+         | h8300 \
+         | m68k \
+         | microblaze | microblazeel \
+         | nds32 | nds32le | nds32be \
+         | nios2 | nios2eb | nios2el \
+         | or1k* \
+         | or32 \
+         | sh | sh1234 | sh1234elb \
+         | tic6x \
+         | xtensa* )
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
 
+         # CPUs that only support a 64-bit ABI.
+         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+         | mmix )
+           gl_cv_host_cpu_c_abi_32bit=no
+           ;;
 
-  if test $ac_cv_header_stdint_h = yes; then
-    HAVE_STDINT_H=1
-  else
-    HAVE_STDINT_H=0
-  fi
+         i[34567]86 )
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
 
+         x86_64 )
+           # On x86_64 systems, the C compiler may be generating code in one of
+           # these ABIs:
+           # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+           # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+           #   with native Windows (mingw, MSVC).
+           # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if (defined __x86_64__ || defined __amd64__ \
+                       || defined _M_X64 || defined _M_AMD64) \
+                      && !(defined __ILP32__ || defined _ILP32)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
-    if test $ac_cv_header_stdint_h = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
-printf %s "checking whether stdint.h conforms to C99... " >&6; }
-if test ${gl_cv_header_working_stdint_h+y}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
-  gl_cv_header_working_stdint_h=no
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
+
+         arm* | aarch64 )
+           # Assume arm with EABI.
+           # On arm64 systems, the C compiler may be generating code in one of
+           # these ABIs:
+           # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+           # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+           # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
-#if !(defined WCHAR_MIN && defined WCHAR_MAX)
-#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
-#endif
+         hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+           # On hppa, the C compiler may be generating 32-bit code or 64-bit
+           # code. In the latter case, it defines _LP64 and __LP64__.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __LP64__
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+         ia64* )
+           # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+           # 32-bit code. In the latter case, it defines _ILP32.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef _ILP32
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=yes
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-#ifdef INT8_MAX
-int8_t a1 = INT8_MAX;
-int8_t a1min = INT8_MIN;
-#endif
-#ifdef INT16_MAX
-int16_t a2 = INT16_MAX;
-int16_t a2min = INT16_MIN;
-#endif
-#ifdef INT32_MAX
-int32_t a3 = INT32_MAX;
-int32_t a3min = INT32_MIN;
-#endif
-#ifdef INT64_MAX
-int64_t a4 = INT64_MAX;
-int64_t a4min = INT64_MIN;
-#endif
-#ifdef UINT8_MAX
-uint8_t b1 = UINT8_MAX;
-#else
-typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
-#endif
-#ifdef UINT16_MAX
-uint16_t b2 = UINT16_MAX;
-#endif
-#ifdef UINT32_MAX
-uint32_t b3 = UINT32_MAX;
-#endif
-#ifdef UINT64_MAX
-uint64_t b4 = UINT64_MAX;
-#endif
-int_least8_t c1 = INT8_C (0x7f);
-int_least8_t c1max = INT_LEAST8_MAX;
-int_least8_t c1min = INT_LEAST8_MIN;
-int_least16_t c2 = INT16_C (0x7fff);
-int_least16_t c2max = INT_LEAST16_MAX;
-int_least16_t c2min = INT_LEAST16_MIN;
-int_least32_t c3 = INT32_C (0x7fffffff);
-int_least32_t c3max = INT_LEAST32_MAX;
-int_least32_t c3min = INT_LEAST32_MIN;
-int_least64_t c4 = INT64_C (0x7fffffffffffffff);
-int_least64_t c4max = INT_LEAST64_MAX;
-int_least64_t c4min = INT_LEAST64_MIN;
-uint_least8_t d1 = UINT8_C (0xff);
-uint_least8_t d1max = UINT_LEAST8_MAX;
-uint_least16_t d2 = UINT16_C (0xffff);
-uint_least16_t d2max = UINT_LEAST16_MAX;
-uint_least32_t d3 = UINT32_C (0xffffffff);
-uint_least32_t d3max = UINT_LEAST32_MAX;
-uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
-uint_least64_t d4max = UINT_LEAST64_MAX;
-int_fast8_t e1 = INT_FAST8_MAX;
-int_fast8_t e1min = INT_FAST8_MIN;
-int_fast16_t e2 = INT_FAST16_MAX;
-int_fast16_t e2min = INT_FAST16_MIN;
-int_fast32_t e3 = INT_FAST32_MAX;
-int_fast32_t e3min = INT_FAST32_MIN;
-int_fast64_t e4 = INT_FAST64_MAX;
-int_fast64_t e4min = INT_FAST64_MIN;
-uint_fast8_t f1 = UINT_FAST8_MAX;
-uint_fast16_t f2 = UINT_FAST16_MAX;
-uint_fast32_t f3 = UINT_FAST32_MAX;
-uint_fast64_t f4 = UINT_FAST64_MAX;
-#ifdef INTPTR_MAX
-intptr_t g = INTPTR_MAX;
-intptr_t gmin = INTPTR_MIN;
-#endif
-#ifdef UINTPTR_MAX
-uintptr_t h = UINTPTR_MAX;
-#endif
-intmax_t i = INTMAX_MAX;
-uintmax_t j = UINTMAX_MAX;
+         mips* )
+           # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+           # at 32.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
-/* Check that SIZE_MAX has the correct type, if possible.  */
-#if 201112 <= __STDC_VERSION__
-int k = _Generic (SIZE_MAX, size_t: 0);
-#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
-       || (0x5110 <= __SUNPRO_C && !__STDC__))
-extern size_t k;
-extern __typeof__ (SIZE_MAX) k;
-#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-#include <limits.h> /* for CHAR_BIT */
-#define TYPE_MINIMUM(t) \
-  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
-#define TYPE_MAXIMUM(t) \
-  ((t) ((t) 0 < (t) -1 \
-        ? (t) -1 \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-struct s {
-  int check_PTRDIFF:
-      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
-      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
-      ? 1 : -1;
-  /* Detect bug in FreeBSD 6.0 / ia64.  */
-  int check_SIG_ATOMIC:
-      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
-      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
-      ? 1 : -1;
-  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
-  int check_WCHAR:
-      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
-      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
-      ? 1 : -1;
-  /* Detect bug in mingw.  */
-  int check_WINT:
-      WINT_MIN == TYPE_MINIMUM (wint_t)
-      && WINT_MAX == TYPE_MAXIMUM (wint_t)
-      ? 1 : -1;
+         powerpc* )
+           # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+           # No need to distinguish them here; the caller may distinguish
+           # them based on the OS.
+           # On powerpc64 systems, the C compiler may still be generating
+           # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+           # be generating 64-bit code.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __powerpc64__ || defined __LP64__
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
-  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
-  int check_UINT8_C:
-        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
-  int check_UINT16_C:
-        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
-#ifdef UINT8_MAX
-  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
-#endif
-#ifdef UINT16_MAX
-  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
-#endif
-#ifdef UINT32_MAX
-  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
-#endif
-#ifdef UINT64_MAX
-  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
-#endif
-  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
-  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
-  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
-  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
-  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
-  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
-  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
-  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
-  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
-  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
-  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
-};
+         rs6000 )
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
 
-int
-main (void)
-{
+         riscv32 | riscv64 )
+           # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+           # Size of 'long' and 'void *':
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __LP64__
+                    int ok;
+                  #else
+                    error fail
+                  #endif
 
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-                                                    if test "$cross_compiling" = yes
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
+
+         s390* )
+           # On s390x, the C compiler may be generating 64-bit (= s390x) code
+           # or 31-bit (= s390) code.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __LP64__ || defined __s390x__
+                    int ok;
+                  #else
+                    error fail
+                  #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  case "$host_os" in
-                         # Guess yes on native Windows.
-                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
-                         # In general, assume it works.
-                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
-               esac
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         sparc | sparc64 )
+           # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+           # C compiler still generates 32-bit code.
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if defined __sparcv9 || defined __arch64__
+                   int ok;
+                  #else
+                   error fail
+                  #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+  gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+           ;;
 
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
+         *)
+           gl_cv_host_cpu_c_abi_32bit=unknown
+           ;;
+       esac
+     fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+  HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
 
 
-#include <stdio.h>
-#include <string.h>
-#define MVAL(macro) MVAL1(macro)
-#define MVAL1(expression) #expression
-static const char *macro_values[] =
-  {
-#ifdef INT8_MAX
-    MVAL (INT8_MAX),
-#endif
-#ifdef INT16_MAX
-    MVAL (INT16_MAX),
-#endif
-#ifdef INT32_MAX
-    MVAL (INT32_MAX),
-#endif
-#ifdef INT64_MAX
-    MVAL (INT64_MAX),
-#endif
-#ifdef UINT8_MAX
-    MVAL (UINT8_MAX),
-#endif
-#ifdef UINT16_MAX
-    MVAL (UINT16_MAX),
-#endif
-#ifdef UINT32_MAX
-    MVAL (UINT32_MAX),
-#endif
-#ifdef UINT64_MAX
-    MVAL (UINT64_MAX),
-#endif
-    NULL
-  };
 
-int
-main (void)
-{
 
-  const char **mv;
-  for (mv = macro_values; *mv != NULL; mv++)
-    {
-      const char *value = *mv;
-      /* Test whether it looks like a cast expression.  */
-      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
-          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
-          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
-          || strncmp (value, "((int)"/*)*/, 6) == 0
-          || strncmp (value, "((signed short)"/*)*/, 15) == 0
-          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
-        return mv - macro_values + 1;
-    }
-  return 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_header_working_stdint_h=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
-printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
-  fi
-
-  HAVE_C99_STDINT_H=0
-  HAVE_SYS_BITYPES_H=0
-  HAVE_SYS_INTTYPES_H=0
-  STDINT_H=stdint.h
-  case "$gl_cv_header_working_stdint_h" in
-    *yes)
-      HAVE_C99_STDINT_H=1
-                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
-printf %s "checking whether stdint.h predates C++11... " >&6; }
-if test ${gl_cv_header_stdint_predates_cxx11_h+y}
-then :
-  printf %s "(cached) " >&6
-else
-  gl_cv_header_stdint_predates_cxx11_h=yes
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
-
-
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-
-intmax_t im = INTMAX_MAX;
-int32_t i32 = INT32_C (0x7fffffff);
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_stdint_predates_cxx11_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
-printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
-
-      if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
 
-printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
-
-
-printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
-
-      fi
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
-printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
-if test ${gl_cv_header_stdint_width+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
+printf %s "checking for ELF binary format... " >&6; }
+if test ${gl_cv_elf+y}
 then :
   printf %s "(cached) " >&6
-else
-  gl_cv_header_stdint_width=no
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#ifdef __ELF__
+        Extensible Linking Format
+        #endif
 
-              /* Work if build is not clean.  */
-              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
-              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-              #endif
-              #include <stdint.h>
-
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-              int iw = UINTMAX_WIDTH;
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_stdint_width=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
-printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
-      if test "$gl_cv_header_stdint_width" = yes; then
-        STDINT_H=
-      fi
-      ;;
-    *)
-                  ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_inttypes_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
-
-fi
-ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_bitypes_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
-
-fi
-
-      if test $ac_cv_header_sys_inttypes_h = yes; then
-        HAVE_SYS_INTTYPES_H=1
-      fi
-      if test $ac_cv_header_sys_bitypes_h = yes; then
-        HAVE_SYS_BITYPES_H=1
-      fi
-
-
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
-
-
-  for gltype in ptrdiff_t size_t ; do
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-printf %s "checking for bit size of $gltype... " >&6; }
-if eval test \${gl_cv_bitsizeof_${gltype}+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-#include <limits.h>"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1
 then :
-
-else
-  result=unknown
+  gl_cv_elf=yes
+else $as_nop
+  gl_cv_elf=no
 fi
+rm -rf conftest*
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
 
 fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
+printf "%s\n" "$gl_cv_elf" >&6; }
+  if test $gl_cv_elf = yes; then
+    # Extract the ELF class of a file (5th byte) in decimal.
+    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+    if od -A x < /dev/null >/dev/null 2>/dev/null; then
+      # Use POSIX od.
+      func_elfclass ()
+      {
+        od -A n -t d1 -j 4 -N 1
+      }
+    else
+      # Use BSD hexdump.
+      func_elfclass ()
+      {
+        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+        echo
+      }
     fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
-
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
-
-
+    # Use 'expr', not 'test', to compare the values of func_elfclass, because on
+    # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
+    # not 1 or 2.
+    case $HOST_CPU_C_ABI_32BIT in
+      yes)
+        # 32-bit ABI.
+        acl_is_expected_elfclass ()
+        {
+          expr "`func_elfclass | sed -e 's/[   ]//g'`" = 1 > /dev/null
+        }
+        ;;
+      no)
+        # 64-bit ABI.
+        acl_is_expected_elfclass ()
+        {
+          expr "`func_elfclass | sed -e 's/[   ]//g'`" = 2 > /dev/null
+        }
+        ;;
+      *)
+        # Unknown.
+        acl_is_expected_elfclass ()
+        {
+          :
+        }
+        ;;
+    esac
+  else
+    acl_is_expected_elfclass ()
+    {
+      :
+    }
   fi
 
-
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-printf %s "checking for bit size of $gltype... " >&6; }
-if eval test \${gl_cv_bitsizeof_${gltype}+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
 then :
   printf %s "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-#include <limits.h>"
-then :
+else $as_nop
+            acl_libdirstem=lib
+     acl_libdirstem2=
+     acl_libdirstem3=
+     case "$host_os" in
+       solaris*)
+                                                      if test $HOST_CPU_C_ABI_32BIT = no; then
+           acl_libdirstem2=lib/64
+           case "$host_cpu" in
+             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
+             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
+           esac
+         fi
+         ;;
+       *)
+                                                                                 searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+         if test $HOST_CPU_C_ABI_32BIT != no; then
+           # 32-bit or unknown ABI.
+           if test -d /usr/lib32; then
+             acl_libdirstem2=lib32
+           fi
+         fi
+         if test $HOST_CPU_C_ABI_32BIT != yes; then
+           # 64-bit or unknown ABI.
+           if test -d /usr/lib64; then
+             acl_libdirstem3=lib64
+           fi
+         fi
+         if test -n "$searchpath"; then
+           acl_save_IFS="${IFS=        }"; IFS=":"
+           for searchdir in $searchpath; do
+             if test -d "$searchdir"; then
+               case "$searchdir" in
+                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+                 */../ | */.. )
+                   # Better ignore directories of this form. They are misleading.
+                   ;;
+                 *) searchdir=`cd "$searchdir" && pwd`
+                    case "$searchdir" in
+                      */lib32 ) acl_libdirstem2=lib32 ;;
+                      */lib64 ) acl_libdirstem3=lib64 ;;
+                    esac ;;
+               esac
+             fi
+           done
+           IFS="$acl_save_IFS"
+           if test $HOST_CPU_C_ABI_32BIT = yes; then
+             # 32-bit ABI.
+             acl_libdirstem3=
+           fi
+           if test $HOST_CPU_C_ABI_32BIT = no; then
+             # 64-bit ABI.
+             acl_libdirstem2=
+           fi
+         fi
+         ;;
+     esac
+     test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
 
-else
-  result=unknown
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
+printf "%s\n" "$acl_cv_libdirstems" >&6; }
+      acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
 
-fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
-    fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
 
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
 
 
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
-printf %s "checking whether $gltype is signed... " >&6; }
-if eval test \${gl_cv_type_${gltype}_signed+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
 
-            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  result=yes
-else
-  result=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       eval gl_cv_type_${gltype}_signed=\$result
 
-fi
-eval ac_res=\$gl_cv_type_${gltype}_signed
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    eval result=\$gl_cv_type_${gltype}_signed
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    if test "$result" = yes; then
-      printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
+    use_additional=yes
 
-      eval HAVE_SIGNED_${GLTYPE}=1
-    else
-      eval HAVE_SIGNED_${GLTYPE}=0
-    fi
-  done
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
 
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
 
-  gl_cv_type_ptrdiff_t_signed=yes
-  gl_cv_type_size_t_signed=no
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
 
-  for gltype in ptrdiff_t size_t ; do
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-printf %s "checking for $gltype integer literal suffix... " >&6; }
-if eval test \${gl_cv_type_${gltype}_suffix+y}
+# Check whether --with-libiconv-prefix was given.
+if test ${with_libiconv_prefix+y}
 then :
-  printf %s "(cached) " >&6
-else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  withval=$with_libiconv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
 
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
 
-              extern $gltype foo;
-              extern $gltype1 foo;
-int
-main (void)
-{
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
-fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-  done
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        additional_libdir2="$withval/$acl_libdirstem2"
+        additional_libdir3="$withval/$acl_libdirstem3"
+      fi
+    fi
 
+fi
 
+  if test "X$additional_libdir2" = "X$additional_libdir"; then
+    additional_libdir2=
   fi
+  if test "X$additional_libdir3" = "X$additional_libdir"; then
+    additional_libdir3=
+  fi
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  LIBICONV_PREFIX=
+      HAVE_LIBICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+              if test "X$found_dir" = "X"; then
+                eval dir=\$$additional_libdir_variable
+                if test -n "$dir"; then
+                                                      if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                fi
+              fi
+            done
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-printf %s "checking for $gltype integer literal suffix... " >&6; }
-if eval test \${gl_cv_type_${gltype}_suffix+y}
-then :
-  printf %s "(cached) " >&6
-else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-              extern $gltype foo;
-              extern $gltype1 foo;
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
-fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
-
-  done
-
-
-
-          if test $GNULIB_OVERRIDES_WINT_T = 1; then
-    BITSIZEOF_WINT_T=32
-  fi
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBICONV; do
 
-      ;;
-  esac
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem3 | */$acl_libdirstem3/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+                if test "$name" = 'iconv'; then
+                  LIBICONV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-  LIMITS_H='limits.h'
-   if test -n "$LIMITS_H"; then
-  GL_GENERATE_LIMITS_H_TRUE=
-  GL_GENERATE_LIMITS_H_FALSE='#'
-else
-  GL_GENERATE_LIMITS_H_TRUE='#'
-  GL_GENERATE_LIMITS_H_FALSE=
-fi
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+                      haveit=
+                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+                          if test "X$x" = "X-L$dependency_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$dependency_libdir"; then
+                                                        LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+                          if test "X$x" = "X-L$dependency_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$dependency_libdir"; then
+                                                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
+                    if test "X$dep" != Xc \
+                       || case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) false ;;
+                            *)                          true ;;
+                          esac; then
+                      names_next_round="$names_next_round $dep"
+                    fi
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
 
 
 
-   if test -n "$STDINT_H"; then
-  GL_GENERATE_STDINT_H_TRUE=
-  GL_GENERATE_STDINT_H_FALSE='#'
-else
-  GL_GENERATE_STDINT_H_TRUE='#'
-  GL_GENERATE_STDINT_H_FALSE=
-fi
 
 
 
-  GNULIB_IMAXABS=0;
-  GNULIB_IMAXDIV=0;
-  GNULIB_STRTOIMAX=0;
-  GNULIB_STRTOUMAX=0;
-    HAVE_DECL_IMAXABS=1;
-  HAVE_DECL_IMAXDIV=1;
-  HAVE_DECL_STRTOIMAX=1;
-  HAVE_DECL_STRTOUMAX=1;
-  HAVE_IMAXDIV_T=1;
-  REPLACE_STRTOIMAX=0;
-  REPLACE_STRTOUMAX=0;
-  INT32_MAX_LT_INTMAX_MAX=1;
-  INT64_MAX_EQ_LONG_MAX='defined _LP64';
-  PRI_MACROS_BROKEN=0;
-  PRIPTR_PREFIX=__PRIPTR_PREFIX;
-  UINT32_MAX_LT_UINTMAX_MAX=1;
-  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
 
 
+    ICONV_CONST=;
+  REPLACE_ICONV=0;
+  REPLACE_ICONV_OPEN=0;
+  REPLACE_ICONV_UTF=0;
+  ICONV_H='';
+  if false; then
+              ICONV_H='iconv.h'
+     fi
 
+   if test -n "$ICONV_H"; then
+  GL_GENERATE_ICONV_H_TRUE=
+  GL_GENERATE_ICONV_H_FALSE='#'
+else
+  GL_GENERATE_ICONV_H_TRUE='#'
+  GL_GENERATE_ICONV_H_FALSE=
+fi
 
 
 
 
 
 
+          am_save_CPPFLAGS="$CPPFLAGS"
 
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_inttypes_h='<'inttypes.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
-printf %s "checking absolute name of <inttypes.h>... " >&6; }
-if test ${gl_cv_next_inttypes_h+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+if test ${am_cv_func_iconv+y}
 then :
   printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_inttypes_h = yes; then
-
-
-
+else $as_nop
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <inttypes.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 'inttypes.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_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_inttypes_h
-           gl_cv_next_inttypes_h='"'$gl_header'"'
-          else
-               gl_cv_next_inttypes_h='<'inttypes.h'>'
-             fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
-printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
-     fi
-     NEXT_INTTYPES_H=$gl_cv_next_inttypes_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='<'inttypes.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_inttypes_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-
-
-
 
+#include <stdlib.h>
+#include <iconv.h>
 
-  ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
-if test "x$ac_cv_header_inttypes_h" = xyes
+int
+main (void)
+{
+iconv_t cd = iconv_open("","");
+           iconv(cd,NULL,NULL,NULL,NULL);
+           iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
-
+  am_cv_func_iconv=yes
 fi
-
-  if test $ac_cv_header_inttypes_h = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
-printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
-if test ${gt_cv_inttypes_pri_broken+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS $LIBICONV"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <inttypes.h>
-#ifdef PRId32
-char *p = PRId32;
-#endif
+#include <stdlib.h>
+#include <iconv.h>
 
 int
 main (void)
 {
-
+iconv_t cd = iconv_open("","");
+             iconv(cd,NULL,NULL,NULL,NULL);
+             iconv_close(cd);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gt_cv_inttypes_pri_broken=no
-else
-  gt_cv_inttypes_pri_broken=yes
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
-printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
-  fi
-  if test "$gt_cv_inttypes_pri_broken" = yes; then
-
-printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
-
-    PRI_MACROS_BROKEN=1
-  else
-    PRI_MACROS_BROKEN=0
-  fi
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+printf "%s\n" "$am_cv_func_iconv" >&6; }
+  if test "$am_cv_func_iconv" = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+printf %s "checking for working iconv... " >&6; }
+if test ${am_cv_func_iconv_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+                  am_save_LIBS="$LIBS"
+      if test $am_cv_lib_iconv = yes; then
+        LIBS="$LIBS $LIBICONV"
+      fi
+      am_cv_func_iconv_works=no
+      for ac_iconv_const in '' 'const'; do
+        if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+             aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+             *)            am_cv_func_iconv_works="guessing yes" ;;
+           esac
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  GNULIB_ISWBLANK=0;
-  GNULIB_WCTYPE=0;
-  GNULIB_ISWCTYPE=0;
-  GNULIB_WCTRANS=0;
-  GNULIB_TOWCTRANS=0;
-    HAVE_ISWBLANK=1;
-  HAVE_WCTYPE_T=1;
-  HAVE_WCTRANS_T=1;
-  REPLACE_ISWBLANK=0;
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+
+int
+main (void)
+{
+int result = 0;
+  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+     successful returns.  This is even documented in
+     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
+  {
+    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+    if (cd_utf8_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_utf8_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 1;
+        iconv_close (cd_utf8_to_88591);
+      }
+  }
+  /* Test against Solaris 10 bug: Failures are not distinguishable from
+     successful returns.  */
+  {
+    iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+    if (cd_ascii_to_88591 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\263";
+        char buf[10];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_ascii_to_88591,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res == 0)
+          result |= 2;
+        iconv_close (cd_ascii_to_88591);
+      }
+  }
+  /* Test against AIX 6.1..7.1 bug: Buffer overrun.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304";
+        static char buf[2] = { (char)0xDE, (char)0xAD };
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = 1;
+        char *outptr = buf;
+        size_t outbytesleft = 1;
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+          result |= 4;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#if 0 /* This bug could be worked around by the caller.  */
+  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
+  {
+    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+    if (cd_88591_to_utf8 != (iconv_t)(-1))
+      {
+        static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+        char buf[50];
+        ICONV_CONST char *inptr = input;
+        size_t inbytesleft = strlen (input);
+        char *outptr = buf;
+        size_t outbytesleft = sizeof (buf);
+        size_t res = iconv (cd_88591_to_utf8,
+                            &inptr, &inbytesleft,
+                            &outptr, &outbytesleft);
+        if ((int)res > 0)
+          result |= 8;
+        iconv_close (cd_88591_to_utf8);
+      }
+  }
+#endif
+  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+     provided.  */
+  {
+    /* Try standardized names.  */
+    iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+    /* Try IRIX, OSF/1 names.  */
+    iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+    /* Try AIX names.  */
+    iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+    /* Try HP-UX names.  */
+    iconv_t cd4 = iconv_open ("utf8", "eucJP");
+    if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+        && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+      result |= 16;
+    if (cd1 != (iconv_t)(-1))
+      iconv_close (cd1);
+    if (cd2 != (iconv_t)(-1))
+      iconv_close (cd2);
+    if (cd3 != (iconv_t)(-1))
+      iconv_close (cd3);
+    if (cd4 != (iconv_t)(-1))
+      iconv_close (cd4);
+  }
+  return result;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  am_cv_func_iconv_works=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+        test "$am_cv_func_iconv_works" = no || break
+      done
+      LIBS="$am_save_LIBS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+printf "%s\n" "$am_cv_func_iconv_works" >&6; }
+    case "$am_cv_func_iconv_works" in
+      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+      *)   am_func_iconv=yes ;;
+    esac
+  else
+    am_func_iconv=no am_cv_lib_iconv=no
+  fi
+  if test "$am_func_iconv" = yes; then
 
+printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
 
-  if test $ac_cv_header_crtdefs_h = yes; then
-    HAVE_CRTDEFS_H=1
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+printf %s "checking how to link with libiconv... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+printf "%s\n" "$LIBICONV" >&6; }
   else
-    HAVE_CRTDEFS_H=0
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
   fi
 
 
 
+  if test "$am_cv_func_iconv" = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
+printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; }
+if test ${gl_cv_iconv_nonconst+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_iconv_nonconst=yes
+else $as_nop
+  gl_cv_iconv_nonconst=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-  if test $ac_cv_func_iswcntrl = yes; then
-    HAVE_ISWCNTRL=1
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
+printf "%s\n" "$gl_cv_iconv_nonconst" >&6; }
   else
-    HAVE_ISWCNTRL=0
+            gl_cv_iconv_nonconst=yes
+  fi
+  if test $gl_cv_iconv_nonconst = yes; then
+    iconv_arg1=""
+  else
+    iconv_arg1="const"
   fi
 
+printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h
+
+
+     if test $gl_cv_iconv_nonconst != yes; then
+       ICONV_CONST="const"
+     fi
+
+
+
+
+  GL_GNULIB_ICONV=0
+
 
 
-  if test $gt_cv_c_wint_t = yes; then
-    HAVE_WINT_T=1
-  else
-    HAVE_WINT_T=0
-  fi
 
 
 
@@ -14407,23 +15018,23 @@ printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_wctype_h='<'wctype.h'>'
+       gl_cv_next_iconv_h='<'iconv.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
-printf %s "checking absolute name of <wctype.h>... " >&6; }
-if test ${gl_cv_next_wctype_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
+printf %s "checking absolute name of <iconv.h>... " >&6; }
+if test ${gl_cv_next_iconv_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
-             if test $ac_cv_header_wctype_h = yes; then
+             if test $ac_cv_header_iconv_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wctype.h>
+#include <iconv.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -14439,7 +15050,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'wctype.h' \
+  gl_header_literal_regex=`echo 'iconv.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/
@@ -14448,182 +15059,193 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_wctype_h
-           gl_cv_next_wctype_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_iconv_h
+           gl_cv_next_iconv_h='"'$gl_header'"'
           else
-               gl_cv_next_wctype_h='<'wctype.h'>'
+               gl_cv_next_iconv_h='<'iconv.h'>'
              fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
-printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
+printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
      fi
-     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+     NEXT_ICONV_H=$gl_cv_next_iconv_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='<'wctype.h'>'
+       gl_next_as_first_directive='<'iconv.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_wctype_h
+       gl_next_as_first_directive=$gl_cv_next_iconv_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_wctype_h = yes; then
-    if test $ac_cv_func_iswcntrl = yes; then
-                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
-printf %s "checking whether iswcntrl works... " >&6; }
-if test ${gl_cv_func_iswcntrl_works+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-          if test "$cross_compiling" = yes
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+printf %s "checking for inline... " >&6; }
+if test ${ac_cv_c_inline+y}
 then :
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-                          #if __GNU_LIBRARY__ == 1
-                          Linux libc5 i18n is broken.
-                          #endif
-int
-main (void)
-{
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
+#endif
 
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_iswcntrl_works="guessing yes"
-else
-  gl_cv_func_iswcntrl_works="guessing no"
+  ac_cv_c_inline=$ac_kw
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
 
-               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                  included before <wchar.h>.
-                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                  must be included before <wchar.h>.  */
-               #include <stddef.h>
-               #include <stdio.h>
-               #include <time.h>
-               #include <wchar.h>
-               #include <wctype.h>
-               int main () { return iswprint ('x') == 0; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+printf "%s\n" "$ac_cv_c_inline" >&6; }
 
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+    ;;
+esac
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes
 then :
-  gl_cv_func_iswcntrl_works=yes
-else
-  gl_cv_func_iswcntrl_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
+else $as_nop
+
+printf "%s\n" "#define off_t long int" >>confdefs.h
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
-printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
-    fi
-    HAVE_WCTYPE_H=1
-  else
-    HAVE_WCTYPE_H=0
-  fi
 
 
-  case "$gl_cv_func_iswcntrl_works" in
-    *yes) REPLACE_ISWCNTRL=0 ;;
-    *)    REPLACE_ISWCNTRL=1 ;;
-  esac
 
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-        :
-  fi
 
-  if test $REPLACE_ISWCNTRL = 1; then
-    REPLACE_TOWLOWER=1
-  else
-    ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
-if test "x$ac_cv_func_towlower" = xyes
-then :
-  printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
 
-fi
 
-    if test $ac_cv_func_towlower = yes; then
-      REPLACE_TOWLOWER=0
-    else
-      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-             included before <wchar.h>.
-             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-             must be included before <wchar.h>.  */
-          #include <stddef.h>
-          #include <stdio.h>
-          #include <time.h>
-          #include <wchar.h>
-          #if HAVE_WCTYPE_H
-          # include <wctype.h>
-          #endif
 
-"
-if test "x$ac_cv_have_decl_towlower" = xyes
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_limits_h='<'limits.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+printf %s "checking absolute name of <limits.h>... " >&6; }
+if test ${gl_cv_next_limits_h+y}
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  printf %s "(cached) " >&6
+else $as_nop
+
+             if test $ac_cv_header_limits_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.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 'limits.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_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_limits_h
+           gl_cv_next_limits_h='"'$gl_header'"'
+          else
+               gl_cv_next_limits_h='<'limits.h'>'
+             fi
+
+
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+printf "%s\n" "$gl_cv_next_limits_h" >&6; }
+     fi
+     NEXT_LIMITS_H=$gl_cv_next_limits_h
 
-printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.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='<'limits.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_limits_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
 
-      if test $ac_cv_have_decl_towlower = yes; then
-                                REPLACE_TOWLOWER=1
-      else
-        REPLACE_TOWLOWER=0
-      fi
-    fi
-  fi
 
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
-        :
-  fi
 
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
-printf %s "checking for wctype_t... " >&6; }
-if test ${gl_cv_type_wctype_t+y}
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
+printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
+if test ${gl_cv_header_limits_width+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
-            #if HAVE_WCTYPE_H
-            # include <wctype.h>
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
             #endif
-            wctype_t a;
+            #include <limits.h>
+            long long llm = LLONG_MAX;
+            int wb = WORD_BIT;
+            int ullw = ULLONG_WIDTH;
+            int bw = BOOL_WIDTH;
 
 int
 main (void)
@@ -14635,38 +15257,40 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_type_wctype_t=yes
-else
-  gl_cv_type_wctype_t=no
+  gl_cv_header_limits_width=yes
+else $as_nop
+  gl_cv_header_limits_width=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
-printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
-  if test $gl_cv_type_wctype_t = no; then
-    HAVE_WCTYPE_T=0
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
+printf "%s\n" "$gl_cv_header_limits_width" >&6; }
+  if test "$gl_cv_header_limits_width" = yes; then
+    LIMITS_H=
+  else
+    LIMITS_H=limits.h
   fi
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
-printf %s "checking for wctrans_t... " >&6; }
-if test ${gl_cv_type_wctrans_t+y}
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+printf %s "checking for wint_t... " >&6; }
+if test ${gt_cv_c_wint_t+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
-            #include <wctype.h>
-            wctrans_t a;
-
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
 int
 main (void)
 {
@@ -14677,61 +15301,30 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_type_wctrans_t=yes
-else
-  gl_cv_type_wctrans_t=no
+  gt_cv_c_wint_t=yes
+else $as_nop
+  gt_cv_c_wint_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
-printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
-  if test $gl_cv_type_wctrans_t = no; then
-    HAVE_WCTRANS_T=0
-  fi
-
-
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+printf "%s\n" "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
 
+printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
 
 
-
-  GNULIB_NL_LANGINFO=0;
-    HAVE_NL_LANGINFO=1;
-  REPLACE_NL_LANGINFO=0;
-
-
-
-  GNULIB_LOCALECONV=0;
-  GNULIB_SETLOCALE=0;
-  GNULIB_DUPLOCALE=0;
-  GNULIB_LOCALENAME=0;
-    HAVE_NEWLOCALE=1;
-  HAVE_DUPLOCALE=1;
-  HAVE_FREELOCALE=1;
-  REPLACE_LOCALECONV=0;
-  REPLACE_SETLOCALE=0;
-  REPLACE_NEWLOCALE=0;
-  REPLACE_DUPLOCALE=0;
-  REPLACE_FREELOCALE=0;
-  REPLACE_STRUCT_LCONV=0;
-
-
-    REPLACE_NULL=0;
-  HAVE_MAX_ALIGN_T=1;
-  HAVE_WCHAR_T=1;
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-printf %s "checking for wchar_t... " >&6; }
-if test ${gt_cv_c_wchar_t+y}
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
+printf %s "checking whether wint_t is large enough... " >&6; }
+if test ${gl_cv_type_wint_t_large_enough+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-            wchar_t foo = (wchar_t)'\0';
+#include <wchar.h>
+              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+
 int
 main (void)
 {
@@ -14742,113 +15335,114 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gt_cv_c_wchar_t=yes
-else
-  gt_cv_c_wchar_t=no
+  gl_cv_type_wint_t_large_enough=yes
+else $as_nop
+  gl_cv_type_wint_t_large_enough=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
-printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
-  if test $gt_cv_c_wchar_t = yes; then
-
-printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
+printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
+    if test $gl_cv_type_wint_t_large_enough = no; then
+      GNULIBHEADERS_OVERRIDE_WINT_T=1
+    else
+      GNULIBHEADERS_OVERRIDE_WINT_T=0
+    fi
+  else
+    GNULIBHEADERS_OVERRIDE_WINT_T=0
   fi
 
 
 
-
-  STDDEF_H=
-
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
-printf %s "checking for good max_align_t... " >&6; }
-if test ${gl_cv_type_max_align_t+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
+printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
+if test ${gl_cv_c_multiarch+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  gl_cv_c_multiarch=no
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-            unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
-            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
-            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
-            #endif
-
-int
-main (void)
-{
+#ifndef __APPLE_CC__
+            not a universal capable compiler
+           #endif
+           typedef int dummy;
 
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_type_max_align_t=yes
-else
-  gl_cv_type_max_align_t=no
+
+                        arch=
+        prev=
+        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+          if test -n "$prev"; then
+            case $word in
+              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
+                if test -z "$arch" || test "$arch" = "$word"; then
+                  arch="$word"
+                else
+                  gl_cv_c_multiarch=yes
+                fi
+                ;;
+            esac
+            prev=
+          else
+            if test "x$word" = "x-arch"; then
+              prev=arch
+            fi
+          fi
+        done
+
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
-printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
-  if test $gl_cv_type_max_align_t = no; then
-    HAVE_MAX_ALIGN_T=0
-    STDDEF_H=stddef.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
+printf "%s\n" "$gl_cv_c_multiarch" >&6; }
+  if test $gl_cv_c_multiarch = yes; then
+    APPLE_UNIVERSAL_BUILD=1
+  else
+    APPLE_UNIVERSAL_BUILD=0
   fi
 
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
+
+
+
+
+
+
+
+printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
   fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if test ${gl_cv_decl_null_works+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_decl_null_works=yes
-else
-  gl_cv_decl_null_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-printf "%s\n" "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
+  if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
+
+
+
+  if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
   fi
 
 
-   if test -n "$STDDEF_H"; then
-  GL_GENERATE_STDDEF_H_TRUE=
-  GL_GENERATE_STDDEF_H_FALSE='#'
-else
-  GL_GENERATE_STDDEF_H_TRUE='#'
-  GL_GENERATE_STDDEF_H_FALSE=
-fi
 
-  if test -n "$STDDEF_H"; then
 
 
 
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
+       gl_cv_next_stdint_h='<'stdint.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-printf %s "checking absolute name of <stddef.h>... " >&6; }
-if test ${gl_cv_next_stddef_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+printf %s "checking absolute name of <stdint.h>... " >&6; }
+if test ${gl_cv_next_stdint_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_stdint_h = yes; then
+
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
+#include <stdint.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -14887,7 +15484,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stddef.h' \
+  gl_header_literal_regex=`echo 'stdint.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/
@@ -14896,75 +15493,299 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stddef_h
-           gl_cv_next_stddef_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_stdint_h
+           gl_cv_next_stdint_h='"'$gl_header'"'
+          else
+               gl_cv_next_stdint_h='<'stdint.h'>'
+             fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
      fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_h
+     NEXT_STDINT_H=$gl_cv_next_stdint_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='<'stddef.h'>'
+       gl_next_as_first_directive='<'stdint.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
+       gl_next_as_first_directive=$gl_cv_next_stdint_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
   fi
 
 
+    if test $ac_cv_header_stdint_h = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+printf %s "checking whether stdint.h conforms to C99... " >&6; }
+if test ${gl_cv_header_working_stdint_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_cv_header_working_stdint_h=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
-printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
-if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+/* Check that SIZE_MAX has the correct type, if possible.  */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
+       || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
+
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
-  rm -f conftest.sym conftest.file
-     echo >conftest.file
-     if test "$cross_compiling" = yes
+                                                    if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-          linux-* | linux)
-            # Guess yes on Linux systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          *-gnu* | gnu*)
-            # Guess yes on glibc systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          mingw*)
-            # Guess no on native Windows.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
-          *)
-            # If we don't know, assume the worst.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
-        esac
+                         # Guess yes on native Windows.
+                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+                         # In general, assume it works.
+                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
+               esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
+#include <stdint.h>
+
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+
 int
 main (void)
 {
-struct stat sbuf;
-            if (symlink ("conftest.file", "conftest.sym") != 0)
-              return 1;
-            /* Linux will dereference the symlink and fail, as required by
-               POSIX.  That is better in the sense that it means we will not
-               have to compile and use the lstat wrapper.  */
-            return lstat ("conftest.sym/", &sbuf) == 0;
+
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
 
   ;
   return 0;
@@ -14972,204 +15793,56 @@ struct stat sbuf;
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_lstat_dereferences_slashed_symlink=yes
-else
-  gl_cv_func_lstat_dereferences_slashed_symlink=no
+  gl_cv_header_working_stdint_h=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-     rm -f conftest.sym conftest.file
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
-printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
-  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
-    *yes)
-
-printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
+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_stdint_h" >&5
+printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
+  fi
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-printf %s "checking for a sed that does not truncate output... " >&6; }
-if test ${ac_cv_path_SED+y}
+  HAVE_C99_STDINT_H=0
+  HAVE_SYS_BITYPES_H=0
+  HAVE_SYS_INTTYPES_H=0
+  STDINT_H=stdint.h
+  case "$gl_cv_header_working_stdint_h" in
+    *yes)
+      HAVE_C99_STDINT_H=1
+                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
+printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
+if test ${gl_cv_header_stdint_without_STDC_macros+y}
 then :
   printf %s "(cached) " >&6
-else
-            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
-     for ac_i in 1 2 3 4 5 6 7; do
-       ac_script="$ac_script$as_nl$ac_script"
-     done
-     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
-     { ac_script=; unset ac_script;}
-     if test -z "$SED"; then
-  ac_path_SED_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  case $as_dir in #(((
-    '') as_dir=./ ;;
-    */) ;;
-    *) as_dir=$as_dir/ ;;
-  esac
-    for ac_prog in sed gsed
-   do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
-      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
-*GNU*)
-  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
-*)
-  ac_count=0
-  printf %s 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    printf "%s\n" '' >> "conftest.nl"
-    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_SED_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_SED="$ac_path_SED"
-      ac_path_SED_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_SED_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_SED"; then
-    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
-  fi
-else
-  ac_cv_path_SED=$SED
-fi
+else $as_nop
+  gl_cv_header_stdint_without_STDC_macros=no
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-printf "%s\n" "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
-  rm -f conftest.sed
 
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
 
-  GNULIB__EXIT=0;
-  GNULIB_ATOLL=0;
-  GNULIB_CALLOC_POSIX=0;
-  GNULIB_CANONICALIZE_FILE_NAME=0;
-  GNULIB_GETLOADAVG=0;
-  GNULIB_GETSUBOPT=0;
-  GNULIB_GRANTPT=0;
-  GNULIB_MALLOC_POSIX=0;
-  GNULIB_MBTOWC=0;
-  GNULIB_MKDTEMP=0;
-  GNULIB_MKOSTEMP=0;
-  GNULIB_MKOSTEMPS=0;
-  GNULIB_MKSTEMP=0;
-  GNULIB_MKSTEMPS=0;
-  GNULIB_POSIX_OPENPT=0;
-  GNULIB_PTSNAME=0;
-  GNULIB_PTSNAME_R=0;
-  GNULIB_PUTENV=0;
-  GNULIB_QSORT_R=0;
-  GNULIB_RANDOM=0;
-  GNULIB_RANDOM_R=0;
-  GNULIB_REALLOCARRAY=0;
-  GNULIB_REALLOC_POSIX=0;
-  GNULIB_REALPATH=0;
-  GNULIB_RPMATCH=0;
-  GNULIB_SECURE_GETENV=0;
-  GNULIB_SETENV=0;
-  GNULIB_STRTOD=0;
-  GNULIB_STRTOLL=0;
-  GNULIB_STRTOULL=0;
-  GNULIB_SYSTEM_POSIX=0;
-  GNULIB_UNLOCKPT=0;
-  GNULIB_UNSETENV=0;
-  GNULIB_WCTOMB=0;
-    HAVE__EXIT=1;
-  HAVE_ATOLL=1;
-  HAVE_CANONICALIZE_FILE_NAME=1;
-  HAVE_DECL_GETLOADAVG=1;
-  HAVE_GETSUBOPT=1;
-  HAVE_GRANTPT=1;
-  HAVE_DECL_INITSTATE=1;
-  HAVE_MKDTEMP=1;
-  HAVE_MKOSTEMP=1;
-  HAVE_MKOSTEMPS=1;
-  HAVE_MKSTEMP=1;
-  HAVE_MKSTEMPS=1;
-  HAVE_POSIX_OPENPT=1;
-  HAVE_PTSNAME=1;
-  HAVE_PTSNAME_R=1;
-  HAVE_QSORT_R=1;
-  HAVE_RANDOM=1;
-  HAVE_RANDOM_H=1;
-  HAVE_RANDOM_R=1;
-  HAVE_REALLOCARRAY=1;
-  HAVE_REALPATH=1;
-  HAVE_RPMATCH=1;
-  HAVE_SECURE_GETENV=1;
-  HAVE_SETENV=1;
-  HAVE_DECL_SETENV=1;
-  HAVE_DECL_SETSTATE=1;
-  HAVE_STRTOD=1;
-  HAVE_STRTOLL=1;
-  HAVE_STRTOULL=1;
-  HAVE_STRUCT_RANDOM_DATA=1;
-  HAVE_SYS_LOADAVG_H=0;
-  HAVE_UNLOCKPT=1;
-  HAVE_DECL_UNSETENV=1;
-  REPLACE_CALLOC=0;
-  REPLACE_CANONICALIZE_FILE_NAME=0;
-  REPLACE_MALLOC=0;
-  REPLACE_MBTOWC=0;
-  REPLACE_MKSTEMP=0;
-  REPLACE_PTSNAME=0;
-  REPLACE_PTSNAME_R=0;
-  REPLACE_PUTENV=0;
-  REPLACE_QSORT_R=0;
-  REPLACE_RANDOM_R=0;
-  REPLACE_REALLOC=0;
-  REPLACE_REALPATH=0;
-  REPLACE_SETENV=0;
-  REPLACE_STRTOD=0;
-  REPLACE_UNSETENV=0;
-  REPLACE_WCTOMB=0;
 
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
-printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
-if test ${gl_cv_func_malloc_posix+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
 
 int
 main (void)
 {
-#if defined _WIN32 && ! defined __CYGWIN__
-             choke me
-             #endif
 
   ;
   return 0;
@@ -15177,780 +15850,514 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_malloc_posix=yes
-else
-  gl_cv_func_malloc_posix=no
+  gl_cv_header_stdint_without_STDC_macros=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
-printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
-
-# Autoupdate added the following line to ensure that your configure
-# script's behavior did not change.  It is probably safe to remove.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
+printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
 
+      if test $gl_cv_header_stdint_without_STDC_macros = no; then
 
+printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
 
-      ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
 
-fi
+printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-printf %s "checking for GNU libc compatible malloc... " >&6; }
-if test ${ac_cv_func_malloc_0_nonnull+y}
+      fi
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
+printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
+if test ${gl_cv_header_stdint_width+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-          # Guess yes on platforms where we know the result.
-          *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
-            ac_cv_func_malloc_0_nonnull=yes ;;
-          # If we don't know, assume the worst.
-          *) ac_cv_func_malloc_0_nonnull=no ;;
-        esac
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  gl_cv_header_stdint_width=no
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *malloc ();
-            #endif
+
+              /* Work if build is not clean.  */
+              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+              #endif
+              #include <stdint.h>
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              int iw = UINTMAX_WIDTH;
 
 int
 main (void)
 {
-char *p = malloc (0);
-            int result = !p;
-            free (p);
-            return result;
+
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_func_malloc_0_nonnull=yes
-else
-  ac_cv_func_malloc_0_nonnull=no
+  gl_cv_header_stdint_width=yes
 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
 fi
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
+printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
+      if test "$gl_cv_header_stdint_width" = yes; then
+        STDINT_H=
+      fi
+      ;;
+    *)
+                  ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_inttypes_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
-  if test $ac_cv_func_malloc_0_nonnull = yes
+ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_bitypes_h" = xyes
 then :
-  gl_cv_func_malloc_0_nonnull=1
-else
-  gl_cv_func_malloc_0_nonnull=0
+  printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
+
 fi
 
+      if test $ac_cv_header_sys_inttypes_h = yes; then
+        HAVE_SYS_INTTYPES_H=1
+      fi
+      if test $ac_cv_header_sys_bitypes_h = yes; then
+        HAVE_SYS_BITYPES_H=1
+      fi
 
-printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
 
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
 
+  for gltype in ptrdiff_t size_t ; do
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+printf %s "checking for bit size of $gltype... " >&6; }
+if eval test \${gl_cv_bitsizeof_${gltype}+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
 
+#include <limits.h>"
+then :
 
+else $as_nop
+  result=unknown
+fi
 
+       eval gl_cv_bitsizeof_${gltype}=\$result
 
-  { 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}
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+printf %s "checking for bit size of $gltype... " >&6; }
+if eval test \${gl_cv_bitsizeof_${gltype}+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+#include <limits.h>"
+then :
+
+else $as_nop
+  result=unknown
+fi
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
+
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+printf %s "checking whether $gltype is signed... " >&6; }
+if eval test \${gl_cv_type_${gltype}_signed+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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 <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+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;
-  }
+
+  ;
   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_compile "$LINENO"
+then :
+  result=yes
+else $as_nop
+  result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       eval gl_cv_type_${gltype}_signed=\$result
 
 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
+eval ac_res=\$gl_cv_type_${gltype}_signed
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
 
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
 
 
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; 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}
+  for gltype in ptrdiff_t size_t ; do
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+printf %s "checking for $gltype integer literal suffix... " >&6; }
+if eval test \${gl_cv_type_${gltype}_suffix+y}
 then :
   printf %s "(cached) " >&6
-else
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         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 ()
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+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 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*
-
+if ac_fn_c_try_compile "$LINENO"
+then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
 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
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
+
+  done
 
 
+  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}
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+printf %s "checking for $gltype integer literal suffix... " >&6; }
+if eval test \${gl_cv_type_${gltype}_suffix+y}
 then :
   printf %s "(cached) " >&6
-else
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         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
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+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 :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
 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
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
 
+  done
 
 
-  GNULIB_EXPLICIT_BZERO=0;
-  GNULIB_FFSL=0;
-  GNULIB_FFSLL=0;
-  GNULIB_MEMCHR=0;
-  GNULIB_MEMMEM=0;
-  GNULIB_MEMPCPY=0;
-  GNULIB_MEMRCHR=0;
-  GNULIB_RAWMEMCHR=0;
-  GNULIB_STPCPY=0;
-  GNULIB_STPNCPY=0;
-  GNULIB_STRCHRNUL=0;
-  GNULIB_STRDUP=0;
-  GNULIB_STRNCAT=0;
-  GNULIB_STRNDUP=0;
-  GNULIB_STRNLEN=0;
-  GNULIB_STRPBRK=0;
-  GNULIB_STRSEP=0;
-  GNULIB_STRSTR=0;
-  GNULIB_STRCASESTR=0;
-  GNULIB_STRTOK_R=0;
-  GNULIB_MBSLEN=0;
-  GNULIB_MBSNLEN=0;
-  GNULIB_MBSCHR=0;
-  GNULIB_MBSRCHR=0;
-  GNULIB_MBSSTR=0;
-  GNULIB_MBSCASECMP=0;
-  GNULIB_MBSNCASECMP=0;
-  GNULIB_MBSPCASECMP=0;
-  GNULIB_MBSCASESTR=0;
-  GNULIB_MBSCSPN=0;
-  GNULIB_MBSPBRK=0;
-  GNULIB_MBSSPN=0;
-  GNULIB_MBSSEP=0;
-  GNULIB_MBSTOK_R=0;
-  GNULIB_STRERROR=0;
-  GNULIB_STRERROR_R=0;
-  GNULIB_STRSIGNAL=0;
-  GNULIB_STRVERSCMP=0;
-  HAVE_MBSLEN=0;
-    HAVE_EXPLICIT_BZERO=1;
-  HAVE_FFSL=1;
-  HAVE_FFSLL=1;
-  HAVE_MEMCHR=1;
-  HAVE_DECL_MEMMEM=1;
-  HAVE_MEMPCPY=1;
-  HAVE_DECL_MEMRCHR=1;
-  HAVE_RAWMEMCHR=1;
-  HAVE_STPCPY=1;
-  HAVE_STPNCPY=1;
-  HAVE_STRCHRNUL=1;
-  HAVE_DECL_STRDUP=1;
-  HAVE_DECL_STRNDUP=1;
-  HAVE_DECL_STRNLEN=1;
-  HAVE_STRPBRK=1;
-  HAVE_STRSEP=1;
-  HAVE_STRCASESTR=1;
-  HAVE_DECL_STRTOK_R=1;
-  HAVE_DECL_STRERROR_R=1;
-  HAVE_DECL_STRSIGNAL=1;
-  HAVE_STRVERSCMP=1;
-  REPLACE_MEMCHR=0;
-  REPLACE_MEMMEM=0;
-  REPLACE_STPNCPY=0;
-  REPLACE_STRCHRNUL=0;
-  REPLACE_STRDUP=0;
-  REPLACE_STRNCAT=0;
-  REPLACE_STRNDUP=0;
-  REPLACE_STRNLEN=0;
-  REPLACE_STRSTR=0;
-  REPLACE_STRCASESTR=0;
-  REPLACE_STRTOK_R=0;
-  REPLACE_STRERROR=0;
-  REPLACE_STRERROR_R=0;
-  REPLACE_STRSIGNAL=0;
-  UNDEFINE_STRTOK_R=0;
 
+          if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+    BITSIZEOF_WINT_T=32
+  fi
+
+      ;;
+  esac
 
 
 
+  LIMITS_H='limits.h'
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
 
 
 
 
 
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes
-then :
-  gl_have_mmap=yes
+
+
+   if test -n "$STDINT_H"; then
+  GL_GENERATE_STDINT_H_TRUE=
+  GL_GENERATE_STDINT_H_FALSE='#'
 else
-  gl_have_mmap=no
+  GL_GENERATE_STDINT_H_TRUE='#'
+  GL_GENERATE_STDINT_H_FALSE=
 fi
 
 
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
+    HAVE_DECL_IMAXABS=1;
+  HAVE_DECL_IMAXDIV=1;
+  HAVE_DECL_STRTOIMAX=1;
+  HAVE_DECL_STRTOUMAX=1;
+  HAVE_IMAXDIV_T=1;
+  REPLACE_STRTOIMAX=0;
+  REPLACE_STRTOUMAX=0;
+  INT32_MAX_LT_INTMAX_MAX=1;
+  INT64_MAX_EQ_LONG_MAX='defined _LP64';
+  PRIPTR_PREFIX=__PRIPTR_PREFIX;
+  UINT32_MAX_LT_UINTMAX_MAX=1;
+  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-  gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
 
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
 
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
-         gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
 
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
 
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
-    fi
-  fi
 
 
 
 
 
 
-  if test $HAVE_MEMCHR = 1; then
-    # Detect platform-specific bugs in some versions of glibc:
-    # memchr should not dereference anything with length 0
-    #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
-    # memchr should not dereference overestimated length after a match
-    #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
-    #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
-    # Assume that memchr works on platforms that lack mprotect.
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
-printf %s "checking whether memchr works... " >&6; }
-if test ${gl_cv_func_memchr_works+y}
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_inttypes_h='<'inttypes.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+printf %s "checking absolute name of <inttypes.h>... " >&6; }
+if test ${gl_cv_next_inttypes_h+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                    # Guess yes on native Windows.
-            mingw*) gl_cv_func_memchr_works="guessing yes" ;;
-                    # Be pessimistic for now.
-            *)      gl_cv_func_memchr_works="guessing no" ;;
-          esac
+else $as_nop
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+             if test $ac_cv_header_inttypes_h = yes; then
 
-#include <string.h>
-#if HAVE_SYS_MMAN_H
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/mman.h>
-# ifndef MAP_FILE
-#  define MAP_FILE 0
-# endif
-#endif
 
-int
-main (void)
-{
 
-  int result = 0;
-  char *fence = NULL;
-#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
-# if HAVE_MAP_ANONYMOUS
-  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
-  const int fd = -1;
-# else /* !HAVE_MAP_ANONYMOUS */
-  const int flags = MAP_FILE | MAP_PRIVATE;
-  int fd = open ("/dev/zero", O_RDONLY, 0666);
-  if (fd >= 0)
-# endif
-    {
-      int pagesize = getpagesize ();
-      char *two_pages =
-        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
-                       flags, fd, 0);
-      if (two_pages != (char *)(-1)
-          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
-        fence = two_pages + pagesize;
-    }
-#endif
-  if (fence)
-    {
-      if (memchr (fence, 0, 0))
-        result |= 1;
-      strcpy (fence - 9, "12345678");
-      if (memchr (fence - 9, 0, 79) != fence - 1)
-        result |= 2;
-      if (memchr (fence - 1, 0, 3) != fence - 1)
-        result |= 4;
-    }
-  return result;
 
-  ;
-  return 0;
-}
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <inttypes.h>
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_memchr_works=yes
-else
-  gl_cv_func_memchr_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
-printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
-    case "$gl_cv_func_memchr_works" in
-      *yes) ;;
-      *) REPLACE_MEMCHR=1 ;;
-    esac
-  fi
+                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 'inttypes.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_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+           gl_header=$gl_cv_absolute_inttypes_h
+           gl_cv_next_inttypes_h='"'$gl_header'"'
+          else
+               gl_cv_next_inttypes_h='<'inttypes.h'>'
+             fi
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
-printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
-if test ${gl_cv_minmax_in_limits_h+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
+     fi
+     NEXT_INTTYPES_H=$gl_cv_next_inttypes_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='<'inttypes.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_inttypes_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  PRIPTR_PREFIX=
+  if test -n "$STDINT_H"; then
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
-            int x = MIN (42, 17);
+
+         #ifdef _WIN64
+         LLP64
+         #endif
+
 int
 main (void)
 {
@@ -15958,38 +16365,124 @@ main (void)
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_minmax_in_limits_h=yes
-else
-  gl_cv_minmax_in_limits_h=no
+  PRIPTR_PREFIX='"l"'
+else $as_nop
+  PRIPTR_PREFIX='"ll"'
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  else
+        for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  PRIPTR_PREFIX='"'$glpfx'"'
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
-printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
-  if test $gl_cv_minmax_in_limits_h = yes; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
 
-printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
 
-  fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined INT32_MAX && defined INTMAX_MAX
+             #define CONDITION (INT32_MAX < INTMAX_MAX)
+            #else
+             #define CONDITION (sizeof (int) < sizeof (long long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else $as_nop
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+    INT32_MAX_LT_INTMAX_MAX=1;
+  else
+    INT32_MAX_LT_INTMAX_MAX=0;
+  fi
 
 
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
-printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
-if test ${gl_cv_minmax_in_sys_param_h+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/param.h>
-            int x = MIN (42, 17);
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined INT64_MAX
+             #define CONDITION (INT64_MAX == LONG_MAX)
+            #else
+             #define CONDITION (sizeof (long long int) == sizeof (long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
 int
 main (void)
 {
@@ -16000,35 +16493,102 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_minmax_in_sys_param_h=yes
-else
-  gl_cv_minmax_in_sys_param_h=no
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else $as_nop
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
-printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
-  if test $gl_cv_minmax_in_sys_param_h = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+    INT64_MAX_EQ_LONG_MAX=1;
+  else
+    INT64_MAX_EQ_LONG_MAX=0;
+  fi
 
-printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
 
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
   fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined UINT32_MAX && defined UINTMAX_MAX
+             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+            #else
+             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else $as_nop
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+    UINT32_MAX_LT_UINTMAX_MAX=1;
+  else
+    UINT32_MAX_LT_UINTMAX_MAX=0;
+  fi
 
 
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
-printf %s "checking whether time_t is signed... " >&6; }
-if test ${gl_cv_time_t_is_signed+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
-                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
+
+            #if defined UINT64_MAX
+             #define CONDITION (UINT64_MAX == ULONG_MAX)
+            #else
+             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
 int
 main (void)
 {
@@ -16039,805 +16599,919 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_time_t_is_signed=yes
-else
-  gl_cv_time_t_is_signed=no
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else $as_nop
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
-printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
-  if test $gl_cv_time_t_is_signed = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+    UINT64_MAX_EQ_ULONG_MAX=1;
+  else
+    UINT64_MAX_EQ_ULONG_MAX=0;
+  fi
 
-printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
 
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
   fi
 
-ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
-if test "x$ac_cv_have_decl_alarm" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
 
 
+  GL_GNULIB_IMAXABS=0
 
 
 
+  GL_GNULIB_IMAXDIV=0
 
 
 
+  GL_GNULIB_STRTOIMAX=0
 
-  if test $APPLE_UNIVERSAL_BUILD = 1; then
-    # A universal build on Apple Mac OS X platforms.
-    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
-    # But we need a configuration result that is valid in both modes.
-    gl_cv_func_working_mktime=no
-  fi
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
-printf %s "checking for working mktime... " >&6; }
-if test ${gl_cv_func_working_mktime+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                  # Guess no on native Windows.
-          mingw*) gl_cv_func_working_mktime="guessing no" ;;
-          *)      gl_cv_func_working_mktime="guessing no" ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Test program from Paul Eggert and Tony Leneis.  */
-#include <limits.h>
-#include <stdlib.h>
-#include <time.h>
 
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+  GL_GNULIB_STRTOUMAX=0
 
-#if HAVE_DECL_ALARM
-# include <signal.h>
-#endif
 
-#ifndef TIME_T_IS_SIGNED
-# define TIME_T_IS_SIGNED 0
-#endif
 
-/* Work around redefinition to rpl_putenv by other config tests.  */
-#undef putenv
 
-static time_t time_t_max;
-static time_t time_t_min;
 
-/* Values we'll use to set the TZ environment variable.  */
-static char *tz_strings[] = {
-  (char *) 0, "TZ=GMT0", "TZ=JST-9",
-  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
-};
-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+    HAVE_ISWBLANK=1;
+  HAVE_WCTYPE_T=1;
+  HAVE_WCTRANS_T=1;
+  REPLACE_ISWBLANK=0;
+  REPLACE_ISWDIGIT=0;
+  REPLACE_ISWXDIGIT=0;
 
-/* Return 0 if mktime fails to convert a date in the spring-forward gap.
-   Based on a problem report from Andreas Jaeger.  */
-static int
-spring_forward_gap ()
-{
-  /* glibc (up to about 1998-10-07) failed this test. */
-  struct tm tm;
 
-  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
-     instead of "TZ=America/Vancouver" in order to detect the bug even
-     on systems that don't support the Olson extension, or don't have the
-     full zoneinfo tables installed.  */
-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
 
-  tm.tm_year = 98;
-  tm.tm_mon = 3;
-  tm.tm_mday = 5;
-  tm.tm_hour = 2;
-  tm.tm_min = 0;
-  tm.tm_sec = 0;
-  tm.tm_isdst = -1;
-  return mktime (&tm) != (time_t) -1;
-}
 
-static int
-mktime_test1 (time_t now)
-{
-  struct tm *lt;
-  return ! (lt = localtime (&now)) || mktime (lt) == now;
-}
 
-static int
-mktime_test (time_t now)
-{
-  return (mktime_test1 (now)
-          && mktime_test1 ((time_t) (time_t_max - now))
-          && mktime_test1 ((time_t) (time_t_min + now)));
-}
+  if test $ac_cv_header_crtdefs_h = yes; then
+    HAVE_CRTDEFS_H=1
+  else
+    HAVE_CRTDEFS_H=0
+  fi
 
-static int
-irix_6_4_bug ()
-{
-  /* Based on code from Ariel Faigon.  */
-  struct tm tm;
-  tm.tm_year = 96;
-  tm.tm_mon = 3;
-  tm.tm_mday = 0;
-  tm.tm_hour = 0;
-  tm.tm_min = 0;
-  tm.tm_sec = 0;
-  tm.tm_isdst = -1;
-  mktime (&tm);
-  return tm.tm_mon == 2 && tm.tm_mday == 31;
-}
 
-static int
-bigtime_test (int j)
-{
-  struct tm tm;
-  time_t now;
-  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
-  now = mktime (&tm);
-  if (now != (time_t) -1)
-    {
-      struct tm *lt = localtime (&now);
-      if (! (lt
-             && lt->tm_year == tm.tm_year
-             && lt->tm_mon == tm.tm_mon
-             && lt->tm_mday == tm.tm_mday
-             && lt->tm_hour == tm.tm_hour
-             && lt->tm_min == tm.tm_min
-             && lt->tm_sec == tm.tm_sec
-             && lt->tm_yday == tm.tm_yday
-             && lt->tm_wday == tm.tm_wday
-             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
-                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
-        return 0;
-    }
-  return 1;
-}
 
-static int
-year_2050_test ()
-{
-  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
-     ignoring leap seconds.  */
-  unsigned long int answer = 2527315200UL;
 
-  struct tm tm;
-  time_t t;
-  tm.tm_year = 2050 - 1900;
-  tm.tm_mon = 2 - 1;
-  tm.tm_mday = 1;
-  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
-  tm.tm_isdst = -1;
 
-  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
-     instead of "TZ=America/Vancouver" in order to detect the bug even
-     on systems that don't support the Olson extension, or don't have the
-     full zoneinfo tables installed.  */
-  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
 
-  t = mktime (&tm);
 
-  /* Check that the result is either a failure, or close enough
-     to the correct answer that we can assume the discrepancy is
-     due to leap seconds.  */
-  return (t == (time_t) -1
-          || (0 < t && answer - 120 <= t && t <= answer + 120));
-}
 
-int
-main ()
-{
-  int result = 0;
-  time_t t, delta;
-  int i, j;
-  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
+  fi
 
-#if HAVE_DECL_ALARM
-  /* This test makes some buggy mktime implementations loop.
-     Give up after 60 seconds; a mktime slower than that
-     isn't worth using anyway.  */
-  signal (SIGALRM, SIG_DFL);
-  alarm (60);
-#endif
 
-  time_t_max = (! TIME_T_IS_SIGNED
-                ? (time_t) -1
-                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
-                   * 2 + 1));
-  time_t_min = (! TIME_T_IS_SIGNED
-                ? (time_t) 0
-                : time_t_signed_magnitude
-                ? ~ (time_t) 0
-                : ~ time_t_max);
 
-  delta = time_t_max / 997; /* a suitable prime number */
-  for (i = 0; i < N_STRINGS; i++)
-    {
-      if (tz_strings[i])
-        putenv (tz_strings[i]);
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
 
-      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
-        if (! mktime_test (t))
-          result |= 1;
-      if ((result & 2) == 0
-          && ! (mktime_test ((time_t) 1)
-                && mktime_test ((time_t) (60 * 60))
-                && mktime_test ((time_t) (60 * 60 * 24))))
-        result |= 2;
 
-      for (j = 1; (result & 4) == 0; j <<= 1)
-        {
-          if (! bigtime_test (j))
-            result |= 4;
-          if (INT_MAX / 2 < j)
-            break;
-        }
-      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
-        result |= 8;
-    }
-  if (! irix_6_4_bug ())
-    result |= 16;
-  if (! spring_forward_gap ())
-    result |= 32;
-  if (! year_2050_test ())
-    result |= 64;
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_working_mktime=yes
-else
-  gl_cv_func_working_mktime=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
-printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
 
 
 
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
-printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if test ${ac_cv_struct_tm+y}
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_wctype_h='<'wctype.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+printf %s "checking absolute name of <wctype.h>... " >&6; }
+if test ${gl_cv_next_wctype_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_wctype_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <time.h>
+#include <wctype.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-int
-main (void)
-{
-struct tm tm;
-                                    int *p = &tm.tm_sec;
-                                    return !p;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_struct_tm=time.h
-else
-  ac_cv_struct_tm=sys/time.h
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-printf "%s\n" "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-
-printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
-
-fi
-
-ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
-#include <$ac_cv_struct_tm>
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'wctype.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
+    }'
 
-"
-if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
-then :
+        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
+           gl_header=$gl_cv_absolute_wctype_h
+           gl_cv_next_wctype_h='"'$gl_header'"'
+          else
+               gl_cv_next_wctype_h='<'wctype.h'>'
+             fi
 
 
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
+     fi
+     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
 
-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+     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='<'wctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_wctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
 
-printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
 
-else
-  ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
-"
-if test "x$ac_cv_have_decl_tzname" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
-printf %s "checking for tzname... " >&6; }
-if test ${ac_cv_var_tzname+y}
+  if test $ac_cv_header_wctype_h = yes; then
+    if test $ac_cv_func_iswcntrl = yes; then
+                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+printf %s "checking whether iswcntrl works... " >&6; }
+if test ${gl_cv_func_iswcntrl_works+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-#if !HAVE_DECL_TZNAME
-extern char *tzname[];
-#endif
+else $as_nop
 
+          if test "$cross_compiling" = yes
+then :
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+                          #if __GNU_LIBRARY__ == 1
+                          Linux libc5 i18n is broken.
+                          #endif
 int
 main (void)
 {
-return tzname[0][0];
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_var_tzname=yes
-else
-  ac_cv_var_tzname=no
+  gl_cv_func_iswcntrl_works="guessing yes"
+else $as_nop
+  gl_cv_func_iswcntrl_works="guessing no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               #include <wchar.h>
+               #include <wctype.h>
+               int main () { return iswprint ('x') == 0; }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_iswcntrl_works=yes
+else $as_nop
+  gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
-printf "%s\n" "$ac_cv_var_tzname" >&6; }
-  if test $ac_cv_var_tzname = yes; then
 
-printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
 
-  fi
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
+    fi
+    HAVE_WCTYPE_H=1
+  else
+    HAVE_WCTYPE_H=0
+  fi
 
 
- ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
-"
-if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
+  if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+    REPLACE_ISWCNTRL=1
+  else
+    case "$gl_cv_func_iswcntrl_works" in
+      *yes) REPLACE_ISWCNTRL=0 ;;
+      *)    REPLACE_ISWCNTRL=1 ;;
+    esac
+  fi
+
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  fi
+
+  if test $REPLACE_ISWCNTRL = 1; then
+    REPLACE_TOWLOWER=1
+  else
+    ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
+if test "x$ac_cv_func_towlower" = xyes
 then :
+  printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
+fi
+
+    if test $ac_cv_func_towlower = yes; then
+      REPLACE_TOWLOWER=0
+    else
+      ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
+          #if HAVE_WCTYPE_H
+          # include <wctype.h>
+          #endif
 
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_towlower" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
+
+      if test $ac_cv_have_decl_towlower = yes; then
+                                REPLACE_TOWLOWER=1
+      else
+        REPLACE_TOWLOWER=0
+      fi
+    fi
+  fi
 
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
+        :
+  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
-printf %s "checking for O_CLOEXEC... " >&6; }
-if test ${gl_cv_macro_O_CLOEXEC+y}
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+printf %s "checking for wctype_t... " >&6; }
+if test ${gl_cv_type_wctype_t+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <fcntl.h>
-                          #ifndef O_CLOEXEC
-                            choke me;
-                          #endif
+#include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
 
 int
 main (void)
 {
-return O_CLOEXEC;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_macro_O_CLOEXEC=yes
-else
-  gl_cv_macro_O_CLOEXEC=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  gl_cv_type_wctype_t=yes
+else $as_nop
+  gl_cv_type_wctype_t=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
-printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
-printf %s "checking for promoted mode_t type... " >&6; }
-if test ${gl_cv_promoted_mode_t+y}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+printf %s "checking for wctrans_t... " >&6; }
+if test ${gl_cv_type_wctrans_t+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
+#include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
+
 int
 main (void)
 {
-typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_promoted_mode_t='int'
-else
-  gl_cv_promoted_mode_t='mode_t'
+  gl_cv_type_wctrans_t=yes
+else $as_nop
+  gl_cv_type_wctrans_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
-printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
-
-printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
-
-
-
-
-  GNULIB_PTHREAD_SIGMASK=0;
-  GNULIB_RAISE=0;
-  GNULIB_SIGNAL_H_SIGPIPE=0;
-  GNULIB_SIGPROCMASK=0;
-  GNULIB_SIGACTION=0;
-    HAVE_POSIX_SIGNALBLOCKING=1;
-  HAVE_PTHREAD_SIGMASK=1;
-  HAVE_RAISE=1;
-  HAVE_SIGSET_T=1;
-  HAVE_SIGINFO_T=1;
-  HAVE_SIGACTION=1;
-  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
-
-  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
-
-  HAVE_SIGHANDLER_T=1;
-  REPLACE_PTHREAD_SIGMASK=0;
-  REPLACE_RAISE=0;
-
-
-  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
-      #include <signal.h>
-      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
-      #include <sys/types.h>
-
-"
-if test "x$ac_cv_type_sigset_t" = xyes
-then :
-
-printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
+  fi
 
-gl_cv_type_sigset_t=yes
-else
-  gl_cv_type_sigset_t=no
-fi
 
-  if test $gl_cv_type_sigset_t != yes; then
-    HAVE_SIGSET_T=0
-  fi
 
 
 
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
-printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
-if test ${ac_cv_gnu_library_2_1+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
-  Lucky GNU user
- #endif
-#endif
-#ifdef __UCLIBC__
- Lucky user
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Lucky" >/dev/null 2>&1
-then :
-  ac_cv_gnu_library_2_1=yes
-else
-  ac_cv_gnu_library_2_1=no
-fi
-rm -rf conftest*
+  GL_GNULIB_ISWBLANK=0
 
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
-printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
+  GL_GNULIB_ISWDIGIT=0
 
-    GLIBC21="$ac_cv_gnu_library_2_1"
 
 
-ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_setenv" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+  GL_GNULIB_ISWXDIGIT=0
 
-printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
 
 
+  GL_GNULIB_WCTYPE=0
 
 
 
-  if test $ac_cv_have_decl_setenv = no; then
-    HAVE_DECL_SETENV=0
-  fi
+  GL_GNULIB_ISWCTYPE=0
 
 
 
+  GL_GNULIB_WCTRANS=0
 
 
-  ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
-if test "x$ac_cv_header_search_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
 
-fi
+  GL_GNULIB_TOWCTRANS=0
 
-  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
 
 
 
 
-{ 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}
+  { 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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.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 "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1
-then :
-  ac_cv_type_uid_t=yes
-else
-  ac_cv_type_uid_t=no
-fi
-rm -rf conftest*
+    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*
 
 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
-
+{ 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" "#define gid_t int" >>confdefs.h
 
-fi
 
-:
 
-{ 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}
+  { 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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-             #include <stdbool.h>
+else $as_nop
 
-             #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
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-             #ifndef __bool_true_false_are_defined
-              "error: __bool_true_false_are_defined is not defined"
-             #endif
+#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;
+}
 
-             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
+_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*
 
-             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;
+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
 
-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);
 
-  ;
+
+
+  { 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 $as_nop
+
+    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 ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_header_stdbool_h=yes
-else
-  ac_cv_header_stdbool_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    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*
+
 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" "$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" "#define HAVE__BOOL 1" >>confdefs.h
 
 
-fi
+    HAVE_NL_LANGINFO=1;
+  REPLACE_NL_LANGINFO=0;
 
 
 
-  GNULIB_FFS=0;
-    HAVE_FFS=1;
-  HAVE_STRCASECMP=1;
-  HAVE_DECL_STRNCASECMP=1;
 
 
-     REPLACE_STRERROR_0=0
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
-printf %s "checking whether strerror(0) succeeds... " >&6; }
-if test ${gl_cv_func_strerror_0_works+y}
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_langinfo_h='<'langinfo.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+printf %s "checking absolute name of <langinfo.h>... " >&6; }
+if test ${gl_cv_next_langinfo_h+y}
 then :
   printf %s "(cached) " >&6
-else
-  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 native Windows.
-         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # If we don't know, assume the worst.
-         *)             gl_cv_func_strerror_0_works="guessing no" ;;
-       esac
+else $as_nop
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-           #include <errno.h>
+             if test $ac_cv_header_langinfo_h = yes; then
 
-int
-main (void)
-{
-int result = 0;
-           char *str;
-           errno = 0;
-           str = strerror (0);
-           if (!*str) result |= 1;
-           if (errno) result |= 2;
-           if (strstr (str, "nknown") || strstr (str, "ndefined"))
-             result |= 4;
-           return result;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_strerror_0_works=yes
-else
-  gl_cv_func_strerror_0_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
-  case "$gl_cv_func_strerror_0_works" in
-    *yes) ;;
-    *)
-      REPLACE_STRERROR_0=1
 
-printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.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 'langinfo.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_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+           gl_header=$gl_cv_absolute_langinfo_h
+           gl_cv_next_langinfo_h='"'$gl_header'"'
+          else
+               gl_cv_next_langinfo_h='<'langinfo.h'>'
+             fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
+     fi
+     NEXT_LANGINFO_H=$gl_cv_next_langinfo_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='<'langinfo.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_langinfo_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
 
 
-  if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
-printf %s "checking for strerror_r with POSIX signature... " >&6; }
-if test ${gl_cv_func_strerror_r_posix_signature+y}
+
+
+
+    HAVE_LANGINFO_CODESET=0
+  HAVE_LANGINFO_T_FMT_AMPM=0
+  HAVE_LANGINFO_ALTMON=0
+  HAVE_LANGINFO_ERA=0
+  HAVE_LANGINFO_YESEXPR=0
+
+  if test $ac_cv_header_langinfo_h = yes; then
+    HAVE_LANGINFO_H=1
+                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+printf %s "checking whether langinfo.h defines CODESET... " >&6; }
+if test ${gl_cv_header_langinfo_codeset+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
-                int strerror_r (int, char *, size_t);
+#include <langinfo.h>
+int a = CODESET;
 
 int
 main (void)
@@ -16849,149 +17523,152 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_strerror_r_posix_signature=yes
-else
-  gl_cv_func_strerror_r_posix_signature=no
+  gl_cv_header_langinfo_codeset=yes
+else $as_nop
+  gl_cv_header_langinfo_codeset=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
-      if test $gl_cv_func_strerror_r_posix_signature = yes; then
-                                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
-printf %s "checking whether strerror_r works... " >&6; }
-if test ${gl_cv_func_strerror_r_works+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
+    if test $gl_cv_header_langinfo_codeset = yes; then
+      HAVE_LANGINFO_CODESET=1
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
+printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
+if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-
-              case "$host_os" in
-                       # Guess no on AIX.
-                aix*)  gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess no on HP-UX.
-                hpux*) gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess no on BSD variants.
-                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess yes otherwise.
-                *)     gl_cv_func_strerror_r_works="guessing yes";;
-              esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <errno.h>
-                  #include <string.h>
+#include <langinfo.h>
+int a = T_FMT_AMPM;
 
 int
 main (void)
 {
-int result = 0;
-                  char buf[79];
-                  if (strerror_r (EACCES, buf, 0) < 0)
-                    result |= 1;
-                  errno = 0;
-                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
-                    result |= 2;
-                  strcpy (buf, "Unknown");
-                  if (strerror_r (0, buf, sizeof buf) != 0)
-                    result |= 4;
-                  if (errno)
-                    result |= 8;
-                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
-                    result |= 0x10;
-                  errno = 0;
-                  *buf = 0;
-                  if (strerror_r (-3, buf, sizeof buf) < 0)
-                    result |= 0x20;
-                  if (errno)
-                    result |= 0x40;
-                  if (!*buf)
-                    result |= 0x80;
-                  return result;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_strerror_r_works=yes
-else
-  gl_cv_func_strerror_r_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_header_langinfo_t_fmt_ampm=yes
+else $as_nop
+  gl_cv_header_langinfo_t_fmt_ampm=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
-      else
-
-                        if test $ac_cv_func___xpg_strerror_r = yes; then
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
-printf %s "checking whether __xpg_strerror_r works... " >&6; }
-if test ${gl_cv_func_strerror_r_works+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
+printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
+    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
+      HAVE_LANGINFO_T_FMT_AMPM=1
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
+printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
+if test ${gl_cv_header_langinfo_altmon+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = ALTMON_1;
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-                                  gl_cv_func_strerror_r_works="guessing no"
+  gl_cv_header_langinfo_altmon=yes
+else $as_nop
+  gl_cv_header_langinfo_altmon=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-else
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
+printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
+    if test $gl_cv_header_langinfo_altmon = yes; then
+      HAVE_LANGINFO_ALTMON=1
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+printf %s "checking whether langinfo.h defines ERA... " >&6; }
+if test ${gl_cv_header_langinfo_era+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <errno.h>
-                    #include <string.h>
-                    extern
-                    #ifdef __cplusplus
-                    "C"
-                    #endif
-                    int __xpg_strerror_r(int, char *, size_t);
+#include <langinfo.h>
+int a = ERA;
 
 int
 main (void)
 {
-int result = 0;
-                    char buf[256] = "^";
-                    char copy[256];
-                    char *str = strerror (-1);
-                    strcpy (copy, str);
-                    if (__xpg_strerror_r (-2, buf, 1) == 0)
-                      result |= 1;
-                    if (*buf)
-                      result |= 2;
-                    __xpg_strerror_r (-2, buf, 256);
-                    if (strcmp (str, copy))
-                      result |= 4;
-                    return result;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_strerror_r_works=yes
-else
-  gl_cv_func_strerror_r_works=no
+  gl_cv_header_langinfo_era=yes
+else $as_nop
+  gl_cv_header_langinfo_era=no
 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
+
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
+    if test $gl_cv_header_langinfo_era = yes; then
+      HAVE_LANGINFO_ERA=1
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
+printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
+if test ${gl_cv_header_langinfo_yesexpr+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
+int a = YESEXPR;
 
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_langinfo_yesexpr=yes
+else $as_nop
+  gl_cv_header_langinfo_yesexpr=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
-        fi
-      fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
+printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
+    if test $gl_cv_header_langinfo_yesexpr = yes; then
+      HAVE_LANGINFO_YESEXPR=1
     fi
+  else
+    HAVE_LANGINFO_H=0
   fi
 
 
@@ -17005,79 +17682,166 @@ printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_string_h='<'string.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
-printf %s "checking absolute name of <string.h>... " >&6; }
-if test ${gl_cv_next_string_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
+  GL_GNULIB_NL_LANGINFO=0
+
+
+
+
+    HAVE_NEWLOCALE=1;
+  HAVE_DUPLOCALE=1;
+  HAVE_FREELOCALE=1;
+  REPLACE_LOCALECONV=0;
+  REPLACE_SETLOCALE=0;
+  REPLACE_NEWLOCALE=0;
+  REPLACE_DUPLOCALE=0;
+  REPLACE_FREELOCALE=0;
+  REPLACE_STRUCT_LCONV=0;
+  LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
+
+
+    REPLACE_NULL=0;
+  HAVE_MAX_ALIGN_T=1;
+  HAVE_WCHAR_T=1;
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+printf %s "checking for wchar_t... " >&6; }
+if test ${gt_cv_c_wchar_t+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
 _ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gt_cv_c_wchar_t=yes
+else $as_nop
+  gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'string.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
-    }'
+printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
 
-        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+  fi
 
-           gl_header=$gl_cv_absolute_string_h
-           gl_cv_next_string_h='"'$gl_header'"'
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
-printf "%s\n" "$gl_cv_next_string_h" >&6; }
-     fi
-     NEXT_STRING_H=$gl_cv_next_string_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='<'string.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_string_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
 
 
 
+  STDDEF_H=
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
+printf %s "checking for good max_align_t... " >&6; }
+if test ${gl_cv_type_max_align_t+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#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];
+            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
+            #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_type_max_align_t=yes
+else $as_nop
+  gl_cv_type_max_align_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
+printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
+  if test $gl_cv_type_max_align_t = no; then
+    HAVE_MAX_ALIGN_T=0
+    STDDEF_H=stddef.h
+  fi
 
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test ${gl_cv_decl_null_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_decl_null_works=yes
+else $as_nop
+  gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+printf "%s\n" "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
 
 
+   if test -n "$STDDEF_H"; then
+  GL_GENERATE_STDDEF_H_TRUE=
+  GL_GENERATE_STDDEF_H_FALSE='#'
+else
+  GL_GENERATE_STDDEF_H_TRUE='#'
+  GL_GENERATE_STDDEF_H_FALSE=
+fi
 
+  if test -n "$STDDEF_H"; then
 
 
 
@@ -17087,23 +17851,20 @@ printf "%s\n" "$gl_cv_next_string_h" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_strings_h='<'strings.h'>'
+       gl_cv_next_stddef_h='<'stddef.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
-printf %s "checking absolute name of <strings.h>... " >&6; }
-if test ${gl_cv_next_strings_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+printf %s "checking absolute name of <stddef.h>... " >&6; }
+if test ${gl_cv_next_stddef_h+y}
 then :
   printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_strings_h = yes; then
-
+else $as_nop
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <strings.h>
+#include <stddef.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17119,7 +17880,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'strings.h' \
+  gl_header_literal_regex=`echo 'stddef.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/
@@ -17128,77 +17889,90 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_strings_h
-           gl_cv_next_strings_h='"'$gl_header'"'
-          else
-               gl_cv_next_strings_h='<'strings.h'>'
-             fi
+           gl_header=$gl_cv_absolute_stddef_h
+           gl_cv_next_stddef_h='"'$gl_header'"'
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
-printf "%s\n" "$gl_cv_next_strings_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
      fi
-     NEXT_STRINGS_H=$gl_cv_next_strings_h
+     NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'strings.h'>'
+       gl_next_as_first_directive='<'stddef.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_strings_h
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_strings_h = yes; then
-    HAVE_STRINGS_H=1
-  else
-    HAVE_STRINGS_H=0
   fi
 
 
 
 
 
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+printf %s "checking whether locale.h defines locale_t... " >&6; }
+if test ${gl_cv_header_locale_has_locale_t+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+            locale_t x;
+int
+main (void)
+{
 
-ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strndup" = xyes
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_cv_header_locale_has_locale_t=yes
+else $as_nop
+  gl_cv_header_locale_has_locale_t=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
 
 
-ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strnlen" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
+    HAVE_LOCALE_T=1
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      HAVE_LOCALE_T=1
+    else
+      HAVE_LOCALE_T=0
+    fi
+  fi
 
-printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
 
 
 
-ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strtoumax" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
 
 
 
@@ -17206,13 +17980,99 @@ printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
 
 
 
+  case "$host_os" in
+    solaris*)
 
+printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
 
+      ;;
+  esac
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if test ${gl_cv_header_locale_h_posix2001+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+            int x = LC_MESSAGES;
+            int y = sizeof (((struct lconv *) 0)->decimal_point);
+int
+main (void)
+{
 
-printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_locale_h_posix2001=yes
+else $as_nop
+  gl_cv_header_locale_h_posix2001=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
+
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
+printf %s "checking whether struct lconv is properly defined... " >&6; }
+if test ${gl_cv_sys_struct_lconv_ok+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+            struct lconv l;
+            int x = sizeof (l.decimal_point);
+            int y = sizeof (l.int_p_cs_precedes);
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_sys_struct_lconv_ok=yes
+else $as_nop
+  gl_cv_sys_struct_lconv_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
+printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
+  if test $gl_cv_sys_struct_lconv_ok = no; then
+            case "$host_os" in
+      mingw*)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _MSC_VER
+ Special
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Special" >/dev/null 2>&1
+then :
 
+else $as_nop
+  REPLACE_STRUCT_LCONV=1
+fi
+rm -rf conftest*
 
+        ;;
+      *) REPLACE_STRUCT_LCONV=1 ;;
+    esac
+  fi
 
 
 
@@ -17223,20 +18083,20 @@ printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_types_h='<'sys/types.h'>'
+       gl_cv_next_locale_h='<'locale.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
-printf %s "checking absolute name of <sys/types.h>... " >&6; }
-if test ${gl_cv_next_sys_types_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+printf %s "checking absolute name of <locale.h>... " >&6; }
+if test ${gl_cv_next_locale_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
+#include <locale.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17252,7 +18112,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/types.h' \
+  gl_header_literal_regex=`echo 'locale.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/
@@ -17261,27 +18121,27 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_types_h
-           gl_cv_next_sys_types_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_locale_h
+           gl_cv_next_locale_h='"'$gl_header'"'
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
-printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+printf "%s\n" "$gl_cv_next_locale_h" >&6; }
      fi
-     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
+     NEXT_LOCALE_H=$gl_cv_next_locale_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/types.h'>'
+       gl_next_as_first_directive='<'locale.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+       gl_next_as_first_directive=$gl_cv_next_locale_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
 
 
 
@@ -17293,760 +18153,1067 @@ printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
 
 
 
+  GL_GNULIB_LOCALECONV=0
 
-    WINDOWS_STAT_INODES=0
 
 
+  GL_GNULIB_SETLOCALE=0
 
 
-  GNULIB_WAITPID=0;
 
+  GL_GNULIB_SETLOCALE_NULL=0
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
-printf %s "checking for struct timespec in <time.h>... " >&6; }
-if test ${gl_cv_sys_struct_timespec_in_time_h+y}
+  GL_GNULIB_DUPLOCALE=0
+
+
+
+  GL_GNULIB_LOCALENAME=0
+
+
+
+
+
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+printf %s "checking whether imported symbols can be declared weak... " >&6; }
+if test ${gl_cv_have_weak+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  gl_cv_have_weak=no
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
-
+extern void xyzzy ();
+#pragma weak xyzzy
 int
 main (void)
 {
-static struct timespec x; x.tv_sec = x.tv_nsec;
+xyzzy();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_sys_struct_timespec_in_time_h=yes
-else
-  gl_cv_sys_struct_timespec_in_time_h=no
+  gl_cv_have_weak=maybe
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+     if test $gl_cv_have_weak = maybe; then
+                     if test "$cross_compiling" = yes
+then :
+                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+             Extensible Linking Format
+             #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+  gl_cv_have_weak="guessing yes"
+else $as_nop
+  gl_cv_have_weak="guessing no"
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
-printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+rm -rf conftest*
 
-  TIME_H_DEFINES_STRUCT_TIMESPEC=0
-  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
-  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
-  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
-  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
-    TIME_H_DEFINES_STRUCT_TIMESPEC=1
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
-printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
-if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_have_weak=yes
+else $as_nop
+  gl_cv_have_weak=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     fi
+          case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+                    case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+printf "%s\n" "$gl_cv_have_weak" >&6; }
+  case "$gl_cv_have_weak" in
+    *yes)
+
+printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
+
+      ;;
+  esac
+
+    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+
+      :
+    fi
+    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
+
+      gl_have_isoc_threads="$ac_cv_header_threads_h"
+    fi
+    if test "$gl_use_threads" = yes \
+       || test "$gl_use_threads" = posix \
+       || test "$gl_use_threads" = isoc+posix; then
+
+
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+  gl_have_pthread_h=yes
+else $as_nop
+  gl_have_pthread_h=no
+fi
+
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
+
+int
+main (void)
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:18356: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:18357: LIBPTHREAD=$LIBPTHREAD" >&5
+
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1
+then :
+  gl_pthread_in_glibc=yes
+fi
+rm -rf conftest*
+
+          ;;
+      esac
+      echo "$as_me:18383: 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.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.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.  */
+char pthread_kill ();
 int
 main (void)
 {
-static struct timespec x; x.tv_sec = x.tv_nsec;
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_sys_struct_timespec_in_sys_time_h=yes
-else
-  gl_cv_sys_struct_timespec_in_sys_time_h=no
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
-printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
-    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
-      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
-    else
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
-printf %s "checking for struct timespec in <pthread.h>... " >&6; }
-if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
+
+printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+             esac
+           fi
+
+fi
+
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <pthread.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.  */
+char pthread_kill ();
 int
 main (void)
 {
-static struct timespec x; x.tv_sec = x.tv_nsec;
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_sys_struct_timespec_in_pthread_h=yes
-else
-  gl_cv_sys_struct_timespec_in_pthread_h=no
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
-printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
-      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
-        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
-      else
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
-printf %s "checking for struct timespec in <unistd.h>... " >&6; }
-if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
+then :
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
+fi
+
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+printf %s "checking for pthread_kill in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_pthread_kill+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <unistd.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.  */
+char pthread_kill ();
 int
 main (void)
 {
-static struct timespec x; x.tv_sec = x.tv_nsec;
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_sys_struct_timespec_in_unistd_h=yes
-else
-  gl_cv_sys_struct_timespec_in_unistd_h=no
+  ac_cv_lib_c_r_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
+then :
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
-printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
-        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
-          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+
         fi
       fi
+      echo "$as_me:18537: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
     fi
-  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; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+printf "%s\n" "$gl_pthread_api" >&6; }
 
 
+    if test $gl_pthread_api = yes; then
 
+printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
+    fi
 
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main (void)
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  LIB_SCHED_YIELD=
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_time_h='<'time.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
-printf %s "checking absolute name of <time.h>... " >&6; }
-if test ${gl_cv_next_time_h+y}
+else $as_nop
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+printf %s "checking for sched_yield in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sched_yield+y}
 then :
   printf %s "(cached) " >&6
-else
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.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 'time.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
-    }'
+/* 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.  */
+char sched_yield ();
+int
+main (void)
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_rt_sched_yield=yes
+else $as_nop
+  ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+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
+else $as_nop
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+printf %s "checking for sched_yield in -lposix4... " >&6; }
+if test ${ac_cv_lib_posix4_sched_yield+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+/* 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.  */
+char sched_yield ();
+int
+main (void)
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_posix4_sched_yield=yes
+else $as_nop
+  ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+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
+fi
 
-           gl_header=$gl_cv_absolute_time_h
-           gl_cv_next_time_h='"'$gl_header'"'
+fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
-printf "%s\n" "$gl_cv_next_time_h" >&6; }
-     fi
-     NEXT_TIME_H=$gl_cv_next_time_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='<'time.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_time_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
 
+    gl_pthreadlib_body_done=done
+  fi
 
+      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
+      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
+      if test $gl_pthread_api = yes; then
+        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
+          gl_threads_api='isoc+posix'
 
+printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
 
+          LIBTHREAD= LTLIBTHREAD=
+        else
+          gl_threads_api=posix
 
+printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
 
+          if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
 
+printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
 
+          else
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 
+printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
 
+              LIBTHREAD= LTLIBTHREAD=
+            else
+              case "$host_os" in
+                freebsd* | dragonfly* | midnightbsd*)
+                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
 
+printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
+                  fi
+                  ;;
+              esac
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
 
-gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
-i\
-0
-q
-'
-gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
-i\
-0
-q
-'
-gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
-i\
-0
-q
-'
 
 
-  if test "$HAVE_LIBUNISTRING" = yes; then
-    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
-    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
-    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
-  fi
+  if test -z "$gl_stdthreadlib_body_done"; then
 
-ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
+    case "$host_os" in
+      mingw*)
+        LIBSTDTHREAD=
+        ;;
+      *)
 
-ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_feof_unlocked" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes
+then :
+  gl_have_pthread_h=yes
+else $as_nop
+  gl_have_pthread_h=no
+fi
+
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
 
-ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
+int
+main (void)
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:18765: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:18766: LIBPTHREAD=$LIBPTHREAD" >&5
 
-printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
 
-ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_pthread_in_glibc=yes
 fi
+rm -rf conftest*
 
-printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
+          ;;
+      esac
+      echo "$as_me:18792: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
-ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
+      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+      # since it is defined as a macro on OSF/1.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
+/* 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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-
-printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
-
-ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
-
-ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fread_unlocked" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
 
-ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
+             esac
+           fi
 
-ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getc_unlocked" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
 
-printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+printf %s "checking for pthread_kill in -lpthread... " >&6; }
+if test ${ac_cv_lib_pthread_pthread_kill+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
+/* 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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  ac_cv_lib_pthread_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-
-printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
-
-ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putc_unlocked" = xyes
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
 fi
 
-printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+printf %s "checking for pthread_kill in -lc_r... " >&6; }
+if test ${ac_cv_lib_c_r_pthread_kill+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
-if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
+/* 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.  */
+char pthread_kill ();
+int
+main (void)
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  ac_cv_lib_c_r_pthread_kill=yes
+else $as_nop
+  ac_cv_lib_c_r_pthread_kill=no
 fi
-
-printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
-
-ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_unsetenv" = xyes
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
 fi
 
-printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
-
-
+        fi
+      fi
+      echo "$as_me:18946: 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; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+printf "%s\n" "$gl_pthread_api" >&6; }
 
 
+    if test $gl_pthread_api = yes; then
 
-  if test $ac_cv_header_features_h = yes; then
-    HAVE_FEATURES_H=1
-  else
-    HAVE_FEATURES_H=0
-  fi
+printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
+    fi
 
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main (void)
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  LIB_SCHED_YIELD=
 
-  { 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}
+else $as_nop
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+printf %s "checking for sched_yield in -lrt... " >&6; }
+if test ${ac_cv_lib_rt_sched_yield+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <sys/types.h>
-#include <inttypes.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.  */
+char sched_yield ();
 int
 main (void)
 {
-uintmax_t i = (uintmax_t) -1; return !i;
+return sched_yield ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_header_inttypes_h=yes
-else
-  gl_cv_header_inttypes_h=no
+  ac_cv_lib_rt_sched_yield=yes
+else $as_nop
+  ac_cv_lib_rt_sched_yield=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 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}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+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
+else $as_nop
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+printf %s "checking for sched_yield in -lposix4... " >&6; }
+if test ${ac_cv_lib_posix4_sched_yield+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-            #include <stdint.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.  */
+char sched_yield ();
 int
 main (void)
 {
-uintmax_t i = (uintmax_t) -1; return !i;
+return sched_yield ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_header_stdint_h=yes
-else
-  gl_cv_header_stdint_h=no
+  ac_cv_lib_posix4_sched_yield=yes
+else $as_nop
+  ac_cv_lib_posix4_sched_yield=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+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
 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
 
-  fi
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
 
+    gl_pthreadlib_body_done=done
+  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}
+        if test $ac_cv_header_threads_h = 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
+            LIBSTDTHREAD=
+          else
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
+printf %s "checking for thrd_create in -lstdthreads... " >&6; }
+if test ${ac_cv_lib_stdthreads_thrd_create+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lstdthreads  $LIBS"
+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
-
+/* 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.  */
+char thrd_create ();
 int
 main (void)
 {
-intmax_t x = -1; return !x;
+return thrd_create ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gt_cv_c_intmax_t=yes
-else
-  gt_cv_c_intmax_t=no
+  ac_cv_lib_stdthreads_thrd_create=yes
+else $as_nop
+  ac_cv_lib_stdthreads_thrd_create=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 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" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
+printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
+if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
+then :
 
-printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
+              LIBSTDTHREAD='-lstdthreads -lpthread'
 
-  else
+else $as_nop
 
-    test $ac_cv_type_long_long_int = yes \
-      && ac_type='long long' \
-      || ac_type='long'
+                            LIBSTDTHREAD="$LIBPMULTITHREAD"
 
-printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
+fi
 
-  fi
+          fi
+        else
+                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+        fi
+        ;;
+    esac
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
-printf %s "checking where to find the exponent in a 'double'... " >&6; }
-if test ${gl_cv_cc_double_expbit0+y}
-then :
-  printf %s "(cached) " >&6
-else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
+printf %s "checking whether ISO C threads API is available... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
+printf "%s\n" "$ac_cv_header_threads_h" >&6; }
+    gl_stdthreadlib_body_done=done
+  fi
 
-      if test "$cross_compiling" = yes
-then :
+        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
+        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
+        gl_threads_api=isoc
 
-                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
 
-#if defined arm || defined __arm || defined __arm__
-  mixed_endianness
-#endif
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "mixed_endianness" >/dev/null 2>&1
-then :
-  gl_cv_cc_double_expbit0="unknown"
-else
+printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
 
-                                                         :
-if test ${ac_cv_c_bigendian+y}
-then :
-  printf %s "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
+          fi
+          ;;
+      esac
+    fi
+  fi
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
+printf %s "checking for multithread API to use... " >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
+printf "%s\n" "$gl_threads_api" >&6; }
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
 
-       # Check for potential -arch flags.  It is not universal unless
-       # there are at least two -arch flags with different values.
-       ac_arch=
-       ac_prev=
-       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-        if test -n "$ac_prev"; then
-          case $ac_word in
-            i?86 | x86_64 | ppc | ppc64)
-              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-                ac_arch=$ac_word
-              else
-                ac_cv_c_bigendian=universal
-                break
-              fi
-              ;;
-          esac
-          ac_prev=
-        elif test "x$ac_word" = "x-arch"; then
-          ac_prev=arch
-        fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
 
-int
-main (void)
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-               #include <sys/param.h>
 
-int
-main (void)
-{
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main (void)
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main (void)
-{
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
+if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
 then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes
+  printf %s "(cached) " >&6
+else $as_nop
+  rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$cross_compiling" = yes
 then :
-  # Try to guess by grepping values from an object file.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
+  case "$host_os" in
+          linux-* | linux)
+            # Guess yes on Linux systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *-gnu* | gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          mingw*)
+            # Guess no on native Windows.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+          *)
+            # If we don't know, obey --enable-cross-guesses.
+            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
+        esac
 
-int
-main (void)
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
 int
 main (void)
 {
-
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
+struct stat sbuf;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
 
   ;
   return 0;
@@ -18054,1949 +19221,1566 @@ main (void)
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
+  gl_cv_func_lstat_dereferences_slashed_symlink=yes
+else $as_nop
+  gl_cv_func_lstat_dereferences_slashed_symlink=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    fi
+     rm -f conftest.sym conftest.file
+
 fi
-:
- case $ac_cv_c_bigendian in #(
-   yes)
-     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
-   no)
-     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
-   universal)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
 
-printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
 
-     ;; #(
-   *)
-     gl_cv_cc_double_expbit0="unknown" ;;
- esac
+      ;;
+  esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     { ac_script=; unset ac_script;}
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_prog in sed gsed
+   do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+      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
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  printf %s 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    printf "%s\n" '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
+      $ac_path_SED_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_SED"; then
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+  fi
+else
+  ac_cv_path_SED=$SED
+fi
 
 fi
-rm -rf conftest*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
 
 
-else
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
+printf %s "checking whether malloc (0) returns nonnull... " >&6; }
+if test ${ac_cv_func_malloc_0_nonnull+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
+        esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>
 
-#include <float.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#define NWORDS \
-  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { double value; unsigned int word[NWORDS]; } memory_double;
-static unsigned int ored_words[NWORDS];
-static unsigned int anded_words[NWORDS];
-static void add_to_ored_words (double x)
-{
-  memory_double m;
-  size_t i;
-  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
-  memset (&m, 0, sizeof (memory_double));
-  m.value = x;
-  for (i = 0; i < NWORDS; i++)
-    {
-      ored_words[i] |= m.word[i];
-      anded_words[i] &= m.word[i];
-    }
-}
-int main ()
+int
+main (void)
 {
-  size_t j;
-  FILE *fp = fopen ("conftest.out", "w");
-  if (fp == NULL)
-    return 1;
-  for (j = 0; j < NWORDS; j++)
-    anded_words[j] = ~ (unsigned int) 0;
-  add_to_ored_words (0.25);
-  add_to_ored_words (0.5);
-  add_to_ored_words (1.0);
-  add_to_ored_words (2.0);
-  add_to_ored_words (4.0);
-  /* Remove bits that are common (e.g. if representation of the first mantissa
-     bit is explicit).  */
-  for (j = 0; j < NWORDS; j++)
-    ored_words[j] &= ~anded_words[j];
-  /* Now find the nonzero word.  */
-  for (j = 0; j < NWORDS; j++)
-    if (ored_words[j] != 0)
-      break;
-  if (j < NWORDS)
-    {
-      size_t i;
-      for (i = j + 1; i < NWORDS; i++)
-        if (ored_words[i] != 0)
-          {
-            fprintf (fp, "unknown");
-            return (fclose (fp) != 0);
-          }
-      for (i = 0; ; i++)
-        if ((ored_words[j] >> i) & 1)
-          {
-            fprintf (fp, "word %d bit %d", (int) j, (int) i);
-            return (fclose (fp) != 0);
-          }
-    }
-  fprintf (fp, "unknown");
-  return (fclose (fp) != 0);
+void *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;
+  ;
+  return 0;
 }
 
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_cc_double_expbit0=`cat conftest.out`
-else
-  gl_cv_cc_double_expbit0="unknown"
+  ac_cv_func_malloc_0_nonnull=yes
+else $as_nop
+  ac_cv_func_malloc_0_nonnull=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      rm -f conftest.out
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
-printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
-  case "$gl_cv_cc_double_expbit0" in
-    word*bit*)
-      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
-      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
+  case $ac_cv_func_malloc_0_nonnull in #(
+  *yes) :
+    gl_cv_func_malloc_0_nonnull=1 ;; #(
+  *) :
+    gl_cv_func_malloc_0_nonnull=0 ;;
+esac
 
-printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
 
+printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
 
-printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
 
-      ;;
-  esac
 
 
 
 
+  GL_GNULIB_EXPLICIT_BZERO=0
 
 
 
+  GL_GNULIB_FFSL=0
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
-printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
-if test ${gl_cv_func_snprintf_retval_c99+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-      if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                                 # Guess yes on glibc systems.
-           *-gnu* | gnu*)        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";;
-                                 # Guess yes on Mac OS X >= 10.3.
-           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
-           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on OpenBSD >= 3.9.
-           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
-                                 gl_cv_func_snprintf_retval_c99="guessing no";;
-           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on Solaris >= 2.10.
-           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
-           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
-                                 # Guess yes on AIX >= 4.
-           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
-           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on NetBSD >= 3.
-           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
-                                 gl_cv_func_snprintf_retval_c99="guessing no";;
-           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on BeOS.
-           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
-                                 # Guess yes on MSVC, no on mingw.
-           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#ifdef _MSC_VER
- Known
-#endif
+  GL_GNULIB_FFSLL=0
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Known" >/dev/null 2>&1
-then :
-  gl_cv_func_snprintf_retval_c99="guessing yes"
-else
-  gl_cv_func_snprintf_retval_c99="guessing no"
-fi
-rm -rf conftest*
 
-                                 ;;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
-         esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_MEMCHR=0
 
-#include <stdio.h>
-#include <string.h>
-#if HAVE_SNPRINTF
-# define my_snprintf snprintf
-#else
-# include <stdarg.h>
-static int my_snprintf (char *buf, int size, const char *format, ...)
-{
-  va_list args;
-  int ret;
-  va_start (args, format);
-  ret = vsnprintf (buf, size, format, args);
-  va_end (args);
-  return ret;
-}
-#endif
-static char buf[100];
-int main ()
-{
-  strcpy (buf, "ABCDEF");
-  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
-    return 1;
-  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
-    return 2;
-  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
-    return 3;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_snprintf_retval_c99=yes
-else
-  gl_cv_func_snprintf_retval_c99=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-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; }
+  GL_GNULIB_MEMMEM=0
 
 
 
+  GL_GNULIB_MEMPCPY=0
 
 
 
-  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
-if test "x$ac_cv_func_snprintf" = xyes
-then :
-  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+  GL_GNULIB_MEMRCHR=0
 
-fi
-ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
-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
+  GL_GNULIB_RAWMEMCHR=0
 
-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
-then :
-  printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
 
-fi
+  GL_GNULIB_STPCPY=0
 
-      ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
-"
-if test "x$ac_cv_have_decl__snprintf" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
 
+  GL_GNULIB_STPNCPY=0
 
 
-  case "$gl_cv_func_snprintf_retval_c99" in
-    *yes)
 
-printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
+  GL_GNULIB_STRCHRNUL=0
 
-      ;;
-  esac
 
 
+  GL_GNULIB_STRDUP=0
 
 
-  GNULIB_SOCKET=0;
-  GNULIB_CONNECT=0;
-  GNULIB_ACCEPT=0;
-  GNULIB_BIND=0;
-  GNULIB_GETPEERNAME=0;
-  GNULIB_GETSOCKNAME=0;
-  GNULIB_GETSOCKOPT=0;
-  GNULIB_LISTEN=0;
-  GNULIB_RECV=0;
-  GNULIB_SEND=0;
-  GNULIB_RECVFROM=0;
-  GNULIB_SENDTO=0;
-  GNULIB_SETSOCKOPT=0;
-  GNULIB_SHUTDOWN=0;
-  GNULIB_ACCEPT4=0;
-  HAVE_STRUCT_SOCKADDR_STORAGE=1;
-  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
 
-  HAVE_SA_FAMILY_T=1;
-  HAVE_ACCEPT4=1;
+  GL_GNULIB_STRNCAT=0
 
 
-   if test $ac_cv_header_sys_socket_h = no; then
-                         ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
-if test "x$ac_cv_header_ws2tcpip_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
 
-fi
+  GL_GNULIB_STRNDUP=0
 
-   fi
 
 
+  GL_GNULIB_STRNLEN=0
 
 
 
-        case "$host_os" in
-    osf*)
+  GL_GNULIB_STRPBRK=0
 
-printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
 
-      ;;
-  esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
-printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
-if test ${gl_cv_header_sys_socket_h_selfcontained+y}
-then :
-  printf %s "(cached) " >&6
-else
+  GL_GNULIB_STRSEP=0
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/socket.h>
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_sys_socket_h_selfcontained=yes
-else
-  gl_cv_header_sys_socket_h_selfcontained=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
-printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
-  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
-            ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
-if test "x$ac_cv_func_shutdown" = xyes
-then :
-  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
+  GL_GNULIB_STRSTR=0
 
-fi
 
-    if test $ac_cv_func_shutdown = yes; then
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
-printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
-if test ${gl_cv_header_sys_socket_h_shut+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/socket.h>
-int
-main (void)
-{
-int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_header_sys_socket_h_shut=yes
-else
-  gl_cv_header_sys_socket_h_shut=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  GL_GNULIB_STRCASESTR=0
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
-printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
-      if test $gl_cv_header_sys_socket_h_shut = no; then
-        SYS_SOCKET_H='sys/socket.h'
-      fi
-    fi
-  fi
-  # We need to check for ws2tcpip.h now.
 
 
+  GL_GNULIB_STRTOK_R=0
 
 
 
+  GL_GNULIB_MBSLEN=0
 
 
 
+  GL_GNULIB_MBSNLEN=0
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
-printf %s "checking absolute name of <sys/socket.h>... " >&6; }
-if test ${gl_cv_next_sys_socket_h+y}
-then :
-  printf %s "(cached) " >&6
-else
+  GL_GNULIB_MBSCHR=0
 
-             if test $ac_cv_header_sys_socket_h = yes; then
 
 
+  GL_GNULIB_MBSRCHR=0
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/socket.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/socket.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_GNULIB_MBSSTR=0
 
-        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_socket_h
-           gl_cv_next_sys_socket_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
-             fi
 
+  GL_GNULIB_MBSCASECMP=0
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
-printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
-     fi
-     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_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/socket.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
 
+  GL_GNULIB_MBSNCASECMP=0
 
 
 
-  if test $ac_cv_header_sys_socket_h = yes; then
-    HAVE_SYS_SOCKET_H=1
-    HAVE_WS2TCPIP_H=0
-  else
-    HAVE_SYS_SOCKET_H=0
-    if test $ac_cv_header_ws2tcpip_h = yes; then
-      HAVE_WS2TCPIP_H=1
-    else
-      HAVE_WS2TCPIP_H=0
-    fi
-  fi
+  GL_GNULIB_MBSPCASECMP=0
 
 
 
-  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
-  /* sys/types.h is not needed according to POSIX, but the
-     sys/socket.h in i386-unknown-freebsd4.10 and
-     powerpc-apple-darwin5.5 required it. */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
+  GL_GNULIB_MBSCASESTR=0
 
-"
-if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
 
+  GL_GNULIB_MBSCSPN=0
 
-fi
-ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
-  /* sys/types.h is not needed according to POSIX, but the
-     sys/socket.h in i386-unknown-freebsd4.10 and
-     powerpc-apple-darwin5.5 required it. */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
 
-"
-if test "x$ac_cv_type_sa_family_t" = xyes
-then :
 
-printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
+  GL_GNULIB_MBSPBRK=0
 
 
-fi
 
-  if test $ac_cv_type_struct_sockaddr_storage = no; then
-    HAVE_STRUCT_SOCKADDR_STORAGE=0
-  fi
-  if test $ac_cv_type_sa_family_t = no; then
-    HAVE_SA_FAMILY_T=0
-  fi
-  if test $ac_cv_type_struct_sockaddr_storage != no; then
-    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
-       #ifdef HAVE_SYS_SOCKET_H
-       #include <sys/socket.h>
-       #endif
-       #ifdef HAVE_WS2TCPIP_H
-       #include <ws2tcpip.h>
-       #endif
+  GL_GNULIB_MBSSPN=0
 
-"
-if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
 
+  GL_GNULIB_MBSSEP=0
 
-else
-  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
-fi
 
-  fi
-  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
-     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
-    SYS_SOCKET_H='sys/socket.h'
-  fi
 
+  GL_GNULIB_MBSTOK_R=0
 
 
 
-  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
+  GL_GNULIB_STRERROR=0
 
-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
 
+  GL_GNULIB_STRERROR_R=0
 
 
 
+  GL_GNULIB_STRERRORNAME_NP=0
 
 
 
+  GL_GNULIB_SIGABBREV_NP=0
 
-  GNULIB_INET_NTOP=0;
-  GNULIB_INET_PTON=0;
-    HAVE_DECL_INET_NTOP=1;
-  HAVE_DECL_INET_PTON=1;
-  REPLACE_INET_NTOP=0;
-  REPLACE_INET_PTON=0;
 
 
+  GL_GNULIB_SIGDESCR_NP=0
 
 
 
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
-printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
-if test ${gl_cv_func_getcwd_null+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                           # Guess yes on glibc systems.
-            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
-                           # Guess yes on Cygwin.
-            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
-                           # If we don't know, assume the worst.
-            *)             gl_cv_func_getcwd_null="guessing no";;
-          esac
+  GL_GNULIB_STRSIGNAL=0
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#       include <stdlib.h>
-#        if HAVE_UNISTD_H
-#         include <unistd.h>
-#        else /* on Windows with MSVC */
-#         include <direct.h>
-#        endif
-#        ifndef getcwd
-         char *getcwd ();
-#        endif
 
-int
-main (void)
-{
+  GL_GNULIB_STRVERSCMP=0
 
-#if defined _WIN32 && ! defined __CYGWIN__
-/* mingw cwd does not start with '/', but getcwd does allocate.
-   However, mingw fails to honor non-zero size.  */
-#else
-           if (chdir ("/") != 0)
-             return 1;
-           else
-             {
-               char *f = getcwd (NULL, 0);
-               if (! f)
-                 return 2;
-               if (f[0] != '/')
-                 { free (f); return 3; }
-               if (f[1] != '\0')
-                 { free (f); return 4; }
-               free (f);
-               return 0;
-             }
-#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_getcwd_null=yes
-else
-  gl_cv_func_getcwd_null=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
-printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
+  GL_GNULIB_MDA_MEMCCPY=1
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
-printf %s "checking for getcwd with POSIX signature... " >&6; }
-if test ${gl_cv_func_getcwd_posix_signature+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
-int
-main (void)
-{
-extern
-           #ifdef __cplusplus
-           "C"
-           #endif
-           char *getcwd (char *, size_t);
 
-  ;
-  return 0;
-}
+  GL_GNULIB_MDA_STRDUP=1
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_func_getcwd_posix_signature=yes
-else
-  gl_cv_func_getcwd_posix_signature=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
-printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
 
 
+  HAVE_MBSLEN=0;
+    HAVE_EXPLICIT_BZERO=1;
+  HAVE_FFSL=1;
+  HAVE_FFSLL=1;
+  HAVE_DECL_MEMMEM=1;
+  HAVE_MEMPCPY=1;
+  HAVE_DECL_MEMRCHR=1;
+  HAVE_RAWMEMCHR=1;
+  HAVE_STPCPY=1;
+  HAVE_STPNCPY=1;
+  HAVE_STRCHRNUL=1;
+  HAVE_DECL_STRDUP=1;
+  HAVE_DECL_STRNDUP=1;
+  HAVE_DECL_STRNLEN=1;
+  HAVE_STRPBRK=1;
+  HAVE_STRSEP=1;
+  HAVE_STRCASESTR=1;
+  HAVE_DECL_STRTOK_R=1;
+  HAVE_DECL_STRERROR_R=1;
+  HAVE_STRERRORNAME_NP=1;
+  HAVE_SIGABBREV_NP=1;
+  HAVE_SIGDESCR_NP=1;
+  HAVE_DECL_STRSIGNAL=1;
+  HAVE_STRVERSCMP=1;
+  REPLACE_FFSLL=0;
+  REPLACE_MEMCHR=0;
+  REPLACE_MEMMEM=0;
+  REPLACE_STPNCPY=0;
+  REPLACE_STRCHRNUL=0;
+  REPLACE_STRDUP=0;
+  REPLACE_STRNCAT=0;
+  REPLACE_STRNDUP=0;
+  REPLACE_STRNLEN=0;
+  REPLACE_STRSTR=0;
+  REPLACE_STRCASESTR=0;
+  REPLACE_STRTOK_R=0;
+  REPLACE_STRERROR=0;
+  REPLACE_STRERROR_R=0;
+  REPLACE_STRERRORNAME_NP=0;
+  REPLACE_STRSIGNAL=0;
+  UNDEFINE_STRTOK_R=0;
 
 
 
 
 
-  { 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}
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_have_mmap=yes
+else $as_nop
+  gl_have_mmap=no
+fi
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+printf %s "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cannot identify this map
 #endif
-int
-main (void)
-{
-int x = AF_INET; struct in_addr y; struct sockaddr_in z;
- if (&x && &y && &z) return 0;
-  ;
-  return 0;
-}
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cannot identify this map" >/dev/null 2>&1
 then :
-  gl_cv_socket_ipv4=yes
-else
-  gl_cv_socket_ipv4=no
+  gl_have_mmap_anonymous=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cannot identify this map
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cannot identify this map" >/dev/null 2>&1
+then :
+
+printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+         gl_have_mmap_anonymous=yes
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
-printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
-  if test $gl_cv_socket_ipv4 = yes; then
+rm -rf conftest*
 
-printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
+    fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
+
+printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
+    fi
   fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
-printf %s "checking for IPv6 sockets... " >&6; }
-if test ${gl_cv_socket_ipv6+y}
+
+
+
+
+
+
+
+
+
+  # Detect platform-specific bugs in some versions of glibc:
+  # memchr should not dereference anything with length 0
+  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
+  # memchr should not dereference overestimated length after a match
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+  # memchr should cast the second argument to 'unsigned char'.
+  #   This bug exists in Android 4.3.
+  # Assume that memchr works on platforms that lack mprotect.
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+printf %s "checking whether memchr works... " >&6; }
+if test ${gl_cv_func_memchr_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+                           # Guess yes on native Windows.
+          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+        esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
 #endif
+
 int
 main (void)
 {
-int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
- if (&x && &y && &z) return 0;
+
+  int result = 0;
+  char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+  const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+  const int flags = MAP_FILE | MAP_PRIVATE;
+  int fd = open ("/dev/zero", O_RDONLY, 0666);
+  if (fd >= 0)
+# endif
+    {
+      int pagesize = getpagesize ();
+      char *two_pages =
+        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+                       flags, fd, 0);
+      if (two_pages != (char *)(-1)
+          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+        fence = two_pages + pagesize;
+    }
+#endif
+  if (fence)
+    {
+      /* Test against bugs on glibc systems.  */
+      if (memchr (fence, 0, 0))
+        result |= 1;
+      strcpy (fence - 9, "12345678");
+      if (memchr (fence - 9, 0, 79) != fence - 1)
+        result |= 2;
+      if (memchr (fence - 1, 0, 3) != fence - 1)
+        result |= 4;
+      /* Test against bug on AIX 7.2.  */
+      if (memchr (fence - 4, '6', 16) != fence - 4)
+        result |= 8;
+    }
+  /* Test against bug on Android 4.3.  */
+  {
+    char input[3];
+    input[0] = 'a';
+    input[1] = 'b';
+    input[2] = 'c';
+    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
+      result |= 16;
+  }
+  return result;
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_socket_ipv6=yes
-else
-  gl_cv_socket_ipv6=no
+  gl_cv_func_memchr_works=yes
+else $as_nop
+  gl_cv_func_memchr_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
-printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
-  if test $gl_cv_socket_ipv6 = yes; then
-
-printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
-
-  fi
 
 
-
-  GNULIB_PSELECT=0;
-  GNULIB_SELECT=0;
-    HAVE_PSELECT=1;
-  REPLACE_PSELECT=0;
-  REPLACE_SELECT=0;
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
+  case "$gl_cv_func_memchr_works" in
+    *yes) ;;
+    *) REPLACE_MEMCHR=1 ;;
+  esac
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
-printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
-if test ${gl_cv_header_sys_select_h_selfcontained+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
+printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
+if test ${gl_cv_minmax_in_limits_h+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
+#include <limits.h>
+            int x = MIN (42, 17);
 int
 main (void)
 {
-struct timeval b;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_sys_select_h_selfcontained=yes
-else
-  gl_cv_header_sys_select_h_selfcontained=no
+  gl_cv_minmax_in_limits_h=yes
+else $as_nop
+  gl_cv_minmax_in_limits_h=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/select.h>
-int
-main (void)
-{
-int memset; int bzero;
-  ;
-  return 0;
-}
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
+printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
+  if test $gl_cv_minmax_in_limits_h = yes; then
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
+printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
+if test ${gl_cv_minmax_in_sys_param_h+y}
 then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
+#include <sys/param.h>
+            int x = MIN (42, 17);
 int
 main (void)
 {
 
-                  #undef memset
-                  #define memset nonexistent_memset
-                  extern
-                  #ifdef __cplusplus
-                  "C"
-                  #endif
-                  void *memset (void *, int, unsigned long);
-                  #undef bzero
-                  #define bzero nonexistent_bzero
-                  extern
-                  #ifdef __cplusplus
-                  "C"
-                  #endif
-                  void bzero (void *, unsigned long);
-                  fd_set fds;
-                  FD_ZERO (&fds);
-
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-
-else
-  gl_cv_header_sys_select_h_selfcontained=no
+  gl_cv_minmax_in_sys_param_h=yes
+else $as_nop
+  gl_cv_minmax_in_sys_param_h=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
+printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
+  if test $gl_cv_minmax_in_sys_param_h = yes; then
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
-printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
+printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
+
+  fi
 
 
 
 
 
 
+    HAVE_DECL_LOCALTIME_R=1;
+  HAVE_NANOSLEEP=1;
+  HAVE_STRPTIME=1;
+  HAVE_TIMEGM=1;
+  HAVE_TIMESPEC_GET=1;
+    HAVE_TIMEZONE_T=0;
+        REPLACE_CTIME=GNULIB_PORTCHECK;
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_MKTIME=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_STRFTIME=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+  REPLACE_TZSET=GNULIB_PORTCHECK;
 
+      : ${GNULIB_GETTIMEOFDAY=0};
+        REPLACE_GMTIME=0;
+  REPLACE_LOCALTIME=0;
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_select_h='<'sys/select.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
-printf %s "checking absolute name of <sys/select.h>... " >&6; }
-if test ${gl_cv_next_sys_select_h+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
+printf %s "checking whether time_t is signed... " >&6; }
+if test ${gl_cv_time_t_is_signed+y}
 then :
   printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_sys_select_h = yes; then
-
-
-
-
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.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/select.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_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_sys_select_h
-           gl_cv_next_sys_select_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_select_h='<'sys/select.h'>'
-             fi
-
+#include <time.h>
+                          char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_time_t_is_signed=yes
+else $as_nop
+  gl_cv_time_t_is_signed=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
-printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
-     fi
-     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_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/select.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_select_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
+printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
+  if test $gl_cv_time_t_is_signed = yes; then
 
+printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
 
-  if test $ac_cv_header_sys_select_h = yes; then
-    HAVE_SYS_SELECT_H=1
-  else
-    HAVE_SYS_SELECT_H=0
   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
+ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_alarm" = xyes
 then :
-  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
-
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
 
-  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
 
 
 
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
+printf %s "checking for working mktime... " >&6; }
+if test ${gl_cv_func_working_mktime+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test $APPLE_UNIVERSAL_BUILD = 1; then
+       # A universal build on Apple Mac OS X platforms.
+       # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
+       # But we need a configuration result that is valid in both modes.
+       gl_cv_func_working_mktime="guessing no"
+     else
+       if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                    # Guess no on native Windows.
+            mingw*) gl_cv_func_working_mktime="guessing no" ;;
+            *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
+          esac
 
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Test program from Paul Eggert and Tony Leneis.  */
+#include <limits.h>
+#include <stdlib.h>
+#include <time.h>
 
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
+#if HAVE_DECL_ALARM
+# include <signal.h>
+#endif
 
 
 
-  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
+$gl_mda_defines
 
-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
+#ifndef TIME_T_IS_SIGNED
+# define TIME_T_IS_SIGNED 0
+#endif
 
-   LIBSOCKET=
-  if test $HAVE_WINSOCK2_H = 1; then
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
-printf %s "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
-if test ${gl_cv_func_wsastartup+y}
-then :
-  printf %s "(cached) " >&6
-else
+static time_t time_t_max;
+static time_t time_t_min;
 
-      gl_save_LIBS="$LIBS"
-      LIBS="$LIBS -lws2_32"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+/* Values we'll use to set the TZ environment variable.  */
+static char *tz_strings[] = {
+  (char *) 0, "TZ=GMT0", "TZ=JST-9",
+  "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+};
+#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
 
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-int
-main (void)
+/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+   Based on a problem report from Andreas Jaeger.  */
+static int
+spring_forward_gap ()
 {
+  /* glibc (up to about 1998-10-07) failed this test. */
+  struct tm tm;
 
-          WORD wVersionRequested = MAKEWORD(1, 1);
-          WSADATA wsaData;
-          int err = WSAStartup(wVersionRequested, &wsaData);
-          WSACleanup ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv_func_wsastartup=yes
-else
-  gl_cv_func_wsastartup=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      LIBS="$gl_save_LIBS"
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
-printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
-    if test "$gl_cv_func_wsastartup" = "yes"; then
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
 
-printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
+  tm.tm_year = 98;
+  tm.tm_mon = 3;
+  tm.tm_mday = 5;
+  tm.tm_hour = 2;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  return mktime (&tm) != (time_t) -1;
+}
 
-      LIBSOCKET='-lws2_32'
-    fi
-  else
-                                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-printf %s "checking for library containing setsockopt... " >&6; }
-if test ${gl_cv_lib_socket+y}
-then :
-  printf %s "(cached) " >&6
-else
+static int
+mktime_test1 (time_t now)
+{
+  struct tm *lt;
+  return ! (lt = localtime (&now)) || mktime (lt) == now;
+}
 
-      gl_cv_lib_socket=
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main (void)
+static int
+mktime_test (time_t now)
 {
-setsockopt();
-  ;
-  return 0;
+  return (mktime_test1 (now)
+          && mktime_test1 ((time_t) (time_t_max - now))
+          && mktime_test1 ((time_t) (time_t_min + now)));
 }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
 
-else
-  gl_save_LIBS="$LIBS"
-         LIBS="$gl_save_LIBS -lsocket"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main (void)
+static int
+irix_6_4_bug ()
 {
-setsockopt();
-  ;
-  return 0;
+  /* Based on code from Ariel Faigon.  */
+  struct tm tm;
+  tm.tm_year = 96;
+  tm.tm_mon = 3;
+  tm.tm_mday = 0;
+  tm.tm_hour = 0;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  mktime (&tm);
+  return tm.tm_mon == 2 && tm.tm_mday == 31;
 }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv_lib_socket="-lsocket"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-         if test -z "$gl_cv_lib_socket"; then
-           LIBS="$gl_save_LIBS -lnetwork"
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main (void)
+
+static int
+bigtime_test (int j)
 {
-setsockopt();
-  ;
-  return 0;
+  struct tm tm;
+  time_t now;
+  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+  now = mktime (&tm);
+  if (now != (time_t) -1)
+    {
+      struct tm *lt = localtime (&now);
+      if (! (lt
+             && lt->tm_year == tm.tm_year
+             && lt->tm_mon == tm.tm_mon
+             && lt->tm_mday == tm.tm_mday
+             && lt->tm_hour == tm.tm_hour
+             && lt->tm_min == tm.tm_min
+             && lt->tm_sec == tm.tm_sec
+             && lt->tm_yday == tm.tm_yday
+             && lt->tm_wday == tm.tm_wday
+             && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+                  == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+        return 0;
+    }
+  return 1;
 }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv_lib_socket="-lnetwork"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-           if test -z "$gl_cv_lib_socket"; then
-             LIBS="$gl_save_LIBS -lnet"
-             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
+
+static int
+year_2050_test ()
+{
+  /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+     ignoring leap seconds.  */
+  unsigned long int answer = 2527315200UL;
+
+  struct tm tm;
+  time_t t;
+  tm.tm_year = 2050 - 1900;
+  tm.tm_mon = 2 - 1;
+  tm.tm_mday = 1;
+  tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  t = mktime (&tm);
+
+  /* Check that the result is either a failure, or close enough
+     to the correct answer that we can assume the discrepancy is
+     due to leap seconds.  */
+  return (t == (time_t) -1
+          || (0 < t && answer - 120 <= t && t <= answer + 120));
+}
+
 int
-main (void)
+main ()
 {
-setsockopt();
-  ;
-  return 0;
+  int result = 0;
+  time_t t, delta;
+  int i, j;
+  int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
+
+#if HAVE_DECL_ALARM
+  /* This test makes some buggy mktime implementations loop.
+     Give up after 60 seconds; a mktime slower than that
+     isn't worth using anyway.  */
+  signal (SIGALRM, SIG_DFL);
+  alarm (60);
+#endif
+
+  time_t_max = (! TIME_T_IS_SIGNED
+                ? (time_t) -1
+                : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
+                   * 2 + 1));
+  time_t_min = (! TIME_T_IS_SIGNED
+                ? (time_t) 0
+                : time_t_signed_magnitude
+                ? ~ (time_t) 0
+                : ~ time_t_max);
+
+  delta = time_t_max / 997; /* a suitable prime number */
+  for (i = 0; i < N_STRINGS; i++)
+    {
+      if (tz_strings[i])
+        putenv (tz_strings[i]);
+
+      for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
+        if (! mktime_test (t))
+          result |= 1;
+      if ((result & 2) == 0
+          && ! (mktime_test ((time_t) 1)
+                && mktime_test ((time_t) (60 * 60))
+                && mktime_test ((time_t) (60 * 60 * 24))))
+        result |= 2;
+
+      for (j = 1; (result & 4) == 0; j <<= 1)
+        {
+          if (! bigtime_test (j))
+            result |= 4;
+          if (INT_MAX / 2 < j)
+            break;
+        }
+      if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
+        result |= 8;
+    }
+  if (! irix_6_4_bug ())
+    result |= 16;
+  if (! spring_forward_gap ())
+    result |= 32;
+  if (! year_2050_test ())
+    result |= 64;
+  return result;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_lib_socket="-lnet"
+  gl_cv_func_working_mktime=yes
+else $as_nop
+  gl_cv_func_working_mktime=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-           fi
-         fi
-         LIBS="$gl_save_LIBS"
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      if test -z "$gl_cv_lib_socket"; then
-        gl_cv_lib_socket="none needed"
-      fi
+
+     fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
-printf "%s\n" "$gl_cv_lib_socket" >&6; }
-    if test "$gl_cv_lib_socket" != "none needed"; then
-      LIBSOCKET="$gl_cv_lib_socket"
-    fi
-  fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
+printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
 
 
 
+  GL_GNULIB_CTIME=0
 
 
 
-  :
+  GL_GNULIB_MKTIME=0
 
 
 
+  GL_GNULIB_LOCALTIME=0
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    REPLACE_SELECT=1
-  else
+  GL_GNULIB_NANOSLEEP=0
 
-    { 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
 
-        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
+  GL_GNULIB_STRFTIME=0
 
-else
+
+
+  GL_GNULIB_STRPTIME=0
+
+
+
+  GL_GNULIB_TIMEGM=0
+
+
+
+  GL_GNULIB_TIMESPEC_GET=0
+
+
+
+  GL_GNULIB_TIME_R=0
+
+
+
+  GL_GNULIB_TIME_RZ=0
+
+
+
+  GL_GNULIB_TZSET=0
+
+
+
+  GL_GNULIB_MDA_TZSET=1
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test ${ac_cv_struct_tm+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   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 ()
+#include <time.h>
+
+int
+main (void)
 {
-  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;
+struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;
+  ;
+  return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_select_supports0=yes
-else
-  gl_cv_func_select_supports0=no
+  ac_cv_struct_tm=time.h
+else $as_nop
+  ac_cv_struct_tm=sys/time.h
 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
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+printf "%s\n" "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
 
+printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
 
 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
+ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
+#include <$ac_cv_struct_tm>
 
-        if test "$cross_compiling" = yes
+"
+if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
 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, assume the worst.
-            *)               gl_cv_func_select_detects_ebadf="guessing no" ;;
-           esac
+printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
 
 else
+  ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_tzname" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
+printf %s "checking for tzname... " >&6; }
+if test ${ac_cv_var_tzname+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   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>
+#include <time.h>
+#if !HAVE_DECL_TZNAME
+extern char *tzname[];
 #endif
-#include <unistd.h>
-#include <errno.h>
 
 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 tzname[0][0];
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_func_select_detects_ebadf=yes
-else
-  gl_cv_func_select_detects_ebadf=no
+  ac_cv_var_tzname=yes
+else $as_nop
+  ac_cv_var_tzname=no
 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_exeext conftest.$ac_ext
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
+printf "%s\n" "$ac_cv_var_tzname" >&6; }
+  if test $ac_cv_var_tzname = yes; then
 
+printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
 
-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
+fi
 
-    LIB_SELECT="$LIBSOCKET"
-  if test $REPLACE_SELECT = 1; then
-    case "$host_os" in
-      mingw*)
-                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
+"
+if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
+then :
+
+printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
+
+fi
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
+printf %s "checking for O_CLOEXEC... " >&6; }
+if test ${gl_cv_macro_O_CLOEXEC+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <fcntl.h>
+                          #ifndef O_CLOEXEC
+                            choke me;
+                          #endif
 
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
 int
-main ()
+main (void)
 {
-  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
+return O_CLOEXEC;
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-
-else
-  LIB_SELECT="$LIB_SELECT -luser32"
+  gl_cv_macro_O_CLOEXEC=yes
+else $as_nop
+  gl_cv_macro_O_CLOEXEC=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        ;;
-    esac
-  fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
+printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+printf %s "checking for promoted mode_t type... " >&6; }
+if test ${gl_cv_promoted_mode_t+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main (void)
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_promoted_mode_t='int'
+else $as_nop
+  gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
 
+printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
 
 
 
-  if test $ac_cv_have_decl_strerror_r = no; then
-    HAVE_DECL_STRERROR_R=0
-  fi
 
-  if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-      if test $gl_cv_func_strerror_r_posix_signature = yes; then
-        case "$gl_cv_func_strerror_r_works" in
-                    *no) REPLACE_STRERROR_R=1 ;;
-        esac
-      else
-                REPLACE_STRERROR_R=1
-      fi
-    else
-                  REPLACE_STRERROR_R=1
-    fi
-  fi
+    HAVE_POSIX_SIGNALBLOCKING=1;
+  HAVE_PTHREAD_SIGMASK=1;
+  HAVE_RAISE=1;
+  HAVE_SIGSET_T=1;
+  HAVE_SIGINFO_T=1;
+  HAVE_SIGACTION=1;
+  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
 
+  HAVE_SIGHANDLER_T=1;
+  REPLACE_PTHREAD_SIGMASK=0;
+  REPLACE_RAISE=0;
 
 
-ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
-if test "x$ac_cv_have_decl_snprintf" = xyes
+  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+      #include <signal.h>
+      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+      #include <sys/types.h>
+
+"
+if test "x$ac_cv_type_sigset_t" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+
+printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
+
+gl_cv_type_sigset_t=yes
+else $as_nop
+  gl_cv_type_sigset_t=no
 fi
 
-printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
+  if test $gl_cv_type_sigset_t != yes; then
+    HAVE_SIGSET_T=0
+  fi
 
 
 
+  GL_GNULIB_PTHREAD_SIGMASK=0
 
 
 
+  GL_GNULIB_RAISE=0
 
 
 
-   if false; then
-  GL_COND_LIBTOOL_TRUE=
-  GL_COND_LIBTOOL_FALSE='#'
-else
-  GL_COND_LIBTOOL_TRUE='#'
-  GL_COND_LIBTOOL_FALSE=
-fi
+  GL_GNULIB_SIGNAL_H_SIGPIPE=0
 
-  gl_cond_libtool=false
-  gl_libdeps=
-  gl_ltlibdeps=
-  gl_m4_base='m4'
 
 
+  GL_GNULIB_SIGPROCMASK=0
 
 
 
+  GL_GNULIB_SIGACTION=0
 
 
 
 
-  gl_source_base='lib'
 
 
-  if test $ac_cv_func_alloca_works = no; then
-    :
+
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_REALLOC=1
   fi
 
-  # Define an additional variable used in the Makefile substitution.
-  if test $ac_cv_working_alloca_h = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
-printf %s "checking for alloca as a compiler built-in... " >&6; }
-if test ${gl_cv_rpl_alloca+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#if defined __GNUC__ || defined _AIX || defined _MSC_VER
-        Need own alloca
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Need own alloca" >/dev/null 2>&1
+ac_fn_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_setenv" = xyes
 then :
-  gl_cv_rpl_alloca=yes
-else
-  gl_cv_rpl_alloca=no
-fi
-rm -rf conftest*
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
-printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
-    if test $gl_cv_rpl_alloca = yes; then
-
-printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
-
-      ALLOCA_H=alloca.h
-    else
-                  ALLOCA_H=
-    fi
-  else
-    ALLOCA_H=alloca.h
-  fi
-
-   if test -n "$ALLOCA_H"; then
-  GL_GENERATE_ALLOCA_H_TRUE=
-  GL_GENERATE_ALLOCA_H_FALSE='#'
-else
-  GL_GENERATE_ALLOCA_H_TRUE='#'
-  GL_GENERATE_ALLOCA_H_FALSE=
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
 
 
 
 
 
-
-
-
-  if test $ac_cv_func_btowc = no; then
-    HAVE_BTOWC=0
-  else
+  if test $ac_cv_have_decl_setenv = no; then
+    HAVE_DECL_SETENV=0
+  fi
 
 
 
 
-        { 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
 
-        if test "$cross_compiling" = yes
+  ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = xyes
 then :
+  printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
 
-           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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+fi
 
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  if (btowc ('\0') != 0)
-    return 1;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = xyes
 then :
-  gl_cv_func_btowc_nul=yes
-else
-  gl_cv_func_btowc_nul=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
+
 fi
 
 
-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}
+{ 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}
 then :
   printf %s "(cached) " >&6
-else
-
-                        case "$host_os" in
-                  # Guess no on IRIX.
-          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
-                  # Guess yes on native Windows.
-          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
-                  # Guess yes otherwise.
-          *)      gl_cv_func_btowc_eof="guessing yes" ;;
-        esac
-        if test $LOCALE_FR != none; then
-          if test "$cross_compiling" = yes
-then :
-  :
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <sys/types.h>
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
-    {
-      if (btowc (EOF) != WEOF)
-        return 1;
-    }
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1
 then :
-  gl_cv_func_btowc_eof=yes
-else
-  gl_cv_func_btowc_eof=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  ac_cv_type_uid_t=yes
+else $as_nop
+  ac_cv_type_uid_t=no
 fi
-
-        fi
+rm -rf conftest*
 
 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; }
-
-    case "$gl_cv_func_btowc_nul" in
-      *yes) ;;
-      *) REPLACE_BTOWC=1 ;;
-    esac
-    case "$gl_cv_func_btowc_eof" in
-      *yes) ;;
-      *) REPLACE_BTOWC=1 ;;
-    esac
-  fi
-
-  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
-
-
-
-
-
-
+{ 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
 
-  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
 
+printf "%s\n" "#define gid_t int" >>confdefs.h
 
-  :
+fi
 
-  fi
 
 
 
 
 
-          GNULIB_BTOWC=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
 
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_signal_h='<'signal.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+printf %s "checking absolute name of <signal.h>... " >&6; }
+if test ${gl_cv_next_signal_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
-printf %s "checking for __builtin_expect... " >&6; }
-if test ${gl_cv___builtin_expect+y}
-then :
-  printf %s "(cached) " >&6
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-         int
-         main (int argc, char **argv)
-         {
-           argc = __builtin_expect (argc, 100);
-           return argv[argc != 100][0];
-         }
+#include <signal.h>
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv___builtin_expect=yes
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-             #include <builtins.h>
-             int
-             main (int argc, char **argv)
-             {
-               argc = __builtin_expect (argc, 100);
-               return argv[argc != 100][0];
-             }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  gl_cv___builtin_expect="in <builtins.h>"
-else
-  gl_cv___builtin_expect=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
-printf "%s\n" "$gl_cv___builtin_expect" >&6; }
-  if test "$gl_cv___builtin_expect" = yes; then
-    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'signal.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
+    }'
 
-  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
-    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
+        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-  fi
+           gl_header=$gl_cv_absolute_signal_h
+           gl_cv_next_signal_h='"'$gl_header'"'
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+printf "%s\n" "$gl_cv_next_signal_h" >&6; }
+     fi
+     NEXT_SIGNAL_H=$gl_cv_next_signal_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='<'signal.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_signal_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
 
 
 
-   # for STACK_DIRECTION
 
 
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
+  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
 
-   ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
 "
-if test "x$ac_cv_have_decl_sigaltstack" = xyes
+if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+
+else $as_nop
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
 fi
 
-printf "%s\n" "#define HAVE_DECL_SIGALTSTACK $ac_have_decl" >>confdefs.h
 
 
 
 
-   ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
-"
-if test "x$ac_cv_type_stack_t" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STACK_T 1" >>confdefs.h
 
+  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
 
-fi
+"
+if test "x$ac_cv_type_sighandler_t" = xyes
+then :
 
+else $as_nop
+  HAVE_SIGHANDLER_T=0
+fi
 
-      if test "$gl_cv_lib_sigsegv" = yes \
-       && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
-     LIBCSTACK=$LIBSIGSEGV
 
-     LTLIBCSTACK=$LTLIBSIGSEGV
 
-   fi
 
 
 
 
 
 
-  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
-  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
 
-  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
-  # programs in the package would end up linked with that potentially-shared
-  # library, inducing unnecessary run-time overhead.
-  LIB_CLOCK_GETTIME=
 
-  gl_saved_libs=$LIBS
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
-printf %s "checking for library containing clock_gettime... " >&6; }
-if test ${ac_cv_search_clock_gettime+y}
+{ 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
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
+             #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)
 {
-return clock_gettime ();
+
+             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
-for ac_lib in '' rt posix4
-do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_search_clock_gettime=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test ${ac_cv_search_clock_gettime+y}
-then :
-  break
-fi
-done
-if test ${ac_cv_search_clock_gettime+y}
+if ac_fn_c_try_compile "$LINENO"
 then :
-
-else
-  ac_cv_search_clock_gettime=no
+  ac_cv_header_stdbool_h=yes
+else $as_nop
+  ac_cv_header_stdbool_h=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
-printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
-ac_res=$ac_cv_search_clock_gettime
-if test "$ac_res" != no
+{ 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 :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  test "$ac_cv_search_clock_gettime" = "none required" ||
-                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
-fi
 
-    ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-if test "x$ac_cv_func_clock_gettime" = xyes
-then :
-  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
 
-fi
-ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
-if test "x$ac_cv_func_clock_settime" = xyes
-then :
-  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
 
 fi
 
-  LIBS=$gl_saved_libs
-
-
-
-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
+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 :
-  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
-
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 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 = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
-
-  fi
-
-
-
-
-
-          GNULIB_CLOSE=1
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
-
-
+printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
 
 
 
 
+  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
 
 
 
@@ -20007,20 +20791,20 @@ printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_ctype_h='<'ctype.h'>'
+       gl_cv_next_stdio_h='<'stdio.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
-printf %s "checking absolute name of <ctype.h>... " >&6; }
-if test ${gl_cv_next_ctype_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+printf %s "checking absolute name of <stdio.h>... " >&6; }
+if test ${gl_cv_next_stdio_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <ctype.h>
+#include <stdio.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -20036,7 +20820,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'ctype.h' \
+  gl_header_literal_regex=`echo 'stdio.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/
@@ -20045,218 +20829,77 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_ctype_h
-           gl_cv_next_ctype_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_stdio_h
+           gl_cv_next_stdio_h='"'$gl_header'"'
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
-printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
      fi
-     NEXT_CTYPE_H=$gl_cv_next_ctype_h
+     NEXT_STDIO_H=$gl_cv_next_stdio_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='<'ctype.h'>'
+       gl_next_as_first_directive='<'stdio.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_ctype_h
+       gl_next_as_first_directive=$gl_cv_next_stdio_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
-
-
-
-
-
-
-
-
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
-printf %s "checking whether // is distinct from /... " >&6; }
-if test ${gl_cv_double_slash_root+y}
-then :
-  printf %s "(cached) " >&6
-else
-   if test x"$cross_compiling" = xyes ; then
-        # When cross-compiling, there is no way to tell whether // is special
-        # short of a list of hosts.  However, the only known hosts to date
-        # that have a distinct // are Apollo DomainOS (too old to port to),
-        # Cygwin, and z/OS.  If anyone knows of another system for which // has
-        # special semantics and is distinct from /, please report it to
-        # <bug-gnulib@gnu.org>.
-        case $host in
-          *-cygwin | i370-ibm-openedition)
-            gl_cv_double_slash_root=yes ;;
-          *)
-            # Be optimistic and assume that / and // are the same when we
-            # don't know.
-            gl_cv_double_slash_root='unknown, assuming no' ;;
-        esac
-      else
-        set x `ls -di / // 2>/dev/null`
-        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
-          gl_cv_double_slash_root=no
-        else
-          gl_cv_double_slash_root=yes
-        fi
-      fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
-printf "%s\n" "$gl_cv_double_slash_root" >&6; }
-  if test "$gl_cv_double_slash_root" = yes; then
-
-printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
-
-  fi
-
-
-
+     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
 
 
 
-printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
 
 
-  if test $HAVE_DUP2 = 1; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
-printf %s "checking whether dup2 works... " >&6; }
-if test ${gl_cv_func_dup2_works+y}
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
+printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
+if test ${gl_cv_func_printf_attribute_flavor+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-           mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works="guessing no" ;;
-           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works="guessing no" ;;
-           aix* | freebsd*)
-                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
-                   # not EBADF.
-             gl_cv_func_dup2_works="guessing no" ;;
-           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *-android*) # implemented using dup3(), which fails if oldfd == newfd
-             gl_cv_func_dup2_works="guessing no" ;;
-           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *) gl_cv_func_dup2_works="guessing yes" ;;
-         esac
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-         #include <errno.h>
-             #include <fcntl.h>
-             #include <limits.h>
-             #include <sys/resource.h>
-             #include <unistd.h>
-             #ifndef RLIM_SAVED_CUR
-             # define RLIM_SAVED_CUR RLIM_INFINITY
-             #endif
-             #ifndef RLIM_SAVED_MAX
-             # define RLIM_SAVED_MAX RLIM_INFINITY
-             #endif
+       #define __STDC_FORMAT_MACROS 1
+       #include <stdio.h>
+       #include <inttypes.h>
+       /* For non-mingw systems, compilation will trivially succeed.
+          For mingw, compilation will succeed for older mingw (system
+          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+       #if (defined _WIN32 && ! defined __CYGWIN__) && \
+         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+       #endif
 
 int
 main (void)
 {
-int result = 0;
-             int bad_fd = INT_MAX;
-             struct rlimit rlim;
-             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
-                 && rlim.rlim_cur != RLIM_INFINITY
-                 && rlim.rlim_cur != RLIM_SAVED_MAX
-                 && rlim.rlim_cur != RLIM_SAVED_CUR)
-               bad_fd = rlim.rlim_cur;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
-                 result |= 1;
-             #endif
-             if (dup2 (1, 1) != 1)
-               result |= 2;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
-                 result |= 4;
-             #endif
-             close (0);
-             if (dup2 (0, 0) != -1)
-               result |= 8;
-             /* Many gnulib modules require POSIX conformance of EBADF.  */
-             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
-               result |= 16;
-             /* Flush out some cygwin core dumps.  */
-             if (dup2 (2, -1) != -1 || errno != EBADF)
-               result |= 32;
-             dup2 (2, 255);
-             dup2 (2, 256);
-             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
-             {
-               int fd = open (".", O_RDONLY);
-               if (fd == -1)
-                 result |= 64;
-               else if (dup2 (fd, fd + 1) == -1)
-                 result |= 128;
 
-               close (fd);
-             }
-             return result;
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_dup2_works=yes
-else
-  gl_cv_func_dup2_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_func_printf_attribute_flavor=system
+else $as_nop
+  gl_cv_func_printf_attribute_flavor=gnu
 fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
-printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
-    case "$gl_cv_func_dup2_works" in
-      *yes) ;;
-      *)
-        REPLACE_DUP2=1
-        ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
-if test "x$ac_cv_func_setdtablesize" = xyes
-then :
-  printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
+printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
+  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
 
-fi
+printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
 
-        ;;
-    esac
   fi
 
 
-  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
-
-
-  fi
-
-
-
-
 
-          GNULIB_DUP2=1
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
 
 
+  if test $ac_cv_have_decl_fcloseall = no; then
+    HAVE_DECL_FCLOSEALL=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 :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fcvt" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_gcvt" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
 
 
 
 
-          GNULIB_ENVIRON=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
 
 
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdlib_h='<'stdlib.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+printf %s "checking absolute name of <stdlib.h>... " >&6; }
+if test ${gl_cv_next_stdlib_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
 
 
-      { 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
   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;
-}
+#include <stdlib.h>
 _ACEOF
-if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_lib_error_at_line=yes
-else
-  ac_cv_lib_error_at_line=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-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
-
-
-
-
+                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 'stdlib.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_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+           gl_header=$gl_cv_absolute_stdlib_h
+           gl_cv_next_stdlib_h='"'$gl_header'"'
 
-  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
+     fi
+     NEXT_STDLIB_H=$gl_cv_next_stdlib_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='<'stdlib.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdlib_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
 
-  :
 
-  fi
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
 
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
 
 
 
 
 
+  if test $ac_cv_have_decl_ecvt = no; then
+    HAVE_DECL_ECVT=0
+  fi
 
+  if test $ac_cv_have_decl_fcvt = no; then
+    HAVE_DECL_FCVT=0
+  fi
 
-  if test $ac_cv_func_fcntl = no; then
+  if test $ac_cv_have_decl_gcvt = no; then
+    HAVE_DECL_GCVT=0
+  fi
 
 
+    HAVE_FFS=1;
+  HAVE_STRCASECMP=1;
+  HAVE_DECL_STRNCASECMP=1;
 
-  if test $ac_cv_func_fcntl = no; then
-    HAVE_FCNTL=0
-  else
-    REPLACE_FCNTL=1
-  fi
 
-  else
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
-printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
-if test ${gl_cv_func_fcntl_f_dupfd_works+y}
+     REPLACE_STRERROR_0=0
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
+printf %s "checking whether strerror(0) succeeds... " >&6; }
+if test ${gl_cv_func_strerror_0_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
-  case $host_os in
-            aix* | cygwin* | haiku*)
-               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
-            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
-          esac
-else
+  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" ;;
+       esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <errno.h>
-              #include <fcntl.h>
-              #include <limits.h>
-              #include <sys/resource.h>
-              #include <unistd.h>
-              #ifndef RLIM_SAVED_CUR
-              # define RLIM_SAVED_CUR RLIM_INFINITY
-              #endif
-              #ifndef RLIM_SAVED_MAX
-              # define RLIM_SAVED_MAX RLIM_INFINITY
-              #endif
+#include <string.h>
+           #include <errno.h>
 
 int
 main (void)
 {
 int result = 0;
-              int bad_fd = INT_MAX;
-              struct rlimit rlim;
-              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
-                  && rlim.rlim_cur != RLIM_INFINITY
-                  && rlim.rlim_cur != RLIM_SAVED_MAX
-                  && rlim.rlim_cur != RLIM_SAVED_CUR)
-                bad_fd = rlim.rlim_cur;
-              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
-              if (errno != EINVAL) result |= 2;
-              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
-              if (errno != EINVAL) result |= 8;
-              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
-              {
-                int fd;
-                fd = open (".", O_RDONLY);
-                if (fd == -1)
-                  result |= 16;
-                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
-                  result |= 32;
-
-                close (fd);
-              }
-              return result;
+           char *str;
+           errno = 0;
+           str = strerror (0);
+           if (!*str) result |= 1;
+           if (errno) result |= 2;
+           if (strstr (str, "nknown") || strstr (str, "ndefined"))
+             result |= 4;
+           return result;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_fcntl_f_dupfd_works=yes
-else
-  gl_cv_func_fcntl_f_dupfd_works=no
+  gl_cv_func_strerror_0_works=yes
+else $as_nop
+  gl_cv_func_strerror_0_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
-printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
-    case $gl_cv_func_fcntl_f_dupfd_works in
-      *yes) ;;
-      *)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
+  case "$gl_cv_func_strerror_0_works" in
+    *yes) ;;
+    *)
+      REPLACE_STRERROR_0=1
 
+printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
 
-  if test $ac_cv_func_fcntl = no; then
-    HAVE_FCNTL=0
-  else
-    REPLACE_FCNTL=1
-  fi
+      ;;
+  esac
 
 
-printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
- ;;
-    esac
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
-printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
-if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
+
+
+
+
+
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
+printf %s "checking for strerror_r with POSIX signature... " >&6; }
+if test ${gl_cv_func_strerror_r_posix_signature+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <fcntl.h>
-#ifndef F_DUPFD_CLOEXEC
-choke me
-#endif
+#include <string.h>
+                int strerror_r (int, char *, size_t);
 
 int
 main (void)
@@ -20485,83 +21138,155 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
+  gl_cv_func_strerror_r_posix_signature=yes
+else $as_nop
+  gl_cv_func_strerror_r_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+                                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
+printf %s "checking whether strerror_r works... " >&6; }
+if test ${gl_cv_func_strerror_r_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+
+              case "$host_os" in
+                       # Guess no on AIX.
+                aix*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on HP-UX.
+                hpux*) gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on BSD variants.
+                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess yes otherwise.
+                *)     gl_cv_func_strerror_r_works="guessing yes";;
+              esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#ifdef __linux__
-/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
-   it to support the semantics on older kernels that failed with EINVAL.  */
-choke me
-#endif
+#include <errno.h>
+                  #include <string.h>
 
 int
 main (void)
 {
+int result = 0;
+                  char buf[79];
+                  if (strerror_r (EACCES, buf, 0) < 0)
+                    result |= 1;
+                  errno = 0;
+                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
+                    result |= 2;
+                  strcpy (buf, "Unknown");
+                  if (strerror_r (0, buf, sizeof buf) != 0)
+                    result |= 4;
+                  if (errno)
+                    result |= 8;
+                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
+                    result |= 0x10;
+                  errno = 0;
+                  *buf = 0;
+                  if (strerror_r (-3, buf, sizeof buf) < 0)
+                    result |= 0x20;
+                  if (errno)
+                    result |= 0x40;
+                  if (!*buf)
+                    result |= 0x80;
+                  return result;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_fcntl_f_dupfd_cloexec=yes
-else
-  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  gl_cv_func_fcntl_f_dupfd_cloexec=no
+  gl_cv_func_strerror_r_works=yes
+else $as_nop
+  gl_cv_func_strerror_r_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
-printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
-    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
-
-
-
-  if test $ac_cv_func_fcntl = no; then
-    HAVE_FCNTL=0
-  else
-    REPLACE_FCNTL=1
-  fi
 
-          fi
-  fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
+      else
 
-  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+                        if test $ac_cv_func___xpg_strerror_r = yes; then
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
+printf %s "checking whether __xpg_strerror_r works... " >&6; }
+if test ${gl_cv_func_strerror_r_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
 
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+                    #include <string.h>
+                    extern
+                    #ifdef __cplusplus
+                    "C"
+                    #endif
+                    int __xpg_strerror_r(int, char *, size_t);
 
+int
+main (void)
+{
+int result = 0;
+                    char buf[256] = "^";
+                    char copy[256];
+                    char *str = strerror (-1);
+                    strcpy (copy, str);
+                    if (__xpg_strerror_r (-2, buf, 1) == 0)
+                      result |= 1;
+                    if (*buf)
+                      result |= 2;
+                    __xpg_strerror_r (-2, buf, 256);
+                    if (strcmp (str, copy))
+                      result |= 4;
+                    return result;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_strerror_r_works=yes
+else $as_nop
+  gl_cv_func_strerror_r_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
-
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
+        fi
+      fi
+    fi
   fi
 
 
 
 
 
-          GNULIB_FCNTL=1
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
-
-
-
-
-
-
-
-
 
 
 
@@ -20569,20 +21294,20 @@ printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_fcntl_h='<'fcntl.h'>'
+       gl_cv_next_string_h='<'string.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
-printf %s "checking absolute name of <fcntl.h>... " >&6; }
-if test ${gl_cv_next_fcntl_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+printf %s "checking absolute name of <string.h>... " >&6; }
+if test ${gl_cv_next_string_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <fcntl.h>
+#include <string.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -20598,7 +21323,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'fcntl.h' \
+  gl_header_literal_regex=`echo 'string.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/
@@ -20607,28 +21332,27 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_fcntl_h
-           gl_cv_next_fcntl_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_string_h
+           gl_cv_next_string_h='"'$gl_header'"'
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
-printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+printf "%s\n" "$gl_cv_next_string_h" >&6; }
      fi
-     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+     NEXT_STRING_H=$gl_cv_next_string_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='<'fcntl.h'>'
+       gl_next_as_first_directive='<'string.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_fcntl_h
+       gl_next_as_first_directive=$gl_cv_next_string_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
-
+     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
 
 
 
@@ -20646,183 +21370,123 @@ printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
 
 
 
-printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
 
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
-printf %s "checking for flexible array member... " >&6; }
-if test ${ac_cv_c_flexmember+y}
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_strings_h='<'strings.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
+printf %s "checking absolute name of <strings.h>... " >&6; }
+if test ${gl_cv_next_strings_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_strings_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-            #include <stdio.h>
-            #include <stddef.h>
-            struct m { struct m *next, **list; char name[]; };
-            struct s { struct s *p; struct m *m; int n; double d[]; };
-int
-main (void)
-{
-int m = getchar ();
-            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
-            nbytes += sizeof (struct s) - 1;
-            nbytes -= nbytes % sizeof (struct s);
-            struct s *p = malloc (nbytes);
-            p->p = p;
-            p->m = NULL;
-            p->d[0] = 0.0;
-            return p->d != (double *) NULL;
-  ;
-  return 0;
-}
+#include <strings.h>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_c_flexmember=yes
-else
-  ac_cv_c_flexmember=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                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 'strings.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_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_strings_h
+           gl_cv_next_strings_h='"'$gl_header'"'
+          else
+               gl_cv_next_strings_h='<'strings.h'>'
+             fi
+
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
-printf "%s\n" "$ac_cv_c_flexmember" >&6; }
-  if test $ac_cv_c_flexmember = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
+printf "%s\n" "$gl_cv_next_strings_h" >&6; }
+     fi
+     NEXT_STRINGS_H=$gl_cv_next_strings_h
 
-printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.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='<'strings.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_strings_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
 
-  else
-    printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
 
+
+
+  if test $ac_cv_header_strings_h = yes; then
+    HAVE_STRINGS_H=1
+  else
+    HAVE_STRINGS_H=0
   fi
 
 
 
 
-  FLOAT_H=
-  REPLACE_FLOAT_LDBL=0
-  case "$host_os" in
-    aix* | beos* | openbsd* | mirbsd* | irix*)
-      FLOAT_H=float.h
-      ;;
-    freebsd* | dragonfly*)
-      case "$host_cpu" in
-        i[34567]86 )
-          FLOAT_H=float.h
-          ;;
-        x86_64 )
-          # On x86_64 systems, the C compiler may still be generating
-          # 32-bit code.
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __LP64__ || defined __x86_64__ || defined __amd64__
-                  int ok;
-                 #else
-                  error fail
-                 #endif
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
 
-else
-  FLOAT_H=float.h
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-          ;;
-      esac
-      ;;
-    linux*)
-      case "$host_cpu" in
-        powerpc*)
-          FLOAT_H=float.h
-          ;;
-      esac
-      ;;
-  esac
-  case "$host_os" in
-    aix* | freebsd* | dragonfly* | linux*)
-      if test -n "$FLOAT_H"; then
-        REPLACE_FLOAT_LDBL=1
-      fi
-      ;;
-  esac
 
-    REPLACE_ITOLD=0
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
-printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
-if test ${gl_cv_func_itold_works+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-      if test "$cross_compiling" = yes
-then :
-  case "$host" in
-           sparc*-*-linux*)
-             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined __LP64__ || defined __arch64__
-                    int ok;
-                   #else
-                    error fail
-                   #endif
+  GL_GNULIB_FFS=0
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+
+
+ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strnlen" = xyes
 then :
-  gl_cv_func_itold_works="guessing no"
-else
-  gl_cv_func_itold_works="guessing yes"
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-             ;;
-                   # Guess yes on native Windows.
-           mingw*) gl_cv_func_itold_works="guessing yes" ;;
-           *)      gl_cv_func_itold_works="guessing yes" ;;
-         esac
+printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int i = -1;
-volatile long double ld;
-int main ()
-{
-  ld += i * 1.0L;
-  if (ld > 0)
-    return 1;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+
+ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strtoimax" = xyes
 then :
-  gl_cv_func_itold_works=yes
-else
-  gl_cv_func_itold_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
+
+
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
-printf "%s\n" "$gl_cv_func_itold_works" >&6; }
-  case "$gl_cv_func_itold_works" in
-    *no)
-      REPLACE_ITOLD=1
-                  FLOAT_H=float.h
-      ;;
-  esac
 
-  if test -n "$FLOAT_H"; then
 
 
 
@@ -20832,20 +21496,23 @@ printf "%s\n" "$gl_cv_func_itold_works" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_float_h='<'float.h'>'
+       gl_cv_next_sys_random_h='<'sys/random.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
-printf %s "checking absolute name of <float.h>... " >&6; }
-if test ${gl_cv_next_float_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
+printf %s "checking absolute name of <sys/random.h>... " >&6; }
+if test ${gl_cv_next_sys_random_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_sys_random_h = yes; then
+
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <float.h>
+#include <sys/random.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -20861,7 +21528,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'float.h' \
+  gl_header_literal_regex=`echo 'sys/random.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/
@@ -20870,44 +21537,46 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_float_h
-           gl_cv_next_float_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_sys_random_h
+           gl_cv_next_sys_random_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_random_h='<'sys/random.h'>'
+             fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
-printf "%s\n" "$gl_cv_next_float_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
+printf "%s\n" "$gl_cv_next_sys_random_h" >&6; }
      fi
-     NEXT_FLOAT_H=$gl_cv_next_float_h
+     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_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='<'float.h'>'
+       gl_next_as_first_directive='<'sys/random.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_float_h
+       gl_next_as_first_directive=$gl_cv_next_sys_random_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_sys_random_h = yes; then
+    HAVE_SYS_RANDOM_H=1
+  else
+    HAVE_SYS_RANDOM_H=0
   fi
 
-   if test -n "$FLOAT_H"; then
-  GL_GENERATE_FLOAT_H_TRUE=
-  GL_GENERATE_FLOAT_H_FALSE='#'
-else
-  GL_GENERATE_FLOAT_H_TRUE='#'
-  GL_GENERATE_FLOAT_H_FALSE=
-fi
 
 
+  if test $ac_cv_header_sys_random_h = yes; then
+    UNISTD_H_HAVE_SYS_RANDOM_H=1
+  fi
 
-  if test $REPLACE_FLOAT_LDBL = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
 
-  fi
-  if test $REPLACE_ITOLD = 1; then
 
 
 
 
 
 
+printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
 
-  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
 
-  fi
 
 
 
 
-  gl_fnmatch_required_lowercase=`
-    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
-  `
 
-  if test $ac_cv_func_fnmatch = no; then
-    HAVE_FNMATCH=0
-  else
-    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
-printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
-if eval test \${$gl_fnmatch_cache_var+y}
-then :
-  printf %s "(cached) " >&6
-else
-                                     if test $gl_fnmatch_required = GNU; then
-         gl_fnmatch_gnu_start=
-         gl_fnmatch_gnu_end=
-       else
-         gl_fnmatch_gnu_start='#if 0'
-         gl_fnmatch_gnu_end='#endif'
-       fi
-       if test "$cross_compiling" = yes
-then :
-  eval "$gl_fnmatch_cache_var=\"guessing no\""
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <fnmatch.h>
-              static int
-              y (char const *pattern, char const *string, int flags)
-              {
-                return fnmatch (pattern, string, flags) == 0;
-              }
-              static int
-              n (char const *pattern, char const *string, int flags)
-              {
-                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
-              }
 
-int
-main (void)
-{
-char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
-              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
-              static char const A_1[] = { 'A' - 1, 0 };
-              static char const A01[] = { 'A' + 1, 0 };
-              static char const a_1[] = { 'a' - 1, 0 };
-              static char const a01[] = { 'a' + 1, 0 };
-              static char const bs_1[] = { '\\\\' - 1, 0 };
-              static char const bs01[] = { '\\\\' + 1, 0 };
-              int result = 0;
-              if (!n ("a*", "", 0))
-                return 1;
-              if (!y ("a*", "abc", 0))
-                return 1;
-              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
-                return 1;
-              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
-                return 2;
-              if (!y ("a\\\\bc", "abc", 0))
-                return 3;
-              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
-                return 3;
-              if (!y ("*x", ".x", 0))
-                return 4;
-              if (!n ("*x", ".x", FNM_PERIOD))
-                return 4;
-              if (!y (Apat, "\\\\", 0))
-                return 5;
-              if (!y (Apat, "A", 0))
-                return 5;
-              if (!y (apat, "\\\\", 0))
-                return 5;
-              if (!y (apat, "a", 0))
-                return 5;
-              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
-                return 5;
-              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
-                return 5;
-              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
-                return 5;
-              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
-                return 5;
-              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
-                return 5;
-              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
-                return 5;
-              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
-                return 5;
-              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
-                return 5;
-              $gl_fnmatch_gnu_start
-              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
-                result |= 8;
-              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
-                result |= 16;
-              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
-                result |= 32;
-              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
-                result |= 64;
-              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
-                result |= 64;
-              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
-                result |= 64;
-              $gl_fnmatch_gnu_end
-              return result;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_types_h='<'sys/types.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
+printf %s "checking absolute name of <sys/types.h>... " >&6; }
+if test ${gl_cv_next_sys_types_h+y}
 then :
-  eval "$gl_fnmatch_cache_var=yes"
-else
-  eval "$gl_fnmatch_cache_var=no"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  printf %s "(cached) " >&6
+else $as_nop
 
 
-fi
-eval ac_res=\$$gl_fnmatch_cache_var
-              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-printf "%s\n" "$ac_res" >&6; }
-    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
-    if test "$gl_fnmatch_result" != yes; then
-      REPLACE_FNMATCH=1
-    fi
-  fi
-  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-  FNMATCH_H='fnmatch.h'
-   if test -n "$FNMATCH_H"; then
-  GL_GENERATE_FNMATCH_H_TRUE=
-  GL_GENERATE_FNMATCH_H_FALSE='#'
-else
-  GL_GENERATE_FNMATCH_H_TRUE='#'
-  GL_GENERATE_FNMATCH_H_FALSE=
-fi
+  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/types.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_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-  fi
+           gl_header=$gl_cv_absolute_sys_types_h
+           gl_cv_next_sys_types_h='"'$gl_header'"'
 
-  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
+printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
+     fi
+     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_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/types.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
 
 
 
-  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
-"
-if test "x$ac_cv_have_decl_isblank" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
 
 
+    WINDOWS_STAT_INODES=0
 
 
-  fi
 
 
 
 
 
-          GNULIB_FNMATCH=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
 
 
 
@@ -21129,182 +21697,299 @@ printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
 
 
 
-  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
-
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+printf %s "checking absolute name of <sys/wait.h>... " >&6; }
+if test ${gl_cv_next_sys_wait_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+             if test $ac_cv_header_sys_wait_h = yes; then
 
 
 
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/wait.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/wait.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_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
+        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+           gl_header=$gl_cv_absolute_sys_wait_h
+           gl_cv_next_sys_wait_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+             fi
 
 
-  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
-"
-if test "x$ac_cv_have_decl_isblank" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
+     fi
+     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
 
-printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.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/wait.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
 
 
 
 
-  fi
 
 
-printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
 
 
 
 
 
 
-  case "$host_os" in
-    mingw* | pw* | os2*)
-      REPLACE_FREOPEN=1
-      ;;
-    *)
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
-printf %s "checking whether freopen works on closed fds... " >&6; }
-if test ${gl_cv_func_freopen_works_on_closed+y}
+
+  GL_GNULIB_WAITPID=0
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+printf %s "checking for struct timespec in <time.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_time_h+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case $host_os in
-              *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
-              *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
-            esac
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdio.h>
-                #include <unistd.h>
+#include <time.h>
 
 int
 main (void)
 {
-close (0);
-                return !(freopen ("/dev/null", "r", stdin)
-                         && getchar () == EOF
-                         && !ferror (stdin) && feof (stdin));
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_freopen_works_on_closed=yes
-else
-  gl_cv_func_freopen_works_on_closed=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_sys_struct_timespec_in_time_h=yes
+else $as_nop
+  gl_cv_sys_struct_timespec_in_time_h=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
-printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
-      case $gl_cv_func_freopen_works_on_closed in
-        *no) REPLACE_FREOPEN=1;;
-      esac
-  esac
-
-  if test $REPLACE_FREOPEN = 1; then
-
-
-
-
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
 
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
 
+int
+main (void)
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else $as_nop
+  gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
+printf %s "checking for struct timespec in <pthread.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
 
-  gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
+int
+main (void)
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_sys_struct_timespec_in_pthread_h=yes
+else $as_nop
+  gl_cv_sys_struct_timespec_in_pthread_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
+printf %s "checking for struct timespec in <unistd.h>... " >&6; }
+if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
 
-    :
+int
+main (void)
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_sys_struct_timespec_in_unistd_h=yes
+else $as_nop
+  gl_cv_sys_struct_timespec_in_unistd_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
+printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
+        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
+        fi
+      fi
+    fi
   fi
 
 
 
 
 
-          GNULIB_FREOPEN=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
-
 
 
 
 
-printf "%s\n" "#define GNULIB_FREOPEN_SAFER 1" >>confdefs.h
 
 
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_time_h='<'time.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+printf %s "checking absolute name of <time.h>... " >&6; }
+if test ${gl_cv_next_time_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
 
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
   case "$host_os" in
-    mingw* | solaris*)
-                        REPLACE_FSTAT=1
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
       ;;
   esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'time.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_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-
-  if test $REPLACE_FSTAT = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
-
-    case "$host_os" in
-      mingw*)
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
-
-        ;;
-    esac
-
-
-  :
-
-  fi
-
-
-
-
-
-          GNULIB_FSTAT=1
-
-
+           gl_header=$gl_cv_absolute_time_h
+           gl_cv_next_time_h='"'$gl_header'"'
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+printf "%s\n" "$gl_cv_next_time_h" >&6; }
+     fi
+     NEXT_TIME_H=$gl_cv_next_time_h
 
-printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.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='<'time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
 
 
 
@@ -21313,131 +21998,144 @@ printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
 
 
 
-  if test $ac_cv_func_getdtablesize = yes &&
-     test $ac_cv_have_decl_getdtablesize = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
-printf %s "checking whether getdtablesize works... " >&6; }
-if test ${gl_cv_func_getdtablesize_works+y}
+  { 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}
 then :
   printf %s "(cached) " >&6
-else
-                                                   case "$host_os" in
-         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
-         *)
-                                                       if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
-                  gl_cv_func_getdtablesize_works="guessing no" ;;
-                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
-              esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <time.h>
 
-             #include <unistd.h>
 int
 main (void)
 {
-int size = getdtablesize();
-                if (dup2 (0, getdtablesize()) != -1)
-                  return 1;
-                if (size != getdtablesize())
-                  return 2;
-
+static int x = TIME_UTC; x++;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_getdtablesize_works=yes
-else
-  gl_cv_func_getdtablesize_works=no
+  gl_cv_time_h_has_TIME_UTC=yes
+else $as_nop
+  gl_cv_time_h_has_TIME_UTC=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-           ;;
-       esac
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
-printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
-    case "$gl_cv_func_getdtablesize_works" in
-      *yes | "no (limitation)") ;;
-      *) REPLACE_GETDTABLESIZE=1 ;;
-    esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
+printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
+  if test $gl_cv_time_h_has_TIME_UTC = yes; then
+    TIME_H_DEFINES_TIME_UTC=1
   else
-    HAVE_GETDTABLESIZE=0
+    TIME_H_DEFINES_TIME_UTC=0
   fi
 
-  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
-
-
-
 
 
 
+ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_execvpe" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_GETDTABLESIZE=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_unistd_h='<'unistd.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+printf %s "checking absolute name of <unistd.h>... " >&6; }
+if test ${gl_cv_next_unistd_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+             if test $ac_cv_header_unistd_h = yes; then
 
 
 
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.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 'unistd.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_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+           gl_header=$gl_cv_absolute_unistd_h
+           gl_cv_next_unistd_h='"'$gl_header'"'
+          else
+               gl_cv_next_unistd_h='<'unistd.h'>'
+             fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
+     fi
+     NEXT_UNISTD_H=$gl_cv_next_unistd_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='<'unistd.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_unistd_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
 
-    REPLACE_GETOPT=0
-    if test -n "$gl_replace_getopt"; then
-      REPLACE_GETOPT=1
-    fi
 
-  if test $REPLACE_GETOPT = 1; then
 
 
-  if test $ac_cv_header_sys_cdefs_h = yes; then
-    HAVE_SYS_CDEFS_H=1
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
   else
-    HAVE_SYS_CDEFS_H=0
+    HAVE_UNISTD_H=0
   fi
 
 
 
-printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
-
-  GETOPT_H=getopt.h
-  GETOPT_CDEFS_H=getopt-cdefs.h
-
 
 
-  fi
-
-  if test $REPLACE_GETOPT = 1; then
-
 
 
 
@@ -21445,8 +22143,10 @@ printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
 
+  if test $ac_cv_have_decl_execvpe = no; then
+    HAVE_DECL_EXECVPE=0
+  fi
 
 
 
@@ -21454,224 +22154,368 @@ printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
 
 
 
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
 
-  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
 
-        GNULIB_GL_UNISTD_H_GETOPT=1
+  if test "$HAVE_LIBUNISTRING" = yes; then
+    LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
+    LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
+    LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
   fi
 
+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 :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
 
-
-
-  ac_found=0
-  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
-"
-if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_feof_unlocked" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
-if test $ac_have_decl = 1
+ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
 then :
-  ac_found=1
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
 
-  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
-"
-if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
-if test $ac_have_decl = 1
+ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
 then :
-  ac_found=1
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
 
-  ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
-"
-if test "x$ac_cv_have_decl___argv" = xyes
+ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
-if test $ac_have_decl = 1
+ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
 then :
-  ac_found=1
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fread_unlocked" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
 
-  # Incur the cost of this test only if none of the above worked.
-  if test $ac_found = 0; then
-    # On OpenBSD 5.1, using the global __progname variable appears to be
-    # the only way to implement getprogname.
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
-printf %s "checking whether __progname is defined in default libraries... " >&6; }
-if test ${gl_cv_var___progname+y}
+ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
 then :
-  printf %s "(cached) " >&6
-else
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
 
-        gl_cv_var___progname=
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern char *__progname;
-int
-main (void)
-{
-return *__progname;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"
+ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getc_unlocked" = xyes
 then :
-  gl_cv_var___progname=yes
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_putc_unlocked" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
 
+ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
-printf "%s\n" "$gl_cv_var___progname" >&6; }
-    if test "$gl_cv_var___progname" = yes; then
+printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
 
-printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+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 $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
 
-    fi
-  fi
 
 
 
 
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
 
 
 
+  { 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 $as_nop
+  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 $as_nop
+  gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+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 $as_nop
+  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 $as_nop
+  gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+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
 
-  gl_gettimeofday_timezone=void
-  if test $ac_cv_func_gettimeofday != yes; then
-    HAVE_GETTIMEOFDAY=0
-  else
+  fi
 
 
 
 
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
-printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
-if test ${gl_cv_func_gettimeofday_clobber+y}
 { 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
-  if test "$cross_compiling" = yes
-then :
-  # When cross-compiling:
-      case "$host_os" in
-                       # Guess all is fine on glibc systems.
-        *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # Guess no on native Windows.
-        mingw*)        gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # If we don't know, assume the worst.
-        *)             gl_cv_func_gettimeofday_clobber="guessing yes" ;;
-      esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
-          #include <sys/time.h>
-          #include <time.h>
-          #include <stdlib.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)
 {
-
-          time_t t = 0;
-          struct tm *lt;
-          struct tm saved_lt;
-          struct timeval tv;
-          lt = localtime (&t);
-          saved_lt = *lt;
-          gettimeofday (&tv, NULL);
-          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
-
+intmax_t x = -1; return !x;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_gettimeofday_clobber=no
-else
-  gl_cv_func_gettimeofday_clobber=yes
+  gt_cv_c_intmax_t=yes
+else $as_nop
+  gt_cv_c_intmax_t=no
 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
 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
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
-printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
+printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
 
- case "$gl_cv_func_gettimeofday_clobber" in
-   *yes)
-     REPLACE_GETTIMEOFDAY=1
+  else
 
-printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+printf "%s\n" "#define intmax_t long long" >>confdefs.h
 
+  fi
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+printf %s "checking where to find the exponent in a 'double'... " >&6; }
+if test ${gl_cv_cc_double_expbit0+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  NEED_LOCALTIME_BUFFER=1
-  REPLACE_GMTIME=1
-  REPLACE_LOCALTIME=1
+      if test "$cross_compiling" = yes
+then :
 
-     ;;
- esac
+                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
-printf %s "checking for gettimeofday with POSIX signature... " >&6; }
-if test ${gl_cv_func_gettimeofday_posix_signature+y}
+#if defined arm || defined __arm || defined __arm__
+  mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "mixed_endianness" >/dev/null 2>&1
+then :
+  gl_cv_cc_double_expbit0="unknown"
+else $as_nop
+
+                                                         :
+if test ${ac_cv_c_bigendian+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.h>
-              struct timeval c;
-              int gettimeofday (struct timeval *restrict, void *restrict);
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
 
 int
 main (void)
 {
-/* glibc uses struct timezone * rather than the POSIX void *
-                 if _GNU_SOURCE is defined.  However, since the only portable
-                 use of gettimeofday uses NULL as the second parameter, and
-                 since the glibc definition is actually more typesafe, it is
-                 not worth wrapping this to get a compliant signature.  */
-              int (*f) (struct timeval *restrict, void *restrict)
-                = gettimeofday;
-              int x = f (&c, 0);
-              return !(x | c.tv_sec | c.tv_usec);
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
   ;
   return 0;
@@ -21679,16 +22523,18 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_gettimeofday_posix_signature=yes
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.h>
-int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+#include <sys/types.h>
+               #include <sys/param.h>
 
 int
 main (void)
 {
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
 
   ;
   return 0;
@@ -21696,88 +22542,542 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_gettimeofday_posix_signature=almost
-else
-  gl_cv_func_gettimeofday_posix_signature=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
-printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
-    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
-      gl_gettimeofday_timezone='struct timezone'
-    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
-      REPLACE_GETTIMEOFDAY=1
-    fi
-        if test $REPLACE_STRUCT_TIMEVAL = 1; then
-      REPLACE_GETTIMEOFDAY=1
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
     fi
-            case "$host_os" in
-      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
-    esac
-  fi
-
-printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
-
-
-  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
-
-    :
-  fi
-
-
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
-          GNULIB_GETTIMEOFDAY=1
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes
+then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+unsigned short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               unsigned short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               unsigned short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               unsigned short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
 
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main (void)
+{
 
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  ac_cv_c_bigendian=no
+else $as_nop
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
+    fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+   yes)
+     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+   no)
+     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+   universal)
 
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
+     ;; #(
+   *)
+     gl_cv_cc_double_expbit0="unknown" ;;
+ esac
 
 
-   if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
-  GNU_MAKE_TRUE=
-  GNU_MAKE_FALSE='#'
-else
-  GNU_MAKE_TRUE='#'
-  GNU_MAKE_FALSE=
 fi
+rm -rf conftest*
 
 
-  # Autoconf 2.61a.99 and earlier don't support linking a file only
-  # in VPATH builds.  But since GNUmakefile is for maintainer use
-  # only, it does not matter if we skip the link with older autoconf.
-  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
-  # builds, so use a shell variable to bypass this.
-  GNUmakefile=GNUmakefile
-  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
-
-
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+  memory_double m;
+  size_t i;
+  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
+  memset (&m, 0, sizeof (memory_double));
+  m.value = x;
+  for (i = 0; i < NWORDS; i++)
+    {
+      ored_words[i] |= m.word[i];
+      anded_words[i] &= m.word[i];
+    }
+}
+int main ()
+{
+  size_t j;
+  FILE *fp = fopen ("conftest.out", "w");
+  if (fp == NULL)
+    return 1;
+  for (j = 0; j < NWORDS; j++)
+    anded_words[j] = ~ (unsigned int) 0;
+  add_to_ored_words (0.25);
+  add_to_ored_words (0.5);
+  add_to_ored_words (1.0);
+  add_to_ored_words (2.0);
+  add_to_ored_words (4.0);
+  /* Remove bits that are common (e.g. if representation of the first mantissa
+     bit is explicit).  */
+  for (j = 0; j < NWORDS; j++)
+    ored_words[j] &= ~anded_words[j];
+  /* Now find the nonzero word.  */
+  for (j = 0; j < NWORDS; j++)
+    if (ored_words[j] != 0)
+      break;
+  if (j < NWORDS)
+    {
+      size_t i;
+      for (i = j + 1; i < NWORDS; i++)
+        if (ored_words[i] != 0)
+          {
+            fprintf (fp, "unknown");
+            return (fclose (fp) != 0);
+          }
+      for (i = 0; ; i++)
+        if ((ored_words[j] >> i) & 1)
+          {
+            fprintf (fp, "word %d bit %d", (int) j, (int) i);
+            return (fclose (fp) != 0);
+          }
+    }
+  fprintf (fp, "unknown");
+  return (fclose (fp) != 0);
+}
 
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_cc_double_expbit0=`cat conftest.out`
+else $as_nop
+  gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      rm -f conftest.out
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
+  case "$gl_cv_cc_double_expbit0" in
+    word*bit*)
+      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
 
-          GNULIB_ICONV=1
+printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
 
 
+printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
 
+      ;;
+  esac
+
+
+
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
+if test ${gl_cv_func_snprintf_retval_c99+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+      if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                                 # 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";;
+                                 # 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";;
+           midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Mac OS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.10.
+           solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           solaris*)             gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_retval_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_retval_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on MSVC, no on mingw.
+           mingw*)               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _MSC_VER
+ Known
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Known" >/dev/null 2>&1
+then :
+  gl_cv_func_snprintf_retval_c99="guessing yes"
+else $as_nop
+  gl_cv_func_snprintf_retval_c99="guessing no"
+fi
+rm -rf conftest*
+
+                                 ;;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
+         esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+  va_list args;
+  int ret;
+  va_start (args, format);
+  ret = vsnprintf (buf, size, format, args);
+  va_end (args);
+  return ret;
+}
+#endif
+static char buf[100];
+int main ()
+{
+  strcpy (buf, "ABCDEF");
+  if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+    return 1;
+  if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
+    return 2;
+  if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
+    return 3;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_snprintf_retval_c99=yes
+else $as_nop
+  gl_cv_func_snprintf_retval_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+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; }
+
+
+
+
+  { 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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+      if test "$cross_compiling" = yes
+then :
+
+         case "$host_os" in
+                                 # 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";;
+                                 # 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";;
+           midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Mac OS X >= 10.3.
+           darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
+           darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OpenBSD >= 3.9.
+           openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           openbsd*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Solaris >= 2.6.
+           solaris2.[0-5] | solaris2.[0-5].*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           solaris*)             gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on AIX >= 4.
+           aix[1-3]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           aix*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on HP-UX >= 11.
+           hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+           hpux*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on IRIX >= 6.5.
+           irix6.5)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on OSF/1 >= 5.
+           osf[3-4]*)            gl_cv_func_snprintf_truncation_c99="guessing no";;
+           osf*)                 gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on NetBSD >= 3.
+           netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+                                 gl_cv_func_snprintf_truncation_c99="guessing no";;
+           netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on BeOS.
+           beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess no on native Windows.
+           mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
+         esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <string.h>
+#if HAVE_SNPRINTF
+# define my_snprintf snprintf
+#else
+# include <stdarg.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+  va_list args;
+  int ret;
+  va_start (args, format);
+  ret = vsnprintf (buf, size, format, args);
+  va_end (args);
+  return ret;
+}
+#endif
+static char buf[100];
+int main ()
+{
+  strcpy (buf, "ABCDEF");
+  my_snprintf (buf, 3, "%d %d", 4567, 89);
+  if (memcmp (buf, "45\0DEF", 6) != 0)
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_snprintf_truncation_c99=yes
+else $as_nop
+  gl_cv_func_snprintf_truncation_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
+printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
+
+
+
+
+
+  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes
+then :
+  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
+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
+then :
+  printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
+
+fi
+
+      ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl__snprintf" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
+
+
+
+  case "$gl_cv_func_snprintf_retval_c99" in
+    *yes)
+
+printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
+
+      ;;
+  esac
+
+  case "$gl_cv_func_snprintf_truncation_c99" in
+    *yes)
+
+printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
+
+      ;;
+  esac
 
 
 
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_iconv_h='<'iconv.h'>'
+       gl_cv_next_wchar_h='<'wchar.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
-printf %s "checking absolute name of <iconv.h>... " >&6; }
-if test ${gl_cv_next_iconv_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+printf %s "checking absolute name of <wchar.h>... " >&6; }
+if test ${gl_cv_next_wchar_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
-             if test $ac_cv_header_iconv_h = yes; then
+             if test $ac_cv_header_wchar_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <iconv.h>
+#include <wchar.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -21824,7 +23124,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'iconv.h' \
+  gl_header_literal_regex=`echo 'wchar.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/
@@ -21833,451 +23133,452 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_iconv_h
-           gl_cv_next_iconv_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_wchar_h
+           gl_cv_next_wchar_h='"'$gl_header'"'
           else
-               gl_cv_next_iconv_h='<'iconv.h'>'
+               gl_cv_next_wchar_h='<'wchar.h'>'
              fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
-printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
      fi
-     NEXT_ICONV_H=$gl_cv_next_iconv_h
+     NEXT_WCHAR_H=$gl_cv_next_wchar_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='<'iconv.h'>'
+       gl_next_as_first_directive='<'wchar.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_iconv_h
+       gl_next_as_first_directive=$gl_cv_next_wchar_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
-
-
-
-
-
+     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
 
 
 
 
-  if test "$am_cv_func_iconv" = yes; then
 
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
 
-  ICONV_H='iconv.h'
-   if test -n "$ICONV_H"; then
-  GL_GENERATE_ICONV_H_TRUE=
-  GL_GENERATE_ICONV_H_FALSE='#'
-else
-  GL_GENERATE_ICONV_H_TRUE='#'
-  GL_GENERATE_ICONV_H_FALSE=
-fi
 
 
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-      #include <iconv.h>
-      #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
-       gnu_iconv
-      #endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "gnu_iconv" >/dev/null 2>&1
-then :
-  gl_func_iconv_gnu=yes
-else
-  gl_func_iconv_gnu=no
-fi
-rm -rf conftest*
 
-    if test $gl_func_iconv_gnu = no; then
-      iconv_flavor=
-      case "$host_os" in
-        aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
-        irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
-        hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
-        osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
-        solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
-      esac
-      if test -n "$iconv_flavor"; then
 
-printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
 
 
 
+  ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
+      #include <wchar.h>
 
-  ICONV_H='iconv.h'
-   if test -n "$ICONV_H"; then
-  GL_GENERATE_ICONV_H_TRUE=
-  GL_GENERATE_ICONV_H_FALSE='#'
-else
-  GL_GENERATE_ICONV_H_TRUE='#'
-  GL_GENERATE_ICONV_H_FALSE=
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_wcsdup" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
 
-
-  REPLACE_ICONV_OPEN=1
-
-      fi
-    fi
-
+  if test $ac_cv_have_decl_wcsdup = no; then
+    HAVE_DECL_WCSDUP=0
   fi
 
-  if test $REPLACE_ICONV_OPEN = 1; then
-
-
 
 
 
 
 
+  { 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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  rm -f conftest*
+     echo 'int dummy;' > conftest.c
+     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+                         if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+       gl_cv_cc_wallow='-Wno-error'
+     else
+       gl_cv_cc_wallow=none
+     fi
+     rm -f conftest*
 
-  gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
-
-  fi
-  if test $REPLACE_ICONV = 1; then
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
+printf "%s\n" "$gl_cv_cc_wallow" >&6; }
+  case "$gl_cv_cc_wallow" in
+    none) GL_CFLAG_ALLOW_WARNINGS='' ;;
+    *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
+  esac
 
 
 
+    if test -n "$CXX" && test "$CXX" != no; then
+    { 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_cxx_wallow+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  rm -f conftest*
+       echo 'int dummy;' > conftest.cc
+       { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+       { ac_try='${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+                                   if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+         gl_cv_cxx_wallow='-Wno-error'
+       else
+         gl_cv_cxx_wallow=none
+       fi
+       rm -f conftest*
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cxx_wallow" >&5
+printf "%s\n" "$gl_cv_cxx_wallow" >&6; }
+    case "$gl_cv_cxx_wallow" in
+      none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
+      *)    GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
+    esac
+  else
+    GL_CXXFLAG_ALLOW_WARNINGS=''
+  fi
 
 
 
+  HAVE_STRUCT_SOCKADDR_STORAGE=1;
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
 
-  gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
+  HAVE_SA_FAMILY_T=1;
+  HAVE_ACCEPT4=1;
 
 
+   if test $ac_cv_header_sys_socket_h = no; then
+                         ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
+if test "x$ac_cv_header_ws2tcpip_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
 
+fi
 
+   fi
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
+        case "$host_os" in
+    osf*)
 
-  fi
+printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
 
+      ;;
+  esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
-printf %s "checking whether the compiler generally respects inline... " >&6; }
-if test ${gl_cv_c_inline_effective+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
+printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
+if test ${gl_cv_header_sys_socket_h_selfcontained+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test $ac_cv_c_inline = no; then
-       gl_cv_c_inline_effective=no
-     else
-                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+else $as_nop
 
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/socket.h>
 int
 main (void)
 {
-#ifdef __NO_INLINE__
-               #error "inline is not effective"
-             #endif
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_c_inline_effective=yes
-else
-  gl_cv_c_inline_effective=no
+  gl_cv_header_sys_socket_h_selfcontained=yes
+else $as_nop
+  gl_cv_header_sys_socket_h_selfcontained=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
-printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
-  if test $gl_cv_c_inline_effective = yes; then
-
-printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
-
-  fi
-
-
-
-
-  :
-
-  :
-  :
-  :
-  :
-
-
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
+printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
+  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+            ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
+if test "x$ac_cv_func_shutdown" = xyes
+then :
+  printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
 
+fi
 
+    if test $ac_cv_func_shutdown = yes; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
+printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
+if test ${gl_cv_header_sys_socket_h_shut+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  PRIPTR_PREFIX=
-  if test -n "$STDINT_H"; then
-        PRIPTR_PREFIX='"l"'
-  else
-        for glpfx in '' l ll I64; do
-      case $glpfx in
-        '')  gltype1='int';;
-        l)   gltype1='long int';;
-        ll)  gltype1='long long int';;
-        I64) gltype1='__int64';;
-      esac
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdint.h>
-           extern intptr_t foo;
-           extern $gltype1 foo;
+#include <sys/socket.h>
 int
 main (void)
 {
-
+int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  PRIPTR_PREFIX='"'$glpfx'"'
+  gl_cv_header_sys_socket_h_shut=yes
+else $as_nop
+  gl_cv_header_sys_socket_h_shut=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      test -n "$PRIPTR_PREFIX" && break
-    done
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
+printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
+      if test $gl_cv_header_sys_socket_h_shut = no; then
+        SYS_SOCKET_H='sys/socket.h'
+      fi
+    fi
   fi
+  # We need to check for ws2tcpip.h now.
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
-printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
-if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
 
-            #if defined INT32_MAX && defined INTMAX_MAX
-             #define CONDITION (INT32_MAX < INTMAX_MAX)
-            #elif HAVE_LONG_LONG_INT
-             #define CONDITION (sizeof (int) < sizeof (long long int))
-            #else
-             #define CONDITION 0
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
-else
-  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
-printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
-  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
-    INT32_MAX_LT_INTMAX_MAX=1;
-  else
-    INT32_MAX_LT_INTMAX_MAX=0;
-  fi
 
 
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
-printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
-if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
+printf %s "checking absolute name of <sys/socket.h>... " >&6; }
+if test ${gl_cv_next_sys_socket_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_sys_socket_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
+#include <sys/socket.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+  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/socket.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
+    }'
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
+        gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_sys_socket_h
+           gl_cv_next_sys_socket_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_socket_h='<'sys/socket.h'>'
+             fi
 
-            #if defined INT64_MAX
-             #define CONDITION (INT64_MAX == LONG_MAX)
-            #elif HAVE_LONG_LONG_INT
-             #define CONDITION (sizeof (long long int) == sizeof (long int))
-            #else
-             #define CONDITION 0
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
-else
-  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
-printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
-  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
-    INT64_MAX_EQ_LONG_MAX=1;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
+printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
+     fi
+     NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_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/socket.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_socket_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_SYS_SOCKET_H=1
   else
-    INT64_MAX_EQ_LONG_MAX=0;
+    HAVE_SYS_SOCKET_H=0
   fi
 
 
+
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_WS2TCPIP_H=0
   else
-    INT64_MAX_EQ_LONG_MAX=-1
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
   fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
-printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
-if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
+
+
+  ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+
+"
+if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
 
-            #if defined UINT32_MAX && defined UINTMAX_MAX
-             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
-            #elif HAVE_LONG_LONG_INT
-             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
-            #else
-             #define CONDITION 0
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main (void)
-{
+fi
+ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+"
+if test "x$ac_cv_type_sa_family_t" = xyes
 then :
-  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
-else
-  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
+
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
-printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
-  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
-    UINT32_MAX_LT_UINTMAX_MAX=1;
-  else
-    UINT32_MAX_LT_UINTMAX_MAX=0;
+
+  if test $ac_cv_type_struct_sockaddr_storage = no; then
+    HAVE_STRUCT_SOCKADDR_STORAGE=0
   fi
+  if test $ac_cv_type_sa_family_t = no; then
+    HAVE_SA_FAMILY_T=0
+  fi
+  if test $ac_cv_type_struct_sockaddr_storage != no; then
+    ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
+       #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+       #endif
+       #ifdef HAVE_WS2TCPIP_H
+       #include <ws2tcpip.h>
+       #endif
 
+"
+if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
+then :
 
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
+printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
-printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
-if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+else $as_nop
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
+fi
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
+  fi
+  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+    SYS_SOCKET_H='sys/socket.h'
+  fi
 
-            #if defined UINT64_MAX
-             #define CONDITION (UINT64_MAX == ULONG_MAX)
-            #elif HAVE_LONG_LONG_INT
-             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
-            #else
-             #define CONDITION 0
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+
+
+  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 :
-  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
-else
-  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
-printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
-  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
-    UINT64_MAX_EQ_ULONG_MAX=1;
-  else
-    UINT64_MAX_EQ_ULONG_MAX=0;
-  fi
+  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
-    UINT64_MAX_EQ_ULONG_MAX=-1
+    HAVE_WINSOCK2_H=0
   fi
 
 
@@ -22287,108 +23588,85 @@ printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
 
 
 
-  if test $ac_cv_func_isblank = no; then
-    HAVE_ISBLANK=0
-  fi
 
-  if test $HAVE_ISBLANK = 0; then
 
 
+  GL_GNULIB_SOCKET=0
 
 
 
+  GL_GNULIB_CONNECT=0
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
+  GL_GNULIB_ACCEPT=0
 
-  fi
 
 
+  GL_GNULIB_BIND=0
 
 
 
-          GNULIB_ISBLANK=1
+  GL_GNULIB_GETPEERNAME=0
 
 
 
+  GL_GNULIB_GETSOCKNAME=0
 
 
 
+  GL_GNULIB_GETSOCKOPT=0
 
 
 
-  ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-#include <wctype.h>
+  GL_GNULIB_LISTEN=0
 
-"
-if test "x$ac_cv_have_decl_iswblank" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-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
-      REPLACE_ISWBLANK=1
-    fi
-  fi
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-        :
-  else
-    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
-            :
-    fi
-  fi
+  GL_GNULIB_RECV=0
 
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-    :
-  else
-    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
 
+  GL_GNULIB_SEND=0
 
 
 
+  GL_GNULIB_RECVFROM=0
 
 
 
+  GL_GNULIB_SENDTO=0
 
-  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
 
-    fi
-  fi
 
+  GL_GNULIB_SETSOCKOPT=0
 
 
 
+  GL_GNULIB_SHUTDOWN=0
 
-          GNULIB_ISWBLANK=1
 
 
+  GL_GNULIB_ACCEPT4=0
 
 
 
-printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
 
+    HAVE_DECL_INET_NTOP=1;
+  HAVE_DECL_INET_PTON=1;
+  REPLACE_INET_NTOP=0;
+  REPLACE_INET_PTON=0;
 
 
 
 
 
 
+  if test $ac_cv_header_arpa_inet_h = yes; then
+    HAVE_ARPA_INET_H=1
+  else
+    HAVE_ARPA_INET_H=0
+  fi
 
 
 
@@ -22400,23 +23678,23 @@ printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_langinfo_h='<'langinfo.h'>'
+       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
-printf %s "checking absolute name of <langinfo.h>... " >&6; }
-if test ${gl_cv_next_langinfo_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
+printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
+if test ${gl_cv_next_arpa_inet_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
-             if test $ac_cv_header_langinfo_h = yes; then
+             if test $ac_cv_header_arpa_inet_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
+#include <arpa/inet.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -22432,7 +23710,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'langinfo.h' \
+  gl_header_literal_regex=`echo 'arpa/inet.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/
@@ -22441,817 +23719,999 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_langinfo_h
-           gl_cv_next_langinfo_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_arpa_inet_h
+           gl_cv_next_arpa_inet_h='"'$gl_header'"'
           else
-               gl_cv_next_langinfo_h='<'langinfo.h'>'
+               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
              fi
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
-printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
+printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
      fi
-     NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_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='<'langinfo.h'>'
+       gl_next_as_first_directive='<'arpa/inet.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_langinfo_h
+       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
 
 
 
 
 
-    HAVE_LANGINFO_CODESET=0
-  HAVE_LANGINFO_T_FMT_AMPM=0
-  HAVE_LANGINFO_ALTMON=0
-  HAVE_LANGINFO_ERA=0
-  HAVE_LANGINFO_YESEXPR=0
 
-  if test $ac_cv_header_langinfo_h = yes; then
-    HAVE_LANGINFO_H=1
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
-printf %s "checking whether langinfo.h defines CODESET... " >&6; }
-if test ${gl_cv_header_langinfo_codeset+y}
+
+
+
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_WS2TCPIP_H=0
+  else
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_INET_NTOP=0
+
+
+
+  GL_GNULIB_INET_PTON=0
+
+
+
+
+
+
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
+printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
+if test ${gl_cv_func_getcwd_null+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                           # Guess yes on glibc systems.
+            *-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 Cygwin.
+            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
+                           # If we don't know, obey --enable-cross-guesses.
+            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
+          esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = CODESET;
+
+#       include <stdlib.h>
+#        if HAVE_UNISTD_H
+#         include <unistd.h>
+#        else /* on Windows with MSVC */
+#         include <direct.h>
+#        endif
+
+
+$gl_mda_defines
+
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
 
 int
 main (void)
 {
 
+#if defined _WIN32 && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but _getcwd does allocate.
+   However, mingw fails to honor non-zero size.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 { free (f); return 3; }
+               if (f[1] != '\0')
+                 { free (f); return 4; }
+               free (f);
+               return 0;
+             }
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_header_langinfo_codeset=yes
-else
-  gl_cv_header_langinfo_codeset=no
+  gl_cv_func_getcwd_null=yes
+else $as_nop
+  gl_cv_func_getcwd_null=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
-printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
-    if test $gl_cv_header_langinfo_codeset = yes; then
-      HAVE_LANGINFO_CODESET=1
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
-printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
-if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
+printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
+printf %s "checking for getcwd with POSIX signature... " >&6; }
+if test ${gl_cv_func_getcwd_posix_signature+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = T_FMT_AMPM;
+#include <unistd.h>
+
+
+$gl_mda_defines
 
 int
 main (void)
 {
+extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           char *getcwd (char *, size_t);
 
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_langinfo_t_fmt_ampm=yes
-else
-  gl_cv_header_langinfo_t_fmt_ampm=no
+  gl_cv_func_getcwd_posix_signature=yes
+else $as_nop
+  gl_cv_func_getcwd_posix_signature=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
-printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
-    if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
-      HAVE_LANGINFO_T_FMT_AMPM=1
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
-printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
-if test ${gl_cv_header_langinfo_altmon+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
+
+
+
+  case "$host_os" in
+    *-musl*)
+printf "%s\n" "#define MUSL_LIBC 1" >>confdefs.h
+ ;;
+  esac
+
+
+
+
+
+
+
+
+  { 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}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = ALTMON_1;
-
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
 int
 main (void)
 {
-
+int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_langinfo_altmon=yes
-else
-  gl_cv_header_langinfo_altmon=no
+  gl_cv_socket_ipv4=yes
+else $as_nop
+  gl_cv_socket_ipv4=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
-printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
-    if test $gl_cv_header_langinfo_altmon = yes; then
-      HAVE_LANGINFO_ALTMON=1
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
-printf %s "checking whether langinfo.h defines ERA... " >&6; }
-if test ${gl_cv_header_langinfo_era+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
+printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
+  if test $gl_cv_socket_ipv4 = yes; then
+
+printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
+
+  fi
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
+printf %s "checking for IPv6 sockets... " >&6; }
+if test ${gl_cv_socket_ipv6+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = ERA;
-
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
 int
 main (void)
 {
-
+int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_langinfo_era=yes
-else
-  gl_cv_header_langinfo_era=no
+  gl_cv_socket_ipv6=yes
+else $as_nop
+  gl_cv_socket_ipv6=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
-printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
-    if test $gl_cv_header_langinfo_era = yes; then
-      HAVE_LANGINFO_ERA=1
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
-printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
-if test ${gl_cv_header_langinfo_yesexpr+y}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
+printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
+  if test $gl_cv_socket_ipv6 = yes; then
+
+printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
+
+  fi
+
+
+
+  GL_GNULIB_IOCTL=0
+
+
+
+
+
+    HAVE_PSELECT=1;
+  REPLACE_PSELECT=0;
+  REPLACE_SELECT=0;
+
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
+printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
+if test ${gl_cv_header_sys_select_h_selfcontained+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
-int a = YESEXPR;
+#include <sys/select.h>
+int
+main (void)
+{
+struct timeval b;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_header_sys_select_h_selfcontained=yes
+else $as_nop
+  gl_cv_header_sys_select_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/select.h>
+int
+main (void)
+{
+int memset; int bzero;
+  ;
+  return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/select.h>
 int
 main (void)
 {
 
+                  #undef memset
+                  #define memset nonexistent_memset
+                  extern
+                  #ifdef __cplusplus
+                  "C"
+                  #endif
+                  void *memset (void *, int, unsigned long);
+                  #undef bzero
+                  #define bzero nonexistent_bzero
+                  extern
+                  #ifdef __cplusplus
+                  "C"
+                  #endif
+                  void bzero (void *, unsigned long);
+                  fd_set fds;
+                  FD_ZERO (&fds);
+
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_header_langinfo_yesexpr=yes
-else
-  gl_cv_header_langinfo_yesexpr=no
+
+else $as_nop
+  gl_cv_header_sys_select_h_selfcontained=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
-printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
-    if test $gl_cv_header_langinfo_yesexpr = yes; then
-      HAVE_LANGINFO_YESEXPR=1
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+      fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
+printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_select_h='<'sys/select.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
+printf %s "checking absolute name of <sys/select.h>... " >&6; }
+if test ${gl_cv_next_sys_select_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+             if test $ac_cv_header_sys_select_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/select.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/select.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_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_sys_select_h
+           gl_cv_next_sys_select_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_select_h='<'sys/select.h'>'
+             fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
+printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
+     fi
+     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_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/select.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_select_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_sys_select_h = yes; then
+    HAVE_SYS_SELECT_H=1
   else
-    HAVE_LANGINFO_H=0
+    HAVE_SYS_SELECT_H=0
   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
 
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
-printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
-if test ${gl_cv_c___inline+y}
+
+
+
+
+
+
+  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
+
+   LIBSOCKET=
+  if test $HAVE_WINSOCK2_H = 1; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
+printf %s "checking for WSAStartup... " >&6; }
+if test ${gl_cv_func_wsastartup+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+       gl_save_LIBS="$LIBS"
+       LIBS="$LIBS -lws2_32"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-typedef int foo_t;
-           static __inline foo_t foo (void) { return 0; }
+
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+#endif
 int
 main (void)
 {
-return foo ();
+
+            WORD wVersionRequested = MAKEWORD(1, 1);
+            WSADATA wsaData;
+            int err = WSAStartup(wVersionRequested, &wsaData);
+            WSACleanup ();
+
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_c___inline=yes
-else
-  gl_cv_c___inline=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  gl_cv_func_wsastartup=yes
+else $as_nop
+  gl_cv_func_wsastartup=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
-printf "%s\n" "$gl_cv_c___inline" >&6; }
-  if test $gl_cv_c___inline = yes; then
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+       LIBS="$gl_save_LIBS"
 
-printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
+printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
+    if test "$gl_cv_func_wsastartup" = "yes"; then
 
-  fi
+printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
 
+      LIBSOCKET='-lws2_32'
+    fi
+  else
+                                    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+printf %s "checking for library containing setsockopt... " >&6; }
+if test ${gl_cv_lib_socket+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+      gl_cv_lib_socket=
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
 
+else $as_nop
+  gl_save_LIBS="$LIBS"
+         LIBS="$gl_save_LIBS -lsocket"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_lib_socket="-lsocket"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+         if test -z "$gl_cv_lib_socket"; then
+           LIBS="$gl_save_LIBS -lnetwork"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_lib_socket="-lnetwork"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+           if test -z "$gl_cv_lib_socket"; then
+             LIBS="$gl_save_LIBS -lnet"
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();
+int
+main (void)
+{
+setsockopt();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_lib_socket="-lnet"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+           fi
+         fi
+         LIBS="$gl_save_LIBS"
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+      if test -z "$gl_cv_lib_socket"; then
+        gl_cv_lib_socket="none needed"
+      fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
+printf "%s\n" "$gl_cv_lib_socket" >&6; }
+    if test "$gl_cv_lib_socket" != "none needed"; then
+      LIBSOCKET="$gl_cv_lib_socket"
+    fi
+  fi
 
 
 
 
 
 
+  :
 
 
 
-    use_additional=yes
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
 
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  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 $as_nop
 
-# Check whether --with-libsigsegv-prefix was given.
-if test ${with_libsigsegv_prefix+y}
+        if test "$cross_compiling" = yes
 then :
-  withval=$with_libsigsegv_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
+           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
 
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+#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 $as_nop
+  gl_cv_func_select_supports0=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && test ! -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
-      fi
-    fi
 
 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
 
-      LIBSIGSEGV=
-  LTLIBSIGSEGV=
-  INCSIGSEGV=
-  LIBSIGSEGV_PREFIX=
-      HAVE_LIBSIGSEGV=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='sigsegv '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
-          if test -n "$acl_shlibext"; then
-            shrext=".$acl_shlibext"             # typically: shrext=.so
-          else
-            shrext=
-          fi
-          if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
-                  fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
-                      found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
-                    fi
-                  done
-                fi
-              fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBSIGSEGV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                                    if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
-                      found_dir="$dir"
-                      found_so="$dir/$libname$shrext"
-                    else
-                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                        ver=`(cd "$dir" && \
-                              for f in "$libname$shrext".*; do echo "$f"; done \
-                              | sed -e "s,^$libname$shrext\\\\.,," \
-                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                              | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                          found_dir="$dir"
-                          found_so="$dir/$libname$shrext.$ver"
-                        fi
-                      else
-                        eval library_names=\"$acl_library_names_spec\"
-                        for f in $library_names; do
-                          if test -f "$dir/$f"; then
-                            found_dir="$dir"
-                            found_so="$dir/$f"
-                            break
-                          fi
-                        done
-                      fi
-                    fi
-                  fi
-                                    if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/$libname.$acl_libext"
-                    fi
-                  fi
-                  if test "X$found_dir" != "X"; then
-                    if test -f "$dir/$libname.la"; then
-                      found_la="$dir/$libname.la"
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
-                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$acl_hardcode_direct" = yes; then
-                                                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                else
-                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
-                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBSIGSEGV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
-                    fi
-                    if test "$acl_hardcode_minus_L" != no; then
-                                                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
-              else
-                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                if test "$name" = 'sigsegv'; then
-                  LIBSIGSEGV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-              */$acl_libdirstem2 | */$acl_libdirstem2/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
-                if test "$name" = 'sigsegv'; then
-                  LIBSIGSEGV_PREFIX="$basedir"
-                fi
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCSIGSEGV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBSIGSEGV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBSIGSEGV; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
-                    LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
-            LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$acl_hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$acl_hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$acl_hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
-    done
-  fi
-
-
+        { 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 $as_nop
 
+        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 $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-        ac_save_CPPFLAGS="$CPPFLAGS"
+#include <sys/types.h>
+#include <sys/time.h>
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#include <unistd.h>
+#include <errno.h>
 
-  for element in $INCSIGSEGV; do
-    haveit=
-    for x in $CPPFLAGS; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+$gl_mda_defines
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
+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;
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
-printf %s "checking for libsigsegv... " >&6; }
-if test ${ac_cv_libsigsegv+y}
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
 then :
-  printf %s "(cached) " >&6
-else
+  gl_cv_func_select_detects_ebadf=yes
+else $as_nop
+  gl_cv_func_select_detects_ebadf=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-    ac_save_LIBS="$LIBS"
-                                case " $LIBSIGSEGV" in
-      *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
-      *)       LIBS="$LIBSIGSEGV $LIBS" ;;
+
+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
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  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.  */
-#include <sigsegv.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
 int
-main (void)
+main ()
 {
-sigsegv_deinstall_handler();
-  ;
+  MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  ac_cv_libsigsegv=yes
-else
-  ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
+
+else $as_nop
+  LIB_SELECT="$LIB_SELECT -luser32"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
-    LIBS="$ac_save_LIBS"
+        ;;
+    esac
+  fi
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
-printf "%s\n" "$ac_cv_libsigsegv" >&6; }
-  if test "$ac_cv_libsigsegv" = yes; then
-    HAVE_LIBSIGSEGV=yes
 
-printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
-printf %s "checking how to link with libsigsegv... " >&6; }
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
-printf "%s\n" "$LIBSIGSEGV" >&6; }
-  else
-    HAVE_LIBSIGSEGV=no
-            CPPFLAGS="$ac_save_CPPFLAGS"
-    LIBSIGSEGV=
-    LTLIBSIGSEGV=
-    LIBSIGSEGV_PREFIX=
-  fi
 
 
 
 
 
 
+  if test $ac_cv_have_decl_strerror_r = no; then
+    HAVE_DECL_STRERROR_R=0
+  fi
 
-    gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+        case "$gl_cv_func_strerror_r_works" in
+                    *no) REPLACE_STRERROR_R=1 ;;
+        esac
+      else
+                REPLACE_STRERROR_R=1
+      fi
+    else
+                  REPLACE_STRERROR_R=1
+    fi
+  fi
 
 
 
+    HAVE_PTHREAD_T=1;
+  HAVE_PTHREAD_SPINLOCK_T=1;
+  HAVE_PTHREAD_CREATE_DETACHED=1;
+  HAVE_PTHREAD_MUTEX_RECURSIVE=1;
+  HAVE_PTHREAD_MUTEX_ROBUST=1;
+  HAVE_PTHREAD_PROCESS_SHARED=1;
+  HAVE_PTHREAD_CREATE=1;
+  HAVE_PTHREAD_ATTR_INIT=1;
+  HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
+  HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
+  HAVE_PTHREAD_ATTR_DESTROY=1;
+  HAVE_PTHREAD_SELF=1;
+  HAVE_PTHREAD_EQUAL=1;
+  HAVE_PTHREAD_DETACH=1;
+  HAVE_PTHREAD_JOIN=1;
+  HAVE_PTHREAD_EXIT=1;
+  HAVE_PTHREAD_ONCE=1;
+  HAVE_PTHREAD_MUTEX_INIT=1;
+  HAVE_PTHREAD_MUTEXATTR_INIT=1;
+  HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
+  HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
+  HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
+  HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
+  HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
+  HAVE_PTHREAD_MUTEX_LOCK=1;
+  HAVE_PTHREAD_MUTEX_TRYLOCK=1;
+  HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
+  HAVE_PTHREAD_MUTEX_UNLOCK=1;
+  HAVE_PTHREAD_MUTEX_DESTROY=1;
+  HAVE_PTHREAD_RWLOCK_INIT=1;
+  HAVE_PTHREAD_RWLOCKATTR_INIT=1;
+  HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
+  HAVE_PTHREAD_RWLOCK_RDLOCK=1;
+  HAVE_PTHREAD_RWLOCK_WRLOCK=1;
+  HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
+  HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
+  HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
+  HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
+  HAVE_PTHREAD_RWLOCK_UNLOCK=1;
+  HAVE_PTHREAD_RWLOCK_DESTROY=1;
+  HAVE_PTHREAD_COND_INIT=1;
+  HAVE_PTHREAD_CONDATTR_INIT=1;
+  HAVE_PTHREAD_CONDATTR_DESTROY=1;
+  HAVE_PTHREAD_COND_WAIT=1;
+  HAVE_PTHREAD_COND_TIMEDWAIT=1;
+  HAVE_PTHREAD_COND_SIGNAL=1;
+  HAVE_PTHREAD_COND_BROADCAST=1;
+  HAVE_PTHREAD_COND_DESTROY=1;
+  HAVE_PTHREAD_KEY_CREATE=1;
+  HAVE_PTHREAD_SETSPECIFIC=1;
+  HAVE_PTHREAD_GETSPECIFIC=1;
+  HAVE_PTHREAD_KEY_DELETE=1;
+  HAVE_PTHREAD_SPIN_INIT=1;
+  HAVE_PTHREAD_SPIN_LOCK=1;
+  HAVE_PTHREAD_SPIN_TRYLOCK=1;
+  HAVE_PTHREAD_SPIN_UNLOCK=1;
+  HAVE_PTHREAD_SPIN_DESTROY=1;
+  REPLACE_PTHREAD_CREATE=0;
+  REPLACE_PTHREAD_ATTR_INIT=0;
+  REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
+  REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
+  REPLACE_PTHREAD_ATTR_DESTROY=0;
+  REPLACE_PTHREAD_SELF=0;
+  REPLACE_PTHREAD_EQUAL=0;
+  REPLACE_PTHREAD_DETACH=0;
+  REPLACE_PTHREAD_JOIN=0;
+  REPLACE_PTHREAD_EXIT=0;
+  REPLACE_PTHREAD_ONCE=0;
+  REPLACE_PTHREAD_MUTEX_INIT=0;
+  REPLACE_PTHREAD_MUTEXATTR_INIT=0;
+  REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
+  REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
+  REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
+  REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
+  REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
+  REPLACE_PTHREAD_MUTEX_LOCK=0;
+  REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
+  REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
+  REPLACE_PTHREAD_MUTEX_UNLOCK=0;
+  REPLACE_PTHREAD_MUTEX_DESTROY=0;
+  REPLACE_PTHREAD_RWLOCK_INIT=0;
+  REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
+  REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
+  REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
+  REPLACE_PTHREAD_RWLOCK_DESTROY=0;
+  REPLACE_PTHREAD_COND_INIT=0;
+  REPLACE_PTHREAD_CONDATTR_INIT=0;
+  REPLACE_PTHREAD_CONDATTR_DESTROY=0;
+  REPLACE_PTHREAD_COND_WAIT=0;
+  REPLACE_PTHREAD_COND_TIMEDWAIT=0;
+  REPLACE_PTHREAD_COND_SIGNAL=0;
+  REPLACE_PTHREAD_COND_BROADCAST=0;
+  REPLACE_PTHREAD_COND_DESTROY=0;
+  REPLACE_PTHREAD_KEY_CREATE=0;
+  REPLACE_PTHREAD_SETSPECIFIC=0;
+  REPLACE_PTHREAD_GETSPECIFIC=0;
+  REPLACE_PTHREAD_KEY_DELETE=0;
+  REPLACE_PTHREAD_SPIN_INIT=0;
+  REPLACE_PTHREAD_SPIN_LOCK=0;
+  REPLACE_PTHREAD_SPIN_TRYLOCK=0;
+  REPLACE_PTHREAD_SPIN_UNLOCK=0;
+  REPLACE_PTHREAD_SPIN_DESTROY=0;
 
 
-    LOCALCHARSET_TESTS_ENVIRONMENT=
 
 
 
@@ -23261,25 +24721,140 @@ printf "%s\n" "$LIBSIGSEGV" >&6; }
 
 
 
-  case "$host_os" in
-    solaris*)
 
-printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
 
-      ;;
-  esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
-printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
-if test ${gl_cv_header_locale_h_posix2001+y}
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_pthread_h='<'pthread.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <pthread.h>" >&5
+printf %s "checking absolute name of <pthread.h>... " >&6; }
+if test ${gl_cv_next_pthread_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+             if test $ac_cv_header_pthread_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <locale.h>
-            int x = LC_MESSAGES;
-            int y = sizeof (((struct lconv *) 0)->decimal_point);
+#include <pthread.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 'pthread.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_pthread_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_pthread_h
+           gl_cv_next_pthread_h='"'$gl_header'"'
+          else
+               gl_cv_next_pthread_h='<'pthread.h'>'
+             fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_pthread_h" >&5
+printf "%s\n" "$gl_cv_next_pthread_h" >&6; }
+     fi
+     NEXT_PTHREAD_H=$gl_cv_next_pthread_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='<'pthread.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_pthread_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_pthread_h = yes; then
+    HAVE_PTHREAD_H=1
+
+
+      if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+         && test $gl_threads_api = windows; then
+        HAVE_PTHREAD_H=0
+      fi
+
+  else
+    HAVE_PTHREAD_H=0
+  fi
+
+
+  ac_fn_c_check_type "$LINENO" "pthread_t" "ac_cv_type_pthread_t" "$ac_includes_default
+     #if HAVE_PTHREAD_H
+      #include <pthread.h>
+     #endif
+"
+if test "x$ac_cv_type_pthread_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_T 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_type "$LINENO" "pthread_spinlock_t" "ac_cv_type_pthread_spinlock_t" "$ac_includes_default
+     #if HAVE_PTHREAD_H
+      #include <pthread.h>
+     #endif
+"
+if test "x$ac_cv_type_pthread_spinlock_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_SPINLOCK_T 1" >>confdefs.h
+
+
+fi
+
+  if test $ac_cv_type_pthread_t != yes; then
+    HAVE_PTHREAD_T=0
+  fi
+  if test $ac_cv_type_pthread_spinlock_t != yes; then
+    HAVE_PTHREAD_SPINLOCK_T=0
+  fi
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_CREATE_DETACHED" >&5
+printf %s "checking for PTHREAD_CREATE_DETACHED... " >&6; }
+if test ${gl_cv_const_PTHREAD_CREATE_DETACHED+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+            int x = PTHREAD_CREATE_DETACHED;
+
 int
 main (void)
 {
@@ -23290,28 +24865,30 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_locale_h_posix2001=yes
-else
-  gl_cv_header_locale_h_posix2001=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  gl_cv_const_PTHREAD_CREATE_DETACHED=yes
+else $as_nop
+  gl_cv_const_PTHREAD_CREATE_DETACHED=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
-printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_CREATE_DETACHED" >&5
+printf "%s\n" "$gl_cv_const_PTHREAD_CREATE_DETACHED" >&6; }
+  if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
+    HAVE_PTHREAD_CREATE_DETACHED=0
+  fi
 
-  if test $ac_cv_header_xlocale_h = yes; then
-    HAVE_XLOCALE_H=1
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
-printf %s "checking whether locale.h defines locale_t... " >&6; }
-if test ${gl_cv_header_locale_has_locale_t+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_RECURSIVE" >&5
+printf %s "checking for PTHREAD_MUTEX_RECURSIVE... " >&6; }
+if test ${gl_cv_const_PTHREAD_MUTEX_RECURSIVE+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <locale.h>
-              locale_t x;
+#include <pthread.h>
+            int x = PTHREAD_MUTEX_RECURSIVE;
+
 int
 main (void)
 {
@@ -23322,38 +24899,64 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_header_locale_has_locale_t=yes
-else
-  gl_cv_header_locale_has_locale_t=no
+  gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes
+else $as_nop
+  gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
-printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
-    if test $gl_cv_header_locale_has_locale_t = yes; then
-      gl_cv_header_locale_h_needs_xlocale_h=no
-    else
-      gl_cv_header_locale_h_needs_xlocale_h=yes
-    fi
-  else
-    HAVE_XLOCALE_H=0
-    gl_cv_header_locale_h_needs_xlocale_h=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&5
+printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_RECURSIVE" >&6; }
+  if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
+    HAVE_PTHREAD_MUTEX_RECURSIVE=0
   fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_MUTEX_ROBUST" >&5
+printf %s "checking for PTHREAD_MUTEX_ROBUST... " >&6; }
+if test ${gl_cv_const_PTHREAD_MUTEX_ROBUST+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+            int x = PTHREAD_MUTEX_ROBUST;
 
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
-printf %s "checking whether struct lconv is properly defined... " >&6; }
-if test ${gl_cv_sys_struct_lconv_ok+y}
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_const_PTHREAD_MUTEX_ROBUST=yes
+else $as_nop
+  gl_cv_const_PTHREAD_MUTEX_ROBUST=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_MUTEX_ROBUST" >&5
+printf "%s\n" "$gl_cv_const_PTHREAD_MUTEX_ROBUST" >&6; }
+  if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
+    HAVE_PTHREAD_MUTEX_ROBUST=0
+  fi
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PROCESS_SHARED" >&5
+printf %s "checking for PTHREAD_PROCESS_SHARED... " >&6; }
+if test ${gl_cv_const_PTHREAD_PROCESS_SHARED+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <locale.h>
-            struct lconv l;
-            int x = sizeof (l.decimal_point);
-            int y = sizeof (l.int_p_cs_precedes);
+#include <pthread.h>
+            int x = PTHREAD_PROCESS_SHARED;
+
 int
 main (void)
 {
@@ -23364,17 +24967,17 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_sys_struct_lconv_ok=yes
-else
-  gl_cv_sys_struct_lconv_ok=no
+  gl_cv_const_PTHREAD_PROCESS_SHARED=yes
+else $as_nop
+  gl_cv_const_PTHREAD_PROCESS_SHARED=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
-printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
-  if test $gl_cv_sys_struct_lconv_ok = no; then
-    REPLACE_STRUCT_LCONV=1
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_const_PTHREAD_PROCESS_SHARED" >&5
+printf "%s\n" "$gl_cv_const_PTHREAD_PROCESS_SHARED" >&6; }
+  if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
+    HAVE_PTHREAD_PROCESS_SHARED=0
   fi
 
 
@@ -23383,23 +24986,88 @@ printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
 
 
 
+    LIB_PTHREAD="$LIBPMULTITHREAD"
+
+
+
+
+  GL_GNULIB_PTHREAD_THREAD=0
+
+
+
+  GL_GNULIB_PTHREAD_ONCE=0
+
+
+
+  GL_GNULIB_PTHREAD_MUTEX=0
+
+
+
+  GL_GNULIB_PTHREAD_RWLOCK=0
+
+
+
+  GL_GNULIB_PTHREAD_COND=0
+
+
+
+  GL_GNULIB_PTHREAD_TSS=0
+
+
+
+  GL_GNULIB_PTHREAD_SPIN=0
+
+
+
+  GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK=0
+
+
+
+
+
+    HAVE_SCHED_YIELD=1;
+  REPLACE_SCHED_YIELD=0;
+
+
+
+
+
+
+
+  ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "#if HAVE_SYS_CDEFS_H
+       #include <sys/cdefs.h>
+      #endif
+
+"
+if test "x$ac_cv_header_sched_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_locale_h='<'locale.h'>'
+       gl_cv_next_sched_h='<'sched.h'>'
      else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
-printf %s "checking absolute name of <locale.h>... " >&6; }
-if test ${gl_cv_next_locale_h+y}
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
+printf %s "checking absolute name of <sched.h>... " >&6; }
+if test ${gl_cv_next_sched_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <locale.h>
+#include <sched.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -23415,7 +25083,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'locale.h' \
+  gl_header_literal_regex=`echo 'sched.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/
@@ -23424,84 +25092,118 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_sched_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_locale_h
-           gl_cv_next_locale_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_sched_h
+           gl_cv_next_sched_h='"'$gl_header'"'
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
-printf "%s\n" "$gl_cv_next_locale_h" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
+printf "%s\n" "$gl_cv_next_sched_h" >&6; }
      fi
-     NEXT_LOCALE_H=$gl_cv_next_locale_h
+     NEXT_SCHED_H=$gl_cv_next_sched_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='<'locale.h'>'
+       gl_next_as_first_directive='<'sched.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_locale_h
+       gl_next_as_first_directive=$gl_cv_next_sched_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
-
-
+     NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
 
 
 
 
 
+  if test "$ac_cv_header_sched_h" = yes; then
+    HAVE_SCHED_H=1
+  else
+    HAVE_SCHED_H=0
+  fi
 
 
+  if test "$HAVE_SCHED_H" = 1; then
+    ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#if HAVE_SYS_CDEFS_H
+         #include <sys/cdefs.h>
+        #endif
+        #include <sched.h>
 
+"
+if test "x$ac_cv_type_struct_sched_param" = xyes
+then :
+  HAVE_STRUCT_SCHED_PARAM=1
+else $as_nop
+  HAVE_STRUCT_SCHED_PARAM=0
+fi
 
+  else
+    HAVE_STRUCT_SCHED_PARAM=0
+    case "$host_os" in
+      os2*)
+                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <spawn.h>
+"
+if test "x$ac_cv_type_struct_sched_param" = xyes
+then :
+  HAVE_STRUCT_SCHED_PARAM=1
+fi
 
+        ;;
+      vms)
+                ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <pthread.h>
+"
+if test "x$ac_cv_type_struct_sched_param" = xyes
+then :
+  HAVE_STRUCT_SCHED_PARAM=1
+fi
 
-  if test $REPLACE_STRUCT_LCONV = 1; then
-    REPLACE_LOCALECONV=1
+        ;;
+    esac
   fi
 
-  if test $REPLACE_LOCALECONV = 1; then
-
-
-
-
 
+  if test "$ac_cv_header_sys_cdefs_h" = yes; then
+    HAVE_SYS_CDEFS_H=1
+  else
+    HAVE_SYS_CDEFS_H=0
+  fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
 
 
-  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
-"
-if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
 
 
-fi
 
 
-  fi
+  GL_GNULIB_SCHED_YIELD=0
 
 
 
 
 
-          GNULIB_LOCALECONV=1
+  GL_GNULIB_PSELECT=0
 
 
 
+  GL_GNULIB_SELECT=0
 
 
-printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
 
 
 
 
+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 $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
 
 
 
@@ -23509,49 +25211,120 @@ printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>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 $as_nop
+         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 $as_nop
+  gl_cv_decl_ioctl_in_sys_ioctl_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-  gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
+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 $ac_cv_func_lstat = yes; then
 
-    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
-      solaris* | *no)
-        REPLACE_LSTAT=1
-        ;;
-    esac
-  else
-    HAVE_LSTAT=0
-  fi
 
-  if test $REPLACE_LSTAT = 1; then
 
 
 
+     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 $as_nop
 
+             if test $ac_cv_header_sys_ioctl_h = yes; then
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
+  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
 
-    :
-  fi
+  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
 
 
+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
 
-          GNULIB_LSTAT=1
+     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
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
 
 
 
@@ -23560,15 +25333,9 @@ printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
 
 
 
-  if test $gl_cv_func_malloc_posix = yes; then
 
-printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
-  else
-    REPLACE_MALLOC=1
-  fi
 
-  if test $REPLACE_MALLOC = 1; then
 
 
 
@@ -23577,34 +25344,100 @@ printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+     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 $as_nop
 
-  fi
+             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
 
-          GNULIB_MALLOC_POSIX=1
+  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
 
 
+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
 
-printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.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
 
 
 
 
 
 
+   if false; then
+  GL_COND_LIBTOOL_TRUE=
+  GL_COND_LIBTOOL_FALSE='#'
+else
+  GL_COND_LIBTOOL_TRUE='#'
+  GL_COND_LIBTOOL_FALSE=
+fi
 
+  gl_cond_libtool=false
+  gl_libdeps=
+  gl_ltlibdeps=
+  gl_m4_base='m4'
 
-  :
 
 
 
@@ -23616,749 +25449,572 @@ printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
 
 
 
-  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+  gl_source_base='lib'
 
 
+  if test $ac_cv_func_alloca_works = no; then
+    :
+  fi
 
-     { 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}
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+printf %s "checking for alloca as a compiler built-in... " >&6; }
+if test ${gl_cv_rpl_alloca+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
-                  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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  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;
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+        Need own alloca
+#endif
 
-      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"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Need own alloca" >/dev/null 2>&1
 then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else
-  gl_cv_func_mbrtowc_incomplete_state=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_rpl_alloca=yes
+else $as_nop
+  gl_cv_rpl_alloca=no
 fi
+rm -rf conftest*
 
-      fi
 
 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}: result: $gl_cv_rpl_alloca" >&5
+printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
+    if test $gl_cv_rpl_alloca = yes; then
 
+printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
 
+      ALLOCA_H=alloca.h
+    else
+                  ALLOCA_H=
+    fi
+  else
+    ALLOCA_H=alloca.h
+  fi
 
-     { 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
+   if test -n "$ALLOCA_H"; then
+  GL_GENERATE_ALLOCA_H_TRUE=
+  GL_GENERATE_ALLOCA_H_FALSE='#'
 else
-
-                  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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  /* 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
-  gl_cv_func_mbrtowc_sanitycheck=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  GL_GENERATE_ALLOCA_H_TRUE='#'
+  GL_GENERATE_ALLOCA_H_FALSE=
 fi
 
-      fi
-
-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
+  if test $ac_cv_working_alloca_h = yes; then
+    HAVE_ALLOCA_H=1
   else
-    REPLACE_MBSTATE_T=1
+    HAVE_ALLOCA_H=0
   fi
 
 
 
-  if test $ac_cv_func_mbrtowc = no; then
-    HAVE_MBRTOWC=0
-    ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
 
-"
-if test "x$ac_cv_have_decl_mbrtowc" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
 
-    if test $ac_cv_have_decl_mbrtowc = yes; then
-                        REPLACE_MBRTOWC=1
-    fi
+
+
+  if test $ac_cv_func_btowc = no; then
+    HAVE_BTOWC=0
   else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_MBRTOWC=1
-    else
 
 
 
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
-printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
-if test ${gl_cv_func_mbrtowc_null_arg1+y}
+
+        { 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
+else $as_nop
 
-                  case "$host_os" in
-                  # Guess no on Solaris.
-        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
-                  # Guess yes otherwise.
-        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none; then
         if test "$cross_compiling" = yes
 then :
-  :
-else
+
+           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 $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
-  int result = 0;
-
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      char input[] = "\303\237er";
-      mbstate_t state;
-      wchar_t wc;
-      size_t ret;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      wc = (wchar_t) 0xBADFACE;
-      ret = mbrtowc (&wc, input, 5, &state);
-      if (ret != 2)
-        result |= 1;
-      if (!mbsinit (&state))
-        result |= 2;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      ret = mbrtowc (NULL, input, 5, &state);
-      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
-        result |= 4;
-      if (!mbsinit (&state))
-        result |= 8;
-    }
-  return result;
+  if (btowc ('\0') != 0)
+    return 1;
+  return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbrtowc_null_arg1=yes
-else
-  gl_cv_func_mbrtowc_null_arg1=no
+  gl_cv_func_btowc_nul=yes
+else $as_nop
+  gl_cv_func_btowc_nul=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
-
-
-
+{ 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 mbrtowc handles a NULL string argument" >&5
-printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
-if test ${gl_cv_func_mbrtowc_null_arg2+y}
+        { 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
+else $as_nop
 
-                  case "$host_os" in
-              # Guess no on OSF/1.
-        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
-              # Guess yes otherwise.
-        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none; then
-        if test "$cross_compiling" = yes
+                        case "$host_os" in
+                  # Guess no on IRIX.
+          irix*)  gl_cv_func_btowc_eof="guessing no" ;;
+                  # Guess yes on native Windows.
+          mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
+                  # Guess yes otherwise.
+          *)      gl_cv_func_btowc_eof="guessing yes" ;;
+        esac
+        if test $LOCALE_FR != none; then
+          if test "$cross_compiling" = yes
 then :
   :
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
 #include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
-      mbstate_t state;
-      wchar_t wc;
-      int ret;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      wc = (wchar_t) 0xBADFACE;
-      mbrtowc (&wc, NULL, 5, &state);
-      /* Check that wc was not modified.  */
-      if (wc != (wchar_t) 0xBADFACE)
-        return 2;
+      if (btowc (EOF) != WEOF)
+        return 1;
     }
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbrtowc_null_arg2=yes
-else
-  gl_cv_func_mbrtowc_null_arg2=no
+  gl_cv_func_btowc_eof=yes
+else $as_nop
+  gl_cv_func_btowc_eof=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
+        fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
+
+    case "$gl_cv_func_btowc_nul" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+    case "$gl_cv_func_btowc_eof" in
+      *yes) ;;
+      *) REPLACE_BTOWC=1 ;;
+    esac
+  fi
 
+  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
 
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
-printf %s "checking whether mbrtowc has a correct return value... " >&6; }
-if test ${gl_cv_func_mbrtowc_retval+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-                  case "$host_os" in
-                                   # Guess no on HP-UX, Solaris, native Windows.
-        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
-                                   # Guess yes otherwise.
-        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
-      esac
-      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
-         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
-        if test "$cross_compiling" = yes
-then :
+
+
+  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
+
+
   :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  int result = 0;
-  int found_some_locale = 0;
-  /* This fails on Solaris.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      char input[] = "B\303\274\303\237er"; /* "Büßer" */
-      mbstate_t state;
-      wchar_t wc;
+  fi
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
-        {
-          input[1] = '\0';
-          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
-            result |= 1;
-        }
-      found_some_locale = 1;
-    }
-  /* This fails on HP-UX 11.11.  */
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      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))
-        {
-          input[1] = '\0';
-          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
-            result |= 2;
-        }
-      found_some_locale = 1;
-    }
-  /* This fails on native Windows.  */
-  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
-    {
-      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
-        {
-          input[3] = '\0';
-          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
-            result |= 4;
-        }
-      found_some_locale = 1;
-    }
-  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
-    {
-      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
-        {
-          input[3] = '\0';
-          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
-            result |= 8;
-        }
-      found_some_locale = 1;
-    }
-  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
-    {
-      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
-      mbstate_t state;
-      wchar_t wc;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
-        {
-          input[3] = '\0';
-          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
-            result |= 16;
-        }
-      found_some_locale = 1;
-    }
-  return (found_some_locale ? result : 77);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mbrtowc_retval=yes
-else
-  if test $? != 77; then
-             gl_cv_func_mbrtowc_retval=no
-           fi
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-      fi
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
 
+          GL_GNULIB_BTOWC=1
 
 
 
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
-printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
-if test ${gl_cv_func_mbrtowc_nul_retval+y}
+
+
+printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
+
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
+printf %s "checking for __builtin_expect... " >&6; }
+if test ${gl_cv___builtin_expect+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-                  case "$host_os" in
-                       # Guess no on Solaris 8 and 9.
-        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
-                       # Guess yes otherwise.
-        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
-      esac
-      if test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
+         int
+         main (int argc, char **argv)
+         {
+           argc = __builtin_expect (argc, 100);
+           return argv[argc != 100][0];
+         }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  :
-else
+  gl_cv___builtin_expect=yes
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  /* This fails on Solaris 8 and 9.  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      mbstate_t state;
-      wchar_t wc;
-
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, "", 1, &state) != 0)
-        return 2;
-    }
-  return 0;
-}
+             #include <builtins.h>
+             int
+             main (int argc, char **argv)
+             {
+               argc = __builtin_expect (argc, 100);
+               return argv[argc != 100][0];
+             }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_func_mbrtowc_nul_retval=yes
-else
-  gl_cv_func_mbrtowc_nul_retval=no
+  gl_cv___builtin_expect="in <builtins.h>"
+else $as_nop
+  gl_cv___builtin_expect=no
 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_exeext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
+printf "%s\n" "$gl_cv___builtin_expect" >&6; }
+  if test "$gl_cv___builtin_expect" = yes; then
+    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
 
-      fi
+  elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
+    printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+  fi
 
 
 
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
-printf %s "checking whether mbrtowc works on empty input... " >&6; }
-if test ${gl_cv_func_mbrtowc_empty_input+y}
+    if test "$with_libsigsegv" = yes; then
+    if test "$gl_cv_lib_sigsegv" = yes; then
+      LIBCSTACK=$LIBSIGSEGV
+
+      LTLIBCSTACK=$LTLIBSIGSEGV
+
+    fi
+  fi
+
+
+
+
+  if test $REPLACE_CALLOC = 0; then
+
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
+printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
+if test ${ac_cv_func_calloc_0_nonnull+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                  case "$host_os" in
-                              # Guess no on AIX and glibc systems.
-        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
-                              # Guess yes on native Windows.
-        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
-        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
-      esac
-      if test "$cross_compiling" = yes
+else $as_nop
+  if test $cross_compiling != yes; then
+       ac_cv_func_calloc_0_nonnull=yes
+       if test "$cross_compiling" = yes
 then :
-  :
-else
+  { { 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 $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+$ac_includes_default
+int
+main (void)
+{
+int result = 0;
+              char * volatile p = calloc (0, 0);
+              if (!p)
+                result |= 1;
+              free (p);
+              return result;
 
-           #include <wchar.h>
-           static wchar_t wc;
-           static mbstate_t mbs;
-           int
-           main (void)
-           {
-             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
-           }
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbrtowc_empty_input=yes
-else
-  gl_cv_func_mbrtowc_empty_input=no
+
+else $as_nop
+  ac_cv_func_calloc_0_nonnull=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 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" ;;
+       esac
+     fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
-printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
+printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
+  case $ac_cv_func_calloc_0_nonnull in #(
+  *yes) :
+     ;; #(
+  *) :
+    REPLACE_CALLOC=1 ;;
+esac
 
+  fi
 
-     { 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_C_locale_sans_EILSEQ+y}
-then :
-  printf %s "(cached) " >&6
-else
+  if test $REPLACE_CALLOC = 1; then
 
-               gl_cv_C_locale_sans_EILSEQ="guessing no"
 
-     if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                 # Guess yes on native Windows.
-         mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
-       esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
+
+  fi
+
+
+
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_CALLOC=1
+  fi
+
+  if test $REPLACE_CALLOC = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_CALLOC_POSIX=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  LIB_CLOCK_GETTIME=
+
+  gl_saved_libs=$LIBS
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
-            #include <locale.h>
-            #include <wchar.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.  */
+char clock_gettime ();
 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 clock_gettime ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+for ac_lib in '' rt posix4
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_C_locale_sans_EILSEQ=yes
-else
-  gl_cv_C_locale_sans_EILSEQ=no
+  ac_cv_search_clock_gettime=$ac_res
 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_exeext
+  if test ${ac_cv_search_clock_gettime+y}
+then :
+  break
 fi
+done
+if test ${ac_cv_search_clock_gettime+y}
+then :
 
-
+else $as_nop
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
-printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
 
-      case "$gl_cv_func_mbrtowc_null_arg1" in
-        *yes) ;;
-        *)
-printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
+    ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_null_arg2" in
-        *yes) ;;
-        *)
-printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
+fi
+ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
+if test "x$ac_cv_func_clock_settime" = xyes
+then :
+  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_retval" in
-        *yes) ;;
-        *)
-printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+fi
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_nul_retval" in
-        *yes) ;;
-        *)
-printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+  LIBS=$gl_saved_libs
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case "$gl_cv_func_mbrtowc_empty_input" in
-        *yes) ;;
-        *)
-printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-      case $gl_cv_C_locale_sans_EILSEQ in
-        *yes) ;;
-        *)
-printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
 
-           REPLACE_MBRTOWC=1
-           ;;
-      esac
-    fi
-  fi
+printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
 
-  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
 
 
 
 
 
+    if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+      REPLACE_CLOSE=1
+    fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
 
 
 
-  :
+  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
 
 
 
-          GNULIB_MBRTOWC=1
+  if test $REPLACE_CLOSE = 1; then
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
 
+  fi
 
 
 
 
-          GNULIB_MBSCASECMP=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
+          GL_GNULIB_CLOSE=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
 
 
 
@@ -24368,195 +26024,178 @@ printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
 
 
 
-  if test $ac_cv_func_mbsinit = yes && 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
+printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
 
-                  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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  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"
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+printf %s "checking whether // is distinct from /... " >&6; }
+if test ${gl_cv_double_slash_root+y}
 then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else
-  gl_cv_func_mbrtowc_incomplete_state=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  printf %s "(cached) " >&6
+else $as_nop
+   if test x"$cross_compiling" = xyes ; then
+        # When cross-compiling, there is no way to tell whether // is special
+        # short of a list of hosts.  However, the only known hosts to date
+        # that have a distinct // are Apollo DomainOS (too old to port to),
+        # Cygwin, and z/OS.  If anyone knows of another system for which // has
+        # special semantics and is distinct from /, please report it to
+        # <bug-gnulib@gnu.org>.
+        case $host in
+          *-cygwin | i370-ibm-openedition)
+            gl_cv_double_slash_root=yes ;;
+          *)
+            # Be optimistic and assume that / and // are the same when we
+            # don't know.
+            gl_cv_double_slash_root='unknown, assuming no' ;;
+        esac
+      else
+        set x `ls -di / // 2>/dev/null`
+        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+          gl_cv_double_slash_root=no
+        else
+          gl_cv_double_slash_root=yes
+        fi
+      fi
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+printf "%s\n" "$gl_cv_double_slash_root" >&6; }
+  if test "$gl_cv_double_slash_root" = yes; then
 
-      fi
+printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
 
-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; }
+  fi
 
 
 
 
-     { 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}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+printf %s "checking whether dup2 works... " >&6; }
+if test ${gl_cv_func_dup2_works+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                  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
+else $as_nop
+  if test "$cross_compiling" = yes
 then :
-  :
-else
+  case "$host_os" in
+         mingw*) # on this platform, dup2 always returns 0 for success
+           gl_cv_func_dup2_works="guessing no" ;;
+         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+           gl_cv_func_dup2_works="guessing no" ;;
+         aix* | freebsd*)
+                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+                 # not EBADF.
+           gl_cv_func_dup2_works="guessing no" ;;
+         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *-android*) # implemented using dup3(), which fails if oldfd == newfd
+           gl_cv_func_dup2_works="guessing no" ;;
+         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *) gl_cv_func_dup2_works="guessing yes" ;;
+       esac
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  /* 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;
+       #include <errno.h>
+           #include <fcntl.h>
+           #include <limits.h>
+           #include <sys/resource.h>
+           #include <unistd.h>
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (&wc, input + 3, 6, &state) != 4
-          && mbtowc (&wc, input + 3, 6) == 4)
-        return 2;
-    }
+
+$gl_mda_defines
+
+           #ifndef RLIM_SAVED_CUR
+           # define RLIM_SAVED_CUR RLIM_INFINITY
+           #endif
+           #ifndef RLIM_SAVED_MAX
+           # define RLIM_SAVED_MAX RLIM_INFINITY
+           #endif
+
+int
+main (void)
+{
+int result = 0;
+           int bad_fd = INT_MAX;
+           struct rlimit rlim;
+           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+               && rlim.rlim_cur != RLIM_INFINITY
+               && rlim.rlim_cur != RLIM_SAVED_MAX
+               && rlim.rlim_cur != RLIM_SAVED_CUR)
+             bad_fd = rlim.rlim_cur;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+               result |= 1;
+           #endif
+           if (dup2 (1, 1) != 1)
+             result |= 2;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+               result |= 4;
+           #endif
+           close (0);
+           if (dup2 (0, 0) != -1)
+             result |= 8;
+           /* Many gnulib modules require POSIX conformance of EBADF.  */
+           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+             result |= 16;
+           /* Flush out some cygwin core dumps.  */
+           if (dup2 (2, -1) != -1 || errno != EBADF)
+             result |= 32;
+           dup2 (2, 255);
+           dup2 (2, 256);
+           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
+           {
+             int fd = open (".", O_RDONLY);
+             if (fd == -1)
+               result |= 64;
+             else if (dup2 (fd, fd + 1) == -1)
+               result |= 128;
+             close (fd);
+           }
+           return result;
+  ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbrtowc_sanitycheck=yes
-else
-  gl_cv_func_mbrtowc_sanitycheck=no
+  gl_cv_func_dup2_works=yes
+else $as_nop
+  gl_cv_func_dup2_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
 
 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_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-
-"
-if test "x$ac_cv_have_decl_mbsinit" = xyes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
+printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
+  case "$gl_cv_func_dup2_works" in
+    *yes) ;;
+    *)
+      REPLACE_DUP2=1
+      ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
+if test "x$ac_cv_func_setdtablesize" = xyes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+  printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
+fi
 
-    if test $ac_cv_have_decl_mbsinit = yes; then
-                        REPLACE_MBSINIT=1
-    fi
-  else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_MBSINIT=1
-    else
-                        case "$host_os" in
-        mingw*) REPLACE_MBSINIT=1 ;;
-      esac
-    fi
-  fi
+      ;;
+  esac
 
-  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
 
+  if test $REPLACE_DUP2 = 1; then
 
 
 
@@ -24564,10 +26203,9 @@ printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
 
+  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
 
-  :
 
   fi
 
@@ -24575,627 +26213,599 @@ printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
 
 
 
-          GNULIB_MBSINIT=1
-
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
-
-
-
+          GL_GNULIB_DUP2=1
 
 
 
-  if test $ac_cv_func_mbslen = yes; then
-    HAVE_MBSLEN=1
-  else
-    HAVE_MBSLEN=0
-  fi
-
 
 
+printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
 
 
 
-          GNULIB_MBSLEN=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
 
 
 
 
 
 
+          GL_GNULIB_ENVIRON=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
 
 
-  if test $ac_cv_func_mbsinit = yes && 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}
+      { 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 "$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
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
+#include <error.h>
+int
+main (void)
 {
-  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;
-    }
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else
-  gl_cv_func_mbrtowc_incomplete_state=no
+  ac_cv_lib_error_at_line=yes
+else $as_nop
+  ac_cv_lib_error_at_line=no
 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_exeext conftest.$ac_ext
 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; }
 
-      fi
+  if test $ac_cv_lib_error_at_line = no; then
 
-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 "$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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  /* 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
-  gl_cv_func_mbrtowc_sanitycheck=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
 
-      fi
 
-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
 
 
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
 
-  if test $ac_cv_func_mbsrtowcs = no; then
-    HAVE_MBSRTOWCS=0
-    ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
 
-"
-if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
 
-    if test $ac_cv_have_decl_mbsrtowcs = yes; then
-                        REPLACE_MBSRTOWCS=1
-    fi
-  else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_MBSRTOWCS=1
-    else
 
 
 
 
 
 
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
-printf %s "checking whether mbsrtowcs works... " >&6; }
-if test ${gl_cv_func_mbsrtowcs_works+y}
+  if test $ac_cv_func_fcntl = no; then
+
+
+
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
+
+  else
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test ${gl_cv_func_fcntl_f_dupfd_works+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                  case "$host_os" in
-                                   # Guess no on HP-UX, Solaris, mingw.
-        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
-                                   # Guess yes otherwise.
-        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
-      esac
-      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
-        if test "$cross_compiling" = yes
+else $as_nop
+  if test "$cross_compiling" = yes
 then :
-  :
-else
+  case $host_os in
+            aix* | cygwin* | haiku*)
+               gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
+            *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
+          esac
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <errno.h>
+              #include <fcntl.h>
+              #include <limits.h>
+              #include <sys/resource.h>
+              #include <unistd.h>
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  int result = 0;
-  /* Test whether the function supports a NULL destination argument.
-     This fails on native Windows.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
-    {
-      const char input[] = "\337er";
-      const char *src = input;
-      mbstate_t state;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbsrtowcs (NULL, &src, 1, &state) != 3
-          || src != input)
-        result |= 1;
-    }
-  /* Test whether the function works when started with a conversion state
-     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      const char input[] = "B\303\274\303\237er";
-      mbstate_t state;
+$gl_mda_defines
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
-        if (!mbsinit (&state))
-          {
-            const char *src = input + 2;
-            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
-              result |= 2;
-          }
-    }
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      const char input[] = "<\306\374\313\334\270\354>";
-      mbstate_t state;
+              #ifndef RLIM_SAVED_CUR
+              # define RLIM_SAVED_CUR RLIM_INFINITY
+              #endif
+              #ifndef RLIM_SAVED_MAX
+              # define RLIM_SAVED_MAX RLIM_INFINITY
+              #endif
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
-        if (!mbsinit (&state))
-          {
-            const char *src = input + 4;
-            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
-              result |= 4;
-          }
-    }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      const char input[] = "B\250\271\201\060\211\070er";
-      mbstate_t state;
+int
+main (void)
+{
+int result = 0;
+              int bad_fd = INT_MAX;
+              struct rlimit rlim;
+              if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+                  && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+                  && rlim.rlim_cur != RLIM_INFINITY
+                  && rlim.rlim_cur != RLIM_SAVED_MAX
+                  && rlim.rlim_cur != RLIM_SAVED_CUR)
+                bad_fd = rlim.rlim_cur;
+              if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
+              if (errno != EINVAL) result |= 2;
+              if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
+              if (errno != EINVAL) result |= 8;
+              /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
+              {
+                int fd;
+                fd = open (".", O_RDONLY);
+                if (fd == -1)
+                  result |= 16;
+                else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
+                  result |= 32;
 
-      memset (&state, '\0', sizeof (mbstate_t));
-      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
-        if (!mbsinit (&state))
-          {
-            const char *src = input + 2;
-            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
-              result |= 8;
-          }
-    }
-  return result;
+                close (fd);
+              }
+              return result;
+  ;
+  return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbsrtowcs_works=yes
-else
-  gl_cv_func_mbsrtowcs_works=no
+  gl_cv_func_fcntl_f_dupfd_works=yes
+else $as_nop
+  gl_cv_func_fcntl_f_dupfd_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
-
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
-printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
-
-      case "$gl_cv_func_mbsrtowcs_works" in
-        *yes) ;;
-        *) REPLACE_MBSRTOWCS=1 ;;
-      esac
-    fi
-  fi
-
-  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
-
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
-
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+    case $gl_cv_func_fcntl_f_dupfd_works in
+      *yes) ;;
+      *)
 
-  :
 
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
   fi
 
 
+printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+    esac
 
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                     # Guess no on NetBSD.
+            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
+            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
+          esac
 
-
-          GNULIB_MBSRTOWCS=1
-
-
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+              #include <unistd.h>
+              int main (int argc, char *argv[])
+              {
+                if (argc == 1)
+                  /* parent process */
+                  {
+                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
+                      return 1;
+                    return execl ("./conftest", "./conftest", "child", NULL);
+                  }
+                else
+                  /* child process */
+                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
+              }
 
 
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+   it to support the semantics on older kernels that failed with EINVAL.  */
+choke me
+#endif
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else $as_nop
+  gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+else $as_nop
+  gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
+      *yes) ;;
+      *)
 
 
+  if test $ac_cv_func_fcntl = no; then
+    HAVE_FCNTL=0
+  else
+    REPLACE_FCNTL=1
+  fi
 
-          GNULIB_MBSSTR=1
+                        ;;
+    esac
+  fi
 
 
+  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
 
-  if false; then
-    REPLACE_MBTOWC=1
   fi
 
-  if test $REPLACE_MBTOWC = 1; then
-
-
-
-
-
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
 
 
-  :
 
-  fi
 
 
+          GL_GNULIB_FCNTL=1
 
 
 
-          GNULIB_MBTOWC=1
 
 
+printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
 
 
 
 
 
-  :
 
 
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
 
 
 
 
+printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
 
 
-  ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
-if test "x$ac_cv_header_bp_sym_h" = xyes
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+printf %s "checking for flexible array member... " >&6; }
+if test ${ac_cv_c_flexmember+y}
 then :
-  printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
-
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+            #include <stdio.h>
+            #include <stddef.h>
+            struct m { struct m *next, **list; char name[]; };
+            struct s { struct s *p; struct m *m; int n; double d[]; };
+int
+main (void)
+{
+int m = getchar ();
+            size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
+            nbytes += sizeof (struct s) - 1;
+            nbytes -= nbytes % sizeof (struct s);
+            struct s *p = malloc (nbytes);
+            p->p = p;
+            p->m = NULL;
+            p->d[0] = 0.0;
+            return p->d != (double *) NULL;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_flexmember=yes
+else $as_nop
+  ac_cv_c_flexmember=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+printf "%s\n" "$ac_cv_c_flexmember" >&6; }
+  if test $ac_cv_c_flexmember = yes; then
 
+printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
 
-  fi
-
-
-
-
-
-          GNULIB_MEMCHR=1
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
+  else
+    printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
 
+  fi
 
 
 
 
+  FLOAT_H=
+  REPLACE_FLOAT_LDBL=0
+  case "$host_os" in
+    aix* | beos* | openbsd* | mirbsd* | irix*)
+      FLOAT_H=float.h
+      ;;
+    freebsd* | dragonfly*)
+      case "$host_cpu" in
+        i[34567]86 )
+          FLOAT_H=float.h
+          ;;
+        x86_64 )
+          # On x86_64 systems, the C compiler may still be generating
+          # 32-bit code.
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined __LP64__ || defined __x86_64__ || defined __amd64__
+                  int ok;
+                 #else
+                  error fail
+                 #endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
 
+else $as_nop
+  FLOAT_H=float.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+          ;;
+      esac
+      ;;
+    linux*)
+      case "$host_cpu" in
+        powerpc*)
+          FLOAT_H=float.h
+          ;;
+      esac
+      ;;
+  esac
+  case "$host_os" in
+    aix* | freebsd* | dragonfly* | linux*)
+      if test -n "$FLOAT_H"; then
+        REPLACE_FLOAT_LDBL=1
+      fi
+      ;;
+  esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
-printf %s "checking whether mkdir handles trailing slash... " >&6; }
-if test ${gl_cv_func_mkdir_trailing_slash_works+y}
+    REPLACE_ITOLD=0
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
+printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
+if test ${gl_cv_func_itold_works+y}
 then :
   printf %s "(cached) " >&6
-else
-  rm -rf conftest.dir
+else $as_nop
+
       if test "$cross_compiling" = yes
 then :
-  case "$host_os" in
-                          # Guess yes on Linux systems.
-         linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on glibc systems.
-         *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on MSVC, no on mingw.
-         mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  case "$host" in
+           sparc*-*-linux*)
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#ifdef _MSC_VER
- Known
-#endif
+#if defined __LP64__ || defined __arch64__
+                    int ok;
+                   #else
+                    error fail
+                   #endif
 
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Known" >/dev/null 2>&1
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
-else
-  gl_cv_func_mkdir_trailing_slash_works="guessing no"
+  gl_cv_func_itold_works="guessing no"
+else $as_nop
+  gl_cv_func_itold_works="guessing yes"
 fi
-rm -rf conftest*
-
-                          ;;
-                          # If we don't know, assume the worst.
-         *)               gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
-       esac
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+             ;;
+                   # Guess yes on native Windows.
+           mingw*) gl_cv_func_itold_works="guessing yes" ;;
+           *)      gl_cv_func_itold_works="guessing yes" ;;
+         esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#       include <sys/types.h>
-#       include <sys/stat.h>
-
-int
-main (void)
+int i = -1;
+volatile long double ld;
+int main ()
 {
-return mkdir ("conftest.dir/", 0700);
-  ;
+  ld += i * 1.0L;
+  if (ld > 0)
+    return 1;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mkdir_trailing_slash_works=yes
-else
-  gl_cv_func_mkdir_trailing_slash_works=no
+  gl_cv_func_itold_works=yes
+else $as_nop
+  gl_cv_func_itold_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    rm -rf conftest.dir
-
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
-printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
-  case "$gl_cv_func_mkdir_trailing_slash_works" in
-    *yes) ;;
-    *)
-      REPLACE_MKDIR=1
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
+printf "%s\n" "$gl_cv_func_itold_works" >&6; }
+  case "$gl_cv_func_itold_works" in
+    *no)
+      REPLACE_ITOLD=1
+                  FLOAT_H=float.h
       ;;
   esac
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
-printf %s "checking whether mkdir handles trailing dot... " >&6; }
-if test ${gl_cv_func_mkdir_trailing_dot_works+y}
-then :
-  printf %s "(cached) " >&6
-else
-  rm -rf conftest.dir
-      if test "$cross_compiling" = yes
+  if test -n "$FLOAT_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_float_h='<'float.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
+printf %s "checking absolute name of <float.h>... " >&6; }
+if test ${gl_cv_next_float_h+y}
 then :
-  case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess no on native Windows.
-         mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-                        # If we don't know, assume the worst.
-         *)             gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-       esac
+  printf %s "(cached) " >&6
+else $as_nop
+
+
 
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <float.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 'float.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_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_float_h
+           gl_cv_next_float_h='"'$gl_header'"'
 
-#       include <sys/types.h>
-#       include <sys/stat.h>
 
-int
-main (void)
-{
-return !mkdir ("conftest.dir/./", 0700);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_mkdir_trailing_dot_works=yes
-else
-  gl_cv_func_mkdir_trailing_dot_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
+printf "%s\n" "$gl_cv_next_float_h" >&6; }
+     fi
+     NEXT_FLOAT_H=$gl_cv_next_float_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='<'float.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_float_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+
 
-    rm -rf conftest.dir
 
 
+  fi
+
+   if test -n "$FLOAT_H"; then
+  GL_GENERATE_FLOAT_H_TRUE=
+  GL_GENERATE_FLOAT_H_FALSE='#'
+else
+  GL_GENERATE_FLOAT_H_TRUE='#'
+  GL_GENERATE_FLOAT_H_FALSE=
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
-printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
-  case "$gl_cv_func_mkdir_trailing_dot_works" in
-    *yes) ;;
-    *)
-      REPLACE_MKDIR=1
 
-printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
 
-      ;;
-  esac
 
-  if test $REPLACE_MKDIR = 1; then
+  if test $REPLACE_FLOAT_LDBL = 1; then
 
 
 
@@ -25204,122 +26814,198 @@ printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
 
   fi
+  if test $REPLACE_ITOLD = 1; then
 
 
 
 
-  if test $ac_cv_func_mkstemp = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
-printf %s "checking for working mkstemp... " >&6; }
-if test ${gl_cv_func_working_mkstemp+y}
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
+
+  fi
+
+
+
+
+     gl_fnmatch_required_lowercase=`
+    echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
+  `
+
+  if test $ac_cv_func_fnmatch = no; then
+    HAVE_FNMATCH=0
+  else
+    gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
+printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
+if eval test \${$gl_fnmatch_cache_var+y}
 then :
   printf %s "(cached) " >&6
-else
-
-        mkdir conftest.mkstemp
-        if test "$cross_compiling" = yes
+else $as_nop
+                                     if test $gl_fnmatch_required = GNU; then
+         gl_fnmatch_gnu_start=
+         gl_fnmatch_gnu_end=
+       else
+         gl_fnmatch_gnu_start='#if 0'
+         gl_fnmatch_gnu_end='#endif'
+       fi
+       if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                            # Guess yes on glibc systems.
-             *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
-                            # Guess no on native Windows.
-             mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
-                            # If we don't know, assume the worst.
-             *)             gl_cv_func_working_mkstemp="guessing no" ;;
-           esac
+                     # 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\"" ;;
+          esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <fnmatch.h>
+              static int
+              y (char const *pattern, char const *string, int flags)
+              {
+                return fnmatch (pattern, string, flags) == 0;
+              }
+              static int
+              n (char const *pattern, char const *string, int flags)
+              {
+                return fnmatch (pattern, string, flags) == FNM_NOMATCH;
+              }
+
 int
 main (void)
 {
-int result = 0;
-              int i;
-              off_t large = (off_t) 4294967295u;
-              if (large < 0)
-                large = 2147483647;
-              umask (0);
-              for (i = 0; i < 70; i++)
-                {
-                  char templ[] = "conftest.mkstemp/coXXXXXX";
-                  int (*mkstemp_function) (char *) = mkstemp;
-                  int fd = mkstemp_function (templ);
-                  if (fd < 0)
-                    result |= 1;
-                  else
-                    {
-                      struct stat st;
-                      if (lseek (fd, large, SEEK_SET) != large)
-                        result |= 2;
-                      if (fstat (fd, &st) < 0)
-                        result |= 4;
-                      else if (st.st_mode & 0077)
-                        result |= 8;
-                      if (close (fd))
-                        result |= 16;
-                    }
-                }
+char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
+              char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
+              static char const A_1[] = { 'A' - 1, 0 };
+              static char const A01[] = { 'A' + 1, 0 };
+              static char const a_1[] = { 'a' - 1, 0 };
+              static char const a01[] = { 'a' + 1, 0 };
+              static char const bs_1[] = { '\\\\' - 1, 0 };
+              static char const bs01[] = { '\\\\' + 1, 0 };
+              int result = 0;
+              if (!n ("a*", "", 0))
+                return 1;
+              if (!y ("a*", "abc", 0))
+                return 1;
+              if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
+                return 1;
+              if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
+                return 2;
+              if (!y ("a\\\\bc", "abc", 0))
+                return 3;
+              if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
+                return 3;
+              if (!y ("*x", ".x", 0))
+                return 4;
+              if (!n ("*x", ".x", FNM_PERIOD))
+                return 4;
+              if (!y (Apat, "\\\\", 0))
+                return 5;
+              if (!y (Apat, "A", 0))
+                return 5;
+              if (!y (apat, "\\\\", 0))
+                return 5;
+              if (!y (apat, "a", 0))
+                return 5;
+              if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
+                return 5;
+              if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
+                return 5;
+              if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
+                return 5;
+              if (!(y (apat, a01, 0) == ('a' < '\\\\')))
+                return 5;
+              if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
+                return 5;
+              if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
+                return 5;
+              if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
+                return 5;
+              if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
+                return 5;
+              $gl_fnmatch_gnu_start
+              if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
+                result |= 8;
+              if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
+                result |= 16;
+              if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
+                result |= 32;
+              if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
+                result |= 64;
+              if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
+                result |= 64;
+              if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
+                result |= 64;
+              $gl_fnmatch_gnu_end
               return result;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_working_mkstemp=yes
-else
-  gl_cv_func_working_mkstemp=no
+  eval "$gl_fnmatch_cache_var=yes"
+else $as_nop
+  eval "$gl_fnmatch_cache_var=no"
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-        rm -rf conftest.mkstemp
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
-printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
-    case "$gl_cv_func_working_mkstemp" in
+eval ac_res=\$$gl_fnmatch_cache_var
+              { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+    eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
+    case "$gl_fnmatch_result" in
       *yes) ;;
-      *)
-        REPLACE_MKSTEMP=1
-        ;;
+      *) REPLACE_FNMATCH=1 ;;
     esac
-  else
-    HAVE_MKSTEMP=0
   fi
+  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
-  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
 
 
 
 
 
+  FNMATCH_H='fnmatch.h'
+   if test -n "$FNMATCH_H"; then
+  GL_GENERATE_FNMATCH_H_TRUE=
+  GL_GENERATE_FNMATCH_H_FALSE='#'
+else
+  GL_GENERATE_FNMATCH_H_TRUE='#'
+  GL_GENERATE_FNMATCH_H_FALSE=
+fi
 
 
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
+  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
 
 
-  fi
 
 
 
 
 
-          GNULIB_MKSTEMP=1
+  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
+  fi
 
 
 
@@ -25328,24 +27014,14 @@ printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
 
 
 
-  REPLACE_MKTIME=0
-  if test "$gl_cv_func_working_mktime" != yes; then
-    REPLACE_MKTIME=1
 
-printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
+          GL_GNULIB_FNMATCH=1
 
-  fi
-  case "$host_os" in
-    mingw*)
-      REPLACE_MKTIME=1
 
-printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
 
-      ;;
-  esac
 
-  if test $REPLACE_MKTIME = 1; then
 
+printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
 
 
 
@@ -25353,60 +27029,102 @@ printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
 
-    :
-  fi
+  if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
 
 
 
 
-          GNULIB_MKTIME=1
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
 
 
-printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
 
 
 
+  fi
 
 
+printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
+
 
-  WANT_MKTIME_INTERNAL=0
-    ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
-if test "x$ac_cv_func___mktime_internal" = xyes
-then :
 
-printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
 
 
-else
-            WANT_MKTIME_INTERNAL=1
 
-printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
 
 
-fi
 
 
-  if test $WANT_MKTIME_INTERNAL = 1; then
 
+  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 $as_nop
 
+          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 $as_nop
+  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 $as_nop
+  gl_cv_func_fopen_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+          rm -f conftest.sl
 
+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)
 
-  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
+printf "%s\n" "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
 
-    :
-  fi
+      REPLACE_FOPEN=1
+      ;;
+  esac
 
-  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+  if test $REPLACE_FOPEN = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
 
+    :
   fi
 
-  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
+          GL_GNULIB_FOPEN=1
 
-  fi
 
 
-printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
 
 
+printf "%s\n" "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
 
 
 
 
 
-     if test $ac_cv_func_nl_langinfo = yes; then
-    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
-printf %s "checking whether YESEXPR works... " >&6; }
-if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'x'" >&5
+printf %s "checking whether fopen supports the mode character 'x'... " >&6; }
+if test ${gl_cv_func_fopen_mode_x+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+  rm -f conftest.x
+     if test "$cross_compiling" = yes
 then :
+  case "$host_os" in
+          # Guess yes on glibc and musl systems.
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+            gl_cv_func_fopen_mode_x="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *)
+            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
+        esac
 
-         case "$host_os" in
-                   # Guess no on irix systems.
-           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
-                   # Guess yes elsewhere.
-           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
-         esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <langinfo.h>
 
-int
-main (void)
+#include <stdio.h>
+#include <errno.h>
+int main ()
 {
-return !*nl_langinfo(YESEXPR);
-
-  ;
-  return 0;
+  FILE *fp;
+  fp = fopen ("conftest.x", "w");
+  fclose (fp);
+  fp = fopen ("conftest.x", "wx");
+  if (fp != NULL)
+    /* 'x' ignored */
+    return 1;
+  else if (errno == EEXIST)
+    return 0;
+  else
+    /* 'x' rejected */
+    return 2;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_nl_langinfo_yesexpr_works=yes
-else
-  gl_cv_func_nl_langinfo_yesexpr_works=no
+  gl_cv_func_fopen_mode_x=yes
+else $as_nop
+  gl_cv_func_fopen_mode_x=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+     rm -f conftest.x
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
-printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
-    case $gl_cv_func_nl_langinfo_yesexpr_works in
-      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
-      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
-    esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_x" >&5
+printf "%s\n" "$gl_cv_func_fopen_mode_x" >&6; }
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fopen supports the mode character 'e'" >&5
+printf %s "checking whether fopen supports the mode character 'e'... " >&6; }
+if test ${gl_cv_func_fopen_mode_e+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  echo foo > conftest.x
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+          # Guess yes on glibc and musl systems.
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+            gl_cv_func_fopen_mode_e="guessing yes" ;;
+          # Guess no on native Windows.
+          mingw*)
+            gl_cv_func_fopen_mode_e="guessing no" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *)
+            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
+        esac
 
-printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    if test $HAVE_LANGINFO_CODESET = 1 \
-       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
-       && test $HAVE_LANGINFO_ALTMON = 1 \
-       && test $HAVE_LANGINFO_ERA = 1 \
-       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
-      :
-    else
-      REPLACE_NL_LANGINFO=1
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
 
-printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
 
-    fi
+$gl_mda_defines
+
+int main ()
+{
+  FILE *fp = fopen ("conftest.x", "re");
+  if (fp != NULL)
+    {
+      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
+        return 0;
+      else
+        /* 'e' ignored */
+        return 1;
+    }
   else
-    HAVE_NL_LANGINFO=0
-  fi
+    /* 'e' rejected */
+    return 2;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_fopen_mode_e=yes
+else $as_nop
+  gl_cv_func_fopen_mode_e=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
+     rm -f conftest.x
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_mode_e" >&5
+printf "%s\n" "$gl_cv_func_fopen_mode_e" >&6; }
+  case "$gl_cv_func_fopen_mode_x" in
+    *no) REPLACE_FOPEN=1 ;;
+  esac
+  case "$gl_cv_func_fopen_mode_e" in
+    *no) REPLACE_FOPEN=1 ;;
+  esac
 
+  if test $REPLACE_FOPEN = 1; then
 
 
 
@@ -25519,118 +27291,199 @@ printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
 
+  gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
+
+    :
   fi
 
 
+printf "%s\n" "#define GNULIB_FOPEN_GNU 1" >>confdefs.h
+
+
 
 
 
-          GNULIB_NL_LANGINFO=1
+                          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
+printf %s "checking whether free is known to preserve errno... " >&6; }
+if test ${gl_cv_func_free_preserves_errno+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
+int
+main (void)
+{
+#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
+            #elif defined __OpenBSD__
+            #elif defined __sun
+            #else
+              #error "'free' is not known to preserve errno"
+            #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func_free_preserves_errno=yes
+else $as_nop
+  gl_cv_func_free_preserves_errno=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
+printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
 
+  case $gl_cv_func_free_preserves_errno in
+   *yes)
 
-printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
+printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
 
+    ;;
+   *) REPLACE_FREE=1 ;;
+  esac
 
+  if test $REPLACE_FREE = 1; then
 
 
- # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
 
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FREE_POSIX=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
 
-printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
 
 
 
 
 
   case "$host_os" in
-    mingw* | pw*)
-      REPLACE_OPEN=1
+    mingw* | pw* | os2*)
+      REPLACE_FREOPEN=1
       ;;
     *)
-
-      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
-        REPLACE_OPEN=1
-      fi
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
-printf %s "checking whether open recognizes a trailing slash... " >&6; }
-if test ${gl_cv_func_open_slash+y}
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
+printf %s "checking whether freopen works on closed fds... " >&6; }
+if test ${gl_cv_func_freopen_works_on_closed+y}
 then :
   printf %s "(cached) " >&6
-else
-  # Assume that if we have lstat, we can also check symlinks.
-          if test $ac_cv_func_lstat = yes; then
-            touch conftest.tmp
-            ln -s conftest.tmp conftest.lnk
-          fi
-          if test "$cross_compiling" = yes
+else $as_nop
+  if test "$cross_compiling" = yes
 then :
-
-             case "$host_os" in
-               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
-                 gl_cv_func_open_slash="guessing no" ;;
-               *)
-                 gl_cv_func_open_slash="guessing yes" ;;
-             esac
-
-else
+  case $host_os in
+              *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
+              *)     gl_cv_func_freopen_works_on_closed="guessing yes";;
+            esac
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdio.h>
+                #include <unistd.h>
 
-#include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-int main ()
+
+$gl_mda_defines
+
+int
+main (void)
 {
-  int result = 0;
-#if HAVE_LSTAT
-  if (open ("conftest.lnk/", O_RDONLY) != -1)
-    result |= 1;
-#endif
-  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
-    result |= 2;
-  return result;
+close (0);
+                return !(freopen ("/dev/null", "r", stdin)
+                         && getchar () == EOF
+                         && !ferror (stdin) && feof (stdin));
+  ;
+  return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_open_slash=yes
-else
-  gl_cv_func_open_slash=no
+  gl_cv_func_freopen_works_on_closed=yes
+else $as_nop
+  gl_cv_func_freopen_works_on_closed=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-          rm -f conftest.sl conftest.tmp conftest.lnk
-
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
-printf "%s\n" "$gl_cv_func_open_slash" >&6; }
-      case "$gl_cv_func_open_slash" in
-        *no)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
+printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
+      case $gl_cv_func_freopen_works_on_closed in
+        *no) REPLACE_FREOPEN=1;;
+      esac
+  esac
 
-printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+  if test $REPLACE_FREOPEN = 1; then
 
-          REPLACE_OPEN=1
-          ;;
-      esac
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FREOPEN=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
+
+
+
+
+
+
+
+  case "$host_os" in
+    mingw* | solaris*)
+                        REPLACE_FSTAT=1
       ;;
   esac
 
 
 
-  if test $REPLACE_OPEN = 1; then
+  if test $REPLACE_FSTAT = 1; then
 
 
 
@@ -25639,7 +27492,22 @@ printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
+
+    case "$host_os" in
+      mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
+
+        ;;
+    esac
 
 
 
@@ -25651,97 +27519,123 @@ printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
 
 
 
-          GNULIB_OPEN=1
 
 
 
 
+          GL_GNULIB_FSTAT=1
 
-printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
 
 
-  ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
-"
-if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+
+
+
+
+
+
+  if test $ac_cv_func_getdtablesize = yes &&
+     test $ac_cv_have_decl_getdtablesize = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
+printf %s "checking whether getdtablesize works... " >&6; }
+if test ${gl_cv_func_getdtablesize_works+y}
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+  printf %s "(cached) " >&6
+else $as_nop
+                                                   case "$host_os" in
+         vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
+         *)
+                                                       if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+                  gl_cv_func_getdtablesize_works="guessing no" ;;
+                *) gl_cv_func_getdtablesize_works="guessing yes" ;;
+              esac
 
-printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
-"
-if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+             #include <unistd.h>
+
+
+$gl_mda_defines
+
+
+int
+main (void)
+{
+int size = getdtablesize();
+                 if (dup2 (0, getdtablesize()) != -1)
+                   return 1;
+                 if (size != getdtablesize())
+                   return 2;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  gl_cv_func_getdtablesize_works=yes
+else $as_nop
+  gl_cv_func_getdtablesize_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
+           ;;
+       esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
+printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
+    case "$gl_cv_func_getdtablesize_works" in
+      *yes | "no (limitation)") ;;
+      *) REPLACE_GETDTABLESIZE=1 ;;
+    esac
+  else
+    HAVE_GETDTABLESIZE=0
+  fi
 
+  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
 
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
 
 
-      :
 
+  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
 
-  :
+    :
+  fi
 
 
 
 
-  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
-if test "x$ac_cv_func_raise" = xyes
-then :
-  printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
 
-fi
 
-  if test $ac_cv_func_raise = no; then
-    HAVE_RAISE=0
-  else
 
 
-      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-        REPLACE_RAISE=1
-      fi
 
+          GL_GNULIB_GETDTABLESIZE=1
 
 
 
 
-  if test $gl_cv_type_sigset_t = yes; then
-    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
-if test "x$ac_cv_func_sigprocmask" = xyes
-then :
-  gl_cv_func_sigprocmask=1
-fi
 
-  fi
-  if test -z "$gl_cv_func_sigprocmask"; then
-    HAVE_POSIX_SIGNALBLOCKING=0
-  fi
+printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
 
-      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
-        :
-      fi
 
-  fi
 
-  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
 
-    :
+    REPLACE_GETOPT=0
+    if test -n "$gl_replace_getopt"; then
+      REPLACE_GETOPT=1
+    fi
+
+  if test $REPLACE_GETOPT = 1; then
+
+
+  if test $ac_cv_header_sys_cdefs_h = yes; then
+    HAVE_SYS_CDEFS_H=1
+  else
+    HAVE_SYS_CDEFS_H=0
   fi
 
 
 
+printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
 
+  GETOPT_H=getopt.h
+  GETOPT_CDEFS_H=getopt-cdefs.h
 
-          GNULIB_RAISE=1
 
 
+  fi
 
+  if test $REPLACE_GETOPT = 1; then
 
 
-printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
 
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
 
-  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
-if test "x$ac_cv_func_rawmemchr" = xyes
-then :
-  printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
 
-fi
 
-  if test $ac_cv_func_rawmemchr = no; then
-    HAVE_RAWMEMCHR=0
-  fi
 
-  if test $HAVE_RAWMEMCHR = 0; then
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
 
-    :
+
+
+
+  GL_GNULIB_UNISTD_H_GETOPT=1
+
+
   fi
 
 
 
 
 
-          GNULIB_RAWMEMCHR=1
 
 
 
 
+          GL_GNULIB_GETOPT_POSIX=1
 
-printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
 
 
-  if test $ac_cv_func_readlink = no; then
-    HAVE_READLINK=0
-  else
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
-printf %s "checking whether readlink signature is correct... " >&6; }
-if test ${gl_cv_decl_readlink_works+y}
+
+
+
+
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
+printf %s "checking for getpagesize... " >&6; }
+if test ${gl_cv_func_getpagesize+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
-      /* Cause compilation failure if original declaration has wrong type.  */
-      ssize_t readlink (const char *, char *, size_t);
 int
 main (void)
 {
-
+return getpagesize();
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_decl_readlink_works=yes
-else
-  gl_cv_decl_readlink_works=no
+  gl_cv_func_getpagesize=yes
+else $as_nop
+  gl_cv_func_getpagesize=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
-printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
-            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
-printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
-if test ${gl_cv_func_readlink_works+y}
-then :
-  printf %s "(cached) " >&6
-else
-  # We have readlink, so assume ln -s works.
-       ln -s conftest.no-such conftest.link
-       ln -s conftest.link conftest.lnk2
-       if test "$cross_compiling" = yes
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
+printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
+
+  if test $gl_cv_func_getpagesize = no; then
+    HAVE_GETPAGESIZE=0
+    ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = xyes
 then :
-  case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
-                             # If we don't know, assume the worst.
-            *)               gl_cv_func_readlink_works="guessing no" ;;
-          esac
+  printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
+fi
 
-int
-main (void)
-{
-char buf[20];
-      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+    if test $ac_cv_header_OS_h = yes; then
+      HAVE_OS_H=1
+    fi
+    ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
 then :
-  gl_cv_func_readlink_works=yes
-else
-  gl_cv_func_readlink_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
 fi
 
-      rm -f conftest.link conftest.lnk2
+    if test $ac_cv_header_sys_param_h = yes; then
+      HAVE_SYS_PARAM_H=1
+    fi
+  fi
+  case "$host_os" in
+    mingw*)
+      REPLACE_GETPAGESIZE=1
+      ;;
+  esac
+      ac_fn_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_getpagesize" = xyes
+then :
+
+else $as_nop
+  HAVE_DECL_GETPAGESIZE=0
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
-printf "%s\n" "$gl_cv_func_readlink_works" >&6; }
-    case "$gl_cv_func_readlink_works" in
-      *yes)
-        if test "$gl_cv_decl_readlink_works" != yes; then
-          REPLACE_READLINK=1
-        fi
-        ;;
-      *)
 
-printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+  if test $REPLACE_GETPAGESIZE = 1; then
 
-        REPLACE_READLINK=1
-        ;;
-    esac
-  fi
 
-  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
 
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
 
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_READLINK=1
+          GL_GNULIB_GETPAGESIZE=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
 
 
 
 
 
-# Check whether --with-included-regex was given.
-if test ${with_included_regex+y}
+
+  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"
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes
 then :
-  withval=$with_included_regex;
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+  ac_found=1
 fi
 
+  ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+  ac_found=1
+fi
 
-  case $with_included_regex in #(
-  yes|no) ac_use_included_regex=$with_included_regex
-        ;;
-  '')
-    # If the system regex support is good enough that it passes the
-    # following run test, then default to *not* using the included regex.c.
-    # If cross compiling, assume the test would fail and use the included
-    # regex.c.
+  ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl___argv" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
+if test $ac_have_decl = 1
+then :
+  ac_found=1
+fi
 
 
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
-printf %s "checking for working re_compile_pattern... " >&6; }
-if test ${gl_cv_func_re_compile_pattern_working+y}
+  # Incur the cost of this test only if none of the above worked.
+  if test $ac_found = 0; then
+    # On OpenBSD 5.1, using the global __progname variable appears to be
+    # the only way to implement getprogname.
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
+printf %s "checking whether __progname is defined in default libraries... " >&6; }
+if test ${gl_cv_var___progname+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+
+        gl_cv_var___progname=
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern char *__progname;
+int
+main (void)
+{
+return *__progname;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  case "$host_os" in
-                   # Guess no on native Windows.
-           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
-                   # Otherwise, assume it is not working.
-           *)      gl_cv_func_re_compile_pattern_working="guessing no" ;;
-         esac
+  gl_cv_var___progname=yes
 
-else
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
+printf "%s\n" "$gl_cv_var___progname" >&6; }
+    if test "$gl_cv_var___progname" = yes; then
+
+printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
+
+    fi
+  fi
+
+
+
+
+
+  if test "$ac_cv_func_getrandom" != yes; then
+    HAVE_GETRANDOM=0
+  else
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
+printf %s "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
+if test ${gl_cv_func_getrandom_ok+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <regex.h>
+/* Additional includes are needed before <sys/random.h> on uClibc
+                 and Mac OS X.  */
+              #include <sys/types.h>
+              #include <stdlib.h>
+              #include <sys/random.h>
+              ssize_t getrandom (void *, size_t, unsigned int);
 
-            #include <locale.h>
-            #include <limits.h>
-            #include <string.h>
+int
+main (void)
+{
 
-            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
-            # include <signal.h>
-            # include <unistd.h>
-            #endif
+  ;
+  return 0;
+}
 
-            #if HAVE_MALLOC_H
-            # include <malloc.h>
-            #endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func_getrandom_ok=yes
+else $as_nop
+  gl_cv_func_getrandom_ok=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
-            #ifdef M_CHECK_ACTION
-            /* Exit with distinguishable exit code.  */
-            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
-            #endif
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
+printf "%s\n" "$gl_cv_func_getrandom_ok" >&6; }
+    if test $gl_cv_func_getrandom_ok = no; then
+      REPLACE_GETRANDOM=1
+    fi
+  fi
+
+  case "$host_os" in
+    mingw*)
+      ac_fn_c_check_header_compile "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
+
+"
+if test "x$ac_cv_header_bcrypt_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_BCRYPT_H 1" >>confdefs.h
+
+fi
 
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
+printf %s "checking whether the bcrypt library is guaranteed to be present... " >&6; }
+if test ${gl_cv_lib_assume_bcrypt+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <windows.h>
 int
 main (void)
 {
-int result = 0;
-            static struct re_pattern_buffer regex;
-            unsigned char folded_chars[UCHAR_MAX + 1];
-            int i;
-            const char *s;
-            struct re_registers regs;
-
-            /* Some builds of glibc go into an infinite loop on this
-               test.  Use alarm to force death, and mallopt to avoid
-               malloc recursion in diagnosing the corrupted heap. */
-#if HAVE_DECL_ALARM
-            signal (SIGALRM, SIG_DFL);
-            alarm (2);
-#endif
-#ifdef M_CHECK_ACTION
-            signal (SIGABRT, sigabrt_no_core);
-            mallopt (M_CHECK_ACTION, 2);
-#endif
-
-            if (setlocale (LC_ALL, "en_US.UTF-8"))
-              {
-                {
-                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
-                     This test needs valgrind to catch the bug on Debian
-                     GNU/Linux 3.1 x86, but it might catch the bug better
-                     on other platforms and it shouldn't hurt to try the
-                     test here.  */
-                  static char const pat[] = "insert into";
-                  static char const data[] =
-                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
-                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
-                                 | RE_ICASE);
-                  memset (&regex, 0, sizeof regex);
-                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
-                  if (s)
-                    result |= 1;
-                  else if (re_search (&regex, data, sizeof data - 1,
-                                      0, sizeof data - 1, &regs)
-                           != -1)
-                    result |= 1;
-                  regfree (&regex);
-                }
-
-                {
-                  /* This test is from glibc bug 15078.
-                     The test case is from Andreas Schwab in
-                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
-                     */
-                  static char const pat[] = "[^x]x";
-                  static char const data[] =
-                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
-                    "\xe1\x80\x80"
-                    "\xe1\x80\xbb"
-                    "\xe1\x80\xbd"
-                    "\xe1\x80\x94"
-                    "\xe1\x80\xba"
-                    "\xe1\x80\xaf"
-                    "\xe1\x80\x95"
-                    "\xe1\x80\xba"
-                    "x";
-                  re_set_syntax (0);
-                  memset (&regex, 0, sizeof regex);
-                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
-                  if (s)
-                    result |= 1;
-                  else
-                    {
-                      i = re_search (&regex, data, sizeof data - 1,
-                                     0, sizeof data - 1, 0);
-                      if (i != 0 && i != 21)
-                        result |= 1;
-                    }
-                  regfree (&regex);
-                }
-
-                if (! setlocale (LC_ALL, "C"))
-                  return 1;
-              }
-
-            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
-            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("a[^x]b", 6, &regex);
-            if (s)
-              result |= 2;
-            /* This should fail, but succeeds for glibc-2.5.  */
-            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
-              result |= 2;
-
-            /* This regular expression is from Spencer ere test number 75
-               in grep-2.3.  */
-            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
-            memset (&regex, 0, sizeof regex);
-            for (i = 0; i <= UCHAR_MAX; i++)
-              folded_chars[i] = i;
-            regex.translate = folded_chars;
-            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
-            /* This should fail with _Invalid character class name_ error.  */
-            if (!s)
-              result |= 4;
-
-            /* Ensure that [b-a] is diagnosed as invalid, when
-               using RE_NO_EMPTY_RANGES. */
-            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("a[b-a]", 6, &regex);
-            if (s == 0)
-              result |= 8;
-
-            /* This should succeed, but does not for glibc-2.1.3.  */
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("{1", 2, &regex);
-            if (s)
-              result |= 8;
-
-            /* The following example is derived from a problem report
-               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[an\371]*n", 7, &regex);
-            if (s)
-              result |= 8;
-            /* This should match, but does not for glibc-2.2.1.  */
-            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
-              result |= 8;
-
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("x", 1, &regex);
-            if (s)
-              result |= 8;
-            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
-            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
-              result |= 8;
-
-            /* The version of regex.c in older versions of gnulib
-               ignored RE_ICASE.  Detect that problem too.  */
-            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("x", 1, &regex);
-            if (s)
-              result |= 16;
-            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
-              result |= 16;
-
-            /* Catch a bug reported by Vin Shelton in
-               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
-               */
-            re_set_syntax (RE_SYNTAX_POSIX_BASIC
-                           & ~RE_CONTEXT_INVALID_DUP
-                           & ~RE_NO_EMPTY_RANGES);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
-            if (s)
-              result |= 32;
-
-            /* REG_STARTEND was added to glibc on 2004-01-15.
-               Reject older versions.  */
-            if (! REG_STARTEND)
-              result |= 64;
-
-            /* Matching with the compiled form of this regexp would provoke
-               an assertion failure prior to glibc-2.28:
-                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
-               With glibc-2.28, compilation fails and reports the invalid
-               back reference.  */
-            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
-            memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
-            if (!s || strcmp (s, "Invalid back reference"))
-              result |= 64;
-
-#if 0
-            /* It would be nice to reject hosts whose regoff_t values are too
-               narrow (including glibc on hosts with 64-bit ptrdiff_t and
-               32-bit int), but we should wait until glibc implements this
-               feature.  Otherwise, support for equivalence classes and
-               multibyte collation symbols would always be broken except
-               when compiling --without-included-regex.   */
-            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
-                || sizeof (regoff_t) < sizeof (ssize_t))
-              result |= 64;
-#endif
-
-            return result;
+#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
+                  cannot assume it
+                #endif
 
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_re_compile_pattern_working=yes
-else
-  gl_cv_func_re_compile_pattern_working=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_lib_assume_bcrypt=yes
+else $as_nop
+  gl_cv_lib_assume_bcrypt=no
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
-printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
-    case "$gl_cv_func_re_compile_pattern_working" in #(
-      *yes) ac_use_included_regex=no;; #(
-      *no) ac_use_included_regex=yes;;
-    esac
-    ;;
-  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
-    ;;
-  esac
-
-  if test $ac_use_included_regex = yes; then
-
-printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
-
-
-printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
-
-
-printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
-
-
-printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
+printf "%s\n" "$gl_cv_lib_assume_bcrypt" >&6; }
+      if test $gl_cv_lib_assume_bcrypt = yes; then
 
+printf "%s\n" "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
 
-printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
-
-
-printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
-
-
-printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
-
-
-printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
-
-
-printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
+        LIB_GETRANDOM='-lbcrypt'
+      else
+        LIB_GETRANDOM='-ladvapi32'
+      fi
+      ;;
+    *)
+      LIB_GETRANDOM= ;;
+  esac
 
 
-printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
+  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
 
 
-printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
 
 
-printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
 
 
-printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
 
 
-printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
+  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
 
+  fi
 
-printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
 
 
-printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
 
 
-printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
 
-  fi
 
-  if test $ac_use_included_regex = yes; then
 
 
+          GL_GNULIB_GETRANDOM=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
 
-  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
 
 
 
@@ -26283,193 +28053,164 @@ printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
 
 
 
-  ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
-if test "x$ac_cv_header_libintl_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
 
-fi
 
 
-  ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
-"
-if test "x$ac_cv_have_decl_isblank" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
 
 
-  fi
 
 
-     if test $ac_cv_func_setenv = no; then
-    HAVE_SETENV=0
+  gl_gettimeofday_timezone=void
+  if test $ac_cv_func_gettimeofday != yes; then
+    HAVE_GETTIMEOFDAY=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}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+printf %s "checking for gettimeofday with POSIX signature... " >&6; }
+if test ${gl_cv_func_gettimeofday_posix_signature+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
-                        # If we don't know, assume the worst.
-         *)             gl_cv_func_setenv_works="guessing no" ;;
-       esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-       #include <stdlib.h>
-       #include <errno.h>
-       #include <string.h>
+#include <sys/time.h>
+              struct timeval c;
+              int gettimeofday (struct timeval *restrict, void *restrict);
 
 int
 main (void)
 {
+/* glibc uses struct timezone * rather than the POSIX void *
+                 if _GNU_SOURCE is defined.  However, since the only portable
+                 use of gettimeofday uses NULL as the second parameter, and
+                 since the glibc definition is actually more typesafe, it is
+                 not worth wrapping this to get a compliant signature.  */
+              int (*f) (struct timeval *restrict, void *restrict)
+                = gettimeofday;
+              int x = f (&c, 0);
+              return !(x | c.tv_sec | c.tv_usec);
 
-       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_compile "$LINENO"
+then :
+  gl_cv_func_gettimeofday_posix_signature=yes
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main (void)
+{
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_setenv_works=yes
-else
-  gl_cv_func_setenv_works=no
+  gl_cv_func_gettimeofday_posix_signature=almost
+else $as_nop
+  gl_cv_func_gettimeofday_posix_signature=no
 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
 fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 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
-        ;;
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+    if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+      gl_gettimeofday_timezone='struct timezone'
+    elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+        if test $REPLACE_STRUCT_TIMEVAL = 1; then
+      REPLACE_GETTIMEOFDAY=1
+    fi
+            case "$host_os" in
+      mingw*) REPLACE_GETTIMEOFDAY=1 ;;
     esac
   fi
 
-  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
-
-  fi
+printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
 
 
+  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
 
 
 
-          GNULIB_SETENV=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
+  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
 
+    :
+  fi
 
 
 
 
 
-  if test $ac_cv_func_sigaction = yes; then
-    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
-"
-if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
 
 
-fi
 
-    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
-      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
-    fi
-  else
-    HAVE_SIGACTION=0
-  fi
+          GL_GNULIB_GETTIMEOFDAY=1
 
-  if test $HAVE_SIGACTION = 0; then
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
+   if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
+  GNU_MAKE_TRUE=
+  GNU_MAKE_FALSE='#'
+else
+  GNU_MAKE_TRUE='#'
+  GNU_MAKE_FALSE=
+fi
 
 
+  # Autoconf 2.61a.99 and earlier don't support linking a file only
+  # in VPATH builds.  But since GNUmakefile is for maintainer use
+  # only, it does not matter if we skip the link with older autoconf.
+  # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+  # builds, so use a shell variable to bypass this.
+  GNUmakefile=GNUmakefile
+  ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
 
 
+  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
 
 
 
-  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
-#include <signal.h>
 
-"
-if test "x$ac_cv_type_siginfo_t" = xyes
-then :
 
-printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
 
 
-fi
 
-  if test $ac_cv_type_siginfo_t = no; then
-    HAVE_SIGINFO_T=0
-  fi
 
-  fi
 
 
 
 
+          GL_GNULIB_ICONV=1
 
-          GNULIB_SIGACTION=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
 
 
 
@@ -26478,107 +28219,80 @@ printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
 
 
 
+  if test "$am_cv_func_iconv" = yes; then
 
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_signal_h='<'signal.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
-printf %s "checking absolute name of <signal.h>... " >&6; }
-if test ${gl_cv_next_signal_h+y}
-then :
-  printf %s "(cached) " >&6
+  ICONV_H='iconv.h'
+   if test -n "$ICONV_H"; then
+  GL_GENERATE_ICONV_H_TRUE=
+  GL_GENERATE_ICONV_H_FALSE='#'
 else
+  GL_GENERATE_ICONV_H_TRUE='#'
+  GL_GENERATE_ICONV_H_FALSE=
+fi
 
 
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <signal.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 'signal.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_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+      #include <iconv.h>
+      #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
+       gnu_iconv
+      #endif
 
-           gl_header=$gl_cv_absolute_signal_h
-           gl_cv_next_signal_h='"'$gl_header'"'
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gnu_iconv" >/dev/null 2>&1
+then :
+  gl_func_iconv_gnu=yes
+else $as_nop
+  gl_func_iconv_gnu=no
+fi
+rm -rf conftest*
 
+    if test $gl_func_iconv_gnu = no; then
+      iconv_flavor=
+      case "$host_os" in
+        aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
+        irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
+        hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
+        osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
+        solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+        openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
+      esac
+      if test -n "$iconv_flavor"; then
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
-printf "%s\n" "$gl_cv_next_signal_h" >&6; }
-     fi
-     NEXT_SIGNAL_H=$gl_cv_next_signal_h
+printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.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='<'signal.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_signal_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
 
 
 
 
 
-# AIX declares sig_atomic_t to already include volatile, and C89 compilers
-# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
-  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
-#include <signal.h>
 
-"
-if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
-then :
 
+  ICONV_H='iconv.h'
+   if test -n "$ICONV_H"; then
+  GL_GENERATE_ICONV_H_TRUE=
+  GL_GENERATE_ICONV_H_FALSE='#'
 else
-  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+  GL_GENERATE_ICONV_H_TRUE='#'
+  GL_GENERATE_ICONV_H_FALSE=
 fi
 
 
+  REPLACE_ICONV_OPEN=1
 
+      fi
+    fi
 
+  fi
 
-
-
-  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
-#include <signal.h>
-
-"
-if test "x$ac_cv_type_sighandler_t" = xyes
-then :
-
-else
-  HAVE_SIGHANDLER_T=0
-fi
-
+  if test $REPLACE_ICONV_OPEN = 1; then
 
 
 
 
 
 
-  if test $gl_cv_type_sigset_t = yes; then
-    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
-if test "x$ac_cv_func_sigprocmask" = xyes
-then :
-  gl_cv_func_sigprocmask=1
-fi
+  gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
 
   fi
-  if test -z "$gl_cv_func_sigprocmask"; then
-    HAVE_POSIX_SIGNALBLOCKING=0
-  fi
+  if test $REPLACE_ICONV = 1; then
 
-  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
 
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
 
-  gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_SIGPROCMASK=1
 
 
+  gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
 
+  fi
 
 
-printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
-
-
-
-
-  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
-
-fi
-
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
-printf %s "checking for SIZE_MAX... " >&6; }
-if test ${gl_cv_size_max+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
+printf %s "checking whether the compiler generally respects inline... " >&6; }
+if test ${gl_cv_c_inline_effective+y}
 then :
   printf %s "(cached) " >&6
-else
-
-    gl_cv_size_max=
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <limits.h>
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-#ifdef SIZE_MAX
-Found it
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Found it" >/dev/null 2>&1
-then :
-  gl_cv_size_max=yes
-fi
-rm -rf conftest*
-
-    if test -z "$gl_cv_size_max"; then
-                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
-#include <limits.h>"
-then :
-
-else
-  size_t_bits_minus_1=
-fi
-
-      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
-then :
-
-else
-  fits_in_uint=
-fi
-
-      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
-        if test $fits_in_uint = 1; then
-                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  if test $ac_cv_c_inline = no; then
+       gl_cv_c_inline_effective=no
+     else
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-                 extern size_t foo;
-                 extern unsigned long foo;
 
 int
 main (void)
 {
-
+#ifdef __NO_INLINE__
+               #error "inline is not effective"
+             #endif
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  fits_in_uint=0
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        fi
-                                if test $fits_in_uint = 1; then
-          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
-        else
-          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
-        fi
-      else
-                gl_cv_size_max='((size_t)~(size_t)0)'
-      fi
-    fi
-
+  gl_cv_c_inline_effective=yes
+else $as_nop
+  gl_cv_c_inline_effective=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
-printf "%s\n" "$gl_cv_size_max" >&6; }
-  if test "$gl_cv_size_max" != yes; then
-
-printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
-
-  fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+     fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
-printf %s "checking for ssize_t... " >&6; }
-if test ${gt_cv_ssize_t+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-int
-main (void)
-{
-int x = sizeof (ssize_t *) + sizeof (ssize_t);
-            return !x;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gt_cv_ssize_t=yes
-else
-  gt_cv_ssize_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
-printf "%s\n" "$gt_cv_ssize_t" >&6; }
-  if test $gt_cv_ssize_t = no; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
+printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
+  if test $gl_cv_c_inline_effective = yes; then
 
-printf "%s\n" "#define ssize_t int" >>confdefs.h
+printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
 
   fi
 
 
 
 
+  :
 
-  case "$host_os" in
-    mingw*)
-                  REPLACE_STAT=1
-      ;;
-    *)
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
-printf %s "checking whether stat handles trailing slashes on files... " >&6; }
-if test ${gl_cv_func_stat_file_slash+y}
-then :
-  printf %s "(cached) " >&6
-else
-  touch conftest.tmp
-         # Assume that if we have lstat, we can also check symlinks.
-         if test $ac_cv_func_lstat = yes; then
-           ln -s conftest.tmp conftest.lnk
-         fi
-         if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                               # Guess yes on Linux systems.
-              linux-* | linux) 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, assume the worst.
-              *)               gl_cv_func_stat_file_slash="guessing no" ;;
-            esac
+  :
+  :
+  :
+  :
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/stat.h>
 
-int
-main (void)
-{
-int result = 0;
-               struct stat st;
-               if (!stat ("conftest.tmp/", &st))
-                 result |= 1;
-#if HAVE_LSTAT
-               if (!stat ("conftest.lnk/", &st))
-                 result |= 2;
-#endif
-               return result;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_stat_file_slash=yes
-else
-  gl_cv_func_stat_file_slash=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-         rm -f conftest.tmp conftest.lnk
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
-printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
-      case $gl_cv_func_stat_file_slash in
-        *no)
-          REPLACE_STAT=1
 
-printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
-;;
-      esac
-      case $host_os in
-                solaris*)
-          REPLACE_FSTAT=1 ;;
-      esac
-      ;;
-  esac
 
-  if test $REPLACE_STAT = 1; then
 
 
 
@@ -26844,11 +28390,12 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
 
 
 
+  if test $ac_cv_func_isblank = no; then
+    HAVE_ISBLANK=0
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
+  if test $HAVE_ISBLANK = 0; then
 
-    case "$host_os" in
-      mingw*)
 
 
 
@@ -26856,28 +28403,25 @@ printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
 
-  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
+  fi
 
-        ;;
-    esac
 
+printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_STAT=1
 
 
 
 
+          GL_GNULIB_ISBLANK=1
 
-printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
 
 
 
@@ -26885,523 +28429,424 @@ printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
 
 
 
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
-     #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
+  ac_fn_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
+    #include <wchar.h>
+    #include <wctype.h>
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
-printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
-if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_iswblank" = xyes
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
 
-            #include <sys/types.h>
-            #include <sys/stat.h>
-            #if HAVE_SYS_TIME_H
-            # include <sys/time.h>
-            #endif
-            #include <time.h>
-            struct timespec ts;
-            struct stat st;
+  if test $ac_cv_func_iswblank = no; then
+    HAVE_ISWBLANK=0
+    if test $ac_cv_have_decl_iswblank = yes; then
+      REPLACE_ISWBLANK=1
+    fi
+  fi
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  else
+    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
+            :
+    fi
+  fi
 
-int
-main (void)
-{
 
-            st.st_atim = ts;
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    :
+  else
+    if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
-else
-  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
-printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
-     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
 
-printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
 
-     fi
-else
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
-        #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
 
 
-else
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
-           #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
 
+  gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
 
-else
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
-              #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
-then :
+    fi
+  fi
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
 
 
-fi
 
-fi
 
-fi
 
-fi
 
 
 
+          GL_GNULIB_ISWBLANK=1
 
 
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
-     #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
 
 
-else
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
-        #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
-then :
+printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
 
 
-else
-  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
-          #include <sys/stat.h>
-"
-if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
-then :
 
-printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
 
 
-fi
 
-fi
 
-fi
 
 
 
-  STDARG_H=''
-  NEXT_STDARG_H='<stdarg.h>'
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
-printf %s "checking for va_copy... " >&6; }
-if test ${gl_cv_func_va_copy+y}
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswdigit is ISO C compliant" >&5
+printf %s "checking whether iswdigit is ISO C compliant... " >&6; }
+if test ${gl_cv_func_iswdigit_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+
+                     case "$host_os" in
+         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+           gl_cv_func_iswdigit_works="guessing no" ;;
+         # Guess yes otherwise.
+         *) gl_cv_func_iswdigit_works="guessing yes" ;;
+       esac
+       if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+         if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdarg.h>
-int
-main (void)
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
 {
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
 
-#ifndef va_copy
-void (*func) (va_list, va_list) = va_copy;
-#endif
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret != n)
+    abort ();
 
-  ;
-  return 0;
+  return iswdigit (wc);
 }
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_func_va_copy=yes
-else
-  gl_cv_func_va_copy=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
-printf "%s\n" "$gl_cv_func_va_copy" >&6; }
-  if test $gl_cv_func_va_copy = no; then
-                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined _AIX && !defined __GNUC__
-        AIX vaccine
-       #endif
+int
+main (int argc, char *argv[])
+{
+  int is;
+  int result = 0;
 
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      /* This fails on mingw, MSVC 14.  */
+      /* U+00B2 SUPERSCRIPT TWO */
+      is = for_character ("\262", 1);
+      if (!(is == 0))
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      /* This fails on NetBSD 8.0.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
+      /* U+0663 ARABIC-INDIC DIGIT THREE */
+      is = for_character ("\331\243", 2);
+      if (!(is == 0))
+        result |= 4;
+      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\357\274\221", 3);
+      if (!(is == 0))
+        result |= 8;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 16;
+    }
+  return result;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "vaccine" >/dev/null 2>&1
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_aixcc=yes
-else
-  gl_aixcc=no
+  gl_cv_func_iswdigit_works=yes
+else $as_nop
+  gl_cv_func_iswdigit_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -rf conftest*
 
-    if test $gl_aixcc = yes; then
-            STDARG_H=stdarg.h
+       fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswdigit_works" >&5
+printf "%s\n" "$gl_cv_func_iswdigit_works" >&6; }
+    case "$gl_cv_func_iswdigit_works" in
+      *yes) ;;
+      *) REPLACE_ISWDIGIT=1 ;;
+    esac
+  fi
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    :
+  else
+    if test $REPLACE_ISWDIGIT = 1; then
 
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdarg_h='<'stdarg.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
-printf %s "checking absolute name of <stdarg.h>... " >&6; }
-if test ${gl_cv_next_stdarg_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
 
+  gl_LIBOBJS="$gl_LIBOBJS iswdigit.$ac_objext"
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+    fi
+  fi
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdarg.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_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stdarg_h
-           gl_cv_next_stdarg_h='"'$gl_header'"'
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
-printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
-     fi
-     NEXT_STDARG_H=$gl_cv_next_stdarg_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='<'stdarg.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdarg_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
 
 
 
+          GL_GNULIB_ISWDIGIT=1
 
-            if test "$gl_cv_next_stdarg_h" = '""'; then
-        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
-        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
-      fi
-    else
 
-  saved_as_echo_n="$as_echo_n"
-  as_echo_n=':'
-  if test ${gl_cv_func___va_copy+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-int
-main (void)
-{
 
-#ifndef __va_copy
-error, bail out
-#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_func___va_copy=yes
-else
-  gl_cv_func___va_copy=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+printf "%s\n" "#define GNULIB_TEST_ISWDIGIT 1" >>confdefs.h
 
-  as_echo_n="$saved_as_echo_n"
 
-      if test $gl_cv_func___va_copy = yes; then
 
-printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
 
-      else
 
 
-printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
 
-      fi
-    fi
-  fi
 
-   if test -n "$STDARG_H"; then
-  GL_GENERATE_STDARG_H_TRUE=
-  GL_GENERATE_STDARG_H_FALSE='#'
-else
-  GL_GENERATE_STDARG_H_TRUE='#'
-  GL_GENERATE_STDARG_H_FALSE=
-fi
 
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswxdigit is ISO C compliant" >&5
+printf %s "checking whether iswxdigit is ISO C compliant... " >&6; }
+if test ${gl_cv_func_iswxdigit_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+                     case "$host_os" in
+         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+           gl_cv_func_iswxdigit_works="guessing no" ;;
+         # Guess yes otherwise.
+         *) gl_cv_func_iswxdigit_works="guessing yes" ;;
+       esac
+       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+         if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
 
+/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
 
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret != n)
+    abort ();
 
-  # Define two additional variables used in the Makefile substitution.
+  return iswxdigit (wc);
+}
 
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
-  else
-    STDBOOL_H='stdbool.h'
-  fi
+int
+main (int argc, char *argv[])
+{
+  int is;
+  int result = 0;
 
-   if test -n "$STDBOOL_H"; then
-  GL_GENERATE_STDBOOL_H_TRUE=
-  GL_GENERATE_STDBOOL_H_FALSE='#'
-else
-  GL_GENERATE_STDBOOL_H_TRUE='#'
-  GL_GENERATE_STDBOOL_H_FALSE=
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      /* This fails on NetBSD 8.0.  */
+      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+      is = for_character ("\243\301", 2);
+      if (!(is == 0))
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      /* This fails on FreeBSD 13.0.  */
+      /* U+0663 ARABIC-INDIC DIGIT THREE */
+      is = for_character ("\331\243", 2);
+      if (!(is == 0))
+        result |= 2;
+      /* This fails on MSVC 14.  */
+      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+      is = for_character ("\357\274\241", 3);
+      if (!(is == 0))
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      /* This fails on Solaris 10, Solaris 11.4.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_iswxdigit_works=yes
+else $as_nop
+  gl_cv_func_iswxdigit_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+       fi
 
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswxdigit_works" >&5
+printf "%s\n" "$gl_cv_func_iswxdigit_works" >&6; }
+    case "$gl_cv_func_iswxdigit_works" in
+      *yes) ;;
+      *) REPLACE_ISWXDIGIT=1 ;;
+    esac
   fi
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    :
+  else
+    if test $REPLACE_ISWXDIGIT = 1; then
 
 
 
 
-  STDDEF_H=
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
-printf %s "checking for good max_align_t... " >&6; }
-if test ${gl_cv_type_max_align_t+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-            unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
-            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
-            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
-            #endif
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_type_max_align_t=yes
-else
-  gl_cv_type_max_align_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
-printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
-  if test $gl_cv_type_max_align_t = no; then
-    HAVE_MAX_ALIGN_T=0
-    STDDEF_H=stddef.h
-  fi
+  gl_LIBOBJS="$gl_LIBOBJS iswxdigit.$ac_objext"
 
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
+    fi
   fi
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if test ${gl_cv_decl_null_works+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_decl_null_works=yes
-else
-  gl_cv_decl_null_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-printf "%s\n" "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
-  fi
 
 
-   if test -n "$STDDEF_H"; then
-  GL_GENERATE_STDDEF_H_TRUE=
-  GL_GENERATE_STDDEF_H_FALSE='#'
-else
-  GL_GENERATE_STDDEF_H_TRUE='#'
-  GL_GENERATE_STDDEF_H_FALSE=
-fi
 
-  if test -n "$STDDEF_H"; then
 
 
 
+          GL_GNULIB_ISWXDIGIT=1
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-printf %s "checking absolute name of <stddef.h>... " >&6; }
-if test ${gl_cv_next_stddef_h+y}
-then :
-  printf %s "(cached) " >&6
-else
+printf "%s\n" "#define GNULIB_TEST_ISWXDIGIT 1" >>confdefs.h
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.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 'stddef.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_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stddef_h
-           gl_cv_next_stddef_h='"'$gl_header'"'
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
-     fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
+printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
+if test ${gl_cv_c___inline+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int foo_t;
+           static __inline foo_t foo (void) { return 0; }
+int
+main (void)
+{
+return foo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_c___inline=yes
+else $as_nop
+  gl_cv_c___inline=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
+printf "%s\n" "$gl_cv_c___inline" >&6; }
+  if test $gl_cv_c___inline = yes; then
 
+printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
 
   fi
 
 
 
 
-  printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
-
 
+    LOCALCHARSET_TESTS_ENVIRONMENT=
 
 
 
@@ -27410,303 +28855,328 @@ printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdio_h='<'stdio.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
-printf %s "checking absolute name of <stdio.h>... " >&6; }
-if test ${gl_cv_next_stdio_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+  if test $REPLACE_STRUCT_LCONV = 1; then
+    REPLACE_LOCALECONV=1
+  fi
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdio.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
-    }'
+  if test $REPLACE_LOCALECONV = 1; then
 
-        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stdio_h
-           gl_cv_next_stdio_h='"'$gl_header'"'
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
-printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
-     fi
-     NEXT_STDIO_H=$gl_cv_next_stdio_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='<'stdio.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdio_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
 
 
-        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
-printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
-if test ${gl_cv_func_printf_attribute_flavor+y}
+  ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
+"
+if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
 then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-       #define __STDC_FORMAT_MACROS 1
-       #include <stdio.h>
-       #include <inttypes.h>
-       /* For non-mingw systems, compilation will trivially succeed.
-          For mingw, compilation will succeed for older mingw (system
-          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
-       #if (defined _WIN32 && ! defined __CYGWIN__) && \
-         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
-       #endif
+printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_func_printf_attribute_flavor=system
-else
-  gl_cv_func_printf_attribute_flavor=gnu
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
-printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
-  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
 
-printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
 
   fi
 
-      GNULIB_FSCANF=1
-
-
-printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
-
-
-  GNULIB_SCANF=1
 
 
-printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
 
 
-  GNULIB_FGETC=1
-  GNULIB_GETC=1
-  GNULIB_GETCHAR=1
-  GNULIB_FGETS=1
-  GNULIB_FREAD=1
 
 
-      GNULIB_FPRINTF=1
-  GNULIB_PRINTF=1
-  GNULIB_VFPRINTF=1
-  GNULIB_VPRINTF=1
-  GNULIB_FPUTC=1
-  GNULIB_PUTC=1
-  GNULIB_PUTCHAR=1
-  GNULIB_FPUTS=1
-  GNULIB_PUTS=1
-  GNULIB_FWRITE=1
 
 
+          GL_GNULIB_LOCALECONV=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
 
 
 
 
 
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    has_rwlock=false
+    ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
+"
+if test "x$ac_cv_type_pthread_rwlock_t" = xyes
+then :
+  has_rwlock=true
 
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
 
+fi
 
+    if $has_rwlock; then
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdlib_h='<'stdlib.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
-printf %s "checking absolute name of <stdlib.h>... " >&6; }
-if test ${gl_cv_next_stdlib_h+y}
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
+printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
+if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
 then :
   printf %s "(cached) " >&6
-else
-
-
+else $as_nop
+  save_LIBS="$LIBS"
+     LIBS="$LIBS $LIBMULTITHREAD"
+     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" ;;
+         esac
 
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+
+#include <errno.h>
+#include <pthread.h>
 #include <stdlib.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+#include <unistd.h>
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdlib.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
-    }'
+#define SUCCEED() exit (0)
+#define FAILURE() exit (1)
+#define UNEXPECTED(n) (exit (10 + (n)))
+
+/* The main thread creates the waiting writer and the requesting reader threads
+   in the default way; this guarantees that they have the same priority.
+   We can reuse the main thread as first reader thread.  */
+
+static pthread_rwlock_t lock;
+static pthread_t reader1;
+static pthread_t writer;
+static pthread_t reader2;
+static pthread_t timer;
+/* Used to pass control from writer to reader2 and from reader2 to timer,
+   as in a relay race.
+   Passing control from one running thread to another running thread
+   is most likely faster than to create the second thread.  */
+static pthread_mutex_t baton;
 
-        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+static void *
+timer_func (void *ignored)
+{
+  /* Step 13 (can be before or after step 12):
+     The timer thread takes the baton, then waits a moment to make sure
+     it can tell whether the second reader thread is blocked at step 12.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (13);
+  usleep (100000);
+  /* By the time we get here, it's clear that the second reader thread is
+     blocked at step 12.  This is the desired behaviour.  */
+  SUCCEED ();
+}
 
-           gl_header=$gl_cv_absolute_stdlib_h
-           gl_cv_next_stdlib_h='"'$gl_header'"'
+static void *
+reader2_func (void *ignored)
+{
+  int err;
+
+  /* Step 8 (can be before or after step 7):
+     The second reader thread takes the baton, then waits a moment to make sure
+     the writer thread has reached step 7.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (8);
+  usleep (100000);
+  /* Step 9: The second reader thread requests the lock.  */
+  err = pthread_rwlock_tryrdlock (&lock);
+  if (err == 0)
+    FAILURE ();
+  else if (err != EBUSY)
+    UNEXPECTED (9);
+  /* Step 10: Launch a timer, to test whether the next call blocks.  */
+  if (pthread_create (&timer, NULL, timer_func, NULL))
+    UNEXPECTED (10);
+  /* Step 11: Release the baton.  */
+  if (pthread_mutex_unlock (&baton))
+    UNEXPECTED (11);
+  /* Step 12: The second reader thread requests the lock.  */
+  err = pthread_rwlock_rdlock (&lock);
+  if (err == 0)
+    FAILURE ();
+  else
+    UNEXPECTED (12);
+}
+
+static void *
+writer_func (void *ignored)
+{
+  /* Step 4: Take the baton, so that the second reader thread does not go ahead
+     too early.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (4);
+  /* Step 5: Create the second reader thread.  */
+  if (pthread_create (&reader2, NULL, reader2_func, NULL))
+    UNEXPECTED (5);
+  /* Step 6: Release the baton.  */
+  if (pthread_mutex_unlock (&baton))
+    UNEXPECTED (6);
+  /* Step 7: The writer thread requests the lock.  */
+  if (pthread_rwlock_wrlock (&lock))
+    UNEXPECTED (7);
+  return NULL;
+}
 
+int
+main ()
+{
+  reader1 = pthread_self ();
+
+  /* Step 1: The main thread initializes the lock and the baton.  */
+  if (pthread_rwlock_init (&lock, NULL))
+    UNEXPECTED (1);
+  if (pthread_mutex_init (&baton, NULL))
+    UNEXPECTED (1);
+  /* Step 2: The main thread acquires the lock as a reader.  */
+  if (pthread_rwlock_rdlock (&lock))
+    UNEXPECTED (2);
+  /* Step 3: Create the writer thread.  */
+  if (pthread_create (&writer, NULL, writer_func, NULL))
+    UNEXPECTED (3);
+  /* Job done.  Go to sleep.  */
+  for (;;)
+    {
+      sleep (1);
+    }
+}
 
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
+else $as_nop
+  gl_cv_pthread_rwlock_rdlock_prefer_writer=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
-printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
-     fi
-     NEXT_STDLIB_H=$gl_cv_next_stdlib_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='<'stdlib.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdlib_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+     LIBS="$save_LIBS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
+printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
+  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
+    *yes)
 
+printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
 
+      ;;
+  esac
 
+    fi
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+      #include <pthread.h>
+int
+main (void)
+{
 
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
 
+printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+  fi
+  :
 
 
 
-  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
-if test "x$ac_cv_func_strcasecmp" = xyes
-then :
-  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
 
-fi
 
-  if test $ac_cv_func_strcasecmp = no; then
-    HAVE_STRCASECMP=0
-  fi
 
 
 
-  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
-if test "x$ac_cv_func_strncasecmp" = xyes
-then :
-  printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
 
-fi
+  if test $ac_cv_func_lstat = yes; then
 
-  if test $ac_cv_func_strncasecmp = yes; then
-    HAVE_STRNCASECMP=1
+    case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
+      solaris* | *no)
+        REPLACE_LSTAT=1
+        ;;
+    esac
   else
-    HAVE_STRNCASECMP=0
+    HAVE_LSTAT=0
   fi
-  ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strncasecmp" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
+  if test $REPLACE_LSTAT = 1; then
 
-  if test $ac_cv_have_decl_strncasecmp = no; then
-    HAVE_DECL_STRNCASECMP=0
-  fi
 
 
-  if test $HAVE_STRCASECMP = 0; then
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
 
+    :
+  fi
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
 
 
-  :
 
-  fi
-  if test $HAVE_STRNCASECMP = 0; then
 
 
 
 
+          GL_GNULIB_LSTAT=1
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
 
+printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
 
-  :
 
-  fi
 
 
 
@@ -27714,40 +29184,48 @@ printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
 
 
 
-  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
-printf %s "checking for working strerror function... " >&6; }
-if test ${gl_cv_func_working_strerror+y}
+  if test $REPLACE_MALLOC = 0; then
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
+printf %s "checking whether malloc (0) returns nonnull... " >&6; }
+if test ${ac_cv_func_malloc_0_nonnull+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                          # Guess yes on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
-                          # If we don't know, assume the worst.
-           *)             gl_cv_func_working_strerror="guessing no" ;;
-         esac
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
+        esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
+#include <stdlib.h>
 
 int
 main (void)
 {
-if (!*strerror (-2)) return 1;
+void *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_working_strerror=yes
-else
-  gl_cv_func_working_strerror=no
+  ac_cv_func_malloc_0_nonnull=yes
+else $as_nop
+  ac_cv_func_malloc_0_nonnull=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
-printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
-    case "$gl_cv_func_working_strerror" in
-      *yes) ;;
-      *)
-                        REPLACE_STRERROR=1
-        ;;
-    esac
-
-                  case "$gl_cv_func_strerror_r_works" in
-        *no) REPLACE_STRERROR=1 ;;
-      esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
+  case $ac_cv_func_malloc_0_nonnull in #(
+  *yes) :
+     ;; #(
+  *) :
+    REPLACE_MALLOC=1 ;;
+esac
 
-  else
-            REPLACE_STRERROR=1
   fi
 
-  if test $REPLACE_STRERROR = 1; then
+  if test $REPLACE_MALLOC = 1; then
 
 
 
@@ -27781,12 +29253,12 @@ printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
 
   fi
 
+  if test $REPLACE_MALLOC = 1; then
 
-printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
 
 
 
@@ -27794,56 +29266,38 @@ printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
 
 
 
-          GNULIB_STRERROR=1
+  gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
 
+  fi
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
 
 
 
 
 
-  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+          GL_GNULIB_MALLOC_POSIX=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
 
 
 
 
 
-  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
 
+  :
 
-  fi
-  if test $gl_cond_libtool = false; then
-    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
-    gl_libdeps="$gl_libdeps $LIBICONV"
-  fi
 
 
 
 
 
 
-  if test $ac_cv_have_decl_strndup = no; then
-    HAVE_DECL_STRNDUP=0
-  fi
 
-  if test $ac_cv_func_strndup = yes; then
-    HAVE_STRNDUP=1
-    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
-printf %s "checking for working strndup... " >&6; }
-if test ${gl_cv_func_strndup_works+y}
+        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
-  if test "$cross_compiling" = yes
+else $as_nop
+
+                  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 $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-          case $host_os in
-            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
-            *)               gl_cv_func_strndup_works="guessing yes";;
-          esac
+#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;
 
-else
+      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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      else
+        if test $LOCALE_FR_UTF8 != none; then
+          if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-         #include <string.h>
-                           #include <stdlib.h>
-int
-main (void)
+#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;
 
-#if !HAVE_DECL_STRNDUP
-  extern
-  #ifdef __cplusplus
-  "C"
-  #endif
-  char *strndup (const char *, size_t);
-#endif
-  int result;
-  char *s;
-  s = strndup ("some longer string", 15);
-  free (s);
-  s = strndup ("shorter string", 13);
-  result = s[13] != '\0';
-  free (s);
-  return result;
-  ;
+      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_strndup_works=yes
-else
-  gl_cv_func_strndup_works=no
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+        fi
+      fi
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
-printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
-    case $gl_cv_func_strndup_works in
-      *no) REPLACE_STRNDUP=1 ;;
-    esac
-  else
-    HAVE_STRNDUP=0
-  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; }
 
-  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
 
 
 
+     { 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 $as_nop
 
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
-  gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
+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" "
+      #include <wchar.h>
 
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mbrtowc" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
 
-          GNULIB_STRNDUP=1
-
+    if test $ac_cv_have_decl_mbrtowc = yes; then
+                        REPLACE_MBRTOWC=1
+    fi
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBRTOWC=1
+    else
 
 
 
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
+printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg1+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
+                  case "$host_os" in
+                  # Guess no on Solaris.
+        solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
+                  # Guess yes otherwise.
+        *)        gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
 
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      char input[] = "\303\237er";
+      mbstate_t state;
+      wchar_t wc;
+      size_t ret;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      ret = mbrtowc (&wc, input, 5, &state);
+      if (ret != 2)
+        result |= 1;
+      if (!mbsinit (&state))
+        result |= 2;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      ret = mbrtowc (NULL, input, 5, &state);
+      if (ret != 2) /* Solaris 7 fails here: ret is -1.  */
+        result |= 4;
+      if (!mbsinit (&state))
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_null_arg1=yes
+else $as_nop
+  gl_cv_func_mbrtowc_null_arg1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
 
 
 
-  if test $ac_cv_have_decl_strnlen = no; then
-    HAVE_DECL_STRNLEN=0
-  else
 
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
-printf %s "checking for working strnlen... " >&6; }
-if test ${ac_cv_func_strnlen_working+y}
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test ${gl_cv_func_mbrtowc_null_arg2+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+
+                  case "$host_os" in
+              # Guess no on OSF/1.
+        osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
+              # Guess yes otherwise.
+        *)    gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none; then
+        if test "$cross_compiling" = yes
 then :
-  # Guess no on AIX systems, yes otherwise.
-               case "$host_os" in
-                 aix*) ac_cv_func_strnlen_working=no;;
-                 *)    ac_cv_func_strnlen_working=yes;;
-               esac
-else
+  :
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-int
-main (void)
-{
-
-#define S "foobar"
-#define S_LEN (sizeof S - 1)
-
-  /* At least one implementation is buggy: that of AIX 4.3 would
-     give strnlen (S, 1) == 3.  */
 
-  int i;
-  for (i = 0; i < S_LEN + 1; ++i)
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
-      int expected = i <= S_LEN ? i : S_LEN;
-      if (strnlen (S, i) != expected)
-       return 1;
-    }
-  return 0;
+      mbstate_t state;
+      wchar_t wc;
+      int ret;
 
-  ;
+      memset (&state, '\0', sizeof (mbstate_t));
+      wc = (wchar_t) 0xBADFACE;
+      mbrtowc (&wc, NULL, 5, &state);
+      /* Check that wc was not modified.  */
+      if (wc != (wchar_t) 0xBADFACE)
+        return 2;
+    }
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  ac_cv_func_strnlen_working=yes
-else
-  ac_cv_func_strnlen_working=no
+  gl_cv_func_mbrtowc_null_arg2=yes
+else $as_nop
+  gl_cv_func_mbrtowc_null_arg2=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+      fi
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
-printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
-test $ac_cv_func_strnlen_working = no && :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
 
 
-    if test $ac_cv_func_strnlen_working = no; then
-      REPLACE_STRNLEN=1
-    fi
-  fi
 
-  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+printf %s "checking whether mbrtowc has a correct return value... " >&6; }
+if test ${gl_cv_func_mbrtowc_retval+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+                  case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, native Windows.
+        hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbrtowc_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
+         || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+        if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  int found_some_locale = 0;
+  /* This fails on Solaris.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      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))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+            result |= 1;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on HP-UX 11.11.  */
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      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))
+        {
+          input[1] = '\0';
+          if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+            result |= 2;
+        }
+      found_some_locale = 1;
+    }
+  /* This fails on native Windows.  */
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
-  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 4;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
-    :
-  fi
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 8;
+        }
+      found_some_locale = 1;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
+      mbstate_t state;
+      wchar_t wc;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
+        {
+          input[3] = '\0';
+          if (mbrtowc (&wc, input + 4, 4, &state) != 1)
+            result |= 16;
+        }
+      found_some_locale = 1;
+    }
+  return (found_some_locale ? result : 77);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_retval=yes
+else $as_nop
+  if test $? != 77; then
+             gl_cv_func_mbrtowc_retval=no
+           fi
 
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
 
-          GNULIB_STRNLEN=1
 
 
 
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test ${gl_cv_func_mbrtowc_nul_retval+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+                  case "$host_os" in
+                       # Guess no on Solaris 8 and 9.
+        solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+                       # Guess yes otherwise.
+        *)             gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+      esac
+      if test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  /* This fails on Solaris 8 and 9.  */
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      mbstate_t state;
+      wchar_t wc;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "", 1, &state) != 0)
+        return 2;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_nul_retval=yes
+else $as_nop
+  gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
 
 
 
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
+printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
+if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  if test $ac_cv_func_strptime != yes; then
-    HAVE_STRPTIME=0
-  fi
-
-  if test $HAVE_STRPTIME = 0; then
-
-
-
-
+               case "$host_os" in
+               # Guess yes on native Windows.
+       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
+       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
+     esac
+     case "$host_os" in
+       mingw*)
+         if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "French_France.65001") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
 
-  gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_stores_incomplete=no
+else $as_nop
+  gl_cv_func_mbrtowc_stores_incomplete=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+         ;;
+       *)
 
+         if test $LOCALE_FR_UTF8 != none; then
+           if test "$cross_compiling" = yes
+then :
   :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  fi
-
-
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        return 1;
+    }
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_stores_incomplete=no
+else $as_nop
+  gl_cv_func_mbrtowc_stores_incomplete=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+         fi
+         ;;
+     esac
 
-          GNULIB_STRPTIME=1
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
 
 
 
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
+printf %s "checking whether mbrtowc works on empty input... " >&6; }
+if test ${gl_cv_func_mbrtowc_empty_input+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+                  case "$host_os" in
+                              # Guess no on AIX and glibc systems.
+        aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+                              # Guess yes on native Windows.
+        mingw*)               gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+        *)                    gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+      esac
+      if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
+           #include <wchar.h>
+           static wchar_t wc;
+           static mbstate_t mbs;
+           int
+           main (void)
+           {
+             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+           }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbrtowc_empty_input=yes
+else $as_nop
+  gl_cv_func_mbrtowc_empty_input=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
+printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
 
 
+     { 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 $as_nop
 
+               gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
 
-  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
-    ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
-if test "x$ac_cv_func_strtoull" = xyes
+     if test "$cross_compiling" = yes
 then :
-  printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h
+  case "$host_os" in
+                 # Guess yes on native Windows.
+         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+       esac
 
-fi
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
 
-    if test $ac_cv_func_strtoull = no; then
-      HAVE_STRTOULL=0
-    fi
-  fi
+int
+main (void)
+{
 
-  if test $HAVE_STRTOULL = 0; then
+            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 $as_nop
+  gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+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_null_arg1" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
 
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_null_arg2" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
 
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_retval" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
 
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_nul_retval" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
 
-  gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_stores_incomplete" in
+        *no) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
 
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_empty_input" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
 
-  :
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
 
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
+    fi
   fi
+  if test $REPLACE_MBSTATE_T = 1; then
+    case "$host_os" in
+      mingw*) LIB_MBRTOWC= ;;
+      *)
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+printf %s "checking whether imported symbols can be declared weak... " >&6; }
+if test ${gl_cv_have_weak+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_cv_have_weak=no
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void xyzzy ();
+#pragma weak xyzzy
+int
+main (void)
+{
+xyzzy();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+     if test $gl_cv_have_weak = maybe; then
+                     if test "$cross_compiling" = yes
+then :
+                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+             Extensible Linking Format
+             #endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+  gl_cv_have_weak="guessing yes"
+else $as_nop
+  gl_cv_have_weak="guessing no"
+fi
+rm -rf conftest*
 
 
-          GNULIB_STRTOULL=1
-
-
-
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_have_weak=yes
+else $as_nop
+  gl_cv_have_weak=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-printf "%s\n" "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
+     fi
+          case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+                    case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+printf "%s\n" "$gl_cv_have_weak" >&6; }
+  case "$gl_cv_have_weak" in
+    *yes)
 
+printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
 
+      ;;
+  esac
 
+        case "$gl_cv_have_weak" in
+          *yes) LIB_MBRTOWC= ;;
+          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
+        esac
+        ;;
+    esac
+  else
+    LIB_MBRTOWC=
+  fi
 
 
+  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
 
 
-  if test "$ac_cv_have_decl_strtoumax" = yes; then
-    if test "$ac_cv_func_strtoumax" != yes; then
-      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
-      REPLACE_STRTOUMAX=1
-    fi
-  else
-    HAVE_DECL_STRTOUMAX=0
-  fi
 
-  if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
 
+    if test $REPLACE_MBSTATE_T = 1; then
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
 
 
-  ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strtoull" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h
 
 
 
-  fi
+  gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
 
 
 
 
 
-          GNULIB_STRTOUMAX=1
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
 
 
 
 
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+printf %s "checking whether the -Werror option is usable... " >&6; }
+if test ${gl_cv_cc_vis_werror+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -Werror"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_vis_werror=yes
+else $as_nop
+  gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+printf %s "checking for simple visibility declarations... " >&6; }
+if test ${gl_cv_cc_visibility+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+                                          if test $gl_cv_cc_vis_werror = yes; then
+         CFLAGS="$CFLAGS -Werror"
+       fi
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+              extern __attribute__((__visibility__("default"))) int exportedvar;
+              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
+              void dummyfunc (void) {}
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_visibility=yes
+else $as_nop
+  gl_cv_cc_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+printf "%s\n" "$gl_cv_cc_visibility" >&6; }
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
 
 
 
+printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
-printf %s "checking absolute name of <sys/stat.h>... " >&6; }
-if test ${gl_cv_next_sys_stat_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-             if test $ac_cv_header_sys_stat_h = yes; then
 
+    fi
 
 
+  :
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/stat.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+  fi
 
-  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/stat.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_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_stat_h
-           gl_cv_next_sys_stat_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-             fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
-printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
-     fi
-     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_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/stat.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
 
 
 
+          GL_GNULIB_MBRTOWC=1
 
 
 
 
 
-    WINDOWS_STAT_TIMESPEC=0
+printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
 
 
 
@@ -28283,23 +30411,17 @@ printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
 
 
 
-      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
-     #include <sys/stat.h>
-"
-if test "x$ac_cv_type_nlink_t" = xyes
-then :
 
-else
 
-printf "%s\n" "#define nlink_t int" >>confdefs.h
 
-fi
 
+          GL_GNULIB_MBSCASECMP=1
 
 
 
 
 
+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
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
-printf %s "checking absolute name of <sys/wait.h>... " >&6; }
-if test ${gl_cv_next_sys_wait_h+y}
+     { 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
-
-             if test $ac_cv_header_sys_wait_h = yes; then
+else $as_nop
 
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      else
+        if test $LOCALE_FR_UTF8 != none; then
+          if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/wait.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/wait.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_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+#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;
 
-           gl_header=$gl_cv_absolute_sys_wait_h
-           gl_cv_next_sys_wait_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
-             fi
+      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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+        fi
+      fi
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
-printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
-     fi
-     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+{ 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; }
 
-     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/wait.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
 
 
 
+     { 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 $as_nop
+
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+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" "
+      #include <wchar.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mbsinit" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
+
+    if test $ac_cv_have_decl_mbsinit = yes; then
+                        REPLACE_MBSINIT=1
+    fi
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSINIT=1
+    else
+                        case "$host_os" in
+        mingw*) REPLACE_MBSINIT=1 ;;
+      esac
+    fi
+  fi
 
+  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
 
 
 
@@ -28397,10 +30655,12 @@ printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
 
 
   :
 
+  fi
 
 
 
@@ -28410,71 +30670,25 @@ printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
 
 
 
+          GL_GNULIB_MBSINIT=1
 
-      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
-"
-if test "x$ac_cv_have_decl_localtime_r" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
 
-  if test $ac_cv_have_decl_localtime_r = no; then
-    HAVE_DECL_LOCALTIME_R=0
-  fi
 
 
-  if test $ac_cv_func_localtime_r = yes; then
-    HAVE_LOCALTIME_R=1
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
-printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
-if test ${gl_cv_time_r_posix+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
-int
-main (void)
-{
-/* We don't need to append 'restrict's to the argument types,
-                 even though the POSIX signature has the 'restrict's,
-                 since C99 says they can't affect type compatibility.  */
-              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
-              if (ptr) return 0;
-              /* Check the return type is a pointer.
-                 On HP-UX 10 it is 'int'.  */
-              *localtime_r (0, 0);
-  ;
-  return 0;
-}
+printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_time_r_posix=yes
-else
-  gl_cv_time_r_posix=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
-printf "%s\n" "$gl_cv_time_r_posix" >&6; }
-    if test $gl_cv_time_r_posix = yes; then
-      REPLACE_LOCALTIME_R=0
-    else
-      REPLACE_LOCALTIME_R=1
-    fi
+
+
+
+
+  if test $ac_cv_func_mbslen = yes; then
+    HAVE_MBSLEN=1
   else
-    HAVE_LOCALTIME_R=0
+    HAVE_MBSLEN=0
   fi
 
-  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
 
 
 
@@ -28483,24 +30697,21 @@ printf "%s\n" "$gl_cv_time_r_posix" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
 
+          GL_GNULIB_MBSLEN=1
 
-  :
 
-  fi
 
 
 
+printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
 
 
-          GNULIB_TIME_R=1
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
 
 
 
@@ -28508,120 +30719,336 @@ printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
 
 
 
+        if case "$host_os" in
+       mingw*) true ;;
+       *) test $ac_cv_func_mbsinit = yes ;;
+     esac \
+    && test $ac_cv_func_mbrtowc = yes; then
 
-  # Mac OS X 10.6 loops forever with some time_t values.
-  # See Bug#27706, Bug#27736, and
-  # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime loops forever near extrema" >&5
-printf %s "checking whether localtime loops forever near extrema... " >&6; }
-if test ${gl_cv_func_localtime_infloop_bug+y}
+
+
+
+     { 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
-  gl_cv_func_localtime_infloop_bug=no
-     if test "$cross_compiling" = yes
+else $as_nop
+
+                  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 :
-  gl_cv_func_localtime_infloop_bug="guessing no"
-else
+  :
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-            #include <string.h>
-            #include <unistd.h>
-            #include <time.h>
 
-int
-main (void)
+#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;
 
-            time_t t = -67768038400666600;
-            struct tm *tm;
-            char *tz = getenv ("TZ");
-            if (! (tz && strcmp (tz, "QQQ0") == 0))
-              return 0;
-            alarm (2);
-            tm = localtime (&t);
-            /* Use TM and *TM to suppress over-optimization.  */
-            return tm && tm->tm_isdst;
+      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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
-  ;
+      else
+        if test $LOCALE_FR_UTF8 != none; then
+          if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  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 :
-  (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
-           gl_cv_func_localtime_infloop_bug=yes
+  gl_cv_func_mbrtowc_incomplete_state=yes
+else $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+        fi
+      fi
+
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_infloop_bug" >&5
-printf "%s\n" "$gl_cv_func_localtime_infloop_bug" >&6; }
-  if test "$gl_cv_func_localtime_infloop_bug" = yes; then
+{ 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" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
 
-  fi
 
-  ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
-"
-if test "x$ac_cv_type_timezone_t" = xyes
+
+     { 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 $as_nop
 
-printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
 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; }
 
-  if test "$ac_cv_type_timezone_t" = yes; then
-    HAVE_TIMEZONE_T=1
+    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 $HAVE_TIMEZONE_T = 0; then
 
 
+  if test $ac_cv_func_mbsrtowcs = no; then
+    HAVE_MBSRTOWCS=0
+    ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
+      #include <wchar.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
+
+    if test $ac_cv_have_decl_mbsrtowcs = yes; then
+                        REPLACE_MBSRTOWCS=1
+    fi
+  else
+    if test $REPLACE_MBSTATE_T = 1; then
+      REPLACE_MBSRTOWCS=1
+    else
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
+     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
+printf %s "checking whether mbsrtowcs works... " >&6; }
+if test ${gl_cv_func_mbsrtowcs_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  fi
+                  case "$host_os" in
+                                   # Guess no on HP-UX, Solaris, mingw.
+        hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
+                                   # Guess yes otherwise.
+        *)                         gl_cv_func_mbsrtowcs_works="guessing yes" ;;
+      esac
+      if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+        if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  /* Test whether the function supports a NULL destination argument.
+     This fails on native Windows.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      const char input[] = "\337er";
+      const char *src = input;
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbsrtowcs (NULL, &src, 1, &state) != 3
+          || src != input)
+        result |= 1;
+    }
+  /* Test whether the function works when started with a conversion state
+     in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      const char input[] = "B\303\274\303\237er";
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 2;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      const char input[] = "<\306\374\313\334\270\354>";
+      mbstate_t state;
 
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 4;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 3)
+              result |= 4;
+          }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      const char input[] = "B\250\271\201\060\211\070er";
+      mbstate_t state;
 
-          GNULIB_TIME_RZ=1
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
+        if (!mbsinit (&state))
+          {
+            const char *src = input + 2;
+            if (mbsrtowcs (NULL, &src, 10, &state) != 4)
+              result |= 8;
+          }
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_mbsrtowcs_works=yes
+else $as_nop
+  gl_cv_func_mbsrtowcs_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+      fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
+printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
 
+      case "$gl_cv_func_mbsrtowcs_works" in
+        *yes) ;;
+        *) REPLACE_MBSRTOWCS=1 ;;
+      esac
+    fi
+  fi
 
+  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
 
-printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
 
 
 
 
 
 
-  REPLACE_TIMEGM=0
 
-  if test $ac_cv_func_timegm = yes; then
-    if test "$gl_cv_func_working_mktime" != yes; then
-      # Assume that timegm is buggy if mktime is.
-      REPLACE_TIMEGM=1
-    fi
-  else
-    HAVE_TIMEGM=0
-  fi
+  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
 
-  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
 
 
 
@@ -28630,7 +31057,7 @@ printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
 
 
   :
@@ -28641,424 +31068,184 @@ printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
 
 
 
-          GNULIB_TIMEGM=1
 
 
 
 
+          GL_GNULIB_MBSRTOWCS=1
 
-printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
 
 
 
-  :
 
+printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
 
 
 
 
-  if test $ac_cv_func_tzset = no; then
-    HAVE_TZSET=0
-  fi
 
-     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
-printf %s "checking whether tzset clobbers localtime buffer... " >&6; }
-if test ${gl_cv_func_tzset_clobber+y}
-then :
-  printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  case "$host_os" in
-                         # Guess all is fine on glibc systems.
-          *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
-                         # Guess no on native Windows.
-          mingw*)        gl_cv_func_tzset_clobber="guessing no" ;;
-                         # If we don't know, assume the worst.
-          *)             gl_cv_func_tzset_clobber="guessing yes" ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <time.h>
-#include <stdlib.h>
 
-int
-main ()
-{
-  time_t t1 = 853958121;
-  struct tm *p, s;
-  putenv ("TZ=GMT0");
-  p = localtime (&t1);
-  s = *p;
-  putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
-  tzset ();
-  return (p->tm_year != s.tm_year
-          || p->tm_mon != s.tm_mon
-          || p->tm_mday != s.tm_mday
-          || p->tm_hour != s.tm_hour
-          || p->tm_min != s.tm_min
-          || p->tm_sec != s.tm_sec);
-}
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  gl_cv_func_tzset_clobber=no
-else
-  gl_cv_func_tzset_clobber=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tzset_clobber" >&5
-printf "%s\n" "$gl_cv_func_tzset_clobber" >&6; }
 
+          GL_GNULIB_MBSSTR=1
 
-printf "%s\n" "#define HAVE_RUN_TZSET_TEST 1" >>confdefs.h
 
 
-  REPLACE_TZSET=0
-  case "$gl_cv_func_tzset_clobber" in
-    *yes)
-      REPLACE_TZSET=1
 
-printf "%s\n" "#define TZSET_CLOBBERS_LOCALTIME 1" >>confdefs.h
 
+printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
 
 
 
-  NEED_LOCALTIME_BUFFER=1
-  REPLACE_GMTIME=1
-  REPLACE_LOCALTIME=1
 
-      ;;
-  esac
-  case "$host_os" in
-    mingw*) REPLACE_TZSET=1 ;;
-  esac
 
-  if test $HAVE_TZSET = 0 || test $REPLACE_TZSET = 1; then
 
+  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
 
+  if test $ac_cv_func_mbtowc = no; then
+    HAVE_MBTOWC=0
+  else
+    if false; then
+      REPLACE_MBTOWC=1
+    fi
+  fi
 
+  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
 
-  fi
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
 
 
-          GNULIB_TZSET=1
+  :
 
+  fi
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
 
 
 
 
 
+          GL_GNULIB_MBTOWC=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_unistd_h='<'unistd.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
-printf %s "checking absolute name of <unistd.h>... " >&6; }
-if test ${gl_cv_next_unistd_h+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_unistd_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.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 'unistd.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_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_unistd_h
-           gl_cv_next_unistd_h='"'$gl_header'"'
-          else
-               gl_cv_next_unistd_h='<'unistd.h'>'
-             fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
-printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
-     fi
-     NEXT_UNISTD_H=$gl_cv_next_unistd_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='<'unistd.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_unistd_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
-
-
-
-
-  if test $ac_cv_header_unistd_h = yes; then
-    HAVE_UNISTD_H=1
-  else
-    HAVE_UNISTD_H=0
-  fi
-
-
-
-
+  :
 
 
+  if test $REPLACE_MEMCHR = 1; then
 
 
 
 
 
 
-      if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
 
 
+  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
 
-            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 4
-                         }
-                    }
-               }
 
+  ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
 
+fi
 
 
-       }
-  }; then
-    LIBUNISTRING_UNISTR_H='unistr.h'
-  else
-    LIBUNISTRING_UNISTR_H=
   fi
 
 
 
 
-printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
-
-
-
-
-       if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
-
 
 
-            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 0
-                         }
-                    }
-               }
-
 
 
 
-       }
-  }; then
-  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
-  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
-else
-  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
-  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
-fi
+          GL_GNULIB_MEMCHR=1
 
 
 
 
-printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
 
+printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
 
 
 
-       if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
 
 
 
-            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 0
-                         }
-                    }
-               }
 
 
 
+  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
 
-       }
-  }; then
-  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
-  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
-else
-  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
-  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
 fi
 
-
-
-
-      if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
-
-
-
-            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 4
-                         }
-                    }
-               }
-
-
-
-
-       }
-  }; then
-    LIBUNISTRING_UNITYPES_H='unitypes.h'
-  else
-    LIBUNISTRING_UNITYPES_H=
-  fi
-
-
-
-
-      if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
-
-
-
-            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 4
-                         }
-                    }
-               }
-
-
-
-
-       }
-  }; then
-    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
-  else
-    LIBUNISTRING_UNIWIDTH_H=
+  if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
   fi
 
+  if test $HAVE_MEMPCPY = 0; then
 
 
 
-       if  { test "$HAVE_LIBUNISTRING" != yes \
-    || {
 
 
 
-            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 8
-                         }
-                    }
-               }
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
 
 
-       }
-  }; then
-  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
-  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
-else
-  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
-  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
-fi
+  :
 
+  fi
 
 
 
-printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
 
 
 
 
 
 
+          GL_GNULIB_MEMPCPY=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
 
 
 
@@ -29067,147 +31254,157 @@ printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
+printf %s "checking whether mkdir handles trailing slash... " >&6; }
+if test ${gl_cv_func_mkdir_trailing_slash_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  rm -rf conftest.dir
+     if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                           # Guess yes on Linux systems.
+          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on MSVC, no on mingw.
+          mingw*)          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#ifdef _MSC_VER
+ Known
+#endif
 
-  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
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Known" >/dev/null 2>&1
 then :
-  printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
-
+  gl_cv_func_mkdir_trailing_slash_works="guessing yes"
+else $as_nop
+  gl_cv_func_mkdir_trailing_slash_works="guessing no"
 fi
+rm -rf conftest*
 
-  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
+                           ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
+        esac
+
+else $as_nop
   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);
+          #include <sys/types.h>
+          #include <sys/stat.h>
+
+
+$gl_mda_defines
 
 int
 main (void)
 {
-
+return mkdir ("conftest.dir/", 0700);
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gt_cv_func_unsetenv_ret='int'
-else
-  gt_cv_func_unsetenv_ret='void'
+  gl_cv_func_mkdir_trailing_slash_works=yes
+else $as_nop
+  gl_cv_func_mkdir_trailing_slash_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ 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
+     rm -rf conftest.dir
 
-      REPLACE_UNSETENV=1
-    fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
+printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
+  case "$gl_cv_func_mkdir_trailing_slash_works" in
+    *yes) ;;
+    *)
+      REPLACE_MKDIR=1
+      ;;
+  esac
 
-                { 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}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
+printf %s "checking whether mkdir handles trailing dot... " >&6; }
+if test ${gl_cv_func_mkdir_trailing_dot_works+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+  rm -rf conftest.dir
+     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, assume the worst.
-         *)      gl_cv_func_unsetenv_works="guessing no" ;;
-       esac
+                         # Guess yes on glibc systems.
+          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess yes on musl systems.
+          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess no on native Windows.
+          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
+        esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       #include <stdlib.h>
-       #include <errno.h>
-       extern char **environ;
+          #include <sys/types.h>
+          #include <sys/stat.h>
+
+
+$gl_mda_defines
 
 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;
-
+return !mkdir ("conftest.dir/./", 0700);
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_unsetenv_works=yes
-else
-  gl_cv_func_unsetenv_works=no
+  gl_cv_func_mkdir_trailing_dot_works=yes
+else $as_nop
+  gl_cv_func_mkdir_trailing_dot_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-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
+     rm -rf conftest.dir
 
-  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
+printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
+  case "$gl_cv_func_mkdir_trailing_dot_works" in
+    *yes) ;;
+    *)
+      REPLACE_MKDIR=1
 
+printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
 
+      ;;
+  esac
 
+  if test $REPLACE_MKDIR = 1; then
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
 
   fi
 
@@ -29215,122 +31412,143 @@ printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
 
 
 
-          GNULIB_UNSETENV=1
 
 
 
 
+          GL_GNULIB_MKDIR=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
 
-printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
-printf %s "checking for variable-length arrays... " >&6; }
-if test ${ac_cv_c_vararrays+y}
+
+
+  if test $ac_cv_func_mkstemp = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
+printf %s "checking for working mkstemp... " >&6; }
+if test ${gl_cv_func_working_mkstemp+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC_NO_VLA__
-        defined
-        #endif
+else $as_nop
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "defined" >/dev/null 2>&1
+        mkdir conftest.mkstemp
+        if test "$cross_compiling" = yes
 then :
-  ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
-else
+  case "$host_os" in
+                            # Guess yes on glibc systems.
+             *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+                            # Guess yes on musl systems.
+             *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
+                            # Guess no on native Windows.
+             mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
+                            # If we don't know, obey --enable-cross-guesses.
+             *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
+           esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Test for VLA support.  This test is partly inspired
-                  from examples in the C standard.  Use at least two VLA
-                  functions to detect the GCC 3.4.3 bug described in:
-                  https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
-                  */
-               #ifdef __STDC_NO_VLA__
-                syntax error;
-               #else
-                 extern int n;
-                 int B[100];
-                 int fvla (int m, int C[m][m]);
-
-                 int
-                 simple (int count, int all[static count])
-                 {
-                   return all[count - 1];
-                 }
-
-                 int
-                 fvla (int m, int C[m][m])
-                 {
-                   typedef int VLA[m][m];
-                   VLA x;
-                   int D[m];
-                   static int (*q)[m] = &B;
-                   int (*s)[n] = q;
-                   return C && &x[0][0] == &D[0] && &D[0] == s[0];
-                 }
-               #endif
+$ac_includes_default
+
+
+$gl_mda_defines
 
 int
 main (void)
 {
-
+int result = 0;
+              int i;
+              off_t large = (off_t) 4294967295u;
+              if (large < 0)
+                large = 2147483647;
+              umask (0);
+              for (i = 0; i < 70; i++)
+                {
+                  char templ[] = "conftest.mkstemp/coXXXXXX";
+                  int (*mkstemp_function) (char *) = mkstemp;
+                  int fd = mkstemp_function (templ);
+                  if (fd < 0)
+                    result |= 1;
+                  else
+                    {
+                      struct stat st;
+                      if (lseek (fd, large, SEEK_SET) != large)
+                        result |= 2;
+                      if (fstat (fd, &st) < 0)
+                        result |= 4;
+                      else if (st.st_mode & 0077)
+                        result |= 8;
+                      if (close (fd))
+                        result |= 16;
+                    }
+                }
+              return result;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  ac_cv_c_vararrays=yes
-else
-  ac_cv_c_vararrays=no
+  gl_cv_func_working_mkstemp=yes
+else $as_nop
+  gl_cv_func_working_mkstemp=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -rf conftest*
+
+        rm -rf conftest.mkstemp
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
-printf "%s\n" "$ac_cv_c_vararrays" >&6; }
-  if test "$ac_cv_c_vararrays" = yes; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
+printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
+    case "$gl_cv_func_working_mkstemp" in
+      *yes) ;;
+      *)
+        REPLACE_MKSTEMP=1
+        ;;
+    esac
+  else
+    HAVE_MKSTEMP=0
+  fi
 
-printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
+  if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
 
-  elif test "$ac_cv_c_vararrays" = no; then
 
-printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
 
-  fi
 
 
 
-  if test $ac_cv_func_vasnprintf = no; then
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
 
 
 
+  fi
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
 
 
 
 
+          GL_GNULIB_MKSTEMP=1
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
+printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
 
 
 
@@ -29339,23 +31557,34 @@ printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
 
 
 
+  REPLACE_MKTIME=0
+  if test "$gl_cv_func_working_mktime" != yes; then
+    REPLACE_MKTIME=1
 
-  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
+printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
+
+  fi
+  case "$host_os" in
+    mingw*)
+      REPLACE_MKTIME=1
 
+printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
 
+      ;;
+  esac
 
+  if test $REPLACE_MKTIME = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
 
-  if test $ac_cv_func_vasnprintf = yes; then
 
-printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
 
+    :
   fi
 
 
@@ -29366,37 +31595,37 @@ printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
 
 
 
+          GL_GNULIB_MKTIME=1
 
 
-  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
 
-printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
 
+printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
 
-fi
 
 
 
 
 
+  WANT_MKTIME_INTERNAL=0
+    ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
+if test "x$ac_cv_func___mktime_internal" = xyes
+then :
 
+printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
 
-  fi
 
+else $as_nop
+            WANT_MKTIME_INTERNAL=1
+
+printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
 
-  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
-if test "x$ac_cv_func_vasprintf" = xyes
-then :
-  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
 
 fi
 
-  if test $ac_cv_func_vasprintf = no; then
 
+  if test $WANT_MKTIME_INTERNAL = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
 
+    :
+  fi
 
+  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
 
+  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
 
-  if test $ac_cv_func_vasprintf = yes; then
-    REPLACE_VASPRINTF=1
-  else
-    HAVE_VASPRINTF=0
   fi
 
+  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
 
 
 
 
 
-  fi
-
-
 
+  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
 
+  fi
 
 
-          GNULIB_VASPRINTF=1
+printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
 
 
 
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
 
+  if test $ac_cv_func_nl_langinfo = yes; then
+    # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
+printf %s "checking whether YESEXPR works... " >&6; }
+if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
 
+         case "$host_os" in
+                   # Guess no on irix systems.
+           irix*)  gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
+                   # Guess yes elsewhere.
+           *)      gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
+         esac
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <langinfo.h>
 
+int
+main (void)
+{
+return !*nl_langinfo(YESEXPR);
 
-# Check whether --with-packager was given.
-if test ${with_packager+y}
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
 then :
-  withval=$with_packager;       case $withval in
-        yes|no) ;;
-        *)
-printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
- ;;
-      esac
+  gl_cv_func_nl_langinfo_yesexpr_works=yes
+else $as_nop
+  gl_cv_func_nl_langinfo_yesexpr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
 
 fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
+printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
+    case $gl_cv_func_nl_langinfo_yesexpr_works in
+      *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
+      *)    FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
+    esac
 
+printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
 
+    # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
+    case "$host_os" in
+      solaris*) NL_LANGINFO_MTSAFE=0 ;;
+      *)        NL_LANGINFO_MTSAFE=1 ;;
+    esac
 
-# Check whether --with-packager-version was given.
-if test ${with_packager_version+y}
-then :
-  withval=$with_packager_version;       case $withval in
-        yes|no) ;;
-        *)
-printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
- ;;
-      esac
+printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
 
-fi
+    if test $HAVE_LANGINFO_CODESET = 1 \
+       && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
+       && test $HAVE_LANGINFO_ALTMON = 1 \
+       && test $HAVE_LANGINFO_ERA = 1 \
+       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
+       && test $NL_LANGINFO_MTSAFE = 1; then
+      :
+    else
+      REPLACE_NL_LANGINFO=1
 
+printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
 
+    fi
+  else
+    HAVE_NL_LANGINFO=0
+  fi
+  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
+    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
+  else
+    LIB_NL_LANGINFO=
+  fi
 
-# Check whether --with-packager-bug-reports was given.
-if test ${with_packager_bug_reports+y}
-then :
-  withval=$with_packager_bug_reports;       case $withval in
-        yes|no) ;;
-        *)
-printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
- ;;
-      esac
 
-fi
+  if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
 
 
-  if test "X$with_packager" = "X" && \
-     test "X$with_packager_version$with_packager_bug_reports" != "X"
-  then
-    as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
-  fi
 
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
 
+  fi
+  if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
 
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_wchar_h='<'wchar.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
-printf %s "checking absolute name of <wchar.h>... " >&6; }
-if test ${gl_cv_next_wchar_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-             if test $ac_cv_header_wchar_h = yes; then
 
+  gl_LIBOBJS="$gl_LIBOBJS nl_langinfo-lock.$ac_objext"
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+printf %s "checking whether the -Werror option is usable... " >&6; }
+if test ${gl_cv_cc_vis_werror+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -Werror"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.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 'wchar.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
-    }'
+int
+main (void)
+{
 
-        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_vis_werror=yes
+else $as_nop
+  gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
-           gl_header=$gl_cv_absolute_wchar_h
-           gl_cv_next_wchar_h='"'$gl_header'"'
-          else
-               gl_cv_next_wchar_h='<'wchar.h'>'
-             fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+printf %s "checking for simple visibility declarations... " >&6; }
+if test ${gl_cv_cc_visibility+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+                                          if test $gl_cv_cc_vis_werror = yes; then
+         CFLAGS="$CFLAGS -Werror"
+       fi
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+              extern __attribute__((__visibility__("default"))) int exportedvar;
+              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
+              void dummyfunc (void) {}
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_visibility=yes
+else $as_nop
+  gl_cv_cc_visibility=no
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
-printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
-     fi
-     NEXT_WCHAR_H=$gl_cv_next_wchar_h
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
-     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='<'wchar.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_wchar_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+printf "%s\n" "$gl_cv_cc_visibility" >&6; }
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
 
 
 
+printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
+
+
 
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
-  else
-    HAVE_WCHAR_H=0
   fi
 
 
 
 
 
-  if test $gt_cv_c_wint_t = yes; then
-    HAVE_WINT_T=1
-  else
-    HAVE_WINT_T=0
-  fi
 
 
 
 
+          GL_GNULIB_NL_LANGINFO=1
 
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
 
 
 
 
 
 
+ # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
 
 
 
-  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
 
 
+printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
 
-     { 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}
+
+
+
+
+  case "$host_os" in
+    mingw* | pw*)
+      REPLACE_OPEN=1
+      ;;
+    *)
+
+      if test "$gl_cv_macro_O_CLOEXEC" != yes; then
+        REPLACE_OPEN=1
+      fi
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
+printf %s "checking whether open recognizes a trailing slash... " >&6; }
+if test ${gl_cv_func_open_slash+y}
 then :
   printf %s "(cached) " >&6
-else
-
-                  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
+else $as_nop
+  # Assume that if we have lstat, we can also check symlinks.
+     if test $ac_cv_func_lstat = yes; then
+       touch conftest.tmp
+       ln -s conftest.tmp conftest.lnk
+     fi
+     if test "$cross_compiling" = yes
 then :
-  :
-else
+
+        case "$host_os" in
+          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+            gl_cv_func_open_slash="guessing no" ;;
+          *)
+            gl_cv_func_open_slash="guessing yes" ;;
+        esac
+
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+
+$gl_mda_defines
+
 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;
+  int result = 0;
+#if HAVE_LSTAT
+  if (open ("conftest.lnk/", O_RDONLY) != -1)
+    result |= 1;
+#endif
+  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+    result |= 2;
+  return result;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_mbrtowc_incomplete_state=yes
-else
-  gl_cv_func_mbrtowc_incomplete_state=no
+  gl_cv_func_open_slash=yes
+else $as_nop
+  gl_cv_func_open_slash=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-      fi
+     rm -f conftest.sl conftest.tmp conftest.lnk
 
 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}: result: $gl_cv_func_open_slash" >&5
+printf "%s\n" "$gl_cv_func_open_slash" >&6; }
+  case "$gl_cv_func_open_slash" in
+    *no)
 
+printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
 
+      ;;
+  esac
 
+      case "$gl_cv_func_open_slash" in
+        *no)
+          REPLACE_OPEN=1
+          ;;
+      esac
+      ;;
+  esac
 
-     { 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 "$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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  /* 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;
+  if test $REPLACE_OPEN = 1; then
 
-      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
-  gl_cv_func_mbrtowc_sanitycheck=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-      fi
 
-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
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+
+
+
+  :
+
   fi
 
 
 
-  if test $ac_cv_func_wcrtomb = no; then
-    HAVE_WCRTOMB=0
-    ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
 
-"
-if test "x$ac_cv_have_decl_wcrtomb" = xyes
+
+
+
+
+
+          GL_GNULIB_OPEN=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
+
+
+
+
+
+
+  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
+else $as_nop
   ac_have_decl=0
 fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
 
-printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
+  ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
 
-    if test $ac_cv_have_decl_wcrtomb = yes; then
-                        REPLACE_WCRTOMB=1
-    fi
-  else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_WCRTOMB=1
-    else
 
 
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
 
 
 
-             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
-printf %s "checking whether wcrtomb return value is correct... " >&6; }
-if test ${gl_cv_func_wcrtomb_retval+y}
-then :
-  printf %s "(cached) " >&6
-else
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+      :
+
+
 
-                              case "$host_os" in
-                                     # Guess no on AIX 4, OSF/1 and Solaris.
-            aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
-                                     # Guess yes on native Windows.
-            mingw*)                  gl_cv_func_wcrtomb_retval="guessing yes" ;;
-                                     # Guess yes otherwise.
-            *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
-          esac
-          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
-            if test "$cross_compiling" = yes
-then :
   :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int main ()
-{
-  int result = 0;
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
-    {
-      if (wcrtomb (NULL, 0, NULL) != 1)
-        result |= 1;
-    }
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
-    {
-      if (wcrtomb (NULL, 0, NULL) != 1)
-        result |= 2;
-    }
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
-    {
-      if (wcrtomb (NULL, 0, NULL) != 1)
-        result |= 4;
-    }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
-    {
-      if (wcrtomb (NULL, 0, NULL) != 1)
-        result |= 8;
-    }
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
+
+
+
+  ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
+if test "x$ac_cv_func_raise" = xyes
 then :
-  gl_cv_func_wcrtomb_retval=yes
-else
-  gl_cv_func_wcrtomb_retval=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
+
 fi
 
-          fi
+  if test $ac_cv_func_raise = no; then
+    HAVE_RAISE=0
+  else
+
+
+      if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+        REPLACE_RAISE=1
+      fi
+
+
 
+
+
+  HAVE_POSIX_SIGNALBLOCKING=0
+  if test "$gl_cv_type_sigset_t" = yes; then
+    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+  HAVE_POSIX_SIGNALBLOCKING=1
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
-printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
-      case "$gl_cv_func_wcrtomb_retval" in
-        *yes) ;;
-        *) REPLACE_WCRTOMB=1 ;;
-      esac
-    fi
+
   fi
 
-  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+      if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+        :
+      fi
 
+  fi
 
+  if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
 
 
-  :
+  gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
 
+    :
   fi
 
 
 
 
 
-          GNULIB_WCRTOMB=1
 
 
 
 
+          GL_GNULIB_RAISE=1
 
-printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
 
 
 
 
+printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
 
 
 
 
-  if test $ac_cv_func_iswcntrl = yes; then
-    HAVE_ISWCNTRL=1
-  else
-    HAVE_ISWCNTRL=0
-  fi
 
 
 
-  if test $gt_cv_c_wint_t = yes; then
-    HAVE_WINT_T=1
-  else
-    HAVE_WINT_T=0
+  ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
+if test "x$ac_cv_func_rawmemchr" = xyes
+then :
+  printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_rawmemchr = no; then
+    HAVE_RAWMEMCHR=0
   fi
 
+  if test $HAVE_RAWMEMCHR = 0; then
 
 
 
@@ -29943,97 +32170,46 @@ printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
 
+    :
+  fi
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_wctype_h='<'wctype.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
-printf %s "checking absolute name of <wctype.h>... " >&6; }
-if test ${gl_cv_next_wctype_h+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-             if test $ac_cv_header_wctype_h = yes; then
 
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <wctype.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 'wctype.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_GNULIB_RAWMEMCHR=1
 
-        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_wctype_h
-           gl_cv_next_wctype_h='"'$gl_header'"'
-          else
-               gl_cv_next_wctype_h='<'wctype.h'>'
-             fi
 
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
-printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
-     fi
-     NEXT_WCTYPE_H=$gl_cv_next_wctype_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='<'wctype.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_wctype_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
 
 
 
 
-  if test $ac_cv_header_wctype_h = yes; then
-    if test $ac_cv_func_iswcntrl = yes; then
-                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
-printf %s "checking whether iswcntrl works... " >&6; }
-if test ${gl_cv_func_iswcntrl_works+y}
-then :
-  printf %s "(cached) " >&6
-else
 
-          if test "$cross_compiling" = yes
+
+  if test $ac_cv_func_readlink = no; then
+    HAVE_READLINK=0
+  else
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+printf %s "checking whether readlink signature is correct... " >&6; }
+if test ${gl_cv_decl_readlink_works+y}
 then :
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-                          #if __GNU_LIBRARY__ == 1
-                          Linux libc5 i18n is broken.
-                          #endif
+#include <unistd.h>
+      /* Cause compilation failure if original declaration has wrong type.  */
+      ssize_t readlink (const char *, char *, size_t);
 int
 main (void)
 {
@@ -30044,200 +32220,159 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  gl_cv_func_iswcntrl_works="guessing yes"
-else
-  gl_cv_func_iswcntrl_works="guessing no"
+  gl_cv_decl_readlink_works=yes
+else $as_nop
+  gl_cv_decl_readlink_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
+if test ${gl_cv_func_readlink_trailing_slash+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  # We have readlink, so assume ln -s works.
+       ln -s conftest.no-such conftest.link
+       ln -s conftest.link conftest.lnk2
+       if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_trailing_slash="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
+          esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <unistd.h>
 
-               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                  included before <wchar.h>.
-                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                  must be included before <wchar.h>.  */
-               #include <stddef.h>
-               #include <stdio.h>
-               #include <time.h>
-               #include <wchar.h>
-               #include <wctype.h>
-               int main () { return iswprint ('x') == 0; }
-
+int
+main (void)
+{
+char buf[20];
+      return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_iswcntrl_works=yes
-else
-  gl_cv_func_iswcntrl_works=no
+  gl_cv_func_readlink_trailing_slash=yes
+else $as_nop
+  gl_cv_func_readlink_trailing_slash=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
+      rm -f conftest.link conftest.lnk2
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
-printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
-    fi
-    HAVE_WCTYPE_H=1
-  else
-    HAVE_WCTYPE_H=0
-  fi
-
-
-  case "$gl_cv_func_iswcntrl_works" in
-    *yes) REPLACE_ISWCNTRL=0 ;;
-    *)    REPLACE_ISWCNTRL=1 ;;
-  esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
+printf "%s\n" "$gl_cv_func_readlink_trailing_slash" >&6; }
+    case "$gl_cv_func_readlink_trailing_slash" in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
 
+printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-        :
-  fi
+        REPLACE_READLINK=1
+        ;;
+    esac
 
-  if test $REPLACE_ISWCNTRL = 1; then
-    REPLACE_TOWLOWER=1
-  else
-    ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
-if test "x$ac_cv_func_towlower" = xyes
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
+printf %s "checking whether readlink truncates results correctly... " >&6; }
+if test ${gl_cv_func_readlink_truncate+y}
 then :
-  printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
-
-fi
-
-    if test $ac_cv_func_towlower = yes; then
-      REPLACE_TOWLOWER=0
-    else
-      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-             included before <wchar.h>.
-             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-             must be included before <wchar.h>.  */
-          #include <stddef.h>
-          #include <stdio.h>
-          #include <time.h>
-          #include <wchar.h>
-          #if HAVE_WCTYPE_H
-          # include <wctype.h>
-          #endif
-
-"
-if test "x$ac_cv_have_decl_towlower" = xyes
+  printf %s "(cached) " >&6
+else $as_nop
+  # We have readlink, so assume ln -s works.
+       ln -s ab conftest.link
+       if test "$cross_compiling" = yes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
-
-      if test $ac_cv_have_decl_towlower = yes; then
-                                REPLACE_TOWLOWER=1
-      else
-        REPLACE_TOWLOWER=0
-      fi
-    fi
-  fi
-
-
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
-        :
-  fi
+  case "$host_os" in
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_truncate="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_truncate="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
+          esac
 
-          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
-printf %s "checking for wctype_t... " >&6; }
-if test ${gl_cv_type_wctype_t+y}
-then :
-  printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
-            #if HAVE_WCTYPE_H
-            # include <wctype.h>
-            #endif
-            wctype_t a;
+#include <unistd.h>
 
 int
 main (void)
 {
-
+char c;
+      return readlink ("conftest.link", &c, 1) != 1;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_type_wctype_t=yes
-else
-  gl_cv_type_wctype_t=no
+  gl_cv_func_readlink_truncate=yes
+else $as_nop
+  gl_cv_func_readlink_truncate=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+      rm -f conftest.link conftest.lnk2
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
-printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
-  if test $gl_cv_type_wctype_t = no; then
-    HAVE_WCTYPE_T=0
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
+printf "%s\n" "$gl_cv_func_readlink_truncate" >&6; }
+    case $gl_cv_func_readlink_truncate in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
+
+printf "%s\n" "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
+
+        REPLACE_READLINK=1
+        ;;
+    esac
   fi
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
-printf %s "checking for wctrans_t... " >&6; }
-if test ${gl_cv_type_wctrans_t+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
-            #include <wctype.h>
-            wctrans_t a;
+  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
 
-int
-main (void)
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_type_wctrans_t=yes
-else
-  gl_cv_type_wctrans_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
-printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
-  if test $gl_cv_type_wctrans_t = no; then
-    HAVE_WCTRANS_T=0
-  fi
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
 
 
+  :
 
+  fi
 
 
 
@@ -30246,124 +32381,62 @@ printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
 
 
 
-  ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
-/* AIX 3.2.5 declares wcwidth in <string.h>. */
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
 
-"
-if test "x$ac_cv_have_decl_wcwidth" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+          GL_GNULIB_READLINK=1
 
-printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
 
-  if test $ac_cv_have_decl_wcwidth != yes; then
-    HAVE_DECL_WCWIDTH=0
-  fi
 
-  if test $ac_cv_func_wcwidth != yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
-printf %s "checking whether wcwidth is a macro... " >&6; }
-if test ${gl_cv_func_wcwidth_macro+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <wchar.h>
-#ifdef wcwidth
- wchar_header_defines_wcwidth
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
-then :
-  gl_cv_func_wcwidth_macro=yes
-else
-  gl_cv_func_wcwidth_macro=no
-fi
-rm -rf conftest*
 
+printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
-printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
-  fi
 
-  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
-    HAVE_WCWIDTH=1
-                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
-printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
-if test ${gl_cv_func_wcwidth_works+y}
+
+
+
+
+  if test $REPLACE_REALLOC = 0; then
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
+printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
+if test ${ac_cv_func_realloc_0_nonnull+y}
 then :
   printf %s "(cached) " >&6
-else
-
-        if test "$cross_compiling" = yes
+else $as_nop
+  if test "$cross_compiling" = yes
 then :
+  case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_realloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
+        esac
 
-           case "$host_os" in
-                                        # Guess yes on glibc and AIX 7 systems.
-             *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
-             *)                         gl_cv_func_wcwidth_works="guessing no";;
-           esac
-
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>
 
-#include <locale.h>
-/* AIX 3.2.5 declares wcwidth in <string.h>. */
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-#if !HAVE_DECL_WCWIDTH
-extern
-# ifdef __cplusplus
-"C"
-# endif
-int wcwidth (int);
-#endif
-int main ()
+int
+main (void)
 {
-  int result = 0;
-  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
-    {
-      if (wcwidth (0x0301) > 0)
-        result |= 1;
-      if (wcwidth (0x05B0) > 0)
-        result |= 2;
-      if (wcwidth (0x200B) > 0)
-        result |= 4;
-      if (wcwidth (0xFF1A) == 0)
-        result |= 8;
-    }
-  return result;
+void *p = realloc (0, 0);
+            int result = !p;
+            free (p);
+            return result;
+  ;
+  return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_wcwidth_works=yes
-else
-  gl_cv_func_wcwidth_works=no
+  ac_cv_func_realloc_0_nonnull=yes
+else $as_nop
+  ac_cv_func_realloc_0_nonnull=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
-printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
-    case "$gl_cv_func_wcwidth_works" in
-      *yes) ;;
-      *no) REPLACE_WCWIDTH=1 ;;
-    esac
-  else
-    HAVE_WCWIDTH=0
-  fi
-
-  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
-
-
-
-  :
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
+printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
+  case $ac_cv_func_realloc_0_nonnull in #(
+  *yes) :
+     ;; #(
+  *) :
+    REPLACE_REALLOC=1 ;;
+esac
 
   fi
 
+  if test $REPLACE_REALLOC = 1; then
 
 
 
 
-          GNULIB_WCWIDTH=1
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
 
-printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
+  fi
 
 
 
-  :
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_REALLOC=1
+  fi
 
+  if test $REPLACE_REALLOC = 1; then
 
-  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
 
-fi
 
 
 
 
-  :
 
 
+  gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
 
-  :
+  fi
 
-  :
 
 
-  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
 
-  # End of code from modules
 
 
 
 
 
+          GL_GNULIB_REALLOC_POSIX=1
 
 
 
 
-  gltests_libdeps=
-  gltests_ltlibdeps=
 
+printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
 
 
 
 
 
 
-  gl_source_base='gnulib-tests'
-  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+  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
 
-  gl_module_indicator_condition=$gltests_WITNESS
+fi
 
+  if test "$ac_cv_func_reallocarray" = no; then
+    HAVE_REALLOCARRAY=0
+  elif test "$gl_cv_malloc_ptrdiff" = no; then
+    REPLACE_REALLOCARRAY=1
+  fi
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
+  if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
 
 
 
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS reallocarray.$ac_objext"
 
+    :
   fi
 
 
+printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
 
 
 
-    if test "$GNULIB_ACCEPT" != 1; then
-        if test "$GNULIB_ACCEPT" = 0; then
-      GNULIB_ACCEPT=$gl_module_indicator_condition
-    else
-      GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
-    fi
-  fi
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
 
 
 
+          GL_GNULIB_REALLOCARRAY=1
 
 
 
 
-  if test $ac_cv_header_arpa_inet_h = yes; then
-    HAVE_ARPA_INET_H=1
-  else
-    HAVE_ARPA_INET_H=0
-  fi
 
+printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
 
 
 
 
 
+# Check whether --with-included-regex was given.
+if test ${with_included_regex+y}
+then :
+  withval=$with_included_regex;
+fi
 
 
+  case $with_included_regex in #(
+  yes|no) ac_use_included_regex=$with_included_regex
+        ;;
+  '')
+    # If the system regex support is good enough that it passes the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
-     else
-       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
-printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
-if test ${gl_cv_next_arpa_inet_h+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+printf %s "checking for working re_compile_pattern... " >&6; }
+if test ${gl_cv_func_re_compile_pattern_working+y}
 then :
   printf %s "(cached) " >&6
-else
-
-             if test $ac_cv_header_arpa_inet_h = yes; then
-
-
-
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                   # Guess no on native Windows.
+           mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+                   # Otherwise obey --enable-cross-guesses.
+           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
+         esac
 
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <arpa/inet.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+#include <regex.h>
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'arpa/inet.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
-    }'
+            #include <locale.h>
+            #include <limits.h>
+            #include <string.h>
 
-        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+            #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
+            # include <signal.h>
+            # include <unistd.h>
+            #endif
 
-           gl_header=$gl_cv_absolute_arpa_inet_h
-           gl_cv_next_arpa_inet_h='"'$gl_header'"'
-          else
-               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
-             fi
+            #if HAVE_MALLOC_H
+            # include <malloc.h>
+            #endif
 
+            #ifdef M_CHECK_ACTION
+            /* Exit with distinguishable exit code.  */
+            static void sigabrt_no_core (int sig) { raise (SIGTERM); }
+            #endif
 
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
-printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
-     fi
-     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
+int
+main (void)
+{
+int result = 0;
+            static struct re_pattern_buffer regex;
+            unsigned char folded_chars[UCHAR_MAX + 1];
+            int i;
+            const char *s;
+            struct re_registers regs;
 
-     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='<'arpa/inet.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
+            /* Some builds of glibc go into an infinite loop on this
+               test.  Use alarm to force death, and mallopt to avoid
+               malloc recursion in diagnosing the corrupted heap. */
+#if HAVE_DECL_ALARM
+            signal (SIGALRM, SIG_DFL);
+            alarm (2);
+#endif
+#ifdef M_CHECK_ACTION
+            signal (SIGABRT, sigabrt_no_core);
+            mallopt (M_CHECK_ACTION, 2);
+#endif
 
+            if (setlocale (LC_ALL, "en_US.UTF-8"))
+              {
+                {
+                  /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+                     This test needs valgrind to catch the bug on Debian
+                     GNU/Linux 3.1 x86, but it might catch the bug better
+                     on other platforms and it shouldn't hurt to try the
+                     test here.  */
+                  static char const pat[] = "insert into";
+                  static char const data[] =
+                    "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+                                 | RE_ICASE);
+                  memset (&regex, 0, sizeof regex);
+                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                  if (s)
+                    result |= 1;
+                  else
+                    {
+                      if (re_search (&regex, data, sizeof data - 1,
+                                     0, sizeof data - 1, &regs)
+                          != -1)
+                        result |= 1;
+                      regfree (&regex);
+                    }
+                }
 
+                {
+                  /* This test is from glibc bug 15078.
+                     The test case is from Andreas Schwab in
+                     <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
+                     */
+                  static char const pat[] = "[^x]x";
+                  static char const data[] =
+                    /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
+                    "\xe1\x80\x80"
+                    "\xe1\x80\xbb"
+                    "\xe1\x80\xbd"
+                    "\xe1\x80\x94"
+                    "\xe1\x80\xba"
+                    "\xe1\x80\xaf"
+                    "\xe1\x80\x95"
+                    "\xe1\x80\xba"
+                    "x";
+                  re_set_syntax (0);
+                  memset (&regex, 0, sizeof regex);
+                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+                  if (s)
+                    result |= 1;
+                  else
+                    {
+                      i = re_search (&regex, data, sizeof data - 1,
+                                     0, sizeof data - 1, 0);
+                      if (i != 0 && i != 21)
+                        result |= 1;
+                      regfree (&regex);
+                    }
+                }
 
+                if (! setlocale (LC_ALL, "C"))
+                  return 1;
+              }
 
+            /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
+            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[^x]b", 6, &regex);
+            if (s)
+              result |= 2;
+            else
+              {
+                /* This should fail, but succeeds for glibc-2.5.  */
+                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+                  result |= 2;
+                regfree (&regex);
+              }
 
+            /* This regular expression is from Spencer ere test number 75
+               in grep-2.3.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            for (i = 0; i <= UCHAR_MAX; i++)
+              folded_chars[i] = i;
+            regex.translate = folded_chars;
+            s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+            /* This should fail with _Invalid character class name_ error.  */
+            if (!s)
+              {
+                result |= 4;
+                regfree (&regex);
+              }
 
+            /* Ensure that [b-a] is diagnosed as invalid, when
+               using RE_NO_EMPTY_RANGES. */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("a[b-a]", 6, &regex);
+            if (s == 0)
+              {
+                result |= 8;
+                regfree (&regex);
+              }
 
+            /* This should succeed, but does not for glibc-2.1.3.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("{1", 2, &regex);
+            if (s)
+              result |= 8;
+            else
+              regfree (&regex);
 
+            /* The following example is derived from a problem report
+               against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[an\371]*n", 7, &regex);
+            if (s)
+              result |= 8;
+            else
+              {
+                /* This should match, but does not for glibc-2.2.1.  */
+                if (re_match (&regex, "an", 2, 0, &regs) != 2)
+                  result |= 8;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 8;
+            else
+              {
+                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+                  result |= 8;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
+            /* The version of regex.c in older versions of gnulib
+               ignored RE_ICASE.  Detect that problem too.  */
+            re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("x", 1, &regex);
+            if (s)
+              result |= 16;
+            else
+              {
+                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+                  result |= 16;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
+            /* Catch a bug reported by Vin Shelton in
+               https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
+               */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC
+                           & ~RE_CONTEXT_INVALID_DUP
+                           & ~RE_NO_EMPTY_RANGES);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
+            if (s)
+              result |= 32;
+            else
+              regfree (&regex);
 
+            /* REG_STARTEND was added to glibc on 2004-01-15.
+               Reject older versions.  */
+            if (! REG_STARTEND)
+              result |= 64;
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
+            /* Matching with the compiled form of this regexp would provoke
+               an assertion failure prior to glibc-2.28:
+                 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
+               With glibc-2.28, compilation fails and reports the invalid
+               back reference.  */
+            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+            memset (&regex, 0, sizeof regex);
+            s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
+            if (!s)
+              {
+                memset (&regs, 0, sizeof regs);
+                i = re_search (&regex, "x", 1, 0, 1, &regs);
+                if (i != -1)
+                  result |= 64;
+                if (0 <= i)
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
+            else
+              {
+                if (strcmp (s, "Invalid back reference"))
+                  result |= 64;
+              }
 
+            /* glibc bug 11053.  */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC);
+            memset (&regex, 0, sizeof regex);
+            static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
+            s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
+            if (s)
+              result |= 64;
+            else
+              {
+                memset (&regs, 0, sizeof regs);
+                static char const data[] = "a";
+                int datalen = sizeof data - 1;
+                i = re_search (&regex, data, datalen, 0, datalen, &regs);
+                if (i != 0)
+                  result |= 64;
+                else if (regs.num_regs < 2)
+                  result |= 64;
+                else if (! (regs.start[0] == 0 && regs.end[0] == 1))
+                  result |= 64;
+                else if (! (regs.start[1] == 0 && regs.end[1] == 0))
+                  result |= 64;
+                regfree (&regex);
+                free (regs.start);
+                free (regs.end);
+              }
 
+#if 0
+            /* It would be nice to reject hosts whose regoff_t values are too
+               narrow (including glibc on hosts with 64-bit ptrdiff_t and
+               32-bit int), but we should wait until glibc implements this
+               feature.  Otherwise, support for equivalence classes and
+               multibyte collation symbols would always be broken except
+               when compiling --without-included-regex.   */
+            if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+                || sizeof (regoff_t) < sizeof (ssize_t))
+              result |= 64;
+#endif
 
+            return result;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_re_compile_pattern_working=yes
+else $as_nop
+  gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
+    case "$gl_cv_func_re_compile_pattern_working" in #(
+      *yes) ac_use_included_regex=no;; #(
+      *no) ac_use_included_regex=yes;;
+    esac
+    ;;
+  *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+    ;;
+  esac
 
+  if test $ac_use_included_regex = yes; then
 
-  gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
+printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
 
-  fi
 
+printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
 
 
+printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
 
 
-    if test "$GNULIB_BIND" != 1; then
-        if test "$GNULIB_BIND" = 0; then
-      GNULIB_BIND=$gl_module_indicator_condition
-    else
-      GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
-    fi
-  fi
+printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
 
 
+printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
 
 
+printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
 
-printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
 
+printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
 
 
+printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
 
 
+printf "%s\n" "#define re_match rpl_re_match" >>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
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define re_match_2 rpl_re_match_2" >>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*
+printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
 
-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" "#define re_comp rpl_re_comp" >>confdefs.h
 
 
+printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
 
-  { 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
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define regcomp rpl_regcomp" >>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*
+printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
 
-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" "#define regerror rpl_regerror" >>confdefs.h
 
 
+printf "%s\n" "#define regfree rpl_regfree" >>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}
-then :
-  printf %s "(cached) " >&6
-else
+  if test $ac_use_included_regex = yes; then
 
-    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*
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+
+  ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
 
 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
 
 
+  ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_isblank" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
+
 
+  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}
+     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
+else $as_nop
+  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
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+  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, 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;
+       #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 { { 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*
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_setenv_works=yes
+else $as_nop
+  gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 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}: 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
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
 
+  fi
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
 
-  fi
 
 
 
 
 
-    if test "$GNULIB_CONNECT" != 1; then
-        if test "$GNULIB_CONNECT" = 0; then
-      GNULIB_CONNECT=$gl_module_indicator_condition
-    else
-      GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
-    fi
-  fi
 
+          GL_GNULIB_SETENV=1
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
 
+printf "%s\n" "#define GNULIB_TEST_SETENV 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}
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
+printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
+if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
+  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*)
+         gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
+       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
+     esac
 
-        if test "$cross_compiling" = yes
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
+printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_all_mtsafe" in
+    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
+  esac
+
+printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
+
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
+printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
+if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
 then :
+  printf %s "(cached) " >&6
+else $as_nop
   case "$host_os" in
-             mingw*) gl_cv_func_fdopen_works="guessing no" ;;
-             *)      gl_cv_func_fdopen_works="guessing yes" ;;
-           esac
+       # Guess no on OpenBSD, AIX.
+       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*)
+         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
+     esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
+printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_one_mtsafe" in
+    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
+  esac
 
-#include <stdio.h>
-#include <errno.h>
+printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
+
+
+    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    case "$host_os" in
+      mingw*) LIB_SETLOCALE_NULL= ;;
+      *)
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+printf %s "checking whether imported symbols can be declared weak... " >&6; }
+if test ${gl_cv_have_weak+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_cv_have_weak=no
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void xyzzy ();
+#pragma weak xyzzy
 int
 main (void)
 {
-  FILE *fp;
-  errno = 0;
-  fp = fdopen (-1, "r");
-  if (fp == NULL && errno == 0)
-    return 1;
+xyzzy();
+  ;
   return 0;
 }
 _ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+     if test $gl_cv_have_weak = maybe; then
+                     if test "$cross_compiling" = yes
+then :
+                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+             Extensible Linking Format
+             #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+  gl_cv_have_weak="guessing yes"
+else $as_nop
+  gl_cv_have_weak="guessing no"
+fi
+rm -rf conftest*
+
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_fdopen_works=yes
-else
-  gl_cv_func_fdopen_works=no
+  gl_cv_have_weak=yes
+else $as_nop
+  gl_cv_have_weak=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+     fi
+          case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+                    case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
-printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
-    case "$gl_cv_func_fdopen_works" in
-      *no) REPLACE_FDOPEN=1 ;;
-    esac
-  fi
-
-  if test $REPLACE_FDOPEN = 1; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+printf "%s\n" "$gl_cv_have_weak" >&6; }
+  case "$gl_cv_have_weak" in
+    *yes)
 
+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" ;;
+        esac
+        ;;
+    esac
+  else
+    LIB_SETLOCALE_NULL=
+  fi
 
 
+  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
 
 
-  fi
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
 
 
-    if test "$GNULIB_FDOPEN" != 1; then
-        if test "$GNULIB_FDOPEN" = 0; then
-      GNULIB_FDOPEN=$gl_module_indicator_condition
-    else
-      GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
-    fi
-  fi
 
 
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+printf %s "checking whether the -Werror option is usable... " >&6; }
+if test ${gl_cv_cc_vis_werror+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -Werror"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_vis_werror=yes
+else $as_nop
+  gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
-printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+printf %s "checking for simple visibility declarations... " >&6; }
+if test ${gl_cv_cc_visibility+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+                                          if test $gl_cv_cc_vis_werror = yes; then
+         CFLAGS="$CFLAGS -Werror"
+       fi
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+              extern __attribute__((__visibility__("default"))) int exportedvar;
+              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
+              void dummyfunc (void) {}
 
+int
+main (void)
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_cc_visibility=yes
+else $as_nop
+  gl_cv_cc_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+       CFLAGS="$gl_save_CFLAGS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+printf "%s\n" "$gl_cv_cc_visibility" >&6; }
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
 
 
 
-  if test $ac_cv_func_ftruncate = yes; then
+printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
 
 
-      case "$host_os" in
-        mingw*)
-                                                                      REPLACE_FTRUNCATE=1
-          ;;
-      esac
 
-  else
-    HAVE_FTRUNCATE=0
   fi
 
-  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
 
 
 
@@ -31325,432 +33426,1071 @@ printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
+          GL_GNULIB_SETLOCALE_NULL=1
 
 
-  ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
-if test "x$ac_cv_func_chsize" = xyes
-then :
-  printf "%s\n" "#define HAVE_CHSIZE 1" >>confdefs.h
 
-fi
 
 
-  fi
+printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
 
 
 
 
 
-    if test "$GNULIB_FTRUNCATE" != 1; then
-        if test "$GNULIB_FTRUNCATE" = 0; then
-      GNULIB_FTRUNCATE=$gl_module_indicator_condition
-    else
-      GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
-    fi
-  fi
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
 
+# Check whether --with-libsigsegv was given.
+if test ${with_libsigsegv+y}
+then :
+  withval=$with_libsigsegv;
+fi
 
+  SIGSEGV_H=sigsegv.h
+  if test "$with_libsigsegv" = yes; then
 
 
 
 
 
 
-  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
-  *yes,yes) ;;
-  *)
-        REPLACE_GETCWD=1
-    ;;
-  esac
 
-  if test $REPLACE_GETCWD = 1; then
 
 
 
 
 
 
+    use_additional=yes
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
 
-  gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libsigsegv-prefix was given.
+if test ${with_libsigsegv_prefix+y}
+then :
+  withval=$with_libsigsegv_prefix;
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+        additional_libdir2="$withval/$acl_libdirstem2"
+        additional_libdir3="$withval/$acl_libdirstem3"
+      fi
+    fi
+
+fi
+
+  if test "X$additional_libdir2" = "X$additional_libdir"; then
+    additional_libdir2=
   fi
+  if test "X$additional_libdir3" = "X$additional_libdir"; then
+    additional_libdir3=
+  fi
+      LIBSIGSEGV=
+  LTLIBSIGSEGV=
+  INCSIGSEGV=
+  LIBSIGSEGV_PREFIX=
+      HAVE_LIBSIGSEGV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='sigsegv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
+          if test $use_additional = yes; then
+            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+              if test "X$found_dir" = "X"; then
+                eval dir=\$$additional_libdir_variable
+                if test -n "$dir"; then
+                                                      if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                fi
+              fi
+            done
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBSIGSEGV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
+                  fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
+              else
+                                                                                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$acl_hardcode_direct" = yes; then
+                                                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
+                else
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                                haveit=
+                    for x in $LDFLAGS $LIBSIGSEGV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
+                    fi
+                    if test "$acl_hardcode_minus_L" != no; then
+                                                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
+                    else
+                                                                                                                                                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
+              else
+                                                LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'sigsegv'; then
+                  LIBSIGSEGV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'sigsegv'; then
+                  LIBSIGSEGV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem3 | */$acl_libdirstem3/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+                if test "$name" = 'sigsegv'; then
+                  LIBSIGSEGV_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCSIGSEGV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+                      haveit=
+                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBSIGSEGV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+                          if test "X$x" = "X-L$dependency_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$dependency_libdir"; then
+                                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$dependency_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBSIGSEGV; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
-    if test "$GNULIB_GETCWD" != 1; then
-        if test "$GNULIB_GETCWD" = 0; then
-      GNULIB_GETCWD=$gl_module_indicator_condition
+                          if test "X$x" = "X-L$dependency_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$dependency_libdir"; then
+                                                        LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$dependency_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
+                    if test "X$dep" != Xc \
+                       || case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) false ;;
+                            *)                          true ;;
+                          esac; then
+                      names_next_round="$names_next_round $dep"
+                    fi
+                    ;;
+                  *.la)
+                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
+                    LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
+            LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
     else
-      GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
+      done
     fi
   fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
+    done
+  fi
 
 
 
 
 
-printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
-
 
+        ac_save_CPPFLAGS="$CPPFLAGS"
 
+  for element in $INCSIGSEGV; do
+    haveit=
+    for x in $CPPFLAGS; do
 
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
 
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
 
 
-      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
-printf %s "checking for getpagesize... " >&6; }
-if test ${gl_cv_func_getpagesize+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
+printf %s "checking for libsigsegv... " >&6; }
+if test ${ac_cv_libsigsegv+y}
 then :
   printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+    ac_save_LIBS="$LIBS"
+                                case " $LIBSIGSEGV" in
+      *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
+      *)       LIBS="$LIBSIGSEGV $LIBS" ;;
+    esac
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <unistd.h>
+#include <sigsegv.h>
 int
 main (void)
 {
-return getpagesize();
+sigsegv_deinstall_handler();
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
-  gl_cv_func_getpagesize=yes
-else
-  gl_cv_func_getpagesize=no
+  ac_cv_libsigsegv=yes
+else $as_nop
+  ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_save_LIBS"
 
 fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
-printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
+printf "%s\n" "$ac_cv_libsigsegv" >&6; }
+  if test "$ac_cv_libsigsegv" = yes; then
+    HAVE_LIBSIGSEGV=yes
 
-  if test $gl_cv_func_getpagesize = no; then
-    HAVE_GETPAGESIZE=0
-    ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
-if test "x$ac_cv_header_OS_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
+printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
 
-fi
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
+printf %s "checking how to link with libsigsegv... " >&6; }
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
+printf "%s\n" "$LIBSIGSEGV" >&6; }
+  else
+    HAVE_LIBSIGSEGV=no
+            CPPFLAGS="$ac_save_CPPFLAGS"
+    LIBSIGSEGV=
+    LTLIBSIGSEGV=
+    LIBSIGSEGV_PREFIX=
+  fi
 
-    if test $ac_cv_header_OS_h = yes; then
-      HAVE_OS_H=1
-    fi
-    ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_param_h" = xyes
-then :
-  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
 
-fi
 
-    if test $ac_cv_header_sys_param_h = yes; then
-      HAVE_SYS_PARAM_H=1
+
+
+
+
+    gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
+
+    if test "$gl_cv_lib_sigsegv" = yes; then
+      SIGSEGV_H=
     fi
   fi
-  case "$host_os" in
-    mingw*)
-      REPLACE_GETPAGESIZE=1
-      ;;
-  esac
-      ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getpagesize" = xyes
-then :
 
+   if test -n "$SIGSEGV_H"; then
+  GL_GENERATE_SIGSEGV_H_TRUE=
+  GL_GENERATE_SIGSEGV_H_FALSE='#'
 else
-  HAVE_DECL_GETPAGESIZE=0
+  GL_GENERATE_SIGSEGV_H_TRUE='#'
+  GL_GENERATE_SIGSEGV_H_FALSE=
 fi
 
-
-  if test $REPLACE_GETPAGESIZE = 1; then
-
-
-
-
-
-
-
-
-  gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
-
-  fi
-
-
-
-
-
-    if test "$GNULIB_GETPAGESIZE" != 1; then
-        if test "$GNULIB_GETPAGESIZE" = 0; then
-      GNULIB_GETPAGESIZE=$gl_module_indicator_condition
-    else
-      GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
-    fi
-  fi
-
+  if test -n "$SIGSEGV_H"; then
 
 
+    case "$host_os" in
+      solaris2.11)
 
+printf "%s\n" "#define SOLARIS11 1" >>confdefs.h
 
-printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
+        ;;
+    esac
 
 
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack direction" >&5
+printf %s "checking for stack direction... " >&6; }
+if test ${sv_cv_stack_direction_msg+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+    case "$host_cpu" in
+            a29k | \
+      aarch64* | \
+      alpha* | \
+      arc | \
+      arm* | strongarm* | xscale* | \
+      avr | avr32 | \
+      bfin | \
+      c1 | c2 | c32 | c34 | c38 | \
+      clipper | \
+      cris | \
+      d30v | \
+      elxsi | \
+      fr30 | \
+      h8300 | \
+      i?86 | x86_64 | \
+      i860 | \
+      ia64 | \
+      m32r | \
+      m68* | \
+      m88k | \
+      mcore | \
+      microblaze | \
+      mips* | \
+      mmix | \
+      mn10200 | \
+      mn10300 | \
+      nios2 | \
+      nds32* | \
+      ns32k | \
+      pdp11 | \
+      pj* | \
+      powerpc* | rs6000 | \
+      riscv* | \
+      romp | \
+      s390* | \
+      sh* | \
+      sparc* | \
+      v850 | \
+      vax | \
+      xtensa)
+        sv_cv_stack_direction=-1 ;;
+      c4x | \
+      dsp16xx | \
+      i960 | \
+      hppa* | parisc* | \
+      stormy16 | \
+      we32k)
+        sv_cv_stack_direction=1 ;;
+      *)
+        if test $cross_compiling = no; then
+          cat > conftest.c <<EOF
+#include <stdio.h>
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+int
+main (int argc, char *argv)
+{
+  printf ("%d\n", find_stack_direction (NULL, argc + 20));
+  return 0;
+}
+EOF
+          { { 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; }
+          sv_cv_stack_direction=`./conftest`
+        else
+          sv_cv_stack_direction=0
+        fi
+        ;;
+    esac
+    case $sv_cv_stack_direction in
+      1)  sv_cv_stack_direction_msg="grows up";;
+      -1) sv_cv_stack_direction_msg="grows down";;
+      *)  sv_cv_stack_direction_msg="unknown";;
+    esac
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_stack_direction_msg" >&5
+printf "%s\n" "$sv_cv_stack_direction_msg" >&6; }
 
+printf "%s\n" "#define STACK_DIRECTION $sv_cv_stack_direction" >>confdefs.h
 
 
 
 
 
-                HAVE_INET_PTON=1
-  INET_PTON_LIB=
 
 
 
+  if test "$ac_cv_func_sigaltstack" = yes; then
+    ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
 
-  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
+"
+if test "x$ac_cv_type_stack_t" = xyes
 then :
-  printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
 
-fi
+else $as_nop
 
-  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
+printf "%s\n" "#define stack_t struct sigaltstack" >>confdefs.h
 
 
-  if test $HAVE_WINSOCK2_H = 1; then
-    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
-"
-if test "x$ac_cv_have_decl_inet_pton" = xyes
-then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
 
-printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+  fi
 
-    if test $ac_cv_have_decl_inet_pton = yes; then
-                  REPLACE_INET_PTON=1
-      INET_PTON_LIB="-lws2_32"
-    else
-      HAVE_DECL_INET_PTON=0
-      HAVE_INET_PTON=0
-    fi
-  else
-    gl_save_LIBS=$LIBS
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
-printf %s "checking for library containing inet_pton... " >&6; }
-if test ${ac_cv_search_inet_pton+y}
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sigaltstack" >&5
+printf %s "checking for working sigaltstack... " >&6; }
+if test ${sv_cv_sigaltstack+y}
 then :
   printf %s "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+    if test "$ac_cv_func_sigaltstack" = yes; then
+      case "$host_os" in
+        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+          # On MacOS X 10.2 or newer, just assume that if it compiles, it will
+          # work. If we were to perform the real test, 1 Crash Report dialog
+          # window would pop up.
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char inet_pton ();
+            #include <signal.h>
 int
 main (void)
 {
-return inet_pton ();
+int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
   ;
   return 0;
 }
 _ACEOF
-for ac_lib in '' nsl resolv network
-do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"
-then :
-  ac_cv_search_inet_pton=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test ${ac_cv_search_inet_pton+y}
+if ac_fn_c_try_link "$LINENO"
 then :
-  break
+  sv_cv_sigaltstack="guessing yes"
+else $as_nop
+  sv_cv_sigaltstack=no
 fi
-done
-if test ${ac_cv_search_inet_pton+y}
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+          ;;
+        *)
+          if test "$cross_compiling" = yes
 then :
 
-else
-  ac_cv_search_inet_pton=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
-printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
-ac_res=$ac_cv_search_inet_pton
-if test "$ac_res" != no
-then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+                            case "$host_os" in
+                *)
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-else
-  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
-if test "x$ac_cv_func_inet_pton" = xyes
+                    #include <signal.h>
+int
+main (void)
+{
+int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
-
-fi
-
-       if test $ac_cv_func_inet_pton = no; then
-         HAVE_INET_PTON=0
-       fi
-
+  sv_cv_sigaltstack="guessing yes"
+else $as_nop
+  sv_cv_sigaltstack=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+                  ;;
+              esac
 
-    LIBS=$gl_save_LIBS
-
-    if test "$ac_cv_search_inet_pton" != "no" \
-       && test "$ac_cv_search_inet_pton" != "none required"; then
-      INET_PTON_LIB="$ac_cv_search_inet_pton"
-    fi
-
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
-        #if HAVE_NETDB_H
-        # include <netdb.h>
-        #endif
 
-"
-if test "x$ac_cv_have_decl_inet_pton" = xyes
+#include <stdlib.h>
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
+#if HAVE_SETRLIMIT
+# include <sys/types.h>
+# include <sys/time.h>
+# include <sys/resource.h>
+#endif
+void stackoverflow_handler (int sig)
+{
+  /* If we get here, the stack overflow was caught.  */
+  exit (0);
+}
+volatile int * recurse_1 (volatile int n, volatile int *p)
+{
+  if (n >= 0)
+    *recurse_1 (n + 1, p) += n;
+  return p;
+}
+int recurse (volatile int n)
+{
+  int sum = 0;
+  return *recurse_1 (n, &sum);
+}
+char mystack[2 * (1 << 24)];
+int main ()
+{
+  stack_t altstack;
+  struct sigaction action;
+#if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
+  /* Before starting the endless recursion, try to be friendly to the user's
+     machine.  On some Linux 2.2.x systems, there is no stack limit for user
+     processes at all.  We don't want to kill such systems.  */
+  struct rlimit rl;
+  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
+  setrlimit (RLIMIT_STACK, &rl);
+#endif
+  /* Install the alternate stack.  Use the midpoint of mystack, to guard
+     against a buggy interpretation of ss_sp on IRIX.  */
+#ifdef SIGSTKSZ
+  if (sizeof mystack / 2 < SIGSTKSZ)
+    exit (3);
+#endif
+  altstack.ss_sp = mystack + sizeof mystack / 2;
+  altstack.ss_size = sizeof mystack / 2;
+  altstack.ss_flags = 0; /* no SS_DISABLE */
+  if (sigaltstack (&altstack, NULL) < 0)
+    exit (1);
+  /* Install the SIGSEGV handler.  */
+  sigemptyset (&action.sa_mask);
+  action.sa_handler = &stackoverflow_handler;
+  action.sa_flags = SA_ONSTACK;
+  sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
+  sigaction (SIGBUS, &action, (struct sigaction *) NULL);
+  /* Provoke a stack overflow.  */
+  recurse (0);
+  exit (2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  sv_cv_sigaltstack=yes
+else $as_nop
+  sv_cv_sigaltstack=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
-
-    if test $ac_cv_have_decl_inet_pton = no; then
-      HAVE_DECL_INET_PTON=0
+          ;;
+      esac
+    else
+      sv_cv_sigaltstack=no
     fi
-  fi
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack" >&5
+printf "%s\n" "$sv_cv_sigaltstack" >&6; }
+  if test "$sv_cv_sigaltstack" != no; then
 
-  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
-
+printf "%s\n" "#define HAVE_WORKING_SIGALTSTACK 1" >>confdefs.h
 
 
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
+printf %s "checking for correct stack_t interpretation... " >&6; }
+if test ${sv_cv_sigaltstack_low_base+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+      if test "$cross_compiling" = yes
+then :
 
+                case "$host_os" in
+          irix5*) sv_cv_sigaltstack_low_base="no" ;;
+          *)      sv_cv_sigaltstack_low_base="guessing yes" ;;
+        esac
 
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
+#include <stdlib.h>
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
+volatile char *stack_lower_bound;
+volatile char *stack_upper_bound;
+static void check_stack_location (volatile char *addr)
+{
+  if (addr >= stack_lower_bound && addr <= stack_upper_bound)
+    exit (0);
+  else
+    exit (1);
+}
+static void stackoverflow_handler (int sig)
+{
+  char dummy;
+  check_stack_location (&dummy);
+}
+char mystack[2 * (1 << 24)];
+int main ()
+{
+  stack_t altstack;
+  struct sigaction action;
+  /* Install the alternate stack.  */
+  altstack.ss_sp = mystack + sizeof mystack / 2;
+  altstack.ss_size = sizeof mystack / 2;
+  stack_lower_bound = (char *) altstack.ss_sp;
+  stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
+  altstack.ss_flags = 0; /* no SS_DISABLE */
+  if (sigaltstack (&altstack, NULL) < 0)
+    exit (2);
+  /* Install the SIGSEGV handler.  */
+  sigemptyset (&action.sa_mask);
+  action.sa_handler = &stackoverflow_handler;
+  action.sa_flags = SA_ONSTACK;
+  if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
+    exit(3);
+  /* Provoke a SIGSEGV.  */
+  raise (SIGSEGV);
+  exit (3);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  sv_cv_sigaltstack_low_base=yes
+else $as_nop
+  sv_cv_sigaltstack_low_base=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sv_cv_sigaltstack_low_base" >&5
+printf "%s\n" "$sv_cv_sigaltstack_low_base" >&6; }
+    if test "$sv_cv_sigaltstack_low_base" = no; then
 
+printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
 
+    fi
   fi
 
 
-
-
-
-    if test "$GNULIB_INET_PTON" != 1; then
-        if test "$GNULIB_INET_PTON" = 0; then
-      GNULIB_INET_PTON=$gl_module_indicator_condition
-    else
-      GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
-    fi
   fi
 
+  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
 
+fi
 
-
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-printf %s "checking whether byte ordering is bigendian... " >&6; }
-if test ${ac_cv_c_bigendian+y}
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+printf %s "checking for SIZE_MAX... " >&6; }
+if test ${gl_cv_size_max+y}
 then :
   printf %s "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
+else $as_nop
+
+    gl_cv_size_max=no
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
 
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1
 then :
+  gl_cv_size_max=yes
+fi
+rm -rf conftest*
 
-       # Check for potential -arch flags.  It is not universal unless
-       # there are at least two -arch flags with different values.
-       ac_arch=
-       ac_prev=
-       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-        if test -n "$ac_prev"; then
-          case $ac_word in
-            i?86 | x86_64 | ppc | ppc64)
-              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-                ac_arch=$ac_word
-              else
-                ac_cv_c_bigendian=universal
-                break
-              fi
-              ;;
-          esac
-          ac_prev=
-        elif test "x$ac_word" = "x-arch"; then
-          ac_prev=arch
-        fi
-       done
+    if test $gl_cv_size_max != yes; then
+                        if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1"        "#include <stddef.h>
+#include <limits.h>"
+then :
+
+else $as_nop
+  size_t_bits_minus_1=
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+      if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint"        "#include <stddef.h>"
+then :
+
+else $as_nop
+  fits_in_uint=
+fi
+
+      if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+        if test $fits_in_uint = 1; then
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
+#include <stddef.h>
+                 extern size_t foo;
+                 extern unsigned long foo;
 
 int
 main (void)
 {
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
 
   ;
   return 0;
@@ -31758,287 +34498,5977 @@ main (void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+        fi
+                                if test $fits_in_uint = 1; then
+          gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        else
+          gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+        fi
+      else
+                gl_cv_size_max='((size_t)~(size_t)0)'
+      fi
+    fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+printf "%s\n" "$gl_cv_size_max" >&6; }
+  if test "$gl_cv_size_max" != yes; then
+
+printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
+
+  fi
+
+
+
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+printf %s "checking for ssize_t... " >&6; }
+if test ${gt_cv_ssize_t+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
-               #include <sys/param.h>
-
 int
 main (void)
 {
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
-
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+            return !x;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
+  gt_cv_ssize_t=yes
+else $as_nop
+  gt_cv_ssize_t=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+printf "%s\n" "$gt_cv_ssize_t" >&6; }
+  if test $gt_cv_ssize_t = no; then
 
-int
-main (void)
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
+printf "%s\n" "#define ssize_t int" >>confdefs.h
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
+  fi
+
+
+
+
+
+  case "$host_os" in
+    mingw*)
+                  REPLACE_STAT=1
+      ;;
+    *)
+                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+printf %s "checking whether stat handles trailing slashes on files... " >&6; }
+if test ${gl_cv_func_stat_file_slash+y}
 then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  printf %s "(cached) " >&6
+else $as_nop
+  touch conftest.tmp
+         # Assume that if we have lstat, we can also check symlinks.
+         if test $ac_cv_func_lstat = yes; then
+           ln -s conftest.tmp conftest.lnk
+         fi
+         if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                               # Guess yes on Linux systems.
+              linux-* | linux) 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.
+              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
+            esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
+#include <sys/stat.h>
 
 int
 main (void)
 {
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
+int result = 0;
+               struct stat st;
+               if (!stat ("conftest.tmp/", &st))
+                 result |= 1;
+#if HAVE_LSTAT
+               if (!stat ("conftest.lnk/", &st))
+                 result |= 2;
+#endif
+               return result;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"
+if ac_fn_c_try_run "$LINENO"
 then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
+  gl_cv_func_stat_file_slash=yes
+else $as_nop
+  gl_cv_func_stat_file_slash=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes
-then :
-  # Try to guess by grepping values from an object file.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
+
+         rm -f conftest.tmp conftest.lnk
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
+printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
+      case $gl_cv_func_stat_file_slash in
+        *no)
+          REPLACE_STAT=1
+
+printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+;;
+      esac
+      case $host_os in
+                solaris*)
+          REPLACE_FSTAT=1 ;;
+      esac
+      ;;
+  esac
+
+  if test $REPLACE_STAT = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
+
+    case "$host_os" in
+      mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
+
+        ;;
+    esac
+
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STAT=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
+
+
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
+printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
+if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            #include <sys/types.h>
+            #include <sys/stat.h>
+            #if HAVE_SYS_TIME_H
+            # include <sys/time.h>
+            #endif
+            #include <time.h>
+            struct timespec ts;
+            struct stat st;
 
 int
 main (void)
 {
-return use_ascii (foo) == use_ebcdic (foo);
+
+            st.st_atim = ts;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
+  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
+else $as_nop
+  ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
+printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
+     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
+
+printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
+
+     fi
+else $as_nop
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
+        #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
+
+
+else $as_nop
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
+           #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
+
+
+else $as_nop
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h>
+              #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+
+fi
+
+fi
+
+fi
+
+
+
+
+
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
+
+
+else $as_nop
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
+        #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
+
+
+else $as_nop
+  ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
+          #include <sys/stat.h>
+"
+if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+
+fi
+
+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 $as_nop
+  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 $as_nop
+  gl_cv_header_working_stdalign_h=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+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
+    STDALIGN_H=''
+  else
+    STDALIGN_H='stdalign.h'
+  fi
+
+
+   if test -n "$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
+
+
+
+  STDARG_H=''
+  NEXT_STDARG_H='<stdarg.h>'
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+printf %s "checking for va_copy... " >&6; }
+if test ${gl_cv_func_va_copy+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+#include <stdarg.h>
 int
 main (void)
 {
 
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func_va_copy=yes
+else $as_nop
+  gl_cv_func_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+printf "%s\n" "$gl_cv_func_va_copy" >&6; }
+  if test $gl_cv_func_va_copy = no; then
+                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined _AIX && !defined __GNUC__
+        AIX vaccine
+       #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "vaccine" >/dev/null 2>&1
+then :
+  gl_aixcc=yes
+else $as_nop
+  gl_aixcc=no
+fi
+rm -rf conftest*
+
+    if test $gl_aixcc = yes; then
+            STDARG_H=stdarg.h
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdarg_h='<'stdarg.h'>'
+     else
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+printf %s "checking absolute name of <stdarg.h>... " >&6; }
+if test ${gl_cv_next_stdarg_h+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.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 'stdarg.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_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+           gl_header=$gl_cv_absolute_stdarg_h
+           gl_cv_next_stdarg_h='"'$gl_header'"'
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
+     fi
+     NEXT_STDARG_H=$gl_cv_next_stdarg_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='<'stdarg.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdarg_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
+
+
+
+
+            if test "$gl_cv_next_stdarg_h" = '""'; then
+        gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+        NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+      fi
+    else
+
+
+  exec 9>&6 6>/dev/null
+
+    if test ${gl_cv_func___va_copy+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+int
+main (void)
+{
+
+#ifndef __va_copy
+error, bail out
+#endif
 
   ;
   return 0;
 }
-_ACEOF
-if ac_fn_c_try_run "$LINENO"
-then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func___va_copy=yes
+else $as_nop
+  gl_cv_func___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+  exec 6>&9 9>&-
+
+
+      if test $gl_cv_func___va_copy = yes; then
+
+printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
+
+      else
+
+
+printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
+
+      fi
+    fi
+  fi
+
+   if test -n "$STDARG_H"; then
+  GL_GENERATE_STDARG_H_TRUE=
+  GL_GENERATE_STDARG_H_FALSE='#'
+else
+  GL_GENERATE_STDARG_H_TRUE='#'
+  GL_GENERATE_STDARG_H_FALSE=
+fi
+
+
+
+
+
+
+
+          if test "$ac_cv_header_stdbool_h" = yes; then
+    case "$host_os" in
+      solaris*)
+        if test -z "$GCC"; then
+          STDBOOL_H='stdbool.h'
+        else
+          STDBOOL_H=''
+        fi
+        ;;
+      *)
+        STDBOOL_H=''
+        ;;
+    esac
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+   if test -n "$STDBOOL_H"; then
+  GL_GENERATE_STDBOOL_H_TRUE=
+  GL_GENERATE_STDBOOL_H_FALSE='#'
+else
+  GL_GENERATE_STDBOOL_H_TRUE='#'
+  GL_GENERATE_STDBOOL_H_FALSE=
+fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FSCANF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
+
+
+
+
+
+printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_SCANF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
+
+
+
+
+
+printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FGETC=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_GETC=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_GETCHAR=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FGETS=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FREAD=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FPRINTF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_PRINTF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_VFPRINTF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_VPRINTF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FPUTC=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_PUTC=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_PUTCHAR=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FPUTS=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_PUTS=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_FWRITE=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_strcasecmp = no; then
+    HAVE_STRCASECMP=0
+  fi
+
+
+
+  ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
+if test "x$ac_cv_func_strncasecmp" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_strncasecmp = yes; then
+    HAVE_STRNCASECMP=1
+  else
+    HAVE_STRNCASECMP=0
+  fi
+  ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strncasecmp" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
+
+  if test $ac_cv_have_decl_strncasecmp = no; then
+    HAVE_DECL_STRNCASECMP=0
+  fi
+
+
+  if test $HAVE_STRCASECMP = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
+
+
+  :
+
+  fi
+  if test $HAVE_STRNCASECMP = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+printf %s "checking for working strerror function... " >&6; }
+if test ${gl_cv_func_working_strerror+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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" ;;
+         esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+int
+main (void)
+{
+if (!*strerror (-2)) return 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_working_strerror=yes
+else $as_nop
+  gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+                        REPLACE_STRERROR=1
+        ;;
+    esac
+
+                  case "$gl_cv_func_strerror_r_works" in
+        *no) REPLACE_STRERROR=1 ;;
+      esac
+
+  else
+            REPLACE_STRERROR=1
+  fi
+
+  if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
+
+  fi
+
+
+printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STRERROR=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
+
+
+
+
+
+  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
+
+
+
+
+
+  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
+
+
+  fi
+  if test $gl_cond_libtool = false; then
+    gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+    gl_libdeps="$gl_libdeps $LIBICONV"
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_have_decl_strnlen = no; then
+    HAVE_DECL_STRNLEN=0
+  else
+
+         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+printf %s "checking for working strnlen... " >&6; }
+if test ${ac_cv_func_strnlen_working+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  # Guess no on AIX systems, yes otherwise.
+               case "$host_os" in
+                 aix*) ac_cv_func_strnlen_working=no;;
+                 *)    ac_cv_func_strnlen_working=yes;;
+               esac
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main (void)
+{
+
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
+
+  /* At least one implementation is buggy: that of AIX 4.3 would
+     give strnlen (S, 1) == 3.  */
+
+  int i;
+  for (i = 0; i < S_LEN + 1; ++i)
+    {
+      int expected = i <= S_LEN ? i : S_LEN;
+      if (strnlen (S, i) != expected)
+       return 1;
+    }
+  return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  ac_cv_func_strnlen_working=yes
+else $as_nop
+  ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no && :
+
+
+    if test $ac_cv_func_strnlen_working = no; then
+      REPLACE_STRNLEN=1
+    fi
+  fi
+
+  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
+
+    :
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STRNLEN=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
+
+
+
+
+
+
+
+  if test $ac_cv_func_strptime != yes; then
+    HAVE_STRPTIME=0
+  fi
+
+  if test $HAVE_STRPTIME = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
+
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STRPTIME=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  if test "$ac_cv_have_decl_strtoimax" != yes; then
+    HAVE_DECL_STRTOIMAX=0
+  fi
+
+  if test "$ac_cv_func_strtoimax" = yes; then
+    HAVE_STRTOIMAX=1
+             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
+printf %s "checking whether strtoimax works... " >&6; }
+if test ${gl_cv_func_strtoimax+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                    # Guess no on AIX 5.
+            aix5*)  gl_cv_func_strtoimax="guessing no" ;;
+                    # Guess yes on native Windows.
+            mingw*) gl_cv_func_strtoimax="guessing yes" ;;
+                    # Guess yes otherwise.
+            *)      gl_cv_func_strtoimax="guessing yes" ;;
+          esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#include <string.h>
+#include <inttypes.h>
+int main ()
+{
+  if (sizeof (intmax_t) > sizeof (int))
+    {
+      const char *s = "4294967295";
+      char *p;
+      intmax_t res;
+      errno = 0;
+      res = strtoimax (s, &p, 10);
+      if (p != s + strlen (s))
+        return 1;
+      if (errno != 0)
+        return 2;
+      if (res != (intmax_t) 65535 * (intmax_t) 65537)
+        return 3;
+    }
+  else
+    {
+      const char *s = "2147483647";
+      char *p;
+      intmax_t res;
+      errno = 0;
+      res = strtoimax (s, &p, 10);
+      if (p != s + strlen (s))
+        return 1;
+      if (errno != 0)
+        return 2;
+      if (res != 2147483647)
+        return 3;
+    }
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_strtoimax=yes
+else $as_nop
+  gl_cv_func_strtoimax=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
+printf "%s\n" "$gl_cv_func_strtoimax" >&6; }
+    case "$gl_cv_func_strtoimax" in
+      *no) REPLACE_STRTOIMAX=1 ;;
+    esac
+  else
+    if test "$ac_cv_have_decl_strtoimax" = yes; then
+      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
+      REPLACE_STRTOIMAX=1
+    fi
+    HAVE_STRTOIMAX=0
+  fi
+
+  if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
+
+
+  ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_strtoll" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h
+
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STRTOIMAX=1
+
+
+
+
+
+
+
+  ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
+if test "x$ac_cv_func_strtoll" = xyes
+then :
+  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_strtoll = yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strtoll works" >&5
+printf %s "checking whether strtoll works... " >&6; }
+if test ${gl_cv_func_strtoll_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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" ;;
+          esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+int
+main (void)
+{
+int result = 0;
+              char *term;
+              /* This test fails on Minix and native Windows.  */
+              {
+                const char input[] = "0x";
+                (void) strtoll (input, &term, 16);
+                if (term != input + 1)
+                  result |= 1;
+              }
+              return result;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_strtoll_works=yes
+else $as_nop
+  gl_cv_func_strtoll_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoll_works" >&5
+printf "%s\n" "$gl_cv_func_strtoll_works" >&6; }
+    case "$gl_cv_func_strtoll_works" in
+      *yes) ;;
+      *)    REPLACE_STRTOLL=1 ;;
+    esac
+  else
+    HAVE_STRTOLL=0
+  fi
+
+  if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_STRTOLL=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+printf "%s\n" "#define GNULIB_TEMPNAME 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+      ac_fn_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+         been included before.  */
+      #if defined __MINGW32__
+      # include <unistd.h>
+      #endif
+      #include <time.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_localtime_r" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
+
+  if test $ac_cv_have_decl_localtime_r = no; then
+    HAVE_DECL_LOCALTIME_R=0
+  fi
+
+
+  if test $ac_cv_func_localtime_r = yes; then
+    HAVE_LOCALTIME_R=1
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
+printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
+if test ${gl_cv_time_r_posix+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
+
+int
+main (void)
+{
+/* We don't need to append 'restrict's to the argument types,
+                 even though the POSIX signature has the 'restrict's,
+                 since C99 says they can't affect type compatibility.  */
+              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+              if (ptr) return 0;
+              /* Check the return type is a pointer.
+                 On HP-UX 10 it is 'int'.  */
+              *localtime_r (0, 0);
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_time_r_posix=yes
+else $as_nop
+  gl_cv_time_r_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
+printf "%s\n" "$gl_cv_time_r_posix" >&6; }
+    if test $gl_cv_time_r_posix = yes; then
+      REPLACE_LOCALTIME_R=0
+    else
+      REPLACE_LOCALTIME_R=1
+    fi
+  else
+    HAVE_LOCALTIME_R=0
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
+printf %s "checking whether localtime_r exists as an inline function... " >&6; }
+if test ${gl_cv_func_localtime_r_inline+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
+
+int
+main (void)
+{
+time_t a;
+              struct tm r;
+              localtime_r (&a, &r);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_func_localtime_r_inline=yes
+else $as_nop
+  gl_cv_func_localtime_r_inline=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
+printf "%s\n" "$gl_cv_func_localtime_r_inline" >&6; }
+    if test $gl_cv_func_localtime_r_inline = yes; then
+      REPLACE_LOCALTIME_R=1
+    fi
+  fi
+
+  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_TIME_R=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  # On Mac OS X 10.6, localtime loops forever with some time_t values.
+  # See Bug#27706, Bug#27736, and
+  # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime works even near extrema" >&5
+printf %s "checking whether localtime works even near extrema... " >&6; }
+if test ${gl_cv_func_localtime_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_cv_func_localtime_works=yes
+     if test "$cross_compiling" = yes
+then :
+  gl_cv_func_localtime_works="guessing yes"
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+            #include <string.h>
+            #include <unistd.h>
+            #include <time.h>
+
+int
+main (void)
+{
+
+            time_t t = -67768038400666600;
+            struct tm *tm;
+            char *tz = getenv ("TZ");
+            if (! (tz && strcmp (tz, "QQQ0") == 0))
+              return 0;
+            alarm (2);
+            tm = localtime (&t);
+            /* Use TM and *TM to suppress over-optimization.  */
+            return tm && tm->tm_isdst;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
+           gl_cv_func_localtime_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_works" >&5
+printf "%s\n" "$gl_cv_func_localtime_works" >&6; }
+  if test "$gl_cv_func_localtime_works" = no; then
+
+printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
+
+  fi
+
+  ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
+"
+if test "x$ac_cv_type_timezone_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
+
+
+fi
+
+  if test "$ac_cv_type_timezone_t" = yes; then
+    HAVE_TIMEZONE_T=1
+  fi
+
+  if test $HAVE_TIMEZONE_T = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_TIME_RZ=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
+
+
+
+
+
+
+  REPLACE_TIMEGM=0
+
+  if test $ac_cv_func_timegm = yes; then
+    if test "$gl_cv_func_working_mktime" != yes; then
+      # Assume that timegm is buggy if mktime is.
+      REPLACE_TIMEGM=1
+    fi
+  else
+    HAVE_TIMEGM=0
+  fi
+
+  if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_TIMEGM=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
+
+
+
+  :
+
+
+
+  REPLACE_TZSET=0
+  case "$host_os" in
+    mingw*) REPLACE_TZSET=1 ;;
+  esac
+
+  if test $REPLACE_TZSET = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_TZSET=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+      if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+    LIBUNISTRING_UNISTR_H='unistr.h'
+  else
+    LIBUNISTRING_UNISTR_H=
+  fi
+
+
+
+
+printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
+
+
+
+
+       if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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 0
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
+  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
+else
+  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
+  LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
+fi
+
+
+
+
+printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
+
+
+
+
+       if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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 0
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
+  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
+else
+  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
+  LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
+fi
+
+
+
+
+      if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+    LIBUNISTRING_UNITYPES_H='unitypes.h'
+  else
+    LIBUNISTRING_UNITYPES_H=
+  fi
+
+
+
+
+
+      if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+    LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
+  else
+    LIBUNISTRING_UNIWIDTH_H=
+  fi
+
+
+
+
+       if  { test "$HAVE_LIBUNISTRING" != yes \
+    || {
+
+
+
+            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 8
+                         }
+                    }
+               }
+
+
+
+
+       }
+  }; then
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
+else
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
+  LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
+fi
+
+
+
+printf "%s\n" "#define GNULIB_STDIO_SINGLE_THREAD 1" >>confdefs.h
+
+
+printf "%s\n" "#define USE_UNLOCKED_IO GNULIB_STDIO_SINGLE_THREAD" >>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 $as_nop
+  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 $as_nop
+  gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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 $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+
+
+$gl_mda_defines
+
+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;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_unsetenv_works=yes
+else $as_nop
+  gl_cv_func_unsetenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+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_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_UNSETENV=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
+
+
+
+
+
+
+  if test $ac_cv_func_vasnprintf = no; then
+
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_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 $as_nop
+
+printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+  fi
+
+
+  ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = xyes
+then :
+  printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_vasprintf = no; then
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
+
+
+  if test $ac_cv_func_vasprintf = yes; then
+    REPLACE_VASPRINTF=1
+  else
+    HAVE_VASPRINTF=0
+  fi
+
+
+
+
+
+
+
+
+  fi
+
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_VASPRINTF=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
+
+
+
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+
+
+# Check whether --with-packager was given.
+if test ${with_packager+y}
+then :
+  withval=$with_packager;       case $withval in
+        yes|no) ;;
+        *)
+printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
+ ;;
+      esac
+
+fi
+
+
+
+# Check whether --with-packager-version was given.
+if test ${with_packager_version+y}
+then :
+  withval=$with_packager_version;       case $withval in
+        yes|no) ;;
+        *)
+printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
+ ;;
+      esac
+
+fi
+
+
+
+# Check whether --with-packager-bug-reports was given.
+if test ${with_packager_bug_reports+y}
+then :
+  withval=$with_packager_bug_reports;       case $withval in
+        yes|no) ;;
+        *)
+printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
+ ;;
+      esac
+
+fi
+
+
+  if test "X$with_packager" = "X" && \
+     test "X$with_packager_version$with_packager_bug_reports" != "X"
+  then
+    as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
+  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 $as_nop
+
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      else
+        if test $LOCALE_FR_UTF8 != none; then
+          if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        fi
+      fi
+
+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 $as_nop
+
+                  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 $as_nop
+  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 $as_nop
+  gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      fi
+
+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" "
+      #include <wchar.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_wcrtomb" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
+
+    if test $ac_cv_have_decl_wcrtomb = yes; then
+                        REPLACE_WCRTOMB=1
+    fi
+  else
+                        if test $REPLACE_WCRTOMB = 0; then
+
+
+
+
+
+             { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
+printf %s "checking whether wcrtomb works in the C locale... " >&6; }
+if test ${gl_cv_func_wcrtomb_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+                               # Guess no on Android.
+              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
+                               # Guess yes otherwise.
+              *)               gl_cv_func_wcrtomb_works="guessing yes";;
+            esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h>
+#include <stdlib.h>
+#include <wchar.h>
+int main ()
+{
+  mbstate_t state;
+  char out[64];
+  int count;
+  memset (&state, 0, sizeof (state));
+  out[0] = 'x';
+  count = wcrtomb (out, L'a', &state);
+  return !(count == 1 && out[0] == 'a');
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_wcrtomb_works=yes
+else $as_nop
+  gl_cv_func_wcrtomb_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
+printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
+      case "$gl_cv_func_wcrtomb_works" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
+
+           REPLACE_WCRTOMB=1 ;;
+      esac
+    fi
+    if test $REPLACE_WCRTOMB = 0; then
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+printf %s "checking whether wcrtomb return value is correct... " >&6; }
+if test ${gl_cv_func_wcrtomb_retval+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+                              case "$host_os" in
+            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
+            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+            # Guess yes otherwise.
+            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
+          esac
+          if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+            if test "$cross_compiling" = yes
+then :
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+#include <stdlib.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 2;
+      {
+        wchar_t wc = (wchar_t) 0xBADFACE;
+        if (mbtowc (&wc, "\303\274", 2) == 2)
+          if (wcrtomb (NULL, wc, NULL) != 1)
+            result |= 2;
+      }
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      if (wcrtomb (NULL, 0, NULL) != 1)
+        result |= 8;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_wcrtomb_retval=yes
+else $as_nop
+  gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+          fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
+      case "$gl_cv_func_wcrtomb_retval" in
+        *yes) ;;
+        *)
+printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
+
+           REPLACE_WCRTOMB=1 ;;
+      esac
+    fi
+  fi
+
+  if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_WCRTOMB=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
+    #include <wchar.h>
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_wcwidth" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
+
+  if test $ac_cv_have_decl_wcwidth != yes; then
+    HAVE_DECL_WCWIDTH=0
+  fi
+
+  if test $ac_cv_func_wcwidth != yes; then
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
+printf %s "checking whether wcwidth is a macro... " >&6; }
+if test ${gl_cv_func_wcwidth_macro+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <wchar.h>
+#ifdef wcwidth
+ wchar_header_defines_wcwidth
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
+then :
+  gl_cv_func_wcwidth_macro=yes
+else $as_nop
+  gl_cv_func_wcwidth_macro=no
+fi
+rm -rf conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
+printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
+  fi
+
+  if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
+    HAVE_WCWIDTH=1
+                                        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
+printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
+if test ${gl_cv_func_wcwidth_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+        if test "$cross_compiling" = yes
+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";;
+           esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
+    {
+      if (wcwidth (0x0301) > 0)
+        result |= 1;
+      if (wcwidth (0x05B0) > 0)
+        result |= 2;
+      if (wcwidth (0x200B) > 0)
+        result |= 4;
+      if (wcwidth (0xFF1A) == 0)
+        result |= 8;
+      if (wcwidth (0x2202) > 1)
+        result |= 16;
+    }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_wcwidth_works=yes
+else $as_nop
+  gl_cv_func_wcwidth_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
+printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
+    case "$gl_cv_func_wcwidth_works" in
+      *yes) ;;
+      *no) REPLACE_WCWIDTH=1 ;;
+    esac
+  else
+    HAVE_WCWIDTH=0
+  fi
+
+  if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
+
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_WCWIDTH=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
+
+
+
+
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
+
+      ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
+
+      ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
+
+      ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
+
+      ;;
+  esac
+
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
+printf %s "checking for wmemchr... " >&6; }
+if test ${gl_cv_func_wmemchr+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+
+int
+main (void)
+{
+return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_func_wmemchr=yes
+else $as_nop
+  gl_cv_func_wmemchr=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
+printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
+  if test $gl_cv_func_wmemchr = no; then
+    HAVE_WMEMCHR=0
+  fi
+
+  if test $HAVE_WMEMCHR = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_WMEMCHR=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_func_wmempcpy = no; then
+    HAVE_WMEMPCPY=0
+  fi
+
+  if test $HAVE_WMEMPCPY = 0; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_WMEMPCPY=1
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
+
+
+
+  :
+
+
+printf "%s\n" "#define GNULIB_XALLOC 1" >>confdefs.h
+
+
+
+
+printf "%s\n" "#define GNULIB_XALLOC_DIE 1" >>confdefs.h
+
+
+
+
+  ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
+
+fi
+
+
+
+  :
+
+  :
+
+
+  XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+
+  # End of code from modules
+
+
+
+
+
+
+
+
+
+
+
+  gltests_libdeps=
+  gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  gl_source_base='gnulib-tests'
+  gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
+
+  gl_module_indicator_condition=$gltests_WITNESS
+
+
+  if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_ACCEPT" != 1; then
+        if test "$GL_GNULIB_ACCEPT" = 0; then
+      GL_GNULIB_ACCEPT=$gl_module_indicator_condition
+    else
+      GL_GNULIB_ACCEPT="($GL_GNULIB_ACCEPT || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+  ac_fn_c_check_func "$LINENO" "atoll" "ac_cv_func_atoll"
+if test "x$ac_cv_func_atoll" = xyes
+then :
+  printf "%s\n" "#define HAVE_ATOLL 1" >>confdefs.h
+
+fi
+
+  if test $ac_cv_func_atoll = no; then
+    HAVE_ATOLL=0
+  fi
+
+  if test $HAVE_ATOLL = 0; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS atoll.$ac_objext"
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_ATOLL" != 1; then
+        if test "$GL_GNULIB_ATOLL" = 0; then
+      GL_GNULIB_ATOLL=$gl_module_indicator_condition
+    else
+      GL_GNULIB_ATOLL="($GL_GNULIB_ATOLL || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_ATOLL 1" >>confdefs.h
+
+
+
+
+  if test "$ac_cv_header_winsock2_h" = yes; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_BIND" != 1; then
+        if test "$GL_GNULIB_BIND" = 0; then
+      GL_GNULIB_BIND=$gl_module_indicator_condition
+    else
+      GL_GNULIB_BIND="($GL_GNULIB_BIND || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+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 $as_nop
+
+    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*
+
+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 $as_nop
+
+    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*
+
+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 $as_nop
+
+    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*
+
+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 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 $as_nop
+
+    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*
+
+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
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
+
+  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 $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 $as_nop
+
+        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 $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <errno.h>
+
+
+$gl_mda_defines
+
+int
+main (void)
+{
+  FILE *fp;
+  errno = 0;
+  fp = fdopen (-1, "r");
+  if (fp == NULL && errno == 0)
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_fdopen_works=yes
+else $as_nop
+  gl_cv_func_fdopen_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
+printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
+    case "$gl_cv_func_fdopen_works" in
+      *no) REPLACE_FDOPEN=1 ;;
+    esac
+  fi
+
+  if test $REPLACE_FDOPEN = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
+
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_FDOPEN" != 1; then
+        if test "$GL_GNULIB_FDOPEN" = 0; then
+      GL_GNULIB_FDOPEN=$gl_module_indicator_condition
+    else
+      GL_GNULIB_FDOPEN="($GL_GNULIB_FDOPEN || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
+
+
+
+
+
+
+  if test $ac_cv_func_ftruncate = yes; then
+
+
+      case "$host_os" in
+        mingw*)
+                                                                      REPLACE_FTRUNCATE=1
+          ;;
+      esac
+
+  else
+    HAVE_FTRUNCATE=0
+  fi
+
+  if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
+
+
+  ac_fn_c_check_func "$LINENO" "_chsize" "ac_cv_func__chsize"
+if test "x$ac_cv_func__chsize" = xyes
+then :
+  printf "%s\n" "#define HAVE__CHSIZE 1" >>confdefs.h
+
+fi
+
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_FTRUNCATE" != 1; then
+        if test "$GL_GNULIB_FTRUNCATE" = 0; then
+      GL_GNULIB_FTRUNCATE=$gl_module_indicator_condition
+    else
+      GL_GNULIB_FTRUNCATE="($GL_GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
+  *yes,yes) ;;
+  *)
+        REPLACE_GETCWD=1
+    ;;
+  esac
+
+  if test $REPLACE_GETCWD = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_GETCWD" != 1; then
+        if test "$GL_GNULIB_GETCWD" = 0; then
+      GL_GNULIB_GETCWD=$gl_module_indicator_condition
+    else
+      GL_GNULIB_GETCWD="($GL_GNULIB_GETCWD || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+                HAVE_INET_PTON=1
+  INET_PTON_LIB=
+
+
+
+
+  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 $HAVE_WINSOCK2_H = 1; then
+                    REPLACE_INET_PTON=1
+    ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+
+    if test $ac_cv_have_decl_inet_pton = yes; then
+      INET_PTON_LIB="-lws2_32"
+    else
+      HAVE_DECL_INET_PTON=0
+    fi
+  else
+    gl_save_LIBS=$LIBS
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
+printf %s "checking for library containing inet_pton... " >&6; }
+if test ${ac_cv_search_inet_pton+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  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.  */
+char inet_pton ();
+int
+main (void)
+{
+return inet_pton ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' nsl resolv network
+do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_search_inet_pton=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext
+  if test ${ac_cv_search_inet_pton+y}
+then :
+  break
+fi
+done
+if test ${ac_cv_search_inet_pton+y}
+then :
+
+else $as_nop
+  ac_cv_search_inet_pton=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
+printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
+ac_res=$ac_cv_search_inet_pton
+if test "$ac_res" != no
+then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else $as_nop
+  ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
+if test "x$ac_cv_func_inet_pton" = xyes
+then :
+  printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
+
+fi
+
+       if test $ac_cv_func_inet_pton = no; then
+         HAVE_INET_PTON=0
+       fi
+
+fi
+
+    LIBS=$gl_save_LIBS
+
+    if test "$ac_cv_search_inet_pton" != "no" \
+       && test "$ac_cv_search_inet_pton" != "none required"; then
+      INET_PTON_LIB="$ac_cv_search_inet_pton"
+    fi
+
+
+    ac_fn_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
+        #if HAVE_NETDB_H
+        # include <netdb.h>
+        #endif
+
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_inet_pton" = xyes
+then :
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
+fi
+printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
+
+    if test $ac_cv_have_decl_inet_pton = no; then
+      HAVE_DECL_INET_PTON=0
+    fi
+  fi
+
+
+  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
+
+
+
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_INET_PTON" != 1; then
+        if test "$GL_GNULIB_INET_PTON" = 0; then
+      GL_GNULIB_INET_PTON=$gl_module_indicator_condition
+    else
+      GL_GNULIB_INET_PTON="($GL_GNULIB_INET_PTON || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
+
+int
+main (void)
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
+
+int
+main (void)
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_cv_c_bigendian=yes
+else $as_nop
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes
+then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+unsigned short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               unsigned short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               unsigned short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               unsigned short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
+
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main (void)
+{
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  ac_cv_c_bigendian=no
+else $as_nop
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
+
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+
+  HAVE_IOCTL=1
+  if test "$ac_cv_header_winsock2_h" = yes; then
+                HAVE_IOCTL=0
+  else
+    ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
+if test "x$ac_cv_func_ioctl" = xyes
+then :
+  printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
+
+fi
+
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
+printf %s "checking for ioctl with POSIX signature... " >&6; }
+if test ${gl_cv_func_ioctl_posix_signature+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/ioctl.h>
+              /* On some platforms, ioctl() is declared in <unistd.h>.  */
+              #include <unistd.h>
+
+int
+main (void)
+{
+extern
+              #ifdef __cplusplus
+              "C"
+              #endif
+              int ioctl (int, int, ...);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  gl_cv_func_ioctl_posix_signature=yes
+else $as_nop
+  gl_cv_func_ioctl_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
+printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
+    if test $gl_cv_func_ioctl_posix_signature != yes; then
+      REPLACE_IOCTL=1
+    fi
+  fi
+
+  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_IOCTL" != 1; then
+        if test "$GL_GNULIB_IOCTL" = 0; then
+      GL_GNULIB_IOCTL=$gl_module_indicator_condition
+    else
+      GL_GNULIB_IOCTL="($GL_GNULIB_IOCTL || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+    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*
+
+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 $as_nop
+
+    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*
+
+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 $as_nop
+
+    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*
+
+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 $as_nop
+
+    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*
+
+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 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 $as_nop
+
+    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*
+
+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 $as_nop
+
+    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
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-printf "%s\n" "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
-   no)
-      ;; #(
-   universal)
-
-printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
-
-     ;; #(
-   *)
-     as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
+    rm -fr conftest*
 
+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
 
 
 
-  HAVE_IOCTL=1
-  if test "$ac_cv_header_winsock2_h" = yes; then
-                HAVE_IOCTL=0
-  else
-    ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
-if test "x$ac_cv_func_ioctl" = xyes
-then :
-  printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
 
-fi
 
-                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
-printf %s "checking for ioctl with POSIX signature... " >&6; }
-if test ${gl_cv_func_ioctl_posix_signature+y}
+  { 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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else $as_nop
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/ioctl.h>
-              /* On some platforms, ioctl() is declared in <unistd.h>.  */
-              #include <unistd.h>
 
-int
-main (void)
+#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 ()
 {
-extern
-              #ifdef __cplusplus
-              "C"
-              #endif
-              int ioctl (int, int, ...);
-
-  ;
+  /* 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 ac_fn_c_try_compile "$LINENO"
-then :
-  gl_cv_func_ioctl_posix_signature=yes
-else
-  gl_cv_func_ioctl_posix_signature=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
-printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
-    if test $gl_cv_func_ioctl_posix_signature != yes; then
-      REPLACE_IOCTL=1
+    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
-  fi
-
-  if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
-
-
-
-
-
+    rm -fr conftest*
 
+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
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
 
-  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}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+    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
+}
 
-    if test "$GNULIB_IOCTL" != 1; then
-        if test "$GNULIB_IOCTL" = 0; then
-      GNULIB_IOCTL=$gl_module_indicator_condition
+_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
-      GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
+      # 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
-  fi
-
+    rm -fr conftest*
 
+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" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
+  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
+  gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
 
+  fi
 
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
 
-  fi
 
 
 
 
 
-    if test "$GNULIB_LISTEN" != 1; then
-        if test "$GNULIB_LISTEN" = 0; then
-      GNULIB_LISTEN=$gl_module_indicator_condition
+    if test "$GL_GNULIB_LISTEN" != 1; then
+        if test "$GL_GNULIB_LISTEN" = 0; then
+      GL_GNULIB_LISTEN=$gl_module_indicator_condition
     else
-      GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
+      GL_GNULIB_LISTEN="($GL_GNULIB_LISTEN || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -32059,7 +40489,7 @@ printf %s "checking for a traditional french locale... " >&6; }
 if test ${gt_cv_locale_fr+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32201,7 +40631,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32331,7 +40761,7 @@ printf %s "checking for a traditional japanese locale... " >&6; }
 if test ${gt_cv_locale_ja+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32480,7 +40910,7 @@ printf %s "checking for a transitional chinese locale... " >&6; }
 if test ${gt_cv_locale_zh_CN+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32623,7 +41053,7 @@ printf %s "checking for a turkish Unicode locale... " >&6; }
 if test ${gt_cv_locale_tr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32635,6 +41065,7 @@ else
 #endif
 #include <stdlib.h>
 #include <string.h>
+#include <wctype.h>
 struct tm t;
 char buf[16];
 int main () {
@@ -32753,7 +41184,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -32883,7 +41314,7 @@ printf %s "checking for a traditional french locale... " >&6; }
 if test ${gt_cv_locale_fr+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33025,7 +41456,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33155,7 +41586,7 @@ printf %s "checking for a traditional japanese locale... " >&6; }
 if test ${gt_cv_locale_ja+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33304,7 +41735,7 @@ printf %s "checking for a transitional chinese locale... " >&6; }
 if test ${gt_cv_locale_zh_CN+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33446,7 +41877,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33576,7 +42007,7 @@ printf %s "checking for a transitional chinese locale... " >&6; }
 if test ${gt_cv_locale_zh_CN+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33714,71 +42145,6 @@ printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
 
 
 
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes
-then :
-  gl_have_mmap=yes
-else
-  gl_have_mmap=no
-fi
-
-
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-  gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
-
-         gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
-
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
-
-    fi
-  fi
-
-
-
 
 
 
@@ -33800,7 +42166,7 @@ printf %s "checking for library containing nanosleep... " >&6; }
 if test ${ac_cv_search_nanosleep+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -33808,9 +42174,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char nanosleep ();
 int
 main (void)
@@ -33832,7 +42195,7 @@ do
 then :
   ac_cv_search_nanosleep=$ac_res
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext
   if test ${ac_cv_search_nanosleep+y}
 then :
@@ -33842,7 +42205,7 @@ done
 if test ${ac_cv_search_nanosleep+y}
 then :
 
-else
+else $as_nop
   ac_cv_search_nanosleep=no
 fi
 rm conftest.$ac_ext
@@ -33874,7 +42237,7 @@ printf %s "checking for working nanosleep... " >&6; }
 if test ${gl_cv_func_nanosleep+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
      if test "$cross_compiling" = yes
 then :
@@ -33882,11 +42245,11 @@ then :
             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
           mingw*) # Guess no on native Windows.
             gl_cv_func_nanosleep='guessing no' ;;
-          *)      # If we don't know, assume the worst.
-            gl_cv_func_nanosleep='guessing no' ;;
+          *)      # If we don't know, obey --enable-cross-guesses.
+            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
         esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33953,7 +42316,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_nanosleep=yes
-else
+else $as_nop
   case $? in         4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';;         *)   gl_cv_func_nanosleep=no;;
         esac
 fi
@@ -34015,11 +42378,15 @@ printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
 
 
 
-    if test "$GNULIB_NANOSLEEP" != 1; then
-        if test "$GNULIB_NANOSLEEP" = 0; then
-      GNULIB_NANOSLEEP=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_NANOSLEEP" != 1; then
+        if test "$GL_GNULIB_NANOSLEEP" = 0; then
+      GL_GNULIB_NANOSLEEP=$gl_module_indicator_condition
     else
-      GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
+      GL_GNULIB_NANOSLEEP="($GL_GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -34038,7 +42405,7 @@ printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -34054,10 +42421,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_header_netinet_in_h_selfcontained=yes
-else
+else $as_nop
   gl_cv_header_netinet_in_h_selfcontained=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
@@ -34090,7 +42457,7 @@ printf %s "checking absolute name of <netinet/in.h>... " >&6; }
 if test ${gl_cv_next_netinet_in_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
              if test $ac_cv_header_netinet_in_h = yes; then
 
@@ -34178,7 +42545,7 @@ printf %s "checking for a traditional french locale... " >&6; }
 if test ${gt_cv_locale_fr+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -34320,7 +42687,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -34457,17 +42824,19 @@ printf %s "checking whether perror matches strerror... " >&6; }
 if test ${gl_cv_func_perror_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                      # Guess yes on native Windows.
-              mingw*) gl_cv_func_perror_works="guessing yes" ;;
-                      # Otherwise guess no.
-              *)      gl_cv_func_perror_works="guessing no" ;;
+                       # 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" ;;
             esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <errno.h>
@@ -34499,7 +42868,7 @@ then :
               gl_cv_func_perror_works=no
             fi
             rm -rf conftest.txt1 conftest.txt2
-else
+else $as_nop
   gl_cv_func_perror_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -34537,11 +42906,15 @@ printf "%s\n" "$gl_cv_func_perror_works" >&6; }
 
 
 
-    if test "$GNULIB_PERROR" != 1; then
-        if test "$GNULIB_PERROR" = 0; then
-      GNULIB_PERROR=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_PERROR" != 1; then
+        if test "$GL_GNULIB_PERROR" = 0; then
+      GL_GNULIB_PERROR=$gl_module_indicator_condition
     else
-      GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)"
+      GL_GNULIB_PERROR="($GL_GNULIB_PERROR || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -34578,11 +42951,15 @@ printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
 
 
 
-    if test "$GNULIB_PIPE" != 1; then
-        if test "$GNULIB_PIPE" = 0; then
-      GNULIB_PIPE=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_PIPE" != 1; then
+        if test "$GL_GNULIB_PIPE" = 0; then
+      GL_GNULIB_PIPE=$gl_module_indicator_condition
     else
-      GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
+      GL_GNULIB_PIPE="($GL_GNULIB_PIPE || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -34596,54 +42973,268 @@ printf "%s\n" "#define GNULIB_TEST_PIPE 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}
+
+
+
+
+
+
+
+
+  if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+     && test $gl_threads_api = windows; then
+            REPLACE_PTHREAD_CREATE=1
+    REPLACE_PTHREAD_ATTR_INIT=1
+    REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
+    REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
+    REPLACE_PTHREAD_ATTR_DESTROY=1
+    REPLACE_PTHREAD_SELF=1
+    REPLACE_PTHREAD_EQUAL=1
+    REPLACE_PTHREAD_DETACH=1
+    REPLACE_PTHREAD_JOIN=1
+    REPLACE_PTHREAD_EXIT=1
+  else
+    if test $HAVE_PTHREAD_H = 0; then
+      HAVE_PTHREAD_CREATE=0
+      HAVE_PTHREAD_ATTR_INIT=0
+      HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
+      HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
+      HAVE_PTHREAD_ATTR_DESTROY=0
+      HAVE_PTHREAD_SELF=0
+      HAVE_PTHREAD_EQUAL=0
+      HAVE_PTHREAD_DETACH=0
+      HAVE_PTHREAD_JOIN=0
+      HAVE_PTHREAD_EXIT=0
+    else
+                  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_create exists as a global function" >&5
+printf %s "checking whether pthread_create exists as a global function... " >&6; }
+if test ${gl_cv_func_pthread_create+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
+else $as_nop
+  saved_LIBS="$LIBS"
+         LIBS="$LIBS $LIBPMULTITHREAD"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
+                #ifdef __cplusplus
+                "C"
+                #endif
+                int pthread_create (void);
+                int main ()
+                {
+                  return pthread_create ();
+                }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
 then :
-               case "$host_os" in
-                               # Guess yes on glibc systems.
-                *-gnu* | gnu*) 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, assume the worst.
-                *)             gl_cv_func_svid_putenv="guessing no" ;;
-              esac
+  gl_cv_func_pthread_create=yes
+else $as_nop
+  gl_cv_func_pthread_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+         LIBS="$saved_LIBS"
 
-else
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_create" >&5
+printf "%s\n" "$gl_cv_func_pthread_create" >&6; }
+      if test $gl_cv_func_pthread_create = no; then
+        REPLACE_PTHREAD_CREATE=1
+        REPLACE_PTHREAD_ATTR_INIT=1
+
+printf "%s\n" "#define PTHREAD_CREATE_IS_INLINE 1" >>confdefs.h
+
+      fi
+    fi
+  fi
+
+  if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS pthread-thread.$ac_objext"
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_PTHREAD_THREAD" != 1; then
+        if test "$GL_GNULIB_PTHREAD_THREAD" = 0; then
+      GL_GNULIB_PTHREAD_THREAD=$gl_module_indicator_condition
+    else
+      GL_GNULIB_PTHREAD_THREAD="($GL_GNULIB_PTHREAD_THREAD || $gl_module_indicator_condition)"
+    fi
+  fi
+
+
+
+
+
+printf "%s\n" "#define GNULIB_TEST_PTHREAD_THREAD 1" >>confdefs.h
+
+
+
+
+
+
+
+
+      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask is a macro" >&5
+printf %s "checking whether pthread_sigmask is a macro... " >&6; }
+if test ${gl_cv_func_pthread_sigmask_macro+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-int
-main (void)
-{
 
-    /* Put it in env.  */
-    if (putenv ("CONFTEST_putenv=val"))
-      return 1;
+#include <pthread.h>
+#include <signal.h>
+#ifdef pthread_sigmask
+ headers_define_pthread_sigmask
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "headers_define_pthread_sigmask" >/dev/null 2>&1
+then :
+  gl_cv_func_pthread_sigmask_macro=yes
+else $as_nop
+  gl_cv_func_pthread_sigmask_macro=no
+fi
+rm -rf conftest*
 
-    /* Try to remove it.  */
-    if (putenv ("CONFTEST_putenv"))
-      return 2;
 
-    /* Make sure it was deleted.  */
-    if (getenv ("CONFTEST_putenv") != 0)
-      return 3;
+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=
+
+  if test $gl_cv_func_pthread_sigmask_macro = yes; then
+        HAVE_PTHREAD_SIGMASK=0
+        REPLACE_PTHREAD_SIGMASK=1
+  else
 
-    return 0;
 
+
+      if test "$gl_threads_api" = posix; then
+        if test $ac_cv_func_pthread_sigmask = yes; then
+                    :
+        else
+          if test -n "$LIBMULTITHREAD"; then
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_sigmask in $LIBMULTITHREAD" >&5
+printf %s "checking for pthread_sigmask in $LIBMULTITHREAD... " >&6; }
+if test ${gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  gl_save_LIBS="$LIBS"
+               LIBS="$LIBS $LIBMULTITHREAD"
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+                      #include <signal.h>
+
+int
+main (void)
+{
+return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);
   ;
   return 0;
 }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes
+else $as_nop
+  gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+               LIBS="$gl_save_LIBS"
+
+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"
+            else
+                            HAVE_PTHREAD_SIGMASK=0
+            fi
+          else
+                        HAVE_PTHREAD_SIGMASK=0
+          fi
+        fi
+      else
+                        if test $ac_cv_func_pthread_sigmask = yes; then
+          REPLACE_PTHREAD_SIGMASK=1
+        else
+          HAVE_PTHREAD_SIGMASK=0
+        fi
+      fi
+
+  fi
+
+
+
+    if test $HAVE_PTHREAD_SIGMASK = 1; then
+
+
+                if test -z "$LIB_PTHREAD_SIGMASK"; then
+      case " $LIBS " in
+        *' -pthread '*) ;;
+        *' -lpthread '*) ;;
+        *)
+          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
+printf %s "checking whether pthread_sigmask works without -lpthread... " >&6; }
+if test ${gl_cv_func_pthread_sigmask_in_libc_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+              if test "$cross_compiling" = yes
+then :
+
+                                  case "$host_os" in
+                   freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
+                     gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
+                   *)
+                     gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
+                 esac
+
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                   #include <pthread.h>
+                   #include <signal.h>
+                   #include <stddef.h>
+                   int main ()
+                   {
+                     sigset_t set;
+                     sigemptyset (&set);
+                     return pthread_sigmask (1729, &set, NULL) != 0;
+                   }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
-  gl_cv_func_svid_putenv=yes
-else
-  gl_cv_func_svid_putenv=no
+  gl_cv_func_pthread_sigmask_in_libc_works=no
+else $as_nop
+  gl_cv_func_pthread_sigmask_in_libc_works=yes
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 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
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
+printf "%s\n" "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
+          case "$gl_cv_func_pthread_sigmask_in_libc_works" in
+            *no)
+              REPLACE_PTHREAD_SIGMASK=1
 
-  if test $REPLACE_PUTENV = 1; then
+printf "%s\n" "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
 
+              ;;
+          esac;;
+      esac
+    fi
 
+            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
+printf %s "checking whether pthread_sigmask returns error numbers... " >&6; }
+if test ${gl_cv_func_pthread_sigmask_return_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+        if test "$cross_compiling" = yes
+then :
+  case "$host_os" in
+             cygwin*)
+               gl_cv_func_pthread_sigmask_return_works="guessing no";;
+             *)
+               gl_cv_func_pthread_sigmask_return_works="guessing yes";;
+           esac
 
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <pthread.h>
+#include <signal.h>
+#include <stddef.h>
+int main ()
+{
+  sigset_t set;
+  sigemptyset (&set);
+  if (pthread_sigmask (1729, &set, NULL) == -1)
+    return 1;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  gl_cv_func_pthread_sigmask_return_works=yes
+else $as_nop
+  gl_cv_func_pthread_sigmask_return_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+        LIBS="$gl_save_LIBS"
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
+printf "%s\n" "$gl_cv_func_pthread_sigmask_return_works" >&6; }
+    case "$gl_cv_func_pthread_sigmask_return_works" in
+      *no)
+        REPLACE_PTHREAD_SIGMASK=1
 
-  gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
+printf "%s\n" "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
+
+        ;;
+    esac
 
+                { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
+printf %s "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
+if test ${gl_cv_func_pthread_sigmask_unblock_works+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
 
-  ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl__putenv" = xyes
+        case "$host_os" in
+          irix*)
+            gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
+          *)
+            gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
+        esac
+                                         gl_save_LIBS=$LIBS
+           LIBS="$LIBS $LIBMULTITHREAD"
+        if test "$cross_compiling" = yes
 then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+  :
+else $as_nop
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <pthread.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+
+$gl_mda_defines
+
+static volatile int sigint_occurred;
+static void
+sigint_handler (int sig)
+{
+  sigint_occurred++;
+}
+int main ()
+{
+  sigset_t set;
+  int pid = getpid ();
+  char command[80];
+  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);
+  if (!(system (command) == 0))
+    return 2;
+  sleep (2);
+  if (!(sigint_occurred == 0))
+    return 3;
+  if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
+    return 4;
+  if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
+    return 5;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  :
+else $as_nop
+  gl_cv_func_pthread_sigmask_unblock_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
+        LIBS=$gl_save_LIBS
 
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
+printf "%s\n" "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
+    case "$gl_cv_func_pthread_sigmask_unblock_works" in
+      *no)
+        REPLACE_PTHREAD_SIGMASK=1
+
+printf "%s\n" "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
+
+        ;;
+    esac
+  fi
+
+  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS pthread_sigmask.$ac_objext"
+
+
+  if test $HAVE_PTHREAD_SIGMASK = 1; then
+
+printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
+
+  fi
 
   fi
 
@@ -34689,11 +43422,15 @@ printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
 
 
 
-    if test "$GNULIB_PUTENV" != 1; then
-        if test "$GNULIB_PUTENV" = 0; then
-      GNULIB_PUTENV=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_PTHREAD_SIGMASK" != 1; then
+        if test "$GL_GNULIB_PTHREAD_SIGMASK" = 0; then
+      GL_GNULIB_PTHREAD_SIGMASK=$gl_module_indicator_condition
     else
-      GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
+      GL_GNULIB_PTHREAD_SIGMASK="($GL_GNULIB_PTHREAD_SIGMASK || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -34701,73 +43438,119 @@ printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
 
 
 
-printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
+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 $as_nop
+  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
 
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes
+else $as_nop
+  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_have_mmap=yes
-else
-  gl_have_mmap=no
+  gl_cv_func_svid_putenv=yes
+else $as_nop
+  gl_cv_func_svid_putenv=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+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
 
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
+  if test $REPLACE_PUTENV = 1; then
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
+
+
+  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 :
-  gl_have_mmap_anonymous=yes
+  ac_have_decl=1
+else $as_nop
+  ac_have_decl=0
 fi
-rm -rf conftest*
+printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
+
+
+  fi
+
 
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
 
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
-         gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
 
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
 
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
+    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
 
@@ -34775,69 +43558,19 @@ printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
 
 
-
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes
-then :
-  gl_have_mmap=yes
-else
-  gl_have_mmap=no
-fi
+printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
 
 
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-  gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
 
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
 
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
-         gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
 
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
 
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
-    fi
-  fi
 
 
 
@@ -34854,7 +43587,7 @@ printf %s "checking whether select supports a 0 argument... " >&6; }
 if test ${gl_cv_func_select_supports0+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
         if test "$cross_compiling" = yes
 then :
@@ -34866,7 +43599,7 @@ then :
              *)        gl_cv_func_select_supports0="guessing yes";;
            esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34886,7 +43619,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_select_supports0=yes
-else
+else $as_nop
   gl_cv_func_select_supports0=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -34907,7 +43640,7 @@ printf %s "checking whether select detects invalid fds... " >&6; }
 if test ${gl_cv_func_select_detects_ebadf+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
         if test "$cross_compiling" = yes
 then :
@@ -34917,11 +43650,11 @@ then :
             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, assume the worst.
-            *)               gl_cv_func_select_detects_ebadf="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
            esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34933,6 +43666,9 @@ else
 #include <unistd.h>
 #include <errno.h>
 
+
+$gl_mda_defines
+
 int
 main (void)
 {
@@ -34954,7 +43690,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_select_detects_ebadf=yes
-else
+else $as_nop
   gl_cv_func_select_detects_ebadf=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -34990,10 +43726,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
 
-else
+else $as_nop
   LIB_SELECT="$LIB_SELECT -luser32"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
         ;;
     esac
@@ -35017,11 +43753,15 @@ rm -f core conftest.err conftest.$ac_objext \
 
 
 
-    if test "$GNULIB_SELECT" != 1; then
-        if test "$GNULIB_SELECT" = 0; then
-      GNULIB_SELECT=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_SELECT" != 1; then
+        if test "$GL_GNULIB_SELECT" = 0; then
+      GL_GNULIB_SELECT=$gl_module_indicator_condition
     else
-      GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
+      GL_GNULIB_SELECT="($GL_GNULIB_SELECT || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -35035,42 +43775,32 @@ printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
 
 
 
+  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
-  case "$host_os" in
-            mingw*) REPLACE_SETLOCALE=1 ;;
-            cygwin*)
-      case `uname -r` in
-        1.5.*) REPLACE_SETLOCALE=1 ;;
-      esac
-      ;;
-  esac
-
-  if test $REPLACE_SETLOCALE = 1; then
 
 
 
 
 
 
+  gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
 
+  fi
 
-  gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
 
 
-        :
 
-  fi
 
 
 
 
 
-    if test "$GNULIB_SETLOCALE" != 1; then
-        if test "$GNULIB_SETLOCALE" = 0; then
-      GNULIB_SETLOCALE=$gl_module_indicator_condition
+    if test "$GL_GNULIB_SETSOCKOPT" != 1; then
+        if test "$GL_GNULIB_SETSOCKOPT" = 0; then
+      GL_GNULIB_SETSOCKOPT=$gl_module_indicator_condition
     else
-      GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
+      GL_GNULIB_SETSOCKOPT="($GL_GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -35078,597 +43808,130 @@ printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
 
 
 
-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}
-then :
-  printf %s "(cached) " >&6
-else
-
-    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*
-
-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
-
-    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*
-
-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" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
 
 
 
-  { 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
 
-    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*
+  if test $ac_cv_func_sigaction = yes; then
+    ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
+
 
 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
 
+    if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+      HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+    fi
+  else
+    HAVE_SIGACTION=0
+  fi
 
+  if test $HAVE_SIGACTION = 0; 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}
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_siginfo_t" = xyes
 then :
-  printf %s "(cached) " >&6
-else
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+printf "%s\n" "#define HAVE_SIGINFO_T 1" >>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 $ac_cv_type_siginfo_t = no; then
+    HAVE_SIGINFO_T=0
+  fi
+
+  fi
+
+
+
+
+
+
+
+
+
+    if test "$GL_GNULIB_SIGACTION" != 1; then
+        if test "$GL_GNULIB_SIGACTION" = 0; then
+      GL_GNULIB_SIGACTION=$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_SIGACTION="($GL_GNULIB_SIGACTION || $gl_module_indicator_condition)"
     fi
-    rm -fr conftest*
+  fi
 
-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
+
+printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
+
 
 
 
 
 
+  HAVE_POSIX_SIGNALBLOCKING=0
+  if test "$gl_cv_type_sigset_t" = yes; then
+    ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = xyes
+then :
+  HAVE_POSIX_SIGNALBLOCKING=1
+fi
 
+  fi
+
+  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
 
 
-  gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
 
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
+
+    :
   fi
 
 
 
 
 
-    if test "$GNULIB_SETSOCKOPT" != 1; then
-        if test "$GNULIB_SETSOCKOPT" = 0; then
-      GNULIB_SETSOCKOPT=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_SIGPROCMASK" != 1; then
+        if test "$GL_GNULIB_SIGPROCMASK" = 0; then
+      GL_GNULIB_SIGPROCMASK=$gl_module_indicator_condition
     else
-      GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
+      GL_GNULIB_SIGPROCMASK="($GL_GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -35676,21 +43939,22 @@ printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
 
 
 
-printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
+printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
 
 
 
 
 
-               ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
-"
+
+
+               ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_sleep" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
-
 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
 
 
@@ -35702,19 +43966,21 @@ printf %s "checking for working sleep... " >&6; }
 if test ${gl_cv_func_sleep_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   case "$host_os" in
                         # Guess yes on glibc systems.
          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+                        # Guess yes on musl systems.
+         *-musl*)       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, assume the worst.
-         *)             gl_cv_func_sleep_works="guessing no" ;;
+                        # If we don't know, obey --enable-cross-guesses.
+         *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
        esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -35752,7 +44018,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_sleep_works=yes
-else
+else $as_nop
   gl_cv_func_sleep_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -35787,11 +44053,15 @@ printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
 
 
 
-    if test "$GNULIB_SLEEP" != 1; then
-        if test "$GNULIB_SLEEP" = 0; then
-      GNULIB_SLEEP=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_SLEEP" != 1; then
+        if test "$GL_GNULIB_SLEEP" = 0; then
+      GL_GNULIB_SLEEP=$gl_module_indicator_condition
     else
-      GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
+      GL_GNULIB_SLEEP="($GL_GNULIB_SLEEP || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -35823,17 +44093,19 @@ printf %s "checking whether snprintf respects a size of 1... " >&6; }
 if test ${gl_cv_func_snprintf_size1+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       if test "$cross_compiling" = yes
 then :
   case "$host_os" in
-                   # Guess yes on native Windows.
-           mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
-           *)      gl_cv_func_snprintf_size1="guessing yes" ;;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
+                            # Guess yes on native Windows.
+           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
+           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
          esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -35862,7 +44134,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_snprintf_size1=yes
-else
+else $as_nop
   gl_cv_func_snprintf_size1=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -35886,21 +44158,23 @@ printf %s "checking whether printf supports POSIX/XSI format strings with positi
 if test ${gl_cv_func_printf_positions+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
       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 no on native Windows.
-           mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
-           *)            gl_cv_func_printf_positions="guessing yes";;
+                            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
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -35919,7 +44193,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_printf_positions=yes
-else
+else $as_nop
   gl_cv_func_printf_positions=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -35975,11 +44249,15 @@ printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
 
 
 
-    if test "$GNULIB_SNPRINTF" != 1; then
-        if test "$GNULIB_SNPRINTF" = 0; then
-      GNULIB_SNPRINTF=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_SNPRINTF" != 1; then
+        if test "$GL_GNULIB_SNPRINTF" = 0; then
+      GL_GNULIB_SNPRINTF=$gl_module_indicator_condition
     else
-      GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)"
+      GL_GNULIB_SNPRINTF="($GL_GNULIB_SNPRINTF || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -36014,6 +44292,14 @@ printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdef
 
 
 
+
+
+
+
+
+
+
+
   if test "$ac_cv_header_winsock2_h" = yes; then
     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
     SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
@@ -36023,11 +44309,15 @@ printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdef
 
 
 
-    if test "$GNULIB_SOCKET" != 1; then
-        if test "$GNULIB_SOCKET" = 0; then
-      GNULIB_SOCKET=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_SOCKET" != 1; then
+        if test "$GL_GNULIB_SOCKET" = 0; then
+      GL_GNULIB_SOCKET=$gl_module_indicator_condition
     else
-      GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
+      GL_GNULIB_SOCKET="($GL_GNULIB_SOCKET || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -36056,13 +44346,13 @@ printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
 if test "x$ac_cv_type_socklen_t" = xyes
 then :
 
-else
+else $as_nop
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
 printf %s "checking for socklen_t equivalent... " >&6; }
 if test ${gl_cv_socklen_t_equiv+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   # Systems have either "struct sockaddr *" or
          # "void *" as the second argument to getpeername
          gl_cv_socklen_t_equiv=
@@ -36087,7 +44377,7 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_socklen_t_equiv="$t"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
              test "$gl_cv_socklen_t_equiv" != "" && break
            done
            test "$gl_cv_socklen_t_equiv" != "" && break
@@ -36105,80 +44395,6 @@ printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
 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
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.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) \
-                 || (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
-  gl_cv_header_working_stdalign_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-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
-    STDALIGN_H=''
-  else
-    STDALIGN_H='stdalign.h'
-  fi
-
-
-   if test -n "$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 "$GNULIB_STRERROR_R" != 1; then
-        if test "$GNULIB_STRERROR_R" = 0; then
-      GNULIB_STRERROR_R=$gl_module_indicator_condition
+
+
+
+
+    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
-      GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)"
+      GL_GNULIB_STRERROR_R="($GL_GNULIB_STRERROR_R || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -36251,71 +44471,6 @@ printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >
 
 
 
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes
-then :
-  gl_have_mmap=yes
-else
-  gl_have_mmap=no
-fi
-
-
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-  gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1
-then :
-
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
-
-         gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
-    fi
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
-
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
-
-    fi
-  fi
-
-
-
 
 
 
@@ -36327,7 +44482,7 @@ printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
 if test ${gl_cv_func_symlink_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   case "$host_os" in
@@ -36335,11 +44490,11 @@ then :
             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, assume the worst.
-            *)               gl_cv_func_symlink_works="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
           esac
 
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <unistd.h>
@@ -36363,7 +44518,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_symlink_works=yes
-else
+else $as_nop
   gl_cv_func_symlink_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -36399,142 +44554,23 @@ printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
 
 
 
-    if test "$GNULIB_SYMLINK" != 1; then
-        if test "$GNULIB_SYMLINK" = 0; then
-      GNULIB_SYMLINK=$gl_module_indicator_condition
-    else
-      GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
-    fi
-  fi
-
-
-
-
-
-printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>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
-         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
-  gl_cv_decl_ioctl_in_sys_ioctl_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-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
+    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
 
 
 
 
 
-
-
-
-
-
-     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
-
-             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
-
-
-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
-
-
-
-
-
-
+printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
 
 
 
@@ -36555,83 +44591,33 @@ printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
 
 
 
-     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
 
-             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
 
 
-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
+  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
 
+fi
 
+    LIBS="$gl_save_LIBS"
+  fi
 
   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
 
@@ -36645,7 +44631,7 @@ printf %s "checking for a traditional french locale... " >&6; }
 if test ${gt_cv_locale_fr+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -36787,7 +44773,7 @@ printf %s "checking for a french Unicode locale... " >&6; }
 if test ${gt_cv_locale_fr_utf8+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -36917,7 +44903,7 @@ printf %s "checking for a traditional japanese locale... " >&6; }
 if test ${gt_cv_locale_ja+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -37066,7 +45052,7 @@ printf %s "checking for a transitional chinese locale... " >&6; }
 if test ${gt_cv_locale_zh_CN+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -37218,7 +45204,7 @@ printf %s "checking whether wctob works... " >&6; }
 if test ${gl_cv_func_wctob_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
                         case "$host_os" in
             # Guess no on Solaris <= 9 and Cygwin.
@@ -37235,18 +45221,11 @@ else
             if test "$cross_compiling" = yes
 then :
   :
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 
 register long global __asm__ ("%ebx");
@@ -37266,7 +45245,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   :
-else
+else $as_nop
   gl_cv_func_wctob_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
           if test "$cross_compiling" = yes
 then :
   :
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
+#include <stdlib.h>
 #include <wchar.h>
 int main ()
 {
@@ -37309,7 +45281,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   gl_cv_func_wctob_works=yes
-else
+else $as_nop
   gl_cv_func_wctob_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -37327,24 +45299,16 @@ printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
     esac
     if test $REPLACE_WCTOB = 0; then
 
-            ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+            ac_fn_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
+        #include <wchar.h>
 
-"
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_wctob" = xyes
 then :
   ac_have_decl=1
-else
+else $as_nop
   ac_have_decl=0
 fi
-
 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
 
       if test $ac_cv_have_decl_wctob != yes; then
@@ -37373,11 +45337,15 @@ printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
 
 
 
-    if test "$GNULIB_WCTOB" != 1; then
-        if test "$GNULIB_WCTOB" = 0; then
-      GNULIB_WCTOB=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_WCTOB" != 1; then
+        if test "$GL_GNULIB_WCTOB" = 0; then
+      GL_GNULIB_WCTOB=$gl_module_indicator_condition
     else
-      GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
+      GL_GNULIB_WCTOB="($GL_GNULIB_WCTOB || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -37416,11 +45384,15 @@ printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
 
 
 
-    if test "$GNULIB_WCTOMB" != 1; then
-        if test "$GNULIB_WCTOMB" = 0; then
-      GNULIB_WCTOMB=$gl_module_indicator_condition
+
+
+
+
+    if test "$GL_GNULIB_WCTOMB" != 1; then
+        if test "$GL_GNULIB_WCTOMB" = 0; then
+      GL_GNULIB_WCTOMB=$gl_module_indicator_condition
     else
-      GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
+      GL_GNULIB_WCTOMB="($GL_GNULIB_WCTOMB || $gl_module_indicator_condition)"
     fi
   fi
 
@@ -37433,6 +45405,38 @@ printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
 
 
 
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS windows-thread.$ac_objext"
+
+      ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+
+
+
+
+
+
+
+
+  gltests_LIBOBJS="$gltests_LIBOBJS windows-tls.$ac_objext"
+
+      ;;
+  esac
+
+
+
 
 
 
@@ -37450,6 +45454,12 @@ printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
 
 
 
+# Ensure VLAs are not used.
+# Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
+
+printf "%s\n" "#define GNULIB_NO_VLA 1" >>confdefs.h
+
+
 # Check whether --enable-gcc-warnings was given.
 if test ${enable_gcc_warnings+y}
 then :
@@ -37458,7 +45468,7 @@ then :
      *)      as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
    esac
    gl_gcc_warnings=$enableval
-else
+else $as_nop
   if test -d "$srcdir"/.git; then
      gl_gcc_warnings=yes
    else
@@ -37482,7 +45492,7 @@ printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option.
 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
@@ -37500,10 +45510,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__Werror__Wunknown_warning_option=yes
-else
+else $as_nop
   gl_cv_warn_c__Werror__Wunknown_warning_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
@@ -37513,7 +45523,7 @@ printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
 then :
   gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
-else
+else $as_nop
   gl_unknown_warnings_are_errors=
 fi
 
@@ -37531,7 +45541,7 @@ printf %s "checking whether C compiler handles -Werror... " >&6; }
 if test ${gl_cv_warn_c__Werror+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
@@ -37549,10 +45559,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__Werror=yes
-else
+else $as_nop
   gl_cv_warn_c__Werror=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
 
   nw=
   # This, $nw, is the list of warnings we disable.
-  nw="$nw -Wdeclaration-after-statement" # too useful to forbid
-  nw="$nw -Waggregate-return"       # anachronistic
-  nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
-  nw="$nw -Wc++-compat"             # We don't care about C++ compilers
-  nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
-  nw="$nw -Wtraditional"            # Warns on #elif which we use often
-  nw="$nw -Wcast-qual"              # Too many warnings for now
-  nw="$nw -Wconversion"             # Too many warnings for now
-  nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
-  nw="$nw -Wsign-conversion"        # Too many warnings for now
-  nw="$nw -Wtraditional-conversion" # Too many warnings for now
-  nw="$nw -Wunreachable-code"       # Too many warnings for now
-  nw="$nw -Wpadded"                 # Our structs are not padded
-  nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
-  nw="$nw -Wlogical-op"             # any use of fwrite provokes this
-  nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
-  nw="$nw -Wvla"                    # warnings in gettext.h
-  nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
-  nw="$nw -Wswitch-enum"            # Too many warnings for now
-  nw="$nw -Wswitch-default"         # Too many warnings for now
-  nw="$nw -Wstack-protector"        # not worth working around
-  # things I might fix soon:
-  nw="$nw -Wfloat-equal"            # sort.c, seq.c
-  nw="$nw -Wmissing-format-attribute" # copy.c
-  nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
-  nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
-  nw="$nw -Wformat-extra-args"      # sdiff.c
-  # ?? -Wstrict-overflow
+  nw="$nw -Wstack-protector"        # not worth working around
 
 
   ac_ext=c
@@ -37615,9 +45598,9 @@ printf %s "checking whether -Wno-missing-field-initializers is supported... " >&
 if test ${gl_cv_cc_nomfi_supported+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gl_save_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+       CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -37632,10 +45615,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_cc_nomfi_supported=yes
-else
+else $as_nop
   gl_cv_cc_nomfi_supported=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
        CFLAGS="$gl_save_CFLAGS"
 
 fi
@@ -37648,9 +45631,9 @@ printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6;
 if test ${gl_cv_cc_nomfi_needed+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gl_save_CFLAGS="$CFLAGS"
-         CFLAGS="$CFLAGS -W -Werror"
+         CFLAGS="$CFLAGS -Wextra -Werror"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int f (void)
@@ -37671,10 +45654,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_cc_nomfi_needed=no
-else
+else $as_nop
   gl_cv_cc_nomfi_needed=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
          CFLAGS="$gl_save_CFLAGS"
 
 fi
@@ -37687,7 +45670,7 @@ printf %s "checking whether -Wuninitialized is supported... " >&6; }
 if test ${gl_cv_cc_uninitialized_supported+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gl_save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -Werror -Wuninitialized"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -37704,10 +45687,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   gl_cv_cc_uninitialized_supported=yes
-else
+else $as_nop
   gl_cv_cc_uninitialized_supported=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
        CFLAGS="$gl_save_CFLAGS"
 
 fi
@@ -37720,129 +45703,41 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
   # To compare this list to your installed GCC's, run this Bash command:
   #
   # comm -3 \
-  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
+  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
   #     awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
 
-  gl_manywarn_set=
-  for gl_manywarn_item in -fno-common \
-    -W \
-    -Waddress \
-    -Waggressive-loop-optimizations \
+  ws=
+  for gl_manywarn_item in -fanalyzer -fno-common \
     -Wall \
-    -Wattribute-alias \
-    -Wattributes \
+    -Warith-conversion \
     -Wbad-function-cast \
-    -Wbool-compare \
-    -Wbool-operation \
-    -Wbuiltin-declaration-mismatch \
-    -Wbuiltin-macro-redefined \
-    -Wcast-align \
     -Wcast-align=strict \
-    -Wcast-function-type \
-    -Wchar-subscripts \
-    -Wclobbered \
-    -Wcomment \
-    -Wcomments \
-    -Wcoverage-mismatch \
-    -Wcpp \
-    -Wdangling-else \
     -Wdate-time \
-    -Wdeprecated \
-    -Wdeprecated-declarations \
-    -Wdesignated-init \
     -Wdisabled-optimization \
-    -Wdiscarded-array-qualifiers \
-    -Wdiscarded-qualifiers \
-    -Wdiv-by-zero \
     -Wdouble-promotion \
     -Wduplicated-branches \
     -Wduplicated-cond \
-    -Wduplicate-decl-specifier \
-    -Wempty-body \
-    -Wendif-labels \
-    -Wenum-compare \
-    -Wexpansion-to-defined \
     -Wextra \
-    -Wformat-contains-nul \
-    -Wformat-extra-args \
-    -Wformat-nonliteral \
-    -Wformat-security \
     -Wformat-signedness \
-    -Wformat-y2k \
-    -Wformat-zero-length \
-    -Wframe-address \
-    -Wfree-nonheap-object \
-    -Whsa \
-    -Wif-not-aligned \
-    -Wignored-attributes \
-    -Wignored-qualifiers \
-    -Wimplicit \
-    -Wimplicit-function-declaration \
-    -Wimplicit-int \
-    -Wincompatible-pointer-types \
     -Winit-self \
     -Winline \
-    -Wint-conversion \
-    -Wint-in-bool-context \
-    -Wint-to-pointer-cast \
-    -Winvalid-memory-model \
     -Winvalid-pch \
-    -Wlogical-not-parentheses \
     -Wlogical-op \
-    -Wmain \
-    -Wmaybe-uninitialized \
-    -Wmemset-elt-size \
-    -Wmemset-transposed-args \
-    -Wmisleading-indentation \
-    -Wmissing-attributes \
-    -Wmissing-braces \
     -Wmissing-declarations \
-    -Wmissing-field-initializers \
     -Wmissing-include-dirs \
-    -Wmissing-parameter-type \
     -Wmissing-prototypes \
-    -Wmultichar \
-    -Wmultistatement-macros \
-    -Wnarrowing \
     -Wnested-externs \
-    -Wnonnull \
-    -Wnonnull-compare \
     -Wnull-dereference \
-    -Wodr \
-    -Wold-style-declaration \
     -Wold-style-definition \
     -Wopenmp-simd \
-    -Woverflow \
     -Woverlength-strings \
-    -Woverride-init \
     -Wpacked \
-    -Wpacked-bitfield-compat \
-    -Wpacked-not-aligned \
-    -Wparentheses \
     -Wpointer-arith \
-    -Wpointer-compare \
-    -Wpointer-sign \
-    -Wpointer-to-int-cast \
-    -Wpragmas \
-    -Wpsabi \
-    -Wrestrict \
-    -Wreturn-local-addr \
-    -Wreturn-type \
-    -Wscalar-storage-order \
-    -Wsequence-point \
     -Wshadow \
-    -Wshift-count-negative \
-    -Wshift-count-overflow \
-    -Wshift-negative-value \
-    -Wsizeof-array-argument \
-    -Wsizeof-pointer-div \
-    -Wsizeof-pointer-memaccess \
     -Wstack-protector \
-    -Wstrict-aliasing \
     -Wstrict-overflow \
     -Wstrict-prototypes \
-    -Wstringop-truncation \
     -Wsuggest-attribute=cold \
     -Wsuggest-attribute=const \
     -Wsuggest-attribute=format \
@@ -37851,97 +45746,63 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
     -Wsuggest-attribute=pure \
     -Wsuggest-final-methods \
     -Wsuggest-final-types \
-    -Wswitch \
-    -Wswitch-bool \
-    -Wswitch-unreachable \
     -Wsync-nand \
     -Wsystem-headers \
-    -Wtautological-compare \
     -Wtrampolines \
-    -Wtrigraphs \
-    -Wtype-limits \
     -Wuninitialized \
     -Wunknown-pragmas \
     -Wunsafe-loop-optimizations \
-    -Wunused \
-    -Wunused-but-set-parameter \
-    -Wunused-but-set-variable \
-    -Wunused-function \
-    -Wunused-label \
-    -Wunused-local-typedefs \
     -Wunused-macros \
-    -Wunused-parameter \
-    -Wunused-result \
-    -Wunused-value \
-    -Wunused-variable \
-    -Wvarargs \
     -Wvariadic-macros \
     -Wvector-operation-performance \
     -Wvla \
-    -Wvolatile-register-var \
     -Wwrite-strings \
     \
     ; do
-    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
+    as_fn_append ws " $gl_manywarn_item"
   done
 
   # gcc --help=warnings outputs an unusual form for these options; list
   # them here so that the above 'comm' command doesn't report a false match.
-  # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
-  # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
-  # the only platforms where it does not fit in a long, so make that
-  # a special case.
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
-printf %s "checking max safe object size... " >&6; }
-  if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
-     ? -1
-     : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max"        "#include <limits.h>
-      #include <stddef.h>
-      #include <stdint.h>
-    "
-then :
-
-else
-  gl_alloc_max=2147483647
-fi
-
-  case $gl_alloc_max in
-    -1) gl_alloc_max=9223372036854775807;;
-  esac
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
-printf "%s\n" "$gl_alloc_max" >&6; }
-  gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
-  gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
-  gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
-  gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
-  gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
-  gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
-  gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
+  as_fn_append ws ' -Warray-bounds=2'
+  as_fn_append ws ' -Wattribute-alias=2'
+  as_fn_append ws ' -Wformat-overflow=2'
+  as_fn_append ws ' -Wformat=2'
+  as_fn_append ws ' -Wformat-truncation=2'
+  as_fn_append ws ' -Wimplicit-fallthrough=5'
+  as_fn_append ws ' -Wshift-overflow=2'
+  as_fn_append ws ' -Wunused-const-variable=2'
+  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
       'gcc (GCC) '[0-3].* | \
       'gcc (GCC) '4.[0-7].*)
-        gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
-        gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+        as_fn_append ws ' -fdiagnostics-show-option'
+        as_fn_append ws ' -funit-at-a-time'
           ;;
     esac
   fi
 
   # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
-    gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+    as_fn_append ws ' -Wno-missing-field-initializers'
   fi
 
   if test "$gl_cv_cc_uninitialized_supported" = no; then
-    gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+    as_fn_append ws ' -Wno-uninitialized'
   fi
 
-  ws=$gl_manywarn_set
+  # Some warnings have too many false alarms in GCC 10.1.
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
+  as_fn_append ws ' -Wno-analyzer-double-free'
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
+  as_fn_append ws ' -Wno-analyzer-malloc-leak'
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
+  as_fn_append ws ' -Wno-analyzer-null-dereference'
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
+  as_fn_append ws ' -Wno-analyzer-use-after-free'
 
   ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -37959,7 +45820,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
       *" $gl_warn_item "*)
         ;;
       *)
-        gl_warn_set="$gl_warn_set $gl_warn_item"
+        as_fn_append gl_warn_set " $gl_warn_item"
         ;;
     esac
   done
@@ -37978,7 +45839,7 @@ printf %s "checking whether C compiler handles $w... " >&6; }
 if eval test \${$as_gl_Warn+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
@@ -37996,10 +45857,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   eval "$as_gl_Warn=yes"
-else
+else $as_nop
   eval "$as_gl_Warn=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
   done
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
-printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
-if test ${gl_cv_warn_c__Wno_missing_field_initializers+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-  gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
-  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_missing_field_initializers=yes
-else
-  gl_cv_warn_c__Wno_missing_field_initializers=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  CFLAGS="$gl_save_compiler_FLAGS"
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
-printf "%s\n" "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
-if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes
-then :
-  as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
-fi
-
- # We need this one
-
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
 if test ${gl_cv_warn_c__Wno_sign_compare+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
@@ -38080,10 +45900,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__Wno_sign_compare=yes
-else
+else $as_nop
   gl_cv_warn_c__Wno_sign_compare=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
      # Too many warnings for now
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
-printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
-if test ${gl_cv_warn_c__Wno_pointer_sign+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-  gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
-  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_pointer_sign=yes
-else
-  gl_cv_warn_c__Wno_pointer_sign=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  CFLAGS="$gl_save_compiler_FLAGS"
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
-printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
-if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes
-then :
-  as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
-fi
-
-     # Too many warnings for now
-
-
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
@@ -38162,10 +45941,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__Wno_unused_parameter=yes
-else
+else $as_nop
   gl_cv_warn_c__Wno_unused_parameter=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
@@ -38185,7 +45964,7 @@ printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6;
 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
@@ -38203,10 +45982,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__Wno_format_nonliteral=yes
-else
+else $as_nop
   gl_cv_warn_c__Wno_format_nonliteral=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
 
 
 
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-cast-function-type" >&5
-printf %s "checking whether C compiler handles -Wno-cast-function-type... " >&6; }
-if test ${gl_cv_warn_c__Wno_cast_function_type+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-  gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wcast-function-type"
-  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_cast_function_type=yes
-else
-  gl_cv_warn_c__Wno_cast_function_type=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  CFLAGS="$gl_save_compiler_FLAGS"
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_cast_function_type" >&5
-printf "%s\n" "$gl_cv_warn_c__Wno_cast_function_type" >&6; }
-if test "x$gl_cv_warn_c__Wno_cast_function_type" = xyes
-then :
-  as_fn_append WARN_CFLAGS " -Wno-cast-function-type"
-fi
-
- # For sig-handler.h:47
-
-  # 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
-
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
-printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
-if test ${gl_cv_warn_c__Wno_logical_op+y}
-then :
-  printf %s "(cached) " >&6
-else
-
-  gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
-  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_logical_op=yes
-else
-  gl_cv_warn_c__Wno_logical_op=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  CFLAGS="$gl_save_compiler_FLAGS"
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
-printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
-if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
-then :
-  as_fn_append WARN_CFLAGS " -Wno-logical-op"
-fi
-
-
-
-
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
@@ -38330,10 +46024,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__fdiagnostics_show_option=yes
-else
+else $as_nop
   gl_cv_warn_c__fdiagnostics_show_option=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
@@ -38353,7 +46047,7 @@ printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
 if test ${gl_cv_warn_c__funit_at_a_time+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
@@ -38371,10 +46065,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__funit_at_a_time=yes
-else
+else $as_nop
   gl_cv_warn_c__funit_at_a_time=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
@@ -38394,7 +46088,7 @@ printf %s "checking whether C compiler handles -fno-common... " >&6; }
 if test ${gl_cv_warn_c__fno_common+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
   gl_save_compiler_FLAGS="$CFLAGS"
   as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
@@ -38412,10 +46106,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gl_cv_warn_c__fno_common=yes
-else
+else $as_nop
   gl_cv_warn_c__fno_common=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
   CFLAGS="$gl_save_compiler_FLAGS"
 
@@ -38445,9 +46139,53 @@ printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
   nw=
   nw="$nw -Wunused-macros"
-  nw="$nw -Wmissing-prototypes"
-  nw="$nw -Wold-style-definition"
   nw="$nw -Wsuggest-attribute=pure"
+  nw="$nw -Wduplicated-branches"    # Too many false alarms
+
+  # Avoid false alarm in lib/vasnprintf.c.
+  # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-analyzer-null-argument" >&5
+printf %s "checking whether C compiler handles -Wno-analyzer-null-argument... " >&6; }
+if test ${gl_cv_warn_c__Wno_analyzer_null_argument+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+
+  gl_save_compiler_FLAGS="$CFLAGS"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wanalyzer-null-argument"
+  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_analyzer_null_argument=yes
+else $as_nop
+  gl_cv_warn_c__Wno_analyzer_null_argument=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+  CFLAGS="$gl_save_compiler_FLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_analyzer_null_argument" >&5
+printf "%s\n" "$gl_cv_warn_c__Wno_analyzer_null_argument" >&6; }
+if test "x$gl_cv_warn_c__Wno_analyzer_null_argument" = xyes
+then :
+  as_fn_append WARN_CFLAGS " -Wno-analyzer-null-argument"
+fi
+
+
+
 
   gl_warn_set=
   set x $WARN_CFLAGS; shift
@@ -38457,7 +46195,7 @@ printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
       *" $gl_warn_item "*)
         ;;
       *)
-        gl_warn_set="$gl_warn_set $gl_warn_item"
+        as_fn_append gl_warn_set " $gl_warn_item"
         ;;
     esac
   done
@@ -38471,15 +46209,15 @@ printf %s "checking for inline... " >&6; }
 if test ${ac_cv_c_inline+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifndef __cplusplus
 typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
+static $ac_kw foo_t static_foo (void) {return 0; }
+$ac_kw foo_t foo (void) {return 0; }
 #endif
 
 _ACEOF
@@ -38487,7 +46225,7 @@ if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_c_inline=$ac_kw
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   test "$ac_cv_c_inline" != no && break
 done
 
@@ -38511,88 +46249,6 @@ _ACEOF
 esac
 
 
-  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
-printf %s "checking for variable-length arrays... " >&6; }
-if test ${ac_cv_c_vararrays+y}
-then :
-  printf %s "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC_NO_VLA__
-        defined
-        #endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "defined" >/dev/null 2>&1
-then :
-  ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Test for VLA support.  This test is partly inspired
-                  from examples in the C standard.  Use at least two VLA
-                  functions to detect the GCC 3.4.3 bug described in:
-                  https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
-                  */
-               #ifdef __STDC_NO_VLA__
-                syntax error;
-               #else
-                 extern int n;
-                 int B[100];
-                 int fvla (int m, int C[m][m]);
-
-                 int
-                 simple (int count, int all[static count])
-                 {
-                   return all[count - 1];
-                 }
-
-                 int
-                 fvla (int m, int C[m][m])
-                 {
-                   typedef int VLA[m][m];
-                   VLA x;
-                   int D[m];
-                   static int (*q)[m] = &B;
-                   int (*s)[n] = q;
-                   return C && &x[0][0] == &D[0] && &D[0] == s[0];
-                 }
-               #endif
-
-int
-main (void)
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-  ac_cv_c_vararrays=yes
-else
-  ac_cv_c_vararrays=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -rf conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
-printf "%s\n" "$ac_cv_c_vararrays" >&6; }
-  if test "$ac_cv_c_vararrays" = yes; then
-
-printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
-
-  elif test "$ac_cv_c_vararrays" = no; then
-
-printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
-
-  fi
-
-
 
 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
 
@@ -38604,7 +46260,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_path_PR_PROGRAM+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   case $PR_PROGRAM in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
@@ -38673,7 +46329,7 @@ printf %s "checking for $ac_hdr that defines DIR... " >&6; }
 if eval test \${$as_ac_Header+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
@@ -38691,10 +46347,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   eval "$as_ac_Header=yes"
-else
+else $as_nop
   eval "$as_ac_Header=no"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 eval ac_res=\$$as_ac_Header
               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -38716,7 +46372,7 @@ printf %s "checking for library containing opendir... " >&6; }
 if test ${ac_cv_search_opendir+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -38724,9 +46380,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char opendir ();
 int
 main (void)
@@ -38748,7 +46401,7 @@ do
 then :
   ac_cv_search_opendir=$ac_res
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext
   if test ${ac_cv_search_opendir+y}
 then :
@@ -38758,7 +46411,7 @@ done
 if test ${ac_cv_search_opendir+y}
 then :
 
-else
+else $as_nop
   ac_cv_search_opendir=no
 fi
 rm conftest.$ac_ext
@@ -38779,7 +46432,7 @@ printf %s "checking for library containing opendir... " >&6; }
 if test ${ac_cv_search_opendir+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   ac_func_search_save_LIBS=$LIBS
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -38787,9 +46440,6 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* Override any GCC internal prototype to avoid an error.
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
 char opendir ();
 int
 main (void)
@@ -38811,7 +46461,7 @@ do
 then :
   ac_cv_search_opendir=$ac_res
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext
   if test ${ac_cv_search_opendir+y}
 then :
@@ -38821,7 +46471,7 @@ done
 if test ${ac_cv_search_opendir+y}
 then :
 
-else
+else $as_nop
   ac_cv_search_opendir=no
 fi
 rm conftest.$ac_ext
@@ -38843,7 +46493,7 @@ printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
 if test ${ac_cv_header_sys_wait_h+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
@@ -38868,10 +46518,10 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_header_sys_wait_h=yes
-else
+else $as_nop
   ac_cv_header_sys_wait_h=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
@@ -38881,13 +46531,39 @@ printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
 
 fi
 
-ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+
+  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
 if test "x$ac_cv_type_pid_t" = xyes
 then :
 
-else
+else $as_nop
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+  ac_pid_type='int'
+else $as_nop
+  ac_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
 
-printf "%s\n" "#define pid_t int" >>confdefs.h
 
 fi
 
@@ -38896,6 +46572,7 @@ fi
 
 
 
+
 if test $ac_cv_func_sigprocmask = no; then
   ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
 if test "x$ac_cv_func_sigblock" = xyes
@@ -38910,37 +46587,29 @@ printf %s "checking whether closedir returns void... " >&6; }
 if test ${ac_cv_func_closedir_void+y}
 then :
   printf %s "(cached) " >&6
-else
-  if test "$cross_compiling" = yes
-then :
-  ac_cv_func_closedir_void=yes
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
 #include <$ac_header_dirent>
-#ifndef __cplusplus
-int closedir ();
-#endif
 
 int
 main (void)
 {
-return closedir (opendir (".")) != 0;
+
+  return closedir(0);
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"
+if ac_fn_c_try_compile "$LINENO"
 then :
   ac_cv_func_closedir_void=no
-else
+else $as_nop
   ac_cv_func_closedir_void=yes
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
@@ -38961,11 +46630,11 @@ printf %s "checking for working fork... " >&6; }
 if test ${ac_cv_func_fork_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   ac_cv_func_fork_works=cross
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
@@ -38983,7 +46652,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   ac_cv_func_fork_works=yes
-else
+else $as_nop
   ac_cv_func_fork_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -39017,11 +46686,11 @@ printf %s "checking for working vfork... " >&6; }
 if test ${ac_cv_func_vfork_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   if test "$cross_compiling" = yes
 then :
   ac_cv_func_vfork_works=cross
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 /* Thanks to Paul Eggert for this test.  */
@@ -39133,7 +46802,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"
 then :
   ac_cv_func_vfork_works=yes
-else
+else $as_nop
   ac_cv_func_vfork_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -39187,7 +46856,7 @@ printf %s "checking whether NLS is requested... " >&6; }
 if test ${enable_nls+y}
 then :
   enableval=$enable_nls; USE_NLS=$enableval
-else
+else $as_nop
   USE_NLS=yes
 fi
 
@@ -39236,7 +46905,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_path_MSGFMT+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   case "$MSGFMT" in
   [\\/]* | ?:[\\/]*)
     ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
@@ -39278,7 +46947,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_path_GMSGFMT+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   case $GMSGFMT in
   [\\/]* | ?:[\\/]*)
   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
@@ -39364,7 +47033,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_path_XGETTEXT+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   case "$XGETTEXT" in
   [\\/]* | ?:[\\/]*)
     ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
@@ -39442,7 +47111,7 @@ printf %s "checking for $ac_word... " >&6; }
 if test ${ac_cv_path_MSGMERGE+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   case "$MSGMERGE" in
   [\\/]* | ?:[\\/]*)
     ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
@@ -39515,7 +47184,7 @@ printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -39532,10 +47201,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gt_cv_func_CFPreferencesCopyAppValue=yes
-else
+else $as_nop
   gt_cv_func_CFPreferencesCopyAppValue=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
      LIBS="$gt_save_LIBS"
 fi
@@ -39551,7 +47220,7 @@ printf %s "checking for CFLocaleCopyCurrent... " >&6; }
 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gt_save_LIBS="$LIBS"
      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -39568,10 +47237,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   gt_cv_func_CFLocaleCopyCurrent=yes
-else
+else $as_nop
   gt_cv_func_CFLocaleCopyCurrent=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
      LIBS="$gt_save_LIBS"
 fi
@@ -39629,7 +47298,7 @@ printf %s "checking for GNU gettext in libc... " >&6; }
 if eval test \${$gt_func_gnugettext_libc+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -39652,10 +47321,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   eval "$gt_func_gnugettext_libc=yes"
-else
+else $as_nop
   eval "$gt_func_gnugettext_libc=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
 fi
 eval ac_res=\$$gt_func_gnugettext_libc
@@ -39698,7 +47367,7 @@ printf %s "checking for iconv... " >&6; }
 if test ${am_cv_func_iconv+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
@@ -39722,7 +47391,7 @@ if ac_fn_c_try_link "$LINENO"
 then :
   am_cv_func_iconv=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
     if test "$am_cv_func_iconv" != yes; then
       am_save_LIBS="$LIBS"
@@ -39748,7 +47417,7 @@ then :
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
       LIBS="$am_save_LIBS"
     fi
@@ -39762,7 +47431,7 @@ printf %s "checking for working iconv... " >&6; }
 if test ${am_cv_func_iconv_works+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
 
                   am_save_LIBS="$LIBS"
       if test $am_cv_lib_iconv = yes; then
@@ -39776,7 +47445,7 @@ then :
              aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
              *)            am_cv_func_iconv_works="guessing yes" ;;
            esac
-else
+else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -39791,8 +47460,9 @@ int
 main (void)
 {
 int result = 0;
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
+  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+     successful returns.  This is even documented in
+     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
   {
     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
     if (cd_utf8_to_88591 != (iconv_t)(-1))
@@ -39956,6 +47626,8 @@ printf "%s\n" "$LIBICONV" >&6; }
 
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
+    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
 
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
@@ -39977,6 +47649,8 @@ then :
 
           eval additional_includedir=\"$includedir\"
           eval additional_libdir=\"$libdir\"
+          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
 
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
@@ -39984,15 +47658,19 @@ then :
       else
         additional_includedir="$withval/include"
         additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && test ! -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
+        additional_libdir2="$withval/$acl_libdirstem2"
+        additional_libdir3="$withval/$acl_libdirstem3"
       fi
     fi
 
 fi
 
+  if test "X$additional_libdir2" = "X$additional_libdir"; then
+    additional_libdir2=
+  fi
+  if test "X$additional_libdir3" = "X$additional_libdir"; then
+    additional_libdir3=
+  fi
       LIBINTL=
   LTLIBINTL=
   INCINTL=
             shrext=
           fi
           if test $use_additional = yes; then
-            dir="$additional_libdir"
-                                    if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
+            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+              if test "X$found_dir" = "X"; then
+                eval dir=\$$additional_libdir_variable
+                if test -n "$dir"; then
+                                                      if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
                   fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
                       found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
+                      found_a="$dir/$libname.$acl_libext"
                     fi
-                  done
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
                 fi
               fi
-            fi
-                        if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
+            done
           fi
           if test "X$found_dir" = "X"; then
             for x in $LDFLAGS $LTLIBINTL; do
@@ -40093,7 +47777,7 @@ fi
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
                                     if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
                       found_dir="$dir"
                       found_so="$dir/$libname$shrext"
                     else
                               | sed -e "s,^$libname$shrext\\\\.,," \
                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
                               | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
                           found_dir="$dir"
                           found_so="$dir/$libname$shrext.$ver"
                         fi
                       else
                         eval library_names=\"$acl_library_names_spec\"
                         for f in $library_names; do
-                          if test -f "$dir/$f"; then
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
                             found_dir="$dir"
                             found_so="$dir/$f"
                             break
@@ -40120,7 +47804,7 @@ fi
                     fi
                   fi
                                     if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
                       found_dir="$dir"
                       found_a="$dir/$libname.$acl_libext"
                     fi
@@ -40142,7 +47826,8 @@ fi
             if test "X$found_so" != "X"; then
                                                         if test "$enable_rpath" = no \
                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
               else
                                                                                 haveit=
                 fi
                 additional_includedir="$basedir/include"
                 ;;
+              */$acl_libdirstem3 | */$acl_libdirstem3/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
             esac
             if test "X$additional_includedir" != "X"; then
                                                                                                                 if test "X$additional_includedir" != "X/usr/include"; then
                             for dep in $dependency_libs; do
                 case "$dep" in
                   -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                                                                                                                if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 
-                          if test "X$x" = "X-L$additional_libdir"; then
+                          if test "X$x" = "X-L$dependency_libdir"; then
                             haveit=yes
                             break
                           fi
                         done
                         if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          if test -d "$dependency_libdir"; then
+                                                        LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
                           fi
                         fi
                         haveit=
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 
-                          if test "X$x" = "X-L$additional_libdir"; then
+                          if test "X$x" = "X-L$dependency_libdir"; then
                             haveit=yes
                             break
                           fi
                         done
                         if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          if test -d "$dependency_libdir"; then
+                                                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
                           fi
                         fi
                       fi
                     fi
                     ;;
                   -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                                                                                                                                                                dep=`echo "X$dep" | sed -e 's/^X-l//'`
+                    if test "X$dep" != Xc \
+                       || case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) false ;;
+                            *)                          true ;;
+                          esac; then
+                      names_next_round="$names_next_round $dep"
+                    fi
                     ;;
                   *.la)
                                                                                 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
@@ -40406,7 +48107,7 @@ printf %s "checking for GNU gettext in libintl... " >&6; }
 if eval test \${$gt_func_gnugettext_libintl+y}
 then :
   printf %s "(cached) " >&6
-else
+else $as_nop
   gt_save_CPPFLAGS="$CPPFLAGS"
             CPPFLAGS="$CPPFLAGS $INCINTL"
             gt_save_LIBS="$LIBS"
@@ -40437,10 +48138,10 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"
 then :
   eval "$gt_func_gnugettext_libintl=yes"
-else
+else $as_nop
   eval "$gt_func_gnugettext_libintl=no"
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
                         if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
               LIBS="$LIBS $LIBICONV"
@@ -40474,7 +48175,7 @@ then :
                  eval "$gt_func_gnugettext_libintl=yes"
 
 fi
-rm -f core conftest.err conftest.$ac_objext \
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
     conftest$ac_exeext conftest.$ac_ext
             fi
             CPPFLAGS="$gt_save_CPPFLAGS"
@@ -40786,6 +48487,14 @@ Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 CONFIG_INCLUDE=lib/config.h
 
+if test -z "${GL_GENERATE_SIGSEGV_H_TRUE}" && test -z "${GL_GENERATE_SIGSEGV_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_SIGSEGV_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
+  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
   as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -40794,10 +48503,6 @@ if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_F
   as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
   as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -40832,10 +48537,6 @@ if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_
   as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
     gltests_libobjs=
     gltests_ltlibobjs=
@@ -40881,6 +48582,7 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
 then :
   emulate sh
@@ -40889,7 +48591,7 @@ then :
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-else
+else $as_nop
   case `(set -o) 2>/dev/null` in #(
   *posix*) :
     set -o posix ;; #(
@@ -40899,6 +48601,44 @@ esac
 fi
 
 
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" ""       $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
+
 # The user is always right.
 if ${PATH_SEPARATOR+false} :; then
   PATH_SEPARATOR=:
@@ -40909,16 +48649,6 @@ if ${PATH_SEPARATOR+false} :; then
 fi
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-export as_nl
-IFS=" ""       $as_nl"
-
 # Find who we are.  Look in the path if we contain no directory separator.
 as_myself=
 case $0 in #((
@@ -40948,26 +48678,6 @@ if test ! -f "$as_myself"; then
   exit 1
 fi
 
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test \${$as_var+y} \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
 # as_fn_error STATUS ERROR [LINENO LOG_FD]
@@ -40987,6 +48697,7 @@ as_fn_error ()
 } # as_fn_error
 
 
+
 # as_fn_set_status STATUS
 # -----------------------
 # Set $? to STATUS, without forking.
@@ -41013,6 +48724,7 @@ as_fn_unset ()
   { eval $1=; unset $1;}
 }
 as_unset=as_fn_unset
+
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -41025,7 +48737,7 @@ then :
   {
     eval $1+=\$2
   }'
-else
+else $as_nop
   as_fn_append ()
   {
     eval $1=\$$1\$2
@@ -41043,7 +48755,7 @@ then :
   {
     as_val=$(( $* ))
   }'
-else
+else $as_nop
   as_fn_arith ()
   {
     as_val=`expr "$@" || test $? -eq 1`
@@ -41096,6 +48808,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
 ECHO_C= ECHO_N= ECHO_T=
 case `echo -n x` in #(((((
 -n*)
@@ -41109,6 +48825,12 @@ case `echo -n x` in #(((((
   ECHO_N='-n';;
 esac
 
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n.  New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
@@ -41221,8 +48943,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 diffutils $as_me 3.7, which was
-generated by GNU Autoconf 2.69.197-b8fd7.  Invocation command line was
+This file was extended by GNU diffutils $as_me 3.8, which was
+generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -41295,11 +49017,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 diffutils config.status 3.7
-configured by $0, generated by GNU Autoconf 2.69.197-b8fd7,
+GNU diffutils config.status 3.8
+configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2017 Free Software Foundation, Inc.
+Copyright (C) 2021 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -41980,7 +49702,7 @@ which seems to be undefined.  Please make sure it is defined" >&2;}
   #
   if test x"$ac_file" != x-; then
     {
-      printf "%s\n" "/* $configure_input  */" \
+      printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
     } >"$ac_tmp/config.h" \
       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
@@ -41993,7 +49715,7 @@ printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
        || as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
-    printf "%s\n" "/* $configure_input  */" \
+    printf "%s\n" "/* $configure_input  */" >&1 \
       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
       || as_fn_error $? "could not create -" "$LINENO" 5
   fi
@@ -42153,7 +49875,9 @@ printf "%s\n" X/"$am_mf" |
     { { 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 $? "Something went wrong bootstrapping makefile fragments
-    for automatic dependency tracking.  Try re-running configure with the
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE=\"gmake\" (or whatever is
+    necessary).  You can also try re-running configure with the
     '--disable-dependency-tracking' option to at least be able to build
     the package (albeit without support for automatic dependency tracking).
 See \`config.log' for more details" "$LINENO" 5; }
@@ -42317,3 +50041,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
index 4ed365c..73adb80 100644 (file)
@@ -1,6 +1,6 @@
 # Configure template for GNU Diffutils.
 
-# Copyright (C) 1994-1995, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2018
+# Copyright (C) 1994-1995, 1998, 2001-2002, 2004, 2006, 2009-2013, 2015-2021
 # Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_PREREQ([2.63])
+AC_PREREQ([2.64])
 
 AC_INIT([GNU diffutils],
         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
@@ -41,6 +41,10 @@ gl_EARLY
 gl_USE_SYSTEM_EXTENSIONS
 gl_INIT
 
+# Ensure VLAs are not used.
+# Note -Wvla is implicitly added by gl_MANYWARN_ALL_GCC
+AC_DEFINE([GNULIB_NO_VLA], [1], [Define to 1 to disable use of VLAs])
+
 AC_ARG_ENABLE([gcc-warnings],
   [AS_HELP_STRING([--enable-gcc-warnings],
                   [turn on lots of GCC warnings (for developers)])],
@@ -62,51 +66,17 @@ if test "$gl_gcc_warnings" = yes; then
 
   nw=
   # This, $nw, is the list of warnings we disable.
-  nw="$nw -Wdeclaration-after-statement" # too useful to forbid
-  nw="$nw -Waggregate-return"       # anachronistic
-  nw="$nw -Wlong-long"              # C90 is anachronistic (lib/gethrxtime.h)
-  nw="$nw -Wc++-compat"             # We don't care about C++ compilers
-  nw="$nw -Wundef"                  # Warns on '#if GNULIB_FOO' etc in gnulib
-  nw="$nw -Wtraditional"            # Warns on #elif which we use often
-  nw="$nw -Wcast-qual"              # Too many warnings for now
-  nw="$nw -Wconversion"             # Too many warnings for now
-  nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
-  nw="$nw -Wsign-conversion"        # Too many warnings for now
-  nw="$nw -Wtraditional-conversion" # Too many warnings for now
-  nw="$nw -Wunreachable-code"       # Too many warnings for now
-  nw="$nw -Wpadded"                 # Our structs are not padded
-  nw="$nw -Wredundant-decls"        # openat.h declares e.g., mkdirat
-  nw="$nw -Wlogical-op"             # any use of fwrite provokes this
-  nw="$nw -Wformat-nonliteral"      # who.c and pinky.c strftime uses
-  nw="$nw -Wvla"                    # warnings in gettext.h
-  nw="$nw -Wnested-externs"         # use of XARGMATCH/verify_function__
-  nw="$nw -Wswitch-enum"            # Too many warnings for now
-  nw="$nw -Wswitch-default"         # Too many warnings for now
-  nw="$nw -Wstack-protector"        # not worth working around
-  # things I might fix soon:
-  nw="$nw -Wfloat-equal"            # sort.c, seq.c
-  nw="$nw -Wmissing-format-attribute" # copy.c
-  nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
   nw="$nw -Winline"                 # system.h's readdir_ignoring_dot_and_dotdot
-  nw="$nw -Wstrict-overflow"        # expr.c, pr.c, tr.c, factor.c
-  nw="$nw -Wformat-extra-args"      # sdiff.c
-  # ?? -Wstrict-overflow
+  nw="$nw -Wstack-protector"        # not worth working around
 
   gl_MANYWARN_ALL_GCC([ws])
   gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
   for w in $ws; do
     gl_WARN_ADD([$w])
   done
-  gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one
   gl_WARN_ADD([-Wno-sign-compare])     # Too many warnings for now
-  gl_WARN_ADD([-Wno-pointer-sign])     # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-format-nonliteral])
-  gl_WARN_ADD([-Wno-cast-function-type]) # For sig-handler.h:47
-
-  # 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
-  gl_WARN_ADD([-Wno-logical-op])
 
   gl_WARN_ADD([-fdiagnostics-show-option])
   gl_WARN_ADD([-funit-at-a-time])
@@ -123,15 +93,18 @@ if test "$gl_gcc_warnings" = yes; then
   # Remove the following and save the result in GNULIB_WARN_CFLAGS.
   nw=
   nw="$nw -Wunused-macros"
-  nw="$nw -Wmissing-prototypes"
-  nw="$nw -Wold-style-definition"
   nw="$nw -Wsuggest-attribute=pure"
+  nw="$nw -Wduplicated-branches"    # Too many false alarms
+
+  # Avoid false alarm in lib/vasnprintf.c.
+  # https://lists.gnu.org/r/bug-gnulib/2021-01/msg00031.html
+  gl_WARN_ADD([-Wno-analyzer-null-argument])
+
   gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
   AC_SUBST([GNULIB_WARN_CFLAGS])
 fi
 
 AC_C_INLINE
-AC_C_VARARRAYS
 
 AC_DEFINE([DEFAULT_EDITOR_PROGRAM], ["ed"],
   [Name of editor program, unless overridden.])
index 4f2b9f9..7138d76 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for GNU diffutils documentation.
 
-# Copyright (C) 2001-2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 001ffa8..1133c58 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 
 # Makefile for GNU diffutils documentation.
 
-# Copyright (C) 2001-2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -109,11 +109,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -123,13 +125,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -137,49 +140,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -187,30 +198,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(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 \
@@ -332,9 +346,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -349,321 +366,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -698,13 +805,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -726,17 +834,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -752,7 +864,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -761,7 +872,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -784,11 +895,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -805,10 +975,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -822,14 +997,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -843,23 +1023,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -898,12 +1079,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -924,20 +1108,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -946,8 +1144,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -968,6 +1168,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -977,6 +1179,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -1000,6 +1203,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -1009,6 +1214,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -1033,31 +1239,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1077,6 +1295,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1084,10 +1303,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1109,7 +1331,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1121,29 +1345,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1155,6 +1435,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1165,6 +1446,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1191,6 +1477,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1199,6 +1486,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1212,10 +1500,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1492,7 +1782,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
index 540d912..229e024 100644 (file)
@@ -1,12 +1,12 @@
-This is diffutils.info, produced by makeinfo version 6.5 from
+This is diffutils.info, produced by makeinfo version 6.8 from
 diffutils.texi.
 
-This manual is for GNU Diffutils (version 3.7, 7 January 2018), and
+This manual is for GNU Diffutils (version 3.8, 2 January 2021), and
 documents the GNU 'diff', 'diff3', 'sdiff', and 'cmp' commands for
 showing the differences between files and the GNU 'patch' command for
 using their output to update files.
 
-   Copyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2018 Free
+   Copyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2021 Free
 Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
@@ -35,12 +35,12 @@ File: diffutils.info,  Node: Top,  Next: Overview,  Up: (dir)
 Comparing and Merging Files
 ***************************
 
-This manual is for GNU Diffutils (version 3.7, 7 January 2018), and
+This manual is for GNU Diffutils (version 3.8, 2 January 2021), and
 documents the GNU 'diff', 'diff3', 'sdiff', and 'cmp' commands for
 showing the differences between files and the GNU 'patch' command for
 using their output to update files.
 
-   Copyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2018 Free
+   Copyright (C) 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2021 Free
 Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
@@ -147,7 +147,7 @@ Science' (Jan Van Leeuwen, ed.), Vol. A, 'Algorithms and Complexity',
 Elsevier/MIT Press, 1990, pp. 255-300.
 
    GNU 'diff3' was written by Randy Smith.  GNU 'sdiff' was written by
-Thomas Lord.  GNU 'cmp' was written by Torbjo"rn Granlund and David
+Thomas Lord.  GNU 'cmp' was written by Torbjörn Granlund and David
 MacKenzie.
 
    GNU 'patch' was written mainly by Larry Wall and Paul Eggert; several
@@ -715,9 +715,10 @@ output format, use the '--unified[=LINES]' ('-U LINES'), or '-u' option.
 The argument LINES is the number of lines of context to show.  When it
 is not given, it defaults to three.
 
-   At present, only GNU 'diff' can produce this format and only GNU
-'patch' can automatically apply diffs in this format.  For proper
-operation, 'patch' typically needs at least three lines of context.
+   In the early 1990s, only GNU 'diff' could produce this format and
+only GNU 'patch' could automatically apply diffs in this format.  For
+proper operation, 'patch' typically needs at least three lines of
+context.
 
 * Menu:
 
@@ -1707,9 +1708,7 @@ either an insertion or a deletion, depending on whether the missing file
 is in the first or the second position.)  To do this, use the
 '--new-file' ('-N') option.  This option affects command-line arguments
 as well as files found via directory traversal; for example, 'diff -N a
-b' treats 'a' as empty if 'a' does not exist but 'b' does, and similarly
-'diff -N - b' treats standard input as empty if it is closed but 'b'
-exists.
+b' treats 'a' as empty if 'a' does not exist but 'b' does.
 
    If the older directory contains large files that are not in the newer
 directory, you can make the patch smaller by using the
@@ -4897,7 +4896,7 @@ Appendix A Copying This Manual
      the GNU Free Documentation License from time to time.  Such new
      versions will be similar in spirit to the present version, but may
      differ in detail to address new problems or concerns.  See
-     <https://www.gnu.org/copyleft/>.
+     <https://www.gnu.org/licenses/>.
 
      Each version of the License is given a distinguishing version
      number.  If the Document specifies that a particular numbered
@@ -5215,100 +5214,105 @@ Node: Example Context\7f25865
 Node: Less Context\7f27372
 Node: Detailed Context\7f28561
 Node: Unified Format\7f30756
-Node: Example Unified\7f31553
-Node: Detailed Unified\7f32591
-Node: Sections\7f34231
-Node: Specified Headings\7f34990
-Node: C Function Headings\7f36539
-Node: Alternate Names\7f37385
-Node: Side by Side\7f38298
-Node: Side by Side Format\7f40448
-Node: Example Side by Side\7f41350
-Node: Normal\7f42690
-Node: Example Normal\7f43691
-Node: Detailed Normal\7f44427
-Node: Scripts\7f46166
-Node: ed Scripts\7f46571
-Node: Example ed\7f47777
-Node: Detailed ed\7f48227
-Node: Forward ed\7f49986
-Node: RCS\7f50762
-Node: If-then-else\7f51978
-Node: Line Group Formats\7f53656
-Node: Line Formats\7f59537
-Node: Example If-then-else\7f62806
-Node: Detailed If-then-else\7f63885
-Node: Incomplete Lines\7f65770
-Node: Comparing Directories\7f67406
-Node: Adjusting Output\7f71698
-Node: Tabs\7f72205
-Node: Trailing Blanks\7f73819
-Node: Pagination\7f75044
-Node: diff Performance\7f75512
-Node: Comparing Three Files\7f78601
-Node: Sample diff3 Input\7f79479
-Node: Example diff3 Normal\7f80427
-Node: Detailed diff3 Normal\7f81487
-Node: diff3 Hunks\7f83275
-Node: diff3 Merging\7f84541
-Node: Which Changes\7f86786
-Node: Marking Conflicts\7f88186
-Node: Bypassing ed\7f90641
-Node: Merging Incomplete Lines\7f91984
-Node: Saving the Changed File\7f92710
-Node: Interactive Merging\7f93326
-Node: sdiff Option Summary\7f94035
-Node: Merge Commands\7f95238
-Node: Merging with patch\7f96527
-Node: patch Input\7f98894
-Node: Revision Control\7f99576
-Node: Imperfect\7f100746
-Node: Changed White Space\7f101895
-Node: Reversed Patches\7f102692
-Node: Inexact\7f104156
-Node: Dry Runs\7f107712
-Node: Creating and Removing\7f108576
-Node: Patching Timestamps\7f109625
-Node: Multiple Patches\7f111812
-Node: patch Directories\7f114473
-Node: Backups\7f116097
-Node: Backup Names\7f117161
-Ref: Backup Names-Footnote-1\7f120116
-Node: Reject Names\7f120243
-Node: patch Messages\7f120832
-Node: More or Fewer Messages\7f121892
-Node: patch and Keyboard Input\7f122523
-Node: patch Quoting Style\7f123552
-Node: patch and POSIX\7f124698
-Node: patch and Tradition\7f125537
-Node: Making Patches\7f128958
-Node: Tips for Patch Producers\7f129784
-Node: Tips for Patch Consumers\7f131039
-Node: Avoiding Common Mistakes\7f131676
-Node: Generating Smaller Patches\7f134201
-Node: Invoking cmp\7f135960
-Node: cmp Options\7f137510
-Node: Invoking diff\7f141154
-Node: diff Options\7f142773
-Node: Invoking diff3\7f152622
-Node: diff3 Options\7f153260
-Node: Invoking patch\7f156293
-Node: patch Options\7f157501
-Node: Invoking sdiff\7f162721
-Node: sdiff Options\7f163863
-Node: Standards conformance\7f166835
-Node: Projects\7f168581
-Node: Shortcomings\7f169293
-Node: Internationalization\7f170393
-Node: Changing Structure\7f171559
-Node: Special Files\7f172662
-Node: Unusual File Names\7f173773
-Node: Timestamp Order\7f174411
-Node: Ignoring Changes\7f175047
-Node: Speedups\7f175816
-Node: Bugs\7f176278
-Node: Copying This Manual\7f177131
-Node: Translations\7f202252
-Node: Index\7f202624
+Node: Example Unified\7f31565
+Node: Detailed Unified\7f32603
+Node: Sections\7f34243
+Node: Specified Headings\7f35002
+Node: C Function Headings\7f36551
+Node: Alternate Names\7f37397
+Node: Side by Side\7f38310
+Node: Side by Side Format\7f40460
+Node: Example Side by Side\7f41362
+Node: Normal\7f42702
+Node: Example Normal\7f43703
+Node: Detailed Normal\7f44439
+Node: Scripts\7f46178
+Node: ed Scripts\7f46583
+Node: Example ed\7f47789
+Node: Detailed ed\7f48239
+Node: Forward ed\7f49998
+Node: RCS\7f50774
+Node: If-then-else\7f51990
+Node: Line Group Formats\7f53668
+Node: Line Formats\7f59549
+Node: Example If-then-else\7f62818
+Node: Detailed If-then-else\7f63897
+Node: Incomplete Lines\7f65782
+Node: Comparing Directories\7f67418
+Node: Adjusting Output\7f71619
+Node: Tabs\7f72126
+Node: Trailing Blanks\7f73740
+Node: Pagination\7f74965
+Node: diff Performance\7f75433
+Node: Comparing Three Files\7f78522
+Node: Sample diff3 Input\7f79400
+Node: Example diff3 Normal\7f80348
+Node: Detailed diff3 Normal\7f81408
+Node: diff3 Hunks\7f83196
+Node: diff3 Merging\7f84462
+Node: Which Changes\7f86707
+Node: Marking Conflicts\7f88107
+Node: Bypassing ed\7f90562
+Node: Merging Incomplete Lines\7f91905
+Node: Saving the Changed File\7f92631
+Node: Interactive Merging\7f93247
+Node: sdiff Option Summary\7f93956
+Node: Merge Commands\7f95159
+Node: Merging with patch\7f96448
+Node: patch Input\7f98815
+Node: Revision Control\7f99497
+Node: Imperfect\7f100667
+Node: Changed White Space\7f101816
+Node: Reversed Patches\7f102613
+Node: Inexact\7f104077
+Node: Dry Runs\7f107633
+Node: Creating and Removing\7f108497
+Node: Patching Timestamps\7f109546
+Node: Multiple Patches\7f111733
+Node: patch Directories\7f114394
+Node: Backups\7f116018
+Node: Backup Names\7f117082
+Ref: Backup Names-Footnote-1\7f120037
+Node: Reject Names\7f120164
+Node: patch Messages\7f120753
+Node: More or Fewer Messages\7f121813
+Node: patch and Keyboard Input\7f122444
+Node: patch Quoting Style\7f123473
+Node: patch and POSIX\7f124619
+Node: patch and Tradition\7f125458
+Node: Making Patches\7f128879
+Node: Tips for Patch Producers\7f129705
+Node: Tips for Patch Consumers\7f130960
+Node: Avoiding Common Mistakes\7f131597
+Node: Generating Smaller Patches\7f134122
+Node: Invoking cmp\7f135881
+Node: cmp Options\7f137431
+Node: Invoking diff\7f141075
+Node: diff Options\7f142694
+Node: Invoking diff3\7f152543
+Node: diff3 Options\7f153181
+Node: Invoking patch\7f156214
+Node: patch Options\7f157422
+Node: Invoking sdiff\7f162642
+Node: sdiff Options\7f163784
+Node: Standards conformance\7f166756
+Node: Projects\7f168502
+Node: Shortcomings\7f169214
+Node: Internationalization\7f170314
+Node: Changing Structure\7f171480
+Node: Special Files\7f172583
+Node: Unusual File Names\7f173694
+Node: Timestamp Order\7f174332
+Node: Ignoring Changes\7f174968
+Node: Speedups\7f175737
+Node: Bugs\7f176199
+Node: Copying This Manual\7f177052
+Node: Translations\7f202173
+Node: Index\7f202545
 \1f
 End Tag Table
+
+\1f
+Local Variables:
+coding: utf-8
+End:
index eb98d74..eed9bdb 100644 (file)
@@ -14,8 +14,8 @@ and documents the GNU @command{diff}, @command{diff3},
 differences between files and the GNU @command{patch} command for
 using their output to update files.
 
-Copyright @copyright{} 1992-1994, 1998, 2001-2002, 2004, 2006, 2009-2018 Free
-Software Foundation, Inc.
+Copyright @copyright{} 1992--1994, 1998, 2001--2002, 2004, 2006, 2009--2021
+Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -766,8 +766,8 @@ or @option{-u} option.
 The argument @var{lines} is the number of lines of context to show.
 When it is not given, it defaults to three.
 
-At present, only GNU @command{diff} can produce this format and
-only GNU @command{patch} can automatically apply diffs in this
+In the early 1990s, only GNU @command{diff} could produce this format and
+only GNU @command{patch} could automatically apply diffs in this
 format.  For proper operation, @command{patch} typically needs at
 least three lines of context.
 
@@ -1796,8 +1796,7 @@ second position.)  To do this, use the @option{--new-file}
 (@option{-N}) option.  This option affects command-line arguments as
 well as files found via directory traversal; for example, @samp{diff
 -N a b} treats @file{a} as empty if @file{a} does not exist but
-@file{b} does, and similarly @samp{diff -N - b} treats standard input
-as empty if it is closed but @file{b} exists.
+@file{b} does.
 
 If the older directory contains large files that are not in
 the newer directory, you can make the patch smaller by using the
index 542edaa..eaf3da0 100644 (file)
@@ -414,7 +414,7 @@ The Free Software Foundation may publish new, revised versions
 of the GNU Free Documentation License from time to time.  Such new
 versions will be similar in spirit to the present version, but may
 differ in detail to address new problems or concerns.  See
-@uref{https://www.gnu.org/copyleft/}.
+@uref{https://www.gnu.org/licenses/}.
 
 Each version of the License is given a distinguishing version number.
 If the Document specifies that a particular numbered version of this
index a79ad79..b0969cc 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 7 January 2018
-@set UPDATED-MONTH January 2018
-@set EDITION 3.7
-@set VERSION 3.7
+@set UPDATED 2 January 2021
+@set UPDATED-MONTH January 2021
+@set EDITION 3.8
+@set VERSION 3.8
index a79ad79..b0969cc 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 7 January 2018
-@set UPDATED-MONTH January 2018
-@set EDITION 3.7
-@set VERSION 3.7
+@set UPDATED 2 January 2021
+@set UPDATED-MONTH January 2021
+@set EDITION 3.8
+@set VERSION 3.8
index 58b6d42..e077ca7 100755 (executable)
--- a/exgettext
+++ b/exgettext
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper around gettext for programs using the msgid convention.
 
-# Copyright (C) 1998, 2001, 2004, 2009-2013, 2015-2018 Free Software
+# Copyright (C) 1998, 2001, 2004, 2009-2013, 2015-2021 Free Software
 # Foundation, Inc.
 
 # Written by Paul Eggert <eggert@twinsun.com>.
@@ -97,7 +97,7 @@ generate_emsgids='
       line = substr(line, percent_index + 2)
       bracket_index = index(line, "}")
       if (bracket_index == 0) {
-       continue
+        continue
       }
       msgid = substr(line, 1, bracket_index - 1)
       if (index(msgid, "%") != 0) {
index 7df8ba8..aa9f987 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,7 +14,7 @@
 
 @SET_MAKE@
 
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -117,48 +117,64 @@ TESTS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
        test-arpa_inet$(EXEEXT) test-binary-io.sh test-bind$(EXEEXT) \
        test-bitrotate$(EXEEXT) test-btowc1.sh test-btowc2.sh \
        test-c-ctype$(EXEEXT) test-c-stack.sh test-c-stack2.sh \
-       test-c-strcase.sh test-cloexec$(EXEEXT) test-close$(EXEEXT) \
+       test-c-strcase.sh test-calloc-gnu$(EXEEXT) \
+       test-cloexec$(EXEEXT) test-close$(EXEEXT) \
        test-connect$(EXEEXT) test-ctype$(EXEEXT) \
-       test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
+       test-dirname$(EXEEXT) test-dup2$(EXEEXT) \
+       test-dynarray$(EXEEXT) test-environ$(EXEEXT) \
        test-errno$(EXEEXT) test-exclude1.sh test-exclude2.sh \
        test-exclude3.sh test-exclude4.sh test-exclude5.sh \
        test-exclude6.sh test-exclude7.sh test-exclude8.sh \
        test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \
        test-fgetc$(EXEEXT) test-filenamecat$(EXEEXT) \
        test-float$(EXEEXT) test-fnmatch-h$(EXEEXT) \
-       test-fnmatch$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
-       test-freopen-safer$(EXEEXT) test-freopen$(EXEEXT) \
-       test-fstat$(EXEEXT) test-ftruncate.sh test-fwrite$(EXEEXT) \
+       test-fnmatch$(EXEEXT) test-fopen-gnu$(EXEEXT) \
+       test-fopen$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
+       test-free$(EXEEXT) test-freopen$(EXEEXT) test-fstat$(EXEEXT) \
+       test-ftruncate.sh test-fwrite$(EXEEXT) \
        test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
        test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
-       test-getprogname$(EXEEXT) test-gettimeofday$(EXEEXT) \
+       test-getprogname$(EXEEXT) test-getrandom$(EXEEXT) \
+       test-gettimeofday$(EXEEXT) test-hard-locale$(EXEEXT) \
        test-hash$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
        test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
        test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \
        test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \
-       test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \
-       test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
-       test-listen$(EXEEXT) test-locale$(EXEEXT) \
-       test-localeconv$(EXEEXT) test-lstat$(EXEEXT) \
+       test-isblank$(EXEEXT) test-iswblank$(EXEEXT) test-iswdigit.sh \
+       test-iswxdigit.sh test-langinfo$(EXEEXT) \
+       test-limits-h$(EXEEXT) test-listen$(EXEEXT) \
+       test-locale$(EXEEXT) test-localeconv$(EXEEXT) \
+       test-lstat$(EXEEXT) test-malloc-gnu$(EXEEXT) \
        test-malloca$(EXEEXT) test-mbrtowc1.sh test-mbrtowc2.sh \
        test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh \
        test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
        test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
-       test-mbrtowc-w32-5.sh test-mbscasecmp.sh test-mbsinit.sh \
+       test-mbrtowc-w32-5.sh test-mbrtowc-w32-6.sh \
+       test-mbrtowc-w32-7.sh test-mbscasecmp.sh test-mbsinit.sh \
        test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \
        test-mbsrtowcs4.sh test-mbsstr1$(EXEEXT) test-mbsstr2.sh \
        test-mbsstr3.sh test-memchr$(EXEEXT) test-mkdir$(EXEEXT) \
        test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
-       test-nl_langinfo.sh test-nstrftime$(EXEEXT) test-open$(EXEEXT) \
+       test-nl_langinfo.sh test-nl_langinfo-mt$(EXEEXT) \
+       test-nstrftime$(EXEEXT) test-open$(EXEEXT) \
        test-pathmax$(EXEEXT) test-perror.sh test-perror2$(EXEEXT) \
-       test-pipe$(EXEEXT) test-quotearg-simple$(EXEEXT) \
+       test-pipe$(EXEEXT) test-pthread$(EXEEXT) \
+       test-pthread-thread$(EXEEXT) test-pthread_sigmask1$(EXEEXT) \
+       test-pthread_sigmask2$(EXEEXT) test-quotearg-simple$(EXEEXT) \
        test-raise$(EXEEXT) test-rawmemchr$(EXEEXT) \
-       test-readlink$(EXEEXT) test-regex$(EXEEXT) \
-       test-select$(EXEEXT) test-select-in.sh test-select-out.sh \
-       test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \
-       test-setsockopt$(EXEEXT) test-sh-quote$(EXEEXT) \
-       test-sigaction$(EXEEXT) test-signal-h$(EXEEXT) \
-       test-sigprocmask$(EXEEXT) test-sleep$(EXEEXT) \
+       test-readlink$(EXEEXT) test-realloc-gnu$(EXEEXT) \
+       test-reallocarray$(EXEEXT) test-regex$(EXEEXT) \
+       test-sched$(EXEEXT) test-select$(EXEEXT) test-select-in.sh \
+       test-select-out.sh test-setenv$(EXEEXT) \
+       test-setlocale_null$(EXEEXT) \
+       test-setlocale_null-mt-one$(EXEEXT) \
+       test-setlocale_null-mt-all$(EXEEXT) test-setsockopt$(EXEEXT) \
+       test-sh-quote$(EXEEXT) test-sigaction$(EXEEXT) \
+       test-signal-h$(EXEEXT) test-sigprocmask$(EXEEXT) \
+       test-sigsegv-catch-segv1$(EXEEXT) \
+       test-sigsegv-catch-segv2$(EXEEXT) \
+       test-sigsegv-catch-stackoverflow1$(EXEEXT) \
+       test-sigsegv-catch-stackoverflow2$(EXEEXT) test-sleep$(EXEEXT) \
        test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \
        test-stat$(EXEEXT) test-stat-time$(EXEEXT) \
        test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \
@@ -166,13 +182,15 @@ TESTS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
        test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \
        test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \
        test-string$(EXEEXT) test-strings$(EXEEXT) \
-       test-strnlen$(EXEEXT) test-strtoull$(EXEEXT) \
-       test-strtoumax$(EXEEXT) test-symlink$(EXEEXT) \
-       test-sys_ioctl$(EXEEXT) test-sys_select$(EXEEXT) \
-       test-sys_socket$(EXEEXT) test-sys_stat$(EXEEXT) \
-       test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \
-       test-sys_uio$(EXEEXT) test-sys_wait$(EXEEXT) test-init.sh \
-       test-time$(EXEEXT) test-timespec$(EXEEXT) test-unistd$(EXEEXT) \
+       test-strnlen$(EXEEXT) test-strtoimax$(EXEEXT) \
+       test-strtoll$(EXEEXT) test-symlink$(EXEEXT) \
+       test-sys_ioctl$(EXEEXT) test-sys_random$(EXEEXT) \
+       test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \
+       test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+       test-sys_types$(EXEEXT) test-sys_uio$(EXEEXT) \
+       test-sys_wait$(EXEEXT) test-init.sh test-thread_self$(EXEEXT) \
+       test-thread_create$(EXEEXT) test-time$(EXEEXT) \
+       test-timespec$(EXEEXT) test-unistd$(EXEEXT) \
        test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \
        test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \
        test-unsetenv$(EXEEXT) test-update-copyright.sh \
@@ -182,70 +200,85 @@ TESTS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
        test-wchar$(EXEEXT) test-wcrtomb.sh test-wcrtomb-w32-1.sh \
        test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
        test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh \
+       test-wcrtomb-w32-6.sh test-wcrtomb-w32-7.sh \
        test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \
-       test-xalloc-die.sh test-xstrtol.sh test-xstrtoumax.sh \
-       test-xvasprintf$(EXEEXT)
+       test-xalloc-die.sh test-xstdopen.sh test-xstrtoimax.sh \
+       test-xstrtol.sh test-xvasprintf$(EXEEXT)
 XFAIL_TESTS =
-noinst_PROGRAMS = test-localcharset$(EXEEXT)
+noinst_PROGRAMS = current-locale$(EXEEXT) test-localcharset$(EXEEXT)
 check_PROGRAMS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
        test-areadlink$(EXEEXT) test-argmatch$(EXEEXT) \
        test-arpa_inet$(EXEEXT) test-binary-io$(EXEEXT) \
        test-bind$(EXEEXT) test-bitrotate$(EXEEXT) test-btowc$(EXEEXT) \
        test-c-ctype$(EXEEXT) test-c-stack$(EXEEXT) \
        test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \
-       test-cloexec$(EXEEXT) test-close$(EXEEXT) \
-       test-connect$(EXEEXT) test-ctype$(EXEEXT) \
-       test-dirname$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \
+       test-calloc-gnu$(EXEEXT) test-cloexec$(EXEEXT) \
+       test-close$(EXEEXT) test-connect$(EXEEXT) test-ctype$(EXEEXT) \
+       test-dirname$(EXEEXT) test-dup2$(EXEEXT) \
+       test-dynarray$(EXEEXT) test-environ$(EXEEXT) \
        test-errno$(EXEEXT) test-exclude$(EXEEXT) \
        test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fdopen$(EXEEXT) \
        test-fgetc$(EXEEXT) test-filenamecat$(EXEEXT) \
        test-float$(EXEEXT) test-fnmatch-h$(EXEEXT) \
-       test-fnmatch$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
-       test-freopen-safer$(EXEEXT) test-freopen$(EXEEXT) \
-       test-fstat$(EXEEXT) test-ftruncate$(EXEEXT) \
-       test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \
-       test-getdtablesize$(EXEEXT) test-getopt-gnu$(EXEEXT) \
-       test-getopt-posix$(EXEEXT) test-getprogname$(EXEEXT) \
-       test-gettimeofday$(EXEEXT) test-hash$(EXEEXT) \
-       test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
+       test-fnmatch$(EXEEXT) test-fopen-gnu$(EXEEXT) \
+       test-fopen$(EXEEXT) test-fputc$(EXEEXT) test-fread$(EXEEXT) \
+       test-free$(EXEEXT) test-freopen$(EXEEXT) test-fstat$(EXEEXT) \
+       test-ftruncate$(EXEEXT) test-fwrite$(EXEEXT) \
+       test-getcwd-lgpl$(EXEEXT) test-getdtablesize$(EXEEXT) \
+       test-getopt-gnu$(EXEEXT) test-getopt-posix$(EXEEXT) \
+       test-getprogname$(EXEEXT) test-getrandom$(EXEEXT) \
+       test-gettimeofday$(EXEEXT) test-hard-locale$(EXEEXT) \
+       test-hash$(EXEEXT) test-iconv-h$(EXEEXT) test-iconv$(EXEEXT) \
        test-ignore-value$(EXEEXT) test-inet_pton$(EXEEXT) \
        test-intprops$(EXEEXT) test-inttostr$(EXEEXT) \
        test-inttypes$(EXEEXT) test-ioctl$(EXEEXT) \
        test-isblank$(EXEEXT) test-iswblank$(EXEEXT) \
+       test-iswdigit$(EXEEXT) test-iswxdigit$(EXEEXT) \
        test-langinfo$(EXEEXT) test-limits-h$(EXEEXT) \
        test-listen$(EXEEXT) test-locale$(EXEEXT) \
        test-localeconv$(EXEEXT) test-lstat$(EXEEXT) \
-       test-malloca$(EXEEXT) test-mbrtowc$(EXEEXT) \
-       test-mbrtowc-w32$(EXEEXT) test-mbscasecmp$(EXEEXT) \
-       test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \
-       test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \
-       test-mbsstr3$(EXEEXT) test-memchr$(EXEEXT) test-mkdir$(EXEEXT) \
+       test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \
+       test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \
+       test-mbscasecmp$(EXEEXT) test-mbsinit$(EXEEXT) \
+       test-mbsrtowcs$(EXEEXT) test-mbsstr1$(EXEEXT) \
+       test-mbsstr2$(EXEEXT) test-mbsstr3$(EXEEXT) \
+       test-memchr$(EXEEXT) test-mkdir$(EXEEXT) \
        test-nanosleep$(EXEEXT) test-netinet_in$(EXEEXT) \
-       test-nl_langinfo$(EXEEXT) test-nstrftime$(EXEEXT) \
-       test-open$(EXEEXT) test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
-       test-perror2$(EXEEXT) test-pipe$(EXEEXT) \
-       test-quotearg-simple$(EXEEXT) test-raise$(EXEEXT) \
-       test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
-       test-regex$(EXEEXT) test-select$(EXEEXT) \
+       test-nl_langinfo$(EXEEXT) test-nl_langinfo-mt$(EXEEXT) \
+       test-nstrftime$(EXEEXT) test-open$(EXEEXT) \
+       test-pathmax$(EXEEXT) test-perror$(EXEEXT) \
+       test-perror2$(EXEEXT) test-pipe$(EXEEXT) test-pthread$(EXEEXT) \
+       test-pthread-thread$(EXEEXT) test-pthread_sigmask1$(EXEEXT) \
+       test-pthread_sigmask2$(EXEEXT) test-quotearg-simple$(EXEEXT) \
+       test-raise$(EXEEXT) test-rawmemchr$(EXEEXT) \
+       test-readlink$(EXEEXT) test-realloc-gnu$(EXEEXT) \
+       test-reallocarray$(EXEEXT) test-regex$(EXEEXT) \
+       test-sched$(EXEEXT) test-select$(EXEEXT) \
        test-select-fd$(EXEEXT) test-select-stdin$(EXEEXT) \
-       test-setenv$(EXEEXT) test-setlocale1$(EXEEXT) \
-       test-setlocale2$(EXEEXT) test-setsockopt$(EXEEXT) \
+       test-setenv$(EXEEXT) test-setlocale_null$(EXEEXT) \
+       test-setlocale_null-mt-one$(EXEEXT) \
+       test-setlocale_null-mt-all$(EXEEXT) test-setsockopt$(EXEEXT) \
        test-sh-quote$(EXEEXT) test-sigaction$(EXEEXT) \
        test-signal-h$(EXEEXT) test-sigprocmask$(EXEEXT) \
-       test-sleep$(EXEEXT) test-snprintf$(EXEEXT) \
-       test-sockets$(EXEEXT) test-stat$(EXEEXT) \
-       test-stat-time$(EXEEXT) test-stdalign$(EXEEXT) \
-       test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
-       test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \
-       test-strerror$(EXEEXT) test-strerror_r$(EXEEXT) \
-       test-striconv$(EXEEXT) test-string$(EXEEXT) \
-       test-strings$(EXEEXT) test-strnlen$(EXEEXT) \
-       test-strtoull$(EXEEXT) test-strtoumax$(EXEEXT) \
-       test-symlink$(EXEEXT) test-sys_ioctl$(EXEEXT) \
+       test-sigsegv-catch-segv1$(EXEEXT) \
+       test-sigsegv-catch-segv2$(EXEEXT) \
+       test-sigsegv-catch-stackoverflow1$(EXEEXT) \
+       test-sigsegv-catch-stackoverflow2$(EXEEXT) test-sleep$(EXEEXT) \
+       test-snprintf$(EXEEXT) test-sockets$(EXEEXT) \
+       test-stat$(EXEEXT) test-stat-time$(EXEEXT) \
+       test-stdalign$(EXEEXT) test-stdbool$(EXEEXT) \
+       test-stddef$(EXEEXT) test-stdint$(EXEEXT) test-stdio$(EXEEXT) \
+       test-stdlib$(EXEEXT) test-strerror$(EXEEXT) \
+       test-strerror_r$(EXEEXT) test-striconv$(EXEEXT) \
+       test-string$(EXEEXT) test-strings$(EXEEXT) \
+       test-strnlen$(EXEEXT) test-strtoimax$(EXEEXT) \
+       test-strtoll$(EXEEXT) test-symlink$(EXEEXT) \
+       test-sys_ioctl$(EXEEXT) test-sys_random$(EXEEXT) \
        test-sys_select$(EXEEXT) test-sys_socket$(EXEEXT) \
        test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
        test-sys_types$(EXEEXT) test-sys_uio$(EXEEXT) \
-       test-sys_wait$(EXEEXT) test-time$(EXEEXT) \
+       test-sys_wait$(EXEEXT) test-thread_self$(EXEEXT) \
+       test-thread_create$(EXEEXT) test-time$(EXEEXT) \
        test-timespec$(EXEEXT) test-unistd$(EXEEXT) \
        test-u8-mbtoucr$(EXEEXT) test-u8-uctomb$(EXEEXT) \
        test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \
@@ -254,20 +287,22 @@ check_PROGRAMS = test-accept$(EXEEXT) test-alloca-opt$(EXEEXT) \
        test-version-etc$(EXEEXT) test-wchar$(EXEEXT) \
        test-wcrtomb$(EXEEXT) test-wcrtomb-w32$(EXEEXT) \
        test-wctype-h$(EXEEXT) test-wcwidth$(EXEEXT) \
-       test-xalloc-die$(EXEEXT) test-xstrtol$(EXEEXT) \
-       test-xstrtoul$(EXEEXT) test-xstrtoumax$(EXEEXT) \
-       test-xvasprintf$(EXEEXT)
+       test-xalloc-die$(EXEEXT) test-xstdopen$(EXEEXT) \
+       test-xstrtoimax$(EXEEXT) test-xstrtol$(EXEEXT) \
+       test-xstrtoul$(EXEEXT) test-xvasprintf$(EXEEXT)
 EXTRA_PROGRAMS = test-verify-try$(EXEEXT)
 subdir = gnulib-tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -277,13 +312,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -291,49 +327,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -341,30 +385,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
@@ -381,38 +428,51 @@ am__v_AR_0 = @echo "  AR      " $@;
 am__v_AR_1 = 
 libtests_a_AR = $(AR) $(ARFLAGS)
 am__DEPENDENCIES_1 =
+am__dirstamp = $(am__leading_dot)dirstamp
 am_libtests_a_OBJECTS = dtotimespec.$(OBJEXT) hash-pjw.$(OBJEXT) \
-       sockets.$(OBJEXT) sys_socket.$(OBJEXT) timespec-add.$(OBJEXT) \
-       timespec-sub.$(OBJEXT)
+       sig-handler.$(OBJEXT) sockets.$(OBJEXT) sys_socket.$(OBJEXT) \
+       glthread/thread.$(OBJEXT) timespec-add.$(OBJEXT) \
+       timespec-sub.$(OBJEXT) xstrtol-error.$(OBJEXT)
 libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
+am_current_locale_OBJECTS = locale.$(OBJEXT)
+current_locale_OBJECTS = $(am_current_locale_OBJECTS)
+current_locale_LDADD = $(LDADD)
+current_locale_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_accept_SOURCES = test-accept.c
 test_accept_OBJECTS = test-accept.$(OBJEXT)
 am__DEPENDENCIES_2 = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_accept_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_alloca_opt_SOURCES = test-alloca-opt.c
 test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
 test_alloca_opt_LDADD = $(LDADD)
 test_alloca_opt_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_areadlink_SOURCES = test-areadlink.c
 test_areadlink_OBJECTS = test-areadlink.$(OBJEXT)
 test_areadlink_LDADD = $(LDADD)
 test_areadlink_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_argmatch_SOURCES = test-argmatch.c
 test_argmatch_OBJECTS = test-argmatch.$(OBJEXT)
-test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_argmatch_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_arpa_inet_SOURCES = test-arpa_inet.c
 test_arpa_inet_OBJECTS = test-arpa_inet.$(OBJEXT)
 test_arpa_inet_LDADD = $(LDADD)
 test_arpa_inet_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_binary_io_SOURCES = test-binary-io.c
 test_binary_io_OBJECTS = test-binary-io.$(OBJEXT)
 test_binary_io_LDADD = $(LDADD)
 test_binary_io_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_bind_SOURCES = test-bind.c
 test_bind_OBJECTS = test-bind.$(OBJEXT)
 test_bind_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@@ -420,41 +480,41 @@ test_bitrotate_SOURCES = test-bitrotate.c
 test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT)
 test_bitrotate_LDADD = $(LDADD)
 test_bitrotate_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_btowc_SOURCES = test-btowc.c
 test_btowc_OBJECTS = test-btowc.$(OBJEXT)
-test_btowc_LDADD = $(LDADD)
-test_btowc_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+test_btowc_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_c_ctype_SOURCES = test-c-ctype.c
 test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT)
-test_c_ctype_LDADD = $(LDADD)
-test_c_ctype_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_c_ctype_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_c_stack_SOURCES = test-c-stack.c
 test_c_stack_OBJECTS = test-c-stack.$(OBJEXT)
 test_c_stack_DEPENDENCIES = $(am__DEPENDENCIES_2) \
        $(am__DEPENDENCIES_1)
 test_c_strcasecmp_SOURCES = test-c-strcasecmp.c
 test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT)
-test_c_strcasecmp_LDADD = $(LDADD)
-test_c_strcasecmp_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_c_strcasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_c_strncasecmp_SOURCES = test-c-strncasecmp.c
 test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT)
-test_c_strncasecmp_LDADD = $(LDADD)
-test_c_strncasecmp_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_c_strncasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_calloc_gnu_SOURCES = test-calloc-gnu.c
+test_calloc_gnu_OBJECTS = test-calloc-gnu.$(OBJEXT)
+test_calloc_gnu_LDADD = $(LDADD)
+test_calloc_gnu_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_cloexec_SOURCES = test-cloexec.c
 test_cloexec_OBJECTS = test-cloexec.$(OBJEXT)
 test_cloexec_LDADD = $(LDADD)
 test_cloexec_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_close_SOURCES = test-close.c
 test_close_OBJECTS = test-close.$(OBJEXT)
 test_close_LDADD = $(LDADD)
 test_close_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_connect_SOURCES = test-connect.c
 test_connect_OBJECTS = test-connect.$(OBJEXT)
 test_connect_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -463,7 +523,7 @@ test_ctype_SOURCES = test-ctype.c
 test_ctype_OBJECTS = test-ctype.$(OBJEXT)
 test_ctype_LDADD = $(LDADD)
 test_ctype_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_dirname_SOURCES = test-dirname.c
 test_dirname_OBJECTS = test-dirname.$(OBJEXT)
 test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -471,40 +531,49 @@ test_dup2_SOURCES = test-dup2.c
 test_dup2_OBJECTS = test-dup2.$(OBJEXT)
 test_dup2_LDADD = $(LDADD)
 test_dup2_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_dynarray_SOURCES = test-dynarray.c
+test_dynarray_OBJECTS = test-dynarray.$(OBJEXT)
+test_dynarray_LDADD = $(LDADD)
+test_dynarray_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
        $(am__DEPENDENCIES_1)
 test_environ_SOURCES = test-environ.c
 test_environ_OBJECTS = test-environ.$(OBJEXT)
 test_environ_LDADD = $(LDADD)
 test_environ_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_errno_SOURCES = test-errno.c
 test_errno_OBJECTS = test-errno.$(OBJEXT)
 test_errno_LDADD = $(LDADD)
 test_errno_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_exclude_SOURCES = test-exclude.c
 test_exclude_OBJECTS = test-exclude.$(OBJEXT)
-test_exclude_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_exclude_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 test_fcntl_SOURCES = test-fcntl.c
 test_fcntl_OBJECTS = test-fcntl.$(OBJEXT)
 test_fcntl_LDADD = $(LDADD)
 test_fcntl_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_fcntl_h_SOURCES = test-fcntl-h.c
 test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT)
 test_fcntl_h_LDADD = $(LDADD)
 test_fcntl_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_fdopen_SOURCES = test-fdopen.c
 test_fdopen_OBJECTS = test-fdopen.$(OBJEXT)
 test_fdopen_LDADD = $(LDADD)
 test_fdopen_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_fgetc_SOURCES = test-fgetc.c
 test_fgetc_OBJECTS = test-fgetc.$(OBJEXT)
 test_fgetc_LDADD = $(LDADD)
 test_fgetc_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_filenamecat_SOURCES = test-filenamecat.c
 test_filenamecat_OBJECTS = test-filenamecat.$(OBJEXT)
 test_filenamecat_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -512,52 +581,65 @@ test_float_SOURCES = test-float.c
 test_float_OBJECTS = test-float.$(OBJEXT)
 test_float_LDADD = $(LDADD)
 test_float_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_fnmatch_SOURCES = test-fnmatch.c
 test_fnmatch_OBJECTS = test-fnmatch.$(OBJEXT)
-test_fnmatch_LDADD = $(LDADD)
-test_fnmatch_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_fnmatch_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_fnmatch_h_SOURCES = test-fnmatch-h.c
 test_fnmatch_h_OBJECTS = test-fnmatch-h.$(OBJEXT)
 test_fnmatch_h_LDADD = $(LDADD)
 test_fnmatch_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_fopen_SOURCES = test-fopen.c
+test_fopen_OBJECTS = test-fopen.$(OBJEXT)
+test_fopen_LDADD = $(LDADD)
+test_fopen_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_fopen_gnu_SOURCES = test-fopen-gnu.c
+test_fopen_gnu_OBJECTS = test-fopen-gnu.$(OBJEXT)
+test_fopen_gnu_LDADD = $(LDADD)
+test_fopen_gnu_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_fputc_SOURCES = test-fputc.c
 test_fputc_OBJECTS = test-fputc.$(OBJEXT)
 test_fputc_LDADD = $(LDADD)
 test_fputc_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_fread_SOURCES = test-fread.c
 test_fread_OBJECTS = test-fread.$(OBJEXT)
 test_fread_LDADD = $(LDADD)
 test_fread_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_free_SOURCES = test-free.c
+test_free_OBJECTS = test-free.$(OBJEXT)
+test_free_LDADD = $(LDADD)
+test_free_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_freopen_SOURCES = test-freopen.c
 test_freopen_OBJECTS = test-freopen.$(OBJEXT)
 test_freopen_LDADD = $(LDADD)
 test_freopen_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
-test_freopen_safer_SOURCES = test-freopen-safer.c
-test_freopen_safer_OBJECTS = test-freopen-safer.$(OBJEXT)
-test_freopen_safer_LDADD = $(LDADD)
-test_freopen_safer_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_fstat_SOURCES = test-fstat.c
 test_fstat_OBJECTS = test-fstat.$(OBJEXT)
 test_fstat_LDADD = $(LDADD)
 test_fstat_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_ftruncate_SOURCES = test-ftruncate.c
 test_ftruncate_OBJECTS = test-ftruncate.$(OBJEXT)
 test_ftruncate_LDADD = $(LDADD)
 test_ftruncate_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_fwrite_SOURCES = test-fwrite.c
 test_fwrite_OBJECTS = test-fwrite.$(OBJEXT)
 test_fwrite_LDADD = $(LDADD)
 test_fwrite_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c
 test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT)
 test_getcwd_lgpl_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -566,7 +648,8 @@ test_getdtablesize_SOURCES = test-getdtablesize.c
 test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
 test_getdtablesize_LDADD = $(LDADD)
 test_getdtablesize_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_getopt_gnu_SOURCES = test-getopt-gnu.c
 test_getopt_gnu_OBJECTS = test-getopt-gnu.$(OBJEXT)
 test_getopt_gnu_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -578,16 +661,23 @@ test_getopt_posix_DEPENDENCIES = $(am__DEPENDENCIES_2) \
 test_getprogname_SOURCES = test-getprogname.c
 test_getprogname_OBJECTS = test-getprogname.$(OBJEXT)
 test_getprogname_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_getrandom_SOURCES = test-getrandom.c
+test_getrandom_OBJECTS = test-getrandom.$(OBJEXT)
+test_getrandom_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_gettimeofday_SOURCES = test-gettimeofday.c
 test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
 test_gettimeofday_LDADD = $(LDADD)
 test_gettimeofday_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_hard_locale_SOURCES = test-hard-locale.c
+test_hard_locale_OBJECTS = test-hard-locale.$(OBJEXT)
+test_hard_locale_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_hash_SOURCES = test-hash.c
 test_hash_OBJECTS = test-hash.$(OBJEXT)
 test_hash_LDADD = $(LDADD)
 test_hash_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_iconv_SOURCES = test-iconv.c
 test_iconv_OBJECTS = test-iconv.$(OBJEXT)
 test_iconv_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -595,12 +685,14 @@ test_iconv_h_SOURCES = test-iconv-h.c
 test_iconv_h_OBJECTS = test-iconv-h.$(OBJEXT)
 test_iconv_h_LDADD = $(LDADD)
 test_iconv_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_ignore_value_SOURCES = test-ignore-value.c
 test_ignore_value_OBJECTS = test-ignore-value.$(OBJEXT)
 test_ignore_value_LDADD = $(LDADD)
 test_ignore_value_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_inet_pton_SOURCES = test-inet_pton.c
 test_inet_pton_OBJECTS = test-inet_pton.$(OBJEXT)
 test_inet_pton_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -608,120 +700,135 @@ test_intprops_SOURCES = test-intprops.c
 test_intprops_OBJECTS = test-intprops.$(OBJEXT)
 test_intprops_LDADD = $(LDADD)
 test_intprops_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_inttostr_SOURCES = test-inttostr.c
 test_inttostr_OBJECTS = test-inttostr.$(OBJEXT)
 test_inttostr_LDADD = $(LDADD)
 test_inttostr_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_inttypes_SOURCES = test-inttypes.c
 test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
 test_inttypes_LDADD = $(LDADD)
 test_inttypes_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_ioctl_SOURCES = test-ioctl.c
 test_ioctl_OBJECTS = test-ioctl.$(OBJEXT)
 test_ioctl_LDADD = $(LDADD)
 test_ioctl_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_isblank_SOURCES = test-isblank.c
 test_isblank_OBJECTS = test-isblank.$(OBJEXT)
 test_isblank_LDADD = $(LDADD)
 test_isblank_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_iswblank_SOURCES = test-iswblank.c
 test_iswblank_OBJECTS = test-iswblank.$(OBJEXT)
 test_iswblank_LDADD = $(LDADD)
 test_iswblank_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_iswdigit_SOURCES = test-iswdigit.c
+test_iswdigit_OBJECTS = test-iswdigit.$(OBJEXT)
+test_iswdigit_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
+test_iswxdigit_SOURCES = test-iswxdigit.c
+test_iswxdigit_OBJECTS = test-iswxdigit.$(OBJEXT)
+test_iswxdigit_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_langinfo_SOURCES = test-langinfo.c
 test_langinfo_OBJECTS = test-langinfo.$(OBJEXT)
 test_langinfo_LDADD = $(LDADD)
 test_langinfo_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_limits_h_SOURCES = test-limits-h.c
 test_limits_h_OBJECTS = test-limits-h.$(OBJEXT)
 test_limits_h_LDADD = $(LDADD)
 test_limits_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_listen_SOURCES = test-listen.c
 test_listen_OBJECTS = test-listen.$(OBJEXT)
 test_listen_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_localcharset_SOURCES = test-localcharset.c
 test_localcharset_OBJECTS = test-localcharset.$(OBJEXT)
-test_localcharset_LDADD = $(LDADD)
-test_localcharset_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_localcharset_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_locale_SOURCES = test-locale.c
 test_locale_OBJECTS = test-locale.$(OBJEXT)
 test_locale_LDADD = $(LDADD)
 test_locale_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_localeconv_SOURCES = test-localeconv.c
 test_localeconv_OBJECTS = test-localeconv.$(OBJEXT)
 test_localeconv_LDADD = $(LDADD)
 test_localeconv_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_lstat_SOURCES = test-lstat.c
 test_lstat_OBJECTS = test-lstat.$(OBJEXT)
 test_lstat_LDADD = $(LDADD)
 test_lstat_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_malloc_gnu_SOURCES = test-malloc-gnu.c
+test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT)
+test_malloc_gnu_LDADD = $(LDADD)
+test_malloc_gnu_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
        $(am__DEPENDENCIES_1)
 test_malloca_SOURCES = test-malloca.c
 test_malloca_OBJECTS = test-malloca.$(OBJEXT)
 test_malloca_LDADD = $(LDADD)
 test_malloca_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_mbrtowc_SOURCES = test-mbrtowc.c
 test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT)
-test_mbrtowc_LDADD = $(LDADD)
-test_mbrtowc_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbrtowc_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c
 test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT)
 test_mbrtowc_w32_LDADD = $(LDADD)
 test_mbrtowc_w32_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_mbscasecmp_SOURCES = test-mbscasecmp.c
 test_mbscasecmp_OBJECTS = test-mbscasecmp.$(OBJEXT)
-test_mbscasecmp_LDADD = $(LDADD)
-test_mbscasecmp_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbscasecmp_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbsinit_SOURCES = test-mbsinit.c
 test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT)
-test_mbsinit_LDADD = $(LDADD)
-test_mbsinit_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbsinit_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbsrtowcs_SOURCES = test-mbsrtowcs.c
 test_mbsrtowcs_OBJECTS = test-mbsrtowcs.$(OBJEXT)
-test_mbsrtowcs_LDADD = $(LDADD)
-test_mbsrtowcs_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbsrtowcs_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbsstr1_SOURCES = test-mbsstr1.c
 test_mbsstr1_OBJECTS = test-mbsstr1.$(OBJEXT)
-test_mbsstr1_LDADD = $(LDADD)
-test_mbsstr1_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr1_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbsstr2_SOURCES = test-mbsstr2.c
 test_mbsstr2_OBJECTS = test-mbsstr2.$(OBJEXT)
-test_mbsstr2_LDADD = $(LDADD)
-test_mbsstr2_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr2_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_mbsstr3_SOURCES = test-mbsstr3.c
 test_mbsstr3_OBJECTS = test-mbsstr3.$(OBJEXT)
-test_mbsstr3_LDADD = $(LDADD)
-test_mbsstr3_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_mbsstr3_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_memchr_SOURCES = test-memchr.c
 test_memchr_OBJECTS = test-memchr.$(OBJEXT)
 test_memchr_LDADD = $(LDADD)
 test_memchr_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_mkdir_SOURCES = test-mkdir.c
 test_mkdir_OBJECTS = test-mkdir.$(OBJEXT)
 test_mkdir_LDADD = $(LDADD)
 test_mkdir_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_nanosleep_SOURCES = test-nanosleep.c
 test_nanosleep_OBJECTS = test-nanosleep.$(OBJEXT)
 test_nanosleep_DEPENDENCIES = $(am__DEPENDENCIES_2) \
@@ -730,63 +837,105 @@ test_netinet_in_SOURCES = test-netinet_in.c
 test_netinet_in_OBJECTS = test-netinet_in.$(OBJEXT)
 test_netinet_in_LDADD = $(LDADD)
 test_netinet_in_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_nl_langinfo_SOURCES = test-nl_langinfo.c
 test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT)
-test_nl_langinfo_LDADD = $(LDADD)
-test_nl_langinfo_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_nl_langinfo_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_nl_langinfo_mt_SOURCES = test-nl_langinfo-mt.c
+test_nl_langinfo_mt_OBJECTS = test-nl_langinfo-mt.$(OBJEXT)
+test_nl_langinfo_mt_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 test_nstrftime_SOURCES = test-nstrftime.c
 test_nstrftime_OBJECTS = test-nstrftime.$(OBJEXT)
 test_nstrftime_LDADD = $(LDADD)
 test_nstrftime_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_open_SOURCES = test-open.c
 test_open_OBJECTS = test-open.$(OBJEXT)
 test_open_LDADD = $(LDADD)
 test_open_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_pathmax_SOURCES = test-pathmax.c
 test_pathmax_OBJECTS = test-pathmax.$(OBJEXT)
 test_pathmax_LDADD = $(LDADD)
 test_pathmax_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_perror_SOURCES = test-perror.c
 test_perror_OBJECTS = test-perror.$(OBJEXT)
 test_perror_LDADD = $(LDADD)
 test_perror_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_perror2_SOURCES = test-perror2.c
 test_perror2_OBJECTS = test-perror2.$(OBJEXT)
 test_perror2_LDADD = $(LDADD)
 test_perror2_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_pipe_SOURCES = test-pipe.c
 test_pipe_OBJECTS = test-pipe.$(OBJEXT)
 test_pipe_LDADD = $(LDADD)
 test_pipe_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_pthread_SOURCES = test-pthread.c
+test_pthread_OBJECTS = test-pthread.$(OBJEXT)
+test_pthread_LDADD = $(LDADD)
+test_pthread_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
        $(am__DEPENDENCIES_1)
+test_pthread_thread_SOURCES = test-pthread-thread.c
+test_pthread_thread_OBJECTS = test-pthread-thread.$(OBJEXT)
+test_pthread_thread_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_pthread_sigmask1_SOURCES = test-pthread_sigmask1.c
+test_pthread_sigmask1_OBJECTS = test-pthread_sigmask1.$(OBJEXT)
+test_pthread_sigmask1_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_pthread_sigmask2_SOURCES = test-pthread_sigmask2.c
+test_pthread_sigmask2_OBJECTS = test-pthread_sigmask2.$(OBJEXT)
+test_pthread_sigmask2_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_quotearg_simple_SOURCES = test-quotearg-simple.c
 test_quotearg_simple_OBJECTS = test-quotearg-simple.$(OBJEXT)
-test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_quotearg_simple_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_raise_SOURCES = test-raise.c
 test_raise_OBJECTS = test-raise.$(OBJEXT)
 test_raise_LDADD = $(LDADD)
 test_raise_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_rawmemchr_SOURCES = test-rawmemchr.c
 test_rawmemchr_OBJECTS = test-rawmemchr.$(OBJEXT)
 test_rawmemchr_LDADD = $(LDADD)
 test_rawmemchr_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_readlink_SOURCES = test-readlink.c
 test_readlink_OBJECTS = test-readlink.$(OBJEXT)
 test_readlink_LDADD = $(LDADD)
 test_readlink_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_realloc_gnu_SOURCES = test-realloc-gnu.c
+test_realloc_gnu_OBJECTS = test-realloc-gnu.$(OBJEXT)
+test_realloc_gnu_LDADD = $(LDADD)
+test_realloc_gnu_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_reallocarray_SOURCES = test-reallocarray.c
+test_reallocarray_OBJECTS = test-reallocarray.$(OBJEXT)
+test_reallocarray_LDADD = $(LDADD)
+test_reallocarray_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_regex_SOURCES = test-regex.c
 test_regex_OBJECTS = test-regex.$(OBJEXT)
-test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_regex_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+test_sched_SOURCES = test-sched.c
+test_sched_OBJECTS = test-sched.$(OBJEXT)
+test_sched_LDADD = $(LDADD)
+test_sched_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_select_SOURCES = test-select.c
 test_select_OBJECTS = test-select.$(OBJEXT)
 test_select_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
@@ -800,48 +949,76 @@ test_setenv_SOURCES = test-setenv.c
 test_setenv_OBJECTS = test-setenv.$(OBJEXT)
 test_setenv_LDADD = $(LDADD)
 test_setenv_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
-test_setlocale1_SOURCES = test-setlocale1.c
-test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT)
-test_setlocale1_LDADD = $(LDADD)
-test_setlocale1_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
-test_setlocale2_SOURCES = test-setlocale2.c
-test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT)
-test_setlocale2_LDADD = $(LDADD)
-test_setlocale2_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
+test_setlocale_null_SOURCES = test-setlocale_null.c
+test_setlocale_null_OBJECTS = test-setlocale_null.$(OBJEXT)
+test_setlocale_null_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_setlocale_null_mt_all_SOURCES = test-setlocale_null-mt-all.c
+test_setlocale_null_mt_all_OBJECTS =  \
+       test-setlocale_null-mt-all.$(OBJEXT)
+test_setlocale_null_mt_all_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+test_setlocale_null_mt_one_SOURCES = test-setlocale_null-mt-one.c
+test_setlocale_null_mt_one_OBJECTS =  \
+       test-setlocale_null-mt-one.$(OBJEXT)
+test_setlocale_null_mt_one_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 test_setsockopt_SOURCES = test-setsockopt.c
 test_setsockopt_OBJECTS = test-setsockopt.$(OBJEXT)
 test_setsockopt_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_sh_quote_SOURCES = test-sh-quote.c
 test_sh_quote_OBJECTS = test-sh-quote.$(OBJEXT)
-test_sh_quote_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_sh_quote_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
 test_sigaction_SOURCES = test-sigaction.c
 test_sigaction_OBJECTS = test-sigaction.$(OBJEXT)
 test_sigaction_LDADD = $(LDADD)
 test_sigaction_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_signal_h_SOURCES = test-signal-h.c
 test_signal_h_OBJECTS = test-signal-h.$(OBJEXT)
 test_signal_h_LDADD = $(LDADD)
 test_signal_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sigprocmask_SOURCES = test-sigprocmask.c
 test_sigprocmask_OBJECTS = test-sigprocmask.$(OBJEXT)
 test_sigprocmask_LDADD = $(LDADD)
 test_sigprocmask_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_sigsegv_catch_segv1_SOURCES = test-sigsegv-catch-segv1.c
+test_sigsegv_catch_segv1_OBJECTS = test-sigsegv-catch-segv1.$(OBJEXT)
+test_sigsegv_catch_segv1_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
+test_sigsegv_catch_segv2_SOURCES = test-sigsegv-catch-segv2.c
+test_sigsegv_catch_segv2_OBJECTS = test-sigsegv-catch-segv2.$(OBJEXT)
+test_sigsegv_catch_segv2_DEPENDENCIES = $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_1)
+test_sigsegv_catch_stackoverflow1_SOURCES =  \
+       test-sigsegv-catch-stackoverflow1.c
+test_sigsegv_catch_stackoverflow1_OBJECTS =  \
+       test-sigsegv-catch-stackoverflow1.$(OBJEXT)
+test_sigsegv_catch_stackoverflow1_DEPENDENCIES =  \
+       $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
+test_sigsegv_catch_stackoverflow2_SOURCES =  \
+       test-sigsegv-catch-stackoverflow2.c
+test_sigsegv_catch_stackoverflow2_OBJECTS =  \
+       test-sigsegv-catch-stackoverflow2.$(OBJEXT)
+test_sigsegv_catch_stackoverflow2_DEPENDENCIES =  \
+       $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
 test_sleep_SOURCES = test-sleep.c
 test_sleep_OBJECTS = test-sleep.$(OBJEXT)
 test_sleep_LDADD = $(LDADD)
 test_sleep_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_snprintf_SOURCES = test-snprintf.c
 test_snprintf_OBJECTS = test-snprintf.$(OBJEXT)
 test_snprintf_LDADD = $(LDADD)
 test_snprintf_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sockets_SOURCES = test-sockets.c
 test_sockets_OBJECTS = test-sockets.$(OBJEXT)
 test_sockets_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -856,42 +1033,46 @@ test_stdalign_SOURCES = test-stdalign.c
 test_stdalign_OBJECTS = test-stdalign.$(OBJEXT)
 test_stdalign_LDADD = $(LDADD)
 test_stdalign_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_stdbool_SOURCES = test-stdbool.c
 test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
 test_stdbool_LDADD = $(LDADD)
 test_stdbool_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_stddef_SOURCES = test-stddef.c
 test_stddef_OBJECTS = test-stddef.$(OBJEXT)
 test_stddef_LDADD = $(LDADD)
 test_stddef_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_stdint_SOURCES = test-stdint.c
 test_stdint_OBJECTS = test-stdint.$(OBJEXT)
 test_stdint_LDADD = $(LDADD)
 test_stdint_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_stdio_SOURCES = test-stdio.c
 test_stdio_OBJECTS = test-stdio.$(OBJEXT)
 test_stdio_LDADD = $(LDADD)
 test_stdio_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_stdlib_SOURCES = test-stdlib.c
 test_stdlib_OBJECTS = test-stdlib.$(OBJEXT)
 test_stdlib_LDADD = $(LDADD)
 test_stdlib_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_strerror_SOURCES = test-strerror.c
 test_strerror_OBJECTS = test-strerror.$(OBJEXT)
 test_strerror_LDADD = $(LDADD)
 test_strerror_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_strerror_r_SOURCES = test-strerror_r.c
 test_strerror_r_OBJECTS = test-strerror_r.$(OBJEXT)
 test_strerror_r_LDADD = $(LDADD)
 test_strerror_r_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_striconv_SOURCES = test-striconv.c
 test_striconv_OBJECTS = test-striconv.$(OBJEXT)
 test_striconv_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -899,83 +1080,108 @@ test_string_SOURCES = test-string.c
 test_string_OBJECTS = test-string.$(OBJEXT)
 test_string_LDADD = $(LDADD)
 test_string_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_strings_SOURCES = test-strings.c
 test_strings_OBJECTS = test-strings.$(OBJEXT)
 test_strings_LDADD = $(LDADD)
 test_strings_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_strnlen_SOURCES = test-strnlen.c
 test_strnlen_OBJECTS = test-strnlen.$(OBJEXT)
 test_strnlen_LDADD = $(LDADD)
 test_strnlen_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
-test_strtoull_SOURCES = test-strtoull.c
-test_strtoull_OBJECTS = test-strtoull.$(OBJEXT)
-test_strtoull_LDADD = $(LDADD)
-test_strtoull_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
-test_strtoumax_SOURCES = test-strtoumax.c
-test_strtoumax_OBJECTS = test-strtoumax.$(OBJEXT)
-test_strtoumax_LDADD = $(LDADD)
-test_strtoumax_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_strtoimax_SOURCES = test-strtoimax.c
+test_strtoimax_OBJECTS = test-strtoimax.$(OBJEXT)
+test_strtoimax_LDADD = $(LDADD)
+test_strtoimax_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_strtoll_SOURCES = test-strtoll.c
+test_strtoll_OBJECTS = test-strtoll.$(OBJEXT)
+test_strtoll_LDADD = $(LDADD)
+test_strtoll_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_symlink_SOURCES = test-symlink.c
 test_symlink_OBJECTS = test-symlink.$(OBJEXT)
 test_symlink_LDADD = $(LDADD)
 test_symlink_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_ioctl_SOURCES = test-sys_ioctl.c
 test_sys_ioctl_OBJECTS = test-sys_ioctl.$(OBJEXT)
 test_sys_ioctl_LDADD = $(LDADD)
 test_sys_ioctl_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_sys_random_SOURCES = test-sys_random.c
+test_sys_random_OBJECTS = test-sys_random.$(OBJEXT)
+test_sys_random_LDADD = $(LDADD)
+test_sys_random_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_select_SOURCES = test-sys_select.c
 test_sys_select_OBJECTS = test-sys_select.$(OBJEXT)
 test_sys_select_LDADD = $(LDADD)
 test_sys_select_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_socket_SOURCES = test-sys_socket.c
 test_sys_socket_OBJECTS = test-sys_socket.$(OBJEXT)
 test_sys_socket_LDADD = $(LDADD)
 test_sys_socket_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_stat_SOURCES = test-sys_stat.c
 test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT)
 test_sys_stat_LDADD = $(LDADD)
 test_sys_stat_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_time_SOURCES = test-sys_time.c
 test_sys_time_OBJECTS = test-sys_time.$(OBJEXT)
 test_sys_time_LDADD = $(LDADD)
 test_sys_time_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_types_SOURCES = test-sys_types.c
 test_sys_types_OBJECTS = test-sys_types.$(OBJEXT)
 test_sys_types_LDADD = $(LDADD)
 test_sys_types_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_uio_SOURCES = test-sys_uio.c
 test_sys_uio_OBJECTS = test-sys_uio.$(OBJEXT)
 test_sys_uio_LDADD = $(LDADD)
 test_sys_uio_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_sys_wait_SOURCES = test-sys_wait.c
 test_sys_wait_OBJECTS = test-sys_wait.$(OBJEXT)
 test_sys_wait_LDADD = $(LDADD)
 test_sys_wait_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
+test_thread_create_SOURCES = test-thread_create.c
+test_thread_create_OBJECTS = test-thread_create.$(OBJEXT)
+test_thread_create_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_thread_self_SOURCES = test-thread_self.c
+test_thread_self_OBJECTS = test-thread_self.$(OBJEXT)
+test_thread_self_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_time_SOURCES = test-time.c
 test_time_OBJECTS = test-time.$(OBJEXT)
 test_time_LDADD = $(LDADD)
 test_time_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_timespec_SOURCES = test-timespec.c
 test_timespec_OBJECTS = test-timespec.$(OBJEXT)
 test_timespec_LDADD = $(LDADD)
 test_timespec_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
-am__dirstamp = $(am__leading_dot)dirstamp
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 am_test_u8_mbtoucr_OBJECTS = unistr/test-u8-mbtoucr.$(OBJEXT)
 test_u8_mbtoucr_OBJECTS = $(am_test_u8_mbtoucr_OBJECTS)
 test_u8_mbtoucr_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -992,32 +1198,36 @@ test_unistd_SOURCES = test-unistd.c
 test_unistd_OBJECTS = test-unistd.$(OBJEXT)
 test_unistd_LDADD = $(LDADD)
 test_unistd_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_unsetenv_SOURCES = test-unsetenv.c
 test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT)
 test_unsetenv_LDADD = $(LDADD)
 test_unsetenv_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_vasnprintf_SOURCES = test-vasnprintf.c
 test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT)
 test_vasnprintf_LDADD = $(LDADD)
 test_vasnprintf_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_vasprintf_SOURCES = test-vasprintf.c
 test_vasprintf_OBJECTS = test-vasprintf.$(OBJEXT)
 test_vasprintf_LDADD = $(LDADD)
 test_vasprintf_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_verify_SOURCES = test-verify.c
 test_verify_OBJECTS = test-verify.$(OBJEXT)
 test_verify_LDADD = $(LDADD)
 test_verify_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_verify_try_SOURCES = test-verify-try.c
 test_verify_try_OBJECTS = test-verify-try.$(OBJEXT)
 test_verify_try_LDADD = $(LDADD)
 test_verify_try_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_version_etc_SOURCES = test-version-etc.c
 test_version_etc_OBJECTS = test-version-etc.$(OBJEXT)
 test_version_etc_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1025,37 +1235,40 @@ test_wchar_SOURCES = test-wchar.c
 test_wchar_OBJECTS = test-wchar.$(OBJEXT)
 test_wchar_LDADD = $(LDADD)
 test_wchar_DEPENDENCIES = libtests.a ../lib/libdiffutils.a libtests.a \
-       $(am__DEPENDENCIES_1)
+       ../lib/libdiffutils.a libtests.a $(am__DEPENDENCIES_1)
 test_wcrtomb_SOURCES = test-wcrtomb.c
 test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT)
-test_wcrtomb_LDADD = $(LDADD)
-test_wcrtomb_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+test_wcrtomb_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c
 test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT)
 test_wcrtomb_w32_LDADD = $(LDADD)
 test_wcrtomb_w32_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_wctype_h_SOURCES = test-wctype-h.c
 test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT)
 test_wctype_h_LDADD = $(LDADD)
 test_wctype_h_DEPENDENCIES = libtests.a ../lib/libdiffutils.a \
-       libtests.a $(am__DEPENDENCIES_1)
+       libtests.a ../lib/libdiffutils.a libtests.a \
+       $(am__DEPENDENCIES_1)
 test_wcwidth_SOURCES = test-wcwidth.c
 test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT)
 test_wcwidth_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_xalloc_die_SOURCES = test-xalloc-die.c
 test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT)
 test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xstdopen_SOURCES = test-xstdopen.c
+test_xstdopen_OBJECTS = test-xstdopen.$(OBJEXT)
+test_xstdopen_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xstrtoimax_SOURCES = test-xstrtoimax.c
+test_xstrtoimax_OBJECTS = test-xstrtoimax.$(OBJEXT)
+test_xstrtoimax_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_xstrtol_SOURCES = test-xstrtol.c
 test_xstrtol_OBJECTS = test-xstrtol.$(OBJEXT)
 test_xstrtol_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_xstrtoul_SOURCES = test-xstrtoul.c
 test_xstrtoul_OBJECTS = test-xstrtoul.$(OBJEXT)
 test_xstrtoul_DEPENDENCIES = $(am__DEPENDENCIES_2)
-test_xstrtoumax_SOURCES = test-xstrtoumax.c
-test_xstrtoumax_OBJECTS = test-xstrtoumax.$(OBJEXT)
-test_xstrtoumax_DEPENDENCIES = $(am__DEPENDENCIES_2)
 test_xvasprintf_SOURCES = test-xvasprintf.c
 test_xvasprintf_OBJECTS = test-xvasprintf.$(OBJEXT)
 test_xvasprintf_DEPENDENCIES = $(am__DEPENDENCIES_2)
@@ -1074,16 +1287,19 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/bind.Po \
+am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/alloca.Po \
+       ./$(DEPDIR)/atoll.Po ./$(DEPDIR)/bind.Po \
        ./$(DEPDIR)/connect.Po ./$(DEPDIR)/dtotimespec.Po \
        ./$(DEPDIR)/fdopen.Po ./$(DEPDIR)/ftruncate.Po \
-       ./$(DEPDIR)/getcwd-lgpl.Po ./$(DEPDIR)/getpagesize.Po \
-       ./$(DEPDIR)/hash-pjw.Po ./$(DEPDIR)/inet_pton.Po \
-       ./$(DEPDIR)/ioctl.Po ./$(DEPDIR)/listen.Po \
+       ./$(DEPDIR)/getcwd-lgpl.Po ./$(DEPDIR)/hash-pjw.Po \
+       ./$(DEPDIR)/inet_pton.Po ./$(DEPDIR)/ioctl.Po \
+       ./$(DEPDIR)/listen.Po ./$(DEPDIR)/locale.Po \
        ./$(DEPDIR)/nanosleep.Po ./$(DEPDIR)/perror.Po \
-       ./$(DEPDIR)/pipe.Po ./$(DEPDIR)/putenv.Po \
-       ./$(DEPDIR)/select.Po ./$(DEPDIR)/setlocale.Po \
-       ./$(DEPDIR)/setsockopt.Po ./$(DEPDIR)/sleep.Po \
+       ./$(DEPDIR)/pipe.Po ./$(DEPDIR)/pthread-thread.Po \
+       ./$(DEPDIR)/pthread_sigmask.Po ./$(DEPDIR)/putenv.Po \
+       ./$(DEPDIR)/select.Po ./$(DEPDIR)/setsockopt.Po \
+       ./$(DEPDIR)/sig-handler.Po ./$(DEPDIR)/sigaction.Po \
+       ./$(DEPDIR)/sigprocmask.Po ./$(DEPDIR)/sleep.Po \
        ./$(DEPDIR)/snprintf.Po ./$(DEPDIR)/socket.Po \
        ./$(DEPDIR)/sockets.Po ./$(DEPDIR)/strerror_r.Po \
        ./$(DEPDIR)/symlink.Po ./$(DEPDIR)/sys_socket.Po \
@@ -1093,65 +1309,86 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/bind.Po \
        ./$(DEPDIR)/test-bind.Po ./$(DEPDIR)/test-bitrotate.Po \
        ./$(DEPDIR)/test-btowc.Po ./$(DEPDIR)/test-c-ctype.Po \
        ./$(DEPDIR)/test-c-stack.Po ./$(DEPDIR)/test-c-strcasecmp.Po \
-       ./$(DEPDIR)/test-c-strncasecmp.Po ./$(DEPDIR)/test-cloexec.Po \
+       ./$(DEPDIR)/test-c-strncasecmp.Po \
+       ./$(DEPDIR)/test-calloc-gnu.Po ./$(DEPDIR)/test-cloexec.Po \
        ./$(DEPDIR)/test-close.Po ./$(DEPDIR)/test-connect.Po \
        ./$(DEPDIR)/test-ctype.Po ./$(DEPDIR)/test-dirname.Po \
-       ./$(DEPDIR)/test-dup2.Po ./$(DEPDIR)/test-environ.Po \
-       ./$(DEPDIR)/test-errno.Po ./$(DEPDIR)/test-exclude.Po \
-       ./$(DEPDIR)/test-fcntl-h.Po ./$(DEPDIR)/test-fcntl.Po \
-       ./$(DEPDIR)/test-fdopen.Po ./$(DEPDIR)/test-fgetc.Po \
-       ./$(DEPDIR)/test-filenamecat.Po ./$(DEPDIR)/test-float.Po \
-       ./$(DEPDIR)/test-fnmatch-h.Po ./$(DEPDIR)/test-fnmatch.Po \
-       ./$(DEPDIR)/test-fputc.Po ./$(DEPDIR)/test-fread.Po \
-       ./$(DEPDIR)/test-freopen-safer.Po ./$(DEPDIR)/test-freopen.Po \
-       ./$(DEPDIR)/test-fstat.Po ./$(DEPDIR)/test-ftruncate.Po \
-       ./$(DEPDIR)/test-fwrite.Po ./$(DEPDIR)/test-getcwd-lgpl.Po \
+       ./$(DEPDIR)/test-dup2.Po ./$(DEPDIR)/test-dynarray.Po \
+       ./$(DEPDIR)/test-environ.Po ./$(DEPDIR)/test-errno.Po \
+       ./$(DEPDIR)/test-exclude.Po ./$(DEPDIR)/test-fcntl-h.Po \
+       ./$(DEPDIR)/test-fcntl.Po ./$(DEPDIR)/test-fdopen.Po \
+       ./$(DEPDIR)/test-fgetc.Po ./$(DEPDIR)/test-filenamecat.Po \
+       ./$(DEPDIR)/test-float.Po ./$(DEPDIR)/test-fnmatch-h.Po \
+       ./$(DEPDIR)/test-fnmatch.Po ./$(DEPDIR)/test-fopen-gnu.Po \
+       ./$(DEPDIR)/test-fopen.Po ./$(DEPDIR)/test-fputc.Po \
+       ./$(DEPDIR)/test-fread.Po ./$(DEPDIR)/test-free.Po \
+       ./$(DEPDIR)/test-freopen.Po ./$(DEPDIR)/test-fstat.Po \
+       ./$(DEPDIR)/test-ftruncate.Po ./$(DEPDIR)/test-fwrite.Po \
+       ./$(DEPDIR)/test-getcwd-lgpl.Po \
        ./$(DEPDIR)/test-getdtablesize.Po \
        ./$(DEPDIR)/test-getopt-gnu.Po \
        ./$(DEPDIR)/test-getopt-posix.Po \
-       ./$(DEPDIR)/test-getprogname.Po \
-       ./$(DEPDIR)/test-gettimeofday.Po ./$(DEPDIR)/test-hash.Po \
+       ./$(DEPDIR)/test-getprogname.Po ./$(DEPDIR)/test-getrandom.Po \
+       ./$(DEPDIR)/test-gettimeofday.Po \
+       ./$(DEPDIR)/test-hard-locale.Po ./$(DEPDIR)/test-hash.Po \
        ./$(DEPDIR)/test-iconv-h.Po ./$(DEPDIR)/test-iconv.Po \
        ./$(DEPDIR)/test-ignore-value.Po ./$(DEPDIR)/test-inet_pton.Po \
        ./$(DEPDIR)/test-intprops.Po ./$(DEPDIR)/test-inttostr.Po \
        ./$(DEPDIR)/test-inttypes.Po ./$(DEPDIR)/test-ioctl.Po \
        ./$(DEPDIR)/test-isblank.Po ./$(DEPDIR)/test-iswblank.Po \
+       ./$(DEPDIR)/test-iswdigit.Po ./$(DEPDIR)/test-iswxdigit.Po \
        ./$(DEPDIR)/test-langinfo.Po ./$(DEPDIR)/test-limits-h.Po \
        ./$(DEPDIR)/test-listen.Po ./$(DEPDIR)/test-localcharset.Po \
        ./$(DEPDIR)/test-locale.Po ./$(DEPDIR)/test-localeconv.Po \
-       ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloca.Po \
-       ./$(DEPDIR)/test-mbrtowc-w32.Po ./$(DEPDIR)/test-mbrtowc.Po \
-       ./$(DEPDIR)/test-mbscasecmp.Po ./$(DEPDIR)/test-mbsinit.Po \
-       ./$(DEPDIR)/test-mbsrtowcs.Po ./$(DEPDIR)/test-mbsstr1.Po \
-       ./$(DEPDIR)/test-mbsstr2.Po ./$(DEPDIR)/test-mbsstr3.Po \
-       ./$(DEPDIR)/test-memchr.Po ./$(DEPDIR)/test-mkdir.Po \
-       ./$(DEPDIR)/test-nanosleep.Po ./$(DEPDIR)/test-netinet_in.Po \
+       ./$(DEPDIR)/test-lstat.Po ./$(DEPDIR)/test-malloc-gnu.Po \
+       ./$(DEPDIR)/test-malloca.Po ./$(DEPDIR)/test-mbrtowc-w32.Po \
+       ./$(DEPDIR)/test-mbrtowc.Po ./$(DEPDIR)/test-mbscasecmp.Po \
+       ./$(DEPDIR)/test-mbsinit.Po ./$(DEPDIR)/test-mbsrtowcs.Po \
+       ./$(DEPDIR)/test-mbsstr1.Po ./$(DEPDIR)/test-mbsstr2.Po \
+       ./$(DEPDIR)/test-mbsstr3.Po ./$(DEPDIR)/test-memchr.Po \
+       ./$(DEPDIR)/test-mkdir.Po ./$(DEPDIR)/test-nanosleep.Po \
+       ./$(DEPDIR)/test-netinet_in.Po \
+       ./$(DEPDIR)/test-nl_langinfo-mt.Po \
        ./$(DEPDIR)/test-nl_langinfo.Po ./$(DEPDIR)/test-nstrftime.Po \
        ./$(DEPDIR)/test-open.Po ./$(DEPDIR)/test-pathmax.Po \
        ./$(DEPDIR)/test-perror.Po ./$(DEPDIR)/test-perror2.Po \
-       ./$(DEPDIR)/test-pipe.Po ./$(DEPDIR)/test-quotearg-simple.Po \
-       ./$(DEPDIR)/test-raise.Po ./$(DEPDIR)/test-rawmemchr.Po \
-       ./$(DEPDIR)/test-readlink.Po ./$(DEPDIR)/test-regex.Po \
-       ./$(DEPDIR)/test-select-fd.Po ./$(DEPDIR)/test-select-stdin.Po \
-       ./$(DEPDIR)/test-select.Po ./$(DEPDIR)/test-setenv.Po \
-       ./$(DEPDIR)/test-setlocale1.Po ./$(DEPDIR)/test-setlocale2.Po \
+       ./$(DEPDIR)/test-pipe.Po ./$(DEPDIR)/test-pthread-thread.Po \
+       ./$(DEPDIR)/test-pthread.Po \
+       ./$(DEPDIR)/test-pthread_sigmask1.Po \
+       ./$(DEPDIR)/test-pthread_sigmask2.Po \
+       ./$(DEPDIR)/test-quotearg-simple.Po ./$(DEPDIR)/test-raise.Po \
+       ./$(DEPDIR)/test-rawmemchr.Po ./$(DEPDIR)/test-readlink.Po \
+       ./$(DEPDIR)/test-realloc-gnu.Po \
+       ./$(DEPDIR)/test-reallocarray.Po ./$(DEPDIR)/test-regex.Po \
+       ./$(DEPDIR)/test-sched.Po ./$(DEPDIR)/test-select-fd.Po \
+       ./$(DEPDIR)/test-select-stdin.Po ./$(DEPDIR)/test-select.Po \
+       ./$(DEPDIR)/test-setenv.Po \
+       ./$(DEPDIR)/test-setlocale_null-mt-all.Po \
+       ./$(DEPDIR)/test-setlocale_null-mt-one.Po \
+       ./$(DEPDIR)/test-setlocale_null.Po \
        ./$(DEPDIR)/test-setsockopt.Po ./$(DEPDIR)/test-sh-quote.Po \
        ./$(DEPDIR)/test-sigaction.Po ./$(DEPDIR)/test-signal-h.Po \
-       ./$(DEPDIR)/test-sigprocmask.Po ./$(DEPDIR)/test-sleep.Po \
-       ./$(DEPDIR)/test-snprintf.Po ./$(DEPDIR)/test-sockets.Po \
-       ./$(DEPDIR)/test-stat-time.Po ./$(DEPDIR)/test-stat.Po \
-       ./$(DEPDIR)/test-stdalign.Po ./$(DEPDIR)/test-stdbool.Po \
-       ./$(DEPDIR)/test-stddef.Po ./$(DEPDIR)/test-stdint.Po \
-       ./$(DEPDIR)/test-stdio.Po ./$(DEPDIR)/test-stdlib.Po \
-       ./$(DEPDIR)/test-strerror.Po ./$(DEPDIR)/test-strerror_r.Po \
-       ./$(DEPDIR)/test-striconv.Po ./$(DEPDIR)/test-string.Po \
-       ./$(DEPDIR)/test-strings.Po ./$(DEPDIR)/test-strnlen.Po \
-       ./$(DEPDIR)/test-strtoull.Po ./$(DEPDIR)/test-strtoumax.Po \
-       ./$(DEPDIR)/test-symlink.Po ./$(DEPDIR)/test-sys_ioctl.Po \
+       ./$(DEPDIR)/test-sigprocmask.Po \
+       ./$(DEPDIR)/test-sigsegv-catch-segv1.Po \
+       ./$(DEPDIR)/test-sigsegv-catch-segv2.Po \
+       ./$(DEPDIR)/test-sigsegv-catch-stackoverflow1.Po \
+       ./$(DEPDIR)/test-sigsegv-catch-stackoverflow2.Po \
+       ./$(DEPDIR)/test-sleep.Po ./$(DEPDIR)/test-snprintf.Po \
+       ./$(DEPDIR)/test-sockets.Po ./$(DEPDIR)/test-stat-time.Po \
+       ./$(DEPDIR)/test-stat.Po ./$(DEPDIR)/test-stdalign.Po \
+       ./$(DEPDIR)/test-stdbool.Po ./$(DEPDIR)/test-stddef.Po \
+       ./$(DEPDIR)/test-stdint.Po ./$(DEPDIR)/test-stdio.Po \
+       ./$(DEPDIR)/test-stdlib.Po ./$(DEPDIR)/test-strerror.Po \
+       ./$(DEPDIR)/test-strerror_r.Po ./$(DEPDIR)/test-striconv.Po \
+       ./$(DEPDIR)/test-string.Po ./$(DEPDIR)/test-strings.Po \
+       ./$(DEPDIR)/test-strnlen.Po ./$(DEPDIR)/test-strtoimax.Po \
+       ./$(DEPDIR)/test-strtoll.Po ./$(DEPDIR)/test-symlink.Po \
+       ./$(DEPDIR)/test-sys_ioctl.Po ./$(DEPDIR)/test-sys_random.Po \
        ./$(DEPDIR)/test-sys_select.Po ./$(DEPDIR)/test-sys_socket.Po \
        ./$(DEPDIR)/test-sys_stat.Po ./$(DEPDIR)/test-sys_time.Po \
        ./$(DEPDIR)/test-sys_types.Po ./$(DEPDIR)/test-sys_uio.Po \
-       ./$(DEPDIR)/test-sys_wait.Po ./$(DEPDIR)/test-time.Po \
+       ./$(DEPDIR)/test-sys_wait.Po ./$(DEPDIR)/test-thread_create.Po \
+       ./$(DEPDIR)/test-thread_self.Po ./$(DEPDIR)/test-time.Po \
        ./$(DEPDIR)/test-timespec.Po ./$(DEPDIR)/test-unistd.Po \
        ./$(DEPDIR)/test-unsetenv.Po ./$(DEPDIR)/test-vasnprintf.Po \
        ./$(DEPDIR)/test-vasprintf.Po ./$(DEPDIR)/test-verify-try.Po \
@@ -1159,10 +1396,13 @@ am__depfiles_remade = ./$(DEPDIR)/accept.Po ./$(DEPDIR)/bind.Po \
        ./$(DEPDIR)/test-wchar.Po ./$(DEPDIR)/test-wcrtomb-w32.Po \
        ./$(DEPDIR)/test-wcrtomb.Po ./$(DEPDIR)/test-wctype-h.Po \
        ./$(DEPDIR)/test-wcwidth.Po ./$(DEPDIR)/test-xalloc-die.Po \
+       ./$(DEPDIR)/test-xstdopen.Po ./$(DEPDIR)/test-xstrtoimax.Po \
        ./$(DEPDIR)/test-xstrtol.Po ./$(DEPDIR)/test-xstrtoul.Po \
-       ./$(DEPDIR)/test-xstrtoumax.Po ./$(DEPDIR)/test-xvasprintf.Po \
-       ./$(DEPDIR)/timespec-add.Po ./$(DEPDIR)/timespec-sub.Po \
-       ./$(DEPDIR)/wctob.Po ./$(DEPDIR)/wctomb.Po \
+       ./$(DEPDIR)/test-xvasprintf.Po ./$(DEPDIR)/timespec-add.Po \
+       ./$(DEPDIR)/timespec-sub.Po ./$(DEPDIR)/wctob.Po \
+       ./$(DEPDIR)/wctomb.Po ./$(DEPDIR)/windows-thread.Po \
+       ./$(DEPDIR)/windows-tls.Po ./$(DEPDIR)/xstrtol-error.Po \
+       glthread/$(DEPDIR)/thread.Po \
        unistr/$(DEPDIR)/test-u8-mbtoucr.Po \
        unistr/$(DEPDIR)/test-u8-uctomb.Po \
        uniwidth/$(DEPDIR)/test-uc_width.Po \
@@ -1181,95 +1421,117 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
 SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
-       test-accept.c test-alloca-opt.c test-areadlink.c \
-       test-argmatch.c test-arpa_inet.c test-binary-io.c test-bind.c \
-       test-bitrotate.c test-btowc.c test-c-ctype.c test-c-stack.c \
-       test-c-strcasecmp.c test-c-strncasecmp.c test-cloexec.c \
+       $(current_locale_SOURCES) test-accept.c test-alloca-opt.c \
+       test-areadlink.c test-argmatch.c test-arpa_inet.c \
+       test-binary-io.c test-bind.c test-bitrotate.c test-btowc.c \
+       test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
+       test-c-strncasecmp.c test-calloc-gnu.c test-cloexec.c \
        test-close.c test-connect.c test-ctype.c test-dirname.c \
-       test-dup2.c test-environ.c test-errno.c test-exclude.c \
-       test-fcntl.c test-fcntl-h.c test-fdopen.c test-fgetc.c \
-       test-filenamecat.c test-float.c test-fnmatch.c \
-       test-fnmatch-h.c test-fputc.c test-fread.c test-freopen.c \
-       test-freopen-safer.c test-fstat.c test-ftruncate.c \
-       test-fwrite.c test-getcwd-lgpl.c test-getdtablesize.c \
-       test-getopt-gnu.c test-getopt-posix.c test-getprogname.c \
-       test-gettimeofday.c test-hash.c test-iconv.c test-iconv-h.c \
+       test-dup2.c test-dynarray.c test-environ.c test-errno.c \
+       test-exclude.c test-fcntl.c test-fcntl-h.c test-fdopen.c \
+       test-fgetc.c test-filenamecat.c test-float.c test-fnmatch.c \
+       test-fnmatch-h.c test-fopen.c test-fopen-gnu.c test-fputc.c \
+       test-fread.c test-free.c test-freopen.c test-fstat.c \
+       test-ftruncate.c test-fwrite.c test-getcwd-lgpl.c \
+       test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
+       test-getprogname.c test-getrandom.c test-gettimeofday.c \
+       test-hard-locale.c test-hash.c test-iconv.c test-iconv-h.c \
        test-ignore-value.c test-inet_pton.c test-intprops.c \
        test-inttostr.c test-inttypes.c test-ioctl.c test-isblank.c \
-       test-iswblank.c test-langinfo.c test-limits-h.c test-listen.c \
+       test-iswblank.c test-iswdigit.c test-iswxdigit.c \
+       test-langinfo.c test-limits-h.c test-listen.c \
        test-localcharset.c test-locale.c test-localeconv.c \
-       test-lstat.c test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
-       test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \
-       test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
-       test-mkdir.c test-nanosleep.c test-netinet_in.c \
-       test-nl_langinfo.c test-nstrftime.c test-open.c test-pathmax.c \
-       test-perror.c test-perror2.c test-pipe.c \
+       test-lstat.c test-malloc-gnu.c test-malloca.c test-mbrtowc.c \
+       test-mbrtowc-w32.c test-mbscasecmp.c test-mbsinit.c \
+       test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
+       test-memchr.c test-mkdir.c test-nanosleep.c test-netinet_in.c \
+       test-nl_langinfo.c test-nl_langinfo-mt.c test-nstrftime.c \
+       test-open.c test-pathmax.c test-perror.c test-perror2.c \
+       test-pipe.c test-pthread.c test-pthread-thread.c \
+       test-pthread_sigmask1.c test-pthread_sigmask2.c \
        test-quotearg-simple.c test-raise.c test-rawmemchr.c \
-       test-readlink.c test-regex.c test-select.c test-select-fd.c \
-       test-select-stdin.c test-setenv.c test-setlocale1.c \
-       test-setlocale2.c test-setsockopt.c test-sh-quote.c \
-       test-sigaction.c test-signal-h.c test-sigprocmask.c \
-       test-sleep.c test-snprintf.c test-sockets.c test-stat.c \
-       test-stat-time.c test-stdalign.c test-stdbool.c test-stddef.c \
-       test-stdint.c test-stdio.c test-stdlib.c test-strerror.c \
-       test-strerror_r.c test-striconv.c test-string.c test-strings.c \
-       test-strnlen.c test-strtoull.c test-strtoumax.c test-symlink.c \
-       test-sys_ioctl.c test-sys_select.c test-sys_socket.c \
-       test-sys_stat.c test-sys_time.c test-sys_types.c \
-       test-sys_uio.c test-sys_wait.c test-time.c test-timespec.c \
-       $(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
-       $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
-       test-unistd.c test-unsetenv.c test-vasnprintf.c \
-       test-vasprintf.c test-verify.c test-verify-try.c \
-       test-version-etc.c test-wchar.c test-wcrtomb.c \
-       test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
-       test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
-       test-xstrtoumax.c test-xvasprintf.c
+       test-readlink.c test-realloc-gnu.c test-reallocarray.c \
+       test-regex.c test-sched.c test-select.c test-select-fd.c \
+       test-select-stdin.c test-setenv.c test-setlocale_null.c \
+       test-setlocale_null-mt-all.c test-setlocale_null-mt-one.c \
+       test-setsockopt.c test-sh-quote.c test-sigaction.c \
+       test-signal-h.c test-sigprocmask.c test-sigsegv-catch-segv1.c \
+       test-sigsegv-catch-segv2.c test-sigsegv-catch-stackoverflow1.c \
+       test-sigsegv-catch-stackoverflow2.c test-sleep.c \
+       test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \
+       test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+       test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
+       test-striconv.c test-string.c test-strings.c test-strnlen.c \
+       test-strtoimax.c test-strtoll.c test-symlink.c \
+       test-sys_ioctl.c test-sys_random.c test-sys_select.c \
+       test-sys_socket.c test-sys_stat.c test-sys_time.c \
+       test-sys_types.c test-sys_uio.c test-sys_wait.c \
+       test-thread_create.c test-thread_self.c test-time.c \
+       test-timespec.c $(test_u8_mbtoucr_SOURCES) \
+       $(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \
+       $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \
+       test-vasnprintf.c test-vasprintf.c test-verify.c \
+       test-verify-try.c test-version-etc.c test-wchar.c \
+       test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
+       test-wcwidth.c test-xalloc-die.c test-xstdopen.c \
+       test-xstrtoimax.c test-xstrtol.c test-xstrtoul.c \
+       test-xvasprintf.c
 DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
-       test-accept.c test-alloca-opt.c test-areadlink.c \
-       test-argmatch.c test-arpa_inet.c test-binary-io.c test-bind.c \
-       test-bitrotate.c test-btowc.c test-c-ctype.c test-c-stack.c \
-       test-c-strcasecmp.c test-c-strncasecmp.c test-cloexec.c \
+       $(current_locale_SOURCES) test-accept.c test-alloca-opt.c \
+       test-areadlink.c test-argmatch.c test-arpa_inet.c \
+       test-binary-io.c test-bind.c test-bitrotate.c test-btowc.c \
+       test-c-ctype.c test-c-stack.c test-c-strcasecmp.c \
+       test-c-strncasecmp.c test-calloc-gnu.c test-cloexec.c \
        test-close.c test-connect.c test-ctype.c test-dirname.c \
-       test-dup2.c test-environ.c test-errno.c test-exclude.c \
-       test-fcntl.c test-fcntl-h.c test-fdopen.c test-fgetc.c \
-       test-filenamecat.c test-float.c test-fnmatch.c \
-       test-fnmatch-h.c test-fputc.c test-fread.c test-freopen.c \
-       test-freopen-safer.c test-fstat.c test-ftruncate.c \
-       test-fwrite.c test-getcwd-lgpl.c test-getdtablesize.c \
-       test-getopt-gnu.c test-getopt-posix.c test-getprogname.c \
-       test-gettimeofday.c test-hash.c test-iconv.c test-iconv-h.c \
+       test-dup2.c test-dynarray.c test-environ.c test-errno.c \
+       test-exclude.c test-fcntl.c test-fcntl-h.c test-fdopen.c \
+       test-fgetc.c test-filenamecat.c test-float.c test-fnmatch.c \
+       test-fnmatch-h.c test-fopen.c test-fopen-gnu.c test-fputc.c \
+       test-fread.c test-free.c test-freopen.c test-fstat.c \
+       test-ftruncate.c test-fwrite.c test-getcwd-lgpl.c \
+       test-getdtablesize.c test-getopt-gnu.c test-getopt-posix.c \
+       test-getprogname.c test-getrandom.c test-gettimeofday.c \
+       test-hard-locale.c test-hash.c test-iconv.c test-iconv-h.c \
        test-ignore-value.c test-inet_pton.c test-intprops.c \
        test-inttostr.c test-inttypes.c test-ioctl.c test-isblank.c \
-       test-iswblank.c test-langinfo.c test-limits-h.c test-listen.c \
+       test-iswblank.c test-iswdigit.c test-iswxdigit.c \
+       test-langinfo.c test-limits-h.c test-listen.c \
        test-localcharset.c test-locale.c test-localeconv.c \
-       test-lstat.c test-malloca.c test-mbrtowc.c test-mbrtowc-w32.c \
-       test-mbscasecmp.c test-mbsinit.c test-mbsrtowcs.c \
-       test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
-       test-mkdir.c test-nanosleep.c test-netinet_in.c \
-       test-nl_langinfo.c test-nstrftime.c test-open.c test-pathmax.c \
-       test-perror.c test-perror2.c test-pipe.c \
+       test-lstat.c test-malloc-gnu.c test-malloca.c test-mbrtowc.c \
+       test-mbrtowc-w32.c test-mbscasecmp.c test-mbsinit.c \
+       test-mbsrtowcs.c test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c \
+       test-memchr.c test-mkdir.c test-nanosleep.c test-netinet_in.c \
+       test-nl_langinfo.c test-nl_langinfo-mt.c test-nstrftime.c \
+       test-open.c test-pathmax.c test-perror.c test-perror2.c \
+       test-pipe.c test-pthread.c test-pthread-thread.c \
+       test-pthread_sigmask1.c test-pthread_sigmask2.c \
        test-quotearg-simple.c test-raise.c test-rawmemchr.c \
-       test-readlink.c test-regex.c test-select.c test-select-fd.c \
-       test-select-stdin.c test-setenv.c test-setlocale1.c \
-       test-setlocale2.c test-setsockopt.c test-sh-quote.c \
-       test-sigaction.c test-signal-h.c test-sigprocmask.c \
-       test-sleep.c test-snprintf.c test-sockets.c test-stat.c \
-       test-stat-time.c test-stdalign.c test-stdbool.c test-stddef.c \
-       test-stdint.c test-stdio.c test-stdlib.c test-strerror.c \
-       test-strerror_r.c test-striconv.c test-string.c test-strings.c \
-       test-strnlen.c test-strtoull.c test-strtoumax.c test-symlink.c \
-       test-sys_ioctl.c test-sys_select.c test-sys_socket.c \
-       test-sys_stat.c test-sys_time.c test-sys_types.c \
-       test-sys_uio.c test-sys_wait.c test-time.c test-timespec.c \
-       $(test_u8_mbtoucr_SOURCES) $(test_u8_uctomb_SOURCES) \
-       $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
-       test-unistd.c test-unsetenv.c test-vasnprintf.c \
-       test-vasprintf.c test-verify.c test-verify-try.c \
-       test-version-etc.c test-wchar.c test-wcrtomb.c \
-       test-wcrtomb-w32.c test-wctype-h.c test-wcwidth.c \
-       test-xalloc-die.c test-xstrtol.c test-xstrtoul.c \
-       test-xstrtoumax.c test-xvasprintf.c
+       test-readlink.c test-realloc-gnu.c test-reallocarray.c \
+       test-regex.c test-sched.c test-select.c test-select-fd.c \
+       test-select-stdin.c test-setenv.c test-setlocale_null.c \
+       test-setlocale_null-mt-all.c test-setlocale_null-mt-one.c \
+       test-setsockopt.c test-sh-quote.c test-sigaction.c \
+       test-signal-h.c test-sigprocmask.c test-sigsegv-catch-segv1.c \
+       test-sigsegv-catch-segv2.c test-sigsegv-catch-stackoverflow1.c \
+       test-sigsegv-catch-stackoverflow2.c test-sleep.c \
+       test-snprintf.c test-sockets.c test-stat.c test-stat-time.c \
+       test-stdalign.c test-stdbool.c test-stddef.c test-stdint.c \
+       test-stdio.c test-stdlib.c test-strerror.c test-strerror_r.c \
+       test-striconv.c test-string.c test-strings.c test-strnlen.c \
+       test-strtoimax.c test-strtoll.c test-symlink.c \
+       test-sys_ioctl.c test-sys_random.c test-sys_select.c \
+       test-sys_socket.c test-sys_stat.c test-sys_time.c \
+       test-sys_types.c test-sys_uio.c test-sys_wait.c \
+       test-thread_create.c test-thread_self.c test-time.c \
+       test-timespec.c $(test_u8_mbtoucr_SOURCES) \
+       $(test_u8_uctomb_SOURCES) $(test_uc_width_SOURCES) \
+       $(test_uc_width2_SOURCES) test-unistd.c test-unsetenv.c \
+       test-vasnprintf.c test-vasprintf.c test-verify.c \
+       test-verify-try.c test-version-etc.c test-wchar.c \
+       test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c \
+       test-wcwidth.c test-xalloc-die.c test-xstdopen.c \
+       test-xstrtoimax.c test-xstrtol.c test-xstrtoul.c \
+       test-xvasprintf.c
 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
        ctags-recursive dvi-recursive html-recursive info-recursive \
        install-data-recursive install-dvi-recursive \
@@ -1309,8 +1571,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__tty_colors_dummy = \
   mgn= red= grn= lgn= blu= brg= std=; \
   am__color_tests=no
@@ -1493,6 +1753,7 @@ am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
   bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
 RECHECK_LOGS = $(TEST_LOGS)
 TEST_SUITE_LOG = test-suite.log
 TEST_EXTENSIONS = @EXEEXT@ .test
@@ -1517,7 +1778,7 @@ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
 DIST_SUBDIRS = $(SUBDIRS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gnulib.mk \
        $(top_srcdir)/build-aux/depcomp \
-       $(top_srcdir)/build-aux/test-driver
+       $(top_srcdir)/build-aux/test-driver alloca.c
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -1563,10 +1824,13 @@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
 BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
+CFLAGS = @GL_CFLAG_ALLOW_WARNINGS@ @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@ -DEXEEXT=\"@EXEEXT@\"
 DEPDIR = @DEPDIR@
@@ -1581,321 +1845,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -1930,13 +2284,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -1958,17 +2313,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -1984,7 +2343,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -1993,7 +2351,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -2016,11 +2374,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -2037,10 +2454,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -2054,14 +2476,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -2075,23 +2502,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -2130,12 +2558,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -2156,20 +2587,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -2178,8 +2623,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -2200,6 +2647,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -2209,6 +2658,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -2232,6 +2682,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -2241,6 +2693,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -2265,31 +2718,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -2309,6 +2774,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -2316,10 +2782,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -2341,7 +2810,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -2353,29 +2824,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -2387,6 +2914,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -2397,6 +2925,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -2423,6 +2956,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -2431,6 +2965,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -2444,10 +2979,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -2527,6 +3064,10 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
        LIBSIGSEGV='@LIBSIGSEGV@' LOCALE_FR='@LOCALE_FR@' \
        LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
        LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
+       LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
        LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
        LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \
        LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
@@ -2534,9 +3075,7 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
        LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
        LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
        LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
-       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
-       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \
-       LOCALE_ZH_CN='@LOCALE_ZH_CN@' abs_aux_dir='$(abs_aux_dir)' \
+       LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' abs_aux_dir='$(abs_aux_dir)' \
        abs_aux_dir='$(abs_aux_dir)' MAKE='$(MAKE)' \
        LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
        LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
@@ -2544,93 +3083,108 @@ noinst_HEADERS =
 noinst_LIBRARIES = 
 check_LIBRARIES = libtests.a
 EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
-       test-alloca-opt.c test-areadlink.h test-areadlink.c macros.h \
-       test-argmatch.c macros.h arpa_inet.in.h test-arpa_inet.c \
-       test-binary-io.sh test-binary-io.c macros.h bind.c w32sock.h \
-       test-bind.c signature.h macros.h test-bitrotate.c macros.h \
-       test-btowc1.sh test-btowc2.sh test-btowc.c signature.h \
-       macros.h test-c-ctype.c macros.h test-c-stack.c \
-       test-c-stack.sh test-c-stack2.sh macros.h test-c-strcase.sh \
-       test-c-strcasecmp.c test-c-strncasecmp.c macros.h \
-       test-cloexec.c macros.h test-close.c signature.h macros.h \
-       connect.c w32sock.h test-connect.c signature.h macros.h \
-       test-ctype.c test-dirname.c test-dup2.c signature.h macros.h \
-       test-environ.c test-errno.c test-exclude.c test-exclude1.sh \
-       test-exclude2.sh test-exclude3.sh test-exclude4.sh \
-       test-exclude5.sh test-exclude6.sh test-exclude7.sh \
-       test-exclude8.sh test-fcntl-h.c test-fcntl.c signature.h \
-       macros.h fdopen.c test-fdopen.c signature.h macros.h \
-       test-fgetc.c signature.h macros.h test-filenamecat.c \
-       test-float.c macros.h test-fnmatch-h.c test-fnmatch.c \
+       alloca.c test-alloca-opt.c test-areadlink.h test-areadlink.c \
+       macros.h test-argmatch.c macros.h arpa_inet.in.h \
+       test-arpa_inet.c atoll.c test-binary-io.sh test-binary-io.c \
+       macros.h bind.c w32sock.h test-bind.c signature.h macros.h \
+       test-bitrotate.c macros.h test-btowc1.sh test-btowc2.sh \
+       test-btowc.c signature.h macros.h test-c-ctype.c macros.h \
+       test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h \
+       test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c \
+       macros.h test-calloc-gnu.c macros.h test-cloexec.c macros.h \
+       test-close.c signature.h macros.h connect.c w32sock.h \
+       test-connect.c signature.h macros.h test-ctype.c \
+       test-dirname.c test-dup2.c signature.h macros.h \
+       test-dynarray.c macros.h test-environ.c test-errno.c \
+       test-exclude.c test-exclude1.sh test-exclude2.sh \
+       test-exclude3.sh test-exclude4.sh test-exclude5.sh \
+       test-exclude6.sh test-exclude7.sh test-exclude8.sh \
+       test-fcntl-h.c test-fcntl.c signature.h macros.h fdopen.c \
+       test-fdopen.c signature.h macros.h test-fgetc.c signature.h \
+       macros.h test-filenamecat.c test-float.c macros.h \
+       test-fnmatch-h.c test-fnmatch.c signature.h macros.h \
+       test-fopen-gnu.c macros.h test-fopen.h test-fopen.c \
        signature.h macros.h fpucw.h test-fputc.c signature.h macros.h \
-       test-fread.c signature.h macros.h test-freopen-safer.c \
-       macros.h test-freopen.c signature.h macros.h test-fstat.c \
-       signature.h macros.h ftruncate.c test-ftruncate.c \
-       test-ftruncate.sh signature.h macros.h test-fwrite.c \
-       signature.h macros.h getcwd-lgpl.c test-getcwd-lgpl.c \
-       signature.h macros.h test-getdtablesize.c signature.h macros.h \
-       macros.h signature.h test-getopt-gnu.c test-getopt-main.h \
-       test-getopt.h test-getopt_long.h macros.h signature.h \
-       test-getopt-posix.c test-getopt-main.h test-getopt.h \
-       getpagesize.c test-getprogname.c signature.h \
-       test-gettimeofday.c test-hash.c macros.h test-iconv-h.c \
-       test-iconv.c signature.h macros.h test-ignore-value.c \
-       inet_pton.c test-inet_pton.c signature.h macros.h \
-       test-intprops.c macros.h macros.h test-inttostr.c \
+       test-fread.c signature.h macros.h test-free.c macros.h \
+       test-freopen.c signature.h macros.h test-fstat.c signature.h \
+       macros.h ftruncate.c test-ftruncate.c test-ftruncate.sh \
+       signature.h macros.h test-fwrite.c signature.h macros.h \
+       getcwd-lgpl.c test-getcwd-lgpl.c signature.h macros.h \
+       test-getdtablesize.c signature.h macros.h macros.h signature.h \
+       test-getopt-gnu.c test-getopt-main.h test-getopt.h \
+       test-getopt_long.h macros.h signature.h test-getopt-posix.c \
+       test-getopt-main.h test-getopt.h test-getprogname.c \
+       test-getrandom.c signature.h macros.h signature.h \
+       test-gettimeofday.c test-hard-locale.c locale.c test-hash.c \
+       macros.h test-iconv-h.c test-iconv.c signature.h macros.h \
+       test-ignore-value.c inet_pton.c test-inet_pton.c signature.h \
+       macros.h test-intprops.c macros.h macros.h test-inttostr.c \
        test-inttypes.c ioctl.c w32sock.h test-ioctl.c signature.h \
        macros.h test-isblank.c signature.h macros.h test-iswblank.c \
-       macros.h test-langinfo.c test-limits-h.c listen.c w32sock.h \
+       macros.h test-iswdigit.sh test-iswdigit.c signature.h macros.h \
+       test-iswxdigit.sh test-iswxdigit.c signature.h macros.h \
+       test-langinfo.c test-limits-h.c listen.c w32sock.h \
        test-listen.c signature.h macros.h test-localcharset.c \
        test-locale.c test-localeconv.c signature.h macros.h \
-       test-lstat.h test-lstat.c signature.h macros.h test-malloca.c \
-       test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
-       test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c \
-       test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \
-       test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \
-       test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \
-       test-mbscasecmp.sh test-mbscasecmp.c macros.h test-mbsinit.sh \
-       test-mbsinit.c signature.h macros.h test-mbsrtowcs1.sh \
-       test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \
-       test-mbsrtowcs.c signature.h macros.h test-mbsstr1.c \
-       test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c \
-       macros.h test-memchr.c zerosize-ptr.h signature.h macros.h \
-       test-mkdir.h test-mkdir.c signature.h macros.h nanosleep.c \
-       test-nanosleep.c signature.h macros.h netinet_in.in.h \
-       test-netinet_in.c test-nl_langinfo.sh test-nl_langinfo.c \
-       signature.h macros.h test-nstrftime.c macros.h test-open.h \
-       test-open.c signature.h macros.h test-pathmax.c perror.c \
-       macros.h signature.h test-perror.c test-perror2.c \
-       test-perror.sh pipe.c test-pipe.c signature.h macros.h \
-       putenv.c test-quotearg-simple.c test-quotearg.h macros.h \
-       zerosize-ptr.h test-raise.c signature.h macros.h \
-       test-rawmemchr.c zerosize-ptr.h signature.h macros.h \
-       test-readlink.h test-readlink.c signature.h macros.h \
-       test-regex.c macros.h same-inode.h select.c macros.h \
-       signature.h test-select.c test-select.h test-select-fd.c \
-       test-select-in.sh test-select-out.sh test-select-stdin.c \
-       test-setenv.c signature.h macros.h setlocale.c \
-       test-setlocale1.sh test-setlocale1.c test-setlocale2.sh \
-       test-setlocale2.c signature.h macros.h setsockopt.c w32sock.h \
+       test-lstat.h test-lstat.c signature.h macros.h \
+       test-malloc-gnu.c macros.h test-malloca.c test-mbrtowc1.sh \
+       test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+       test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh \
+       test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
+       test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh \
+       test-mbrtowc-w32-6.sh test-mbrtowc-w32-7.sh test-mbrtowc-w32.c \
+       signature.h macros.h test-mbscasecmp.sh test-mbscasecmp.c \
+       macros.h test-mbsinit.sh test-mbsinit.c signature.h macros.h \
+       test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \
+       test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \
+       test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh \
+       test-mbsstr3.c macros.h test-memchr.c zerosize-ptr.h \
+       signature.h macros.h test-mkdir.h test-mkdir.c signature.h \
+       macros.h nanosleep.c test-nanosleep.c signature.h macros.h \
+       netinet_in.in.h test-netinet_in.c test-nl_langinfo.sh \
+       test-nl_langinfo.c test-nl_langinfo-mt.c signature.h macros.h \
+       test-nstrftime.c macros.h test-open.h test-open.c signature.h \
+       macros.h test-pathmax.c perror.c macros.h signature.h \
+       test-perror.c test-perror2.c test-perror.sh pipe.c test-pipe.c \
+       signature.h macros.h pthread.in.h test-pthread.c \
+       pthread-thread.c test-pthread-thread.c macros.h \
+       pthread_sigmask.c test-pthread_sigmask1.c \
+       test-pthread_sigmask2.c signature.h macros.h putenv.c \
+       test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h \
+       test-raise.c signature.h macros.h test-rawmemchr.c \
+       zerosize-ptr.h signature.h macros.h test-readlink.h \
+       test-readlink.c signature.h macros.h test-realloc-gnu.c \
+       macros.h test-reallocarray.c signature.h macros.h test-regex.c \
+       macros.h same-inode.h sched.in.h test-sched.c select.c \
+       macros.h signature.h test-select.c test-select.h \
+       test-select-fd.c test-select-in.sh test-select-out.sh \
+       test-select-stdin.c test-setenv.c signature.h macros.h \
+       test-setlocale_null.c test-setlocale_null-mt-one.c \
+       test-setlocale_null-mt-all.c setsockopt.c w32sock.h \
        test-setsockopt.c signature.h macros.h test-sh-quote.c \
-       test-sigaction.c signature.h macros.h test-signal-h.c \
-       test-sigprocmask.c signature.h macros.h sleep.c test-sleep.c \
-       signature.h macros.h _Noreturn.h arg-nonnull.h c++defs.h \
-       unused-parameter.h warn-on-use.h snprintf.c test-snprintf.c \
-       signature.h macros.h socket.c w32sock.h w32sock.h \
-       test-sockets.c test-stat.h test-stat.c signature.h macros.h \
-       test-stat-time.c macros.h nap.h stdalign.in.h test-stdalign.c \
+       sig-handler.h sigaction.c test-sigaction.c signature.h \
+       macros.h test-signal-h.c sigprocmask.c test-sigprocmask.c \
+       signature.h macros.h test-sigsegv-catch-segv1.c \
+       test-sigsegv-catch-segv2.c test-sigsegv-catch-stackoverflow1.c \
+       test-sigsegv-catch-stackoverflow2.c altstack-util.h \
+       mmap-anon-util.h sleep.c test-sleep.c signature.h macros.h \
+       _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h snprintf.c \
+       test-snprintf.c signature.h macros.h socket.c w32sock.h \
+       w32sock.h test-sockets.c test-stat.h test-stat.c signature.h \
+       macros.h test-stat-time.c macros.h nap.h test-stdalign.c \
        macros.h test-stdbool.c test-stddef.c test-stdint.c \
        test-stdio.c test-stdlib.c test-sys_wait.h test-strerror.c \
        signature.h macros.h strerror_r.c test-strerror_r.c \
        signature.h macros.h test-striconv.c macros.h test-string.c \
        test-strings.c test-strnlen.c zerosize-ptr.h signature.h \
-       macros.h test-strtoull.c signature.h macros.h test-strtoumax.c \
+       macros.h test-strtoimax.c signature.h macros.h test-strtoll.c \
        signature.h macros.h symlink.c test-symlink.h test-symlink.c \
        signature.h macros.h sys_ioctl.in.h test-sys_ioctl.c \
-       sys_select.in.h test-sys_select.c signature.h sys_socket.in.h \
-       test-sys_socket.c test-sys_stat.c test-sys_time.c \
-       test-sys_types.c sys_uio.in.h test-sys_uio.c test-sys_wait.c \
-       test-sys_wait.h init.sh test-init.sh test-time.c \
+       test-sys_random.c sys_select.in.h test-sys_select.c \
+       signature.h sys_socket.in.h test-sys_socket.c test-sys_stat.c \
+       test-sys_time.c test-sys_types.c sys_uio.in.h test-sys_uio.c \
+       test-sys_wait.c test-sys_wait.h init.sh test-init.sh \
+       test-thread_self.c test-thread_create.c macros.h test-time.c \
        test-timespec.c macros.h test-unistd.c \
        unistr/test-u8-mbtoucr.c macros.h unistr/test-u8-uctomb.c \
        macros.h uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \
@@ -2642,14 +3196,17 @@ EXTRA_DIST = accept.c w32sock.h test-accept.c signature.h macros.h \
        test-version-etc.c test-version-etc.sh test-wchar.c \
        test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh \
        test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
-       test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c \
+       test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh \
+       test-wcrtomb-w32-6.sh test-wcrtomb-w32-7.sh test-wcrtomb-w32.c \
        signature.h macros.h wctob.c wctomb-impl.h wctomb.c \
        test-wctype-h.c macros.h test-wcwidth.c signature.h macros.h \
-       test-xalloc-die.c test-xalloc-die.sh test-xstrtol.c \
-       test-xstrtoul.c test-xstrtol.sh test-xstrtoumax.c \
-       test-xstrtoumax.sh test-xvasprintf.c macros.h
-BUILT_SOURCES = arpa/inet.h $(NETINET_IN_H) $(STDALIGN_H) sys/ioctl.h \
-       sys/select.h sys/socket.h sys/uio.h
+       windows-thread.c windows-thread.h windows-tls.c windows-tls.h \
+       test-xalloc-die.c test-xalloc-die.sh test-xstdopen.c \
+       test-xstdopen.sh macros.h test-xstrtoimax.c test-xstrtoimax.sh \
+       xstrtol-error.h test-xstrtol.c test-xstrtoul.c test-xstrtol.sh \
+       test-xvasprintf.c macros.h
+BUILT_SOURCES = arpa/inet.h $(NETINET_IN_H) pthread.h sched.h \
+       sys/ioctl.h sys/select.h sys/socket.h sys/uio.h
 SUFFIXES = 
 
 # This test expects compilation of test-verify-try.c to fail, and
@@ -2657,53 +3214,91 @@ SUFFIXES =
 #  "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
 MOSTLYCLEANFILES = core *.stackdump arpa/inet.h arpa/inet.h-t \
        t-c-stack.tmp t-c-stack2.tmp netinet/in.h netinet/in.h-t \
-       stdalign.h stdalign.h-t sys/ioctl.h sys/ioctl.h-t sys/select.h \
-       sys/select.h-t sys/socket.h sys/socket.h-t sys/uio.h \
-       sys/uio.h-t .deps/test-verify-try.Tpo
+       pthread.h pthread.h-t sched.h sched.h-t sys/ioctl.h \
+       sys/ioctl.h-t sys/select.h sys/select.h-t sys/socket.h \
+       sys/socket.h-t sys/uio.h sys/uio.h-t .deps/test-verify-try.Tpo
 MOSTLYCLEANDIRS = arpa netinet sys sys sys sys
 CLEANFILES = 
 DISTCLEANFILES = 
 MAINTAINERCLEANFILES = 
+CXXFLAGS = @GL_CXXFLAG_ALLOW_WARNINGS@ @CXXFLAGS@
 AM_CPPFLAGS = \
   -D@gltests_WITNESS@=1 \
   -I. -I$(srcdir) \
   -I.. -I$(srcdir)/.. \
   -I../lib -I$(srcdir)/../lib
 
-LDADD = libtests.a ../lib/libdiffutils.a libtests.a $(LIBTESTS_LIBDEPS)
-libtests_a_SOURCES = dtotimespec.c hash-pjw.h hash-pjw.c sockets.h \
-       sockets.c sys_socket.c timespec-add.c timespec-sub.c
-libtests_a_LIBADD = $(gltests_LIBOBJS)
-libtests_a_DEPENDENCIES = $(gltests_LIBOBJS)
-EXTRA_libtests_a_SOURCES = accept.c bind.c connect.c fdopen.c \
-       ftruncate.c getcwd-lgpl.c getpagesize.c inet_pton.c ioctl.c \
-       listen.c nanosleep.c perror.c pipe.c putenv.c select.c \
-       setlocale.c setsockopt.c sleep.c snprintf.c socket.c \
-       strerror_r.c symlink.c wctob.c wctomb.c
+LDADD = libtests.a ../lib/libdiffutils.a libtests.a ../lib/libdiffutils.a libtests.a $(LIBTESTS_LIBDEPS)
+libtests_a_SOURCES = dtotimespec.c hash-pjw.h hash-pjw.c sig-handler.c \
+       sockets.h sockets.c sys_socket.c glthread/thread.h \
+       glthread/thread.c timespec-add.c timespec-sub.c \
+       xstrtol-error.c
+libtests_a_LIBADD = $(gltests_LIBOBJS) @ALLOCA@
+libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) @ALLOCA@
+EXTRA_libtests_a_SOURCES = accept.c alloca.c atoll.c bind.c connect.c \
+       fdopen.c ftruncate.c getcwd-lgpl.c inet_pton.c ioctl.c \
+       listen.c nanosleep.c perror.c pipe.c pthread-thread.c \
+       pthread_sigmask.c putenv.c select.c setsockopt.c sigaction.c \
+       sigprocmask.c sleep.c snprintf.c socket.c strerror_r.c \
+       symlink.c wctob.c wctomb.c windows-thread.c windows-tls.c
 AM_LIBTOOLFLAGS = --preserve-dup-deps
 test_accept_LDADD = $(LDADD) @LIBSOCKET@
-test_argmatch_LDADD = $(LDADD) @LIBINTL@
+test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
 test_bind_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
+test_btowc_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_ctype_LDADD = $(LDADD) $(LIB_SETLOCALE)
 test_c_stack_LDADD = $(LDADD) $(LIBCSTACK) @LIBINTL@
+test_c_strcasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_strncasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
 test_connect_LDADD = $(LDADD) @LIBSOCKET@ $(INET_PTON_LIB)
 test_dirname_LDADD = $(LDADD) @LIBINTL@
-test_exclude_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
+test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(LIB_MBRTOWC) $(LIBTHREAD)
 test_filenamecat_LDADD = $(LDADD) @LIBINTL@
+test_fnmatch_LDADD = $(LDADD) $(LIB_MBRTOWC)
 test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL)
 test_getopt_gnu_LDADD = $(LDADD) $(LIBINTL)
 test_getopt_posix_LDADD = $(LDADD) $(LIBINTL)
 test_getprogname_LDADD = $(LDADD)
+test_getrandom_LDADD = $(LDADD) @LIB_GETRANDOM@
+GPERF = gperf
+V_GPERF = $(V_GPERF_@AM_V@)
+V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@)
+V_GPERF_0 = @echo "  GPERF   " $@;
+test_hard_locale_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIB_HARD_LOCALE@
+current_locale_SOURCES = locale.c
 test_iconv_LDADD = $(LDADD) @LIBICONV@
 test_inet_pton_LDADD = $(LDADD) @INET_PTON_LIB@
+test_iswdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_iswxdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 test_listen_LDADD = $(LDADD) @LIBSOCKET@
+test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_mbrtowc_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsinit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsrtowcs_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_MBRTOWC)
+test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 test_nanosleep_LDADD = $(LDADD) $(LIB_NANOSLEEP)
-test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
-test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
+test_nl_langinfo_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_nl_langinfo_mt_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+test_pthread_thread_LDADD = $(LDADD) @LIBPMULTITHREAD@
+test_pthread_sigmask1_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@
+test_pthread_sigmask2_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@ @LIBMULTITHREAD@
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
+test_regex_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC) @LIBINTL@ $(LIBTHREAD)
 test_select_LDADD = $(LDADD) @LIB_SELECT@ @LIBSOCKET@ $(INET_PTON_LIB)
 test_select_fd_LDADD = $(LDADD) @LIB_SELECT@
 test_select_stdin_LDADD = $(LDADD) @LIB_SELECT@
+test_setlocale_null_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@
+test_setlocale_null_mt_one_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+test_setlocale_null_mt_all_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
 test_setsockopt_LDADD = $(LDADD) @LIBSOCKET@
-test_sh_quote_LDADD = $(LDADD) @LIBINTL@
+test_sh_quote_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
+test_sigsegv_catch_segv1_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_segv2_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_stackoverflow1_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_stackoverflow2_LDADD = $(LDADD) $(LIBSIGSEGV)
 
 # Because this Makefile snippet defines a variable used by other
 # gnulib Makefile snippets, it must be present in all makefiles that
@@ -2723,16 +3318,13 @@ CXXDEFS_H = $(srcdir)/c++defs.h
 # Because this Makefile snippet defines a variable used by other
 # gnulib Makefile snippets, it must be present in all makefiles that
 # need it. This is ensured by the applicability 'all' defined above.
-UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h
-
-# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all makefiles that
-# need it. This is ensured by the applicability 'all' defined above.
 WARN_ON_USE_H = $(srcdir)/warn-on-use.h
 test_sockets_LDADD = $(LDADD) @LIBSOCKET@
 test_stat_LDADD = $(LDADD) $(LIBINTL)
 test_stat_time_LDADD = $(LDADD) $(LIB_NANOSLEEP)
 test_striconv_LDADD = $(LDADD) @LIBICONV@
+test_thread_self_LDADD = $(LDADD) @LIBTHREAD@
+test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@
 test_u8_mbtoucr_SOURCES = unistr/test-u8-mbtoucr.c
 test_u8_mbtoucr_LDADD = $(LDADD) $(LIBUNISTRING)
 test_u8_uctomb_SOURCES = unistr/test-u8-uctomb.c
@@ -2742,11 +3334,13 @@ test_uc_width_LDADD = $(LDADD) $(LIBUNISTRING)
 test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
 test_uc_width2_LDADD = $(LDADD) $(LIBUNISTRING)
 test_version_etc_LDADD = $(LDADD) @LIBINTL@
-test_wcwidth_LDADD = $(LDADD) $(LIBUNISTRING)
+test_wcrtomb_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_wcwidth_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBUNISTRING)
 test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+test_xstdopen_LDADD = $(LDADD) @LIBINTL@
+test_xstrtoimax_LDADD = $(LDADD) @LIBINTL@
 test_xstrtol_LDADD = $(LDADD) @LIBINTL@
 test_xstrtoul_LDADD = $(LDADD) @LIBINTL@
-test_xstrtoumax_LDADD = $(LDADD) @LIBINTL@
 test_xvasprintf_LDADD = $(LDADD) @LIBINTL@
 all: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -2795,12 +3389,24 @@ clean-checkLIBRARIES:
 
 clean-noinstLIBRARIES:
        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+glthread/$(am__dirstamp):
+       @$(MKDIR_P) glthread
+       @: > glthread/$(am__dirstamp)
+glthread/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) glthread/$(DEPDIR)
+       @: > glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/thread.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
 
 libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES) $(EXTRA_libtests_a_DEPENDENCIES) 
        $(AM_V_at)-rm -f libtests.a
        $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
        $(AM_V_at)$(RANLIB) libtests.a
 
+current-locale$(EXEEXT): $(current_locale_OBJECTS) $(current_locale_DEPENDENCIES) $(EXTRA_current_locale_DEPENDENCIES) 
+       @rm -f current-locale$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(current_locale_OBJECTS) $(current_locale_LDADD) $(LIBS)
+
 test-accept$(EXEEXT): $(test_accept_OBJECTS) $(test_accept_DEPENDENCIES) $(EXTRA_test_accept_DEPENDENCIES) 
        @rm -f test-accept$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_accept_OBJECTS) $(test_accept_LDADD) $(LIBS)
@@ -2853,6 +3459,10 @@ test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_
        @rm -f test-c-strncasecmp$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
 
+test-calloc-gnu$(EXEEXT): $(test_calloc_gnu_OBJECTS) $(test_calloc_gnu_DEPENDENCIES) $(EXTRA_test_calloc_gnu_DEPENDENCIES) 
+       @rm -f test-calloc-gnu$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_calloc_gnu_OBJECTS) $(test_calloc_gnu_LDADD) $(LIBS)
+
 test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES) $(EXTRA_test_cloexec_DEPENDENCIES) 
        @rm -f test-cloexec$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS)
@@ -2877,6 +3487,10 @@ test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES) $(EXTRA_test_
        @rm -f test-dup2$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS)
 
+test-dynarray$(EXEEXT): $(test_dynarray_OBJECTS) $(test_dynarray_DEPENDENCIES) $(EXTRA_test_dynarray_DEPENDENCIES) 
+       @rm -f test-dynarray$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_dynarray_OBJECTS) $(test_dynarray_LDADD) $(LIBS)
+
 test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES) $(EXTRA_test_environ_DEPENDENCIES) 
        @rm -f test-environ$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS)
@@ -2921,6 +3535,14 @@ test-fnmatch-h$(EXEEXT): $(test_fnmatch_h_OBJECTS) $(test_fnmatch_h_DEPENDENCIES
        @rm -f test-fnmatch-h$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_fnmatch_h_OBJECTS) $(test_fnmatch_h_LDADD) $(LIBS)
 
+test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES) $(EXTRA_test_fopen_DEPENDENCIES) 
+       @rm -f test-fopen$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS)
+
+test-fopen-gnu$(EXEEXT): $(test_fopen_gnu_OBJECTS) $(test_fopen_gnu_DEPENDENCIES) $(EXTRA_test_fopen_gnu_DEPENDENCIES) 
+       @rm -f test-fopen-gnu$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_fopen_gnu_OBJECTS) $(test_fopen_gnu_LDADD) $(LIBS)
+
 test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES) 
        @rm -f test-fputc$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_fputc_OBJECTS) $(test_fputc_LDADD) $(LIBS)
@@ -2929,14 +3551,14 @@ test-fread$(EXEEXT): $(test_fread_OBJECTS) $(test_fread_DEPENDENCIES) $(EXTRA_te
        @rm -f test-fread$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_fread_OBJECTS) $(test_fread_LDADD) $(LIBS)
 
+test-free$(EXEEXT): $(test_free_OBJECTS) $(test_free_DEPENDENCIES) $(EXTRA_test_free_DEPENDENCIES) 
+       @rm -f test-free$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_free_OBJECTS) $(test_free_LDADD) $(LIBS)
+
 test-freopen$(EXEEXT): $(test_freopen_OBJECTS) $(test_freopen_DEPENDENCIES) $(EXTRA_test_freopen_DEPENDENCIES) 
        @rm -f test-freopen$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_freopen_OBJECTS) $(test_freopen_LDADD) $(LIBS)
 
-test-freopen-safer$(EXEEXT): $(test_freopen_safer_OBJECTS) $(test_freopen_safer_DEPENDENCIES) $(EXTRA_test_freopen_safer_DEPENDENCIES) 
-       @rm -f test-freopen-safer$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_freopen_safer_OBJECTS) $(test_freopen_safer_LDADD) $(LIBS)
-
 test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES) 
        @rm -f test-fstat$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS)
@@ -2969,10 +3591,18 @@ test-getprogname$(EXEEXT): $(test_getprogname_OBJECTS) $(test_getprogname_DEPEND
        @rm -f test-getprogname$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_getprogname_OBJECTS) $(test_getprogname_LDADD) $(LIBS)
 
+test-getrandom$(EXEEXT): $(test_getrandom_OBJECTS) $(test_getrandom_DEPENDENCIES) $(EXTRA_test_getrandom_DEPENDENCIES) 
+       @rm -f test-getrandom$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_getrandom_OBJECTS) $(test_getrandom_LDADD) $(LIBS)
+
 test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES) 
        @rm -f test-gettimeofday$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS)
 
+test-hard-locale$(EXEEXT): $(test_hard_locale_OBJECTS) $(test_hard_locale_DEPENDENCIES) $(EXTRA_test_hard_locale_DEPENDENCIES) 
+       @rm -f test-hard-locale$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_hard_locale_OBJECTS) $(test_hard_locale_LDADD) $(LIBS)
+
 test-hash$(EXEEXT): $(test_hash_OBJECTS) $(test_hash_DEPENDENCIES) $(EXTRA_test_hash_DEPENDENCIES) 
        @rm -f test-hash$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_hash_OBJECTS) $(test_hash_LDADD) $(LIBS)
@@ -3017,6 +3647,14 @@ test-iswblank$(EXEEXT): $(test_iswblank_OBJECTS) $(test_iswblank_DEPENDENCIES) $
        @rm -f test-iswblank$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_iswblank_OBJECTS) $(test_iswblank_LDADD) $(LIBS)
 
+test-iswdigit$(EXEEXT): $(test_iswdigit_OBJECTS) $(test_iswdigit_DEPENDENCIES) $(EXTRA_test_iswdigit_DEPENDENCIES) 
+       @rm -f test-iswdigit$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_iswdigit_OBJECTS) $(test_iswdigit_LDADD) $(LIBS)
+
+test-iswxdigit$(EXEEXT): $(test_iswxdigit_OBJECTS) $(test_iswxdigit_DEPENDENCIES) $(EXTRA_test_iswxdigit_DEPENDENCIES) 
+       @rm -f test-iswxdigit$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_iswxdigit_OBJECTS) $(test_iswxdigit_LDADD) $(LIBS)
+
 test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES) $(EXTRA_test_langinfo_DEPENDENCIES) 
        @rm -f test-langinfo$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
@@ -3045,6 +3683,10 @@ test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES) $(EXTRA_te
        @rm -f test-lstat$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
 
+test-malloc-gnu$(EXEEXT): $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_DEPENDENCIES) $(EXTRA_test_malloc_gnu_DEPENDENCIES) 
+       @rm -f test-malloc-gnu$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_malloc_gnu_OBJECTS) $(test_malloc_gnu_LDADD) $(LIBS)
+
 test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES) $(EXTRA_test_malloca_DEPENDENCIES) 
        @rm -f test-malloca$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
@@ -3101,6 +3743,10 @@ test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPEND
        @rm -f test-nl_langinfo$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
 
+test-nl_langinfo-mt$(EXEEXT): $(test_nl_langinfo_mt_OBJECTS) $(test_nl_langinfo_mt_DEPENDENCIES) $(EXTRA_test_nl_langinfo_mt_DEPENDENCIES) 
+       @rm -f test-nl_langinfo-mt$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_nl_langinfo_mt_OBJECTS) $(test_nl_langinfo_mt_LDADD) $(LIBS)
+
 test-nstrftime$(EXEEXT): $(test_nstrftime_OBJECTS) $(test_nstrftime_DEPENDENCIES) $(EXTRA_test_nstrftime_DEPENDENCIES) 
        @rm -f test-nstrftime$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_nstrftime_OBJECTS) $(test_nstrftime_LDADD) $(LIBS)
@@ -3125,6 +3771,22 @@ test-pipe$(EXEEXT): $(test_pipe_OBJECTS) $(test_pipe_DEPENDENCIES) $(EXTRA_test_
        @rm -f test-pipe$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_pipe_OBJECTS) $(test_pipe_LDADD) $(LIBS)
 
+test-pthread$(EXEEXT): $(test_pthread_OBJECTS) $(test_pthread_DEPENDENCIES) $(EXTRA_test_pthread_DEPENDENCIES) 
+       @rm -f test-pthread$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_pthread_OBJECTS) $(test_pthread_LDADD) $(LIBS)
+
+test-pthread-thread$(EXEEXT): $(test_pthread_thread_OBJECTS) $(test_pthread_thread_DEPENDENCIES) $(EXTRA_test_pthread_thread_DEPENDENCIES) 
+       @rm -f test-pthread-thread$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_pthread_thread_OBJECTS) $(test_pthread_thread_LDADD) $(LIBS)
+
+test-pthread_sigmask1$(EXEEXT): $(test_pthread_sigmask1_OBJECTS) $(test_pthread_sigmask1_DEPENDENCIES) $(EXTRA_test_pthread_sigmask1_DEPENDENCIES) 
+       @rm -f test-pthread_sigmask1$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_pthread_sigmask1_OBJECTS) $(test_pthread_sigmask1_LDADD) $(LIBS)
+
+test-pthread_sigmask2$(EXEEXT): $(test_pthread_sigmask2_OBJECTS) $(test_pthread_sigmask2_DEPENDENCIES) $(EXTRA_test_pthread_sigmask2_DEPENDENCIES) 
+       @rm -f test-pthread_sigmask2$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_pthread_sigmask2_OBJECTS) $(test_pthread_sigmask2_LDADD) $(LIBS)
+
 test-quotearg-simple$(EXEEXT): $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_DEPENDENCIES) $(EXTRA_test_quotearg_simple_DEPENDENCIES) 
        @rm -f test-quotearg-simple$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_quotearg_simple_OBJECTS) $(test_quotearg_simple_LDADD) $(LIBS)
@@ -3141,10 +3803,22 @@ test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) $
        @rm -f test-readlink$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS)
 
+test-realloc-gnu$(EXEEXT): $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_DEPENDENCIES) $(EXTRA_test_realloc_gnu_DEPENDENCIES) 
+       @rm -f test-realloc-gnu$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_realloc_gnu_OBJECTS) $(test_realloc_gnu_LDADD) $(LIBS)
+
+test-reallocarray$(EXEEXT): $(test_reallocarray_OBJECTS) $(test_reallocarray_DEPENDENCIES) $(EXTRA_test_reallocarray_DEPENDENCIES) 
+       @rm -f test-reallocarray$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_reallocarray_OBJECTS) $(test_reallocarray_LDADD) $(LIBS)
+
 test-regex$(EXEEXT): $(test_regex_OBJECTS) $(test_regex_DEPENDENCIES) $(EXTRA_test_regex_DEPENDENCIES) 
        @rm -f test-regex$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_regex_OBJECTS) $(test_regex_LDADD) $(LIBS)
 
+test-sched$(EXEEXT): $(test_sched_OBJECTS) $(test_sched_DEPENDENCIES) $(EXTRA_test_sched_DEPENDENCIES) 
+       @rm -f test-sched$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sched_OBJECTS) $(test_sched_LDADD) $(LIBS)
+
 test-select$(EXEEXT): $(test_select_OBJECTS) $(test_select_DEPENDENCIES) $(EXTRA_test_select_DEPENDENCIES) 
        @rm -f test-select$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_select_OBJECTS) $(test_select_LDADD) $(LIBS)
@@ -3161,13 +3835,17 @@ test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA
        @rm -f test-setenv$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS)
 
-test-setlocale1$(EXEEXT): $(test_setlocale1_OBJECTS) $(test_setlocale1_DEPENDENCIES) $(EXTRA_test_setlocale1_DEPENDENCIES) 
-       @rm -f test-setlocale1$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_setlocale1_OBJECTS) $(test_setlocale1_LDADD) $(LIBS)
+test-setlocale_null$(EXEEXT): $(test_setlocale_null_OBJECTS) $(test_setlocale_null_DEPENDENCIES) $(EXTRA_test_setlocale_null_DEPENDENCIES) 
+       @rm -f test-setlocale_null$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_setlocale_null_OBJECTS) $(test_setlocale_null_LDADD) $(LIBS)
+
+test-setlocale_null-mt-all$(EXEEXT): $(test_setlocale_null_mt_all_OBJECTS) $(test_setlocale_null_mt_all_DEPENDENCIES) $(EXTRA_test_setlocale_null_mt_all_DEPENDENCIES) 
+       @rm -f test-setlocale_null-mt-all$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_setlocale_null_mt_all_OBJECTS) $(test_setlocale_null_mt_all_LDADD) $(LIBS)
 
-test-setlocale2$(EXEEXT): $(test_setlocale2_OBJECTS) $(test_setlocale2_DEPENDENCIES) $(EXTRA_test_setlocale2_DEPENDENCIES) 
-       @rm -f test-setlocale2$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS)
+test-setlocale_null-mt-one$(EXEEXT): $(test_setlocale_null_mt_one_OBJECTS) $(test_setlocale_null_mt_one_DEPENDENCIES) $(EXTRA_test_setlocale_null_mt_one_DEPENDENCIES) 
+       @rm -f test-setlocale_null-mt-one$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_setlocale_null_mt_one_OBJECTS) $(test_setlocale_null_mt_one_LDADD) $(LIBS)
 
 test-setsockopt$(EXEEXT): $(test_setsockopt_OBJECTS) $(test_setsockopt_DEPENDENCIES) $(EXTRA_test_setsockopt_DEPENDENCIES) 
        @rm -f test-setsockopt$(EXEEXT)
@@ -3189,6 +3867,22 @@ test-sigprocmask$(EXEEXT): $(test_sigprocmask_OBJECTS) $(test_sigprocmask_DEPEND
        @rm -f test-sigprocmask$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_sigprocmask_OBJECTS) $(test_sigprocmask_LDADD) $(LIBS)
 
+test-sigsegv-catch-segv1$(EXEEXT): $(test_sigsegv_catch_segv1_OBJECTS) $(test_sigsegv_catch_segv1_DEPENDENCIES) $(EXTRA_test_sigsegv_catch_segv1_DEPENDENCIES) 
+       @rm -f test-sigsegv-catch-segv1$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sigsegv_catch_segv1_OBJECTS) $(test_sigsegv_catch_segv1_LDADD) $(LIBS)
+
+test-sigsegv-catch-segv2$(EXEEXT): $(test_sigsegv_catch_segv2_OBJECTS) $(test_sigsegv_catch_segv2_DEPENDENCIES) $(EXTRA_test_sigsegv_catch_segv2_DEPENDENCIES) 
+       @rm -f test-sigsegv-catch-segv2$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sigsegv_catch_segv2_OBJECTS) $(test_sigsegv_catch_segv2_LDADD) $(LIBS)
+
+test-sigsegv-catch-stackoverflow1$(EXEEXT): $(test_sigsegv_catch_stackoverflow1_OBJECTS) $(test_sigsegv_catch_stackoverflow1_DEPENDENCIES) $(EXTRA_test_sigsegv_catch_stackoverflow1_DEPENDENCIES) 
+       @rm -f test-sigsegv-catch-stackoverflow1$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sigsegv_catch_stackoverflow1_OBJECTS) $(test_sigsegv_catch_stackoverflow1_LDADD) $(LIBS)
+
+test-sigsegv-catch-stackoverflow2$(EXEEXT): $(test_sigsegv_catch_stackoverflow2_OBJECTS) $(test_sigsegv_catch_stackoverflow2_DEPENDENCIES) $(EXTRA_test_sigsegv_catch_stackoverflow2_DEPENDENCIES) 
+       @rm -f test-sigsegv-catch-stackoverflow2$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sigsegv_catch_stackoverflow2_OBJECTS) $(test_sigsegv_catch_stackoverflow2_LDADD) $(LIBS)
+
 test-sleep$(EXEEXT): $(test_sleep_OBJECTS) $(test_sleep_DEPENDENCIES) $(EXTRA_test_sleep_DEPENDENCIES) 
        @rm -f test-sleep$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_sleep_OBJECTS) $(test_sleep_LDADD) $(LIBS)
@@ -3257,13 +3951,13 @@ test-strnlen$(EXEEXT): $(test_strnlen_OBJECTS) $(test_strnlen_DEPENDENCIES) $(EX
        @rm -f test-strnlen$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_strnlen_OBJECTS) $(test_strnlen_LDADD) $(LIBS)
 
-test-strtoull$(EXEEXT): $(test_strtoull_OBJECTS) $(test_strtoull_DEPENDENCIES) $(EXTRA_test_strtoull_DEPENDENCIES) 
-       @rm -f test-strtoull$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_strtoull_OBJECTS) $(test_strtoull_LDADD) $(LIBS)
+test-strtoimax$(EXEEXT): $(test_strtoimax_OBJECTS) $(test_strtoimax_DEPENDENCIES) $(EXTRA_test_strtoimax_DEPENDENCIES) 
+       @rm -f test-strtoimax$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_strtoimax_OBJECTS) $(test_strtoimax_LDADD) $(LIBS)
 
-test-strtoumax$(EXEEXT): $(test_strtoumax_OBJECTS) $(test_strtoumax_DEPENDENCIES) $(EXTRA_test_strtoumax_DEPENDENCIES) 
-       @rm -f test-strtoumax$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_strtoumax_OBJECTS) $(test_strtoumax_LDADD) $(LIBS)
+test-strtoll$(EXEEXT): $(test_strtoll_OBJECTS) $(test_strtoll_DEPENDENCIES) $(EXTRA_test_strtoll_DEPENDENCIES) 
+       @rm -f test-strtoll$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_strtoll_OBJECTS) $(test_strtoll_LDADD) $(LIBS)
 
 test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES) 
        @rm -f test-symlink$(EXEEXT)
@@ -3273,6 +3967,10 @@ test-sys_ioctl$(EXEEXT): $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_DEPENDENCIES
        @rm -f test-sys_ioctl$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_sys_ioctl_OBJECTS) $(test_sys_ioctl_LDADD) $(LIBS)
 
+test-sys_random$(EXEEXT): $(test_sys_random_OBJECTS) $(test_sys_random_DEPENDENCIES) $(EXTRA_test_sys_random_DEPENDENCIES) 
+       @rm -f test-sys_random$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_sys_random_OBJECTS) $(test_sys_random_LDADD) $(LIBS)
+
 test-sys_select$(EXEEXT): $(test_sys_select_OBJECTS) $(test_sys_select_DEPENDENCIES) $(EXTRA_test_sys_select_DEPENDENCIES) 
        @rm -f test-sys_select$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_sys_select_OBJECTS) $(test_sys_select_LDADD) $(LIBS)
@@ -3301,6 +3999,14 @@ test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES) $
        @rm -f test-sys_wait$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_sys_wait_OBJECTS) $(test_sys_wait_LDADD) $(LIBS)
 
+test-thread_create$(EXEEXT): $(test_thread_create_OBJECTS) $(test_thread_create_DEPENDENCIES) $(EXTRA_test_thread_create_DEPENDENCIES) 
+       @rm -f test-thread_create$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_thread_create_OBJECTS) $(test_thread_create_LDADD) $(LIBS)
+
+test-thread_self$(EXEEXT): $(test_thread_self_OBJECTS) $(test_thread_self_DEPENDENCIES) $(EXTRA_test_thread_self_DEPENDENCIES) 
+       @rm -f test-thread_self$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_thread_self_OBJECTS) $(test_thread_self_LDADD) $(LIBS)
+
 test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES) $(EXTRA_test_time_DEPENDENCIES) 
        @rm -f test-time$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS)
@@ -3397,6 +4103,14 @@ test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENC
        @rm -f test-xalloc-die$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS)
 
+test-xstdopen$(EXEEXT): $(test_xstdopen_OBJECTS) $(test_xstdopen_DEPENDENCIES) $(EXTRA_test_xstdopen_DEPENDENCIES) 
+       @rm -f test-xstdopen$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_xstdopen_OBJECTS) $(test_xstdopen_LDADD) $(LIBS)
+
+test-xstrtoimax$(EXEEXT): $(test_xstrtoimax_OBJECTS) $(test_xstrtoimax_DEPENDENCIES) $(EXTRA_test_xstrtoimax_DEPENDENCIES) 
+       @rm -f test-xstrtoimax$(EXEEXT)
+       $(AM_V_CCLD)$(LINK) $(test_xstrtoimax_OBJECTS) $(test_xstrtoimax_LDADD) $(LIBS)
+
 test-xstrtol$(EXEEXT): $(test_xstrtol_OBJECTS) $(test_xstrtol_DEPENDENCIES) $(EXTRA_test_xstrtol_DEPENDENCIES) 
        @rm -f test-xstrtol$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_xstrtol_OBJECTS) $(test_xstrtol_LDADD) $(LIBS)
@@ -3405,16 +4119,13 @@ test-xstrtoul$(EXEEXT): $(test_xstrtoul_OBJECTS) $(test_xstrtoul_DEPENDENCIES) $
        @rm -f test-xstrtoul$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_xstrtoul_OBJECTS) $(test_xstrtoul_LDADD) $(LIBS)
 
-test-xstrtoumax$(EXEEXT): $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_DEPENDENCIES) $(EXTRA_test_xstrtoumax_DEPENDENCIES) 
-       @rm -f test-xstrtoumax$(EXEEXT)
-       $(AM_V_CCLD)$(LINK) $(test_xstrtoumax_OBJECTS) $(test_xstrtoumax_LDADD) $(LIBS)
-
 test-xvasprintf$(EXEEXT): $(test_xvasprintf_OBJECTS) $(test_xvasprintf_DEPENDENCIES) $(EXTRA_test_xvasprintf_DEPENDENCIES) 
        @rm -f test-xvasprintf$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(test_xvasprintf_OBJECTS) $(test_xvasprintf_LDADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
+       -rm -f glthread/*.$(OBJEXT)
        -rm -f unistr/*.$(OBJEXT)
        -rm -f uniwidth/*.$(OBJEXT)
 
@@ -3422,24 +4133,30 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accept.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atoll.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bind.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtotimespec.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftruncate.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-pjw.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioctl.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locale.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nanosleep.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/perror.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread-thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pthread_sigmask.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setsockopt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleep.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ # am--include-marker
@@ -3460,12 +4177,14 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-stack.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-calloc-gnu.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-connect.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dynarray.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exclude.Po@am__quote@ # am--include-marker
@@ -3477,9 +4196,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-float.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fnmatch.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen-gnu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fputc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freopen-safer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-free.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftruncate.Po@am__quote@ # am--include-marker
@@ -3489,7 +4210,9 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-gnu.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getopt-posix.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getprogname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getrandom.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hard-locale.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-hash.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv.Po@am__quote@ # am--include-marker
@@ -3501,6 +4224,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ioctl.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswblank.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswdigit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iswxdigit.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-limits-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-listen.Po@am__quote@ # am--include-marker
@@ -3508,6 +4233,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-locale.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-localeconv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc-w32.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@ # am--include-marker
@@ -3521,6 +4247,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mkdir.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nanosleep.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-netinet_in.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo-mt.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nstrftime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@ # am--include-marker
@@ -3528,22 +4255,34 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-perror2.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pthread-thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pthread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pthread_sigmask1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pthread_sigmask2.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg-simple.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-raise.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rawmemchr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-realloc-gnu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-reallocarray.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-regex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sched.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-fd.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select-stdin.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-select.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale_null-mt-all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale_null-mt-one.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale_null.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setsockopt.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sh-quote.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigaction.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigprocmask.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigsegv-catch-segv1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigsegv-catch-segv2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigsegv-catch-stackoverflow1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigsegv-catch-stackoverflow2.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sleep.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sockets.Po@am__quote@ # am--include-marker
@@ -3561,10 +4300,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strings.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strnlen.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoull.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoumax.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoimax.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtoll.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_ioctl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_random.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_select.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_socket.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@ # am--include-marker
@@ -3572,6 +4312,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_types.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_uio.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_wait.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_create.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-thread_self.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-timespec.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@ # am--include-marker
@@ -3587,14 +4329,19 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcwidth.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstdopen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoimax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtol.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoul.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xstrtoumax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xvasprintf.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec-add.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timespec-sub.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-thread.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-tls.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/test-u8-mbtoucr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/test-u8-uctomb.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width.Po@am__quote@ # am--include-marker
@@ -3828,7 +4575,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
        fi;                                                             \
        echo "$${col}$$br$${std}";                                      \
-       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
+       echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
        echo "$${col}$$br$${std}";                                      \
        create_testsuite_report --maybe-color;                          \
        echo "$$col$$br$$std";                                          \
@@ -3960,6 +4707,13 @@ test-c-strcase.sh.log: test-c-strcase.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-calloc-gnu.log: test-calloc-gnu$(EXEEXT)
+       @p='test-calloc-gnu$(EXEEXT)'; \
+       b='test-calloc-gnu'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-cloexec.log: test-cloexec$(EXEEXT)
        @p='test-cloexec$(EXEEXT)'; \
        b='test-cloexec'; \
@@ -4002,6 +4756,13 @@ test-dup2.log: test-dup2$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-dynarray.log: test-dynarray$(EXEEXT)
+       @p='test-dynarray$(EXEEXT)'; \
+       b='test-dynarray'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-environ.log: test-environ$(EXEEXT)
        @p='test-environ$(EXEEXT)'; \
        b='test-environ'; \
@@ -4128,6 +4889,20 @@ test-fnmatch.log: test-fnmatch$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-fopen-gnu.log: test-fopen-gnu$(EXEEXT)
+       @p='test-fopen-gnu$(EXEEXT)'; \
+       b='test-fopen-gnu'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-fopen.log: test-fopen$(EXEEXT)
+       @p='test-fopen$(EXEEXT)'; \
+       b='test-fopen'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-fputc.log: test-fputc$(EXEEXT)
        @p='test-fputc$(EXEEXT)'; \
        b='test-fputc'; \
@@ -4142,9 +4917,9 @@ test-fread.log: test-fread$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-freopen-safer.log: test-freopen-safer$(EXEEXT)
-       @p='test-freopen-safer$(EXEEXT)'; \
-       b='test-freopen-safer'; \
+test-free.log: test-free$(EXEEXT)
+       @p='test-free$(EXEEXT)'; \
+       b='test-free'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -4212,6 +4987,13 @@ test-getprogname.log: test-getprogname$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-getrandom.log: test-getrandom$(EXEEXT)
+       @p='test-getrandom$(EXEEXT)'; \
+       b='test-getrandom'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-gettimeofday.log: test-gettimeofday$(EXEEXT)
        @p='test-gettimeofday$(EXEEXT)'; \
        b='test-gettimeofday'; \
@@ -4219,6 +5001,13 @@ test-gettimeofday.log: test-gettimeofday$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-hard-locale.log: test-hard-locale$(EXEEXT)
+       @p='test-hard-locale$(EXEEXT)'; \
+       b='test-hard-locale'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-hash.log: test-hash$(EXEEXT)
        @p='test-hash$(EXEEXT)'; \
        b='test-hash'; \
@@ -4296,6 +5085,20 @@ test-iswblank.log: test-iswblank$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-iswdigit.sh.log: test-iswdigit.sh
+       @p='test-iswdigit.sh'; \
+       b='test-iswdigit.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-iswxdigit.sh.log: test-iswxdigit.sh
+       @p='test-iswxdigit.sh'; \
+       b='test-iswxdigit.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-langinfo.log: test-langinfo$(EXEEXT)
        @p='test-langinfo$(EXEEXT)'; \
        b='test-langinfo'; \
@@ -4338,6 +5141,13 @@ test-lstat.log: test-lstat$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-malloc-gnu.log: test-malloc-gnu$(EXEEXT)
+       @p='test-malloc-gnu$(EXEEXT)'; \
+       b='test-malloc-gnu'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-malloca.log: test-malloca$(EXEEXT)
        @p='test-malloca$(EXEEXT)'; \
        b='test-malloca'; \
@@ -4415,6 +5225,20 @@ test-mbrtowc-w32-5.sh.log: test-mbrtowc-w32-5.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrtowc-w32-6.sh.log: test-mbrtowc-w32-6.sh
+       @p='test-mbrtowc-w32-6.sh'; \
+       b='test-mbrtowc-w32-6.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-mbrtowc-w32-7.sh.log: test-mbrtowc-w32-7.sh
+       @p='test-mbrtowc-w32-7.sh'; \
+       b='test-mbrtowc-w32-7.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-mbscasecmp.sh.log: test-mbscasecmp.sh
        @p='test-mbscasecmp.sh'; \
        b='test-mbscasecmp.sh'; \
@@ -4513,6 +5337,13 @@ test-nl_langinfo.sh.log: test-nl_langinfo.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-nl_langinfo-mt.log: test-nl_langinfo-mt$(EXEEXT)
+       @p='test-nl_langinfo-mt$(EXEEXT)'; \
+       b='test-nl_langinfo-mt'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-nstrftime.log: test-nstrftime$(EXEEXT)
        @p='test-nstrftime$(EXEEXT)'; \
        b='test-nstrftime'; \
@@ -4555,6 +5386,34 @@ test-pipe.log: test-pipe$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pthread.log: test-pthread$(EXEEXT)
+       @p='test-pthread$(EXEEXT)'; \
+       b='test-pthread'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pthread-thread.log: test-pthread-thread$(EXEEXT)
+       @p='test-pthread-thread$(EXEEXT)'; \
+       b='test-pthread-thread'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pthread_sigmask1.log: test-pthread_sigmask1$(EXEEXT)
+       @p='test-pthread_sigmask1$(EXEEXT)'; \
+       b='test-pthread_sigmask1'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-pthread_sigmask2.log: test-pthread_sigmask2$(EXEEXT)
+       @p='test-pthread_sigmask2$(EXEEXT)'; \
+       b='test-pthread_sigmask2'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-quotearg-simple.log: test-quotearg-simple$(EXEEXT)
        @p='test-quotearg-simple$(EXEEXT)'; \
        b='test-quotearg-simple'; \
@@ -4583,6 +5442,20 @@ test-readlink.log: test-readlink$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-realloc-gnu.log: test-realloc-gnu$(EXEEXT)
+       @p='test-realloc-gnu$(EXEEXT)'; \
+       b='test-realloc-gnu'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-reallocarray.log: test-reallocarray$(EXEEXT)
+       @p='test-reallocarray$(EXEEXT)'; \
+       b='test-reallocarray'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-regex.log: test-regex$(EXEEXT)
        @p='test-regex$(EXEEXT)'; \
        b='test-regex'; \
@@ -4590,6 +5463,13 @@ test-regex.log: test-regex$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sched.log: test-sched$(EXEEXT)
+       @p='test-sched$(EXEEXT)'; \
+       b='test-sched'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-select.log: test-select$(EXEEXT)
        @p='test-select$(EXEEXT)'; \
        b='test-select'; \
@@ -4618,16 +5498,23 @@ test-setenv.log: test-setenv$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-setlocale1.sh.log: test-setlocale1.sh
-       @p='test-setlocale1.sh'; \
-       b='test-setlocale1.sh'; \
+test-setlocale_null.log: test-setlocale_null$(EXEEXT)
+       @p='test-setlocale_null$(EXEEXT)'; \
+       b='test-setlocale_null'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-setlocale_null-mt-one.log: test-setlocale_null-mt-one$(EXEEXT)
+       @p='test-setlocale_null-mt-one$(EXEEXT)'; \
+       b='test-setlocale_null-mt-one'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-setlocale2.sh.log: test-setlocale2.sh
-       @p='test-setlocale2.sh'; \
-       b='test-setlocale2.sh'; \
+test-setlocale_null-mt-all.log: test-setlocale_null-mt-all$(EXEEXT)
+       @p='test-setlocale_null-mt-all$(EXEEXT)'; \
+       b='test-setlocale_null-mt-all'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -4667,6 +5554,34 @@ test-sigprocmask.log: test-sigprocmask$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sigsegv-catch-segv1.log: test-sigsegv-catch-segv1$(EXEEXT)
+       @p='test-sigsegv-catch-segv1$(EXEEXT)'; \
+       b='test-sigsegv-catch-segv1'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sigsegv-catch-segv2.log: test-sigsegv-catch-segv2$(EXEEXT)
+       @p='test-sigsegv-catch-segv2$(EXEEXT)'; \
+       b='test-sigsegv-catch-segv2'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sigsegv-catch-stackoverflow1.log: test-sigsegv-catch-stackoverflow1$(EXEEXT)
+       @p='test-sigsegv-catch-stackoverflow1$(EXEEXT)'; \
+       b='test-sigsegv-catch-stackoverflow1'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sigsegv-catch-stackoverflow2.log: test-sigsegv-catch-stackoverflow2$(EXEEXT)
+       @p='test-sigsegv-catch-stackoverflow2$(EXEEXT)'; \
+       b='test-sigsegv-catch-stackoverflow2'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-sleep.log: test-sleep$(EXEEXT)
        @p='test-sleep$(EXEEXT)'; \
        b='test-sleep'; \
@@ -4786,16 +5701,16 @@ test-strnlen.log: test-strnlen$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-strtoull.log: test-strtoull$(EXEEXT)
-       @p='test-strtoull$(EXEEXT)'; \
-       b='test-strtoull'; \
+test-strtoimax.log: test-strtoimax$(EXEEXT)
+       @p='test-strtoimax$(EXEEXT)'; \
+       b='test-strtoimax'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-strtoumax.log: test-strtoumax$(EXEEXT)
-       @p='test-strtoumax$(EXEEXT)'; \
-       b='test-strtoumax'; \
+test-strtoll.log: test-strtoll$(EXEEXT)
+       @p='test-strtoll$(EXEEXT)'; \
+       b='test-strtoll'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -4814,6 +5729,13 @@ test-sys_ioctl.log: test-sys_ioctl$(EXEEXT)
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-sys_random.log: test-sys_random$(EXEEXT)
+       @p='test-sys_random$(EXEEXT)'; \
+       b='test-sys_random'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-sys_select.log: test-sys_select$(EXEEXT)
        @p='test-sys_select$(EXEEXT)'; \
        b='test-sys_select'; \
@@ -4870,6 +5792,20 @@ test-init.sh.log: test-init.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-thread_self.log: test-thread_self$(EXEEXT)
+       @p='test-thread_self$(EXEEXT)'; \
+       b='test-thread_self'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-thread_create.log: test-thread_create$(EXEEXT)
+       @p='test-thread_create$(EXEEXT)'; \
+       b='test-thread_create'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-time.log: test-time$(EXEEXT)
        @p='test-time$(EXEEXT)'; \
        b='test-time'; \
@@ -5031,6 +5967,20 @@ test-wcrtomb-w32-5.sh.log: test-wcrtomb-w32-5.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-wcrtomb-w32-6.sh.log: test-wcrtomb-w32-6.sh
+       @p='test-wcrtomb-w32-6.sh'; \
+       b='test-wcrtomb-w32-6.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-wcrtomb-w32-7.sh.log: test-wcrtomb-w32-7.sh
+       @p='test-wcrtomb-w32-7.sh'; \
+       b='test-wcrtomb-w32-7.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
 test-wctype-h.log: test-wctype-h$(EXEEXT)
        @p='test-wctype-h$(EXEEXT)'; \
        b='test-wctype-h'; \
@@ -5052,16 +6002,23 @@ test-xalloc-die.sh.log: test-xalloc-die.sh
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-xstrtol.sh.log: test-xstrtol.sh
-       @p='test-xstrtol.sh'; \
-       b='test-xstrtol.sh'; \
+test-xstdopen.sh.log: test-xstdopen.sh
+       @p='test-xstdopen.sh'; \
+       b='test-xstdopen.sh'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
-test-xstrtoumax.sh.log: test-xstrtoumax.sh
-       @p='test-xstrtoumax.sh'; \
-       b='test-xstrtoumax.sh'; \
+test-xstrtoimax.sh.log: test-xstrtoimax.sh
+       @p='test-xstrtoimax.sh'; \
+       b='test-xstrtoimax.sh'; \
+       $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
+       $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+       "$$tst" $(AM_TESTS_FD_REDIRECT)
+test-xstrtol.sh.log: test-xstrtol.sh
+       @p='test-xstrtol.sh'; \
+       b='test-xstrtol.sh'; \
        $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
        --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
@@ -5087,7 +6044,6 @@ test-xvasprintf.log: test-xvasprintf$(EXEEXT)
 @am__EXEEXT_TRUE@      --log-file $$b.log --trs-file $$b.trs \
 @am__EXEEXT_TRUE@      $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
 @am__EXEEXT_TRUE@      "$$tst" $(AM_TESTS_FD_REDIRECT)
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -5156,7 +6112,8 @@ installdirs: installdirs-recursive
 installdirs-am:
 install: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) install-recursive
-install-exec: install-exec-recursive
+install-exec: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive
 install-data: install-data-recursive
 uninstall: uninstall-recursive
 
@@ -5186,6 +6143,8 @@ clean-generic:
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+       -rm -f glthread/$(DEPDIR)/$(am__dirstamp)
+       -rm -f glthread/$(am__dirstamp)
        -rm -f unistr/$(DEPDIR)/$(am__dirstamp)
        -rm -f unistr/$(am__dirstamp)
        -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
@@ -5205,24 +6164,30 @@ clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
 
 distclean: distclean-recursive
                -rm -f ./$(DEPDIR)/accept.Po
+       -rm -f ./$(DEPDIR)/alloca.Po
+       -rm -f ./$(DEPDIR)/atoll.Po
        -rm -f ./$(DEPDIR)/bind.Po
        -rm -f ./$(DEPDIR)/connect.Po
        -rm -f ./$(DEPDIR)/dtotimespec.Po
        -rm -f ./$(DEPDIR)/fdopen.Po
        -rm -f ./$(DEPDIR)/ftruncate.Po
        -rm -f ./$(DEPDIR)/getcwd-lgpl.Po
-       -rm -f ./$(DEPDIR)/getpagesize.Po
        -rm -f ./$(DEPDIR)/hash-pjw.Po
        -rm -f ./$(DEPDIR)/inet_pton.Po
        -rm -f ./$(DEPDIR)/ioctl.Po
        -rm -f ./$(DEPDIR)/listen.Po
+       -rm -f ./$(DEPDIR)/locale.Po
        -rm -f ./$(DEPDIR)/nanosleep.Po
        -rm -f ./$(DEPDIR)/perror.Po
        -rm -f ./$(DEPDIR)/pipe.Po
+       -rm -f ./$(DEPDIR)/pthread-thread.Po
+       -rm -f ./$(DEPDIR)/pthread_sigmask.Po
        -rm -f ./$(DEPDIR)/putenv.Po
        -rm -f ./$(DEPDIR)/select.Po
-       -rm -f ./$(DEPDIR)/setlocale.Po
        -rm -f ./$(DEPDIR)/setsockopt.Po
+       -rm -f ./$(DEPDIR)/sig-handler.Po
+       -rm -f ./$(DEPDIR)/sigaction.Po
+       -rm -f ./$(DEPDIR)/sigprocmask.Po
        -rm -f ./$(DEPDIR)/sleep.Po
        -rm -f ./$(DEPDIR)/snprintf.Po
        -rm -f ./$(DEPDIR)/socket.Po
@@ -5243,12 +6208,14 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-c-stack.Po
        -rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
        -rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
+       -rm -f ./$(DEPDIR)/test-calloc-gnu.Po
        -rm -f ./$(DEPDIR)/test-cloexec.Po
        -rm -f ./$(DEPDIR)/test-close.Po
        -rm -f ./$(DEPDIR)/test-connect.Po
        -rm -f ./$(DEPDIR)/test-ctype.Po
        -rm -f ./$(DEPDIR)/test-dirname.Po
        -rm -f ./$(DEPDIR)/test-dup2.Po
+       -rm -f ./$(DEPDIR)/test-dynarray.Po
        -rm -f ./$(DEPDIR)/test-environ.Po
        -rm -f ./$(DEPDIR)/test-errno.Po
        -rm -f ./$(DEPDIR)/test-exclude.Po
@@ -5260,9 +6227,11 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-float.Po
        -rm -f ./$(DEPDIR)/test-fnmatch-h.Po
        -rm -f ./$(DEPDIR)/test-fnmatch.Po
+       -rm -f ./$(DEPDIR)/test-fopen-gnu.Po
+       -rm -f ./$(DEPDIR)/test-fopen.Po
        -rm -f ./$(DEPDIR)/test-fputc.Po
        -rm -f ./$(DEPDIR)/test-fread.Po
-       -rm -f ./$(DEPDIR)/test-freopen-safer.Po
+       -rm -f ./$(DEPDIR)/test-free.Po
        -rm -f ./$(DEPDIR)/test-freopen.Po
        -rm -f ./$(DEPDIR)/test-fstat.Po
        -rm -f ./$(DEPDIR)/test-ftruncate.Po
@@ -5272,7 +6241,9 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
        -rm -f ./$(DEPDIR)/test-getopt-posix.Po
        -rm -f ./$(DEPDIR)/test-getprogname.Po
+       -rm -f ./$(DEPDIR)/test-getrandom.Po
        -rm -f ./$(DEPDIR)/test-gettimeofday.Po
+       -rm -f ./$(DEPDIR)/test-hard-locale.Po
        -rm -f ./$(DEPDIR)/test-hash.Po
        -rm -f ./$(DEPDIR)/test-iconv-h.Po
        -rm -f ./$(DEPDIR)/test-iconv.Po
@@ -5284,6 +6255,8 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-ioctl.Po
        -rm -f ./$(DEPDIR)/test-isblank.Po
        -rm -f ./$(DEPDIR)/test-iswblank.Po
+       -rm -f ./$(DEPDIR)/test-iswdigit.Po
+       -rm -f ./$(DEPDIR)/test-iswxdigit.Po
        -rm -f ./$(DEPDIR)/test-langinfo.Po
        -rm -f ./$(DEPDIR)/test-limits-h.Po
        -rm -f ./$(DEPDIR)/test-listen.Po
@@ -5291,6 +6264,7 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-locale.Po
        -rm -f ./$(DEPDIR)/test-localeconv.Po
        -rm -f ./$(DEPDIR)/test-lstat.Po
+       -rm -f ./$(DEPDIR)/test-malloc-gnu.Po
        -rm -f ./$(DEPDIR)/test-malloca.Po
        -rm -f ./$(DEPDIR)/test-mbrtowc-w32.Po
        -rm -f ./$(DEPDIR)/test-mbrtowc.Po
@@ -5304,6 +6278,7 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-mkdir.Po
        -rm -f ./$(DEPDIR)/test-nanosleep.Po
        -rm -f ./$(DEPDIR)/test-netinet_in.Po
+       -rm -f ./$(DEPDIR)/test-nl_langinfo-mt.Po
        -rm -f ./$(DEPDIR)/test-nl_langinfo.Po
        -rm -f ./$(DEPDIR)/test-nstrftime.Po
        -rm -f ./$(DEPDIR)/test-open.Po
@@ -5311,22 +6286,34 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-perror.Po
        -rm -f ./$(DEPDIR)/test-perror2.Po
        -rm -f ./$(DEPDIR)/test-pipe.Po
+       -rm -f ./$(DEPDIR)/test-pthread-thread.Po
+       -rm -f ./$(DEPDIR)/test-pthread.Po
+       -rm -f ./$(DEPDIR)/test-pthread_sigmask1.Po
+       -rm -f ./$(DEPDIR)/test-pthread_sigmask2.Po
        -rm -f ./$(DEPDIR)/test-quotearg-simple.Po
        -rm -f ./$(DEPDIR)/test-raise.Po
        -rm -f ./$(DEPDIR)/test-rawmemchr.Po
        -rm -f ./$(DEPDIR)/test-readlink.Po
+       -rm -f ./$(DEPDIR)/test-realloc-gnu.Po
+       -rm -f ./$(DEPDIR)/test-reallocarray.Po
        -rm -f ./$(DEPDIR)/test-regex.Po
+       -rm -f ./$(DEPDIR)/test-sched.Po
        -rm -f ./$(DEPDIR)/test-select-fd.Po
        -rm -f ./$(DEPDIR)/test-select-stdin.Po
        -rm -f ./$(DEPDIR)/test-select.Po
        -rm -f ./$(DEPDIR)/test-setenv.Po
-       -rm -f ./$(DEPDIR)/test-setlocale1.Po
-       -rm -f ./$(DEPDIR)/test-setlocale2.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null-mt-all.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null-mt-one.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null.Po
        -rm -f ./$(DEPDIR)/test-setsockopt.Po
        -rm -f ./$(DEPDIR)/test-sh-quote.Po
        -rm -f ./$(DEPDIR)/test-sigaction.Po
        -rm -f ./$(DEPDIR)/test-signal-h.Po
        -rm -f ./$(DEPDIR)/test-sigprocmask.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-segv1.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-segv2.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-stackoverflow1.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-stackoverflow2.Po
        -rm -f ./$(DEPDIR)/test-sleep.Po
        -rm -f ./$(DEPDIR)/test-snprintf.Po
        -rm -f ./$(DEPDIR)/test-sockets.Po
@@ -5344,10 +6331,11 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-string.Po
        -rm -f ./$(DEPDIR)/test-strings.Po
        -rm -f ./$(DEPDIR)/test-strnlen.Po
-       -rm -f ./$(DEPDIR)/test-strtoull.Po
-       -rm -f ./$(DEPDIR)/test-strtoumax.Po
+       -rm -f ./$(DEPDIR)/test-strtoimax.Po
+       -rm -f ./$(DEPDIR)/test-strtoll.Po
        -rm -f ./$(DEPDIR)/test-symlink.Po
        -rm -f ./$(DEPDIR)/test-sys_ioctl.Po
+       -rm -f ./$(DEPDIR)/test-sys_random.Po
        -rm -f ./$(DEPDIR)/test-sys_select.Po
        -rm -f ./$(DEPDIR)/test-sys_socket.Po
        -rm -f ./$(DEPDIR)/test-sys_stat.Po
@@ -5355,6 +6343,8 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-sys_types.Po
        -rm -f ./$(DEPDIR)/test-sys_uio.Po
        -rm -f ./$(DEPDIR)/test-sys_wait.Po
+       -rm -f ./$(DEPDIR)/test-thread_create.Po
+       -rm -f ./$(DEPDIR)/test-thread_self.Po
        -rm -f ./$(DEPDIR)/test-time.Po
        -rm -f ./$(DEPDIR)/test-timespec.Po
        -rm -f ./$(DEPDIR)/test-unistd.Po
@@ -5370,14 +6360,19 @@ distclean: distclean-recursive
        -rm -f ./$(DEPDIR)/test-wctype-h.Po
        -rm -f ./$(DEPDIR)/test-wcwidth.Po
        -rm -f ./$(DEPDIR)/test-xalloc-die.Po
+       -rm -f ./$(DEPDIR)/test-xstdopen.Po
+       -rm -f ./$(DEPDIR)/test-xstrtoimax.Po
        -rm -f ./$(DEPDIR)/test-xstrtol.Po
        -rm -f ./$(DEPDIR)/test-xstrtoul.Po
-       -rm -f ./$(DEPDIR)/test-xstrtoumax.Po
        -rm -f ./$(DEPDIR)/test-xvasprintf.Po
        -rm -f ./$(DEPDIR)/timespec-add.Po
        -rm -f ./$(DEPDIR)/timespec-sub.Po
        -rm -f ./$(DEPDIR)/wctob.Po
        -rm -f ./$(DEPDIR)/wctomb.Po
+       -rm -f ./$(DEPDIR)/windows-thread.Po
+       -rm -f ./$(DEPDIR)/windows-tls.Po
+       -rm -f ./$(DEPDIR)/xstrtol-error.Po
+       -rm -f glthread/$(DEPDIR)/thread.Po
        -rm -f unistr/$(DEPDIR)/test-u8-mbtoucr.Po
        -rm -f unistr/$(DEPDIR)/test-u8-uctomb.Po
        -rm -f uniwidth/$(DEPDIR)/test-uc_width.Po
@@ -5428,24 +6423,30 @@ installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
                -rm -f ./$(DEPDIR)/accept.Po
+       -rm -f ./$(DEPDIR)/alloca.Po
+       -rm -f ./$(DEPDIR)/atoll.Po
        -rm -f ./$(DEPDIR)/bind.Po
        -rm -f ./$(DEPDIR)/connect.Po
        -rm -f ./$(DEPDIR)/dtotimespec.Po
        -rm -f ./$(DEPDIR)/fdopen.Po
        -rm -f ./$(DEPDIR)/ftruncate.Po
        -rm -f ./$(DEPDIR)/getcwd-lgpl.Po
-       -rm -f ./$(DEPDIR)/getpagesize.Po
        -rm -f ./$(DEPDIR)/hash-pjw.Po
        -rm -f ./$(DEPDIR)/inet_pton.Po
        -rm -f ./$(DEPDIR)/ioctl.Po
        -rm -f ./$(DEPDIR)/listen.Po
+       -rm -f ./$(DEPDIR)/locale.Po
        -rm -f ./$(DEPDIR)/nanosleep.Po
        -rm -f ./$(DEPDIR)/perror.Po
        -rm -f ./$(DEPDIR)/pipe.Po
+       -rm -f ./$(DEPDIR)/pthread-thread.Po
+       -rm -f ./$(DEPDIR)/pthread_sigmask.Po
        -rm -f ./$(DEPDIR)/putenv.Po
        -rm -f ./$(DEPDIR)/select.Po
-       -rm -f ./$(DEPDIR)/setlocale.Po
        -rm -f ./$(DEPDIR)/setsockopt.Po
+       -rm -f ./$(DEPDIR)/sig-handler.Po
+       -rm -f ./$(DEPDIR)/sigaction.Po
+       -rm -f ./$(DEPDIR)/sigprocmask.Po
        -rm -f ./$(DEPDIR)/sleep.Po
        -rm -f ./$(DEPDIR)/snprintf.Po
        -rm -f ./$(DEPDIR)/socket.Po
@@ -5466,12 +6467,14 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-c-stack.Po
        -rm -f ./$(DEPDIR)/test-c-strcasecmp.Po
        -rm -f ./$(DEPDIR)/test-c-strncasecmp.Po
+       -rm -f ./$(DEPDIR)/test-calloc-gnu.Po
        -rm -f ./$(DEPDIR)/test-cloexec.Po
        -rm -f ./$(DEPDIR)/test-close.Po
        -rm -f ./$(DEPDIR)/test-connect.Po
        -rm -f ./$(DEPDIR)/test-ctype.Po
        -rm -f ./$(DEPDIR)/test-dirname.Po
        -rm -f ./$(DEPDIR)/test-dup2.Po
+       -rm -f ./$(DEPDIR)/test-dynarray.Po
        -rm -f ./$(DEPDIR)/test-environ.Po
        -rm -f ./$(DEPDIR)/test-errno.Po
        -rm -f ./$(DEPDIR)/test-exclude.Po
@@ -5483,9 +6486,11 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-float.Po
        -rm -f ./$(DEPDIR)/test-fnmatch-h.Po
        -rm -f ./$(DEPDIR)/test-fnmatch.Po
+       -rm -f ./$(DEPDIR)/test-fopen-gnu.Po
+       -rm -f ./$(DEPDIR)/test-fopen.Po
        -rm -f ./$(DEPDIR)/test-fputc.Po
        -rm -f ./$(DEPDIR)/test-fread.Po
-       -rm -f ./$(DEPDIR)/test-freopen-safer.Po
+       -rm -f ./$(DEPDIR)/test-free.Po
        -rm -f ./$(DEPDIR)/test-freopen.Po
        -rm -f ./$(DEPDIR)/test-fstat.Po
        -rm -f ./$(DEPDIR)/test-ftruncate.Po
@@ -5495,7 +6500,9 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-getopt-gnu.Po
        -rm -f ./$(DEPDIR)/test-getopt-posix.Po
        -rm -f ./$(DEPDIR)/test-getprogname.Po
+       -rm -f ./$(DEPDIR)/test-getrandom.Po
        -rm -f ./$(DEPDIR)/test-gettimeofday.Po
+       -rm -f ./$(DEPDIR)/test-hard-locale.Po
        -rm -f ./$(DEPDIR)/test-hash.Po
        -rm -f ./$(DEPDIR)/test-iconv-h.Po
        -rm -f ./$(DEPDIR)/test-iconv.Po
@@ -5507,6 +6514,8 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-ioctl.Po
        -rm -f ./$(DEPDIR)/test-isblank.Po
        -rm -f ./$(DEPDIR)/test-iswblank.Po
+       -rm -f ./$(DEPDIR)/test-iswdigit.Po
+       -rm -f ./$(DEPDIR)/test-iswxdigit.Po
        -rm -f ./$(DEPDIR)/test-langinfo.Po
        -rm -f ./$(DEPDIR)/test-limits-h.Po
        -rm -f ./$(DEPDIR)/test-listen.Po
@@ -5514,6 +6523,7 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-locale.Po
        -rm -f ./$(DEPDIR)/test-localeconv.Po
        -rm -f ./$(DEPDIR)/test-lstat.Po
+       -rm -f ./$(DEPDIR)/test-malloc-gnu.Po
        -rm -f ./$(DEPDIR)/test-malloca.Po
        -rm -f ./$(DEPDIR)/test-mbrtowc-w32.Po
        -rm -f ./$(DEPDIR)/test-mbrtowc.Po
@@ -5527,6 +6537,7 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-mkdir.Po
        -rm -f ./$(DEPDIR)/test-nanosleep.Po
        -rm -f ./$(DEPDIR)/test-netinet_in.Po
+       -rm -f ./$(DEPDIR)/test-nl_langinfo-mt.Po
        -rm -f ./$(DEPDIR)/test-nl_langinfo.Po
        -rm -f ./$(DEPDIR)/test-nstrftime.Po
        -rm -f ./$(DEPDIR)/test-open.Po
@@ -5534,22 +6545,34 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-perror.Po
        -rm -f ./$(DEPDIR)/test-perror2.Po
        -rm -f ./$(DEPDIR)/test-pipe.Po
+       -rm -f ./$(DEPDIR)/test-pthread-thread.Po
+       -rm -f ./$(DEPDIR)/test-pthread.Po
+       -rm -f ./$(DEPDIR)/test-pthread_sigmask1.Po
+       -rm -f ./$(DEPDIR)/test-pthread_sigmask2.Po
        -rm -f ./$(DEPDIR)/test-quotearg-simple.Po
        -rm -f ./$(DEPDIR)/test-raise.Po
        -rm -f ./$(DEPDIR)/test-rawmemchr.Po
        -rm -f ./$(DEPDIR)/test-readlink.Po
+       -rm -f ./$(DEPDIR)/test-realloc-gnu.Po
+       -rm -f ./$(DEPDIR)/test-reallocarray.Po
        -rm -f ./$(DEPDIR)/test-regex.Po
+       -rm -f ./$(DEPDIR)/test-sched.Po
        -rm -f ./$(DEPDIR)/test-select-fd.Po
        -rm -f ./$(DEPDIR)/test-select-stdin.Po
        -rm -f ./$(DEPDIR)/test-select.Po
        -rm -f ./$(DEPDIR)/test-setenv.Po
-       -rm -f ./$(DEPDIR)/test-setlocale1.Po
-       -rm -f ./$(DEPDIR)/test-setlocale2.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null-mt-all.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null-mt-one.Po
+       -rm -f ./$(DEPDIR)/test-setlocale_null.Po
        -rm -f ./$(DEPDIR)/test-setsockopt.Po
        -rm -f ./$(DEPDIR)/test-sh-quote.Po
        -rm -f ./$(DEPDIR)/test-sigaction.Po
        -rm -f ./$(DEPDIR)/test-signal-h.Po
        -rm -f ./$(DEPDIR)/test-sigprocmask.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-segv1.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-segv2.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-stackoverflow1.Po
+       -rm -f ./$(DEPDIR)/test-sigsegv-catch-stackoverflow2.Po
        -rm -f ./$(DEPDIR)/test-sleep.Po
        -rm -f ./$(DEPDIR)/test-snprintf.Po
        -rm -f ./$(DEPDIR)/test-sockets.Po
@@ -5567,10 +6590,11 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-string.Po
        -rm -f ./$(DEPDIR)/test-strings.Po
        -rm -f ./$(DEPDIR)/test-strnlen.Po
-       -rm -f ./$(DEPDIR)/test-strtoull.Po
-       -rm -f ./$(DEPDIR)/test-strtoumax.Po
+       -rm -f ./$(DEPDIR)/test-strtoimax.Po
+       -rm -f ./$(DEPDIR)/test-strtoll.Po
        -rm -f ./$(DEPDIR)/test-symlink.Po
        -rm -f ./$(DEPDIR)/test-sys_ioctl.Po
+       -rm -f ./$(DEPDIR)/test-sys_random.Po
        -rm -f ./$(DEPDIR)/test-sys_select.Po
        -rm -f ./$(DEPDIR)/test-sys_socket.Po
        -rm -f ./$(DEPDIR)/test-sys_stat.Po
@@ -5578,6 +6602,8 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-sys_types.Po
        -rm -f ./$(DEPDIR)/test-sys_uio.Po
        -rm -f ./$(DEPDIR)/test-sys_wait.Po
+       -rm -f ./$(DEPDIR)/test-thread_create.Po
+       -rm -f ./$(DEPDIR)/test-thread_self.Po
        -rm -f ./$(DEPDIR)/test-time.Po
        -rm -f ./$(DEPDIR)/test-timespec.Po
        -rm -f ./$(DEPDIR)/test-unistd.Po
@@ -5593,14 +6619,19 @@ maintainer-clean: maintainer-clean-recursive
        -rm -f ./$(DEPDIR)/test-wctype-h.Po
        -rm -f ./$(DEPDIR)/test-wcwidth.Po
        -rm -f ./$(DEPDIR)/test-xalloc-die.Po
+       -rm -f ./$(DEPDIR)/test-xstdopen.Po
+       -rm -f ./$(DEPDIR)/test-xstrtoimax.Po
        -rm -f ./$(DEPDIR)/test-xstrtol.Po
        -rm -f ./$(DEPDIR)/test-xstrtoul.Po
-       -rm -f ./$(DEPDIR)/test-xstrtoumax.Po
        -rm -f ./$(DEPDIR)/test-xvasprintf.Po
        -rm -f ./$(DEPDIR)/timespec-add.Po
        -rm -f ./$(DEPDIR)/timespec-sub.Po
        -rm -f ./$(DEPDIR)/wctob.Po
        -rm -f ./$(DEPDIR)/wctomb.Po
+       -rm -f ./$(DEPDIR)/windows-thread.Po
+       -rm -f ./$(DEPDIR)/windows-tls.Po
+       -rm -f ./$(DEPDIR)/xstrtol-error.Po
+       -rm -f glthread/$(DEPDIR)/thread.Po
        -rm -f unistr/$(DEPDIR)/test-u8-mbtoucr.Po
        -rm -f unistr/$(DEPDIR)/test-u8-uctomb.Po
        -rm -f uniwidth/$(DEPDIR)/test-uc_width.Po
@@ -5624,7 +6655,7 @@ ps-am:
 uninstall-am:
 
 .MAKE: $(am__recursive_targets) all check check-am install install-am \
-       install-strip
+       install-exec install-strip
 
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
        am--depfiles check check-TESTS check-am clean \
@@ -5658,8 +6689,9 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
              -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
              -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
              -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
-             -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
-             -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
+             -e 's/@''GNULIB_INET_NTOP''@/$(GL_GNULIB_INET_NTOP)/g' \
+             -e 's/@''GNULIB_INET_PTON''@/$(GL_GNULIB_INET_PTON)/g' \
+             -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
              -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
              -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
@@ -5689,16 +6721,162 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
 @GL_GENERATE_NETINET_IN_H_FALSE@netinet/in.h: $(top_builddir)/config.status
 @GL_GENERATE_NETINET_IN_H_FALSE@       rm -f $@
 
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_TRUE@  $(AM_V_GEN)rm -f $@-t $@ && \
-@GL_GENERATE_STDALIGN_H_TRUE@  { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_STDALIGN_H_TRUE@    cat $(srcdir)/stdalign.in.h; \
-@GL_GENERATE_STDALIGN_H_TRUE@  } > $@-t && \
-@GL_GENERATE_STDALIGN_H_TRUE@  mv $@-t $@
-@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@
+# We need the following in order to create <pthread.h> when the system
+# doesn't have one that works with the given compiler.
+pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
+             -e 's/@''GNULIB_PTHREAD_THREAD''@/$(GL_GNULIB_PTHREAD_THREAD)/g' \
+             -e 's/@''GNULIB_PTHREAD_ONCE''@/$(GL_GNULIB_PTHREAD_ONCE)/g' \
+             -e 's/@''GNULIB_PTHREAD_MUTEX''@/$(GL_GNULIB_PTHREAD_MUTEX)/g' \
+             -e 's/@''GNULIB_PTHREAD_RWLOCK''@/$(GL_GNULIB_PTHREAD_RWLOCK)/g' \
+             -e 's/@''GNULIB_PTHREAD_COND''@/$(GL_GNULIB_PTHREAD_COND)/g' \
+             -e 's/@''GNULIB_PTHREAD_TSS''@/$(GL_GNULIB_PTHREAD_TSS)/g' \
+             -e 's/@''GNULIB_PTHREAD_SPIN''@/$(GL_GNULIB_PTHREAD_SPIN)/g' \
+             -e 's/@''GNULIB_PTHREAD_MUTEX_TIMEDLOCK''@/$(GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK)/g' \
+             -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \
+             -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \
+             -e 's|@''HAVE_PTHREAD_CREATE_DETACHED''@|$(HAVE_PTHREAD_CREATE_DETACHED)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_RECURSIVE''@|$(HAVE_PTHREAD_MUTEX_RECURSIVE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_ROBUST''@|$(HAVE_PTHREAD_MUTEX_ROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_PROCESS_SHARED''@|$(HAVE_PTHREAD_PROCESS_SHARED)|g' \
+             -e 's|@''HAVE_PTHREAD_CREATE''@|$(HAVE_PTHREAD_CREATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_INIT''@|$(HAVE_PTHREAD_ATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_GETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_GETDETACHSTATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_SETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_SETDETACHSTATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_DESTROY''@|$(HAVE_PTHREAD_ATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_SELF''@|$(HAVE_PTHREAD_SELF)|g' \
+             -e 's|@''HAVE_PTHREAD_EQUAL''@|$(HAVE_PTHREAD_EQUAL)|g' \
+             -e 's|@''HAVE_PTHREAD_DETACH''@|$(HAVE_PTHREAD_DETACH)|g' \
+             -e 's|@''HAVE_PTHREAD_JOIN''@|$(HAVE_PTHREAD_JOIN)|g' \
+             -e 's|@''HAVE_PTHREAD_EXIT''@|$(HAVE_PTHREAD_EXIT)|g' \
+             -e 's|@''HAVE_PTHREAD_ONCE''@|$(HAVE_PTHREAD_ONCE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_INIT''@|$(HAVE_PTHREAD_MUTEX_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_INIT''@|$(HAVE_PTHREAD_MUTEXATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_GETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_GETTYPE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_SETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_SETTYPE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_GETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_GETROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_SETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_SETROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_DESTROY''@|$(HAVE_PTHREAD_MUTEXATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_LOCK''@|$(HAVE_PTHREAD_MUTEX_LOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_TRYLOCK''@|$(HAVE_PTHREAD_MUTEX_TRYLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_TIMEDLOCK''@|$(HAVE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_UNLOCK''@|$(HAVE_PTHREAD_MUTEX_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_DESTROY''@|$(HAVE_PTHREAD_MUTEX_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_INIT''@|$(HAVE_PTHREAD_RWLOCK_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCKATTR_INIT''@|$(HAVE_PTHREAD_RWLOCKATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCKATTR_DESTROY''@|$(HAVE_PTHREAD_RWLOCKATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_RDLOCK''@|$(HAVE_PTHREAD_RWLOCK_RDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_WRLOCK''@|$(HAVE_PTHREAD_RWLOCK_WRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYRDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYWRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_UNLOCK''@|$(HAVE_PTHREAD_RWLOCK_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_DESTROY''@|$(HAVE_PTHREAD_RWLOCK_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_INIT''@|$(HAVE_PTHREAD_COND_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_CONDATTR_INIT''@|$(HAVE_PTHREAD_CONDATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_CONDATTR_DESTROY''@|$(HAVE_PTHREAD_CONDATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_WAIT''@|$(HAVE_PTHREAD_COND_WAIT)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_TIMEDWAIT''@|$(HAVE_PTHREAD_COND_TIMEDWAIT)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_SIGNAL''@|$(HAVE_PTHREAD_COND_SIGNAL)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_BROADCAST''@|$(HAVE_PTHREAD_COND_BROADCAST)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_DESTROY''@|$(HAVE_PTHREAD_COND_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_KEY_CREATE''@|$(HAVE_PTHREAD_KEY_CREATE)|g' \
+             -e 's|@''HAVE_PTHREAD_SETSPECIFIC''@|$(HAVE_PTHREAD_SETSPECIFIC)|g' \
+             -e 's|@''HAVE_PTHREAD_GETSPECIFIC''@|$(HAVE_PTHREAD_GETSPECIFIC)|g' \
+             -e 's|@''HAVE_PTHREAD_KEY_DELETE''@|$(HAVE_PTHREAD_KEY_DELETE)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_INIT''@|$(HAVE_PTHREAD_SPIN_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_LOCK''@|$(HAVE_PTHREAD_SPIN_LOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_TRYLOCK''@|$(HAVE_PTHREAD_SPIN_TRYLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_UNLOCK''@|$(HAVE_PTHREAD_SPIN_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_DESTROY''@|$(HAVE_PTHREAD_SPIN_DESTROY)|g' \
+             < $(srcdir)/pthread.in.h | \
+         sed -e 's|@''REPLACE_PTHREAD_CREATE''@|$(REPLACE_PTHREAD_CREATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_INIT''@|$(REPLACE_PTHREAD_ATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_GETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_GETDETACHSTATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_SETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_SETDETACHSTATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_DESTROY''@|$(REPLACE_PTHREAD_ATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_SELF''@|$(REPLACE_PTHREAD_SELF)|g' \
+             -e 's|@''REPLACE_PTHREAD_EQUAL''@|$(REPLACE_PTHREAD_EQUAL)|g' \
+             -e 's|@''REPLACE_PTHREAD_DETACH''@|$(REPLACE_PTHREAD_DETACH)|g' \
+             -e 's|@''REPLACE_PTHREAD_JOIN''@|$(REPLACE_PTHREAD_JOIN)|g' \
+             -e 's|@''REPLACE_PTHREAD_EXIT''@|$(REPLACE_PTHREAD_EXIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_ONCE''@|$(REPLACE_PTHREAD_ONCE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_INIT''@|$(REPLACE_PTHREAD_MUTEX_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_INIT''@|$(REPLACE_PTHREAD_MUTEXATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_GETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_GETTYPE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_SETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_SETTYPE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_GETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_GETROBUST)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_SETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_SETROBUST)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_DESTROY''@|$(REPLACE_PTHREAD_MUTEXATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_LOCK''@|$(REPLACE_PTHREAD_MUTEX_LOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_TRYLOCK''@|$(REPLACE_PTHREAD_MUTEX_TRYLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_TIMEDLOCK''@|$(REPLACE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_UNLOCK''@|$(REPLACE_PTHREAD_MUTEX_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_DESTROY''@|$(REPLACE_PTHREAD_MUTEX_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_INIT''@|$(REPLACE_PTHREAD_RWLOCK_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCKATTR_INIT''@|$(REPLACE_PTHREAD_RWLOCKATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCKATTR_DESTROY''@|$(REPLACE_PTHREAD_RWLOCKATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_RDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_RDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_WRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_WRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYRDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYWRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_UNLOCK''@|$(REPLACE_PTHREAD_RWLOCK_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_DESTROY''@|$(REPLACE_PTHREAD_RWLOCK_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_INIT''@|$(REPLACE_PTHREAD_COND_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_CONDATTR_INIT''@|$(REPLACE_PTHREAD_CONDATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_CONDATTR_DESTROY''@|$(REPLACE_PTHREAD_CONDATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_WAIT''@|$(REPLACE_PTHREAD_COND_WAIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_TIMEDWAIT''@|$(REPLACE_PTHREAD_COND_TIMEDWAIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_SIGNAL''@|$(REPLACE_PTHREAD_COND_SIGNAL)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_BROADCAST''@|$(REPLACE_PTHREAD_COND_BROADCAST)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_DESTROY''@|$(REPLACE_PTHREAD_COND_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_KEY_CREATE''@|$(REPLACE_PTHREAD_KEY_CREATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_SETSPECIFIC''@|$(REPLACE_PTHREAD_SETSPECIFIC)|g' \
+             -e 's|@''REPLACE_PTHREAD_GETSPECIFIC''@|$(REPLACE_PTHREAD_GETSPECIFIC)|g' \
+             -e 's|@''REPLACE_PTHREAD_KEY_DELETE''@|$(REPLACE_PTHREAD_KEY_DELETE)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_INIT''@|$(REPLACE_PTHREAD_SPIN_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_LOCK''@|$(REPLACE_PTHREAD_SPIN_LOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_TRYLOCK''@|$(REPLACE_PTHREAD_SPIN_TRYLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_UNLOCK''@|$(REPLACE_PTHREAD_SPIN_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_DESTROY''@|$(REPLACE_PTHREAD_SPIN_DESTROY)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+
+# We need the following in order to create a replacement for <sched.h> when
+# the system doesn't have one.
+sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+             -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+             -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
+             -e 's/@''GNULIB_SCHED_YIELD''@/$(GL_GNULIB_SCHED_YIELD)/g' \
+             -e 's|@''HAVE_SCHED_YIELD''@|$(HAVE_SCHED_YIELD)|g' \
+             -e 's|@''REPLACE_SCHED_YIELD''@|$(REPLACE_SCHED_YIELD)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sched.in.h; \
+       } > $@-t && \
+       mv $@-t $@
 
 # We need the following in order to create <sys/ioctl.h> when the system
 # does not have a complete one.
@@ -5712,7 +6890,7 @@ sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
-             -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
+             -e 's/@''GNULIB_IOCTL''@/$(GL_GNULIB_IOCTL)/g' \
              -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
              -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
              -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
@@ -5734,8 +6912,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
              -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
-             -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
-             -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
+             -e 's/@''GNULIB_PSELECT''@/$(GL_GNULIB_PSELECT)/g' \
+             -e 's/@''GNULIB_SELECT''@/$(GL_GNULIB_SELECT)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
              -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
@@ -5758,22 +6936,22 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
              -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-             -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
-             -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
-             -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
-             -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
-             -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
-             -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
-             -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
-             -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
-             -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
-             -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
-             -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
-             -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
-             -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_SOCKET''@/$(GL_GNULIB_SOCKET)/g' \
+             -e 's/@''GNULIB_CONNECT''@/$(GL_GNULIB_CONNECT)/g' \
+             -e 's/@''GNULIB_ACCEPT''@/$(GL_GNULIB_ACCEPT)/g' \
+             -e 's/@''GNULIB_BIND''@/$(GL_GNULIB_BIND)/g' \
+             -e 's/@''GNULIB_GETPEERNAME''@/$(GL_GNULIB_GETPEERNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKNAME''@/$(GL_GNULIB_GETSOCKNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKOPT''@/$(GL_GNULIB_GETSOCKOPT)/g' \
+             -e 's/@''GNULIB_LISTEN''@/$(GL_GNULIB_LISTEN)/g' \
+             -e 's/@''GNULIB_RECV''@/$(GL_GNULIB_RECV)/g' \
+             -e 's/@''GNULIB_SEND''@/$(GL_GNULIB_SEND)/g' \
+             -e 's/@''GNULIB_RECVFROM''@/$(GL_GNULIB_RECVFROM)/g' \
+             -e 's/@''GNULIB_SENDTO''@/$(GL_GNULIB_SENDTO)/g' \
+             -e 's/@''GNULIB_SETSOCKOPT''@/$(GL_GNULIB_SETSOCKOPT)/g' \
+             -e 's/@''GNULIB_SHUTDOWN''@/$(GL_GNULIB_SHUTDOWN)/g' \
+             -e 's/@''GNULIB_ACCEPT4''@/$(GL_GNULIB_ACCEPT4)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
@@ -5803,6 +6981,20 @@ sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
        } > $@-t && \
        mv -f $@-t $@
 
+all: all-notice
+all-notice:
+       @echo '## ---------------------------------------------------- ##'
+       @echo '## ------------------- Gnulib tests ------------------- ##'
+       @echo '## You can ignore compiler warnings in this directory.  ##'
+       @echo '## ---------------------------------------------------- ##'
+
+check-am: check-notice
+check-notice:
+       @echo '## ---------------------------------------------------------------------- ##'
+       @echo '## ---------------------------- Gnulib tests ---------------------------- ##'
+       @echo '## Please report test failures in this directory to <bug-gnulib@gnu.org>. ##'
+       @echo '## ---------------------------------------------------------------------- ##'
+
 # Clean up after Solaris cc.
 clean-local:
        rm -rf SunWS_cache
index 94fdfaf..cb72f26 100644 (file)
@@ -1,10 +1,41 @@
+/* A C macro for declaring that a function does not return.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (defined __cplusplus \
+      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
+      && 0)
+    /* [[noreturn]] is not practically usable, because with it the syntax
+         extern _Noreturn void func (...);
+       would not be valid; such a declaration would only be valid with 'extern'
+       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
+       AIX system header files and several gnulib header files use precisely
+       this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
-# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
-        || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+# elif ((!defined __cplusplus || defined __clang__) \
+        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+            || (!defined __STRICT_ANSI__ \
+                && (__4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+                    || (defined __apple_build_version__ \
+                        ? 6000000 <= __apple_build_version__ \
+                        : 3 < __clang_major__ + (5 <= __clang_minor__))))))
    /* _Noreturn works as-is.  */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
+        || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
index 9659c71..71457db 100644 (file)
@@ -1,18 +1,18 @@
 /* accept.c --- wrappers for Windows accept function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
diff --git a/gnulib-tests/alloca.c b/gnulib-tests/alloca.c
new file mode 100644 (file)
index 0000000..4880283
--- /dev/null
@@ -0,0 +1,202 @@
+/* alloca.c -- allocate automatically reclaimed memory
+   This file is in the public domain.  */
+
+/* (Mostly) portable implementation -- D A Gwyn
+
+   This implementation of the PWB library alloca function,
+   which is used to allocate space off the run-time stack so
+   that it is automatically reclaimed upon procedure exit,
+   was inspired by discussions with J. Q. Johnson of Cornell.
+   J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+   There are some preprocessor constants that can
+   be defined when compiling for your specific system, for
+   improved efficiency; however, the defaults should be okay.
+
+   The general concept of this implementation is to keep
+   track of all alloca-allocated blocks, and reclaim any
+   that are found to be deeper in the stack than the current
+   invocation.  This heuristic does not reclaim storage as
+   soon as it becomes invalid, but it will do so eventually.
+
+   As a special case, alloca(0) reclaims storage without
+   allocating any.  It is a good idea to use alloca(0) in
+   your main control loop, etc. to force garbage collection.  */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef emacs
+# include "lisp.h"
+# include "blockinput.h"
+# ifdef EMACS_FREE
+#  undef free
+#  define free EMACS_FREE
+# endif
+#else
+# define memory_full() abort ()
+#endif
+
+/* If compiling with GCC or clang, this file is not needed.  */
+#if !(defined __GNUC__ || defined __clang__)
+
+/* If someone has defined alloca as a macro,
+   there must be some other way alloca is supposed to work.  */
+# ifndef alloca
+
+#  ifdef emacs
+#   ifdef static
+/* actually, only want this if static is defined as ""
+   -- this is for usg, in which emacs must undefine static
+   in order to make unexec workable
+   */
+#    ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+/* Using #error here is not wise since this file should work for
+   old and obscure compilers.  */
+#    endif /* STACK_DIRECTION undefined */
+#   endif /* static */
+#  endif /* emacs */
+
+/* Define STACK_DIRECTION if you know the direction of stack
+   growth for your system; otherwise it will be automatically
+   deduced at run-time.
+
+   STACK_DIRECTION > 0 => grows toward higher addresses
+   STACK_DIRECTION < 0 => grows toward lower addresses
+   STACK_DIRECTION = 0 => direction of growth unknown  */
+
+#  ifndef STACK_DIRECTION
+#   define STACK_DIRECTION      0       /* Direction unknown.  */
+#  endif
+
+#  if STACK_DIRECTION != 0
+
+#   define STACK_DIR    STACK_DIRECTION /* Known at compile-time.  */
+
+#  else /* STACK_DIRECTION == 0; need run-time code.  */
+
+static int stack_dir;           /* 1 or -1 once known.  */
+#   define STACK_DIR    stack_dir
+
+static int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+#  endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+   (a) chain together all alloca'ed blocks;
+   (b) keep track of stack depth.
+
+   It is very important that sizeof(header) agree with malloc
+   alignment chunk size.  The following default should work okay.  */
+
+#  ifndef       ALIGN_SIZE
+#   define ALIGN_SIZE   sizeof(double)
+#  endif
+
+typedef union hdr
+{
+  char align[ALIGN_SIZE];       /* To force sizeof(header).  */
+  struct
+    {
+      union hdr *next;          /* For chaining headers.  */
+      char *deep;               /* For stack depth measure.  */
+    } h;
+} header;
+
+static header *last_alloca_header = NULL;       /* -> last alloca header.  */
+
+/* Return a pointer to at least SIZE bytes of storage,
+   which will be automatically reclaimed upon exit from
+   the procedure that called alloca.  Originally, this space
+   was supposed to be taken from the current stack frame of the
+   caller, but that method cannot be made to work for some
+   implementations of C, for example under Gould's UTX/32.  */
+
+void *
+alloca (size_t size)
+{
+  auto char probe;              /* Probes stack depth: */
+  register char *depth = &probe;
+
+#  if STACK_DIRECTION == 0
+  if (STACK_DIR == 0)           /* Unknown growth direction.  */
+    STACK_DIR = find_stack_direction (NULL, (size & 1) + 20);
+#  endif
+
+  /* Reclaim garbage, defined as all alloca'd storage that
+     was allocated from deeper in the stack than currently.  */
+
+  {
+    register header *hp;        /* Traverses linked list.  */
+
+#  ifdef emacs
+    BLOCK_INPUT;
+#  endif
+
+    for (hp = last_alloca_header; hp != NULL;)
+      if ((STACK_DIR > 0 && hp->h.deep > depth)
+          || (STACK_DIR < 0 && hp->h.deep < depth))
+        {
+          register header *np = hp->h.next;
+
+          free (hp);            /* Collect garbage.  */
+
+          hp = np;              /* -> next header.  */
+        }
+      else
+        break;                  /* Rest are not deeper.  */
+
+    last_alloca_header = hp;    /* -> last valid storage.  */
+
+#  ifdef emacs
+    UNBLOCK_INPUT;
+#  endif
+  }
+
+  if (size == 0)
+    return NULL;                /* No allocation required.  */
+
+  /* Allocate combined header + user data storage.  */
+
+  {
+    /* Address of header.  */
+    register header *new;
+
+    size_t combined_size = sizeof (header) + size;
+    if (combined_size < sizeof (header))
+      memory_full ();
+
+    new = malloc (combined_size);
+
+    if (! new)
+      memory_full ();
+
+    new->h.next = last_alloca_header;
+    new->h.deep = depth;
+
+    last_alloca_header = new;
+
+    /* User storage begins just after header.  */
+
+    return (void *) (new + 1);
+  }
+}
+
+# endif /* no alloca */
+#endif /* not GCC || clang */
diff --git a/gnulib-tests/altstack-util.h b/gnulib-tests/altstack-util.h
new file mode 100644 (file)
index 0000000..fbd0d13
--- /dev/null
@@ -0,0 +1,66 @@
+/* Some auxiliary stuff for defining an alternate stack.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Eric Blake and Bruno Haible.  */
+
+#include <stdint.h> /* uintptr_t */
+#include <string.h> /* for memset */
+
+#define MYSTACK_SIZE (1 << 24)
+
+/* glibc says: Users should use SIGSTKSZ as the size of user-supplied
+   buffers.  We want to detect stack overflow of the alternate stack
+   in a nicer manner than just crashing, so we overallocate in
+   comparison to what we hand libsigsegv.  Also, we intentionally hand
+   an unaligned pointer, to ensure the alternate stack still ends up
+   aligned.  */
+#define MYSTACK_CRUMPLE_ZONE 8192
+static char mystack_storage[MYSTACK_SIZE + 2 * MYSTACK_CRUMPLE_ZONE + 31];
+static char *mystack; /* MYSTACK_SIZE bytes in the middle of storage. */
+
+static void
+prepare_alternate_stack (void)
+{
+#ifdef SIGSTKSZ
+  if (MYSTACK_SIZE < SIGSTKSZ)
+    {
+      size_t size = SIGSTKSZ;
+      printf ("SIGSTKSZ=%zu exceeds MYSTACK_SIZE=%d\n", size, MYSTACK_SIZE);
+      exit (1);
+    }
+#endif
+  memset (mystack_storage, 's', sizeof mystack_storage);
+  mystack = (char *) ((uintptr_t) (mystack_storage + MYSTACK_CRUMPLE_ZONE) | 31);
+}
+
+static void
+check_alternate_stack_no_overflow (void)
+{
+  unsigned int i;
+
+  for (i = MYSTACK_CRUMPLE_ZONE; i > 0; i--)
+    if (*(mystack - i) != 's')
+      {
+        printf ("Alternate stack was exceeded by %u bytes!!\n", i);
+        exit (1);
+      }
+  for (i = MYSTACK_CRUMPLE_ZONE; i > 0; i--)
+    if (*(mystack + MYSTACK_SIZE - 1 + i) != 's')
+      {
+        printf ("Alternate stack was exceeded by %u bytes!!\n", i);
+        exit (1);
+      }
+}
index 5f03408..b4de241 100644 (file)
@@ -1,24 +1,24 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
    that the values passed as arguments n, ..., m must be non-NULL pointers.
    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
 #ifndef _GL_ARG_NONNULL
-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
 # else
 #  define _GL_ARG_NONNULL(params)
index 3253d79..9968067 100644 (file)
@@ -1,19 +1,19 @@
 /* A GNU-like <arpa/inet.h>.
 
-   Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ARPA_INET_H
 
 #ifndef _@GUARD_PREFIX@_ARPA_INET_H
 #define _@GUARD_PREFIX@_ARPA_INET_H
 
+/* Get all possible declarations of inet_ntop() and inet_pton().  */
+#if (@GNULIB_INET_NTOP@ || @GNULIB_INET_PTON@ || defined GNULIB_POSIXCHECK) \
+    && @HAVE_WS2TCPIP_H@
+# include <ws2tcpip.h>
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -70,8 +76,8 @@
    the return value is NULL and errno is set to ENOSPC.  A good value
    for CNT is 46.
 
-   For more details, see the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/inet_ntop.html>.  */
+   For more details, see the POSIX:2008 specification
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_ntop.html>.  */
 # if @REPLACE_INET_NTOP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef inet_ntop
@@ -97,7 +103,9 @@ _GL_CXXALIAS_SYS_CAST (inet_ntop, const char *,
                        (int af, const void *restrict src,
                         char *restrict dst, socklen_t cnt));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (inet_ntop);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef inet_ntop
 # if HAVE_RAW_DECL_INET_NTOP
@@ -126,7 +134,9 @@ _GL_FUNCDECL_SYS (inet_pton, int,
 _GL_CXXALIAS_SYS (inet_pton, int,
                   (int af, const char *restrict src, void *restrict dst));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (inet_pton);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef inet_pton
 # if HAVE_RAW_DECL_INET_PTON
diff --git a/gnulib-tests/atoll.c b/gnulib-tests/atoll.c
new file mode 100644 (file)
index 0000000..0e40254
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright (C) 1991, 1997-1998, 2008-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+/* Specification.  */
+#include <stdlib.h>
+
+#if _LIBC
+# undef atoll
+#endif
+
+
+/* Convert a string to a long long int.  */
+long long int
+atoll (const char *nptr)
+{
+  return strtoll (nptr, (char **) NULL, 10);
+}
index 5c3556d..0e47254 100644 (file)
@@ -1,18 +1,18 @@
 /* bind.c --- wrappers for Windows bind function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
index 72ff1ff..a47b61a 100644 (file)
@@ -1,17 +1,17 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_CXXDEFS_H
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA (func, rettype, parameters);
+   is to be used when func is a Microsoft deprecated alias, on native Windows.
+   It declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to _func, if GNULIB_NAMESPACE is defined.
+   Example:
+     _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
+ */
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
    except that the C function rpl_func may have a slightly different
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
+   is like  _GL_CXXALIAS_MDA (func, rettype, parameters);
+   except that the C function func may have a slightly different declaration.
+   A cast is used to silence the "invalid conversion" error that would
+   otherwise occur.  */
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
    declares a C++ alias called GNULIB_NAMESPACE::func
    that redirects to the system provided function func, if GNULIB_NAMESPACE
    _GL_CXXALIASWARN_2 (func, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN_2(func,namespace) \
     _GL_WARN_ON_USE (func, \
                      "The symbol ::" #func " refers to the system function. " \
    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+    _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
                          "The symbol ::" #func " refers to the system function. " \
                          "Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-     extern __typeof__ (func) func
 # else
 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
      _GL_EXTERN_C int _gl_cxxalias_dummy
index 300a594..b2b2e93 100644 (file)
@@ -1,18 +1,18 @@
 /* connect.c --- wrappers for Windows connect function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
index dcbd280..73061a3 100644 (file)
@@ -1,6 +1,6 @@
 /* Convert double to timespec.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 669d85d..a5266c8 100644 (file)
@@ -1,17 +1,17 @@
 /* Open a stream with a given file descriptor.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -27,7 +27,8 @@
 
 #undef fdopen
 
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#if defined _WIN32 && !defined __CYGWIN__
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static FILE *
 fdopen_nothrow (int fd, const char *mode)
 {
@@ -35,7 +36,7 @@ fdopen_nothrow (int fd, const char *mode)
 
   TRY_MSVC_INVAL
     {
-      result = fdopen (fd, mode);
+      result = _fdopen (fd, mode);
     }
   CATCH_MSVC_INVAL
     {
@@ -45,6 +46,9 @@ fdopen_nothrow (int fd, const char *mode)
 
   return result;
 }
+# else
+#  define fdopen_nothrow _fdopen
+# endif
 #else
 # define fdopen_nothrow fdopen
 #endif
index 0c04800..4060911 100644 (file)
@@ -1,18 +1,18 @@
 /* Manipulating the FPU control word.  -*- coding: utf-8 -*-
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _FPUCW_H
@@ -43,7 +43,7 @@
 
    See Vincent Lefèvre's page https://www.vinc17.net/research/extended.en.html
    for a good explanation.
-   See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for
+   See https://web.archive.org/web/20060905133417/http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html
    some argumentation which setting should be the default.  */
 
 /* This header file provides the following facilities:
@@ -61,8 +61,8 @@
                                     'long double' safe operation precision
  */
 
-/* Inline assembler like this works only with GNU C.  */
-#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+/* Inline assembler like this works only with GNU C and clang.  */
+#if (defined __i386__ || defined __x86_64__) && (defined __GNUC__ || defined __clang__)
 
 typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
 
@@ -70,12 +70,12 @@ typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
 # define FPU_PC_DOUBLE 0x200    /* glibc calls this _FPU_DOUBLE */
 # define FPU_PC_EXTENDED 0x300  /* glibc calls this _FPU_EXTENDED */
 
-# define GET_FPUCW() \
+# define GET_FPUCW() __extension__ \
   ({ fpucw_t _cw;                                               \
      __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw));         \
      _cw;                                                       \
    })
-# define SET_FPUCW(word) \
+# define SET_FPUCW(word) __extension__ \
   (void)({ fpucw_t _ncw = (word);                               \
            __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw));  \
          })
index 80cb480..873f302 100644 (file)
@@ -1,5 +1,5 @@
 /* ftruncate emulations for native Windows.
-   Copyright (C) 1992-2018 Free Software Foundation, Inc.
+   Copyright (C) 1992-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Specification.  */
 #include <unistd.h>
 
-#if HAVE_CHSIZE
+#if HAVE__CHSIZE
 /* A native Windows platform.  */
 
 # include <errno.h>
 
 # if _GL_WINDOWS_64_BIT_OFF_T
 
-/* Large File Support: off_t is 64-bit, but chsize() takes only a 32-bit
+/* Large File Support: off_t is 64-bit, but _chsize() takes only a 32-bit
    argument.  So, define a 64-bit safe SetFileSize function ourselves.  */
 
 /* Ensure that <windows.h> declares GetFileSizeEx.  */
-#  undef _WIN32_WINNT
-#  define _WIN32_WINNT _WIN32_WINNT_WIN2K
+#  if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+#   undef _WIN32_WINNT
+#   define _WIN32_WINNT _WIN32_WINNT_WIN2K
+#  endif
 
 /* Get declarations of the native Windows API functions.  */
 #  define WIN32_LEAN_AND_MEAN
@@ -168,7 +170,7 @@ chsize_nothrow (int fd, long length)
 
   TRY_MSVC_INVAL
     {
-      result = chsize (fd, length);
+      result = _chsize (fd, length);
     }
   CATCH_MSVC_INVAL
     {
@@ -180,7 +182,7 @@ chsize_nothrow (int fd, long length)
   return result;
 }
 #  else
-#   define chsize_nothrow chsize
+#   define chsize_nothrow _chsize
 #  endif
 
 int
index 9f0e007..a9dd848 100644 (file)
@@ -1,17 +1,17 @@
-/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -38,6 +38,10 @@ typedef int dummy;
    necessary.  */
 
 # undef getcwd
+# if defined _WIN32 && !defined __CYGWIN__
+#  define getcwd _getcwd
+# endif
+
 char *
 rpl_getcwd (char *buf, size_t size)
 {
@@ -65,11 +69,7 @@ rpl_getcwd (char *buf, size_t size)
         }
       result = getcwd (buf, size);
       if (!result)
-        {
-          int saved_errno = errno;
-          free (buf);
-          errno = saved_errno;
-        }
+        free (buf);
       return result;
     }
 
@@ -108,17 +108,18 @@ rpl_getcwd (char *buf, size_t size)
   while (!result && errno == ERANGE);
 
   if (!result)
-    {
-      int saved_errno = errno;
-      free (buf);
-      errno = saved_errno;
-    }
+    free (buf);
   else
     {
-      /* Trim to fit, if possible.  */
-      result = realloc (buf, strlen (buf) + 1);
-      if (!result)
-        result = buf;
+      /* Here result == buf.  */
+      /* Shrink result before returning it.  */
+      size_t actual_size = strlen (result) + 1;
+      if (actual_size < size)
+        {
+          char *shrinked_result = realloc (result, actual_size);
+          if (shrinked_result != NULL)
+            result = shrinked_result;
+        }
     }
   return result;
 }
diff --git a/gnulib-tests/glthread/thread.c b/gnulib-tests/glthread/thread.c
new file mode 100644 (file)
index 0000000..de44932
--- /dev/null
@@ -0,0 +1,216 @@
+/* Creating and controlling threads.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "glthread/thread.h"
+
+#include <stdlib.h>
+#include "glthread/lock.h"
+
+/* ========================================================================= */
+
+#if USE_ISOC_THREADS
+
+struct thrd_with_exitvalue
+{
+  thrd_t volatile tid;
+  void * volatile exitvalue;
+};
+
+/* The Thread-Specific Storage (TSS) key that allows to access each thread's
+   'struct thrd_with_exitvalue *' pointer.  */
+static tss_t thrd_with_exitvalue_key;
+
+/* Initializes thrd_with_exitvalue_key.
+   This function must only be called once.  */
+static void
+do_init_thrd_with_exitvalue_key (void)
+{
+  if (tss_create (&thrd_with_exitvalue_key, NULL) != thrd_success)
+    abort ();
+}
+
+/* Initializes thrd_with_exitvalue_key.  */
+static void
+init_thrd_with_exitvalue_key (void)
+{
+  static once_flag once = ONCE_FLAG_INIT;
+  call_once (&once, do_init_thrd_with_exitvalue_key);
+}
+
+typedef union
+        {
+          struct thrd_with_exitvalue t;
+          struct
+          {
+            thrd_t tid; /* reserve memory for t.tid */
+            void *(*mainfunc) (void *);
+            void *arg;
+          } a;
+        }
+        main_arg_t;
+
+static int
+thrd_main_func (void *pmarg)
+{
+  /* Unpack the object that combines mainfunc and arg.  */
+  main_arg_t *main_arg = (main_arg_t *) pmarg;
+  void *(*mainfunc) (void *) = main_arg->a.mainfunc;
+  void *arg = main_arg->a.arg;
+
+  if (tss_set (thrd_with_exitvalue_key, &main_arg->t) != thrd_success)
+    abort ();
+
+  /* Execute mainfunc, with arg as argument.  */
+  {
+    void *exitvalue = mainfunc (arg);
+    /* Store the exitvalue, for use by glthread_join().  */
+    main_arg->t.exitvalue = exitvalue;
+    return 0;
+  }
+}
+
+int
+glthread_create (gl_thread_t *threadp, void *(*mainfunc) (void *), void *arg)
+{
+  init_thrd_with_exitvalue_key ();
+  {
+    /* Combine mainfunc and arg in a single object.
+       A stack-allocated object does not work, because it would be out of
+       existence when thrd_create returns before thrd_main_func is
+       entered.  So, allocate it in the heap.  */
+    main_arg_t *main_arg = (main_arg_t *) malloc (sizeof (main_arg_t));
+    if (main_arg == NULL)
+      return ENOMEM;
+    main_arg->a.mainfunc = mainfunc;
+    main_arg->a.arg = arg;
+    switch (thrd_create ((thrd_t *) &main_arg->t.tid, thrd_main_func, main_arg))
+      {
+      case thrd_success:
+        break;
+      case thrd_nomem:
+        free (main_arg);
+        return ENOMEM;
+      default:
+        free (main_arg);
+        return EAGAIN;
+      }
+    *threadp = &main_arg->t;
+    return 0;
+  }
+}
+
+gl_thread_t
+gl_thread_self (void)
+{
+  init_thrd_with_exitvalue_key ();
+  {
+    gl_thread_t thread =
+      (struct thrd_with_exitvalue *) tss_get (thrd_with_exitvalue_key);
+    if (thread == NULL)
+      {
+        /* This happens only in threads that have not been created through
+           glthread_create(), such as the main thread.  */
+        for (;;)
+          {
+            thread =
+              (struct thrd_with_exitvalue *)
+              malloc (sizeof (struct thrd_with_exitvalue));
+            if (thread != NULL)
+              break;
+            /* Memory allocation failed.  There is not much we can do.  Have to
+               busy-loop, waiting for the availability of memory.  */
+            {
+              struct timespec ts;
+              ts.tv_sec = 1;
+              ts.tv_nsec = 0;
+              thrd_sleep (&ts, NULL);
+            }
+          }
+        thread->tid = thrd_current ();
+        thread->exitvalue = NULL; /* just to be deterministic */
+        if (tss_set (thrd_with_exitvalue_key, thread) != thrd_success)
+          abort ();
+      }
+    return thread;
+  }
+}
+
+int
+glthread_join (gl_thread_t thread, void **return_value_ptr)
+{
+  /* On Solaris 11.4, thrd_join crashes when the second argument we pass is
+     NULL.  */
+  int dummy;
+
+  if (thread == gl_thread_self ())
+    return EINVAL;
+  if (thrd_join (thread->tid, &dummy) != thrd_success)
+    return EINVAL;
+  if (return_value_ptr != NULL)
+    *return_value_ptr = thread->exitvalue;
+  free (thread);
+  return 0;
+}
+
+_Noreturn void
+gl_thread_exit (void *return_value)
+{
+  gl_thread_t thread = gl_thread_self ();
+  thread->exitvalue = return_value;
+  thrd_exit (0);
+}
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+#include <pthread.h>
+
+#if defined PTW32_VERSION || defined __MVS__
+
+const gl_thread_t gl_null_thread /* = { .p = NULL } */;
+
+#endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+#endif
+
+/* ========================================================================= */
+
+gl_thread_t
+gl_thread_create (void *(*func) (void *arg), void *arg)
+{
+  gl_thread_t thread;
+  int ret;
+
+  ret = glthread_create (&thread, func, arg);
+  if (ret != 0)
+    abort ();
+  return thread;
+}
diff --git a/gnulib-tests/glthread/thread.h b/gnulib-tests/glthread/thread.h
new file mode 100644 (file)
index 0000000..44f05f3
--- /dev/null
@@ -0,0 +1,338 @@
+/* Creating and controlling threads.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-win32.h.  */
+
+/* This file contains primitives for creating and controlling threads.
+
+   Thread data type: gl_thread_t.
+
+   Creating a thread:
+       thread = gl_thread_create (func, arg);
+   Or with control of error handling:
+       err = glthread_create (&thread, func, arg);
+       extern int glthread_create (gl_thread_t *result,
+                                   void *(*func) (void *), void *arg);
+
+   Querying and changing the signal mask of a thread (not supported on all
+   platforms):
+       gl_thread_sigmask (how, newmask, oldmask);
+   Or with control of error handling:
+       err = glthread_sigmask (how, newmask, oldmask);
+       extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask);
+
+   Waiting for termination of another thread:
+       gl_thread_join (thread, &return_value);
+   Or with control of error handling:
+       err = glthread_join (thread, &return_value);
+       extern int glthread_join (gl_thread_t thread, void **return_value_ptr);
+
+   Getting a reference to the current thread:
+       current = gl_thread_self ();
+       extern gl_thread_t gl_thread_self (void);
+
+   Getting a reference to the current thread as a pointer, for debugging:
+       ptr = gl_thread_self_pointer ();
+       extern void * gl_thread_self_pointer (void);
+
+   Terminating the current thread:
+       gl_thread_exit (return_value);
+       extern _Noreturn void gl_thread_exit (void *return_value);
+
+   Requesting custom code to be executed at fork() time (not supported on all
+   platforms):
+       gl_thread_atfork (prepare_func, parent_func, child_func);
+   Or with control of error handling:
+       err = glthread_atfork (prepare_func, parent_func, child_func);
+       extern int glthread_atfork (void (*prepare_func) (void),
+                                   void (*parent_func) (void),
+                                   void (*child_func) (void));
+   Note that even on platforms where this is supported, use of fork() and
+   threads together is problematic, see
+     <https://lists.gnu.org/r/bug-gnulib/2008-08/msg00062.html>
+ */
+
+
+#ifndef _GLTHREAD_THREAD_H
+#define _GLTHREAD_THREAD_H
+
+#include <errno.h>
+#include <stdlib.h>
+
+#if !defined c11_threads_in_use
+# if HAVE_THREADS_H && USE_POSIX_THREADS_FROM_LIBC
+#  define c11_threads_in_use() 1
+# elif HAVE_THREADS_H && USE_POSIX_THREADS_WEAK
+#  include <threads.h>
+#  pragma weak thrd_exit
+#  define c11_threads_in_use() (thrd_exit != NULL)
+# else
+#  define c11_threads_in_use() 0
+# endif
+#endif
+
+/* ========================================================================= */
+
+#if USE_ISOC_THREADS
+
+/* Use the ISO C threads library.  */
+
+# include <threads.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+typedef struct thrd_with_exitvalue *gl_thread_t;
+extern int glthread_create (gl_thread_t *threadp,
+                            void *(*func) (void *), void *arg);
+# define glthread_sigmask(HOW, SET, OSET) \
+    pthread_sigmask (HOW, SET, OSET)
+extern int glthread_join (gl_thread_t thread, void **return_value_ptr);
+extern gl_thread_t gl_thread_self (void);
+# define gl_thread_self_pointer() \
+    (void *) gl_thread_self ()
+extern _Noreturn void gl_thread_exit (void *return_value);
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <pthread.h>
+
+/* On IRIX, pthread_atfork is declared in <unistd.h>, not in <pthread.h>.  */
+# if defined __sgi
+#  include <unistd.h>
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+/* Compilers other than GCC need to see the declaration of pthread_sigmask
+   before the "#pragma weak pthread_sigmask" below.  */
+#  include <signal.h>
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The pthread_in_use() detection needs to be done at runtime.  */
+#  define pthread_in_use() \
+     glthread_in_use ()
+extern int glthread_in_use (void);
+
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+
+/* Use weak references to the POSIX threads library.  */
+
+/* Weak references avoid dragging in external libraries if the other parts
+   of the program don't use them.  Here we use them, because we don't want
+   every program that uses libintl to depend on libpthread.  This assumes
+   that libpthread would not be loaded after libintl; i.e. if libintl is
+   loaded first, by an executable that does not depend on libpthread, and
+   then a module is dynamically loaded that depends on libpthread, libintl
+   will not be multithread-safe.  */
+
+/* The way to test at runtime whether libpthread is present is to test
+   whether a function pointer's value, such as &pthread_mutex_init, is
+   non-NULL.  However, some versions of GCC have a bug through which, in
+   PIC mode, &foo != NULL always evaluates to true if there is a direct
+   call to foo(...) in the same function.  To avoid this, we test the
+   address of a function in libpthread that we don't use.  */
+
+#  ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak.  */
+#   pragma weak pthread_sigmask
+#  endif
+
+#  pragma weak pthread_join
+#  ifndef pthread_self
+#   pragma weak pthread_self
+#  endif
+#  pragma weak pthread_exit
+#  if HAVE_PTHREAD_ATFORK
+#   pragma weak pthread_atfork
+#  endif
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   pragma weak pthread_mutexattr_gettype
+#   define pthread_in_use() \
+      (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+#  endif
+
+# else
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   define pthread_in_use() 1
+#  endif
+
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+/* This choice of gl_thread_t assumes that
+     pthread_equal (a, b)  is equivalent to  ((a) == (b)).
+   This is the case on all platforms in use in 2008.  */
+typedef pthread_t gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS)
+# define glthread_sigmask(HOW, SET, OSET) \
+    (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0)
+# define glthread_join(THREAD, RETVALP) \
+    (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0)
+# ifdef PTW32_VERSION
+   /* In pthreads-win32, pthread_t is a struct with a pointer field 'p' and
+      other fields.  */
+#  define gl_thread_self() \
+     (pthread_in_use () ? pthread_self () : gl_null_thread)
+#  define gl_thread_self_pointer() \
+     (pthread_in_use () ? pthread_self ().p : NULL)
+extern const gl_thread_t gl_null_thread;
+# elif defined __MVS__
+   /* On IBM z/OS, pthread_t is a struct with an 8-byte '__' field.
+      The first three bytes of this field appear to uniquely identify a
+      pthread_t, though not necessarily representing a pointer.  */
+#  define gl_thread_self() \
+     (pthread_in_use () ? pthread_self () : gl_null_thread)
+#  define gl_thread_self_pointer() \
+     (pthread_in_use () ? *((void **) pthread_self ().__) : NULL)
+extern const gl_thread_t gl_null_thread;
+# else
+#  define gl_thread_self() \
+     (pthread_in_use () ? pthread_self () : (pthread_t) 0)
+#  define gl_thread_self_pointer() \
+     (pthread_in_use () ? (void *) pthread_self () : NULL)
+# endif
+# define gl_thread_exit(RETVAL) \
+    (void) (pthread_in_use () ? (pthread_exit (RETVAL), 0) : 0)
+
+# if HAVE_PTHREAD_ATFORK
+#  define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \
+     (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0)
+# else
+#  define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+# include <windows.h>
+
+# include "windows-thread.h"
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* -------------------------- gl_thread_t datatype -------------------------- */
+
+typedef glwthread_thread_t gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) \
+    glwthread_thread_create (THREADP, 0, FUNC, ARG)
+# define glthread_sigmask(HOW, SET, OSET) \
+    /* unsupported */ 0
+# define glthread_join(THREAD, RETVALP) \
+    glwthread_thread_join (THREAD, RETVALP)
+# define gl_thread_self() \
+    glwthread_thread_self ()
+# define gl_thread_self_pointer() \
+    gl_thread_self ()
+# define gl_thread_exit(RETVAL) \
+    glwthread_thread_exit (RETVAL)
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS)
+
+/* Provide dummy implementation if threads are not supported.  */
+
+typedef int gl_thread_t;
+# define glthread_create(THREADP, FUNC, ARG) ENOSYS
+# define glthread_sigmask(HOW, SET, OSET) 0
+# define glthread_join(THREAD, RETVALP) 0
+# define gl_thread_self() 0
+# define gl_thread_self_pointer() \
+    ((void *) gl_thread_self ())
+# define gl_thread_exit(RETVAL) (void)0
+# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0
+
+#endif
+
+/* ========================================================================= */
+
+/* Macros with built-in error handling.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern gl_thread_t gl_thread_create (void *(*func) (void *arg), void *arg);
+#define gl_thread_sigmask(HOW, SET, OSET)     \
+   do                                         \
+     {                                        \
+       if (glthread_sigmask (HOW, SET, OSET)) \
+         abort ();                            \
+     }                                        \
+   while (0)
+#define gl_thread_join(THREAD, RETVAL)     \
+   do                                      \
+     {                                     \
+       if (glthread_join (THREAD, RETVAL)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_thread_atfork(PREPARE, PARENT, CHILD)     \
+   do                                                \
+     {                                               \
+       if (glthread_atfork (PREPARE, PARENT, CHILD)) \
+         abort ();                                   \
+     }                                               \
+   while (0)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GLTHREAD_THREAD_H */
index b92ef27..7eb14e6 100644 (file)
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -43,13 +43,16 @@ CLEANFILES =
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
+CFLAGS = @GL_CFLAG_ALLOW_WARNINGS@ @CFLAGS@
+CXXFLAGS = @GL_CXXFLAG_ALLOW_WARNINGS@ @CXXFLAGS@
+
 AM_CPPFLAGS = \
   -D@gltests_WITNESS@=1 \
   -I. -I$(srcdir) \
   -I.. -I$(srcdir)/.. \
   -I../lib -I$(srcdir)/../lib
 
-LDADD = libtests.a ../lib/libdiffutils.a libtests.a $(LIBTESTS_LIBDEPS)
+LDADD = libtests.a ../lib/libdiffutils.a libtests.a ../lib/libdiffutils.a libtests.a $(LIBTESTS_LIBDEPS)
 
 libtests_a_SOURCES =
 libtests_a_LIBADD = $(gltests_LIBOBJS)
@@ -77,6 +80,17 @@ EXTRA_DIST += test-accept.c signature.h macros.h
 
 ## end   gnulib module accept-tests
 
+## begin gnulib module alloca
+
+
+libtests_a_LIBADD += @ALLOCA@
+libtests_a_DEPENDENCIES += @ALLOCA@
+EXTRA_DIST += alloca.c
+
+EXTRA_libtests_a_SOURCES += alloca.c
+
+## end   gnulib module alloca
+
 ## begin gnulib module alloca-opt-tests
 
 TESTS += test-alloca-opt
@@ -98,7 +112,7 @@ EXTRA_DIST += test-areadlink.h test-areadlink.c macros.h
 
 TESTS += test-argmatch
 check_PROGRAMS += test-argmatch
-test_argmatch_LDADD = $(LDADD) @LIBINTL@
+test_argmatch_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
 
 EXTRA_DIST += test-argmatch.c macros.h
 
@@ -121,8 +135,9 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
              -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
              -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
              -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
-             -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
-             -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
+             -e 's/@''GNULIB_INET_NTOP''@/$(GL_GNULIB_INET_NTOP)/g' \
+             -e 's/@''GNULIB_INET_PTON''@/$(GL_GNULIB_INET_PTON)/g' \
+             -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
              -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
              -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
@@ -148,6 +163,15 @@ EXTRA_DIST += test-arpa_inet.c
 
 ## end   gnulib module arpa_inet-tests
 
+## begin gnulib module atoll
+
+
+EXTRA_DIST += atoll.c
+
+EXTRA_libtests_a_SOURCES += atoll.c
+
+## end   gnulib module atoll
+
 ## begin gnulib module binary-io-tests
 
 TESTS += test-binary-io.sh
@@ -188,7 +212,7 @@ EXTRA_DIST += test-bitrotate.c macros.h
 TESTS += test-btowc1.sh test-btowc2.sh
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-btowc
-
+test_btowc_LDADD = $(LDADD) $(LIB_SETLOCALE)
 EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
 
 ## end   gnulib module btowc-tests
@@ -197,6 +221,7 @@ EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
 
 TESTS += test-c-ctype
 check_PROGRAMS += test-c-ctype
+test_c_ctype_LDADD = $(LDADD) $(LIB_SETLOCALE)
 EXTRA_DIST += test-c-ctype.c macros.h
 
 ## end   gnulib module c-ctype-tests
@@ -217,10 +242,20 @@ EXTRA_DIST += test-c-stack.c test-c-stack.sh test-c-stack2.sh macros.h
 TESTS += test-c-strcase.sh
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
 check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp
+test_c_strcasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_c_strncasecmp_LDADD = $(LDADD) $(LIB_SETLOCALE)
 EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h
 
 ## end   gnulib module c-strcase-tests
 
+## begin gnulib module calloc-gnu-tests
+
+TESTS += test-calloc-gnu
+check_PROGRAMS += test-calloc-gnu
+EXTRA_DIST += test-calloc-gnu.c macros.h
+
+## end   gnulib module calloc-gnu-tests
+
 ## begin gnulib module cloexec-tests
 
 TESTS += test-cloexec
@@ -286,6 +321,14 @@ EXTRA_DIST += test-dup2.c signature.h macros.h
 
 ## end   gnulib module dup2-tests
 
+## begin gnulib module dynarray-tests
+
+TESTS += test-dynarray
+check_PROGRAMS += test-dynarray
+EXTRA_DIST += test-dynarray.c macros.h
+
+## end   gnulib module dynarray-tests
+
 ## begin gnulib module environ-tests
 
 TESTS += test-environ
@@ -317,7 +360,7 @@ TESTS += \
  test-exclude8.sh
 
 check_PROGRAMS += test-exclude
-test_exclude_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD)
+test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(LIB_MBRTOWC) $(LIBTHREAD)
 EXTRA_DIST += test-exclude.c test-exclude1.sh test-exclude2.sh test-exclude3.sh test-exclude4.sh test-exclude5.sh test-exclude6.sh test-exclude7.sh test-exclude8.sh
 
 ## end   gnulib module exclude-tests
@@ -392,10 +435,28 @@ EXTRA_DIST += test-fnmatch-h.c
 
 TESTS += test-fnmatch
 check_PROGRAMS += test-fnmatch
+test_fnmatch_LDADD = $(LDADD) $(LIB_MBRTOWC)
 EXTRA_DIST += test-fnmatch.c signature.h macros.h
 
 ## end   gnulib module fnmatch-tests
 
+## begin gnulib module fopen-gnu-tests
+
+TESTS += test-fopen-gnu
+check_PROGRAMS += test-fopen-gnu
+EXTRA_DIST += test-fopen-gnu.c macros.h
+
+## end   gnulib module fopen-gnu-tests
+
+## begin gnulib module fopen-tests
+
+TESTS += test-fopen
+check_PROGRAMS += test-fopen
+
+EXTRA_DIST += test-fopen.h test-fopen.c signature.h macros.h
+
+## end   gnulib module fopen-tests
+
 ## begin gnulib module fpucw
 
 
@@ -419,13 +480,13 @@ EXTRA_DIST += test-fread.c signature.h macros.h
 
 ## end   gnulib module fread-tests
 
-## begin gnulib module freopen-safer-tests
+## begin gnulib module free-posix-tests
 
-TESTS += test-freopen-safer
-check_PROGRAMS += test-freopen-safer
-EXTRA_DIST += test-freopen-safer.c macros.h
+TESTS += test-free
+check_PROGRAMS += test-free
+EXTRA_DIST += test-free.c macros.h
 
-## end   gnulib module freopen-safer-tests
+## end   gnulib module free-posix-tests
 
 ## begin gnulib module freopen-tests
 
@@ -513,15 +574,6 @@ EXTRA_DIST += macros.h signature.h test-getopt-posix.c test-getopt-main.h test-g
 
 ## end   gnulib module getopt-posix-tests
 
-## begin gnulib module getpagesize
-
-
-EXTRA_DIST += getpagesize.c
-
-EXTRA_libtests_a_SOURCES += getpagesize.c
-
-## end   gnulib module getpagesize
-
 ## begin gnulib module getprogname-tests
 
 DEFS += -DEXEEXT=\"@EXEEXT@\"
@@ -532,6 +584,15 @@ EXTRA_DIST += test-getprogname.c
 
 ## end   gnulib module getprogname-tests
 
+## begin gnulib module getrandom-tests
+
+TESTS += test-getrandom
+check_PROGRAMS += test-getrandom
+test_getrandom_LDADD = $(LDADD) @LIB_GETRANDOM@
+EXTRA_DIST += test-getrandom.c signature.h macros.h
+
+## end   gnulib module getrandom-tests
+
 ## begin gnulib module gettimeofday-tests
 
 TESTS += test-gettimeofday
@@ -541,6 +602,28 @@ EXTRA_DIST += signature.h test-gettimeofday.c
 
 ## end   gnulib module gettimeofday-tests
 
+## begin gnulib module gperf
+
+GPERF = gperf
+V_GPERF = $(V_GPERF_@AM_V@)
+V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@)
+V_GPERF_0 = @echo "  GPERF   " $@;
+
+## end   gnulib module gperf
+
+## begin gnulib module hard-locale-tests
+
+TESTS += test-hard-locale
+check_PROGRAMS += test-hard-locale
+test_hard_locale_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIB_HARD_LOCALE@
+# We cannot call this program 'locale', because the C++ compiler on Mac OS X
+# would then barf upon '#include <locale>'. So, call it 'current-locale'.
+noinst_PROGRAMS += current-locale
+current_locale_SOURCES = locale.c
+EXTRA_DIST += test-hard-locale.c locale.c
+
+## end   gnulib module hard-locale-tests
+
 ## begin gnulib module hash-pjw
 
 libtests_a_SOURCES += hash-pjw.h hash-pjw.c
@@ -656,6 +739,34 @@ EXTRA_DIST += test-iswblank.c macros.h
 
 ## end   gnulib module iswblank-tests
 
+## begin gnulib module iswdigit-tests
+
+TESTS += test-iswdigit.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-iswdigit
+test_iswdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+EXTRA_DIST += test-iswdigit.sh test-iswdigit.c signature.h macros.h
+
+## end   gnulib module iswdigit-tests
+
+## begin gnulib module iswxdigit-tests
+
+TESTS += test-iswxdigit.sh
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LOCALE_JA='@LOCALE_JA@' \
+  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-iswxdigit
+test_iswxdigit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+EXTRA_DIST += test-iswxdigit.sh test-iswxdigit.c signature.h macros.h
+
+## end   gnulib module iswxdigit-tests
+
 ## begin gnulib module langinfo-tests
 
 TESTS += test-langinfo
@@ -693,6 +804,7 @@ EXTRA_DIST += test-listen.c signature.h macros.h
 ## begin gnulib module localcharset-tests
 
 noinst_PROGRAMS += test-localcharset
+test_localcharset_LDADD = $(LDADD) $(LIB_SETLOCALE)
 EXTRA_DIST += test-localcharset.c
 
 ## end   gnulib module localcharset-tests
@@ -721,6 +833,14 @@ EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h
 
 ## end   gnulib module lstat-tests
 
+## begin gnulib module malloc-gnu-tests
+
+TESTS += test-malloc-gnu
+check_PROGRAMS += test-malloc-gnu
+EXTRA_DIST += test-malloc-gnu.c macros.h
+
+## end   gnulib module malloc-gnu-tests
+
 ## begin gnulib module malloca-tests
 
 TESTS += test-malloca
@@ -736,14 +856,16 @@ TESTS += \
   test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
   test-mbrtowc5.sh \
   test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh \
-  test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh
+  test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32-6.sh \
+  test-mbrtowc-w32-7.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-mbrtowc test-mbrtowc-w32
-EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h
+test_mbrtowc_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc5.sh test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh test-mbrtowc-w32-5.sh test-mbrtowc-w32-6.sh test-mbrtowc-w32-7.sh test-mbrtowc-w32.c signature.h macros.h
 
 ## end   gnulib module mbrtowc-tests
 
@@ -752,7 +874,7 @@ EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.s
 TESTS += test-mbscasecmp.sh
 TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
 check_PROGRAMS += test-mbscasecmp
-
+test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 EXTRA_DIST += test-mbscasecmp.sh test-mbscasecmp.c macros.h
 
 ## end   gnulib module mbscasecmp-tests
@@ -762,7 +884,7 @@ EXTRA_DIST += test-mbscasecmp.sh test-mbscasecmp.c macros.h
 TESTS += test-mbsinit.sh
 TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
 check_PROGRAMS += test-mbsinit
-
+test_mbsinit_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h
 
 ## end   gnulib module mbsinit-tests
@@ -776,7 +898,7 @@ TESTS_ENVIRONMENT += \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-mbsrtowcs
-
+test_mbsrtowcs_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h
 
 ## end   gnulib module mbsrtowcs-tests
@@ -786,7 +908,9 @@ EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsr
 TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh
 TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3
-
+test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_MBRTOWC)
+test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
+test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(LIB_SETLOCALE) $(LIB_MBRTOWC)
 EXTRA_DIST += test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h
 
 ## end   gnulib module mbsstr-tests
@@ -866,10 +990,12 @@ EXTRA_DIST += test-netinet_in.c
 
 ## begin gnulib module nl_langinfo-tests
 
-TESTS += test-nl_langinfo.sh
+TESTS += test-nl_langinfo.sh test-nl_langinfo-mt
 TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
-check_PROGRAMS += test-nl_langinfo
-EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h
+check_PROGRAMS += test-nl_langinfo test-nl_langinfo-mt
+test_nl_langinfo_LDADD = $(LDADD) $(LIB_SETLOCALE)
+test_nl_langinfo_mt_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c test-nl_langinfo-mt.c signature.h macros.h
 
 ## end   gnulib module nl_langinfo-tests
 
@@ -931,6 +1057,195 @@ EXTRA_DIST += test-pipe.c signature.h macros.h
 
 ## end   gnulib module pipe-posix-tests
 
+## begin gnulib module pthread-h
+
+BUILT_SOURCES += pthread.h
+
+# We need the following in order to create <pthread.h> when the system
+# doesn't have one that works with the given compiler.
+pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
+             -e 's/@''GNULIB_PTHREAD_THREAD''@/$(GL_GNULIB_PTHREAD_THREAD)/g' \
+             -e 's/@''GNULIB_PTHREAD_ONCE''@/$(GL_GNULIB_PTHREAD_ONCE)/g' \
+             -e 's/@''GNULIB_PTHREAD_MUTEX''@/$(GL_GNULIB_PTHREAD_MUTEX)/g' \
+             -e 's/@''GNULIB_PTHREAD_RWLOCK''@/$(GL_GNULIB_PTHREAD_RWLOCK)/g' \
+             -e 's/@''GNULIB_PTHREAD_COND''@/$(GL_GNULIB_PTHREAD_COND)/g' \
+             -e 's/@''GNULIB_PTHREAD_TSS''@/$(GL_GNULIB_PTHREAD_TSS)/g' \
+             -e 's/@''GNULIB_PTHREAD_SPIN''@/$(GL_GNULIB_PTHREAD_SPIN)/g' \
+             -e 's/@''GNULIB_PTHREAD_MUTEX_TIMEDLOCK''@/$(GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK)/g' \
+             -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \
+             -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \
+             -e 's|@''HAVE_PTHREAD_CREATE_DETACHED''@|$(HAVE_PTHREAD_CREATE_DETACHED)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_RECURSIVE''@|$(HAVE_PTHREAD_MUTEX_RECURSIVE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_ROBUST''@|$(HAVE_PTHREAD_MUTEX_ROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_PROCESS_SHARED''@|$(HAVE_PTHREAD_PROCESS_SHARED)|g' \
+             -e 's|@''HAVE_PTHREAD_CREATE''@|$(HAVE_PTHREAD_CREATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_INIT''@|$(HAVE_PTHREAD_ATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_GETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_GETDETACHSTATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_SETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_SETDETACHSTATE)|g' \
+             -e 's|@''HAVE_PTHREAD_ATTR_DESTROY''@|$(HAVE_PTHREAD_ATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_SELF''@|$(HAVE_PTHREAD_SELF)|g' \
+             -e 's|@''HAVE_PTHREAD_EQUAL''@|$(HAVE_PTHREAD_EQUAL)|g' \
+             -e 's|@''HAVE_PTHREAD_DETACH''@|$(HAVE_PTHREAD_DETACH)|g' \
+             -e 's|@''HAVE_PTHREAD_JOIN''@|$(HAVE_PTHREAD_JOIN)|g' \
+             -e 's|@''HAVE_PTHREAD_EXIT''@|$(HAVE_PTHREAD_EXIT)|g' \
+             -e 's|@''HAVE_PTHREAD_ONCE''@|$(HAVE_PTHREAD_ONCE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_INIT''@|$(HAVE_PTHREAD_MUTEX_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_INIT''@|$(HAVE_PTHREAD_MUTEXATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_GETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_GETTYPE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_SETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_SETTYPE)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_GETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_GETROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_SETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_SETROBUST)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEXATTR_DESTROY''@|$(HAVE_PTHREAD_MUTEXATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_LOCK''@|$(HAVE_PTHREAD_MUTEX_LOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_TRYLOCK''@|$(HAVE_PTHREAD_MUTEX_TRYLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_TIMEDLOCK''@|$(HAVE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_UNLOCK''@|$(HAVE_PTHREAD_MUTEX_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_MUTEX_DESTROY''@|$(HAVE_PTHREAD_MUTEX_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_INIT''@|$(HAVE_PTHREAD_RWLOCK_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCKATTR_INIT''@|$(HAVE_PTHREAD_RWLOCKATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCKATTR_DESTROY''@|$(HAVE_PTHREAD_RWLOCKATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_RDLOCK''@|$(HAVE_PTHREAD_RWLOCK_RDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_WRLOCK''@|$(HAVE_PTHREAD_RWLOCK_WRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYRDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYWRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_UNLOCK''@|$(HAVE_PTHREAD_RWLOCK_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_RWLOCK_DESTROY''@|$(HAVE_PTHREAD_RWLOCK_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_INIT''@|$(HAVE_PTHREAD_COND_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_CONDATTR_INIT''@|$(HAVE_PTHREAD_CONDATTR_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_CONDATTR_DESTROY''@|$(HAVE_PTHREAD_CONDATTR_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_WAIT''@|$(HAVE_PTHREAD_COND_WAIT)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_TIMEDWAIT''@|$(HAVE_PTHREAD_COND_TIMEDWAIT)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_SIGNAL''@|$(HAVE_PTHREAD_COND_SIGNAL)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_BROADCAST''@|$(HAVE_PTHREAD_COND_BROADCAST)|g' \
+             -e 's|@''HAVE_PTHREAD_COND_DESTROY''@|$(HAVE_PTHREAD_COND_DESTROY)|g' \
+             -e 's|@''HAVE_PTHREAD_KEY_CREATE''@|$(HAVE_PTHREAD_KEY_CREATE)|g' \
+             -e 's|@''HAVE_PTHREAD_SETSPECIFIC''@|$(HAVE_PTHREAD_SETSPECIFIC)|g' \
+             -e 's|@''HAVE_PTHREAD_GETSPECIFIC''@|$(HAVE_PTHREAD_GETSPECIFIC)|g' \
+             -e 's|@''HAVE_PTHREAD_KEY_DELETE''@|$(HAVE_PTHREAD_KEY_DELETE)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_INIT''@|$(HAVE_PTHREAD_SPIN_INIT)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_LOCK''@|$(HAVE_PTHREAD_SPIN_LOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_TRYLOCK''@|$(HAVE_PTHREAD_SPIN_TRYLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_UNLOCK''@|$(HAVE_PTHREAD_SPIN_UNLOCK)|g' \
+             -e 's|@''HAVE_PTHREAD_SPIN_DESTROY''@|$(HAVE_PTHREAD_SPIN_DESTROY)|g' \
+             < $(srcdir)/pthread.in.h | \
+         sed -e 's|@''REPLACE_PTHREAD_CREATE''@|$(REPLACE_PTHREAD_CREATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_INIT''@|$(REPLACE_PTHREAD_ATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_GETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_GETDETACHSTATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_SETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_SETDETACHSTATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_ATTR_DESTROY''@|$(REPLACE_PTHREAD_ATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_SELF''@|$(REPLACE_PTHREAD_SELF)|g' \
+             -e 's|@''REPLACE_PTHREAD_EQUAL''@|$(REPLACE_PTHREAD_EQUAL)|g' \
+             -e 's|@''REPLACE_PTHREAD_DETACH''@|$(REPLACE_PTHREAD_DETACH)|g' \
+             -e 's|@''REPLACE_PTHREAD_JOIN''@|$(REPLACE_PTHREAD_JOIN)|g' \
+             -e 's|@''REPLACE_PTHREAD_EXIT''@|$(REPLACE_PTHREAD_EXIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_ONCE''@|$(REPLACE_PTHREAD_ONCE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_INIT''@|$(REPLACE_PTHREAD_MUTEX_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_INIT''@|$(REPLACE_PTHREAD_MUTEXATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_GETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_GETTYPE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_SETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_SETTYPE)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_GETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_GETROBUST)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_SETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_SETROBUST)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEXATTR_DESTROY''@|$(REPLACE_PTHREAD_MUTEXATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_LOCK''@|$(REPLACE_PTHREAD_MUTEX_LOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_TRYLOCK''@|$(REPLACE_PTHREAD_MUTEX_TRYLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_TIMEDLOCK''@|$(REPLACE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_UNLOCK''@|$(REPLACE_PTHREAD_MUTEX_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_MUTEX_DESTROY''@|$(REPLACE_PTHREAD_MUTEX_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_INIT''@|$(REPLACE_PTHREAD_RWLOCK_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCKATTR_INIT''@|$(REPLACE_PTHREAD_RWLOCKATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCKATTR_DESTROY''@|$(REPLACE_PTHREAD_RWLOCKATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_RDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_RDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_WRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_WRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYRDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYWRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_UNLOCK''@|$(REPLACE_PTHREAD_RWLOCK_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_RWLOCK_DESTROY''@|$(REPLACE_PTHREAD_RWLOCK_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_INIT''@|$(REPLACE_PTHREAD_COND_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_CONDATTR_INIT''@|$(REPLACE_PTHREAD_CONDATTR_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_CONDATTR_DESTROY''@|$(REPLACE_PTHREAD_CONDATTR_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_WAIT''@|$(REPLACE_PTHREAD_COND_WAIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_TIMEDWAIT''@|$(REPLACE_PTHREAD_COND_TIMEDWAIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_SIGNAL''@|$(REPLACE_PTHREAD_COND_SIGNAL)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_BROADCAST''@|$(REPLACE_PTHREAD_COND_BROADCAST)|g' \
+             -e 's|@''REPLACE_PTHREAD_COND_DESTROY''@|$(REPLACE_PTHREAD_COND_DESTROY)|g' \
+             -e 's|@''REPLACE_PTHREAD_KEY_CREATE''@|$(REPLACE_PTHREAD_KEY_CREATE)|g' \
+             -e 's|@''REPLACE_PTHREAD_SETSPECIFIC''@|$(REPLACE_PTHREAD_SETSPECIFIC)|g' \
+             -e 's|@''REPLACE_PTHREAD_GETSPECIFIC''@|$(REPLACE_PTHREAD_GETSPECIFIC)|g' \
+             -e 's|@''REPLACE_PTHREAD_KEY_DELETE''@|$(REPLACE_PTHREAD_KEY_DELETE)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_INIT''@|$(REPLACE_PTHREAD_SPIN_INIT)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_LOCK''@|$(REPLACE_PTHREAD_SPIN_LOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_TRYLOCK''@|$(REPLACE_PTHREAD_SPIN_TRYLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_UNLOCK''@|$(REPLACE_PTHREAD_SPIN_UNLOCK)|g' \
+             -e 's|@''REPLACE_PTHREAD_SPIN_DESTROY''@|$(REPLACE_PTHREAD_SPIN_DESTROY)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += pthread.h pthread.h-t
+
+EXTRA_DIST += pthread.in.h
+
+## end   gnulib module pthread-h
+
+## begin gnulib module pthread-h-tests
+
+TESTS += test-pthread
+check_PROGRAMS += test-pthread
+EXTRA_DIST += test-pthread.c
+
+## end   gnulib module pthread-h-tests
+
+## begin gnulib module pthread-thread
+
+
+EXTRA_DIST += pthread-thread.c
+
+EXTRA_libtests_a_SOURCES += pthread-thread.c
+
+## end   gnulib module pthread-thread
+
+## begin gnulib module pthread-thread-tests
+
+TESTS += test-pthread-thread
+check_PROGRAMS += test-pthread-thread
+test_pthread_thread_LDADD = $(LDADD) @LIBPMULTITHREAD@
+EXTRA_DIST += test-pthread-thread.c macros.h
+
+## end   gnulib module pthread-thread-tests
+
+## begin gnulib module pthread_sigmask
+
+
+EXTRA_DIST += pthread_sigmask.c
+
+EXTRA_libtests_a_SOURCES += pthread_sigmask.c
+
+## end   gnulib module pthread_sigmask
+
+## begin gnulib module pthread_sigmask-tests
+
+TESTS += test-pthread_sigmask1 test-pthread_sigmask2
+check_PROGRAMS += test-pthread_sigmask1 test-pthread_sigmask2
+test_pthread_sigmask1_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@
+test_pthread_sigmask2_LDADD = $(LDADD) @LIB_PTHREAD_SIGMASK@ @LIBMULTITHREAD@
+EXTRA_DIST += test-pthread_sigmask1.c test-pthread_sigmask2.c signature.h macros.h
+
+## end   gnulib module pthread_sigmask-tests
+
 ## begin gnulib module putenv
 
 
@@ -944,7 +1259,7 @@ EXTRA_libtests_a_SOURCES += putenv.c
 
 TESTS += test-quotearg-simple
 check_PROGRAMS += test-quotearg-simple
-test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@
+test_quotearg_simple_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
 EXTRA_DIST += test-quotearg-simple.c test-quotearg.h macros.h zerosize-ptr.h
 
 ## end   gnulib module quotearg-simple-tests
@@ -973,11 +1288,27 @@ EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h
 
 ## end   gnulib module readlink-tests
 
+## begin gnulib module realloc-gnu-tests
+
+TESTS += test-realloc-gnu
+check_PROGRAMS += test-realloc-gnu
+EXTRA_DIST += test-realloc-gnu.c macros.h
+
+## end   gnulib module realloc-gnu-tests
+
+## begin gnulib module reallocarray-tests
+
+TESTS += test-reallocarray
+check_PROGRAMS += test-reallocarray
+EXTRA_DIST += test-reallocarray.c signature.h macros.h
+
+## end   gnulib module reallocarray-tests
+
 ## begin gnulib module regex-tests
 
 TESTS += test-regex
 check_PROGRAMS += test-regex
-test_regex_LDADD = $(LDADD) @LIBINTL@ $(LIBTHREAD) $(LIB_PTHREAD)
+test_regex_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIB_MBRTOWC) @LIBINTL@ $(LIBTHREAD)
 EXTRA_DIST += test-regex.c macros.h
 
 ## end   gnulib module regex-tests
@@ -989,6 +1320,45 @@ EXTRA_DIST += same-inode.h
 
 ## end   gnulib module same-inode
 
+## begin gnulib module sched
+
+BUILT_SOURCES += sched.h
+
+# We need the following in order to create a replacement for <sched.h> when
+# the system doesn't have one.
+sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+             -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+             -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
+             -e 's/@''GNULIB_SCHED_YIELD''@/$(GL_GNULIB_SCHED_YIELD)/g' \
+             -e 's|@''HAVE_SCHED_YIELD''@|$(HAVE_SCHED_YIELD)|g' \
+             -e 's|@''REPLACE_SCHED_YIELD''@|$(REPLACE_SCHED_YIELD)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sched.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += sched.h sched.h-t
+
+EXTRA_DIST += sched.in.h
+
+## end   gnulib module sched
+
+## begin gnulib module sched-tests
+
+TESTS += test-sched
+check_PROGRAMS += test-sched
+EXTRA_DIST += test-sched.c
+
+## end   gnulib module sched-tests
+
 ## begin gnulib module select
 
 
@@ -1018,27 +1388,22 @@ EXTRA_DIST += test-setenv.c signature.h macros.h
 
 ## end   gnulib module setenv-tests
 
-## begin gnulib module setlocale
-
-
-EXTRA_DIST += setlocale.c
-
-EXTRA_libtests_a_SOURCES += setlocale.c
-
-## end   gnulib module setlocale
+## begin gnulib module setlocale-null-tests
 
-## begin gnulib module setlocale-tests
-
-TESTS += test-setlocale1.sh test-setlocale2.sh
-TESTS_ENVIRONMENT += \
-  LOCALE_FR='@LOCALE_FR@' \
-  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
-  LOCALE_JA='@LOCALE_JA@' \
-  LOCALE_ZH_CN='@LOCALE_ZH_CN@'
-check_PROGRAMS += test-setlocale1 test-setlocale2
-EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h
-
-## end   gnulib module setlocale-tests
+TESTS += \
+  test-setlocale_null \
+  test-setlocale_null-mt-one \
+  test-setlocale_null-mt-all
+check_PROGRAMS += \
+  test-setlocale_null \
+  test-setlocale_null-mt-one \
+  test-setlocale_null-mt-all
+test_setlocale_null_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@
+test_setlocale_null_mt_one_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+test_setlocale_null_mt_all_LDADD = $(LDADD) @LIB_SETLOCALE_NULL@ $(LIBMULTITHREAD) $(LIB_NANOSLEEP)
+EXTRA_DIST += test-setlocale_null.c test-setlocale_null-mt-one.c test-setlocale_null-mt-all.c
+
+## end   gnulib module setlocale-null-tests
 
 ## begin gnulib module setsockopt
 
@@ -1062,11 +1427,21 @@ EXTRA_DIST += test-setsockopt.c signature.h macros.h
 
 TESTS += test-sh-quote
 check_PROGRAMS += test-sh-quote
-test_sh_quote_LDADD = $(LDADD) @LIBINTL@
+test_sh_quote_LDADD = $(LDADD) @LIBINTL@ $(LIB_MBRTOWC)
 EXTRA_DIST += test-sh-quote.c
 
 ## end   gnulib module sh-quote-tests
 
+## begin gnulib module sigaction
+
+libtests_a_SOURCES += sig-handler.c
+
+EXTRA_DIST += sig-handler.h sigaction.c
+
+EXTRA_libtests_a_SOURCES += sigaction.c
+
+## end   gnulib module sigaction
+
 ## begin gnulib module sigaction-tests
 
 TESTS += test-sigaction
@@ -1083,6 +1458,15 @@ EXTRA_DIST += test-signal-h.c
 
 ## end   gnulib module signal-h-tests
 
+## begin gnulib module sigprocmask
+
+
+EXTRA_DIST += sigprocmask.c
+
+EXTRA_libtests_a_SOURCES += sigprocmask.c
+
+## end   gnulib module sigprocmask
+
 ## begin gnulib module sigprocmask-tests
 
 TESTS += test-sigprocmask
@@ -1091,6 +1475,26 @@ EXTRA_DIST += test-sigprocmask.c signature.h macros.h
 
 ## end   gnulib module sigprocmask-tests
 
+## begin gnulib module sigsegv-tests
+
+TESTS += \
+  test-sigsegv-catch-segv1 \
+  test-sigsegv-catch-segv2 \
+  test-sigsegv-catch-stackoverflow1 \
+  test-sigsegv-catch-stackoverflow2
+check_PROGRAMS += \
+  test-sigsegv-catch-segv1 \
+  test-sigsegv-catch-segv2 \
+  test-sigsegv-catch-stackoverflow1 \
+  test-sigsegv-catch-stackoverflow2
+test_sigsegv_catch_segv1_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_segv2_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_stackoverflow1_LDADD = $(LDADD) $(LIBSIGSEGV)
+test_sigsegv_catch_stackoverflow2_LDADD = $(LDADD) $(LIBSIGSEGV)
+EXTRA_DIST += test-sigsegv-catch-segv1.c test-sigsegv-catch-segv2.c test-sigsegv-catch-stackoverflow1.c test-sigsegv-catch-stackoverflow2.c altstack-util.h mmap-anon-util.h
+
+## end   gnulib module sigsegv-tests
+
 ## begin gnulib module sleep
 
 
@@ -1144,18 +1548,6 @@ EXTRA_DIST += c++defs.h
 
 ## end   gnulib module snippet/c++defs
 
-## begin gnulib module snippet/unused-parameter
-
-# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all makefiles that
-# need it. This is ensured by the applicability 'all' defined above.
-
-UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h
-
-EXTRA_DIST += unused-parameter.h
-
-## end   gnulib module snippet/unused-parameter
-
 ## begin gnulib module snippet/warn-on-use
 
 # Because this Makefile snippet defines a variable used by other
@@ -1230,29 +1622,6 @@ EXTRA_DIST += test-stat-time.c macros.h nap.h
 
 ## end   gnulib module stat-time-tests
 
-## begin gnulib module stdalign
-
-BUILT_SOURCES += $(STDALIGN_H)
-
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDALIGN_H
-stdalign.h: stdalign.in.h $(top_builddir)/config.status
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         cat $(srcdir)/stdalign.in.h; \
-       } > $@-t && \
-       mv $@-t $@
-else
-stdalign.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += stdalign.h stdalign.h-t
-
-EXTRA_DIST += stdalign.in.h
-
-## end   gnulib module stdalign
-
 ## begin gnulib module stdalign-tests
 
 TESTS += test-stdalign
@@ -1360,21 +1729,21 @@ EXTRA_DIST += test-strnlen.c zerosize-ptr.h signature.h macros.h
 
 ## end   gnulib module strnlen-tests
 
-## begin gnulib module strtoull-tests
+## begin gnulib module strtoimax-tests
 
-TESTS += test-strtoull
-check_PROGRAMS += test-strtoull
-EXTRA_DIST += test-strtoull.c signature.h macros.h
+TESTS += test-strtoimax
+check_PROGRAMS += test-strtoimax
+EXTRA_DIST += test-strtoimax.c signature.h macros.h
 
-## end   gnulib module strtoull-tests
+## end   gnulib module strtoimax-tests
 
-## begin gnulib module strtoumax-tests
+## begin gnulib module strtoll-tests
 
-TESTS += test-strtoumax
-check_PROGRAMS += test-strtoumax
-EXTRA_DIST += test-strtoumax.c signature.h macros.h
+TESTS += test-strtoll
+check_PROGRAMS += test-strtoll
+EXTRA_DIST += test-strtoll.c signature.h macros.h
 
-## end   gnulib module strtoumax-tests
+## end   gnulib module strtoll-tests
 
 ## begin gnulib module symlink
 
@@ -1409,7 +1778,7 @@ sys/ioctl.h: sys_ioctl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_IOCTL_H''@|$(NEXT_SYS_IOCTL_H)|g' \
-             -e 's/@''GNULIB_IOCTL''@/$(GNULIB_IOCTL)/g' \
+             -e 's/@''GNULIB_IOCTL''@/$(GL_GNULIB_IOCTL)/g' \
              -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H)|g' \
              -e 's|@''SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
              -e 's|@''REPLACE_IOCTL''@|$(REPLACE_IOCTL)|g' \
@@ -1433,6 +1802,14 @@ EXTRA_DIST += test-sys_ioctl.c
 
 ## end   gnulib module sys_ioctl-tests
 
+## begin gnulib module sys_random-tests
+
+TESTS += test-sys_random
+check_PROGRAMS += test-sys_random
+EXTRA_DIST += test-sys_random.c
+
+## end   gnulib module sys_random-tests
+
 ## begin gnulib module sys_select
 
 BUILT_SOURCES += sys/select.h
@@ -1449,8 +1826,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
              -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
-             -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
-             -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
+             -e 's/@''GNULIB_PSELECT''@/$(GL_GNULIB_PSELECT)/g' \
+             -e 's/@''GNULIB_SELECT''@/$(GL_GNULIB_SELECT)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
              -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
@@ -1492,22 +1869,22 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
              -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-             -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
-             -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
-             -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
-             -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
-             -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
-             -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
-             -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
-             -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
-             -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
-             -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
-             -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
-             -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
-             -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_SOCKET''@/$(GL_GNULIB_SOCKET)/g' \
+             -e 's/@''GNULIB_CONNECT''@/$(GL_GNULIB_CONNECT)/g' \
+             -e 's/@''GNULIB_ACCEPT''@/$(GL_GNULIB_ACCEPT)/g' \
+             -e 's/@''GNULIB_BIND''@/$(GL_GNULIB_BIND)/g' \
+             -e 's/@''GNULIB_GETPEERNAME''@/$(GL_GNULIB_GETPEERNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKNAME''@/$(GL_GNULIB_GETSOCKNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKOPT''@/$(GL_GNULIB_GETSOCKOPT)/g' \
+             -e 's/@''GNULIB_LISTEN''@/$(GL_GNULIB_LISTEN)/g' \
+             -e 's/@''GNULIB_RECV''@/$(GL_GNULIB_RECV)/g' \
+             -e 's/@''GNULIB_SEND''@/$(GL_GNULIB_SEND)/g' \
+             -e 's/@''GNULIB_RECVFROM''@/$(GL_GNULIB_RECVFROM)/g' \
+             -e 's/@''GNULIB_SENDTO''@/$(GL_GNULIB_SENDTO)/g' \
+             -e 's/@''GNULIB_SETSOCKOPT''@/$(GL_GNULIB_SETSOCKOPT)/g' \
+             -e 's/@''GNULIB_SHUTDOWN''@/$(GL_GNULIB_SHUTDOWN)/g' \
+             -e 's/@''GNULIB_ACCEPT4''@/$(GL_GNULIB_ACCEPT4)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
              -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
@@ -1609,6 +1986,22 @@ EXTRA_DIST += test-init.sh
 
 ## end   gnulib module test-framework-sh-tests
 
+## begin gnulib module thread
+
+libtests_a_SOURCES += glthread/thread.h glthread/thread.c
+
+## end   gnulib module thread
+
+## begin gnulib module thread-tests
+
+TESTS += test-thread_self test-thread_create
+check_PROGRAMS += test-thread_self test-thread_create
+test_thread_self_LDADD = $(LDADD) @LIBTHREAD@
+test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@
+EXTRA_DIST += test-thread_self.c test-thread_create.c macros.h
+
+## end   gnulib module thread-tests
+
 ## begin gnulib module time-tests
 
 TESTS += test-time
@@ -1759,15 +2152,16 @@ EXTRA_DIST += test-wchar.c
 TESTS += \
   test-wcrtomb.sh \
   test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh \
-  test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh
+  test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32-6.sh \
+  test-wcrtomb-w32-7.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
   LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
   LOCALE_JA='@LOCALE_JA@' \
   LOCALE_ZH_CN='@LOCALE_ZH_CN@'
 check_PROGRAMS += test-wcrtomb test-wcrtomb-w32
-
-EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32.c signature.h macros.h
+test_wcrtomb_LDADD = $(LDADD) $(LIB_SETLOCALE)
+EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh test-wcrtomb-w32-5.sh test-wcrtomb-w32-6.sh test-wcrtomb-w32-7.sh test-wcrtomb-w32.c signature.h macros.h
 
 ## end   gnulib module wcrtomb-tests
 
@@ -1801,11 +2195,29 @@ EXTRA_DIST += test-wctype-h.c macros.h
 
 TESTS += test-wcwidth
 check_PROGRAMS += test-wcwidth
-test_wcwidth_LDADD = $(LDADD) $(LIBUNISTRING)
+test_wcwidth_LDADD = $(LDADD) $(LIB_SETLOCALE) $(LIBUNISTRING)
 EXTRA_DIST += test-wcwidth.c signature.h macros.h
 
 ## end   gnulib module wcwidth-tests
 
+## begin gnulib module windows-thread
+
+
+EXTRA_DIST += windows-thread.c windows-thread.h
+
+EXTRA_libtests_a_SOURCES += windows-thread.c
+
+## end   gnulib module windows-thread
+
+## begin gnulib module windows-tls
+
+
+EXTRA_DIST += windows-tls.c windows-tls.h
+
+EXTRA_libtests_a_SOURCES += windows-tls.c
+
+## end   gnulib module windows-tls
+
 ## begin gnulib module xalloc-die-tests
 
 TESTS += test-xalloc-die.sh
@@ -1815,6 +2227,32 @@ EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh
 
 ## end   gnulib module xalloc-die-tests
 
+## begin gnulib module xstdopen-tests
+
+TESTS += test-xstdopen.sh
+check_PROGRAMS += test-xstdopen
+test_xstdopen_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xstdopen.c test-xstdopen.sh macros.h
+
+## end   gnulib module xstdopen-tests
+
+## begin gnulib module xstrtoimax-tests
+
+TESTS += test-xstrtoimax.sh
+check_PROGRAMS += test-xstrtoimax
+test_xstrtoimax_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xstrtoimax.c test-xstrtoimax.sh
+
+## end   gnulib module xstrtoimax-tests
+
+## begin gnulib module xstrtol-error
+
+libtests_a_SOURCES += xstrtol-error.c
+
+EXTRA_DIST += xstrtol-error.h
+
+## end   gnulib module xstrtol-error
+
 ## begin gnulib module xstrtol-tests
 
 TESTS += test-xstrtol.sh
@@ -1825,15 +2263,6 @@ EXTRA_DIST += test-xstrtol.c test-xstrtoul.c test-xstrtol.sh
 
 ## end   gnulib module xstrtol-tests
 
-## begin gnulib module xstrtoumax-tests
-
-TESTS += test-xstrtoumax.sh
-check_PROGRAMS += test-xstrtoumax
-test_xstrtoumax_LDADD = $(LDADD) @LIBINTL@
-EXTRA_DIST += test-xstrtoumax.c test-xstrtoumax.sh
-
-## end   gnulib module xstrtoumax-tests
-
 ## begin gnulib module xvasprintf-tests
 
 TESTS += test-xvasprintf
@@ -1844,6 +2273,20 @@ EXTRA_DIST += test-xvasprintf.c macros.h
 
 ## end   gnulib module xvasprintf-tests
 
+all: all-notice
+all-notice:
+       @echo '## ---------------------------------------------------- ##'
+       @echo '## ------------------- Gnulib tests ------------------- ##'
+       @echo '## You can ignore compiler warnings in this directory.  ##'
+       @echo '## ---------------------------------------------------- ##'
+
+check-am: check-notice
+check-notice:
+       @echo '## ---------------------------------------------------------------------- ##'
+       @echo '## ---------------------------- Gnulib tests ---------------------------- ##'
+       @echo '## Please report test failures in this directory to <bug-gnulib@gnu.org>. ##'
+       @echo '## ---------------------------------------------------------------------- ##'
+
 # Clean up after Solaris cc.
 clean-local:
        rm -rf SunWS_cache
index 02eca8a..19e7762 100644 (file)
@@ -1,18 +1,18 @@
 /* hash-pjw.c -- compute a hash value from a NUL-terminated string.
 
-   Copyright (C) 2001, 2003, 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 7c3db22..cb18cf3 100644 (file)
@@ -1,17 +1,17 @@
 /* hash-pjw.h -- declaration for a simple hash function
-   Copyright (C) 2001, 2003, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
index c10b6f2..14e8b0a 100644 (file)
@@ -1,18 +1,18 @@
 /* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
 
-   Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
index 93d14f5..9ef8348 100644 (file)
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -60,6 +60,9 @@
 #   4. Finally
 #   $ exit
 
+# =============================================================================
+# Elementary diagnostics
+
 ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # Prepare PATH_SEPARATOR.
@@ -109,26 +112,8 @@ skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
 fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
 
-# This is used to simplify checking of the return value
-# which is useful when ensuring a command fails as desired.
-# I.e., just doing `command ... &&fail=1` will not catch
-# a segfault in command for example.  With this helper you
-# instead check an explicit exit code like
-#   returns_ 1 command ... || fail
-returns_ () {
-  # Disable tracing so it doesn't interfere with stderr of the wrapped command
-  { set +x; } 2>/dev/null
-
-  local exp_exit="$1"
-  shift
-  "$@"
-  test $? -eq $exp_exit && ret_=0 || ret_=1
-
-  if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
-    set -x
-  fi
-  { return $ret_; } 2>/dev/null
-}
+# =============================================================================
+# Ensure the shell supports modern syntax.
 
 # Sanitize this shell to POSIX mode, if possible.
 DUALCASE=1; export DUALCASE
@@ -144,6 +129,8 @@ else
 fi
 
 # We require $(...) support unconditionally.
+# We require that the printf built-in work correctly regarding octal escapes;
+# this eliminates /bin/sh on AIX 7.2.
 # We require non-surprising "local" semantics (this eliminates dash).
 # This takes the admittedly draconian step of eliminating dash, because the
 # assignment tab=$(printf '\t') works fine, yet preceding it with "local "
@@ -173,6 +160,12 @@ fi
 #  ? - not ok
 gl_shell_test_script_='
 test $(echo y) = y || exit 1
+LC_ALL=en_US.UTF-8 printf "\\351" 2>/dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
+  || exit 1
+printf "\\351" 2>/dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
+  || exit 1
 f_local_() { local v=1; }; f_local_ || exit 1
 f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
 score_=10
@@ -255,6 +248,9 @@ else
   fi
 fi
 
+# =============================================================================
+# Ensure the shell behaves reasonably.
+
 # If this is bash, turn off all aliases.
 test -n "$BASH_VERSION" && unalias -a
 
@@ -265,99 +261,177 @@ test -n "$BASH_VERSION" && unalias -a
 # widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
 
-# Enable glibc's malloc-perturbing option.
-# This is useful for exposing code that depends on the fact that
-# malloc-related functions often return memory that is mostly zeroed.
-# If you have the time and cycles, use valgrind to do an even better job.
-: ${MALLOC_PERTURB_=87}
-export MALLOC_PERTURB_
+# =============================================================================
+# Creating a temporary directory (needed by the core test framework)
 
-# This is a stub function that is run upon trap (upon regular exit and
-# interrupt).  Override it with a per-test function, e.g., to unmount
-# a partition, or to undo any other global state changes.
-cleanup_ () { :; }
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+#  - try to get random bytes from /dev/urandom
+#  - failing that, generate output from a combination of quickly-varying
+#      sources and gzip.  Ignore non-varying gzip header, and extract
+#      "random" bits from there.
+#  - given those bits, map to file-name bytes using tr, and try to create
+#      the desired directory.
+#  - make only $MAX_TRIES_ attempts
 
-# Emit a header similar to that from diff -u;  Print the simulated "diff"
-# command so that the order of arguments is clear.  Don't bother with @@ lines.
-emit_diff_u_header_ ()
+# Helper function.  Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
 {
-  printf '%s\n' "diff -u $*" \
-    "--- $1    1970-01-01" \
-    "+++ $2    1970-01-01"
+  n_=$1
+
+  # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+  # But if they have openssl, they probably have mktemp, too.
+
+  chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+  dev_rand_=/dev/urandom
+  if test -r "$dev_rand_"; then
+    # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+    dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+      | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+    return
+  fi
+
+  n_plus_50_=`expr $n_ + 50`
+  cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
+  data_=` (eval "$cmds_") 2>&1 | gzip `
+
+  # Ensure that $data_ has length at least 50+$n_
+  while :; do
+    len_=`echo "$data_"|wc -c`
+    test $n_plus_50_ -le $len_ && break;
+    data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+  done
+
+  echo "$data_" \
+    | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+    | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
 }
 
-# Arrange not to let diff or cmp operate on /dev/null,
-# since on some systems (at least OSF/1 5.1), that doesn't work.
-# When there are not two arguments, or no argument is /dev/null, return 2.
-# When one argument is /dev/null and the other is not empty,
-# cat the nonempty file to stderr and return 1.
-# Otherwise, return 0.
-compare_dev_null_ ()
+mktempd_ ()
 {
-  test $# = 2 || return 2
+  case $# in
+  2);;
+  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
+  esac
 
-  if test "x$1" = x/dev/null; then
-    test -s "$2" || return 0
-    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
-    return 1
-  fi
+  destdir_=$1
+  template_=$2
 
-  if test "x$2" = x/dev/null; then
-    test -s "$1" || return 0
-    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
-    return 1
-  fi
+  MAX_TRIES_=4
 
-  return 2
+  # Disallow any trailing slash on specified destdir:
+  # it would subvert the post-mktemp "case"-based destdir test.
+  case $destdir_ in
+  / | //) destdir_slash_=$destdir;;
+  */) fail_ "invalid destination dir: remove trailing slash(es)";;
+  *) destdir_slash_=$destdir_/;;
+  esac
+
+  case $template_ in
+  *XXXX) ;;
+  *) fail_ \
+       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+  esac
+
+  # First, try to use mktemp.
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
+
+  # The resulting name must be in the specified directory.
+  case $d in "$destdir_slash_"*) :;; *) false;; esac &&
+
+  # It must have created the directory.
+  test -d "$d" &&
+
+  # It must have 0700 permissions.  Handle sticky "S" bits.
+  perms=`ls -dgo "$d" 2>/dev/null` &&
+  case $perms in drwx--[-S]---*) :;; *) false;; esac && {
+    echo "$d"
+    return
+  }
+
+  # If we reach this point, we'll have to create a directory manually.
+
+  # Get a copy of the template without its suffix of X's.
+  base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+  # Calculate how many X's we've just removed.
+  template_length_=`echo "$template_" | wc -c`
+  nx_=`echo "$base_template_" | wc -c`
+  nx_=`expr $template_length_ - $nx_`
+
+  err_=
+  i_=1
+  while :; do
+    X_=`rand_bytes_ $nx_`
+    candidate_dir_="$destdir_slash_$base_template_$X_"
+    err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+      && { echo "$candidate_dir_"; return; }
+    test $MAX_TRIES_ -le $i_ && break;
+    i_=`expr $i_ + 1`
+  done
+  fail_ "$err_"
 }
 
-for diff_opt_ in -u -U3 -c '' no; do
-  test "$diff_opt_" != no &&
-    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
-    break
-done
-if test "$diff_opt_" != no; then
-  if test -z "$diff_out_"; then
-    compare_ () { diff $diff_opt_ "$@"; }
-  else
-    compare_ ()
-    {
-      # If no differences were found, AIX and HP-UX 'diff' produce output
-      # like "No differences encountered".  Hide this output.
-      diff $diff_opt_ "$@" > diff.out
-      diff_status_=$?
-      test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
-      rm -f diff.out || diff_status_=2
-      return $diff_status_
-    }
-  fi
-elif cmp -s /dev/null /dev/null 2>/dev/null; then
-  compare_ () { cmp -s "$@"; }
-else
-  compare_ () { cmp "$@"; }
-fi
+# =============================================================================
+# Core test framework
 
-# Usage: compare EXPECTED ACTUAL
-#
-# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
-# Otherwise, propagate $? to caller: any diffs have already been printed.
-compare ()
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Set up the environment for the test to run in.
+setup_ ()
 {
-  # This looks like it can be factored to use a simple "case $?"
-  # after unchecked compare_dev_null_ invocation, but that would
-  # fail in a "set -e" environment.
-  if compare_dev_null_ "$@"; then
-    return 0
-  else
-    case $? in
-      1) return 1;;
-      *) compare_ "$@";;
-    esac
+  if test "$VERBOSE" = yes; then
+    # Test whether set -x may cause the selected shell to corrupt an
+    # application's stderr.  Many do, including zsh-4.3.10 and the /bin/sh
+    # from SunOS 5.11, OpenBSD 4.7 and Irix 6.5.
+    # If enabling verbose output this way would cause trouble, simply
+    # issue a warning and refrain.
+    if $gl_set_x_corrupts_stderr_; then
+      warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+    else
+      set -x
+    fi
   fi
+
+  initial_cwd_=$PWD
+
+  # Create and enter the temporary directory.
+  pfx_=`testdir_prefix_`
+  test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+    || fail_ "failed to create temporary directory in $initial_cwd_"
+  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+  # Set variables srcdir, builddir, for the convenience of the test.
+  case $srcdir in
+    /* | ?:*) ;;
+    *) srcdir="../$srcdir" ;;
+  esac
+  builddir=".."
+  export srcdir builddir
+
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
+  # This trap statement, along with a trap on 0 below, ensure that the
+  # temporary directory, $test_dir_, is removed upon exit as well as
+  # upon receipt of any of the listed signals.
+  for sig_ in 1 2 3 13 15; do
+    eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+  done
 }
 
-# An arbitrary prefix to help distinguish test directories.
-testdir_prefix_ () { printf gt; }
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt).  Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
 
 # Run the user-overridable cleanup_ function, remove the temporary
 # directory and exit with the incoming value of $?.
@@ -377,6 +451,9 @@ remove_tmp_ ()
   exit $__st
 }
 
+# =============================================================================
+# Prepending directories to PATH
+
 # Given a directory name, DIR, if every entry in it that matches *.exe
 # contains only the specified bytes (see the case stmt below), then print
 # a space-separated list of those names and return 0.  Otherwise, don't
@@ -458,160 +535,148 @@ path_prepend_ ()
   export PATH
 }
 
-setup_ ()
-{
-  if test "$VERBOSE" = yes; then
-    # Test whether set -x may cause the selected shell to corrupt an
-    # application's stderr.  Many do, including zsh-4.3.10 and the /bin/sh
-    # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
-    # If enabling verbose output this way would cause trouble, simply
-    # issue a warning and refrain.
-    if $gl_set_x_corrupts_stderr_; then
-      warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
-    else
-      set -x
-    fi
-  fi
+# =============================================================================
+# Convenience environment variables for the tests
 
-  initial_cwd_=$PWD
+# -----------------------------------------------------------------------------
 
-  pfx_=`testdir_prefix_`
-  test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
-    || fail_ "failed to create temporary directory in $initial_cwd_"
-  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
 
-  # As autoconf-generated configure scripts do, ensure that IFS
-  # is defined initially, so that saving and restoring $IFS works.
-  gl_init_sh_nl_='
-'
-  IFS=" ""     $gl_init_sh_nl_"
+# -----------------------------------------------------------------------------
 
-  # This trap statement, along with a trap on 0 below, ensure that the
-  # temporary directory, $test_dir_, is removed upon exit as well as
-  # upon receipt of any of the listed signals.
-  for sig_ in 1 2 3 13 15; do
-    eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
-  done
-}
+# The interpreter for Bourne-shell scripts.
+# No special standards compatibility requirements.
+# Some environments, such as Android, don't have /bin/sh.
+if test -f /bin/sh$EXEEXT; then
+  BOURNE_SHELL=/bin/sh
+else
+  BOURNE_SHELL=sh
+fi
 
-# Create a temporary directory, much like mktemp -d does.
-# Written by Jim Meyering.
-#
-# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
-#
-# First, try to use the mktemp program.
-# Failing that, we'll roll our own mktemp-like function:
-#  - try to get random bytes from /dev/urandom
-#  - failing that, generate output from a combination of quickly-varying
-#      sources and gzip.  Ignore non-varying gzip header, and extract
-#      "random" bits from there.
-#  - given those bits, map to file-name bytes using tr, and try to create
-#      the desired directory.
-#  - make only $MAX_TRIES_ attempts
+# =============================================================================
+# Convenience functions for the tests
 
-# Helper function.  Print $N pseudo-random bytes from a-zA-Z0-9.
-rand_bytes_ ()
-{
-  n_=$1
+# -----------------------------------------------------------------------------
+# Return value checking
 
-  # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
-  # But if they have openssl, they probably have mktemp, too.
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example.  With this helper you
+# instead check an explicit exit code like
+#   returns_ 1 command ... || fail
+returns_ () {
+  # Disable tracing so it doesn't interfere with stderr of the wrapped command
+  { set +x; } 2>/dev/null
 
-  chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
-  dev_rand_=/dev/urandom
-  if test -r "$dev_rand_"; then
-    # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
-    dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
-      | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
-    return
-  fi
+  local exp_exit="$1"
+  shift
+  "$@"
+  test $? -eq $exp_exit && ret_=0 || ret_=1
 
-  n_plus_50_=`expr $n_ + 50`
-  cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
-  data_=` (eval "$cmds_") 2>&1 | gzip `
+  if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+    set -x
+  fi
+  { return $ret_; } 2>/dev/null
+}
 
-  # Ensure that $data_ has length at least 50+$n_
-  while :; do
-    len_=`echo "$data_"|wc -c`
-    test $n_plus_50_ -le $len_ && break;
-    data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
-  done
+# -----------------------------------------------------------------------------
+# Text file comparison
 
-  echo "$data_" \
-    | dd bs=1 skip=50 count=$n_ 2>/dev/null \
-    | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+# Emit a header similar to that from diff -u;  Print the simulated "diff"
+# command so that the order of arguments is clear.  Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+  printf '%s\n' "diff -u $*" \
+    "--- $1    1970-01-01" \
+    "+++ $2    1970-01-01"
 }
 
-mktempd_ ()
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
 {
-  case $# in
-  2);;
-  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
-  esac
-
-  destdir_=$1
-  template_=$2
-
-  MAX_TRIES_=4
-
-  # Disallow any trailing slash on specified destdir:
-  # it would subvert the post-mktemp "case"-based destdir test.
-  case $destdir_ in
-  / | //) destdir_slash_=$destdir;;
-  */) fail_ "invalid destination dir: remove trailing slash(es)";;
-  *) destdir_slash_=$destdir_/;;
-  esac
-
-  case $template_ in
-  *XXXX) ;;
-  *) fail_ \
-       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
-  esac
-
-  # First, try to use mktemp.
-  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
-
-  # The resulting name must be in the specified directory.
-  case $d in "$destdir_slash_"*) :;; *) false;; esac &&
-
-  # It must have created the directory.
-  test -d "$d" &&
+  test $# = 2 || return 2
 
-  # It must have 0700 permissions.  Handle sticky "S" bits.
-  perms=`ls -dgo "$d" 2>/dev/null` &&
-  case $perms in drwx--[-S]---*) :;; *) false;; esac && {
-    echo "$d"
-    return
-  }
+  if test "x$1" = x/dev/null; then
+    test -s "$2" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+    return 1
+  fi
 
-  # If we reach this point, we'll have to create a directory manually.
+  if test "x$2" = x/dev/null; then
+    test -s "$1" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+    return 1
+  fi
 
-  # Get a copy of the template without its suffix of X's.
-  base_template_=`echo "$template_"|sed 's/XX*$//'`
+  return 2
+}
 
-  # Calculate how many X's we've just removed.
-  template_length_=`echo "$template_" | wc -c`
-  nx_=`echo "$base_template_" | wc -c`
-  nx_=`expr $template_length_ - $nx_`
+for diff_opt_ in -u -U3 -c '' no; do
+  test "$diff_opt_" != no &&
+    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+    break
+done
+if test "$diff_opt_" != no; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff $diff_opt_ "$@"; }
+  else
+    compare_ ()
+    {
+      # If no differences were found, AIX and HP-UX 'diff' produce output
+      # like "No differences encountered".  Hide this output.
+      diff $diff_opt_ "$@" > diff.out
+      diff_status_=$?
+      test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+      rm -f diff.out || diff_status_=2
+      return $diff_status_
+    }
+  fi
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
+  compare_ () { cmp -s "$@"; }
+else
+  compare_ () { cmp "$@"; }
+fi
 
-  err_=
-  i_=1
-  while :; do
-    X_=`rand_bytes_ $nx_`
-    candidate_dir_="$destdir_slash_$base_template_$X_"
-    err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
-      && { echo "$candidate_dir_"; return; }
-    test $MAX_TRIES_ -le $i_ && break;
-    i_=`expr $i_ + 1`
-  done
-  fail_ "$err_"
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+  # This looks like it can be factored to use a simple "case $?"
+  # after unchecked compare_dev_null_ invocation, but that would
+  # fail in a "set -e" environment.
+  if compare_dev_null_ "$@"; then
+    return 0
+  else
+    case $? in
+      1) return 1;;
+      *) compare_ "$@";;
+    esac
+  fi
 }
 
+# -----------------------------------------------------------------------------
+
 # If you want to override the testdir_prefix_ function,
 # or to add more utility functions, use this file.
 test -f "$srcdir/init.cfg" \
   && . "$srcdir/init.cfg"
 
+# =============================================================================
+# Set up the environment for the test to run in.
+
 setup_ "$@"
 # This trap is here, rather than in the setup_ function, because some
 # shells run the exit trap at shell function exit, rather than script exit.
index 140c7b6..ca90582 100644 (file)
@@ -1,18 +1,18 @@
 /* ioctl.c --- wrappers for Windows ioctl function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
index 00627f6..a145f82 100644 (file)
@@ -1,18 +1,18 @@
 /* listen.c --- wrappers for Windows listen function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
diff --git a/gnulib-tests/locale.c b/gnulib-tests/locale.c
new file mode 100644 (file)
index 0000000..6185c4d
--- /dev/null
@@ -0,0 +1,85 @@
+/* Program that prints the names of the categories of the current locale.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/* We want to use the system's setlocale() function here, not the gnulib
+   override.  */
+#undef setlocale
+
+/* Specification:
+   <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/locale.html>
+   Here we implement only the invocation without any command-line options.  */
+
+static const char *
+defaulted_getenv (const char *variable)
+{
+  const char *value = getenv (variable);
+  return (value != NULL ? value : "");
+}
+
+static void
+print_category (int category, const char *variable)
+{
+  const char *value = defaulted_getenv (variable);
+  if (value[0] != '\0' && defaulted_getenv ("LC_ALL")[0] == '\0')
+    /* The variable is set in the environment and not overridden by LC_ALL.  */
+    printf ("%s=%s\n", variable, value);
+  else
+    printf ("%s=\"%s\"\n", variable, setlocale (category, NULL));
+}
+
+int
+main (void)
+{
+  setlocale (LC_ALL, "");
+
+  printf ("LANG=%s\n", defaulted_getenv ("LANG"));
+  print_category (LC_CTYPE, "LC_CTYPE");
+  print_category (LC_NUMERIC, "LC_NUMERIC");
+  print_category (LC_TIME, "LC_TIME");
+  print_category (LC_COLLATE, "LC_COLLATE");
+  print_category (LC_MONETARY, "LC_MONETARY");
+  print_category (LC_MESSAGES, "LC_MESSAGES");
+#ifdef LC_PAPER
+  print_category (LC_PAPER, "LC_PAPER");
+#endif
+#ifdef LC_NAME
+  print_category (LC_NAME, "LC_NAME");
+#endif
+#ifdef LC_ADDRESS
+  print_category (LC_ADDRESS, "LC_ADDRESS");
+#endif
+#ifdef LC_TELEPHONE
+  print_category (LC_TELEPHONE, "LC_TELEPHONE");
+#endif
+#ifdef LC_MEASUREMENT
+  print_category (LC_MEASUREMENT, "LC_MEASUREMENT");
+#endif
+#ifdef LC_IDENTIFICATION
+  print_category (LC_IDENTIFICATION, "LC_IDENTIFICATION");
+#endif
+
+  printf ("LC_ALL=%s\n", defaulted_getenv ("LC_ALL"));
+
+  return 0;
+}
index dd6357a..fccfc50 100644 (file)
@@ -1,5 +1,5 @@
 /* Common macros used by gnulib tests.
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <stdlib.h>
 
 #ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
+# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+#  define FALLTHROUGH ((void) 0)
 # endif
 #endif
 
     {                                                                        \
       if (!(expr))                                                           \
         {                                                                    \
-          fprintf (ASSERT_STREAM, "%s:%d: assertion '%s' failed\n",     \
-                   __FILE__, __LINE__, #expr);                          \
+          fprintf (ASSERT_STREAM, "%s:%d: assertion '%s' failed\n",          \
+                   __FILE__, __LINE__, #expr);                               \
           fflush (ASSERT_STREAM);                                            \
           abort ();                                                          \
         }                                                                    \
     }                                                                        \
   while (0)
 
+/* Like ASSERT, except that it uses no stdio.
+   Requires #include <string.h> and #include <unistd.h>.  */
+#define ASSERT_NO_STDIO(expr) \
+  do                                                        \
+    {                                                       \
+      if (!(expr))                                          \
+        {                                                   \
+          WRITE_TO_STDERR (__FILE__);                       \
+          WRITE_TO_STDERR (":");                            \
+          WRITE_MACROEXPANDED_INTEGER_TO_STDERR (__LINE__); \
+          WRITE_TO_STDERR (": assertion '");                \
+          WRITE_TO_STDERR (#expr);                          \
+          WRITE_TO_STDERR ("' failed\n");                   \
+          abort ();                                         \
+        }                                                   \
+    }                                                       \
+  while (0)
+#define WRITE_MACROEXPANDED_INTEGER_TO_STDERR(integer) \
+  WRITE_INTEGER_TO_STDERR(integer)
+#define WRITE_INTEGER_TO_STDERR(integer) \
+  WRITE_TO_STDERR (#integer)
+#define WRITE_TO_STDERR(string_literal) \
+  {                                     \
+    const char *s = string_literal;     \
+    int ret = write (2, s, strlen (s)); \
+    (void) ret;                         \
+  }
+
 /* SIZEOF (array)
    returns the number of elements of an array.  It works for arrays that are
    declared outside functions and for local variables of array type.  It does
diff --git a/gnulib-tests/mmap-anon-util.h b/gnulib-tests/mmap-anon-util.h
new file mode 100644 (file)
index 0000000..b526cb6
--- /dev/null
@@ -0,0 +1,99 @@
+/* Some auxiliary stuff for using mmap & friends.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#if defined _WIN32 && !defined __CYGWIN__
+
+/* ------------------------ Windows ------------------------ */
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+# include <winerror.h>
+# define PROT_NONE PAGE_NOACCESS
+# define PROT_READ PAGE_READONLY
+# define PROT_READ_WRITE PAGE_READWRITE
+
+static void *
+mmap_zeromap (void *map_addr_hint, size_t map_len)
+{
+  if (VirtualAlloc ((void *)((uintptr_t) map_addr_hint & -0x10000),
+                    (((uintptr_t) map_addr_hint + map_len - 1) | 0xffff) + 1
+                    - ((uintptr_t) map_addr_hint & -0x10000),
+                    MEM_RESERVE, PAGE_NOACCESS)
+      && VirtualAlloc (map_addr_hint, map_len, MEM_COMMIT, PAGE_READWRITE))
+    return map_addr_hint;
+  else
+    return (void *)(-1);
+}
+
+int
+munmap (void *addr, size_t len)
+{
+  if (VirtualFree (addr, len, MEM_DECOMMIT))
+    return 0;
+  else
+    return -1;
+}
+
+int
+mprotect (void *addr, size_t len, int prot)
+{
+  DWORD oldprot;
+
+  if (VirtualProtect (addr, len, prot, &oldprot))
+    return 0;
+  else
+    return -1;
+}
+
+#else
+
+/* ------------------------ Unix ------------------------ */
+
+# include <sys/types.h>
+# include <sys/mman.h>
+# include <fcntl.h>
+
+# ifndef PROT_NONE
+#  define PROT_NONE 0
+# endif
+# define PROT_READ_WRITE  (PROT_READ|PROT_WRITE)
+
+# if HAVE_MAP_ANONYMOUS
+#  define zero_fd -1
+#  define map_flags MAP_ANONYMOUS | MAP_PRIVATE
+# else
+#  ifndef MAP_FILE
+#   define MAP_FILE 0
+#  endif
+static int zero_fd;
+#  define map_flags MAP_FILE | MAP_PRIVATE
+# endif
+
+static void *
+mmap_zeromap (void *map_addr_hint, size_t map_len)
+{
+# ifdef __hpux
+  /* HP-UX 10 mmap() often fails when given a hint.  So give the OS complete
+     freedom about the address range.  */
+  return (void *) mmap ((void *) 0,    map_len, PROT_READ_WRITE, map_flags, zero_fd, 0);
+# else
+  return (void *) mmap (map_addr_hint, map_len, PROT_READ_WRITE, map_flags, zero_fd, 0);
+# endif
+}
+
+#endif
index 2cc3909..10990dc 100644 (file)
@@ -1,18 +1,18 @@
 /* Provide a replacement for the POSIX nanosleep function.
 
-   Copyright (C) 1999-2000, 2002, 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002, 2004-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering
@@ -194,7 +194,7 @@ static sig_atomic_t volatile suspended;
 
 /* Handle SIGCONT. */
 
-static void
+static _GL_ASYNC_SAFE void
 sighandler (int sig)
 {
   suspended = 1;
index c4f45d8..3d0a51d 100644 (file)
@@ -1,5 +1,5 @@
 /* Assist in file system timestamp tests.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 # include <intprops.h>
 
+/* Avoid a conflict with a function called nap() on UnixWare.  */
+# if defined _SCO_DS || (defined __SCO_VERSION__ || defined __sysv5__)  /* OpenServer, UnixWare */
+#  include <unistd.h>
+#  undef nap
+#  define nap gl_nap
+# endif
+
 /* Name of the witness file.  */
 #define TEMPFILE BASE "nap.tmp"
 
@@ -67,7 +74,7 @@ nap_get_stat (struct stat *st, int do_write)
 #if defined _WIN32 || defined __CYGWIN__
       /* On Windows, the modification times are not changed until NAP_FD
          is closed. See
-         https://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx */
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-writefile> */
       close (nap_fd);
       nap_fd = open (TEMPFILE, O_RDWR, 0600);
       ASSERT (nap_fd != -1);
index 0f26cf5..21f3a64 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for <netinet/in.h>.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_NETINET_IN_H
 
index 827a37c..d02b4f6 100644 (file)
@@ -1,18 +1,18 @@
 /* Print a message describing error code.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 9f0edae..fc978f2 100644 (file)
@@ -1,18 +1,18 @@
 /* Create a pipe.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
diff --git a/gnulib-tests/pthread-thread.c b/gnulib-tests/pthread-thread.c
new file mode 100644 (file)
index 0000000..6e603bc
--- /dev/null
@@ -0,0 +1,178 @@
+/* Creating and controlling POSIX threads.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert, 2010, and Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <pthread.h>
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# include "windows-thread.h"
+#else
+# include <stdlib.h>
+#endif
+
+typedef void * (* pthread_main_function_t) (void *);
+
+#if ((defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS) || !HAVE_PTHREAD_H
+
+int
+pthread_attr_init (pthread_attr_t *attr)
+{
+  *attr = PTHREAD_CREATE_JOINABLE;
+  return 0;
+}
+
+int
+pthread_attr_getdetachstate (const pthread_attr_t *attr, int *detachstatep)
+{
+  *detachstatep = *attr & (PTHREAD_CREATE_JOINABLE | PTHREAD_CREATE_DETACHED);
+  return 0;
+}
+
+int
+pthread_attr_setdetachstate (pthread_attr_t *attr, int detachstate)
+{
+  if (!(detachstate == PTHREAD_CREATE_JOINABLE
+        || detachstate == PTHREAD_CREATE_DETACHED))
+    return EINVAL;
+  *attr ^= (*attr ^ detachstate)
+           & (PTHREAD_CREATE_JOINABLE | PTHREAD_CREATE_DETACHED);
+  return 0;
+}
+
+int
+pthread_attr_destroy (pthread_attr_t *attr _GL_UNUSED)
+{
+  return 0;
+}
+
+#endif
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+/* Use Windows threads.  */
+
+int
+pthread_create (pthread_t *threadp, const pthread_attr_t *attr,
+                pthread_main_function_t mainfunc, void *arg)
+{
+  unsigned int glwthread_attr =
+    (attr != NULL
+     && (*attr & (PTHREAD_CREATE_JOINABLE | PTHREAD_CREATE_DETACHED))
+        != PTHREAD_CREATE_JOINABLE
+     ? GLWTHREAD_ATTR_DETACHED
+     : 0);
+  return glwthread_thread_create (threadp, glwthread_attr, mainfunc, arg);
+}
+
+pthread_t
+pthread_self (void)
+{
+  return glwthread_thread_self ();
+}
+
+int
+pthread_equal (pthread_t thread1, pthread_t thread2)
+{
+  return thread1 == thread2;
+}
+
+int
+pthread_detach (pthread_t thread)
+{
+  return glwthread_thread_detach (thread);
+}
+
+int
+pthread_join (pthread_t thread, void **valuep)
+{
+  return glwthread_thread_join (thread, valuep);
+}
+
+void
+pthread_exit (void *value)
+{
+  glwthread_thread_exit (value);
+}
+
+#elif HAVE_PTHREAD_H
+/* Provide workarounds for POSIX threads.  */
+
+# if PTHREAD_CREATE_IS_INLINE
+int
+pthread_create (pthread_t *threadp, const pthread_attr_t *attr,
+                pthread_main_function_t mainfunc, void *arg)
+#  undef pthread_create
+{
+  return pthread_create (threadp, attr, mainfunc, arg);
+}
+
+int
+pthread_attr_init (pthread_attr_t *attr)
+#  undef pthread_attr_init
+{
+  return pthread_attr_init (attr);
+}
+
+# endif
+
+#else
+/* Provide a dummy implementation for single-threaded applications.  */
+
+int
+pthread_create (pthread_t *threadp, const pthread_attr_t *attr,
+                pthread_main_function_t mainfunc, void *arg)
+{
+  /* The maximum number of threads is reached.  Do not create a thread.  */
+  return EAGAIN;
+}
+
+pthread_t
+pthread_self (void)
+{
+  return 42;
+}
+
+int
+pthread_equal (pthread_t thread1, pthread_t thread2)
+{
+  return thread1 == thread2;
+}
+
+int
+pthread_detach (pthread_t thread)
+{
+  /* There are no joinable threads.  */
+  return EINVAL;
+}
+
+int
+pthread_join (pthread_t thread, void **valuep)
+{
+  /* There are no joinable threads.  */
+  return EINVAL;
+}
+
+void
+pthread_exit (void *value)
+{
+  /* There is just one thread, so the process exits.  */
+  exit (0);
+}
+
+#endif
diff --git a/gnulib-tests/pthread.in.h b/gnulib-tests/pthread.in.h
new file mode 100644 (file)
index 0000000..c4cd36c
--- /dev/null
@@ -0,0 +1,1963 @@
+/* Implement the most essential subset of POSIX 1003.1-2008 pthread.h.
+
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert, Glen Lenker, and Bruno Haible.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined _GL_ALREADY_INCLUDING_PTHREAD_H
+/* Special invocation convention:
+   On Android, we have a sequence of nested includes
+   <pthread.h> -> <time.h> -> <sys/time.h> -> <sys/select.h> ->
+   <signal.h> -> <pthread.h>.
+   In this situation, PTHREAD_COND_INITIALIZER is not yet defined,
+   therefore we should not attempt to define PTHREAD_MUTEX_NORMAL etc.  */
+
+#@INCLUDE_NEXT@ @NEXT_PTHREAD_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_PTHREAD_H_
+
+#if @HAVE_PTHREAD_H@
+
+# define _GL_ALREADY_INCLUDING_PTHREAD_H
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_PTHREAD_H@
+
+# undef _GL_ALREADY_INCLUDING_PTHREAD_H
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_PTHREAD_H_
+#define _@GUARD_PREFIX@_PTHREAD_H_
+
+#define __need_system_stdlib_h
+#include <stdlib.h>
+#undef __need_system_stdlib_h
+
+
+/* The pthreads-win32 <pthread.h> defines a couple of broken macros.  */
+#undef asctime_r
+#undef ctime_r
+#undef gmtime_r
+#undef localtime_r
+#undef rand_r
+#undef strtok_r
+
+#include <errno.h>
+#include <sched.h>
+#include <sys/types.h>
+#include <time.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _Noreturn is copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* =========== Thread types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_THREAD@
+#  include "windows-thread.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_t rpl_pthread_t
+#   define pthread_attr_t rpl_pthread_attr_t
+#  endif
+#  if !GNULIB_defined_pthread_thread_types
+typedef glwthread_thread_t pthread_t;
+typedef unsigned int pthread_attr_t;
+#   define GNULIB_defined_pthread_thread_types 1
+#  endif
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_t rpl_pthread_t
+#   define pthread_attr_t rpl_pthread_attr_t
+#  endif
+#  if !GNULIB_defined_pthread_thread_types
+typedef int pthread_t;
+typedef unsigned int pthread_attr_t;
+#   define GNULIB_defined_pthread_thread_types 1
+#  endif
+# endif
+# undef PTHREAD_CREATE_JOINABLE
+# undef PTHREAD_CREATE_DETACHED
+# define PTHREAD_CREATE_JOINABLE 0
+# define PTHREAD_CREATE_DETACHED 1
+#else
+# if !@HAVE_PTHREAD_T@
+#  if !GNULIB_defined_pthread_thread_types
+typedef int pthread_t;
+typedef unsigned int pthread_attr_t;
+#   define GNULIB_defined_pthread_thread_types 1
+#  endif
+# endif
+# if !@HAVE_PTHREAD_CREATE_DETACHED@
+#  define PTHREAD_CREATE_JOINABLE 0
+#  define PTHREAD_CREATE_DETACHED 1
+# endif
+#endif
+
+/* =========== Once-only control (initialization) types and macros ========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_ONCE@
+#  include "windows-once.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_once_t rpl_pthread_once_t
+#  endif
+#  if !GNULIB_defined_pthread_once_types
+typedef glwthread_once_t pthread_once_t;
+#   define GNULIB_defined_pthread_once_types 1
+#  endif
+#  undef PTHREAD_ONCE_INIT
+#  define PTHREAD_ONCE_INIT GLWTHREAD_ONCE_INIT
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_once_t rpl_pthread_once_t
+#  endif
+#  if !GNULIB_defined_pthread_once_types
+typedef int pthread_once_t;
+#   define GNULIB_defined_pthread_once_types 1
+#  endif
+#  undef PTHREAD_ONCE_INIT
+#  define PTHREAD_ONCE_INIT { 0 }
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+#  if !GNULIB_defined_pthread_once_types
+typedef int pthread_once_t;
+#   define GNULIB_defined_pthread_once_types 1
+#  endif
+#  undef PTHREAD_ONCE_INIT
+#  define PTHREAD_ONCE_INIT { 0 }
+# endif
+#endif
+
+/* =========== Mutex types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_MUTEX@
+#  include "windows-timedmutex.h"
+#  include "windows-timedrecmutex.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_mutex_t rpl_pthread_mutex_t
+#   define pthread_mutexattr_t rpl_pthread_mutexattr_t
+#  endif
+#  if !GNULIB_defined_pthread_mutex_types
+typedef struct
+        {
+          int type;
+          union
+            {
+              glwthread_timedmutex_t    u_timedmutex;
+              glwthread_timedrecmutex_t u_timedrecmutex;
+            }
+          u;
+        }
+        pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+#   define GNULIB_defined_pthread_mutex_types 1
+#  endif
+#  undef PTHREAD_MUTEX_INITIALIZER
+#  define PTHREAD_MUTEX_INITIALIZER { 1, { GLWTHREAD_TIMEDMUTEX_INIT } }
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_mutex_t rpl_pthread_mutex_t
+#   define pthread_mutexattr_t rpl_pthread_mutexattr_t
+#  endif
+#  if !GNULIB_defined_pthread_mutex_types
+typedef int pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+#   define GNULIB_defined_pthread_mutex_types 1
+#  endif
+#  undef PTHREAD_MUTEX_INITIALIZER
+#  define PTHREAD_MUTEX_INITIALIZER { 0 }
+# endif
+# undef PTHREAD_MUTEX_DEFAULT
+# undef PTHREAD_MUTEX_NORMAL
+# undef PTHREAD_MUTEX_ERRORCHECK
+# undef PTHREAD_MUTEX_RECURSIVE
+# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
+# define PTHREAD_MUTEX_NORMAL 0
+# define PTHREAD_MUTEX_ERRORCHECK 1
+# define PTHREAD_MUTEX_RECURSIVE 2
+# undef PTHREAD_MUTEX_STALLED
+# undef PTHREAD_MUTEX_ROBUST
+# define PTHREAD_MUTEX_STALLED 0
+# define PTHREAD_MUTEX_ROBUST 1
+#else
+# if !@HAVE_PTHREAD_T@
+#  if !GNULIB_defined_pthread_mutex_types
+typedef int pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+#   define GNULIB_defined_pthread_mutex_types 1
+#  endif
+#  undef PTHREAD_MUTEX_INITIALIZER
+#  define PTHREAD_MUTEX_INITIALIZER { 0 }
+# endif
+# if !@HAVE_PTHREAD_MUTEX_RECURSIVE@
+#  define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
+#  define PTHREAD_MUTEX_NORMAL 0
+#  define PTHREAD_MUTEX_ERRORCHECK 1
+#  define PTHREAD_MUTEX_RECURSIVE 2
+# endif
+# if !@HAVE_PTHREAD_MUTEX_ROBUST@
+#  define PTHREAD_MUTEX_STALLED 0
+#  define PTHREAD_MUTEX_ROBUST 1
+# endif
+#endif
+
+/* =========== Read-write lock types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_RWLOCK@
+#  include "windows-timedrwlock.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_rwlock_t rpl_pthread_rwlock_t
+#   define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+#  endif
+#  if !GNULIB_defined_pthread_rwlock_types
+typedef glwthread_timedrwlock_t pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+#   define GNULIB_defined_pthread_rwlock_types 1
+#  endif
+#  undef PTHREAD_RWLOCK_INITIALIZER
+#  define PTHREAD_RWLOCK_INITIALIZER GLWTHREAD_TIMEDRWLOCK_INIT
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_rwlock_t rpl_pthread_rwlock_t
+#   define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+#  endif
+#  if !GNULIB_defined_pthread_rwlock_types
+typedef int pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+#   define GNULIB_defined_pthread_rwlock_types 1
+#  endif
+#  undef PTHREAD_RWLOCK_INITIALIZER
+#  define PTHREAD_RWLOCK_INITIALIZER { 0 }
+# endif
+#elif @GNULIB_PTHREAD_RWLOCK@ && @REPLACE_PTHREAD_RWLOCK_INIT@ /* i.e. PTHREAD_RWLOCK_UNIMPLEMENTED */
+# if @HAVE_PTHREAD_T@
+#  define pthread_rwlock_t rpl_pthread_rwlock_t
+#  define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+# endif
+# if !GNULIB_defined_pthread_rwlock_types
+typedef struct
+        {
+          pthread_mutex_t lock; /* protects the remaining fields */
+          pthread_cond_t waiting_readers; /* waiting readers */
+          pthread_cond_t waiting_writers; /* waiting writers */
+          unsigned int waiting_writers_count; /* number of waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+#  define GNULIB_defined_pthread_rwlock_types 1
+# endif
+# undef PTHREAD_RWLOCK_INITIALIZER
+# define PTHREAD_RWLOCK_INITIALIZER \
+   { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
+#else
+# if @HAVE_PTHREAD_T@
+#  if !defined PTHREAD_RWLOCK_INITIALIZER && defined PTHREAD_RWLOCK_INITIALIZER_NP /* z/OS */
+#   define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER_NP
+#  endif
+# else
+#  if !GNULIB_defined_pthread_rwlock_types
+typedef int pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+#   define GNULIB_defined_pthread_rwlock_types 1
+#  endif
+#  undef PTHREAD_RWLOCK_INITIALIZER
+#  define PTHREAD_RWLOCK_INITIALIZER { 0 }
+# endif
+#endif
+
+/* =========== Condition variable types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_COND@
+#  include "windows-cond.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_cond_t rpl_pthread_cond_t
+#   define pthread_condattr_t rpl_pthread_condattr_t
+#  endif
+#  if !GNULIB_defined_pthread_cond_types
+typedef glwthread_cond_t pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+#   define GNULIB_defined_pthread_cond_types 1
+#  endif
+#  undef PTHREAD_COND_INITIALIZER
+#  define PTHREAD_COND_INITIALIZER GLWTHREAD_COND_INIT
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_cond_t rpl_pthread_cond_t
+#   define pthread_condattr_t rpl_pthread_condattr_t
+#  endif
+#  if !GNULIB_defined_pthread_cond_types
+typedef int pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+#   define GNULIB_defined_pthread_cond_types 1
+#  endif
+#  undef PTHREAD_COND_INITIALIZER
+#  define PTHREAD_COND_INITIALIZER { 0 }
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+#  if !GNULIB_defined_pthread_cond_types
+typedef int pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+#   define GNULIB_defined_pthread_cond_types 1
+#  endif
+#  undef PTHREAD_COND_INITIALIZER
+#  define PTHREAD_COND_INITIALIZER { 0 }
+# endif
+#endif
+
+/* =========== Thread-specific storage types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_TSS@
+#  include "windows-tls.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_key_t rpl_pthread_key_t
+#  endif
+#  if !GNULIB_defined_pthread_tss_types
+typedef glwthread_tls_key_t pthread_key_t;
+#   define GNULIB_defined_pthread_tss_types 1
+#  endif
+#  undef PTHREAD_DESTRUCTOR_ITERATIONS
+#  define PTHREAD_DESTRUCTOR_ITERATIONS GLWTHREAD_DESTRUCTOR_ITERATIONS
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_key_t rpl_pthread_key_t
+#  endif
+#  if !GNULIB_defined_pthread_tss_types
+typedef void ** pthread_key_t;
+#   define GNULIB_defined_pthread_tss_types 1
+#  endif
+#  undef PTHREAD_DESTRUCTOR_ITERATIONS
+#  define PTHREAD_DESTRUCTOR_ITERATIONS 0
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+#  if !GNULIB_defined_pthread_tss_types
+typedef void ** pthread_key_t;
+#   define GNULIB_defined_pthread_tss_types 1
+#  endif
+#  undef PTHREAD_DESTRUCTOR_ITERATIONS
+#  define PTHREAD_DESTRUCTOR_ITERATIONS 0
+# endif
+#endif
+
+/* =========== Spinlock types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_SPIN@
+#  include "windows-spin.h"
+#  if @HAVE_PTHREAD_T@
+#   define pthread_spinlock_t rpl_pthread_spinlock_t
+#  endif
+#  if !GNULIB_defined_pthread_spin_types
+typedef glwthread_spinlock_t pthread_spinlock_t;
+#   define GNULIB_defined_pthread_spin_types 1
+#  endif
+# else
+#  if @HAVE_PTHREAD_T@
+#   define pthread_spinlock_t rpl_pthread_spinlock_t
+#  endif
+#  if !GNULIB_defined_pthread_spin_types
+typedef pthread_mutex_t pthread_spinlock_t;
+#   define GNULIB_defined_pthread_spin_types 1
+#  endif
+# endif
+# undef PTHREAD_PROCESS_PRIVATE
+# undef PTHREAD_PROCESS_SHARED
+# define PTHREAD_PROCESS_PRIVATE 0
+# define PTHREAD_PROCESS_SHARED 1
+#else
+# if !@HAVE_PTHREAD_SPINLOCK_T@
+/* Approximate spinlocks with mutexes.  */
+#  if !GNULIB_defined_pthread_spin_types
+typedef pthread_mutex_t pthread_spinlock_t;
+#   define GNULIB_defined_pthread_spin_types 1
+#  endif
+# endif
+# if !@HAVE_PTHREAD_PROCESS_SHARED@
+#  define PTHREAD_PROCESS_PRIVATE 0
+#  define PTHREAD_PROCESS_SHARED 1
+# endif
+#endif
+
+/* =========== Other types and macros =========== */
+
+#if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_other_pthread_types
+typedef int pthread_barrier_t;
+typedef unsigned int pthread_barrierattr_t;
+#  define GNULIB_defined_other_pthread_types 1
+# endif
+#endif
+
+#if !defined PTHREAD_CANCELED
+
+# define PTHREAD_BARRIER_SERIAL_THREAD (-1)
+
+# define PTHREAD_CANCEL_DEFERRED 0
+# define PTHREAD_CANCEL_ASYNCHRONOUS 1
+
+# define PTHREAD_CANCEL_ENABLE 0
+# define PTHREAD_CANCEL_DISABLE 1
+
+# define PTHREAD_CANCELED ((void *) -1)
+
+# define PTHREAD_INHERIT_SCHED 0
+# define PTHREAD_EXPLICIT_SCHED 1
+
+# define PTHREAD_PRIO_NONE 0
+# define PTHREAD_PRIO_INHERIT 1
+# define PTHREAD_PRIO_PROTECT 2
+
+# define PTHREAD_SCOPE_SYSTEM 0
+# define PTHREAD_SCOPE_PROCESS 1
+
+#endif
+
+/* =========== Thread functions =========== */
+
+#if @GNULIB_PTHREAD_THREAD@
+/* The 'restrict' qualifier on ARG is nonsense, but POSIX specifies it this way.
+   Sigh.  */
+# if @REPLACE_PTHREAD_CREATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_create
+#   define pthread_create rpl_pthread_create
+#  endif
+_GL_FUNCDECL_RPL (pthread_create, int,
+                  (pthread_t *restrict threadp,
+                   const pthread_attr_t *restrict attr,
+                   void * (*mainfunc) (void *), void *restrict arg)
+                  _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (pthread_create, int,
+                  (pthread_t *restrict threadp,
+                   const pthread_attr_t *restrict attr,
+                   void * (*mainfunc) (void *), void *restrict arg));
+# else
+#  if !@HAVE_PTHREAD_CREATE@
+_GL_FUNCDECL_SYS (pthread_create, int,
+                  (pthread_t *restrict threadp,
+                   const pthread_attr_t *restrict attr,
+                   void * (*mainfunc) (void *), void *restrict arg)
+                  _GL_ARG_NONNULL ((1, 3)));
+#  endif
+_GL_CXXALIAS_SYS_CAST (pthread_create, int,
+                       (pthread_t *restrict threadp,
+                        const pthread_attr_t *restrict attr,
+                        void * (*mainfunc) (void *), void *restrict arg));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_create);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_create
+# if HAVE_RAW_DECL_PTHREAD_CREATE
+_GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_attr_init
+#   define pthread_attr_init rpl_pthread_attr_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_attr_init, int, (pthread_attr_t *attr)
+                                          _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_init, int, (pthread_attr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_ATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_attr_init, int, (pthread_attr_t *attr)
+                                          _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_init
+# if HAVE_RAW_DECL_PTHREAD_ATTR_INIT
+_GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_attr_getdetachstate
+#   define pthread_attr_getdetachstate rpl_pthread_attr_getdetachstate
+#  endif
+_GL_FUNCDECL_RPL (pthread_attr_getdetachstate, int,
+                  (const pthread_attr_t *attr, int *detachstatep)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_attr_getdetachstate, int,
+                  (const pthread_attr_t *attr, int *detachstatep));
+# else
+#  if !@HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+_GL_FUNCDECL_SYS (pthread_attr_getdetachstate, int,
+                  (const pthread_attr_t *attr, int *detachstatep)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int,
+                  (const pthread_attr_t *attr, int *detachstatep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_getdetachstate);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_getdetachstate
+# if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE
+_GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_attr_setdetachstate
+#   define pthread_attr_setdetachstate rpl_pthread_attr_setdetachstate
+#  endif
+_GL_FUNCDECL_RPL (pthread_attr_setdetachstate, int,
+                  (pthread_attr_t *attr, int detachstate)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_setdetachstate, int,
+                  (pthread_attr_t *attr, int detachstate));
+# else
+#  if !@HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+_GL_FUNCDECL_SYS (pthread_attr_setdetachstate, int,
+                  (pthread_attr_t *attr, int detachstate)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int,
+                  (pthread_attr_t *attr, int detachstate));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_setdetachstate);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_setdetachstate
+# if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE
+_GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_attr_destroy
+#   define pthread_attr_destroy rpl_pthread_attr_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr)
+                                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_ATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr)
+                                             _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_destroy
+# if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY
+_GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_SELF@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_self
+#   define pthread_self rpl_pthread_self
+#  endif
+_GL_FUNCDECL_RPL (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (pthread_self, pthread_t, (void));
+# else
+#  if !@HAVE_PTHREAD_SELF@
+_GL_FUNCDECL_SYS (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE);
+#  endif
+_GL_CXXALIAS_SYS (pthread_self, pthread_t, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_self);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_self
+# if HAVE_RAW_DECL_PTHREAD_SELF
+_GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_EQUAL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_equal
+#   define pthread_equal rpl_pthread_equal
+#  endif
+_GL_FUNCDECL_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+_GL_CXXALIAS_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+# else
+#  if !@HAVE_PTHREAD_EQUAL@
+_GL_FUNCDECL_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+#  endif
+_GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_equal);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_equal
+# if HAVE_RAW_DECL_PTHREAD_EQUAL
+_GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_DETACH@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_detach
+#   define pthread_detach rpl_pthread_detach
+#  endif
+_GL_FUNCDECL_RPL (pthread_detach, int, (pthread_t thread));
+_GL_CXXALIAS_RPL (pthread_detach, int, (pthread_t thread));
+# else
+#  if !@HAVE_PTHREAD_DETACH@
+_GL_FUNCDECL_SYS (pthread_detach, int, (pthread_t thread));
+#  endif
+_GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_detach);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_detach
+# if HAVE_RAW_DECL_PTHREAD_DETACH
+_GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_JOIN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_join
+#   define pthread_join rpl_pthread_join
+#  endif
+_GL_FUNCDECL_RPL (pthread_join, int, (pthread_t thread, void **valuep));
+_GL_CXXALIAS_RPL (pthread_join, int, (pthread_t thread, void **valuep));
+# else
+#  if !@HAVE_PTHREAD_JOIN@
+_GL_FUNCDECL_SYS (pthread_join, int, (pthread_t thread, void **valuep));
+#  endif
+_GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_join);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_join
+# if HAVE_RAW_DECL_PTHREAD_JOIN
+_GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_EXIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_exit
+#   define pthread_exit rpl_pthread_exit
+#  endif
+_GL_FUNCDECL_RPL (pthread_exit, _Noreturn void, (void *value));
+_GL_CXXALIAS_RPL (pthread_exit, void, (void *value));
+# else
+#  if !@HAVE_PTHREAD_EXIT@
+_GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value));
+#  endif
+/* Need to cast because of AIX with xlclang++.  */
+_GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_exit);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_exit
+# if HAVE_RAW_DECL_PTHREAD_EXIT
+_GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - "
+                 "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+/* =========== Once-only control (initialization) functions =========== */
+
+#if @GNULIB_PTHREAD_ONCE@
+# if @REPLACE_PTHREAD_ONCE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_once
+#   define pthread_once rpl_pthread_once
+#  endif
+_GL_FUNCDECL_RPL (pthread_once, int,
+                  (pthread_once_t *once_control, void (*initfunction) (void))
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_once, int,
+                  (pthread_once_t *once_control, void (*initfunction) (void)));
+# else
+#  if !@HAVE_PTHREAD_ONCE@
+_GL_FUNCDECL_SYS (pthread_once, int,
+                  (pthread_once_t *once_control, void (*initfunction) (void))
+                   _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS_CAST (pthread_once, int,
+                       (pthread_once_t *once_control,
+                        void (*initfunction) (void)));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_once);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_once
+# if HAVE_RAW_DECL_PTHREAD_ONCE
+_GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - "
+                 "use gnulib module pthread-once for portability");
+# endif
+#endif
+
+/* =========== Mutex functions =========== */
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_init
+#   define pthread_mutex_init rpl_pthread_mutex_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_init, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const pthread_mutexattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_init, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const pthread_mutexattr_t *restrict attr));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_INIT@
+_GL_FUNCDECL_SYS (pthread_mutex_init, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const pthread_mutexattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_init, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const pthread_mutexattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_init
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT
+_GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_init
+#   define pthread_mutexattr_init rpl_pthread_mutexattr_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)
+                                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)
+                                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_init
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT
+_GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_gettype
+#   define pthread_mutexattr_gettype rpl_pthread_mutexattr_gettype
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_gettype, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict typep)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_gettype, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict typep));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+_GL_FUNCDECL_SYS (pthread_mutexattr_gettype, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict typep)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+/* Need to cast, because on FreeBSD the first parameter is
+                        pthread_mutexattr_t *attr.  */
+_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int,
+                       (const pthread_mutexattr_t *restrict attr,
+                        int *restrict typep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_gettype);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_gettype
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE
+_GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_settype
+#   define pthread_mutexattr_settype rpl_pthread_mutexattr_settype
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_settype, int,
+                  (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_settype, int,
+                  (pthread_mutexattr_t *attr, int type));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+_GL_FUNCDECL_SYS (pthread_mutexattr_settype, int,
+                  (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_settype, int,
+                  (pthread_mutexattr_t *attr, int type));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_settype);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_settype
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE
+_GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_getrobust
+#   define pthread_mutexattr_getrobust rpl_pthread_mutexattr_getrobust
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_getrobust, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict robustp)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_getrobust, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict robustp));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+_GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int,
+                  (const pthread_mutexattr_t *restrict attr,
+                   int *restrict robustp)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+/* Need to cast, because on FreeBSD the first parameter is
+                        pthread_mutexattr_t *attr.  */
+_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int,
+                       (const pthread_mutexattr_t *restrict attr,
+                        int *restrict robustp));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_getrobust);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_getrobust
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST
+_GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_setrobust
+#   define pthread_mutexattr_setrobust rpl_pthread_mutexattr_setrobust
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_setrobust, int,
+                  (pthread_mutexattr_t *attr, int robust)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_setrobust, int,
+                  (pthread_mutexattr_t *attr, int robust));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+_GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int,
+                  (pthread_mutexattr_t *attr, int robust)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int,
+                  (pthread_mutexattr_t *attr, int robust));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_setrobust);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_setrobust
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST
+_GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutexattr_destroy
+#   define pthread_mutexattr_destroy rpl_pthread_mutexattr_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)
+                                                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_MUTEXATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)
+                                                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY
+_GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_LOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_lock
+#   define pthread_mutex_lock rpl_pthread_mutex_lock
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex)
+                                           _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_LOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)
+                                           _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_lock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_lock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK
+_GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_trylock
+#   define pthread_mutex_trylock rpl_pthread_mutex_trylock
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_TRYLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_trylock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_trylock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK
+_GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+# if @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_timedlock
+#   define pthread_mutex_timedlock rpl_pthread_mutex_timedlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_timedlock, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutex_timedlock, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_timedlock, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_timedlock, int,
+                  (pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_timedlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_timedlock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK
+_GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not portable - "
+                 "use gnulib module pthread_mutex_timedlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_UNLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_unlock
+#   define pthread_mutex_unlock rpl_pthread_mutex_unlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)
+                                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)
+                                             _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_unlock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK
+_GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_mutex_destroy
+#   define pthread_mutex_destroy rpl_pthread_mutex_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
+# else
+#  if !@HAVE_PTHREAD_MUTEX_DESTROY@
+_GL_FUNCDECL_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_destroy
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY
+_GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable - "
+                 "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+/* =========== Read-write lock functions =========== */
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_init
+#   define pthread_rwlock_init rpl_pthread_rwlock_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_init, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const pthread_rwlockattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_init, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const pthread_rwlockattr_t *restrict attr));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_INIT@
+_GL_FUNCDECL_SYS (pthread_rwlock_init, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const pthread_rwlockattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_init, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const pthread_rwlockattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_init
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT
+_GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlockattr_init
+#   define pthread_rwlockattr_init rpl_pthread_rwlockattr_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)
+                                                _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_RWLOCKATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)
+                                                _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlockattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlockattr_init
+# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT
+_GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlockattr_destroy
+#   define pthread_rwlockattr_destroy rpl_pthread_rwlockattr_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlockattr_destroy, int,
+                  (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlockattr_destroy, int,
+                  (pthread_rwlockattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_rwlockattr_destroy, int,
+                  (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int,
+                  (pthread_rwlockattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlockattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlockattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY
+_GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_rdlock
+#   define pthread_rwlock_rdlock rpl_pthread_rwlock_rdlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_RDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_rdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_rdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_wrlock
+#   define pthread_rwlock_wrlock rpl_pthread_rwlock_wrlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_WRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_wrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_wrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_tryrdlock
+#   define pthread_rwlock_tryrdlock rpl_pthread_rwlock_tryrdlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)
+                                                 _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)
+                                                 _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_tryrdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_tryrdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_trywrlock
+#   define pthread_rwlock_trywrlock rpl_pthread_rwlock_trywrlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)
+                                                 _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)
+                                                 _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_trywrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_trywrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_timedrdlock
+#   define pthread_rwlock_timedrdlock rpl_pthread_rwlock_timedrdlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_timedrdlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_rwlock_timedrdlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_timedrdlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_timedrdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_timedrdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_timedwrlock
+#   define pthread_rwlock_timedwrlock rpl_pthread_rwlock_timedwrlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_timedwrlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_rwlock_timedwrlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_timedwrlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int,
+                  (pthread_rwlock_t *restrict lock,
+                   const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_timedwrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_timedwrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_unlock
+#   define pthread_rwlock_unlock rpl_pthread_rwlock_unlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_unlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK
+_GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_rwlock_destroy
+#   define pthread_rwlock_destroy rpl_pthread_rwlock_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)
+                                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_RWLOCK_DESTROY@
+_GL_FUNCDECL_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)
+                                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_destroy
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY
+_GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not portable - "
+                 "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+/* =========== Condition variable functions =========== */
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_init
+#   define pthread_cond_init rpl_pthread_cond_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_init, int,
+                  (pthread_cond_t *restrict cond,
+                   const pthread_condattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_init, int,
+                  (pthread_cond_t *restrict cond,
+                   const pthread_condattr_t *restrict attr));
+# else
+#  if !@HAVE_PTHREAD_COND_INIT@
+_GL_FUNCDECL_SYS (pthread_cond_init, int,
+                  (pthread_cond_t *restrict cond,
+                   const pthread_condattr_t *restrict attr)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_init, int,
+                  (pthread_cond_t *restrict cond,
+                   const pthread_condattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_init
+# if HAVE_RAW_DECL_PTHREAD_COND_INIT
+_GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_CONDATTR_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_condattr_init
+#   define pthread_condattr_init rpl_pthread_condattr_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr)
+                                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_CONDATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr)
+                                              _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_condattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_condattr_init
+# if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT
+_GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_CONDATTR_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_condattr_destroy
+#   define pthread_condattr_destroy rpl_pthread_condattr_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr)
+                                                 _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
+# else
+#  if !@HAVE_PTHREAD_CONDATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr)
+                                                 _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_condattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_condattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY
+_GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_WAIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_wait
+#   define pthread_cond_wait rpl_pthread_cond_wait
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_wait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_cond_wait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex));
+# else
+#  if !@HAVE_PTHREAD_COND_WAIT@
+_GL_FUNCDECL_SYS (pthread_cond_wait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_wait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_wait);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_wait
+# if HAVE_RAW_DECL_PTHREAD_COND_WAIT
+_GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_TIMEDWAIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_timedwait
+#   define pthread_cond_timedwait rpl_pthread_cond_timedwait
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_timedwait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (pthread_cond_timedwait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime));
+# else
+#  if !@HAVE_PTHREAD_COND_TIMEDWAIT@
+_GL_FUNCDECL_SYS (pthread_cond_timedwait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime)
+                  _GL_ARG_NONNULL ((1, 2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_timedwait, int,
+                  (pthread_cond_t *restrict cond,
+                   pthread_mutex_t *restrict mutex,
+                   const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_timedwait);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_timedwait
+# if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT
+_GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_SIGNAL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_signal
+#   define pthread_cond_signal rpl_pthread_cond_signal
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_signal, int, (pthread_cond_t *cond)
+                                            _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_signal, int, (pthread_cond_t *cond));
+# else
+#  if !@HAVE_PTHREAD_COND_SIGNAL@
+_GL_FUNCDECL_SYS (pthread_cond_signal, int, (pthread_cond_t *cond)
+                                            _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_signal);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_signal
+# if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL
+_GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_BROADCAST@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_broadcast
+#   define pthread_cond_broadcast rpl_pthread_cond_broadcast
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond)
+                                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond));
+# else
+#  if !@HAVE_PTHREAD_COND_BROADCAST@
+_GL_FUNCDECL_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond)
+                                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_broadcast);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_broadcast
+# if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST
+_GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_cond_destroy
+#   define pthread_cond_destroy rpl_pthread_cond_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond)
+                                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond));
+# else
+#  if !@HAVE_PTHREAD_COND_DESTROY@
+_GL_FUNCDECL_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond)
+                                             _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_destroy
+# if HAVE_RAW_DECL_PTHREAD_COND_DESTROY
+_GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable - "
+                 "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+/* =========== Thread-specific storage functions =========== */
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_KEY_CREATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_key_create
+#   define pthread_key_create rpl_pthread_key_create
+#  endif
+_GL_FUNCDECL_RPL (pthread_key_create, int,
+                  (pthread_key_t *keyp, void (*destructor) (void *))
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_key_create, int,
+                  (pthread_key_t *keyp, void (*destructor) (void *)));
+# else
+#  if !@HAVE_PTHREAD_KEY_CREATE@
+_GL_FUNCDECL_SYS (pthread_key_create, int,
+                  (pthread_key_t *keyp, void (*destructor) (void *))
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS_CAST (pthread_key_create, int,
+                       (pthread_key_t *keyp, void (*destructor) (void *)));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_key_create);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_key_create
+# if HAVE_RAW_DECL_PTHREAD_KEY_CREATE
+_GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - "
+                 "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_SETSPECIFIC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_setspecific
+#   define pthread_setspecific rpl_pthread_setspecific
+#  endif
+_GL_FUNCDECL_RPL (pthread_setspecific, int,
+                  (pthread_key_t key, const void *value));
+_GL_CXXALIAS_RPL (pthread_setspecific, int,
+                  (pthread_key_t key, const void *value));
+# else
+#  if !@HAVE_PTHREAD_SETSPECIFIC@
+_GL_FUNCDECL_SYS (pthread_setspecific, int,
+                  (pthread_key_t key, const void *value));
+#  endif
+_GL_CXXALIAS_SYS (pthread_setspecific, int,
+                  (pthread_key_t key, const void *value));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_setspecific);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_setspecific
+# if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC
+_GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - "
+                 "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_GETSPECIFIC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_getspecific
+#   define pthread_getspecific rpl_pthread_getspecific
+#  endif
+_GL_FUNCDECL_RPL (pthread_getspecific, void *, (pthread_key_t key));
+_GL_CXXALIAS_RPL (pthread_getspecific, void *, (pthread_key_t key));
+# else
+#  if !@HAVE_PTHREAD_GETSPECIFIC@
+_GL_FUNCDECL_SYS (pthread_getspecific, void *, (pthread_key_t key));
+#  endif
+_GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_getspecific);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_getspecific
+# if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC
+_GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - "
+                 "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_KEY_DELETE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_key_delete
+#   define pthread_key_delete rpl_pthread_key_delete
+#  endif
+_GL_FUNCDECL_RPL (pthread_key_delete, int, (pthread_key_t key));
+_GL_CXXALIAS_RPL (pthread_key_delete, int, (pthread_key_t key));
+# else
+#  if !@HAVE_PTHREAD_KEY_DELETE@
+_GL_FUNCDECL_SYS (pthread_key_delete, int, (pthread_key_t key));
+#  endif
+_GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_key_delete);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_key_delete
+# if HAVE_RAW_DECL_PTHREAD_KEY_DELETE
+_GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - "
+                 "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+/* =========== Spinlock functions =========== */
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_INIT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_spin_init
+#   define pthread_spin_init rpl_pthread_spin_init
+#  endif
+_GL_FUNCDECL_RPL (pthread_spin_init, int,
+                  (pthread_spinlock_t *lock, int shared_across_processes)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_init, int,
+                  (pthread_spinlock_t *lock, int shared_across_processes));
+# else
+#  if !@HAVE_PTHREAD_SPIN_INIT@
+_GL_FUNCDECL_SYS (pthread_spin_init, int,
+                  (pthread_spinlock_t *lock, int shared_across_processes)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_spin_init, int,
+                  (pthread_spinlock_t *lock, int shared_across_processes));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_init
+# if HAVE_RAW_DECL_PTHREAD_SPIN_INIT
+_GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - "
+                 "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_LOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_spin_lock
+#   define pthread_spin_lock rpl_pthread_spin_lock
+#  endif
+_GL_FUNCDECL_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock)
+                                          _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_SPIN_LOCK@
+_GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)
+                                          _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_lock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_lock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK
+_GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - "
+                 "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_TRYLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_spin_trylock
+#   define pthread_spin_trylock rpl_pthread_spin_trylock
+#  endif
+_GL_FUNCDECL_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock)
+                                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_SPIN_TRYLOCK@
+_GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)
+                                             _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_trylock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_trylock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK
+_GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable - "
+                 "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_UNLOCK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_spin_unlock
+#   define pthread_spin_unlock rpl_pthread_spin_unlock
+#  endif
+_GL_FUNCDECL_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock)
+                                            _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_SPIN_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)
+                                            _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_unlock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK
+_GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - "
+                 "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_DESTROY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef pthread_spin_destroy
+#   define pthread_spin_destroy rpl_pthread_spin_destroy
+#  endif
+_GL_FUNCDECL_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock)
+                                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
+# else
+#  if !@HAVE_PTHREAD_SPIN_DESTROY@
+_GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)
+                                             _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_destroy
+# if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY
+_GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable - "
+                 "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
+#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
+#endif
diff --git a/gnulib-tests/pthread_sigmask.c b/gnulib-tests/pthread_sigmask.c
new file mode 100644 (file)
index 0000000..11b7091
--- /dev/null
@@ -0,0 +1,92 @@
+/* POSIX compatible signal blocking for threads.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <signal.h>
+
+#include <errno.h>
+#include <stddef.h>
+
+#if PTHREAD_SIGMASK_INEFFECTIVE
+# include <string.h>
+#endif
+
+#if PTHREAD_SIGMASK_UNBLOCK_BUG
+# include <unistd.h>
+#endif
+
+int
+pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
+#undef pthread_sigmask
+{
+#if HAVE_PTHREAD_SIGMASK
+  int ret;
+
+# if PTHREAD_SIGMASK_INEFFECTIVE
+  sigset_t omask, omask_copy;
+  sigset_t *old_mask_ptr = &omask;
+  sigemptyset (&omask);
+  /* Add a signal unlikely to be blocked, so that OMASK_COPY
+     is unlikely to match the actual mask.  */
+  sigaddset (&omask, SIGILL);
+  memcpy (&omask_copy, &omask, sizeof omask);
+# else
+  sigset_t *old_mask_ptr = old_mask;
+# endif
+
+  ret = pthread_sigmask (how, new_mask, old_mask_ptr);
+
+# if PTHREAD_SIGMASK_INEFFECTIVE
+  if (ret == 0)
+    {
+      /* Detect whether pthread_sigmask is currently ineffective.
+         Don't cache the information: libpthread.so could be dynamically
+         loaded after the program started and after pthread_sigmask was
+         called for the first time.  */
+      if (memcmp (&omask_copy, &omask, sizeof omask) == 0
+          && pthread_sigmask (1729, &omask_copy, NULL) == 0)
+        {
+          /* pthread_sigmask is currently ineffective.  The program is not
+             linked to -lpthread.  So use sigprocmask instead.  */
+          return (sigprocmask (how, new_mask, old_mask) < 0 ? errno : 0);
+        }
+
+      if (old_mask)
+        memcpy (old_mask, &omask, sizeof omask);
+    }
+# endif
+# if PTHREAD_SIGMASK_FAILS_WITH_ERRNO
+  if (ret == -1)
+    return errno;
+# endif
+# if PTHREAD_SIGMASK_UNBLOCK_BUG
+  if (ret == 0
+      && new_mask != NULL
+      && (how == SIG_UNBLOCK || how == SIG_SETMASK))
+    {
+      /* Give the OS the opportunity to raise signals that were pending before
+         the pthread_sigmask call and have now been unblocked.  */
+      usleep (1);
+    }
+# endif
+  return ret;
+#else
+  int ret = sigprocmask (how, new_mask, old_mask);
+  return (ret < 0 ? errno : 0);
+#endif
+}
index 801e372..435d10f 100644 (file)
@@ -1,20 +1,20 @@
-/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2018 Free Software
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2021 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 3 of the License, or any
-   later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -58,6 +58,12 @@ __libc_lock_define_initialized (static, envlock)
 # define UNLOCK
 #endif
 
+#if defined _WIN32 && ! defined __CYGWIN__
+/* Don't assume that UNICODE is not defined.  */
+# undef SetEnvironmentVariable
+# define SetEnvironmentVariable SetEnvironmentVariableA
+#endif
+
 static int
 _unsetenv (const char *name)
 {
@@ -76,15 +82,13 @@ _unsetenv (const char *name)
 
 #if HAVE_DECL__PUTENV
   {
-    int putenv_result, putenv_errno;
+    int putenv_result;
     char *name_ = malloc (len + 2);
     memcpy (name_, name, len);
     name_[len] = '=';
     name_[len + 1] = 0;
     putenv_result = _putenv (name_);
-    putenv_errno = errno;
     free (name_);
-    __set_errno (putenv_errno);
     return putenv_result;
   }
 #else
@@ -138,7 +142,7 @@ putenv (char *string)
       /* _putenv ("NAME=") unsets NAME, so invoke _putenv ("NAME= ")
          to allocate the environ vector and then replace the new
          entry with "NAME=".  */
-      int putenv_result, putenv_errno;
+      int putenv_result;
       char *name_x = malloc (name_end - string + sizeof "= ");
       if (!name_x)
         return -1;
@@ -146,7 +150,6 @@ putenv (char *string)
       name_x[name_end - string + 1] = ' ';
       name_x[name_end - string + 2] = 0;
       putenv_result = _putenv (name_x);
-      putenv_errno = errno;
       for (ep = environ; *ep; ep++)
         if (strcmp (*ep, name_x) == 0)
           {
@@ -160,11 +163,10 @@ putenv (char *string)
              fix that by calling SetEnvironmentVariable directly.  */
           name_x[name_end - string] = 0;
           putenv_result = SetEnvironmentVariable (name_x, "") ? 0 : -1;
-          putenv_errno = ENOMEM; /* ENOMEM is the only way to fail.  */
+          errno = ENOMEM; /* ENOMEM is the only way to fail.  */
         }
 # endif
       free (name_x);
-      __set_errno (putenv_errno);
       return putenv_result;
     }
 #else
index 6837795..c727777 100644 (file)
@@ -1,18 +1,18 @@
 /* Determine whether two stat buffers are known to refer to the same file.
 
-   Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef SAME_INODE_H
diff --git a/gnulib-tests/sched.in.h b/gnulib-tests/sched.in.h
new file mode 100644 (file)
index 0000000..cdfe1ae
--- /dev/null
@@ -0,0 +1,99 @@
+/* A GNU-like <sched.h>.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _@GUARD_PREFIX@_SCHED_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_SCHED_H@
+# if @HAVE_SYS_CDEFS_H@
+#  include <sys/cdefs.h>
+# endif
+# @INCLUDE_NEXT@ @NEXT_SCHED_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_SCHED_H
+#define _@GUARD_PREFIX@_SCHED_H
+
+/* Get pid_t.
+   This is needed on glibc 2.11 (see
+   glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
+   and Mac OS X 10.5.  */
+#include <sys/types.h>
+
+#ifdef __KLIBC__
+/* On OS/2 kLIBC, struct sched_param is in spawn.h.  */
+# include <spawn.h>
+#endif
+
+#ifdef __VMS
+/* On OpenVMS, struct sched_param is in <pthread.h>.  */
+# include <pthread.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+#if !@HAVE_STRUCT_SCHED_PARAM@
+
+# if !GNULIB_defined_struct_sched_param
+struct sched_param
+{
+  int sched_priority;
+};
+#  define GNULIB_defined_struct_sched_param 1
+# endif
+
+#endif
+
+#if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER)
+# define SCHED_FIFO   1
+# define SCHED_RR     2
+# define SCHED_OTHER  0
+#endif
+
+#if @GNULIB_SCHED_YIELD@
+# if @REPLACE_SCHED_YIELD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef sched_yield
+#   define sched_yield rpl_sched_yield
+#  endif
+_GL_FUNCDECL_RPL (sched_yield, int, (void));
+_GL_CXXALIAS_RPL (sched_yield, int, (void));
+# else
+#  if !@HAVE_SCHED_YIELD@
+_GL_FUNCDECL_SYS (sched_yield, int, (void));
+#  endif
+_GL_CXXALIAS_SYS (sched_yield, int, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (sched_yield);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sched_yield
+# if HAVE_RAW_DECL_SCHED_YIELD
+_GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - "
+                 "use gnulib module sched_yield for portability");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_SCHED_H */
+#endif /* _@GUARD_PREFIX@_SCHED_H */
index 670a3e1..eddac4b 100644 (file)
@@ -1,30 +1,33 @@
 /* Emulation for select(2)
    Contributed by Paolo Bonzini.
 
-   Copyright 2008-2018 Free Software Foundation, Inc.
+   Copyright 2008-2021 Free Software Foundation, Inc.
 
    This file is part of gnulib.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
-#include <alloca.h>
-#include <assert.h>
+
+/* Specification.  */
+#include <sys/select.h>
 
 #if defined _WIN32 && ! defined __CYGWIN__
 /* Native Windows.  */
 
+#include <alloca.h>
+#include <assert.h>
 #include <sys/types.h>
 #include <errno.h>
 #include <limits.h>
 
 #undef select
 
+/* Don't assume that UNICODE is not defined.  */
+#undef GetModuleHandle
+#define GetModuleHandle GetModuleHandleA
+#undef PeekConsoleInput
+#define PeekConsoleInput PeekConsoleInputA
+#undef CreateEvent
+#define CreateEvent CreateEventA
+#undef PeekMessage
+#define PeekMessage PeekMessageA
+#undef DispatchMessage
+#define DispatchMessage DispatchMessageA
+
 /* Avoid warnings from gcc -Wcast-function-type.  */
 #define GetProcAddress \
   (void *) GetProcAddress
@@ -515,12 +530,13 @@ restart:
       if (h != handle_array[nhandles])
         {
           /* Perform handle->descriptor mapping.  */
-          WSAEventSelect ((SOCKET) h, NULL, 0);
-          if (FD_ISSET (h, &handle_rfds))
+          SOCKET s = (SOCKET) h;
+          WSAEventSelect (s, NULL, 0);
+          if (FD_ISSET (s, &handle_rfds))
             FD_SET (i, rfds);
-          if (FD_ISSET (h, &handle_wfds))
+          if (FD_ISSET (s, &handle_wfds))
             FD_SET (i, wfds);
-          if (FD_ISSET (h, &handle_xfds))
+          if (FD_ISSET (s, &handle_xfds))
             FD_SET (i, xfds);
         }
       else
@@ -541,7 +557,6 @@ restart:
 
 #else /* ! Native Windows.  */
 
-#include <sys/select.h>
 #include <stddef.h> /* NULL */
 #include <errno.h>
 #include <unistd.h>
diff --git a/gnulib-tests/setlocale.c b/gnulib-tests/setlocale.c
deleted file mode 100644 (file)
index 63f870f..0000000
+++ /dev/null
@@ -1,1049 +0,0 @@
-/* Set the current locale.  -*- coding: utf-8 -*-
-   Copyright (C) 2009, 2011-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2009.  */
-
-#include <config.h>
-
-/* Override setlocale() so that when the default locale is requested
-   (locale = ""), the environment variables LC_ALL, LC_*, and LANG are
-   considered.
-   Also include all the functionality from libintl's setlocale() override.  */
-
-/* Please keep this file in sync with
-   gettext/gettext-runtime/intl/setlocale.c !  */
-
-/* Specification.  */
-#include <locale.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "localename.h"
-
-#if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE
-# if HAVE_CFLOCALECOPYPREFERREDLANGUAGES
-#  include <CoreFoundation/CFLocale.h>
-# elif HAVE_CFPREFERENCESCOPYAPPVALUE
-#  include <CoreFoundation/CFPreferences.h>
-# endif
-# include <CoreFoundation/CFPropertyList.h>
-# include <CoreFoundation/CFArray.h>
-# include <CoreFoundation/CFString.h>
-extern void gl_locale_name_canonicalize (char *name);
-#endif
-
-#if 1
-
-# undef setlocale
-
-/* Return string representation of locale category CATEGORY.  */
-static const char *
-category_to_name (int category)
-{
-  const char *retval;
-
-  switch (category)
-  {
-  case LC_COLLATE:
-    retval = "LC_COLLATE";
-    break;
-  case LC_CTYPE:
-    retval = "LC_CTYPE";
-    break;
-  case LC_MONETARY:
-    retval = "LC_MONETARY";
-    break;
-  case LC_NUMERIC:
-    retval = "LC_NUMERIC";
-    break;
-  case LC_TIME:
-    retval = "LC_TIME";
-    break;
-  case LC_MESSAGES:
-    retval = "LC_MESSAGES";
-    break;
-  default:
-    /* If you have a better idea for a default value let me know.  */
-    retval = "LC_XXX";
-  }
-
-  return retval;
-}
-
-# if defined _WIN32 && ! defined __CYGWIN__
-
-/* The native Windows setlocale() function expects locale names of the form
-   "German" or "German_Germany" or "DEU", but not "de" or "de_DE".  We need
-   to convert the names from the form with ISO 639 language code and ISO 3166
-   country code to the form with English names or with three-letter identifier.
-   The three-letter identifiers known by a Windows XP SP2 or SP3 are:
-     AFK  Afrikaans_South Africa.1252
-     ARA  Arabic_Saudi Arabia.1256
-     ARB  Arabic_Lebanon.1256
-     ARE  Arabic_Egypt.1256
-     ARG  Arabic_Algeria.1256
-     ARH  Arabic_Bahrain.1256
-     ARI  Arabic_Iraq.1256
-     ARJ  Arabic_Jordan.1256
-     ARK  Arabic_Kuwait.1256
-     ARL  Arabic_Libya.1256
-     ARM  Arabic_Morocco.1256
-     ARO  Arabic_Oman.1256
-     ARQ  Arabic_Qatar.1256
-     ARS  Arabic_Syria.1256
-     ART  Arabic_Tunisia.1256
-     ARU  Arabic_U.A.E..1256
-     ARY  Arabic_Yemen.1256
-     AZE  Azeri (Latin)_Azerbaijan.1254
-     BEL  Belarusian_Belarus.1251
-     BGR  Bulgarian_Bulgaria.1251
-     BSB  Bosnian_Bosnia and Herzegovina.1250
-     BSC  Bosnian (Cyrillic)_Bosnia and Herzegovina.1250  (wrong encoding!)
-     CAT  Catalan_Spain.1252
-     CHH  Chinese_Hong Kong S.A.R..950
-     CHI  Chinese_Singapore.936
-     CHS  Chinese_People's Republic of China.936
-     CHT  Chinese_Taiwan.950
-     CSY  Czech_Czech Republic.1250
-     CYM  Welsh_United Kingdom.1252
-     DAN  Danish_Denmark.1252
-     DEA  German_Austria.1252
-     DEC  German_Liechtenstein.1252
-     DEL  German_Luxembourg.1252
-     DES  German_Switzerland.1252
-     DEU  German_Germany.1252
-     ELL  Greek_Greece.1253
-     ENA  English_Australia.1252
-     ENB  English_Caribbean.1252
-     ENC  English_Canada.1252
-     ENG  English_United Kingdom.1252
-     ENI  English_Ireland.1252
-     ENJ  English_Jamaica.1252
-     ENL  English_Belize.1252
-     ENP  English_Republic of the Philippines.1252
-     ENS  English_South Africa.1252
-     ENT  English_Trinidad and Tobago.1252
-     ENU  English_United States.1252
-     ENW  English_Zimbabwe.1252
-     ENZ  English_New Zealand.1252
-     ESA  Spanish_Panama.1252
-     ESB  Spanish_Bolivia.1252
-     ESC  Spanish_Costa Rica.1252
-     ESD  Spanish_Dominican Republic.1252
-     ESE  Spanish_El Salvador.1252
-     ESF  Spanish_Ecuador.1252
-     ESG  Spanish_Guatemala.1252
-     ESH  Spanish_Honduras.1252
-     ESI  Spanish_Nicaragua.1252
-     ESL  Spanish_Chile.1252
-     ESM  Spanish_Mexico.1252
-     ESN  Spanish_Spain.1252
-     ESO  Spanish_Colombia.1252
-     ESP  Spanish_Spain.1252
-     ESR  Spanish_Peru.1252
-     ESS  Spanish_Argentina.1252
-     ESU  Spanish_Puerto Rico.1252
-     ESV  Spanish_Venezuela.1252
-     ESY  Spanish_Uruguay.1252
-     ESZ  Spanish_Paraguay.1252
-     ETI  Estonian_Estonia.1257
-     EUQ  Basque_Spain.1252
-     FAR  Farsi_Iran.1256
-     FIN  Finnish_Finland.1252
-     FOS  Faroese_Faroe Islands.1252
-     FPO  Filipino_Philippines.1252
-     FRA  French_France.1252
-     FRB  French_Belgium.1252
-     FRC  French_Canada.1252
-     FRL  French_Luxembourg.1252
-     FRM  French_Principality of Monaco.1252
-     FRS  French_Switzerland.1252
-     FYN  Frisian_Netherlands.1252
-     GLC  Galician_Spain.1252
-     HEB  Hebrew_Israel.1255
-     HRB  Croatian_Bosnia and Herzegovina.1250
-     HRV  Croatian_Croatia.1250
-     HUN  Hungarian_Hungary.1250
-     IND  Indonesian_Indonesia.1252
-     IRE  Irish_Ireland.1252
-     ISL  Icelandic_Iceland.1252
-     ITA  Italian_Italy.1252
-     ITS  Italian_Switzerland.1252
-     IUK  Inuktitut (Latin)_Canada.1252
-     JPN  Japanese_Japan.932
-     KKZ  Kazakh_Kazakhstan.1251
-     KOR  Korean_Korea.949
-     KYR  Kyrgyz_Kyrgyzstan.1251
-     LBX  Luxembourgish_Luxembourg.1252
-     LTH  Lithuanian_Lithuania.1257
-     LVI  Latvian_Latvia.1257
-     MKI  FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251
-     MON  Mongolian_Mongolia.1251
-     MPD  Mapudungun_Chile.1252
-     MSB  Malay_Brunei Darussalam.1252
-     MSL  Malay_Malaysia.1252
-     MWK  Mohawk_Canada.1252
-     NLB  Dutch_Belgium.1252
-     NLD  Dutch_Netherlands.1252
-     NON  Norwegian-Nynorsk_Norway.1252
-     NOR  Norwegian (Bokmål)_Norway.1252
-     NSO  Northern Sotho_South Africa.1252
-     PLK  Polish_Poland.1250
-     PTB  Portuguese_Brazil.1252
-     PTG  Portuguese_Portugal.1252
-     QUB  Quechua_Bolivia.1252
-     QUE  Quechua_Ecuador.1252
-     QUP  Quechua_Peru.1252
-     RMC  Romansh_Switzerland.1252
-     ROM  Romanian_Romania.1250
-     RUS  Russian_Russia.1251
-     SKY  Slovak_Slovakia.1250
-     SLV  Slovenian_Slovenia.1250
-     SMA  Sami (Southern)_Norway.1252
-     SMB  Sami (Southern)_Sweden.1252
-     SME  Sami (Northern)_Norway.1252
-     SMF  Sami (Northern)_Sweden.1252
-     SMG  Sami (Northern)_Finland.1252
-     SMJ  Sami (Lule)_Norway.1252
-     SMK  Sami (Lule)_Sweden.1252
-     SMN  Sami (Inari)_Finland.1252
-     SMS  Sami (Skolt)_Finland.1252
-     SQI  Albanian_Albania.1250
-     SRB  Serbian (Cyrillic)_Serbia and Montenegro.1251
-     SRL  Serbian (Latin)_Serbia and Montenegro.1250
-     SRN  Serbian (Cyrillic)_Bosnia and Herzegovina.1251
-     SRS  Serbian (Latin)_Bosnia and Herzegovina.1250
-     SVE  Swedish_Sweden.1252
-     SVF  Swedish_Finland.1252
-     SWK  Swahili_Kenya.1252
-     THA  Thai_Thailand.874
-     TRK  Turkish_Turkey.1254
-     TSN  Tswana_South Africa.1252
-     TTT  Tatar_Russia.1251
-     UKR  Ukrainian_Ukraine.1251
-     URD  Urdu_Islamic Republic of Pakistan.1256
-     USA  English_United States.1252
-     UZB  Uzbek (Latin)_Uzbekistan.1254
-     VIT  Vietnamese_Viet Nam.1258
-     XHO  Xhosa_South Africa.1252
-     ZHH  Chinese_Hong Kong S.A.R..950
-     ZHI  Chinese_Singapore.936
-     ZHM  Chinese_Macau S.A.R..950
-     ZUL  Zulu_South Africa.1252
- */
-
-/* Table from ISO 639 language code, optionally with country or script suffix,
-   to English name.
-   Keep in sync with the gl_locale_name_from_win32_LANGID function in
-   localename.c!  */
-struct table_entry
-{
-  const char *code;
-  const char *english;
-};
-static const struct table_entry language_table[] =
-  {
-    { "af", "Afrikaans" },
-    { "am", "Amharic" },
-    { "ar", "Arabic" },
-    { "arn", "Mapudungun" },
-    { "as", "Assamese" },
-    { "az@cyrillic", "Azeri (Cyrillic)" },
-    { "az@latin", "Azeri (Latin)" },
-    { "ba", "Bashkir" },
-    { "be", "Belarusian" },
-    { "ber", "Tamazight" },
-    { "ber@arabic", "Tamazight (Arabic)" },
-    { "ber@latin", "Tamazight (Latin)" },
-    { "bg", "Bulgarian" },
-    { "bin", "Edo" },
-    { "bn", "Bengali" },
-    { "bn_BD", "Bengali (Bangladesh)" },
-    { "bn_IN", "Bengali (India)" },
-    { "bnt", "Sutu" },
-    { "bo", "Tibetan" },
-    { "br", "Breton" },
-    { "bs", "BSB" }, /* "Bosnian (Latin)" */
-    { "bs@cyrillic", "BSC" }, /* Bosnian (Cyrillic) */
-    { "ca", "Catalan" },
-    { "chr", "Cherokee" },
-    { "co", "Corsican" },
-    { "cpe", "Hawaiian" },
-    { "cs", "Czech" },
-    { "cy", "Welsh" },
-    { "da", "Danish" },
-    { "de", "German" },
-    { "dsb", "Lower Sorbian" },
-    { "dv", "Divehi" },
-    { "el", "Greek" },
-    { "en", "English" },
-    { "es", "Spanish" },
-    { "et", "Estonian" },
-    { "eu", "Basque" },
-    { "fa", "Farsi" },
-    { "ff", "Fulfulde" },
-    { "fi", "Finnish" },
-    { "fo", "Faroese" }, /* "Faeroese" does not work */
-    { "fr", "French" },
-    { "fy", "Frisian" },
-    { "ga", "IRE" }, /* Gaelic (Ireland) */
-    { "gd", "Gaelic (Scotland)" },
-    { "gd", "Scottish Gaelic" },
-    { "gl", "Galician" },
-    { "gn", "Guarani" },
-    { "gsw", "Alsatian" },
-    { "gu", "Gujarati" },
-    { "ha", "Hausa" },
-    { "he", "Hebrew" },
-    { "hi", "Hindi" },
-    { "hr", "Croatian" },
-    { "hsb", "Upper Sorbian" },
-    { "hu", "Hungarian" },
-    { "hy", "Armenian" },
-    { "id", "Indonesian" },
-    { "ig", "Igbo" },
-    { "ii", "Yi" },
-    { "is", "Icelandic" },
-    { "it", "Italian" },
-    { "iu", "IUK" }, /* Inuktitut */
-    { "ja", "Japanese" },
-    { "ka", "Georgian" },
-    { "kk", "Kazakh" },
-    { "kl", "Greenlandic" },
-    { "km", "Cambodian" },
-    { "km", "Khmer" },
-    { "kn", "Kannada" },
-    { "ko", "Korean" },
-    { "kok", "Konkani" },
-    { "kr", "Kanuri" },
-    { "ks", "Kashmiri" },
-    { "ks_IN", "Kashmiri_India" },
-    { "ks_PK", "Kashmiri (Arabic)_Pakistan" },
-    { "ky", "Kyrgyz" },
-    { "la", "Latin" },
-    { "lb", "Luxembourgish" },
-    { "lo", "Lao" },
-    { "lt", "Lithuanian" },
-    { "lv", "Latvian" },
-    { "mi", "Maori" },
-    { "mk", "FYRO Macedonian" },
-    { "mk", "Macedonian" },
-    { "ml", "Malayalam" },
-    { "mn", "Mongolian" },
-    { "mni", "Manipuri" },
-    { "moh", "Mohawk" },
-    { "mr", "Marathi" },
-    { "ms", "Malay" },
-    { "mt", "Maltese" },
-    { "my", "Burmese" },
-    { "nb", "NOR" }, /* Norwegian Bokmål */
-    { "ne", "Nepali" },
-    { "nic", "Ibibio" },
-    { "nl", "Dutch" },
-    { "nn", "NON" }, /* Norwegian Nynorsk */
-    { "no", "Norwegian" },
-    { "nso", "Northern Sotho" },
-    { "nso", "Sepedi" },
-    { "oc", "Occitan" },
-    { "om", "Oromo" },
-    { "or", "Oriya" },
-    { "pa", "Punjabi" },
-    { "pap", "Papiamentu" },
-    { "pl", "Polish" },
-    { "prs", "Dari" },
-    { "ps", "Pashto" },
-    { "pt", "Portuguese" },
-    { "qu", "Quechua" },
-    { "qut", "K'iche'" },
-    { "rm", "Romansh" },
-    { "ro", "Romanian" },
-    { "ru", "Russian" },
-    { "rw", "Kinyarwanda" },
-    { "sa", "Sanskrit" },
-    { "sah", "Yakut" },
-    { "sd", "Sindhi" },
-    { "se", "Sami (Northern)" },
-    { "se", "Northern Sami" },
-    { "si", "Sinhalese" },
-    { "sk", "Slovak" },
-    { "sl", "Slovenian" },
-    { "sma", "Sami (Southern)" },
-    { "sma", "Southern Sami" },
-    { "smj", "Sami (Lule)" },
-    { "smj", "Lule Sami" },
-    { "smn", "Sami (Inari)" },
-    { "smn", "Inari Sami" },
-    { "sms", "Sami (Skolt)" },
-    { "sms", "Skolt Sami" },
-    { "so", "Somali" },
-    { "sq", "Albanian" },
-    { "sr", "Serbian (Latin)" },
-    { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */
-    { "sv", "Swedish" },
-    { "sw", "Swahili" },
-    { "syr", "Syriac" },
-    { "ta", "Tamil" },
-    { "te", "Telugu" },
-    { "tg", "Tajik" },
-    { "th", "Thai" },
-    { "ti", "Tigrinya" },
-    { "tk", "Turkmen" },
-    { "tl", "Filipino" },
-    { "tn", "Tswana" },
-    { "tr", "Turkish" },
-    { "ts", "Tsonga" },
-    { "tt", "Tatar" },
-    { "ug", "Uighur" },
-    { "uk", "Ukrainian" },
-    { "ur", "Urdu" },
-    { "uz", "Uzbek" },
-    { "uz", "Uzbek (Latin)" },
-    { "uz@cyrillic", "Uzbek (Cyrillic)" },
-    { "ve", "Venda" },
-    { "vi", "Vietnamese" },
-    { "wen", "Sorbian" },
-    { "wo", "Wolof" },
-    { "xh", "Xhosa" },
-    { "yi", "Yiddish" },
-    { "yo", "Yoruba" },
-    { "zh", "Chinese" },
-    { "zu", "Zulu" }
-  };
-
-/* Table from ISO 3166 country code to English name.
-   Keep in sync with the gl_locale_name_from_win32_LANGID function in
-   localename.c!  */
-static const struct table_entry country_table[] =
-  {
-    { "AE", "U.A.E." },
-    { "AF", "Afghanistan" },
-    { "AL", "Albania" },
-    { "AM", "Armenia" },
-    { "AN", "Netherlands Antilles" },
-    { "AR", "Argentina" },
-    { "AT", "Austria" },
-    { "AU", "Australia" },
-    { "AZ", "Azerbaijan" },
-    { "BA", "Bosnia and Herzegovina" },
-    { "BD", "Bangladesh" },
-    { "BE", "Belgium" },
-    { "BG", "Bulgaria" },
-    { "BH", "Bahrain" },
-    { "BN", "Brunei Darussalam" },
-    { "BO", "Bolivia" },
-    { "BR", "Brazil" },
-    { "BT", "Bhutan" },
-    { "BY", "Belarus" },
-    { "BZ", "Belize" },
-    { "CA", "Canada" },
-    { "CG", "Congo" },
-    { "CH", "Switzerland" },
-    { "CI", "Cote d'Ivoire" },
-    { "CL", "Chile" },
-    { "CM", "Cameroon" },
-    { "CN", "People's Republic of China" },
-    { "CO", "Colombia" },
-    { "CR", "Costa Rica" },
-    { "CS", "Serbia and Montenegro" },
-    { "CZ", "Czech Republic" },
-    { "DE", "Germany" },
-    { "DK", "Denmark" },
-    { "DO", "Dominican Republic" },
-    { "DZ", "Algeria" },
-    { "EC", "Ecuador" },
-    { "EE", "Estonia" },
-    { "EG", "Egypt" },
-    { "ER", "Eritrea" },
-    { "ES", "Spain" },
-    { "ET", "Ethiopia" },
-    { "FI", "Finland" },
-    { "FO", "Faroe Islands" },
-    { "FR", "France" },
-    { "GB", "United Kingdom" },
-    { "GD", "Caribbean" },
-    { "GE", "Georgia" },
-    { "GL", "Greenland" },
-    { "GR", "Greece" },
-    { "GT", "Guatemala" },
-    { "HK", "Hong Kong" },
-    { "HK", "Hong Kong S.A.R." },
-    { "HN", "Honduras" },
-    { "HR", "Croatia" },
-    { "HT", "Haiti" },
-    { "HU", "Hungary" },
-    { "ID", "Indonesia" },
-    { "IE", "Ireland" },
-    { "IL", "Israel" },
-    { "IN", "India" },
-    { "IQ", "Iraq" },
-    { "IR", "Iran" },
-    { "IS", "Iceland" },
-    { "IT", "Italy" },
-    { "JM", "Jamaica" },
-    { "JO", "Jordan" },
-    { "JP", "Japan" },
-    { "KE", "Kenya" },
-    { "KG", "Kyrgyzstan" },
-    { "KH", "Cambodia" },
-    { "KR", "South Korea" },
-    { "KW", "Kuwait" },
-    { "KZ", "Kazakhstan" },
-    { "LA", "Laos" },
-    { "LB", "Lebanon" },
-    { "LI", "Liechtenstein" },
-    { "LK", "Sri Lanka" },
-    { "LT", "Lithuania" },
-    { "LU", "Luxembourg" },
-    { "LV", "Latvia" },
-    { "LY", "Libya" },
-    { "MA", "Morocco" },
-    { "MC", "Principality of Monaco" },
-    { "MD", "Moldava" },
-    { "MD", "Moldova" },
-    { "ME", "Montenegro" },
-    { "MK", "Former Yugoslav Republic of Macedonia" },
-    { "ML", "Mali" },
-    { "MM", "Myanmar" },
-    { "MN", "Mongolia" },
-    { "MO", "Macau S.A.R." },
-    { "MT", "Malta" },
-    { "MV", "Maldives" },
-    { "MX", "Mexico" },
-    { "MY", "Malaysia" },
-    { "NG", "Nigeria" },
-    { "NI", "Nicaragua" },
-    { "NL", "Netherlands" },
-    { "NO", "Norway" },
-    { "NP", "Nepal" },
-    { "NZ", "New Zealand" },
-    { "OM", "Oman" },
-    { "PA", "Panama" },
-    { "PE", "Peru" },
-    { "PH", "Philippines" },
-    { "PK", "Islamic Republic of Pakistan" },
-    { "PL", "Poland" },
-    { "PR", "Puerto Rico" },
-    { "PT", "Portugal" },
-    { "PY", "Paraguay" },
-    { "QA", "Qatar" },
-    { "RE", "Reunion" },
-    { "RO", "Romania" },
-    { "RS", "Serbia" },
-    { "RU", "Russia" },
-    { "RW", "Rwanda" },
-    { "SA", "Saudi Arabia" },
-    { "SE", "Sweden" },
-    { "SG", "Singapore" },
-    { "SI", "Slovenia" },
-    { "SK", "Slovak" },
-    { "SN", "Senegal" },
-    { "SO", "Somalia" },
-    { "SR", "Suriname" },
-    { "SV", "El Salvador" },
-    { "SY", "Syria" },
-    { "TH", "Thailand" },
-    { "TJ", "Tajikistan" },
-    { "TM", "Turkmenistan" },
-    { "TN", "Tunisia" },
-    { "TR", "Turkey" },
-    { "TT", "Trinidad and Tobago" },
-    { "TW", "Taiwan" },
-    { "TZ", "Tanzania" },
-    { "UA", "Ukraine" },
-    { "US", "United States" },
-    { "UY", "Uruguay" },
-    { "VA", "Vatican" },
-    { "VE", "Venezuela" },
-    { "VN", "Viet Nam" },
-    { "YE", "Yemen" },
-    { "ZA", "South Africa" },
-    { "ZW", "Zimbabwe" }
-  };
-
-/* Given a string STRING, find the set of indices i such that TABLE[i].code is
-   the given STRING.  It is a range [lo,hi-1].  */
-typedef struct { size_t lo; size_t hi; } range_t;
-static void
-search (const struct table_entry *table, size_t table_size, const char *string,
-        range_t *result)
-{
-  /* The table is sorted.  Perform a binary search.  */
-  size_t hi = table_size;
-  size_t lo = 0;
-  while (lo < hi)
-    {
-      /* Invariant:
-         for i < lo, strcmp (table[i].code, string) < 0,
-         for i >= hi, strcmp (table[i].code, string) > 0.  */
-      size_t mid = (hi + lo) >> 1; /* >= lo, < hi */
-      int cmp = strcmp (table[mid].code, string);
-      if (cmp < 0)
-        lo = mid + 1;
-      else if (cmp > 0)
-        hi = mid;
-      else
-        {
-          /* Found an i with
-               strcmp (language_table[i].code, string) == 0.
-             Find the entire interval of such i.  */
-          {
-            size_t i;
-
-            for (i = mid; i > lo; )
-              {
-                i--;
-                if (strcmp (table[i].code, string) < 0)
-                  {
-                    lo = i + 1;
-                    break;
-                  }
-              }
-          }
-          {
-            size_t i;
-
-            for (i = mid; i < hi; i++)
-              {
-                if (strcmp (table[i].code, string) > 0)
-                  {
-                    hi = i;
-                    break;
-                  }
-              }
-          }
-          /* The set of i with
-               strcmp (language_table[i].code, string) == 0
-             is the interval [lo, hi-1].  */
-          break;
-        }
-    }
-  result->lo = lo;
-  result->hi = hi;
-}
-
-/* Like setlocale, but accept also locale names in the form ll or ll_CC,
-   where ll is an ISO 639 language code and CC is an ISO 3166 country code.  */
-static char *
-setlocale_unixlike (int category, const char *locale)
-{
-  char *result;
-  char llCC_buf[64];
-  char ll_buf[64];
-  char CC_buf[64];
-
-  /* The native Windows implementation of setlocale understands the special
-     locale name "C", but not "POSIX".  Therefore map "POSIX" to "C".  */
-  if (locale != NULL && strcmp (locale, "POSIX") == 0)
-    locale = "C";
-
-  /* First, try setlocale with the original argument unchanged.  */
-  result = setlocale (category, locale);
-  if (result != NULL)
-    return result;
-
-  /* Otherwise, assume the argument is in the form
-       language[_territory][.codeset][@modifier]
-     and try to map it using the tables.  */
-  if (strlen (locale) < sizeof (llCC_buf))
-    {
-      /* Second try: Remove the codeset part.  */
-      {
-        const char *p = locale;
-        char *q = llCC_buf;
-
-        /* Copy the part before the dot.  */
-        for (; *p != '\0' && *p != '.'; p++, q++)
-          *q = *p;
-        if (*p == '.')
-          /* Skip the part up to the '@', if any.  */
-          for (; *p != '\0' && *p != '@'; p++)
-            ;
-        /* Copy the part starting with '@', if any.  */
-        for (; *p != '\0'; p++, q++)
-          *q = *p;
-        *q = '\0';
-      }
-      /* llCC_buf now contains
-           language[_territory][@modifier]
-       */
-      if (strcmp (llCC_buf, locale) != 0)
-        {
-          result = setlocale (category, llCC_buf);
-          if (result != NULL)
-            return result;
-        }
-      /* Look it up in language_table.  */
-      {
-        range_t range;
-        size_t i;
-
-        search (language_table,
-                sizeof (language_table) / sizeof (language_table[0]),
-                llCC_buf,
-                &range);
-
-        for (i = range.lo; i < range.hi; i++)
-          {
-            /* Try the replacement in language_table[i].  */
-            result = setlocale (category, language_table[i].english);
-            if (result != NULL)
-              return result;
-          }
-      }
-      /* Split language[_territory][@modifier]
-         into  ll_buf = language[@modifier]
-         and   CC_buf = territory
-       */
-      {
-        const char *underscore = strchr (llCC_buf, '_');
-        if (underscore != NULL)
-          {
-            const char *territory_start = underscore + 1;
-            const char *territory_end = strchr (territory_start, '@');
-            if (territory_end == NULL)
-              territory_end = territory_start + strlen (territory_start);
-
-            memcpy (ll_buf, llCC_buf, underscore - llCC_buf);
-            strcpy (ll_buf + (underscore - llCC_buf), territory_end);
-
-            memcpy (CC_buf, territory_start, territory_end - territory_start);
-            CC_buf[territory_end - territory_start] = '\0';
-
-            {
-              /* Look up ll_buf in language_table
-                 and CC_buf in country_table.  */
-              range_t language_range;
-
-              search (language_table,
-                      sizeof (language_table) / sizeof (language_table[0]),
-                      ll_buf,
-                      &language_range);
-              if (language_range.lo < language_range.hi)
-                {
-                  range_t country_range;
-
-                  search (country_table,
-                          sizeof (country_table) / sizeof (country_table[0]),
-                          CC_buf,
-                          &country_range);
-                  if (country_range.lo < country_range.hi)
-                    {
-                      size_t i;
-                      size_t j;
-
-                      for (i = language_range.lo; i < language_range.hi; i++)
-                        for (j = country_range.lo; j < country_range.hi; j++)
-                          {
-                            /* Concatenate the replacements.  */
-                            const char *part1 = language_table[i].english;
-                            size_t part1_len = strlen (part1);
-                            const char *part2 = country_table[j].english;
-                            size_t part2_len = strlen (part2) + 1;
-                            char buf[64+64];
-
-                            if (!(part1_len + 1 + part2_len <= sizeof (buf)))
-                              abort ();
-                            memcpy (buf, part1, part1_len);
-                            buf[part1_len] = '_';
-                            memcpy (buf + part1_len + 1, part2, part2_len);
-
-                            /* Try the concatenated replacements.  */
-                            result = setlocale (category, buf);
-                            if (result != NULL)
-                              return result;
-                          }
-                    }
-
-                  /* Try omitting the country entirely.  This may set a locale
-                     corresponding to the wrong country, but is better than
-                     failing entirely.  */
-                  {
-                    size_t i;
-
-                    for (i = language_range.lo; i < language_range.hi; i++)
-                      {
-                        /* Try only the language replacement.  */
-                        result =
-                          setlocale (category, language_table[i].english);
-                        if (result != NULL)
-                          return result;
-                      }
-                  }
-                }
-            }
-          }
-      }
-    }
-
-  /* Failed.  */
-  return NULL;
-}
-
-# else
-#  define setlocale_unixlike setlocale
-# endif
-
-# if LC_MESSAGES == 1729
-
-/* The system does not store an LC_MESSAGES locale category.  Do it here.  */
-static char lc_messages_name[64] = "C";
-
-/* Like setlocale, but support also LC_MESSAGES.  */
-static char *
-setlocale_single (int category, const char *locale)
-{
-  if (category == LC_MESSAGES)
-    {
-      if (locale != NULL)
-        {
-          lc_messages_name[sizeof (lc_messages_name) - 1] = '\0';
-          strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1);
-        }
-      return lc_messages_name;
-    }
-  else
-    return setlocale_unixlike (category, locale);
-}
-
-# else
-#  define setlocale_single setlocale_unixlike
-# endif
-
-char *
-rpl_setlocale (int category, const char *locale)
-{
-  if (locale != NULL && locale[0] == '\0')
-    {
-      /* A request to the set the current locale to the default locale.  */
-      if (category == LC_ALL)
-        {
-          /* Set LC_CTYPE first.  Then the other categories.  */
-          static int const categories[] =
-            {
-              LC_CTYPE,
-              LC_NUMERIC,
-              LC_TIME,
-              LC_COLLATE,
-              LC_MONETARY,
-              LC_MESSAGES
-            };
-          char *saved_locale;
-          const char *base_name;
-          unsigned int i;
-
-          /* Back up the old locale, in case one of the steps fails.  */
-          saved_locale = setlocale (LC_ALL, NULL);
-          if (saved_locale == NULL)
-            return NULL;
-          saved_locale = strdup (saved_locale);
-          if (saved_locale == NULL)
-            return NULL;
-
-          /* Set LC_CTYPE category.  Set all other categories (except possibly
-             LC_MESSAGES) to the same value in the same call; this is likely to
-             save calls.  */
-          base_name =
-            gl_locale_name_environ (LC_CTYPE, category_to_name (LC_CTYPE));
-          if (base_name == NULL)
-            base_name = gl_locale_name_default ();
-
-          if (setlocale_unixlike (LC_ALL, base_name) != NULL)
-            {
-              /* LC_CTYPE category already set.  */
-              i = 1;
-            }
-          else
-            {
-              /* On Mac OS X, "UTF-8" is a valid locale name for LC_CTYPE but
-                 not for LC_ALL.  Therefore this call may fail.  So, try
-                 another base_name.  */
-              base_name = "C";
-              if (setlocale_unixlike (LC_ALL, base_name) == NULL)
-                goto fail;
-              i = 0;
-            }
-# if defined _WIN32 && ! defined __CYGWIN__
-          /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
-             LC_CTYPE category to an invalid value ("C") when it does not
-             support the specified encoding.  Report a failure instead.  */
-          if (strchr (base_name, '.') != NULL
-              && strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-            goto fail;
-# endif
-
-          for (; i < sizeof (categories) / sizeof (categories[0]); i++)
-            {
-              int cat = categories[i];
-              const char *name;
-
-              name = gl_locale_name_environ (cat, category_to_name (cat));
-              if (name == NULL)
-                name = gl_locale_name_default ();
-
-              /* If name is the same as base_name, it has already been set
-                 through the setlocale call before the loop.  */
-              if (strcmp (name, base_name) != 0
-# if LC_MESSAGES == 1729
-                  || cat == LC_MESSAGES
-# endif
-                 )
-                if (setlocale_single (cat, name) == NULL)
-# if defined __APPLE__ && defined __MACH__
-                  {
-                    /* On Mac OS X 10.13, some locales can be set through
-                       System Preferences > Language & Region, that are not
-                       supported by libc.  The system's setlocale() falls
-                       back to "C" for these locale categories.  We can possibly
-                       do better.  If we can't, print a warning, to limit user
-                       expectations.  */
-                    int warn = 1;
-
-                    if (cat == LC_CTYPE)
-                      warn = (setlocale_single (cat, "UTF-8") == NULL);
-#  if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
-                    else if (cat == LC_MESSAGES)
-                      {
-                        /* Take the primary language preference.  */
-#   if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */
-                        CFArrayRef prefArray = CFLocaleCopyPreferredLanguages ();
-#   elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
-                        CFTypeRef preferences =
-                          CFPreferencesCopyAppValue (CFSTR ("AppleLanguages"),
-                                                     kCFPreferencesCurrentApplication);
-                        if (preferences != NULL
-                            && CFGetTypeID (preferences) == CFArrayGetTypeID ())
-                          {
-                            CFArrayRef prefArray = (CFArrayRef)preferences;
-#   endif
-                            int n = CFArrayGetCount (prefArray);
-                            if (n > 0)
-                              {
-                                char buf[256];
-                                CFTypeRef element = CFArrayGetValueAtIndex (prefArray, 0);
-                                if (element != NULL
-                                    && CFGetTypeID (element) == CFStringGetTypeID ()
-                                    && CFStringGetCString ((CFStringRef)element,
-                                                           buf, sizeof (buf),
-                                                           kCFStringEncodingASCII))
-                                  {
-                                    /* Remove the country.
-                                       E.g. "zh-Hans-DE" -> "zh-Hans".  */
-                                    char *last_minus = strrchr (buf, '-');
-                                    if (last_minus != NULL)
-                                      *last_minus = '\0';
-
-                                    /* Convert to Unix locale name.
-                                       E.g. "zh-Hans" -> "zh_CN".  */
-                                    gl_locale_name_canonicalize (buf);
-
-                                    /* Try setlocale with this value.  */
-                                    warn = (setlocale_single (cat, buf) == NULL);
-                                  }
-                              }
-#   if HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* MacOS X 10.5 or newer */
-                        CFRelease (prefArray);
-#   elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.4 or newer */
-                          }
-#   endif
-                      }
-#  endif
-                    /* No fallback possible for LC_NUMERIC.  The application
-                       should use the locale properties
-                       kCFLocaleDecimalSeparator, kCFLocaleGroupingSeparator.
-                       No fallback possible for LC_TIME.  The application should
-                       use the locale property kCFLocaleCalendarIdentifier.
-                       No fallback possible for LC_COLLATE.  The application
-                       should use the locale properties
-                       kCFLocaleCollationIdentifier, kCFLocaleCollatorIdentifier.
-                       No fallback possible for LC_MONETARY.  The application
-                       should use the locale properties
-                       kCFLocaleCurrencySymbol, kCFLocaleCurrencyCode.  */
-
-                    if (warn)
-                      fprintf (stderr,
-                               "Warning: Failed to set locale category %s to %s.\n",
-                               category_to_name (cat), name);
-                  }
-# else
-                  goto fail;
-# endif
-            }
-
-          /* All steps were successful.  */
-          free (saved_locale);
-          return setlocale (LC_ALL, NULL);
-
-        fail:
-          if (saved_locale[0] != '\0') /* don't risk an endless recursion */
-            setlocale (LC_ALL, saved_locale);
-          free (saved_locale);
-          return NULL;
-        }
-      else
-        {
-          const char *name =
-            gl_locale_name_environ (category, category_to_name (category));
-          if (name == NULL)
-            name = gl_locale_name_default ();
-
-          return setlocale_single (category, name);
-        }
-    }
-  else
-    {
-# if defined _WIN32 && ! defined __CYGWIN__
-      if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL)
-        {
-          char *saved_locale;
-
-          /* Back up the old locale.  */
-          saved_locale = setlocale (LC_ALL, NULL);
-          if (saved_locale == NULL)
-            return NULL;
-          saved_locale = strdup (saved_locale);
-          if (saved_locale == NULL)
-            return NULL;
-
-          if (setlocale_unixlike (LC_ALL, locale) == NULL)
-            {
-              free (saved_locale);
-              return NULL;
-            }
-
-          /* On native Windows, setlocale(LC_ALL,...) may succeed but set the
-             LC_CTYPE category to an invalid value ("C") when it does not
-             support the specified encoding.  Report a failure instead.  */
-          if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-            {
-              if (saved_locale[0] != '\0') /* don't risk an endless recursion */
-                setlocale (LC_ALL, saved_locale);
-              free (saved_locale);
-              return NULL;
-            }
-
-          /* It was really successful.  */
-          free (saved_locale);
-          return setlocale (LC_ALL, NULL);
-        }
-      else
-# endif
-        return setlocale_single (category, locale);
-    }
-}
-
-#endif
index 1a7b583..10b1e90 100644 (file)
@@ -1,18 +1,18 @@
 /* setsockopt.c --- wrappers for Windows setsockopt function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
diff --git a/gnulib-tests/sig-handler.c b/gnulib-tests/sig-handler.c
new file mode 100644 (file)
index 0000000..6257914
--- /dev/null
@@ -0,0 +1,21 @@
+/* Convenience declarations when working with <signal.h>.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE
+#include "sig-handler.h"
similarity index 73%
rename from lib/sig-handler.h
rename to gnulib-tests/sig-handler.h
index 9ea3394..0ce5897 100644 (file)
@@ -1,18 +1,18 @@
 /* Convenience declarations when working with <signal.h>.
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_SIG_HANDLER_H
similarity index 92%
rename from lib/sigaction.c
rename to gnulib-tests/sigaction.c
index 7e4af5f..e1ace46 100644 (file)
@@ -1,18 +1,18 @@
 /* POSIX compatible signal blocking.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Eric Blake <ebb9@byu.net>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index adabfad..f791783 100644 (file)
@@ -1,5 +1,5 @@
 /* Macro for checking that a function declaration is compliant.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
similarity index 94%
rename from lib/sigprocmask.c
rename to gnulib-tests/sigprocmask.c
index 7a49bcd..c479204 100644 (file)
@@ -1,18 +1,18 @@
 /* POSIX compatible signal blocking.
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 8b75390..0b49eb7 100644 (file)
@@ -1,18 +1,18 @@
 /* Pausing execution of the current thread.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 8a9971b..a589cf1 100644 (file)
@@ -1,19 +1,19 @@
 /* Formatted output to strings.
-   Copyright (C) 2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson and Paul Eggert.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 84f4d94..0f2e6ff 100644 (file)
@@ -1,18 +1,18 @@
 /* socket.c --- wrappers for Windows socket function
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
 
 #include "sockets.h"
 
+/* Don't assume that UNICODE is defined.  */
+#undef WSASocket
+#define WSASocket WSASocketW
+
 int
 rpl_socket (int domain, int type, int protocol)
 {
index eec1ec8..934da73 100644 (file)
@@ -1,18 +1,18 @@
 /* sockets.c --- wrappers for Windows socket functions
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson */
index 5a83332..e70c2bb 100644 (file)
@@ -1,18 +1,18 @@
 /* sockets.h - wrappers for Windows socket functions
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson */
index 2a22cb4..f024452 100644 (file)
@@ -1,18 +1,18 @@
 /* strerror_r.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
@@ -120,6 +120,7 @@ local_snprintf (char *buf, size_t buflen, const char *format, ...)
     buf[buflen - 1] = '\0';
   return result;
 }
+# undef snprintf
 # define snprintf local_snprintf
 #endif
 
index c1c4b40..6e48898 100644 (file)
@@ -1,17 +1,17 @@
 /* Stub for symlink().
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -36,7 +36,7 @@ rpl_symlink (char const *contents, char const *name)
   if (len && name[len - 1] == '/')
     {
       struct stat st;
-      if (lstat (name, &st) == 0)
+      if (lstat (name, &st) == 0 || errno == EOVERFLOW)
         errno = EEXIST;
       return -1;
     }
index 42a5ca4..f1b2a1b 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for and wrapper around <sys/ioctl.h>.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
 
index 154e570..f8ef648 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for <sys/select.h>.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 # if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 /* Get definition of 'sigset_t'.
    But avoid namespace pollution on glibc systems and "unknown type
    name" problems on Cygwin.
+   On OS/2 kLIBC, sigset_t is defined in <sys/select.h>, too. In addition,
+   if <sys/param.h> is included, <types.h> -> <sys/types.h> -> <sys/select.h>
+   are included. Then <signal.h> -> <pthread.h> are included by GNULIB. By the
+   way, <pthread.h> requires PAGE_SIZE defined in <sys/param.h>. However,
+   <sys/param.h> has not been processed, yet. As a result, 'PAGE_SIZE'
+   undeclared error occurs in <pthread.h>.
    Do this after the include_next (for the sake of OpenBSD 5.0) but before
    the split double-inclusion guard (for the sake of Solaris).  */
-#if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__)
+#if !((defined __GLIBC__ || defined __CYGWIN__ || defined __KLIBC__) \
+      && !defined __UCLIBC__)
 # include <signal.h>
 #endif
 
@@ -177,14 +184,14 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef close
 #   define close close_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
     _GL_WARN_ON_USE (close,
                      "close() used without including <unistd.h>");
 #  endif
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef gethostname
 #   define gethostname gethostname_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
     _GL_WARN_ON_USE (gethostname,
                      "gethostname() used without including <unistd.h>");
 #  endif
@@ -219,7 +226,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 #   define setsockopt          setsockopt_used_without_including_sys_socket_h
 #   undef shutdown
 #   define shutdown            shutdown_used_without_including_sys_socket_h
-#  else
+#  elif !defined __clang__
     _GL_WARN_ON_USE (socket,
                      "socket() used without including <sys/socket.h>");
     _GL_WARN_ON_USE (connect,
@@ -295,11 +302,11 @@ _GL_FUNCDECL_RPL (select, int,
                    struct timeval *restrict));
 _GL_CXXALIAS_RPL (select, int,
                   (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
-                   struct timeval *restrict));
+                   timeval *restrict));
 # else
 _GL_CXXALIAS_SYS (select, int,
                   (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
-                   struct timeval *restrict));
+                   timeval *restrict));
 # endif
 _GL_CXXALIASWARN (select);
 #elif @HAVE_WINSOCK2_H@
index 3b261da..d90b32c 100644 (file)
@@ -1,4 +1,22 @@
+/* Inline functions for <sys/socket.h>.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
 #include "sys/socket.h"
 typedef int dummy;
index ef65dc6..0a2c57d 100644 (file)
@@ -1,20 +1,20 @@
 /* Provide a sys/socket header file for systems lacking it (read: MinGW)
    and for systems where it is incomplete.
-   Copyright (C) 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* This file is supposed to be used on platforms that lack <sys/socket.h>,
    on platforms where <sys/socket.h> cannot be included standalone, and on
@@ -169,7 +169,7 @@ struct sockaddr_storage
    code may not run on older Windows releases then.  My Windows 2000
    box was not able to run the code, for example.  The situation is
    slightly confusing because
-   <https://msdn.microsoft.com/en-us/library/ms738520>
+   <https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfo>
    suggests that getaddrinfo should be available on all Windows
    releases. */
 
@@ -195,12 +195,7 @@ struct sockaddr_storage
 /* Include headers needed by the emulation code.  */
 #  include <sys/types.h>
 #  include <io.h>
-
-#  if !GNULIB_defined_socklen_t
-typedef int socklen_t;
-#   define GNULIB_defined_socklen_t 1
-#  endif
-
+/* If these headers don't define socklen_t, <config.h> does.  */
 # endif
 
 /* Rudimentary 'struct msghdr'; this works as long as you don't try to
@@ -261,7 +256,7 @@ rpl_fd_isset (SOCKET fd, fd_set * set)
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef close
 #   define close close_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
     _GL_WARN_ON_USE (close,
                      "close() used without including <unistd.h>");
 #  endif
@@ -346,14 +341,20 @@ _GL_WARN_ON_USE (connect, "connect is not always POSIX compliant - "
 #   define accept rpl_accept
 #  endif
 _GL_FUNCDECL_RPL (accept, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                  (int fd,
+                   struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen));
 _GL_CXXALIAS_RPL (accept, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                  (int fd,
+                   struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen));
 # else
 /* Need to cast, because on Solaris 10 systems, the third parameter is
-                                                       void *addrlen.  */
+                        void *addrlen.  */
 _GL_CXXALIAS_SYS_CAST (accept, int,
-                       (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                       (int fd,
+                        struct sockaddr *restrict addr,
+                        socklen_t *restrict addrlen));
 # endif
 _GL_CXXALIASWARN (accept);
 #elif @HAVE_WINSOCK2_H@
@@ -404,15 +405,18 @@ _GL_WARN_ON_USE (bind, "bind is not always POSIX compliant - "
 #   define getpeername rpl_getpeername
 #  endif
 _GL_FUNCDECL_RPL (getpeername, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen)
+                  (int fd, struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (getpeername, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                  (int fd, struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen));
 # else
 /* Need to cast, because on Solaris 10 systems, the third parameter is
-                                                       void *addrlen.  */
+                        void *addrlen.  */
 _GL_CXXALIAS_SYS_CAST (getpeername, int,
-                       (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                       (int fd, struct sockaddr *restrict addr,
+                        socklen_t *restrict addrlen));
 # endif
 _GL_CXXALIASWARN (getpeername);
 #elif @HAVE_WINSOCK2_H@
@@ -433,15 +437,18 @@ _GL_WARN_ON_USE (getpeername, "getpeername is not always POSIX compliant - "
 #   define getsockname rpl_getsockname
 #  endif
 _GL_FUNCDECL_RPL (getsockname, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen)
+                  (int fd, struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (getsockname, int,
-                  (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                  (int fd, struct sockaddr *restrict addr,
+                   socklen_t *restrict addrlen));
 # else
 /* Need to cast, because on Solaris 10 systems, the third parameter is
-                                                       void *addrlen.  */
+                        void *addrlen.  */
 _GL_CXXALIAS_SYS_CAST (getsockname, int,
-                       (int fd, struct sockaddr *addr, socklen_t *addrlen));
+                       (int fd, struct sockaddr *restrict addr,
+                        socklen_t *restrict addrlen));
 # endif
 _GL_CXXALIASWARN (getsockname);
 #elif @HAVE_WINSOCK2_H@
@@ -461,16 +468,19 @@ _GL_WARN_ON_USE (getsockname, "getsockname is not always POSIX compliant - "
 #   undef getsockopt
 #   define getsockopt rpl_getsockopt
 #  endif
-_GL_FUNCDECL_RPL (getsockopt, int, (int fd, int level, int optname,
-                                    void *optval, socklen_t *optlen)
-                                   _GL_ARG_NONNULL ((4, 5)));
-_GL_CXXALIAS_RPL (getsockopt, int, (int fd, int level, int optname,
-                                    void *optval, socklen_t *optlen));
+_GL_FUNCDECL_RPL (getsockopt, int,
+                  (int fd, int level, int optname,
+                   void *restrict optval, socklen_t *restrict optlen)
+                  _GL_ARG_NONNULL ((4, 5)));
+_GL_CXXALIAS_RPL (getsockopt, int,
+                  (int fd, int level, int optname,
+                   void *restrict optval, socklen_t *restrict optlen));
 # else
 /* Need to cast, because on Solaris 10 systems, the fifth parameter is
                                                        void *optlen.  */
-_GL_CXXALIAS_SYS_CAST (getsockopt, int, (int fd, int level, int optname,
-                                         void *optval, socklen_t *optlen));
+_GL_CXXALIAS_SYS_CAST (getsockopt, int,
+                       (int fd, int level, int optname,
+                        void *restrict optval, socklen_t *restrict optlen));
 # endif
 _GL_CXXALIASWARN (getsockopt);
 #elif @HAVE_WINSOCK2_H@
@@ -517,7 +527,10 @@ _GL_FUNCDECL_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
                                  _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
 # else
-_GL_CXXALIAS_SYS (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
+/* Need to cast, because on HP-UX 11.31 the return type may be
+                             int,
+   depending on compiler options.  */
+_GL_CXXALIAS_SYS_CAST (recv, ssize_t, (int fd, void *buf, size_t len, int flags));
 # endif
 _GL_CXXALIASWARN (recv);
 #elif @HAVE_WINSOCK2_H@
@@ -543,8 +556,11 @@ _GL_FUNCDECL_RPL (send, ssize_t,
 _GL_CXXALIAS_RPL (send, ssize_t,
                   (int fd, const void *buf, size_t len, int flags));
 # else
-_GL_CXXALIAS_SYS (send, ssize_t,
-                  (int fd, const void *buf, size_t len, int flags));
+/* Need to cast, because on HP-UX 11.31 the return type may be
+                             int,
+   depending on compiler options.  */
+_GL_CXXALIAS_SYS_CAST (send, ssize_t,
+                       (int fd, const void *buf, size_t len, int flags));
 # endif
 _GL_CXXALIASWARN (send);
 #elif @HAVE_WINSOCK2_H@
@@ -565,18 +581,21 @@ _GL_WARN_ON_USE (send, "send is not always POSIX compliant - "
 #   define recvfrom rpl_recvfrom
 #  endif
 _GL_FUNCDECL_RPL (recvfrom, ssize_t,
-                  (int fd, void *buf, size_t len, int flags,
-                   struct sockaddr *from, socklen_t *fromlen)
+                  (int fd, void *restrict buf, size_t len, int flags,
+                   struct sockaddr *restrict from,
+                   socklen_t *restrict fromlen)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (recvfrom, ssize_t,
-                  (int fd, void *buf, size_t len, int flags,
-                   struct sockaddr *from, socklen_t *fromlen));
+                  (int fd, void *restrict buf, size_t len, int flags,
+                   struct sockaddr *restrict from,
+                   socklen_t *restrict fromlen));
 # else
 /* Need to cast, because on Solaris 10 systems, the sixth parameter is
                                                void *fromlen.  */
 _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t,
-                       (int fd, void *buf, size_t len, int flags,
-                        struct sockaddr *from, socklen_t *fromlen));
+                       (int fd, void *restrict buf, size_t len, int flags,
+                        struct sockaddr *restrict from,
+                        socklen_t *restrict fromlen));
 # endif
 _GL_CXXALIASWARN (recvfrom);
 #elif @HAVE_WINSOCK2_H@
index 0b5790b..507ab01 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for <sys/uio.h>.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 # if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
index 10228dc..49b87b1 100644 (file)
@@ -1,5 +1,5 @@
 /* Test accepting a connection to a server socket.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c8c82db..fdbf6f5 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of optional automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 static void
 do_allocation (int n)
 {
-  void *ptr = alloca (n);
+  void *volatile ptr = alloca (n);
   (void) ptr;
 }
 
index 008ace2..d1313db 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of areadlink.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b19b430..65aeb59 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of areadlink and friends.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 243bfb3..a7ea67c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of exact or abbreviated match search.
-   Copyright (C) 1990, 1998-1999, 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998-1999, 2001-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,6 +25,8 @@
 
 #include "macros.h"
 
+# define N_(Msgid) (Msgid)
+
 /* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
    thus must link with a definition of that function.  Provide it here.  */
 #ifdef ARGMATCH_DIE_DECL
@@ -59,40 +61,97 @@ static const enum backup_type backup_vals[] =
   numbered_backups, numbered_backups, numbered_backups
 };
 
+ARGMATCH_DEFINE_GROUP(backup, enum backup_type)
+
+static const argmatch_backup_doc argmatch_backup_docs[] =
+{
+  { "no",       N_("never make backups (even if --backup is given)") },
+  { "numbered", N_("make numbered backups") },
+  { "existing", N_("numbered if numbered backups exist, simple otherwise") },
+  { "simple",   N_("always make simple backups") },
+  { NULL, NULL }
+};
+
+static const argmatch_backup_arg argmatch_backup_args[] =
+{
+  { "no",                no_backups },
+  { "none",              no_backups },
+  { "off",               no_backups },
+  { "simple",            simple_backups },
+  { "never",             simple_backups },
+  { "single",            simple_backups },
+  { "existing",          numbered_existing_backups },
+  { "nil",               numbered_existing_backups },
+  { "numbered-existing", numbered_existing_backups },
+  { "numbered",          numbered_backups },
+  { "t",                 numbered_backups },
+  { "newstyle",          numbered_backups },
+  { NULL, no_backups }
+};
+
+const argmatch_backup_group_type argmatch_backup_group =
+{
+  argmatch_backup_args,
+  argmatch_backup_docs,
+  N_("\
+The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n\
+The version control method may be selected via the --backup option or through\n\
+the VERSION_CONTROL environment variable.  Here are the values:\n"),
+  NULL
+};
+
 int
 main (int argc, char *argv[])
 {
+#define CHECK(Input, Output)                                            \
+  do {                                                                  \
+    ASSERT (ARGMATCH (Input, backup_args, backup_vals) == Output);      \
+    ASSERT (argmatch_backup_choice (Input) == Output);                  \
+    if (0 <= Output)                                                    \
+      {                                                                 \
+        enum backup_type val                                            \
+          = argmatch_backup_args[Output < 0 ? 0 : Output].val;          \
+        ASSERT (*argmatch_backup_value ("test", Input) == val);         \
+        ASSERT (*argmatch_backup_value ("test",                         \
+                                        argmatch_backup_argument (&val)) \
+                == val);                                                \
+      }                                                                 \
+  } while (0)
+
   /* Not found.  */
-  ASSERT (ARGMATCH ("klingon", backup_args, backup_vals) == -1);
+  CHECK ("klingon", -1);
 
   /* Exact match.  */
-  ASSERT (ARGMATCH ("none", backup_args, backup_vals) == 1);
-  ASSERT (ARGMATCH ("nil", backup_args, backup_vals) == 7);
+  CHECK ("none", 1);
+  CHECK ("nil", 7);
 
   /* Too long.  */
-  ASSERT (ARGMATCH ("nilpotent", backup_args, backup_vals) == -1);
+  CHECK ("nilpotent", -1);
 
   /* Abbreviated.  */
-  ASSERT (ARGMATCH ("simpl", backup_args, backup_vals) == 3);
-  ASSERT (ARGMATCH ("simp", backup_args, backup_vals) == 3);
-  ASSERT (ARGMATCH ("sim", backup_args, backup_vals) == 3);
+  CHECK ("simpl", 3);
+  CHECK ("simp", 3);
+  CHECK ("sim", 3);
 
   /* Exact match and abbreviated.  */
-  ASSERT (ARGMATCH ("numbered", backup_args, backup_vals) == 9);
-  ASSERT (ARGMATCH ("numbere", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("number", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("numbe", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("numb", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("num", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("nu", backup_args, backup_vals) == -2);
-  ASSERT (ARGMATCH ("n", backup_args, backup_vals) == -2);
+  CHECK ("numbered", 9);
+  CHECK ("numbere", -2);
+  CHECK ("number", -2);
+  CHECK ("numbe", -2);
+  CHECK ("numb", -2);
+  CHECK ("num", -2);
+  CHECK ("nu", -2);
+  CHECK ("n", -2);
 
   /* Ambiguous abbreviated.  */
-  ASSERT (ARGMATCH ("ne", backup_args, backup_vals) == -2);
+  CHECK ("ne", -2);
+
+  /* Ambiguous abbreviated, but same value ("single" and "simple").  */
+  CHECK ("si", 3);
+  CHECK ("s", 3);
+#undef CHECK
 
-  /* Ambiguous abbreviated, but same value.  */
-  ASSERT (ARGMATCH ("si", backup_args, backup_vals) == 3);
-  ASSERT (ARGMATCH ("s", backup_args, backup_vals) == 3);
+  argmatch_backup_usage (stdout);
 
   return 0;
 }
index fd93721..10a27e1 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <arpa/inet.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index be7cdf3..7da8f8b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of binary mode I/O.
-   Copyright (C) 2005, 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 38af099..a177d94 100755 (executable)
@@ -4,7 +4,7 @@ tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
 tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp"
-./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
+${CHECKER} ./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
 cmp t-bin-out0.tmp t-bin-out1.tmp > /dev/null || exit 1
 
 rm -fr $tmpfiles
index 5c2c00b..8054e9d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test binding a server socket to a port.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f378c80..98d15e2 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <bitrotate.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a19a61a..040abff 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of unibyte character to wide character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index aaef48d..ab4b287 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR = none; then
 fi
 
 LC_ALL=$LOCALE_FR \
-./test-btowc${EXEEXT} 1
+${CHECKER} ./test-btowc${EXEEXT} 1
index 2e06038..d7d4d9c 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_FR_UTF8 \
-./test-btowc${EXEEXT} 2
+${CHECKER} ./test-btowc${EXEEXT} 2
index 735227a..2077eb4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of character handling in C locale.
-   Copyright (C) 2005, 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1dae74e..2c5a49a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of c-stack module.
-   Copyright (C) 2002, 2004, 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f979065..54009d3 100755 (executable)
@@ -4,7 +4,7 @@ tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
 tmpfiles="t-c-stack.tmp"
-./test-c-stack${EXEEXT} 2> t-c-stack.tmp
+${CHECKER} ./test-c-stack${EXEEXT} 2> t-c-stack.tmp
 case $? in
   77) cat t-c-stack.tmp >&2; (exit 77); exit 77 ;;
   1) ;;
index 0cd49c9..7f03593 100755 (executable)
@@ -7,7 +7,7 @@ tmpfiles="t-c-stack2.tmp"
 
 # Sanitize exit status within a subshell, since some shells fail to
 # redirect stderr on their message about death due to signal.
-(./test-c-stack${EXEEXT} 1; exit $?) 2> t-c-stack2.tmp
+(${CHECKER} ./test-c-stack${EXEEXT} 1; exit $?) 2> t-c-stack2.tmp
 
 case $? in
   77) if grep 'stack overflow' t-c-stack2.tmp >/dev/null ; then
@@ -23,6 +23,13 @@ case $? in
         exit 77
       fi
       ;;
+  1)
+      # Dereferencing NULL exits the program with status 1,
+      # so this test doesn't check the c-stack testing harness like it should.
+      # https://lists.gnu.org/r/grep-devel/2020-09/msg00034.html
+      cat t-c-stack2.tmp >&2
+      echo 'skipping test (perhaps gcc -fsanitize=undefined is in use?)'
+      exit 77;;
   0) (exit 1); exit 1 ;;
 esac
 if grep 'program error' t-c-stack2.tmp >/dev/null ; then
index 5fcf906..14bdfb2 100755 (executable)
@@ -1,21 +1,21 @@
 #!/bin/sh
 
 # Test in the C locale.
-./test-c-strcasecmp${EXEEXT} || exit 1
-./test-c-strncasecmp${EXEEXT} || exit 1
+${CHECKER} ./test-c-strcasecmp${EXEEXT} || exit 1
+${CHECKER} ./test-c-strncasecmp${EXEEXT} || exit 1
 
 # Test in an ISO-8859-1 or ISO-8859-15 locale.
 : ${LOCALE_FR=fr_FR}
 if test $LOCALE_FR != none; then
-  LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1
-  LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_FR ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || exit 1
 fi
 
 # Test in a Turkish UTF-8 locale.
 : ${LOCALE_TR_UTF8=tr_TR.UTF-8}
 if test $LOCALE_TR_UTF8 != none; then
-  LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1
-  LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strcasecmp${EXEEXT} locale || exit 1
+  LC_ALL=$LOCALE_TR_UTF8 ${CHECKER} ./test-c-strncasecmp${EXEEXT} locale || exit 1
 fi
 
 exit 0
index bc5494e..cc2efb0 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4677bd4..6cbdce0 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-calloc-gnu.c b/gnulib-tests/test-calloc-gnu.c
new file mode 100644 (file)
index 0000000..a98a75f
--- /dev/null
@@ -0,0 +1,73 @@
+/* Test of calloc function.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#include <stdint.h>
+
+#include "macros.h"
+
+/* Return N.
+   Usual compilers are not able to infer something about the return value.  */
+static size_t
+identity (size_t n)
+{
+  unsigned int x = rand ();
+  unsigned int y = x * x * x * x;
+  x++; y |= x * x * x * x;
+  x++; y |= x * x * x * x;
+  x++; y |= x * x * x * x;
+  y = y >> 1;
+  y &= -y;
+  y -= 8;
+  /* At this point Y is zero but GCC doesn't infer this.  */
+  return n + y;
+}
+
+int
+main ()
+{
+  /* Check that calloc (0, 0) is not a NULL pointer.  */
+  {
+    void * volatile p = calloc (0, 0);
+    ASSERT (p != NULL);
+    free (p);
+  }
+
+  /* Check that calloc fails when requested to allocate a block of memory
+     larger than PTRDIFF_MAX or SIZE_MAX bytes.
+     Use 'identity' to avoid a compiler warning from GCC 7.
+     'volatile' is needed to defeat an incorrect optimization by clang 10,
+     see <https://bugs.llvm.org/show_bug.cgi?id=46055>.  */
+  {
+    for (size_t n = 2; n != 0; n <<= 1)
+      {
+        void *volatile p = calloc (PTRDIFF_MAX / n + 1, identity (n));
+        ASSERT (p == NULL);
+        ASSERT (errno == ENOMEM);
+
+       p = calloc (SIZE_MAX / n + 1, identity (n));
+        ASSERT (p == NULL);
+        ASSERT (errno == ENOMEM);
+      }
+  }
+
+  return 0;
+}
index 8f8fcf6..660e455 100644 (file)
@@ -1,5 +1,5 @@
 /* Test duplicating non-inheritable file descriptors.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ is_inheritable (int fd)
 }
 
 #if !O_BINARY
-# define setmode(f,m) zero ()
+# define set_binary_mode(f,m) zero ()
 static int zero (void) { return 0; }
 #endif
 
@@ -71,8 +71,8 @@ static int zero (void) { return 0; }
 static int
 is_mode (int fd, int mode)
 {
-  int value = setmode (fd, O_BINARY);
-  setmode (fd, value);
+  int value = set_binary_mode (fd, O_BINARY);
+  set_binary_mode (fd, value);
   return mode == value;
 }
 
@@ -107,13 +107,13 @@ main (void)
 
   /* On systems that distinguish between text and binary mode,
      dup_cloexec reuses the mode of the source.  */
-  setmode (fd, O_BINARY);
+  set_binary_mode (fd, O_BINARY);
   ASSERT (is_mode (fd, O_BINARY));
   fd2 = dup_cloexec (fd);
   ASSERT (fd < fd2);
   ASSERT (is_mode (fd2, O_BINARY));
   ASSERT (close (fd2) == 0);
-  setmode (fd, O_TEXT);
+  set_binary_mode (fd, O_TEXT);
   ASSERT (is_mode (fd, O_TEXT));
   fd2 = dup_cloexec (fd);
   ASSERT (fd < fd2);
index 36b0ef5..992475f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test closing a file or socket.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 644361c..5e2905b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test connecting a client socket.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 897e988..43256a4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <ctype.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e24d63b..3f90e17 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the gnulib dirname module.
-   Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6654254..6c2e65e 100644 (file)
@@ -1,5 +1,5 @@
 /* Test duplicating file descriptors.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -92,7 +92,7 @@ is_inheritable (int fd)
 #endif /* GNULIB_TEST_CLOEXEC */
 
 #if !O_BINARY
-# define setmode(f,m) zero ()
+# define set_binary_mode(f,m) zero ()
 static int zero (void) { return 0; }
 #endif
 
@@ -101,8 +101,8 @@ static int zero (void) { return 0; }
 static int
 is_mode (int fd, int mode)
 {
-  int value = setmode (fd, O_BINARY);
-  setmode (fd, value);
+  int value = set_binary_mode (fd, O_BINARY);
+  set_binary_mode (fd, value);
   return mode == value;
 }
 
@@ -203,11 +203,11 @@ main (void)
 
   /* On systems that distinguish between text and binary mode, dup2
      reuses the mode of the source.  */
-  setmode (fd, O_BINARY);
+  set_binary_mode (fd, O_BINARY);
   ASSERT (is_mode (fd, O_BINARY));
   ASSERT (dup2 (fd, fd + 1) == fd + 1);
   ASSERT (is_mode (fd + 1, O_BINARY));
-  setmode (fd, O_TEXT);
+  set_binary_mode (fd, O_TEXT);
   ASSERT (is_mode (fd, O_TEXT));
   ASSERT (dup2 (fd, fd + 1) == fd + 1);
   ASSERT (is_mode (fd + 1, O_TEXT));
diff --git a/gnulib-tests/test-dynarray.c b/gnulib-tests/test-dynarray.c
new file mode 100644 (file)
index 0000000..c3f9a29
--- /dev/null
@@ -0,0 +1,53 @@
+/* Test of type-safe arrays that grow dynamically.
+   Copyright (C) 2021 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2021.  */
+
+#include <config.h>
+
+#define DYNARRAY_STRUCT int_sequence
+#define DYNARRAY_ELEMENT int
+#define DYNARRAY_PREFIX intseq_
+#include "dynarray.h"
+
+#include "macros.h"
+
+#define N 100000
+
+static int
+value_at (long long int i)
+{
+  return (i % 13) + ((i * i) % 251);
+}
+
+int
+main ()
+{
+  struct int_sequence s;
+  int i;
+
+  intseq_init (&s);
+  for (i = 0; i < N; i++)
+    intseq_add (&s, value_at (i));
+  for (i = N - 1; i >= N / 2; i--)
+    {
+      ASSERT (* intseq_at (&s, i) == value_at (i));
+      intseq_remove_last (&s);
+    }
+  intseq_free (&s);
+
+  return 0;
+}
index 9fab110..2935e43 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of environ variable.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 581c93c..59c5344 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <errno.h> substitute.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a257c39..1f4baf3 100644 (file)
@@ -1,5 +1,5 @@
 /* Test suite for exclude.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
index 6ebe688..613994c 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ baz: 0
 bar/qux: 0
 EOT
 
-test-exclude in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
+${CHECKER} test-exclude in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index 7ada355..a0d078d 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ baz: 1
 bar/qux: 0
 EOT
 
-test-exclude -casefold in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
+${CHECKER} test-exclude -casefold in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index fcf0098..3c6c9a9 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ baz: 1
 bar/qux: 1
 EOT
 
-test-exclude -include in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
+${CHECKER} test-exclude -include in -- foo 'foo*' bar foobar baz bar/qux > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index 421c9a3..8fa1405 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -31,7 +31,7 @@ cat > expected <<EOT
 foobar: 1
 EOT
 
-test-exclude -wildcards in -- foobar > out || exit $?
+${CHECKER} test-exclude -wildcards in -- foobar > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index 482c89b..86dfc49 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -34,7 +34,7 @@ barz: 0
 foo/bar: 1
 EOT
 
-test-exclude -leading_dir in -- bar bar/qux barz foo/bar > out || exit $?
+${CHECKER} test-exclude -leading_dir in -- bar bar/qux barz foo/bar > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index 5e9a7c8..87dfe3a 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@ bar: 1
 foo/bar: 0
 EOT
 
-test-exclude -anchored in -- bar foo/bar > out || exit $?
+${CHECKER} test-exclude -anchored in -- bar foo/bar > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index 3b6c41e..ed09185 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -32,8 +32,8 @@ bar: 0
 bar: 1
 EOT
 
-test-exclude in -include in -- bar > out || exit $?
-test-exclude -include in -no-include in -- bar >> out || exit $?
+${CHECKER} test-exclude in -include in -- bar > out || exit $?
+${CHECKER} test-exclude -include in -no-include in -- bar >> out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index b40f4c4..e4f6791 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for exclude.
-# Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# Copyright (C) 2010-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@ file: 0
 bar: 1
 EOT
 
-test-exclude -wildcards in -- 'f*e' 'file' 'bar' > out || exit $?
+${CHECKER} test-exclude -wildcards in -- 'f*e' 'file' 'bar' > out || exit $?
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
index d861f51..ab25cf7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <fcntl.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5d64674..cb834b4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fcntl(2).
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -46,7 +46,7 @@ SIGNATURE_CHECK (fcntl, int, (int, int, ...));
 #include "macros.h"
 
 #if !O_BINARY
-# define setmode(f,m) zero ()
+# define set_binary_mode(f,m) zero ()
 static int zero (void) { return 0; }
 #endif
 
@@ -94,8 +94,8 @@ is_inheritable (int fd)
 static bool
 is_mode (int fd, int mode)
 {
-  int value = setmode (fd, O_BINARY);
-  setmode (fd, value);
+  int value = set_binary_mode (fd, O_BINARY);
+  set_binary_mode (fd, value);
   return mode == value;
 }
 
@@ -206,13 +206,18 @@ check_flags (void)
 # endif
 #endif
 
+    default:
       ;
     }
 }
 
 int
-main (void)
+main (int argc, char *argv[])
 {
+  if (argc > 1)
+    /* child process */
+    return (is_open (10) ? 42 : 0);
+
   const char *file = "test-fcntl.tmp";
   int fd;
   int bad_fd = getdtablesize ();
@@ -271,7 +276,7 @@ main (void)
 
   /* For F_DUPFD*, check for correct inheritance, as well as
      preservation of text vs. binary.  */
-  setmode (fd, O_BINARY);
+  set_binary_mode (fd, O_BINARY);
   ASSERT (is_open (fd));
   ASSERT (!is_open (fd + 1));
   ASSERT (!is_open (fd + 2));
@@ -297,7 +302,7 @@ main (void)
   ASSERT (is_mode (fd + 2, O_BINARY));
   ASSERT (close (fd) == 0);
 
-  setmode (fd + 2, O_TEXT);
+  set_binary_mode (fd + 2, O_TEXT);
   ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
   ASSERT (!is_open (fd));
   ASSERT (is_open (fd + 1));
@@ -410,5 +415,21 @@ main (void)
   ASSERT (close (fd) == 0);
   ASSERT (unlink (file) == 0);
 
-  return 0;
+  /* Close file descriptors that may have been inherited from the parent
+     process and that would cause failures below.
+     Such file descriptors have been seen:
+       - with GNU make, when invoked as 'make -j N' with j > 1,
+       - in some versions of the KDE desktop environment,
+       - on NetBSD,
+       - in MacPorts with the "trace mode" enabled.
+   */
+  (void) close (10);
+
+  /* Test whether F_DUPFD_CLOEXEC is effective.  */
+  ASSERT (fcntl (1, F_DUPFD_CLOEXEC, 10) >= 0);
+#if defined _WIN32 && !defined __CYGWIN__
+  return _execl ("./test-fcntl", "./test-fcntl", "child", NULL);
+#else
+  return execl ("./test-fcntl", "./test-fcntl", "child", NULL);
+#endif
 }
index a1229f1..86793bc 100644 (file)
@@ -1,5 +1,5 @@
 /* Test opening a stream with a file descriptor.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index f54599c..6faae5c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fgetc() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 17ac670..384342d 100644 (file)
@@ -1,6 +1,6 @@
 /* Test of concatenation of two arbitrary file names.
 
-   Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,8 @@
 
 #include "filenamecat.h"
 
+#include "idx.h"
+
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdio.h>
@@ -54,7 +56,7 @@ main (int argc _GL_UNUSED, char *argv[])
       char *base_in_result;
       char const *const *t = tests[i];
       char *res = file_name_concat (t[0], t[1], &base_in_result);
-      ptrdiff_t prefixlen = base_in_result - res;
+      idx_t prefixlen = base_in_result - res;
       size_t t0len = strlen (t[0]);
       size_t reslen = strlen (res);
       if (strcmp (res, t[2]) != 0)
@@ -79,6 +81,7 @@ main (int argc _GL_UNUSED, char *argv[])
                    i, t[0], res);
           fail = true;
         }
+      free (res);
     }
   exit (fail ? EXIT_FAILURE : EXIT_SUCCESS);
 }
index b534524..f79e819 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <float.h> substitute.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ed4a74d..86246fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <fnmatch.h> substitute.
-   Copyright (C) 2018 Free Software Foundation, Inc.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b76ffb7..ae7fc8a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fnmatch string matching function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -52,5 +52,15 @@ main ()
    */
   ASSERT (res = fnmatch ("[/b", "[/b", 0) == 0);
 
+  ASSERT (fnmatch ("[[:alpha:]'[:alpha:]\0]", "a", 0) == FNM_NOMATCH);
+  ASSERT (fnmatch ("[a[.\0.]]", "a", 0) == FNM_NOMATCH);
+#ifdef FNM_EXTMATCH
+  ASSERT (fnmatch ("**(!()", "**(!()", FNM_EXTMATCH) == 0);
+#endif
+#ifdef FNM_LEADING_DIR
+  ASSERT (fnmatch ("x?y", "x/y/z", FNM_PATHNAME | FNM_LEADING_DIR)
+          == FNM_NOMATCH);
+#endif
+
   return 0;
 }
diff --git a/gnulib-tests/test-fopen-gnu.c b/gnulib-tests/test-fopen-gnu.c
new file mode 100644 (file)
index 0000000..26c5762
--- /dev/null
@@ -0,0 +1,88 @@
+/* Test of opening a file stream.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2020.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdio.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-fopen-gnu.t"
+
+/* 0x1a is an EOF on Windows.  */
+#define DATA "abc\x1axyz"
+
+int
+main (void)
+{
+  FILE *f;
+  int fd;
+  int flags;
+  char buf[16];
+
+  /* Remove anything from prior partial run.  */
+  unlink (BASE "file");
+  unlink (BASE "binary");
+
+  /* Create the file.  */
+  f = fopen (BASE "file", "w");
+  ASSERT (f);
+  fd = fileno (f);
+  ASSERT (fd >= 0);
+  flags = fcntl (fd, F_GETFD);
+  ASSERT (flags >= 0);
+  ASSERT ((flags & FD_CLOEXEC) == 0);
+  ASSERT (fclose (f) == 0);
+
+  /* Create the file and check the 'e' mode.  */
+  f = fopen (BASE "file", "we");
+  ASSERT (f);
+  fd = fileno (f);
+  ASSERT (fd >= 0);
+  flags = fcntl (fd, F_GETFD);
+  ASSERT (flags >= 0);
+  ASSERT ((flags & FD_CLOEXEC) != 0);
+  ASSERT (fclose (f) == 0);
+
+  /* Open the file and check the 'x' mode.  */
+  f = fopen (BASE "file", "ax");
+  ASSERT (f == NULL);
+  ASSERT (errno == EEXIST);
+
+  /* Open a binary file and check that the 'e' mode doesn't interfere.  */
+  f = fopen (BASE "binary", "wbe");
+  ASSERT (f);
+  ASSERT (fwrite (DATA, 1, sizeof (DATA)-1, f) == sizeof (DATA)-1);
+  ASSERT (fclose (f) == 0);
+
+  f = fopen (BASE "binary", "rbe");
+  ASSERT (f);
+  ASSERT (fread (buf, 1, sizeof (buf), f) == sizeof (DATA)-1);
+  ASSERT (fclose (f) == 0);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "binary") == 0);
+
+  return 0;
+}
similarity index 62%
rename from lib/xstrndup.h
rename to gnulib-tests/test-fopen.c
index 54b0967..f69a13a 100644 (file)
@@ -1,6 +1,5 @@
-/* Duplicate a bounded initial segment of a string, with out-of-memory
-   checking.
-   Copyright (C) 2003, 2009-2018 Free Software Foundation, Inc.
+/* Test of opening a file stream.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#include <stddef.h>
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
 
-/* Return a newly allocated copy of at most N bytes of STRING.
-   In other words, return a copy of the initial segment of length N of
-   STRING.  */
-extern char *xstrndup (const char *string, size_t n) _GL_ATTRIBUTE_MALLOC;
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
+#define BASE "test-fopen.t"
+
+#include "test-fopen.h"
+
+int
+main (void)
+{
+  return test_fopen ();
+}
diff --git a/gnulib-tests/test-fopen.h b/gnulib-tests/test-fopen.h
new file mode 100644 (file)
index 0000000..b6a3dcb
--- /dev/null
@@ -0,0 +1,89 @@
+/* Test of opening a file stream.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+
+/* Include <config.h> and a form of <stdio.h> first.  */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Test fopen.  Assumes BASE is defined.  */
+
+static int
+test_fopen (void)
+{
+  FILE *f;
+  /* Remove anything from prior partial run.  */
+  unlink (BASE "file");
+
+  /* Read requires existing file.  */
+  errno = 0;
+  ASSERT (fopen (BASE "file", "r") == NULL);
+  ASSERT (errno == ENOENT);
+
+  /* Write can create a file.  */
+  f = fopen (BASE "file", "w");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+
+  /* Trailing slash is invalid on non-directory.  */
+  errno = 0;
+  ASSERT (fopen (BASE "file/", "r") == NULL);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+  errno = 0;
+  ASSERT (fopen (BASE "file/", "r+") == NULL);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+  /* Cannot create a directory.  */
+  errno = 0;
+  ASSERT (fopen ("nonexist.ent/", "w") == NULL);
+  ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+          || errno == EINVAL);
+
+  /* Directories cannot be opened for writing.  */
+  errno = 0;
+  ASSERT (fopen (".", "w") == NULL);
+  ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+  errno = 0;
+  ASSERT (fopen ("./", "w") == NULL);
+  ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+  errno = 0;
+  ASSERT (fopen (".", "r+") == NULL);
+  ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+  errno = 0;
+  ASSERT (fopen ("./", "r+") == NULL);
+  ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+  /* /dev/null must exist, and be writable.  */
+  f = fopen ("/dev/null", "r");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+  f = fopen ("/dev/null", "w");
+  ASSERT (f);
+  ASSERT (fclose (f) == 0);
+
+  /* Cleanup.  */
+  ASSERT (unlink (BASE "file") == 0);
+
+  return 0;
+}
index 788877b..47bb844 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fputc() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4fe20f8..f8214ca 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fread() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-free.c b/gnulib-tests/test-free.c
new file mode 100644 (file)
index 0000000..53f1085
--- /dev/null
@@ -0,0 +1,175 @@
+/* Test of free() function.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2020.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#if defined __linux__
+# include <fcntl.h>
+# include <stdint.h>
+# include <string.h>
+# include <sys/mman.h>
+#endif
+
+#include "macros.h"
+
+/* The indirection through a volatile function pointer is necessary to prevent
+   a GCC optimization.  Without it, when optimizing, GCC would "know" that errno
+   is unchanged by calling free(ptr), when ptr was the result of a malloc(...)
+   call in the same function.  */
+static int
+get_errno (void)
+{
+  volatile int err = errno;
+  return err;
+}
+
+static int (* volatile get_errno_func) (void) = get_errno;
+
+int
+main ()
+{
+  /* Check that free() preserves errno.  */
+  {
+    errno = 1789; /* Liberté, égalité, fraternité.  */
+    free (NULL);
+    ASSERT_NO_STDIO (get_errno_func () == 1789);
+  }
+  { /* Small memory allocations.  */
+    #define N 10000
+    void * volatile ptrs[N];
+    size_t i;
+    for (i = 0; i < N; i++)
+      ptrs[i] = malloc (15);
+    for (i = 0; i < N; i++)
+      {
+        errno = 1789;
+        free (ptrs[i]);
+        ASSERT_NO_STDIO (get_errno_func () == 1789);
+      }
+    #undef N
+  }
+  { /* Medium memory allocations.  */
+    #define N 1000
+    void * volatile ptrs[N];
+    size_t i;
+    for (i = 0; i < N; i++)
+      ptrs[i] = malloc (729);
+    for (i = 0; i < N; i++)
+      {
+        errno = 1789;
+        free (ptrs[i]);
+        ASSERT_NO_STDIO (get_errno_func () == 1789);
+      }
+    #undef N
+  }
+  { /* Large memory allocations.  */
+    #define N 10
+    void * volatile ptrs[N];
+    size_t i;
+    for (i = 0; i < N; i++)
+      ptrs[i] = malloc (5318153);
+    for (i = 0; i < N; i++)
+      {
+        errno = 1789;
+        free (ptrs[i]);
+        ASSERT_NO_STDIO (get_errno_func () == 1789);
+      }
+    #undef N
+  }
+
+  /* Test a less common code path.
+     When malloc() is based on mmap(), free() can sometimes call munmap().
+     munmap() usually succeeds, but fails in a particular situation: when
+       - it has to unmap the middle part of a VMA, and
+       - the number of VMAs of a process is limited and the limit is
+         already reached.
+     The latter condition is fulfilled on Linux, when the file
+     /proc/sys/vm/max_map_count exists.  This file contains the limit
+       - for Linux >= 2.4.19: 65536 (DEFAULT_MAX_MAP_COUNT in linux/include/linux/sched.h)
+       - for Linux >= 2.6.31: 65530 (DEFAULT_MAX_MAP_COUNT in linux/include/linux/mm.h).
+     But do not test it with glibc < 2.15, since that triggers a glibc internal
+     abort: "malloc.c:3551: munmap_chunk: Assertion `ret == 0' failed."
+   */
+  #if defined __linux__ && !(__GLIBC__ == 2 && __GLIBC_MINOR__ < 15)
+  if (open ("/proc/sys/vm/max_map_count", O_RDONLY) >= 0)
+    {
+      /* Preparations.  */
+      size_t pagesize = getpagesize ();
+      void *firstpage_backup = malloc (pagesize);
+      void *lastpage_backup = malloc (pagesize);
+      /* Allocate a large memory area, as a bumper, so that the MAP_FIXED
+         allocation later will not overwrite parts of the memory areas
+         allocated to ld.so or libc.so.  */
+      void *bumper_region =
+        mmap (NULL, 0x1000000, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+      /* A file descriptor pointing to a regular file.  */
+      int fd = open ("test-free", O_RDONLY);
+
+      if (firstpage_backup != NULL && lastpage_backup != NULL
+          && bumper_region != (void *)(-1)
+          && fd >= 0)
+        {
+          /* Do a large memory allocation.  */
+          size_t big_size = 0x1000000;
+          void * volatile ptr = malloc (big_size - 0x100);
+          char *ptr_aligned = (char *) ((uintptr_t) ptr & ~(pagesize - 1));
+          /* This large memory allocation allocated a memory area
+             from ptr_aligned to ptr_aligned + big_size.
+             Enlarge this memory area by adding a page before and a page
+             after it.  */
+          memcpy (firstpage_backup, ptr_aligned, pagesize);
+          memcpy (lastpage_backup, ptr_aligned + big_size - pagesize, pagesize);
+          if (mmap (ptr_aligned - pagesize, pagesize + big_size + pagesize,
+                    PROT_READ | PROT_WRITE,
+                    MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, -1, 0)
+              != (void *)(-1))
+            {
+              memcpy (ptr_aligned, firstpage_backup, pagesize);
+              memcpy (ptr_aligned + big_size - pagesize, lastpage_backup, pagesize);
+
+              /* Now add as many mappings as we can.
+                 Stop at 65536, in order not to crash the machine (in case the
+                 limit has been increased by the system administrator).  */
+              size_t i;
+              for (i = 0; i < 65536; i++)
+                if (mmap (NULL, pagesize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)
+                    == (void *)(-1))
+                  break;
+              /* Now the number of VMAs of this process has hopefully attained
+                 its limit.  */
+
+              errno = 1789;
+              /* This call to free() is supposed to call
+                   munmap (ptr_aligned, big_size);
+                 which increases the number of VMAs by 1, which is supposed
+                 to fail.  */
+              free (ptr);
+              ASSERT_NO_STDIO (get_errno_func () == 1789);
+            }
+        }
+    }
+  #endif
+
+  return 0;
+}
diff --git a/gnulib-tests/test-freopen-safer.c b/gnulib-tests/test-freopen-safer.c
deleted file mode 100644 (file)
index 43cf2d0..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Test of reopening a stream.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Eric Blake <ebb9@byu.net>, 2009.  */
-
-#include <config.h>
-
-/* Specification.  */
-#include "stdio--.h"
-
-/* Helpers.  */
-#include <unistd.h>
-
-/* This test intentionally closes stderr.  So, we arrange to have fd 10
-   (outside the range of interesting fd's during the test) set up to
-   duplicate the original stderr.  */
-
-#define BACKUP_STDERR_FILENO 10
-#define ASSERT_STREAM myerr
-#include "macros.h"
-
-static FILE *myerr;
-
-int
-main (void)
-{
-  FILE *fp;
-
-  /* We close fd 2 later, so save it in fd 10.  */
-  if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
-      || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
-    return 2;
-
-  {
-    FILE *tmp;
-    ASSERT (tmp = fopen ("/dev/null", "r"));
-    ASSERT (STDERR_FILENO < fileno (tmp));
-    ASSERT (fp = fopen ("/dev/null", "w"));
-    ASSERT (fileno (tmp) < fileno (fp));
-    ASSERT (fclose (tmp) == 0);
-  }
-
-  /* Gap in fds.  */
-  ASSERT (freopen ("/dev/null", "r+", fp) == fp);
-  ASSERT (STDERR_FILENO < fileno (fp));
-
-  ASSERT (freopen ("/dev/null", "r", stdin) == stdin);
-  ASSERT (STDIN_FILENO == fileno (stdin));
-
-  ASSERT (freopen ("/dev/null", "w", stdout) == stdout);
-  ASSERT (STDOUT_FILENO == fileno (stdout));
-
-  ASSERT (freopen ("/dev/null", "w", stderr) == stderr);
-  ASSERT (STDERR_FILENO == fileno (stderr));
-
-  /* fd 0 closed.  */
-  ASSERT (close (STDIN_FILENO) == 0);
-
-  ASSERT (freopen ("/dev/null", "w", stdout) == stdout);
-  ASSERT (STDOUT_FILENO == fileno (stdout));
-
-  ASSERT (freopen ("/dev/null", "w", stderr) == stderr);
-  ASSERT (STDERR_FILENO == fileno (stderr));
-
-  ASSERT (freopen ("/dev/null", "a", fp) == fp);
-  ASSERT (STDERR_FILENO < fileno (fp));
-
-  /* fd 1 closed.  */
-  ASSERT (close (STDOUT_FILENO) == 0);
-
-  ASSERT (freopen ("/dev/null", "w", stderr) == stderr);
-  ASSERT (STDERR_FILENO == fileno (stderr));
-
-  ASSERT (freopen ("/dev/null", "a+", fp) == fp);
-  ASSERT (STDERR_FILENO < fileno (fp));
-
-  /* fd 2 closed.  */
-  ASSERT (close (STDERR_FILENO) == 0);
-
-  ASSERT (freopen ("/dev/null", "w+", fp) == fp);
-  ASSERT (STDERR_FILENO < fileno (fp));
-
-  return 0;
-}
index e474ca8..bbe551e 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of opening a file stream.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 16d8406..0d78e17 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of fstat() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6f597fb..d11b8eb 100644 (file)
@@ -1,5 +1,5 @@
 /* Test truncating a file.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d7394d2..203e07b 100755 (executable)
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec ./test-ftruncate${EXEEXT} "$srcdir/test-ftruncate.sh"
+exec ${CHECKER} ./test-ftruncate${EXEEXT} "$srcdir/test-ftruncate.sh"
index 12012db..17e80bd 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fwrite() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3912c19..17080d9 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of getcwd() function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2bfcaeb..d56c682 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of getdtablesize() function.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1176d7b..fe1ab3c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 #define _GL_NO_LARGE_FILES
 
 /* POSIX and glibc provide the getopt() function in <unistd.h>, see
-   http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+   https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
    https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
    But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
    This is what we are testing here.  */
index c9c97bd..c86dc8d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b13f987..26d5764 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@
 #define _GL_NO_LARGE_FILES
 
 /* POSIX and glibc provide the getopt() function in <unistd.h>, see
-   http://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
+   https://pubs.opengroup.org/onlinepubs/9699919799/functions/getopt.html
    https://www.gnu.org/software/libc/manual/html_node/Using-Getopt.html
    But gnulib provides the getopt() function in <getopt.h>, not in <unistd.h>.
    Nevertheless the getopt() function should also be found in <unistd.h>.  */
index 98ea389..5cc9d8c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4c22d8d..5e3c50a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of command line argument processing.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7e219f4..21eb338 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the gnulib getprogname module.
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-getrandom.c b/gnulib-tests/test-getrandom.c
new file mode 100644 (file)
index 0000000..73abe6b
--- /dev/null
@@ -0,0 +1,92 @@
+/* Test of getting random bytes.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#include <config.h>
+
+#include <sys/random.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getrandom, ssize_t, (void *, size_t, unsigned int));
+
+#include <errno.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  char buf1[8];
+  char buf2[8];
+  char large_buf[100000];
+  ssize_t ret;
+
+  /* Check that different calls produce different results (with a high
+     probability).  */
+  ret = getrandom (buf1, sizeof (buf1), 0);
+  if (ret < 0)
+    ASSERT (errno == ENOSYS);
+  else
+    {
+      ret = getrandom (buf2, sizeof (buf2), 0);
+      if (ret < 0)
+        ASSERT (errno == ENOSYS);
+      else
+        {
+          /* It is very unlikely that two calls to getrandom produce the
+             same results.  */
+          ASSERT (memcmp (buf1, buf2, sizeof (buf1)) != 0);
+        }
+    }
+
+  /* Likewise with the "truly random" number generator.  */
+  ret = getrandom (buf1, sizeof (buf1), GRND_RANDOM);
+  if (ret < 0)
+    ASSERT (errno == ENOSYS);
+  else
+    {
+      ret = getrandom (buf2, sizeof (buf2), GRND_RANDOM);
+      if (ret < 0)
+        ASSERT (errno == ENOSYS);
+      else
+        {
+          /* It is very unlikely that two calls to getrandom produce the
+             same results.  */
+          ASSERT (memcmp (buf1, buf2, sizeof (buf1)) != 0);
+        }
+    }
+
+  /* Check that GRND_NONBLOCK works.  */
+  ret = getrandom (large_buf, sizeof (large_buf), GRND_RANDOM | GRND_NONBLOCK);
+  ASSERT (ret <= (ssize_t) sizeof (large_buf));
+  /* It is very unlikely that so many truly random bytes were ready.  */
+  if (ret < 0)
+    ASSERT (errno == ENOSYS || errno == EAGAIN
+            || errno == EINVAL /* Solaris */);
+  else
+    ASSERT (ret > 0);
+
+  if (getrandom (buf1, 1, 0) < 1)
+    if (getrandom (buf1, 1, GRND_RANDOM) < 1)
+      {
+        fputs ("Skipping test: getrandom is ineffective\n", stderr);
+        return 77;
+      }
+
+  return 0;
+}
index 322e7bd..f9139d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
  * Written by Jim Meyering.
  *
  * This program is free software: you can redistribute it and/or modify
diff --git a/gnulib-tests/test-hard-locale.c b/gnulib-tests/test-hard-locale.c
new file mode 100644 (file)
index 0000000..ff29b36
--- /dev/null
@@ -0,0 +1,109 @@
+/* Test of determination whether a locale is different from the "C" locale.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+#include "hard-locale.h"
+
+#include <locale.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+
+/* True if all locale names are accepted and all locales are trivial.
+   This is the case e.g. on OpenBSD 3.8.  */
+static bool all_trivial;
+
+static int
+test_one (const char *name, int failure_bitmask)
+{
+  if (setlocale (LC_ALL, name) != NULL)
+    {
+      bool expected;
+
+      /* musl libc has special code for the C.UTF-8 locale; other than that,
+         all locale names are accepted and all locales are trivial.
+         OpenBSD returns the locale name that was set, but we don't know how it
+         behaves under the hood.  Likewise for Haiku.  */
+#if defined MUSL_LIBC || defined __OpenBSD__ || defined __HAIKU__
+      expected = true;
+#else
+      expected = !all_trivial;
+#endif
+      if (hard_locale (LC_CTYPE) != expected)
+        {
+          if (expected)
+            fprintf (stderr, "Unexpected: The category LC_CTYPE of the locale '%s' is not equivalent to C or POSIX.\n",
+                     name);
+          else
+            fprintf (stderr, "Unexpected: The category LC_CTYPE of the locale '%s' is equivalent to C or POSIX.\n",
+                     name);
+          return failure_bitmask;
+        }
+
+      /* On NetBSD 7.0, some locales such as de_DE.ISO8859-1 and de_DE.UTF-8
+         have the LC_COLLATE category set to "C".
+         Similarly, on musl libc, with the C.UTF-8 locale.  */
+#if defined __NetBSD__
+      expected = false;
+#elif defined MUSL_LIBC
+      expected = strcmp (name, "C.UTF-8") != 0;
+#elif (defined __OpenBSD__ && HAVE_DUPLOCALE) || defined __HAIKU__ /* OpenBSD >= 6.2, Haiku */
+      expected = true;
+#else
+      expected = !all_trivial;
+#endif
+      if (hard_locale (LC_COLLATE) != expected)
+        {
+          if (expected)
+            fprintf (stderr, "Unexpected: The category LC_COLLATE of the locale '%s' is not equivalent to C or POSIX.\n",
+                     name);
+          else
+            fprintf (stderr, "Unexpected: The category LC_COLLATE of the locale '%s' is equivalent to C or POSIX.\n",
+                     name);
+          return failure_bitmask;
+        }
+    }
+  return 0;
+}
+
+int
+main ()
+{
+  int fail = 0;
+
+  /* The initial locale is the "C" or "POSIX" locale.  */
+  if (hard_locale (LC_CTYPE) || hard_locale (LC_COLLATE))
+    {
+      fprintf (stderr, "The initial locale should not be hard!\n");
+      fail |= 1;
+    }
+
+  all_trivial = (setlocale (LC_ALL, "foobar") != NULL);
+
+  fail |= test_one ("de", 2);
+  fail |= test_one ("de_DE", 4);
+  fail |= test_one ("de_DE.ISO8859-1", 8);
+  fail |= test_one ("de_DE.iso88591", 8);
+  fail |= test_one ("de_DE.UTF-8", 16);
+  fail |= test_one ("de_DE.utf8", 16);
+  fail |= test_one ("german", 32);
+  fail |= test_one ("C.UTF-8", 64);
+
+  return fail;
+}
index c0c1f34..4e8c59f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2009-2021 Free Software Foundation, Inc.
  * Written by Jim Meyering
  *
  * This program is free software: you can redistribute it and/or modify
@@ -132,10 +132,10 @@ main (int argc, char **argv)
         ASSERT (hash_get_entries (ht, buf, 5) == 3);
         ASSERT (STREQ (buf[0], "a") || STREQ (buf[0], "b") || STREQ (buf[0], "c"));
       }
-      ASSERT (hash_delete (ht, "a"));
-      ASSERT (hash_delete (ht, "a") == NULL);
-      ASSERT (hash_delete (ht, "b"));
-      ASSERT (hash_delete (ht, "c"));
+      ASSERT (hash_remove (ht, "a"));
+      ASSERT (hash_remove (ht, "a") == NULL);
+      ASSERT (hash_remove (ht, "b"));
+      ASSERT (hash_remove (ht, "c"));
 
       ASSERT (hash_rehash (ht, 47));
       ASSERT (hash_rehash (ht, 467));
@@ -246,7 +246,7 @@ main (int argc, char **argv)
                         /* empty */
                       }
                     ASSERT (p);
-                    v = hash_delete (ht, p);
+                    v = hash_remove (ht, p);
                     ASSERT (v);
                     free (v);
                   }
index 886f9f5..bba7fe3 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <iconv.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 88213b8..f35113f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of character set conversion.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -44,8 +44,8 @@ main ()
 #if HAVE_ICONV
   /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
      and UTF-8.  */
-  iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO8859-1");
-  iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+  iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+  iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
 
 #if defined __MVS__ && defined __IBMC__
   /* String literals below are in ASCII, not EBCDIC.  */
index d7b6308..6191d7d 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the "ignore-value" module.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdio.h>
 
-#ifndef _GL_ATTRIBUTE_RETURN_CHECK
-# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
-#  define _GL_ATTRIBUTE_RETURN_CHECK
-# else
-#  define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
-# endif
-#endif
+#include "attribute.h"
 
 struct s { int i; };
-static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK;
-static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK;
-static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK;
-static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK;
-static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK;
+NODISCARD static char doChar (void);
+NODISCARD static int doInt (void);
+NODISCARD static off_t doOff (void);
+NODISCARD static void *doPtr (void);
+NODISCARD static struct s doStruct (void);
 
 static char
 doChar (void)
index 7dc91c1..9d2e50f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of inet_pton function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1cf0cb9..7b8c451 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for init.sh
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
index 286669a..fff4218 100644 (file)
@@ -1,5 +1,5 @@
 /* Test intprops.h.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@
    These tests should be checkable via 'verify' rather than 'ASSERT', but
    using 'verify' would run into a bug with HP-UX 11.23 cc; see
    <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>.  */
-#if __GNUC__ || __SUNPRO_C
+#if __GNUC__ || __clang__ || __SUNPRO_C
 # define VERIFY(x) verify_stmt (x)
 #else
 # define VERIFY(x) ASSERT (x)
@@ -56,6 +56,9 @@
 
 #define DONTCARE __LINE__
 
+int int_minus_2 = -2;
+int int_1 = 1;
+
 int
 main (void)
 {
@@ -215,8 +218,10 @@ main (void)
   CHECK_SBINOP (*, MULTIPLY, INT_MIN, INT_MIN, int, true, 0);
   CHECK_SBINOP (*, MULTIPLY, -1, INT_MIN, int,
                 INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
+#if !defined __HP_cc
   CHECK_SBINOP (*, MULTIPLY, LONG_MIN / INT_MAX, (long int) INT_MAX,
                 long int, false, LONG_MIN - LONG_MIN % INT_MAX);
+#endif
 
   CHECK_BINOP (/, DIVIDE, INT_MIN, -1, int,
                INT_NEGATE_OVERFLOW (INT_MIN), INT_MIN);
@@ -237,33 +242,48 @@ main (void)
 
   /* INT_<op>_OVERFLOW and INT_<op>_WRAPV with mixed types.  */
   #define CHECK_SUM(a, b, t, v, vres)                                     \
-    CHECK_SUM1(a, b, t, v, vres);                                         \
-    CHECK_SUM1(b, a, t, v, vres)
-  #define CHECK_SSUM(a, b, t, v, vres)                                    \
-    CHECK_SSUM1(a, b, t, v, vres);                                        \
-    CHECK_SSUM1(b, a, t, v, vres)
+    CHECK_SUM1 (a, b, t, v, vres);                                        \
+    CHECK_SUM1 (b, a, t, v, vres)
+  #define CHECK_SUM_WRAPV(a, b, t, v, vres, okres)                        \
+    CHECK_SUM_WRAPV1 (a, b, t, v, vres, okres);                           \
+    CHECK_SUM_WRAPV1 (b, a, t, v, vres, okres)
   #define CHECK_SUM1(a, b, t, v, vres)                                    \
-    VERIFY (INT_ADD_OVERFLOW (a, b) == (v))
-  #define CHECK_SSUM1(a, b, t, v, vres)                                   \
-    CHECK_SUM1(a, b, t, v, vres);                                         \
+    VERIFY (INT_ADD_OVERFLOW (a, b) == (v));                              \
+    CHECK_SUM_WRAPV1 (a, b, t, v, vres, (a) + (b))
+  #define CHECK_SUM_WRAPV1(a, b, t, v, vres, okres)                       \
     {                                                                     \
       t result;                                                           \
       ASSERT (INT_ADD_WRAPV (a, b, &result) == (v));                      \
-      ASSERT (result == ((v) ? (vres) : ((a) + (b))));                    \
+      ASSERT (result == ((v) ? (vres) : (okres)));                        \
     }
-  CHECK_SSUM (-1, LONG_MIN, long int, true, LONG_MAX);
+  CHECK_SUM (-1, LONG_MIN, long int, true, LONG_MAX);
   CHECK_SUM (-1, UINT_MAX, unsigned int, false, DONTCARE);
-  CHECK_SSUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
+  CHECK_SUM (-1L, INT_MIN, long int, INT_MIN == LONG_MIN,
               INT_MIN == LONG_MIN ? INT_MAX : DONTCARE);
   CHECK_SUM (0u, -1, unsigned int, true, 0u + -1);
   CHECK_SUM (0u, 0, unsigned int, false, DONTCARE);
   CHECK_SUM (0u, 1, unsigned int, false, DONTCARE);
-  CHECK_SSUM (1, LONG_MAX, long int, true, LONG_MIN);
+  CHECK_SUM (1, LONG_MAX, long int, true, LONG_MIN);
   CHECK_SUM (1, UINT_MAX, unsigned int, true, 0u);
-  CHECK_SSUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
+  CHECK_SUM (1L, INT_MAX, long int, INT_MAX == LONG_MAX,
               INT_MAX == LONG_MAX ? INT_MIN : DONTCARE);
   CHECK_SUM (1u, INT_MAX, unsigned int, INT_MAX == UINT_MAX, 1u + INT_MAX);
   CHECK_SUM (1u, INT_MIN, unsigned int, true, 1u + INT_MIN);
+  CHECK_SUM_WRAPV (-1, 1u, int, false, DONTCARE, 0);
+  CHECK_SUM_WRAPV (-1, 1ul, int, false, DONTCARE, 0);
+  CHECK_SUM_WRAPV (-1l, 1u, int, false, DONTCARE, 0);
+  CHECK_SUM_WRAPV (-100, 1000u, int, false, DONTCARE, 900);
+  CHECK_SUM_WRAPV (INT_MIN, UINT_MAX, int, false, DONTCARE, INT_MAX);
+  CHECK_SUM_WRAPV (1u, INT_MAX, int, true, INT_MIN, DONTCARE);
+  CHECK_SUM_WRAPV (INT_MAX, 1, long int, LONG_MAX <= INT_MAX, INT_MIN,
+                   INT_MAX + 1L);
+  CHECK_SUM_WRAPV (UINT_MAX, 1, long int, LONG_MAX <= UINT_MAX, 0,
+                   UINT_MAX + 1L);
+  CHECK_SUM_WRAPV (INT_MAX, 1, unsigned long int, ULONG_MAX <= INT_MAX, 0,
+                   INT_MAX + 1uL);
+  CHECK_SUM_WRAPV (UINT_MAX, 1, unsigned long int, ULONG_MAX <= UINT_MAX, 0,
+                   UINT_MAX + 1uL);
+
   {
     long int result;
     ASSERT (INT_ADD_WRAPV (1, INT_MAX, &result) == (INT_MAX == LONG_MAX));
@@ -273,7 +293,9 @@ main (void)
   #define CHECK_DIFFERENCE(a, b, t, v, vres)                              \
     VERIFY (INT_SUBTRACT_OVERFLOW (a, b) == (v))
   #define CHECK_SDIFFERENCE(a, b, t, v, vres)                             \
-    CHECK_DIFFERENCE(a, b, t, v, vres);                                   \
+    CHECK_DIFFERENCE (a, b, t, v, vres);                                  \
+    CHECK_SDIFFERENCE_WRAPV (a, b, t, v, vres)
+  #define CHECK_SDIFFERENCE_WRAPV(a, b, t, v, vres)                       \
     {                                                                     \
       t result;                                                           \
       ASSERT (INT_SUBTRACT_WRAPV (a, b, &result) == (v));                 \
@@ -290,6 +312,11 @@ main (void)
   CHECK_SDIFFERENCE (-1, INT_MAX, int, false, -1 - INT_MAX);
   CHECK_SDIFFERENCE (0, INT_MIN, int, INT_MIN < -INT_MAX, INT_MIN);
   CHECK_SDIFFERENCE (0, INT_MAX, int, false, 0 - INT_MAX);
+  CHECK_SDIFFERENCE_WRAPV (-1, 1u, int, false, DONTCARE);
+  CHECK_SDIFFERENCE_WRAPV (-1, 1ul, int, false, DONTCARE);
+  CHECK_SDIFFERENCE_WRAPV (-1l, 1u, int, false, DONTCARE);
+  CHECK_SDIFFERENCE_WRAPV (0u, INT_MAX, int, false, DONTCARE);
+  CHECK_SDIFFERENCE_WRAPV (1u, INT_MIN, int, true, 1u - INT_MIN);
   {
     long int result;
     ASSERT (INT_SUBTRACT_WRAPV (INT_MAX, -1, &result) == (INT_MAX == LONG_MAX));
@@ -297,15 +324,20 @@ main (void)
   }
 
   #define CHECK_PRODUCT(a, b, t, v, vres)                                 \
-    CHECK_PRODUCT1(a, b, t, v, vres);                                     \
-    CHECK_PRODUCT1(b, a, t, v, vres)
+    CHECK_PRODUCT1 (a, b, t, v, vres);                                    \
+    CHECK_PRODUCT1 (b, a, t, v, vres)
   #define CHECK_SPRODUCT(a, b, t, v, vres)                                \
-    CHECK_SPRODUCT1(a, b, t, v, vres);                                    \
-    CHECK_SPRODUCT1(b, a, t, v, vres)
+    CHECK_SPRODUCT1 (a, b, t, v, vres);                                   \
+    CHECK_SPRODUCT1 (b, a, t, v, vres)
+  #define CHECK_SPRODUCT_WRAPV(a, b, t, v, vres)                          \
+    CHECK_SPRODUCT_WRAPV1 (a, b, t, v, vres);                             \
+    CHECK_SPRODUCT_WRAPV1 (b, a, t, v, vres)
   #define CHECK_PRODUCT1(a, b, t, v, vres)                                \
     VERIFY (INT_MULTIPLY_OVERFLOW (a, b) == (v))
   #define CHECK_SPRODUCT1(a, b, t, v, vres)                               \
-    CHECK_PRODUCT1(a, b, t, v, vres);                                     \
+    CHECK_PRODUCT1 (a, b, t, v, vres);                                    \
+    CHECK_SPRODUCT_WRAPV1 (a, b, t, v, vres)
+  #define CHECK_SPRODUCT_WRAPV1(a, b, t, v, vres)                         \
     {                                                                     \
       t result;                                                           \
       ASSERT (INT_MULTIPLY_WRAPV (a, b, &result) == (v));                 \
@@ -338,11 +370,17 @@ main (void)
   CHECK_PRODUCT (INT_MAX, UINT_MAX, unsigned int, true, INT_MAX * UINT_MAX);
   CHECK_PRODUCT (INT_MAX, ULONG_MAX, unsigned long int, true,
                  INT_MAX * ULONG_MAX);
+#if !defined __HP_cc
   CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN - 1, long int, true, LONG_MIN);
   CHECK_SPRODUCT (INT_MIN, LONG_MAX / INT_MIN, long int, false, DONTCARE);
+#endif
   CHECK_PRODUCT (INT_MIN, UINT_MAX, unsigned int, true, INT_MIN * UINT_MAX);
   CHECK_PRODUCT (INT_MIN, ULONG_MAX, unsigned long int, true,
                  INT_MIN * ULONG_MAX);
+  CHECK_SPRODUCT_WRAPV (-1, INT_MAX + 1u, int, false, DONTCARE);
+  CHECK_SPRODUCT_WRAPV (-1, 1u, int, false, DONTCARE);
+  CHECK_SPRODUCT (0, ULONG_MAX, int, false, DONTCARE);
+  CHECK_SPRODUCT (0u, LONG_MIN, int, false, DONTCARE);
   {
     long int result;
     ASSERT (INT_MULTIPLY_WRAPV (INT_MAX, INT_MAX, &result)
@@ -365,6 +403,12 @@ main (void)
   }
 # endif
 
+  /* Check for GCC bug 91450.  */
+  {
+    unsigned long long result;
+    ASSERT (INT_MULTIPLY_WRAPV (int_minus_2, int_1, &result) && result == -2);
+  }
+
   #define CHECK_QUOTIENT(a, b, v) VERIFY (INT_DIVIDE_OVERFLOW (a, b) == (v))
 
   CHECK_QUOTIENT (INT_MIN, -1L, INT_MIN == LONG_MIN);
index 74ded90..9422ad4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test inttostr functions, and incidentally, INT_BUFSIZE_BOUND
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index eb19655..f7f2e3a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <inttypes.h> substitute.
-   Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 97dec4c..6d7b629 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of ioctl() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5df1628..eca2366 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of isblank() function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ main (int argc, char *argv[])
 
   /* Verify the property in the "C" locale.
      POSIX specifies in
-       <http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html>
+       <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html>
      that
        - in all locales, the blank characters include the <space> and <tab>
          characters,
index b39d4aa..3f69114 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of iswblank() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-iswdigit.c b/gnulib-tests/test-iswdigit.c
new file mode 100644 (file)
index 0000000..bcd66a0
--- /dev/null
@@ -0,0 +1,233 @@
+/* Test of iswdigit() function.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (iswdigit, int, (wint_t));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#include "macros.h"
+
+/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret == n)
+    return iswdigit (wc);
+  else
+    return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int is;
+  char buf[4];
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test WEOF.  */
+  is = iswdigit (WEOF);
+  ASSERT (is == 0);
+
+  /* Test single-byte characters.
+     ISO C 99 sections 7.25.2.1.5 and 5.2.1 specify that the decimal digits
+     include only the ASCII 0 ... 9 characters.  */
+  {
+    int c;
+
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        case ' ': case '!': case '"': case '#': case '%':
+        case '&': case '\'': case '(': case ')': case '*':
+        case '+': case ',': case '-': case '.': case '/':
+        case '0': case '1': case '2': case '3': case '4':
+        case '5': case '6': case '7': case '8': case '9':
+        case ':': case ';': case '<': case '=': case '>':
+        case '?':
+        case 'A': case 'B': case 'C': case 'D': case 'E':
+        case 'F': case 'G': case 'H': case 'I': case 'J':
+        case 'K': case 'L': case 'M': case 'N': case 'O':
+        case 'P': case 'Q': case 'R': case 'S': case 'T':
+        case 'U': case 'V': case 'W': case 'X': case 'Y':
+        case 'Z':
+        case '[': case '\\': case ']': case '^': case '_':
+        case 'a': case 'b': case 'c': case 'd': case 'e':
+        case 'f': case 'g': case 'h': case 'i': case 'j':
+        case 'k': case 'l': case 'm': case 'n': case 'o':
+        case 'p': case 'q': case 'r': case 's': case 't':
+        case 'u': case 'v': case 'w': case 'x': case 'y':
+        case 'z': case '{': case '|': case '}': case '~':
+          /* c is in the ISO C "basic character set".  */
+          buf[0] = (unsigned char) c;
+          is = for_character (buf, 1);
+          switch (c)
+            {
+            case '0': case '1': case '2': case '3': case '4':
+            case '5': case '6': case '7': case '8': case '9':
+              ASSERT (is != 0);
+              break;
+            default:
+              ASSERT (is == 0);
+              break;
+            }
+          break;
+        }
+  }
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '0':
+        /* C locale; tested above.  */
+        return 0;
+
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\262", 1);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\263", 1);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\271", 1);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '2':
+        /* Locale encoding is EUC-JP.  */
+        {
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\243\261", 2);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is UTF-8.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\302\262", 2);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\302\263", 2);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\302\271", 2);
+          ASSERT (is == 0);
+          /* U+0663 ARABIC-INDIC DIGIT THREE */
+          is = for_character ("\331\243", 2);
+          ASSERT (is == 0);
+          /* U+2070 SUPERSCRIPT ZERO */
+          is = for_character ("\342\201\260", 3);
+          ASSERT (is == 0);
+          /* U+2079 SUPERSCRIPT NINE */
+          is = for_character ("\342\201\271", 3);
+          ASSERT (is == 0);
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\357\274\221", 3);
+          ASSERT (is == 0);
+          /* U+1D7D1 MATHEMATICAL BOLD DIGIT THREE */
+          is = for_character ("\360\235\237\221", 4);
+          ASSERT (is == 0);
+          /* U+1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE */
+          is = for_character ("\360\235\237\233", 4);
+          ASSERT (is == 0);
+          /* U+1D7E5 MATHEMATICAL SANS-SERIF DIGIT THREE */
+          is = for_character ("\360\235\237\245", 4);
+          ASSERT (is == 0);
+          /* U+1D7EF MATHEMATICAL SANS-SERIF BOLD DIGIT THREE */
+          is = for_character ("\360\235\237\257", 4);
+          ASSERT (is == 0);
+          /* U+1D7F9 MATHEMATICAL MONOSPACE DIGIT THREE */
+          is = for_character ("\360\235\237\271", 4);
+          ASSERT (is == 0);
+          /* U+E0033 TAG DIGIT THREE */
+          is = for_character ("\363\240\200\263", 4);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '4':
+        /* Locale encoding is GB18030.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\201\060\205\065", 4);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\201\060\205\066", 4);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\201\060\206\061", 4);
+          ASSERT (is == 0);
+          /* U+0663 ARABIC-INDIC DIGIT THREE */
+          is = for_character ("\201\061\211\071", 4);
+          ASSERT (is == 0);
+          /* U+2070 SUPERSCRIPT ZERO */
+          is = for_character ("\201\066\255\062", 4);
+          ASSERT (is == 0);
+          /* U+2079 SUPERSCRIPT NINE */
+          is = for_character ("\201\066\256\061", 4);
+          ASSERT (is == 0);
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\243\261", 2);
+          ASSERT (is == 0);
+          /* U+1D7D1 MATHEMATICAL BOLD DIGIT THREE */
+          is = for_character ("\224\063\353\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE */
+          is = for_character ("\224\063\354\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7E5 MATHEMATICAL SANS-SERIF DIGIT THREE */
+          is = for_character ("\224\063\355\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7EF MATHEMATICAL SANS-SERIF BOLD DIGIT THREE */
+          is = for_character ("\224\063\356\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7F9 MATHEMATICAL MONOSPACE DIGIT THREE */
+          is = for_character ("\224\063\357\071", 4);
+          ASSERT (is == 0);
+          /* U+E0033 TAG DIGIT THREE */
+          is = for_character ("\323\066\232\071", 4);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      }
+
+  return 1;
+}
diff --git a/gnulib-tests/test-iswdigit.sh b/gnulib-tests/test-iswdigit.sh
new file mode 100755 (executable)
index 0000000..1bde602
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Test in the POSIX locale.
+LC_ALL=C     ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
+LC_ALL=POSIX ${CHECKER} ./test-iswdigit${EXEEXT} 0 || exit 1
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR \
+  ${CHECKER} ./test-iswdigit${EXEEXT} 1 \
+  || exit 1
+fi
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA != none; then
+  LC_ALL=$LOCALE_JA \
+  ${CHECKER} ./test-iswdigit${EXEEXT} 2 \
+  || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 \
+  ${CHECKER} ./test-iswdigit${EXEEXT} 3 \
+  || exit 1
+fi
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN != none; then
+  LC_ALL=$LOCALE_ZH_CN \
+  ${CHECKER} ./test-iswdigit${EXEEXT} 4 \
+  || exit 1
+fi
+
+exit 0
diff --git a/gnulib-tests/test-iswxdigit.c b/gnulib-tests/test-iswxdigit.c
new file mode 100644 (file)
index 0000000..15425ee
--- /dev/null
@@ -0,0 +1,259 @@
+/* Test of iswxdigit() function.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (iswxdigit, int, (wint_t));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#include "macros.h"
+
+/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret == n)
+    return iswxdigit (wc);
+  else
+    return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int is;
+  char buf[4];
+
+  /* configure should already have checked that the locale is supported.  */
+  if (setlocale (LC_ALL, "") == NULL)
+    return 1;
+
+  /* Test WEOF.  */
+  is = iswxdigit (WEOF);
+  ASSERT (is == 0);
+
+  /* Test single-byte characters.
+     ISO C 99 sections 7.25.2.1.12 and 6.4.4.1 specify that the hexadecimal
+     digits include only the ASCII 0 ... 9 A ... F a ... f characters.  */
+  {
+    int c;
+
+    for (c = 0; c < 0x100; c++)
+      switch (c)
+        {
+        case '\t': case '\v': case '\f':
+        case ' ': case '!': case '"': case '#': case '%':
+        case '&': case '\'': case '(': case ')': case '*':
+        case '+': case ',': case '-': case '.': case '/':
+        case '0': case '1': case '2': case '3': case '4':
+        case '5': case '6': case '7': case '8': case '9':
+        case ':': case ';': case '<': case '=': case '>':
+        case '?':
+        case 'A': case 'B': case 'C': case 'D': case 'E':
+        case 'F': case 'G': case 'H': case 'I': case 'J':
+        case 'K': case 'L': case 'M': case 'N': case 'O':
+        case 'P': case 'Q': case 'R': case 'S': case 'T':
+        case 'U': case 'V': case 'W': case 'X': case 'Y':
+        case 'Z':
+        case '[': case '\\': case ']': case '^': case '_':
+        case 'a': case 'b': case 'c': case 'd': case 'e':
+        case 'f': case 'g': case 'h': case 'i': case 'j':
+        case 'k': case 'l': case 'm': case 'n': case 'o':
+        case 'p': case 'q': case 'r': case 's': case 't':
+        case 'u': case 'v': case 'w': case 'x': case 'y':
+        case 'z': case '{': case '|': case '}': case '~':
+          /* c is in the ISO C "basic character set".  */
+          buf[0] = (unsigned char) c;
+          is = for_character (buf, 1);
+          switch (c)
+            {
+            case '0': case '1': case '2': case '3': case '4':
+            case '5': case '6': case '7': case '8': case '9':
+            case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+            case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+              ASSERT (is != 0);
+              break;
+            default:
+              ASSERT (is == 0);
+              break;
+            }
+          break;
+        }
+  }
+
+  if (argc > 1)
+    switch (argv[1][0])
+      {
+      case '0':
+        /* C locale; tested above.  */
+        return 0;
+
+      case '1':
+        /* Locale encoding is ISO-8859-1 or ISO-8859-15.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\262", 1);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\263", 1);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\271", 1);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '2':
+        /* Locale encoding is EUC-JP.  */
+        {
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\243\261", 2);
+          ASSERT (is == 0);
+          /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+          is = for_character ("\243\301", 2);
+          ASSERT (is == 0);
+          /* U+FF41 FULLWIDTH LATIN SMALL LETTER A */
+          is = for_character ("\243\341", 2);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '3':
+        /* Locale encoding is UTF-8.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\302\262", 2);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\302\263", 2);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\302\271", 2);
+          ASSERT (is == 0);
+          /* U+0663 ARABIC-INDIC DIGIT THREE */
+          is = for_character ("\331\243", 2);
+          ASSERT (is == 0);
+          /* U+2070 SUPERSCRIPT ZERO */
+          is = for_character ("\342\201\260", 3);
+          ASSERT (is == 0);
+          /* U+2079 SUPERSCRIPT NINE */
+          is = for_character ("\342\201\271", 3);
+          ASSERT (is == 0);
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\357\274\221", 3);
+          ASSERT (is == 0);
+          /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+          is = for_character ("\357\274\241", 3);
+          ASSERT (is == 0);
+          /* U+FF41 FULLWIDTH LATIN SMALL LETTER A */
+          is = for_character ("\357\275\201", 3);
+          ASSERT (is == 0);
+          /* U+1D7D1 MATHEMATICAL BOLD DIGIT THREE */
+          is = for_character ("\360\235\237\221", 4);
+          ASSERT (is == 0);
+          /* U+1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE */
+          is = for_character ("\360\235\237\233", 4);
+          ASSERT (is == 0);
+          /* U+1D7E5 MATHEMATICAL SANS-SERIF DIGIT THREE */
+          is = for_character ("\360\235\237\245", 4);
+          ASSERT (is == 0);
+          /* U+1D7EF MATHEMATICAL SANS-SERIF BOLD DIGIT THREE */
+          is = for_character ("\360\235\237\257", 4);
+          ASSERT (is == 0);
+          /* U+1D7F9 MATHEMATICAL MONOSPACE DIGIT THREE */
+          is = for_character ("\360\235\237\271", 4);
+          ASSERT (is == 0);
+          /* U+E0033 TAG DIGIT THREE */
+          is = for_character ("\363\240\200\263", 4);
+          ASSERT (is == 0);
+          /* U+E0041 TAG LATIN CAPITAL LETTER A */
+          is = for_character ("\363\240\201\201", 4);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      case '4':
+        /* Locale encoding is GB18030.  */
+        {
+          /* U+00B2 SUPERSCRIPT TWO */
+          is = for_character ("\201\060\205\065", 4);
+          ASSERT (is == 0);
+          /* U+00B3 SUPERSCRIPT THREE */
+          is = for_character ("\201\060\205\066", 4);
+          ASSERT (is == 0);
+          /* U+00B9 SUPERSCRIPT ONE */
+          is = for_character ("\201\060\206\061", 4);
+          ASSERT (is == 0);
+          /* U+0663 ARABIC-INDIC DIGIT THREE */
+          is = for_character ("\201\061\211\071", 4);
+          ASSERT (is == 0);
+          /* U+2070 SUPERSCRIPT ZERO */
+          is = for_character ("\201\066\255\062", 4);
+          ASSERT (is == 0);
+          /* U+2079 SUPERSCRIPT NINE */
+          is = for_character ("\201\066\256\061", 4);
+          ASSERT (is == 0);
+          /* U+FF11 FULLWIDTH DIGIT ONE */
+          is = for_character ("\243\261", 2);
+          ASSERT (is == 0);
+          /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+          is = for_character ("\243\301", 2);
+          ASSERT (is == 0);
+          /* U+FF41 FULLWIDTH LATIN SMALL LETTER A */
+          is = for_character ("\243\341", 2);
+          ASSERT (is == 0);
+          /* U+1D7D1 MATHEMATICAL BOLD DIGIT THREE */
+          is = for_character ("\224\063\353\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE */
+          is = for_character ("\224\063\354\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7E5 MATHEMATICAL SANS-SERIF DIGIT THREE */
+          is = for_character ("\224\063\355\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7EF MATHEMATICAL SANS-SERIF BOLD DIGIT THREE */
+          is = for_character ("\224\063\356\071", 4);
+          ASSERT (is == 0);
+          /* U+1D7F9 MATHEMATICAL MONOSPACE DIGIT THREE */
+          is = for_character ("\224\063\357\071", 4);
+          ASSERT (is == 0);
+          /* U+E0033 TAG DIGIT THREE */
+          is = for_character ("\323\066\232\071", 4);
+          ASSERT (is == 0);
+          /* U+E0041 TAG LATIN CAPITAL LETTER A */
+          is = for_character ("\323\066\234\063", 4);
+          ASSERT (is == 0);
+        }
+        return 0;
+
+      }
+
+  return 1;
+}
diff --git a/gnulib-tests/test-iswxdigit.sh b/gnulib-tests/test-iswxdigit.sh
new file mode 100755 (executable)
index 0000000..f545438
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Test in the POSIX locale.
+LC_ALL=C     ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
+LC_ALL=POSIX ${CHECKER} ./test-iswxdigit${EXEEXT} 0 || exit 1
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+  LC_ALL=$LOCALE_FR \
+  ${CHECKER} ./test-iswxdigit${EXEEXT} 1 \
+  || exit 1
+fi
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA != none; then
+  LC_ALL=$LOCALE_JA \
+  ${CHECKER} ./test-iswxdigit${EXEEXT} 2 \
+  || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+  LC_ALL=$LOCALE_FR_UTF8 \
+  ${CHECKER} ./test-iswxdigit${EXEEXT} 3 \
+  || exit 1
+fi
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN != none; then
+  LC_ALL=$LOCALE_ZH_CN \
+  ${CHECKER} ./test-iswxdigit${EXEEXT} 4 \
+  || exit 1
+fi
+
+exit 0
index ba5fa86..4215ea7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <langinfo.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ee30bde..f3394c1 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <limits.h> substitute.
-   Copyright 2016-2018 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -110,6 +110,11 @@ verify_width (ULONG_WIDTH, 0, ULONG_MAX);
 verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX);
 verify_width (ULLONG_WIDTH, 0, ULLONG_MAX);
 
+/* Macros specified by C2x.  */
+
+int bool_attrs[] = { BOOL_MAX, BOOL_WIDTH };
+verify (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1);
+
 int
 main (void)
 {
index 121ef74..3692514 100644 (file)
@@ -1,5 +1,5 @@
 /* Test listen() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 69bca0b..07b756c 100644 (file)
@@ -1,5 +1,5 @@
 /* Manual test of localcharset() function.
-   Copyright (C) 2018 Free Software Foundation, Inc.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index c09ae9a..59644fa 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <locale.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ verify (sizeof NULL == sizeof (void *));
 int
 main ()
 {
-#if HAVE_NEWLOCALE
+#if HAVE_WORKING_NEWLOCALE
   /* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined.  */
   locale_t b = LC_GLOBAL_LOCALE;
   (void) b;
index d2bd761..b7998ef 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of localeconv() function.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9ef2fcd..b8481fb 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 248e7df..08803da 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of lstat() function.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -31,12 +31,16 @@ test_lstat_func (int (*func) (char const *, struct stat *), bool print)
   /* Test for common directories.  */
   ASSERT (func (".", &st1) == 0);
   ASSERT (func ("./", &st2) == 0);
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
   ASSERT (S_ISDIR (st1.st_mode));
   ASSERT (S_ISDIR (st2.st_mode));
   ASSERT (func ("/", &st1) == 0);
   ASSERT (func ("///", &st2) == 0);
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
   ASSERT (S_ISDIR (st1.st_mode));
   ASSERT (S_ISDIR (st2.st_mode));
   ASSERT (func ("..", &st1) == 0);
@@ -85,7 +89,9 @@ test_lstat_func (int (*func) (char const *, struct stat *), bool print)
   ASSERT (stat (BASE "link1", &st2) == 0);
   ASSERT (S_ISDIR (st1.st_mode));
   ASSERT (S_ISDIR (st2.st_mode));
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
 
   ASSERT (func (BASE "link2", &st1) == 0);
   ASSERT (S_ISLNK (st1.st_mode));
diff --git a/gnulib-tests/test-malloc-gnu.c b/gnulib-tests/test-malloc-gnu.c
new file mode 100644 (file)
index 0000000..0160c6c
--- /dev/null
@@ -0,0 +1,45 @@
+/* Test of malloc function.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#include <stdint.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  /* Check that malloc (0) is not a NULL pointer.  */
+  void *volatile p = malloc (0);
+  ASSERT (p != NULL);
+  free (p);
+
+  /* Check that malloc (n) fails when n exceeds PTRDIFF_MAX.  */
+  if (PTRDIFF_MAX < SIZE_MAX)
+    {
+      size_t one = argc != 12345;
+      p = malloc (PTRDIFF_MAX + one);
+      ASSERT (p == NULL);
+      ASSERT (errno == ENOMEM);
+    }
+
+  return 0;
+}
index a07667b..52d95a5 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of safe automatic memory allocation.
-   Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 static void
 do_allocation (int n)
 {
-  void *ptr = malloca (n);
+  void *volatile ptr = malloca (n);
   freea (ptr);
   safe_alloca (n);
 }
index 3f12e44..fec9ead 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP1252 locale.
-./test-mbrtowc-w32${EXEEXT} French_France 1252
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} French_France 1252
index 9e1a765..c55a0ec 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP1256 locale.
-./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
index 782c2d0..c49f4bd 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP932 locale.
-./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932
index 0630f30..3e78615 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP950 locale.
-./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950
index 7d7faa9..c6ba222 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP936 locale.
-./test-mbrtowc-w32${EXEEXT} Chinese_China 936
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} Chinese_China 936
diff --git a/gnulib-tests/test-mbrtowc-w32-6.sh b/gnulib-tests/test-mbrtowc-w32-6.sh
new file mode 100755 (executable)
index 0000000..c2e8dfe
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a GB18030 locale.
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} Chinese_China 54936
diff --git a/gnulib-tests/test-mbrtowc-w32-7.sh b/gnulib-tests/test-mbrtowc-w32-7.sh
new file mode 100755 (executable)
index 0000000..2c5d555
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test some UTF-8 locales.
+${CHECKER} ./test-mbrtowc-w32${EXEEXT} French_France Japanese_Japan Chinese_Taiwan Chinese_China 65001
index ba4d755..7de6959 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of multibyte character to wide character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "localcharset.h"
 #include "macros.h"
 
 #if defined _WIN32 && !defined __CYGWIN__
@@ -476,6 +477,8 @@ test_one_locale (const char *name, int codepage)
 
     case 54936:
       /* Locale encoding is CP54936 = GB18030.  */
+      if (strcmp (locale_charset (), "GB18030") != 0)
+        return 77;
       {
         char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
         memset (&state, '\0', sizeof (mbstate_t));
@@ -523,7 +526,7 @@ test_one_locale (const char *name, int codepage)
         ASSERT (ret == 1);
         ASSERT (wc == 'e');
         ASSERT (mbsinit (&state));
-        input[5] = '\0';
+        input[7] = '\0';
 
         wc = (wchar_t) 0xBADFACE;
         ret = mbrtowc (&wc, input + 8, 1, &state);
@@ -572,6 +575,8 @@ test_one_locale (const char *name, int codepage)
 
     case 65001:
       /* Locale encoding is CP65001 = UTF-8.  */
+      if (strcmp (locale_charset (), "UTF-8") != 0)
+        return 77;
       {
         char input[] = "B\303\274\303\237er"; /* "Büßer" */
         memset (&state, '\0', sizeof (mbstate_t));
index 44da295..404128b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of multibyte character to wide character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
                locale.
                On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
                But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF.  */
-            ASSERT (wc == (btowc (c) == WEOF ? c : btowc (c)));
+            ASSERT (wc == (btowc (c) == 0xDF00 + c ? btowc (c) : c));
           ASSERT (mbsinit (&state));
           ret = mbrtowc (NULL, buf, 1, &state);
           ASSERT (ret == 1);
@@ -338,7 +338,7 @@ main (int argc, char *argv[])
           ASSERT (ret == 1);
           ASSERT (wc == 'e');
           ASSERT (mbsinit (&state));
-          input[5] = '\0';
+          input[7] = '\0';
 
           wc = (wchar_t) 0xBADFACE;
           ret = mbrtowc (&wc, input + 8, 1, &state);
index 3becba3..00b108b 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR = none; then
 fi
 
 LC_ALL=$LOCALE_FR \
-./test-mbrtowc${EXEEXT} 1
+${CHECKER} ./test-mbrtowc${EXEEXT} 1
index 0405aba..5036930 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_FR_UTF8 \
-./test-mbrtowc${EXEEXT} 2
+${CHECKER} ./test-mbrtowc${EXEEXT} 2
index 63a89a2..2773fa7 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_JA = none; then
 fi
 
 LC_ALL=$LOCALE_JA \
-./test-mbrtowc${EXEEXT} 3
+${CHECKER} ./test-mbrtowc${EXEEXT} 3
index b299a2c..92f641c 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_ZH_CN = none; then
 fi
 
 LC_ALL=$LOCALE_ZH_CN \
-./test-mbrtowc${EXEEXT} 4
+${CHECKER} ./test-mbrtowc${EXEEXT} 4
index c10b228..490496d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Test whether the POSIX locale has encoding errors.
 LC_ALL=C \
-./test-mbrtowc${EXEEXT} 5 || exit
+${CHECKER} ./test-mbrtowc${EXEEXT} 5 || exit
 LC_ALL=POSIX \
-./test-mbrtowc${EXEEXT} 5
+${CHECKER} ./test-mbrtowc${EXEEXT} 5
index 2eaf0a2..c1b5c8f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of case-insensitive string comparison function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1ec7d5e..5201951 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_TR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_TR_UTF8 \
-./test-mbscasecmp${EXEEXT}
+${CHECKER} ./test-mbscasecmp${EXEEXT}
index 3b2d418..bda3a3b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of test for initial conversion state.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index bbda48d..7308714 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_FR_UTF8 \
-./test-mbsinit${EXEEXT}
+${CHECKER} ./test-mbsinit${EXEEXT}
index eac6136..1489978 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of string to wide string.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 01916e7..66ba231 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR = none; then
 fi
 
 LC_ALL=$LOCALE_FR \
-./test-mbsrtowcs${EXEEXT} 1
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 1
index f72ceb6..6786efd 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_FR_UTF8 \
-./test-mbsrtowcs${EXEEXT} 2
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 2
index b3c01d4..54e9832 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_JA = none; then
 fi
 
 LC_ALL=$LOCALE_JA \
-./test-mbsrtowcs${EXEEXT} 3
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 3
index 226d6ff..8acda08 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_ZH_CN = none; then
 fi
 
 LC_ALL=$LOCALE_ZH_CN \
-./test-mbsrtowcs${EXEEXT} 4
+${CHECKER} ./test-mbsrtowcs${EXEEXT} 4
index a6b5583..a34cfe6 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index dbe1176..6727358 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 79d06df..5ef7139 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_FR_UTF8 = none; then
 fi
 
 LC_ALL=$LOCALE_FR_UTF8 \
-./test-mbsstr2${EXEEXT}
+${CHECKER} ./test-mbsstr2${EXEEXT}
index dc736fb..91834df 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of searching in a string.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 732c01f..539f9c0 100755 (executable)
@@ -12,4 +12,4 @@ if test $LOCALE_ZH_CN = none; then
 fi
 
 LC_ALL=$LOCALE_ZH_CN \
-./test-mbsstr3${EXEEXT}
+${CHECKER} ./test-mbsstr3${EXEEXT}
index f191587..1357d08 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2021 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
@@ -49,7 +49,12 @@ main (void)
   ASSERT (MEMCHR (input, 'a', n) == input);
 
   ASSERT (MEMCHR (input, 'a', 0) == NULL);
-  ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+  {
+    void *page_boundary = zerosize_ptr ();
+    if (page_boundary)
+      ASSERT (MEMCHR (page_boundary, 'a', 0) == NULL);
+  }
 
   ASSERT (MEMCHR (input, 'b', n) == input + 1);
   ASSERT (MEMCHR (input, 'c', n) == input + 2);
@@ -88,7 +93,7 @@ main (void)
 
   /* Check that memchr() does not read past the first occurrence of the
      byte being searched.  See the Austin Group's clarification
-     <http://www.opengroup.org/austin/docs/austin_454.txt>.
+     <https://www.opengroup.org/austin/docs/austin_454.txt>.
      Test both '\0' and something else, since some implementations
      special-case searching for NUL.
   */
index 66a713f..ab65cb8 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of mkdir.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9849300..204f522 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of mkdir() function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 65e261f..4464006 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of nanosleep() function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 692878c..c0de97f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <netinet/in.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-nl_langinfo-mt.c b/gnulib-tests/test-nl_langinfo-mt.c
new file mode 100644 (file)
index 0000000..5ff6490
--- /dev/null
@@ -0,0 +1,253 @@
+/* Multithread-safety test for nl_langinfo().
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Work around GCC bug 44511.  */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wreturn-type"
+#endif
+
+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+
+/* Specification.  */
+#include <langinfo.h>
+
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "glthread/thread.h"
+
+
+/* Some common locale names.  */
+
+#if defined _WIN32 && !defined __CYGWIN__
+# define ENGLISH "English_United States"
+# define FRENCH  "French_France"
+# define GERMAN  "German_Germany"
+# define ENCODING ".1252"
+#else
+# define ENGLISH "en_US"
+# define FRENCH  "fr_FR"
+# define GERMAN  "de_DE"
+# if defined __sgi
+#  define ENCODING ".ISO8859-15"
+# elif defined __hpux
+#  define ENCODING ".utf8"
+# else
+#  define ENCODING ".UTF-8"
+# endif
+#endif
+
+static const char LOCALE1[] = ENGLISH ENCODING;
+static const char LOCALE2[] = FRENCH ENCODING;
+static const char LOCALE3[] = GERMAN ENCODING;
+
+static char *expected1;
+
+static void *
+thread1_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (CODESET);
+      if (strcmp (expected1, value) != 0)
+        {
+          fprintf (stderr, "thread1 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static char *expected2;
+
+static void *
+thread2_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (PM_STR);
+      if (strcmp (expected2, value) != 0)
+        {
+          fprintf (stderr, "thread2 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static char *expected3;
+
+static void *
+thread3_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (DAY_2);
+      if (strcmp (expected3, value) != 0)
+        {
+          fprintf (stderr, "thread3 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static char *expected4;
+
+static void *
+thread4_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (ALTMON_2);
+      if (strcmp (expected4, value) != 0)
+        {
+          fprintf (stderr, "thread4 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static char *expected5;
+
+static void *
+thread5_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (CRNCYSTR);
+      if (strcmp (expected5, value) != 0)
+        {
+          fprintf (stderr, "thread5 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static char *expected6;
+
+static void *
+thread6_func (void *arg)
+{
+  for (;;)
+    {
+      const char *value = nl_langinfo (RADIXCHAR);
+      if (strcmp (expected6, value) != 0)
+        {
+          fprintf (stderr, "thread6 disturbed by threadN!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static void *
+threadN_func (void *arg)
+{
+  for (;;)
+    {
+      nl_langinfo (CODESET);   /* LC_CTYPE */    /* locale charmap */
+      nl_langinfo (AM_STR);    /* LC_TIME */     /* locale -k am_pm */
+      nl_langinfo (PM_STR);    /* LC_TIME */     /* locale -k am_pm */
+      nl_langinfo (DAY_2);     /* LC_TIME */     /* locale -k day */
+      nl_langinfo (DAY_5);     /* LC_TIME */     /* locale -k day */
+      nl_langinfo (ALTMON_2);  /* LC_TIME */     /* locale -k alt_mon */
+      nl_langinfo (ALTMON_9);  /* LC_TIME */     /* locale -k alt_mon */
+      nl_langinfo (CRNCYSTR);  /* LC_MONETARY */ /* locale -k currency_symbol */
+      nl_langinfo (RADIXCHAR); /* LC_NUMERIC */  /* locale -k decimal_point */
+      nl_langinfo (THOUSEP);   /* LC_NUMERIC */  /* locale -k thousands_sep */
+    }
+
+  /*NOTREACHED*/
+}
+
+int
+main (int argc, char *argv[])
+{
+  if (setlocale (LC_ALL, LOCALE1) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE1 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_MONETARY, LOCALE2) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE2 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_NUMERIC, LOCALE3) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE3 not recognized\n");
+      return 77;
+    }
+
+  expected1 = strdup (nl_langinfo (CODESET));
+  expected2 = strdup (nl_langinfo (PM_STR));
+  expected3 = strdup (nl_langinfo (DAY_2));
+  expected4 = strdup (nl_langinfo (ALTMON_2));
+  expected5 = strdup (nl_langinfo (CRNCYSTR));
+  expected6 = strdup (nl_langinfo (RADIXCHAR));
+
+  /* Create the checker threads.  */
+  gl_thread_create (thread1_func, NULL);
+  gl_thread_create (thread2_func, NULL);
+  gl_thread_create (thread3_func, NULL);
+  gl_thread_create (thread4_func, NULL);
+  gl_thread_create (thread5_func, NULL);
+  gl_thread_create (thread6_func, NULL);
+  /* Create the disturber thread.  */
+  gl_thread_create (threadN_func, NULL);
+
+  /* Let them run for 2 seconds.  */
+  {
+    struct timespec duration;
+    duration.tv_sec = (argc > 1 ? atoi (argv[1]) : 2);
+    duration.tv_nsec = 0;
+
+    nanosleep (&duration, NULL);
+  }
+
+  return 0;
+}
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif
index a13fb71..def628b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of nl_langinfo replacement.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3168f42..b1ce46c 100755 (executable)
@@ -1,17 +1,17 @@
 #!/bin/sh
 
-LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1
+LC_ALL=C ${CHECKER} ./test-nl_langinfo${EXEEXT} 0 || exit 1
 
 # Test whether a specific traditional locale is installed.
 : ${LOCALE_FR=fr_FR}
 if test $LOCALE_FR != none; then
-  LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1
+  LC_ALL=$LOCALE_FR ${CHECKER} ./test-nl_langinfo${EXEEXT} 1 || exit 1
 fi
 
 # Test whether a specific UTF-8 locale is installed.
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
 if test $LOCALE_FR_UTF8 != none; then
-  LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1
+  LC_ALL=$LOCALE_FR_UTF8 ${CHECKER} ./test-nl_langinfo${EXEEXT} 2 || exit 1
 fi
 
 exit 0
index a2c92aa..98a2eca 100644 (file)
@@ -1,5 +1,5 @@
 /* Test that nstrftime works as required.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "strftime.h"
 
+#include "intprops.h"
+
 #include <errno.h>
+#include <limits.h>
 #include <stdio.h>
 #include <string.h>
 #include <time.h>
@@ -44,6 +47,7 @@ static struct posixtm_test const T[] =
   {
     { 1300000000, 0,            "%F", "2011-03-13" },
     { 0,          10,           "%T.%N", "00:00:00.000000010" },
+    { 56,         123456789,    "%T.%12N", "00:00:56.123456789000" },
     { 0,          0,            NULL, NULL }
   };
 
@@ -246,6 +250,81 @@ quarter_test (void)
   return result;
 }
 
+static int
+errno_test (void)
+{
+  int fail = 0;
+  struct tm tm = { .tm_year = 2020 - 1900, .tm_mday = 1 };
+  char buf[INT_BUFSIZE_BOUND (time_t)];
+  size_t n;
+  int bigyear = LLONG_MAX - 1900 < INT_MAX ? LLONG_MAX - 1900 : INT_MAX;
+
+  errno = 0;
+  n = nstrftime (buf, 0, "%m", &tm, 0, 0);
+  if (! (n == 0 && errno == ERANGE))
+    {
+      fail = 1;
+      printf ("nstrftime failed to set errno = ERANGE\n");
+    }
+
+  errno = 0;
+  n = nstrftime (buf, sizeof buf, "", &tm, 0, 0);
+  if (! (n == 0 && errno == 0))
+    {
+      fail = 1;
+      printf ("nstrftime failed to leave errno alone\n");
+    }
+
+
+  tm.tm_year = bigyear;
+  errno = 0;
+  n = nstrftime (buf, sizeof buf, "%s", &tm, 0, 0);
+  if (n == 0)
+    {
+      if (errno != EOVERFLOW)
+        {
+          fail = 1;
+          printf ("nstrftime failed to set errno = EOVERFLOW\n");
+        }
+
+      if (mktime_z (0, &tm) != (time_t) -1)
+        {
+          fail = 1;
+          printf ("nstrftime %%s failed but mktime_z worked for tm_year=%d\n",
+                  bigyear);
+        }
+    }
+  else
+    {
+      long long int text_seconds = atoll (buf);
+      if (text_seconds <= (LLONG_MAX - 1 < TYPE_MAXIMUM (time_t)
+                           ? LLONG_MAX - 1 : TYPE_MAXIMUM (time_t)))
+        {
+          time_t bigtime = text_seconds;
+          struct tm *tmp = gmtime (&bigtime);
+          if (!tmp)
+            {
+              fail = 1;
+              printf ("gmtime failed on nstrftime result\n");
+            }
+          else
+            {
+              char buf1[sizeof buf];
+              size_t n1 = nstrftime (buf1, sizeof buf1, "%s", tmp, 0, 0);
+              buf1[n1] = '\0';
+              if (! STREQ (buf, buf1))
+                {
+                  fail = 1;
+                  printf ("nstrftime %%s first returned '%s', then '%s'\n",
+                          buf, buf1);
+                }
+            }
+        }
+    }
+
+  return fail;
+}
+
 int
 main (void)
 {
@@ -253,6 +332,7 @@ main (void)
   fail |= posixtm_test ();
   fail |= tzalloc_test ();
   fail |= quarter_test ();
+  fail |= errno_test ();
   return fail;
 }
 
index 125950e..1524af4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8996c09..9ceb798 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of opening a file descriptor.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -37,8 +37,11 @@ static ALWAYS_INLINE int
 test_open (int (*func) (char const *, int, ...), bool print)
 {
   int fd;
+
   /* Remove anything from prior partial run.  */
   unlink (BASE "file");
+  unlink (BASE "e.exe");
+  unlink (BASE "link");
 
   /* Cannot create directory.  */
   errno = 0;
@@ -51,6 +54,11 @@ test_open (int (*func) (char const *, int, ...), bool print)
   ASSERT (0 <= fd);
   ASSERT (close (fd) == 0);
 
+  /* Create an executable regular file.  */
+  fd = func (BASE "e.exe", O_CREAT | O_RDONLY, 0700);
+  ASSERT (0 <= fd);
+  ASSERT (close (fd) == 0);
+
   /* Trailing slash handling.  */
   errno = 0;
   ASSERT (func (BASE "file/", O_RDONLY) == -1);
@@ -80,6 +88,26 @@ test_open (int (*func) (char const *, int, ...), bool print)
   ASSERT (0 <= fd);
   ASSERT (close (fd) == 0);
 
+  /* O_CLOEXEC must be honoured.  */
+  if (O_CLOEXEC)
+    {
+      /* Since the O_CLOEXEC handling goes through a special code path at its
+         first invocation, test it twice.  */
+      int i;
+
+      for (i = 0; i < 2; i++)
+        {
+          int flags;
+
+          fd = func (BASE "file", O_CLOEXEC | O_RDONLY);
+          ASSERT (0 <= fd);
+          flags = fcntl (fd, F_GETFD);
+          ASSERT (flags >= 0);
+          ASSERT ((flags & FD_CLOEXEC) != 0);
+          ASSERT (close (fd) == 0);
+        }
+    }
+
   /* Symlink handling, where supported.  */
   if (symlink (BASE "file", BASE "link") != 0)
     {
@@ -98,6 +126,7 @@ test_open (int (*func) (char const *, int, ...), bool print)
 
   /* Cleanup.  */
   ASSERT (unlink (BASE "file") == 0);
+  ASSERT (unlink (BASE "e.exe") == 0);
   ASSERT (unlink (BASE "link") == 0);
 
   return 0;
index aa55be8..2ba1cc2 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of "pathmax.h".
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index eacadec..1012396 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 40a3034..e776609 100755 (executable)
@@ -5,22 +5,22 @@
 # Test NULL prefix. Result should not contain a number, except in lines that
 # start with 'EDC' (IBM z/OS libc produces an error identifier before the
 # error message).
-test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
+${CHECKER} test-perror 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror.tmp
 grep -v '^EDC' t-perror.tmp | grep '[0-9]' > /dev/null \
   && fail_ "result should not contain a number"
 
 # Test empty prefix. Result should be the same.
-test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
+${CHECKER} test-perror '' 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror1.tmp
 diff t-perror.tmp t-perror1.tmp \
   || fail_ "empty prefix should behave like NULL argument"
 
 # Test non-empty prefix.
-test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp
+${CHECKER} test-perror foo 2>&1 >/dev/null | LC_ALL=C tr -d '\r' > t-perror3.tmp
 sed -e 's/^/foo: /' < t-perror.tmp > t-perror2.tmp
 diff t-perror2.tmp t-perror3.tmp || fail_ "prefix applied incorrectly"
 
 # Test exit status.
-test-perror >out 2>/dev/null || fail_ "unexpected exit status"
+${CHECKER} test-perror >out 2>/dev/null || fail_ "unexpected exit status"
 test -s out && fail_ "unexpected output"
 
 Exit 0
index 8e6adb4..adce4a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of perror() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,9 +79,6 @@ main (void)
     errno = -5;
     perror ("");
     ASSERT (!ferror (stderr));
-    ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
-    ASSERT (msg2 == msg4 || STREQ (msg2, str2));
-    ASSERT (msg3 == msg4 || STREQ (msg3, str3));
     ASSERT (STREQ (msg4, str4));
 
     free (str1);
@@ -97,7 +94,7 @@ main (void)
     for (i = 0; i < SIZEOF (errs); i++)
       {
         char buf[256];
-        char *err = strerror (errs[i]);
+        const char *err = strerror (errs[i]);
 
         ASSERT (err);
         ASSERT (strlen (err) < sizeof buf);
index 55f6208..5ae2a0a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of pipe.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-pthread-thread.c b/gnulib-tests/test-pthread-thread.c
new file mode 100644 (file)
index 0000000..094e8d1
--- /dev/null
@@ -0,0 +1,73 @@
+/* Test of pthread_create () function.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011.  */
+
+#include <config.h>
+
+#include <pthread.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+static pthread_t main_thread_before;
+static pthread_t main_thread_after;
+static pthread_t worker_thread;
+
+#define MAGIC ((void *) 1266074729)
+static volatile int work_done;
+
+static void *
+worker_thread_func (void *arg)
+{
+  work_done = 1;
+  return MAGIC;
+}
+
+int
+main ()
+{
+  main_thread_before = pthread_self ();
+
+  if (pthread_create (&worker_thread, NULL, worker_thread_func, NULL) == 0)
+    {
+      void *ret;
+
+      /* Check that pthread_self () has the same value before than after the
+         first call to pthread_create ().  */
+      main_thread_after = pthread_self ();
+      ASSERT (memcmp (&main_thread_before, &main_thread_after,
+                      sizeof (pthread_t))
+              == 0);
+
+      ASSERT (pthread_join (worker_thread, &ret) == 0);
+
+      /* Check the return value of the thread.  */
+      ASSERT (ret == MAGIC);
+
+      /* Check that worker_thread_func () has finished executing.  */
+      ASSERT (work_done);
+
+      return 0;
+    }
+  else
+    {
+      fputs ("pthread_create failed\n", stderr);
+      return 1;
+    }
+}
diff --git a/gnulib-tests/test-pthread.c b/gnulib-tests/test-pthread.c
new file mode 100644 (file)
index 0000000..89c68dc
--- /dev/null
@@ -0,0 +1,90 @@
+/* Test of <pthread.h> substitute.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+#include <pthread.h>
+
+#include "verify.h"
+
+/* Check that the types are all defined.  */
+
+pthread_t t1;
+pthread_attr_t t2;
+
+pthread_once_t t3 = PTHREAD_ONCE_INIT;
+
+pthread_mutex_t t4 = PTHREAD_MUTEX_INITIALIZER;
+pthread_mutexattr_t t5;
+
+pthread_rwlock_t t6 = PTHREAD_RWLOCK_INITIALIZER;
+pthread_rwlockattr_t t7;
+
+pthread_cond_t t8 = PTHREAD_COND_INITIALIZER;
+pthread_condattr_t t9;
+
+pthread_key_t t10;
+
+pthread_spinlock_t t11;
+
+#ifdef TODO /* Not implemented in gnulib yet */
+pthread_barrier_t t12;
+pthread_barrierattr_t t13;
+#endif
+
+/* Check that the various macros are defined.  */
+
+/* Constants for pthread_attr_setdetachstate().  */
+int ds[] = { PTHREAD_CREATE_JOINABLE, PTHREAD_CREATE_DETACHED };
+
+/* Constants for pthread_exit().  */
+void *canceled = PTHREAD_CANCELED;
+
+/* Constants for pthread_mutexattr_settype().  */
+int mt[] = {
+  PTHREAD_MUTEX_DEFAULT,
+  PTHREAD_MUTEX_NORMAL,
+  PTHREAD_MUTEX_RECURSIVE,
+  PTHREAD_MUTEX_ERRORCHECK
+};
+
+#ifdef TODO /* Not implemented in gnulib yet */
+
+/* Constants for pthread_mutexattr_setrobust().  */
+int mr[] = { PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_STALLED };
+
+/* Constants for pthread_barrierattr_setpshared().  */
+int bp[] = { PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE };
+
+/* Constants for pthread_barrier_wait().  */
+int bw[] = { PTHREAD_BARRIER_SERIAL_THREAD };
+
+/* Constants for pthread_setcancelstate().  */
+int cs[] = { PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DISABLE };
+
+/* Constants for pthread_setcanceltype().  */
+int ct[] = { PTHREAD_CANCEL_DEFERRED, PTHREAD_CANCEL_ASYNCHRONOUS };
+
+#endif
+
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/gnulib-tests/test-pthread_sigmask1.c b/gnulib-tests/test-pthread_sigmask1.c
new file mode 100644 (file)
index 0000000..f12b17c
--- /dev/null
@@ -0,0 +1,95 @@
+/* Test of pthread_sigmask in a single-threaded program.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011.  */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (pthread_sigmask, int, (int, const sigset_t *, sigset_t *));
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#if !(defined _WIN32 && !defined __CYGWIN__)
+
+static volatile int sigint_occurred;
+
+static void
+sigint_handler (int sig)
+{
+  sigint_occurred++;
+}
+
+int
+main (int argc, char *argv[])
+{
+  sigset_t set;
+  int pid = getpid ();
+  char command[80];
+
+  signal (SIGINT, sigint_handler);
+
+  sigemptyset (&set);
+  sigaddset (&set, SIGINT);
+
+  /* Check error handling.  */
+  ASSERT (pthread_sigmask (1729, &set, NULL) == EINVAL);
+
+  /* Block SIGINT.  */
+  ASSERT (pthread_sigmask (SIG_BLOCK, &set, NULL) == 0);
+
+  /* Request a SIGINT signal from outside.  */
+  sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
+  ASSERT (system (command) == 0);
+
+  /* Wait.  */
+  sleep (2);
+
+  /* The signal should not have arrived yet, because it is blocked.  */
+  ASSERT (sigint_occurred == 0);
+
+  /* Unblock SIGINT.  */
+  ASSERT (pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0);
+
+  /* The signal should have arrived now, because POSIX says
+       "If there are any pending unblocked signals after the call to
+        pthread_sigmask(), at least one of those signals shall be delivered
+        before the call to pthread_sigmask() returns."  */
+  ASSERT (sigint_occurred == 1);
+
+  return 0;
+}
+
+#else
+
+/* On native Windows, getpid() values and the arguments that are passed to
+   the (Cygwin?) 'kill' program are not necessarily related.  */
+
+int
+main ()
+{
+  fputs ("Skipping test: native Windows platform\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-pthread_sigmask2.c b/gnulib-tests/test-pthread_sigmask2.c
new file mode 100644 (file)
index 0000000..f57fc93
--- /dev/null
@@ -0,0 +1,105 @@
+/* Test of pthread_sigmask in a multi-threaded program.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011.  */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include <errno.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#if USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+static pthread_t main_thread;
+static pthread_t killer_thread;
+
+static void *
+killer_thread_func (void *arg)
+{
+  sleep (1);
+  pthread_kill (main_thread, SIGINT);
+  return NULL;
+}
+
+static volatile int sigint_occurred;
+
+static void
+sigint_handler (int sig)
+{
+  sigint_occurred++;
+}
+
+int
+main (int argc, char *argv[])
+{
+  sigset_t set;
+
+  signal (SIGINT, sigint_handler);
+
+  sigemptyset (&set);
+  sigaddset (&set, SIGINT);
+
+  /* Check error handling.  */
+  /* This call returns 0 on NetBSD 8.0.  */
+#if !defined __NetBSD__
+  ASSERT (pthread_sigmask (1729, &set, NULL) == EINVAL);
+#endif
+
+  /* Block SIGINT.  */
+  ASSERT (pthread_sigmask (SIG_BLOCK, &set, NULL) == 0);
+
+  /* Request a SIGINT signal from another thread.  */
+  main_thread = pthread_self ();
+  ASSERT (pthread_create (&killer_thread, NULL, killer_thread_func, NULL) == 0);
+
+  /* Wait.  */
+  sleep (2);
+
+  /* The signal should not have arrived yet, because it is blocked.  */
+  ASSERT (sigint_occurred == 0);
+
+  /* Unblock SIGINT.  */
+  ASSERT (pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0);
+
+  /* The signal should have arrived now, because POSIX says
+       "If there are any pending unblocked signals after the call to
+        pthread_sigmask(), at least one of those signals shall be delivered
+        before the call to pthread_sigmask() returns."  */
+  ASSERT (sigint_occurred == 1);
+
+  /* Clean up the thread.  This avoid a "ThreadSanitizer: thread leak" warning
+     from "gcc -fsanitize=thread".  */
+  ASSERT (pthread_join (killer_thread, NULL) == 0);
+
+  return 0;
+}
+
+#else
+
+int
+main ()
+{
+  fputs ("Skipping test: POSIX threads not enabled\n", stderr);
+  return 77;
+}
+
+#endif
index b350141..795e30f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of quotearg family of functions.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 177d2bc..065b54b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of quotearg family of functions.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1210ced..d7fe02b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test raising a signal.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
 #include <config.h>
 
 #include <signal.h>
+#include <unistd.h>
 
 #include "signature.h"
 SIGNATURE_CHECK (raise, int, (int));
@@ -31,7 +32,7 @@ SIGNATURE_CHECK (raise, int, (int));
 static _Noreturn void
 handler (int sig)
 {
-  exit (0);
+  _exit (0);
 }
 
 int
index 7e4fe10..f53f875 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2021 Free Software Foundation, Inc.
  * Written by Eric Blake and Bruno Haible
  *
  * This program is free software: you can redistribute it and/or modify
index 176b9be..e2ab9df 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of readlink.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 19f92c8..c95d889 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of readlink.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-realloc-gnu.c b/gnulib-tests/test-realloc-gnu.c
new file mode 100644 (file)
index 0000000..6f98be0
--- /dev/null
@@ -0,0 +1,49 @@
+/* Test of realloc function.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#include <stdint.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+  /* Check that realloc (NULL, 0) is not a NULL pointer.  */
+  void *volatile p = realloc (NULL, 0);
+  ASSERT (p != NULL);
+
+  /* Check that realloc (p, n) fails when p is non-null and n exceeds
+     PTRDIFF_MAX.  */
+  if (PTRDIFF_MAX < SIZE_MAX)
+    {
+      size_t one = argc != 12345;
+      p = realloc (p, PTRDIFF_MAX + one);
+      ASSERT (p == NULL);
+      /* Avoid a test failure due to glibc bug
+         <https://sourceware.org/bugzilla/show_bug.cgi?id=27870>.  */
+      if (!getenv ("MALLOC_CHECK_"))
+        ASSERT (errno == ENOMEM);
+    }
+
+  free (p);
+  return 0;
+}
diff --git a/gnulib-tests/test-reallocarray.c b/gnulib-tests/test-reallocarray.c
new file mode 100644 (file)
index 0000000..ff90962
--- /dev/null
@@ -0,0 +1,58 @@
+/* Test of reallocarray function.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+#include <stdint.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (reallocarray, void *, (void *, size_t, size_t));
+
+#include "macros.h"
+
+int
+main ()
+{
+  /* Check that reallocarray fails when requested to allocate a block
+     of memory larger than PTRDIFF_MAX or SIZE_MAX bytes.  */
+  for (size_t n = 2; n != 0; n <<= 1)
+    {
+      void *volatile p = NULL;
+
+      if (PTRDIFF_MAX / n + 1 <= SIZE_MAX)
+        {
+          p = reallocarray (p, PTRDIFF_MAX / n + 1, n);
+          ASSERT (p == NULL);
+          ASSERT (errno == ENOMEM);
+        }
+
+      p = reallocarray (p, SIZE_MAX / n + 1, n);
+      ASSERT (p == NULL);
+      ASSERT (errno == ENOMEM
+              || errno == EOVERFLOW /* NetBSD */);
+
+      /* Reallocarray should not crash with zero sizes.  */
+      p = reallocarray (p, 0, n);
+      p = reallocarray (p, n, 0);
+      free (p);
+    }
+
+  return 0;
+}
index a0aa112..ed4ca64 100644 (file)
@@ -1,5 +1,5 @@
 /* Test regular expressions
-   Copyright 1996-2001, 2003-2018 Free Software Foundation, Inc.
+   Copyright 1996-2001, 2003-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <locale.h>
 #include <limits.h>
+#include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <wctype.h>
 #if HAVE_DECL_ALARM
 # include <unistd.h>
 # include <signal.h>
 
 #include "localcharset.h"
 
+static int exit_status;
+
+static void
+report_error (char const *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  fprintf (stderr, "test-regex: ");
+  vfprintf (stderr, format, args);
+  fprintf (stderr, "\n");
+  va_end (args);
+  exit_status = 1;
+}
+
+/* Check whether it's really a UTF-8 locale.
+   On mingw, setlocale (LC_ALL, "en_US.UTF-8") succeeds but returns
+   "English_United States.1252", with locale_charset () returning "CP1252".  */
+static int
+really_utf8 (void)
+{
+  return strcmp (locale_charset (), "UTF-8") == 0;
+}
+
+/* Tests supposed to match; copied from glibc posix/bug-regex11.c.  */
+static struct
+{
+  const char *pattern;
+  const char *string;
+  int flags, nmatch;
+  regmatch_t rm[5];
+} const tests[] = {
+  /* Test for newline handling in regex.  */
+  { "[^~]*~", "\nx~y", 0, 2, { { 0, 3 }, { -1, -1 } } },
+  /* Other tests.  */
+  { "a(.*)b", "a b", REG_EXTENDED, 2, { { 0, 3 }, { 1, 2 } } },
+  { ".*|\\([KIO]\\)\\([^|]*\\).*|?[KIO]", "10~.~|P|K0|I10|O16|?KSb", 0, 3,
+    { { 0, 21 }, { 15, 16 }, { 16, 18 } } },
+  { ".*|\\([KIO]\\)\\([^|]*\\).*|?\\1", "10~.~|P|K0|I10|O16|?KSb", 0, 3,
+    { { 0, 21 }, { 8, 9 }, { 9, 10 } } },
+  { "^\\(a*\\)\\1\\{9\\}\\(a\\{0,9\\}\\)\\([0-9]*;.*[^a]\\2\\([0-9]\\)\\)",
+    "a1;;0a1aa2aaa3aaaa4aaaaa5aaaaaa6aaaaaaa7aaaaaaaa8aaaaaaaaa9aa2aa1a0", 0,
+    5, { { 0, 67 }, { 0, 0 }, { 0, 1 }, { 1, 67 }, { 66, 67 } } },
+  /* Test for BRE expression anchoring.  POSIX says just that this may match;
+     in glibc regex it always matched, so avoid changing it.  */
+  { "\\(^\\|foo\\)bar", "bar", 0, 2, { { 0, 3 }, { -1, -1 } } },
+  { "\\(foo\\|^\\)bar", "bar", 0, 2, { { 0, 3 }, { -1, -1 } } },
+  /* In ERE this must be treated as an anchor.  */
+  { "(^|foo)bar", "bar", REG_EXTENDED, 2, { { 0, 3 }, { -1, -1 } } },
+  { "(foo|^)bar", "bar", REG_EXTENDED, 2, { { 0, 3 }, { -1, -1 } } },
+  /* Here ^ cannot be treated as an anchor according to POSIX.  */
+  { "(^|foo)bar", "(^|foo)bar", 0, 2, { { 0, 10 }, { -1, -1 } } },
+  { "(foo|^)bar", "(foo|^)bar", 0, 2, { { 0, 10 }, { -1, -1 } } },
+  /* More tests on backreferences.  */
+  { "()\\1", "x", REG_EXTENDED, 2, { { 0, 0 }, { 0, 0 } } },
+  { "()x\\1", "x", REG_EXTENDED, 2, { { 0, 1 }, { 0, 0 } } },
+  { "()\\1*\\1*", "", REG_EXTENDED, 2, { { 0, 0 }, { 0, 0 } } },
+  { "([0-9]).*\\1(a*)", "7;7a6", REG_EXTENDED, 3, { { 0, 4 }, { 0, 1 }, { 3, 4 } } },
+  { "([0-9]).*\\1(a*)", "7;7a", REG_EXTENDED, 3, { { 0, 4 }, { 0, 1 }, { 3, 4 } } },
+  { "(b)()c\\1", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 1 }, { 1, 1 } } },
+  { "()(b)c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
+  { "a(b)()c\\1", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 2 }, { 2, 2 } } },
+  { "a()(b)c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
+  { "()(b)\\1c\\2", "bcb", REG_EXTENDED, 3, { { 0, 3 }, { 0, 0 }, { 0, 1 } } },
+  { "(b())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 2 }, { 0, 1 }, { 1, 1 } } },
+  { "a()(b)\\1c\\2", "abcb", REG_EXTENDED, 3, { { 0, 4 }, { 1, 1 }, { 1, 2 } } },
+  { "a()d(b)\\1c\\2", "adbcb", REG_EXTENDED, 3, { { 0, 5 }, { 1, 1 }, { 2, 3 } } },
+  { "a(b())\\2\\1", "abbbb", REG_EXTENDED, 3, { { 0, 3 }, { 1, 2 }, { 2, 2 } } },
+  { "(bb())\\2\\1", "bbbb", REG_EXTENDED, 3, { { 0, 4 }, { 0, 2 }, { 2, 2 } } },
+  { "^([^,]*),\\1,\\1$", "a,a,a", REG_EXTENDED, 2, { { 0, 5 }, { 0, 1 } } },
+  { "^([^,]*),\\1,\\1$", "ab,ab,ab", REG_EXTENDED, 2, { { 0, 8 }, { 0, 2 } } },
+  { "^([^,]*),\\1,\\1,\\1$", "abc,abc,abc,abc", REG_EXTENDED, 2,
+    { { 0, 15 }, { 0, 3 } } },
+  { "^(.?)(.?)(.?)(.?)(.?).?\\5\\4\\3\\2\\1$",
+    "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
+  { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
+    "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
+  { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
+    "abcdedcba", REG_EXTENDED, 1, { { 0, 9 } } },
+  { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$|^.?$",
+    "ababababa", REG_EXTENDED, 1, { { 0, 9 } } },
+  { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
+    "level", REG_NOSUB | REG_EXTENDED, 0, { { -1, -1 } } },
+  { "^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\\9\\8\\7\\6\\5\\4\\3\\2\\1$",
+    "ababababa", REG_EXTENDED, 1, { { 0, 9 } } },
+  /* Test for *+ match.  */
+  { "^a*+(.)", "ab", REG_EXTENDED, 2, { { 0, 2 }, { 1, 2 } } },
+  /* Test for ** match.  */
+  { "^(a*)*(.)", "ab", REG_EXTENDED, 3, { { 0, 2 }, { 0, 1 }, { 1, 2 } } },
+};
+
+static void
+bug_regex11 (void)
+{
+  regex_t re;
+  regmatch_t rm[5];
+  size_t i;
+  int n;
+
+  for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+    {
+      n = regcomp (&re, tests[i].pattern, tests[i].flags);
+      if (n != 0)
+       {
+         char buf[500];
+         regerror (n, &re, buf, sizeof (buf));
+         report_error ("%s: regcomp %zd failed: %s", tests[i].pattern, i, buf);
+         continue;
+       }
+
+      if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
+       {
+         report_error ("%s: regexec %zd failed", tests[i].pattern, i);
+         regfree (&re);
+         continue;
+       }
+
+      for (n = 0; n < tests[i].nmatch; ++n)
+       if (rm[n].rm_so != tests[i].rm[n].rm_so
+              || rm[n].rm_eo != tests[i].rm[n].rm_eo)
+         {
+           if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+             break;
+           report_error ("%s: regexec %zd match failure rm[%d] %d..%d",
+                          tests[i].pattern, i, n,
+                          (int) rm[n].rm_so, (int) rm[n].rm_eo);
+           break;
+         }
+
+      regfree (&re);
+    }
+}
+
 int
 main (void)
 {
-  int result = 0;
   static struct re_pattern_buffer regex;
   unsigned char folded_chars[UCHAR_MAX + 1];
   int i;
@@ -40,11 +174,15 @@ main (void)
   struct re_registers regs;
 
 #if HAVE_DECL_ALARM
-  /* Some builds of glibc go into an infinite loop on this test.  */
-  int alarm_value = 2;
+  /* In case a bug causes glibc to go into an infinite loop.
+     The tests should take less than 10 s on a reasonably modern CPU.  */
+  int alarm_value = 1000;
   signal (SIGALRM, SIG_DFL);
   alarm (alarm_value);
 #endif
+
+  bug_regex11 ();
+
   if (setlocale (LC_ALL, "en_US.UTF-8"))
     {
       {
@@ -61,25 +199,22 @@ main (void)
         memset (&regex, 0, sizeof regex);
         s = re_compile_pattern (pat, sizeof pat - 1, &regex);
         if (s)
-          result |= 1;
+          report_error ("%s: %s", pat, s);
         else
           {
             memset (&regs, 0, sizeof regs);
-            if (re_search (&regex, data, sizeof data - 1,
-                           0, sizeof data - 1, &regs)
-                != -1)
-              result |= 1;
+            i = re_search (&regex, data, sizeof data - 1,
+                           0, sizeof data - 1, &regs);
+            if (i != -1)
+              report_error ("re_search '%s' on '%s' returned %d",
+                            pat, data, i);
             regfree (&regex);
             free (regs.start);
             free (regs.end);
           }
       }
 
-      /* Check whether it's really a UTF-8 locale.
-         On mingw, the setlocale call succeeds but returns
-         "English_United States.1252", with locale_charset() returning
-         "CP1252".  */
-      if (strcmp (locale_charset (), "UTF-8") == 0)
+      if (really_utf8 ())
         {
           /* This test is from glibc bug 15078.
              The test case is from Andreas Schwab in
@@ -101,14 +236,15 @@ main (void)
           memset (&regex, 0, sizeof regex);
           s = re_compile_pattern (pat, sizeof pat - 1, &regex);
           if (s)
-            result |= 1;
+            report_error ("%s: %s", pat, s);
           else
             {
               memset (&regs, 0, sizeof regs);
               i = re_search (&regex, data, sizeof data - 1,
                              0, sizeof data - 1, 0);
               if (i != 0 && i != 21)
-                result |= 1;
+                report_error ("re_search '%s' on '%s' returned %d",
+                              pat, data, i);
               regfree (&regex);
               free (regs.start);
               free (regs.end);
@@ -116,21 +252,65 @@ main (void)
         }
 
       if (! setlocale (LC_ALL, "C"))
-        return 1;
+        {
+          report_error ("setlocale \"C\" failed");
+          return exit_status;
+        }
+    }
+
+  if (setlocale (LC_ALL, "tr_TR.UTF-8"))
+    {
+      if (really_utf8 () && towupper (L'i') == 0x0130 /* U+0130; see below.  */)
+        {
+          re_set_syntax (RE_SYNTAX_GREP | RE_ICASE);
+          memset (&regex, 0, sizeof regex);
+          static char const pat[] = "i";
+          s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+          if (s)
+            report_error ("%s: %s", pat, s);
+          else
+            {
+              /* UTF-8 encoding of U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE.
+                 In Turkish, this is the upper-case equivalent of ASCII "i".
+                 Older versions of Gnulib failed to match "i" to U+0130 when
+                 ignoring case in Turkish <https://bugs.gnu.org/43577>.  */
+              static char const data[] = "\xc4\xb0";
+
+              memset (&regs, 0, sizeof regs);
+              i = re_search (&regex, data, sizeof data - 1, 0, sizeof data - 1,
+                             &regs);
+              if (i != 0)
+                report_error ("re_search '%s' on '%s' returned %d",
+                              pat, data, i);
+              regfree (&regex);
+              free (regs.start);
+              free (regs.end);
+            }
+        }
+
+      if (! setlocale (LC_ALL, "C"))
+        {
+          report_error ("setlocale \"C\" failed");
+          return exit_status;
+        }
     }
 
   /* This test is from glibc bug 3957, reported by Andrew Mackey.  */
   re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("a[^x]b", 6, &regex);
+  static char const pat_3957[] = "a[^x]b";
+  s = re_compile_pattern (pat_3957, sizeof pat_3957 - 1, &regex);
   if (s)
-    result |= 2;
-  /* This should fail, but succeeds for glibc-2.5.  */
+    report_error ("%s: %s", pat_3957, s);
   else
     {
+      /* This should fail, but succeeds for glibc-2.5.  */
       memset (&regs, 0, sizeof regs);
-      if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
-        result |= 2;
+      static char const data[] = "a\nb";
+      i = re_search (&regex, data, sizeof data - 1, 0, sizeof data - 1, &regs);
+      if (i != -1)
+        report_error ("re_search '%s' on '%s' returned %d",
+                      pat_3957, data, i);
       regfree (&regex);
       free (regs.start);
       free (regs.end);
@@ -143,11 +323,12 @@ main (void)
   for (i = 0; i <= UCHAR_MAX; i++)
     folded_chars[i] = i;
   regex.translate = folded_chars;
-  s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+  static char const pat75[] = "a[[:@:>@:]]b\n";
+  s = re_compile_pattern (pat75, sizeof pat75 - 1, &regex);
   /* This should fail with _Invalid character class name_ error.  */
   if (!s)
     {
-      result |= 4;
+      report_error ("re_compile_pattern: failed to reject '%s'", pat75);
       regfree (&regex);
     }
 
@@ -155,48 +336,57 @@ main (void)
      using RE_NO_EMPTY_RANGES. */
   re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("a[b-a]", 6, &regex);
+  static char const pat_b_a[] = "a[b-a]";
+  s = re_compile_pattern (pat_b_a, sizeof pat_b_a - 1, &regex);
   if (s == 0)
     {
-      result |= 8;
+      report_error ("re_compile_pattern: failed to reject '%s'", pat_b_a);
       regfree (&regex);
     }
 
   /* This should succeed, but does not for glibc-2.1.3.  */
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("{1", 2, &regex);
+  static char const pat_213[] = "{1";
+  s = re_compile_pattern (pat_213, sizeof pat_213 - 1, &regex);
   if (s)
-    result |= 8;
+    report_error ("%s: %s", pat_213, s);
   else
     regfree (&regex);
 
   /* The following example is derived from a problem report
      against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("[an\371]*n", 7, &regex);
+  static char const pat_stolfi[] = "[an\371]*n";
+  s = re_compile_pattern (pat_stolfi, sizeof pat_stolfi - 1, &regex);
   if (s)
-    result |= 8;
+    report_error ("%s: %s", pat_stolfi, s);
   /* This should match, but does not for glibc-2.2.1.  */
   else
     {
       memset (&regs, 0, sizeof regs);
-      if (re_match (&regex, "an", 2, 0, &regs) != 2)
-        result |= 8;
+      static char const data[] = "an";
+      i = re_match (&regex, data, sizeof data - 1, 0, &regs);
+      if (i != 2)
+        report_error ("re_match '%s' on '%s' at 2 returned %d",
+                      pat_stolfi, data, i);
       regfree (&regex);
       free (regs.start);
       free (regs.end);
     }
 
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("x", 1, &regex);
+  static char const pat_x[] = "x";
+  s = re_compile_pattern (pat_x, sizeof pat_x - 1, &regex);
   if (s)
-    result |= 8;
+    report_error ("%s: %s", pat_x, s);
   /* glibc-2.2.93 does not work with a negative RANGE argument.  */
   else
     {
       memset (&regs, 0, sizeof regs);
-      if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
-        result |= 8;
+      static char const data[] = "wxy";
+      i = re_search (&regex, data, sizeof data - 1, 2, -2, &regs);
+      if (i != 1)
+        report_error ("re_search '%s' on '%s' returned %d", pat_x, data, i);
       regfree (&regex);
       free (regs.start);
       free (regs.end);
@@ -206,14 +396,45 @@ main (void)
      ignored RE_ICASE.  Detect that problem too.  */
   re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("x", 1, &regex);
+  s = re_compile_pattern (pat_x, 1, &regex);
   if (s)
-    result |= 16;
+    report_error ("%s: %s", pat_x, s);
   else
     {
       memset (&regs, 0, sizeof regs);
-      if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
-        result |= 16;
+      static char const data[] = "WXY";
+      i = re_search (&regex, data, sizeof data - 1, 0, 3, &regs);
+      if (i < 0)
+        report_error ("re_search '%s' on '%s' returned %d", pat_x, data, i);
+      regfree (&regex);
+      free (regs.start);
+      free (regs.end);
+    }
+
+  /* glibc bug 11053.  */
+  re_set_syntax (RE_SYNTAX_POSIX_BASIC);
+  memset (&regex, 0, sizeof regex);
+  static char const pat_sub2[] = "\\(a*\\)*a*\\1";
+  s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
+  if (s)
+    report_error ("%s: %s", pat_sub2, s);
+  else
+    {
+      memset (&regs, 0, sizeof regs);
+      static char const data[] = "a";
+      int datalen = sizeof data - 1;
+      i = re_search (&regex, data, datalen, 0, datalen, &regs);
+      if (i != 0)
+        report_error ("re_search '%s' on '%s' returned %d", pat_sub2, data, i);
+      else if (regs.num_regs < 2)
+        report_error ("re_search '%s' on '%s' returned only %d registers",
+                      pat_sub2, data, (int) regs.num_regs);
+      else if (! (regs.start[0] == 0 && regs.end[0] == 1))
+        report_error ("re_search '%s' on '%s' returned wrong match [%d,%d)",
+                      pat_sub2, data, (int) regs.start[0], (int) regs.end[0]);
+      else if (! (regs.start[1] == 0 && regs.end[1] == 0))
+        report_error ("re_search '%s' on '%s' returned wrong submatch [%d,%d)",
+                      pat_sub2, data, (int) regs.start[1], (int) regs.end[1]);
       regfree (&regex);
       free (regs.start);
       free (regs.end);
@@ -225,17 +446,17 @@ main (void)
   re_set_syntax (RE_SYNTAX_POSIX_BASIC
                  & ~RE_CONTEXT_INVALID_DUP
                  & ~RE_NO_EMPTY_RANGES);
-  memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+  static char const pat_shelton[] = "[[:alnum:]_-]\\\\+$";
+  s = re_compile_pattern (pat_shelton, sizeof pat_shelton - 1, &regex);
   if (s)
-    result |= 32;
+    report_error ("%s: %s", pat_shelton, s);
   else
     regfree (&regex);
 
   /* REG_STARTEND was added to glibc on 2004-01-15.
      Reject older versions.  */
-  if (! REG_STARTEND)
-    result |= 64;
+  if (REG_STARTEND == 0)
+    report_error ("REG_STARTEND is zero");
 
   /* Matching with the compiled form of this regexp would provoke
      an assertion failure prior to glibc-2.28:
@@ -244,9 +465,12 @@ main (void)
      back reference.  */
   re_set_syntax (RE_SYNTAX_POSIX_EGREP);
   memset (&regex, 0, sizeof regex);
-  s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
-  if (!s || strcmp (s, "Invalid back reference"))
-    result |= 64;
+  static char const pat_badback[] = "0|()0|\\1|0";
+  s = re_compile_pattern (pat_badback, sizeof pat_badback, &regex);
+  if (!s && re_search (&regex, "x", 1, 0, 1, &regs) != -1)
+    s = "mishandled invalid back reference";
+  if (s && strcmp (s, "Invalid back reference") != 0)
+    report_error ("%s: %s", pat_badback, s);
 
 #if 0
   /* It would be nice to reject hosts whose regoff_t values are too
@@ -257,8 +481,8 @@ main (void)
      when compiling --without-included-regex.   */
   if (sizeof (regoff_t) < sizeof (ptrdiff_t)
       || sizeof (regoff_t) < sizeof (ssize_t))
-    result |= 64;
+    report_error ("regoff_t values are too narrow");
 #endif
 
-  return result;
+  return exit_status;
 }
diff --git a/gnulib-tests/test-sched.c b/gnulib-tests/test-sched.c
new file mode 100644 (file)
index 0000000..f3c4195
--- /dev/null
@@ -0,0 +1,41 @@
+/* Test of <sched.h> substitute.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008.  */
+
+#include <config.h>
+
+#include <sched.h>
+
+/* Check that 'struct sched_param' is defined.  */
+static struct sched_param a;
+
+/* Check that the SCHED_* macros are defined and compile-time constants.  */
+int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+
+/* Check that the types are all defined.  */
+pid_t t1;
+
+static int f1;
+
+int
+main ()
+{
+  /* Check fields of 'struct sched_param'.  */
+  f1 = a.sched_priority;
+
+  return 0;
+}
index 3c1cb98..229e821 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading or writing from a given file descriptor.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 44f5dbb..68176d3 100755 (executable)
@@ -12,25 +12,25 @@ tmpfiles="$tmpfiles t-select-in.tmp"
 # Regular files.
 
 rm -f t-select-in.tmp
-./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT}
+${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT}
 test `cat t-select-in.tmp` = "1" || exit 1
 
 # Pipes.
 
 rm -f t-select-in.tmp
 { sleep 1; echo abc; } | \
-  { ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; }
+  { ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; cat > /dev/null; }
 test `cat t-select-in.tmp` = "0" || exit 1
 
 rm -f t-select-in.tmp
-echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
+echo abc | { sleep 1; ${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
 test `cat t-select-in.tmp` = "1" || exit 1
 
 # Special files.
 # This part of the test is known to fail on Solaris 2.6 and older.
 
 rm -f t-select-in.tmp
-./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null
+${CHECKER} ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null
 test `cat t-select-in.tmp` = "1" || exit 1
 
 rm -fr $tmpfiles
index c5fd861..dbeace5 100755 (executable)
@@ -9,25 +9,25 @@ tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp"
 # Regular files.
 
 rm -f t-select-out.tmp
-./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out
+${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > t-select-out.out
 test `cat t-select-out.tmp` = "1" || exit 1
 
 # Pipes.
 
 if false; then # This test fails on some platforms.
   rm -f t-select-out.tmp
-  ( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
+  ( { echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
   test `cat t-select-out.tmp` = "0" || exit 1
 fi
 
 rm -f t-select-out.tmp
-( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null
+( { sleep 1; echo abc; ${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null
 test `cat t-select-out.tmp` = "1" || exit 1
 
 # Special files.
 
 rm -f t-select-out.tmp
-./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null
+${CHECKER} ./test-select-fd${EXEEXT} w 1 t-select-out.tmp > /dev/null
 test `cat t-select-out.tmp` = "1" || exit 1
 
 rm -fr $tmpfiles
index f8d7617..26ca8a8 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of select() substitute, reading from stdin.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 00e4fb6..a4ff8d1 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b0f17f3..6348a49 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of select() substitute.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ded124d..034a7d2 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of setenv.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-setlocale1.c b/gnulib-tests/test-setlocale1.c
deleted file mode 100644 (file)
index a9bb3a0..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Test of setting the current locale.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include <locale.h>
-
-#include "signature.h"
-SIGNATURE_CHECK (setlocale, char *, (int, const char *));
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "macros.h"
-
-int
-main (int argc, char *argv[])
-{
-  char *name1;
-  char *name2;
-
-  /* Try to set the locale by implicitly looking at the LC_ALL environment
-     variable.
-     configure should already have checked that the locale is supported.  */
-  if (setlocale (LC_ALL, "") == NULL)
-    return 1;
-
-  name1 = strdup (setlocale (LC_ALL, NULL));
-
-  /* Reset the locale.  */
-  if (setlocale (LC_ALL, "C") == NULL)
-    return 1;
-
-  /* Try to set the locale by explicitly looking at the LC_ALL environment
-     variable.
-     configure should already have checked that the locale is supported.  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL)
-    return 1;
-
-  name2 = strdup (setlocale (LC_ALL, NULL));
-
-  /* Test that the two results are the same.  */
-  ASSERT (strcmp (name1, name2) == 0);
-  free (name1);
-  free (name2);
-
-  return 0;
-}
diff --git a/gnulib-tests/test-setlocale1.sh b/gnulib-tests/test-setlocale1.sh
deleted file mode 100755 (executable)
index 59a0532..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-: ${LOCALE_FR=fr_FR}
-: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-: ${LOCALE_JA=ja_JP}
-: ${LOCALE_ZH_CN=zh_CN.GB18030}
-
-if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \
-   && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then
-  if test -f /usr/bin/localedef; then
-    echo "Skipping test: no locale for testing is installed"
-  else
-    echo "Skipping test: no locale for testing is supported"
-  fi
-  exit 77
-fi
-
-if test $LOCALE_FR != none; then
-  LC_ALL=$LOCALE_FR      ./test-setlocale1${EXEEXT} || exit 1
-fi
-
-if test $LOCALE_FR_UTF8 != none; then
-  LC_ALL=$LOCALE_FR_UTF8 ./test-setlocale1${EXEEXT} || exit 1
-fi
-
-if test $LOCALE_JA != none; then
-  LC_ALL=$LOCALE_JA      ./test-setlocale1${EXEEXT} || exit 1
-fi
-
-if test $LOCALE_ZH_CN != none; then
-  LC_ALL=$LOCALE_ZH_CN   ./test-setlocale1${EXEEXT} || exit 1
-fi
-
-exit 0
diff --git a/gnulib-tests/test-setlocale2.c b/gnulib-tests/test-setlocale2.c
deleted file mode 100644 (file)
index 780e1ea..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Test of setting the current locale.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include <locale.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int
-main ()
-{
-  /* Try to set the locale by implicitly looking at the LC_ALL environment
-     variable.  */
-  if (setlocale (LC_ALL, "") != NULL)
-    /* It was successful.  Check whether LC_CTYPE is non-trivial.  */
-    if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-      {
-        fprintf (stderr, "setlocale did not fail for implicit %s\n",
-                 getenv ("LC_ALL"));
-        return 1;
-      }
-
-  /* Reset the locale.  */
-  if (setlocale (LC_ALL, "C") == NULL)
-    return 1;
-
-  /* Try to set the locale by explicitly looking at the LC_ALL environment
-     variable.  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) != NULL)
-    /* It was successful.  Check whether LC_CTYPE is non-trivial.  */
-    if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-      {
-        fprintf (stderr, "setlocale did not fail for explicit %s\n",
-                 getenv ("LC_ALL"));
-        return 1;
-      }
-
-  return 0;
-}
diff --git a/gnulib-tests/test-setlocale2.sh b/gnulib-tests/test-setlocale2.sh
deleted file mode 100755 (executable)
index f772cb0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-# Test locale names with likely unsupported encoding in Unix syntax.
-for name in ar_SA.ISO-8859-1 fr_FR.CP1251 zh_TW.GB18030 zh_CN.BIG5; do
-  env LC_ALL=$name ./test-setlocale2${EXEEXT} 1 || exit 1
-done
-
-# Test locale names with likely unsupported encoding in native Windows syntax.
-for name in "Arabic_Saudi Arabia.1252" "Arabic_Saudi Arabia.65001" \
-            French_France.65001 Japanese_Japan.65001 Turkish_Turkey.65001 \
-            Chinese_Taiwan.65001 Chinese_China.54936 Chinese_China.65001; do
-  # Here we use 'env' to set the LC_ALL environment variable, because on
-  # Solaris 11.0, the /bin/sh refuses to do it for Turkish_Turkey.65001.
-  env LC_ALL="$name" ./test-setlocale2${EXEEXT} 1 || exit 1
-done
-
-exit 0
diff --git a/gnulib-tests/test-setlocale_null-mt-all.c b/gnulib-tests/test-setlocale_null-mt-all.c
new file mode 100644 (file)
index 0000000..f733036
--- /dev/null
@@ -0,0 +1,172 @@
+/* Multithread-safety test for setlocale_null_r (LC_ALL, ...).
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Work around GCC bug 44511.  */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wreturn-type"
+#endif
+
+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+
+/* Specification.  */
+#include <locale.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "glthread/thread.h"
+
+/* We want to use the system's setlocale() function here, not the gnulib
+   override.  */
+#undef setlocale
+
+
+/* Some common locale names.  */
+
+#if defined _WIN32 && !defined __CYGWIN__
+# define ENGLISH "English_United States"
+# define GERMAN  "German_Germany"
+# define FRENCH  "French_France"
+# define ENCODING ".1252"
+#else
+# define ENGLISH "en_US"
+# define GERMAN  "de_DE"
+# define FRENCH  "fr_FR"
+# if defined __sgi
+#  define ENCODING ".ISO8859-15"
+# elif defined __hpux
+#  define ENCODING ".utf8"
+# else
+#  define ENCODING ".UTF-8"
+# endif
+#endif
+
+static const char LOCALE1[] = ENGLISH ENCODING;
+static const char LOCALE2[] = GERMAN ENCODING;
+static const char LOCALE3[] = FRENCH ENCODING;
+
+static char *expected;
+
+static void *
+thread1_func (void *arg)
+{
+  for (;;)
+    {
+      char buf[SETLOCALE_NULL_ALL_MAX];
+
+      if (setlocale_null_r (LC_ALL, buf, sizeof (buf)))
+        abort ();
+      if (strcmp (expected, buf) != 0)
+        {
+          fprintf (stderr, "thread1 disturbed by thread2!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static void *
+thread2_func (void *arg)
+{
+  for (;;)
+    {
+      char buf[SETLOCALE_NULL_ALL_MAX];
+
+      setlocale_null_r (LC_NUMERIC, buf, sizeof (buf));
+      setlocale_null_r (LC_ALL, buf, sizeof (buf));
+    }
+
+  /*NOTREACHED*/
+}
+
+int
+main (int argc, char *argv[])
+{
+  if (setlocale (LC_ALL, LOCALE1) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE1 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_NUMERIC, LOCALE2) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE2 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_TIME, LOCALE3) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE3 not recognized\n");
+      return 77;
+    }
+
+  expected = strdup (setlocale (LC_ALL, NULL));
+
+  /* Create the two threads.  */
+  gl_thread_create (thread1_func, NULL);
+  gl_thread_create (thread2_func, NULL);
+
+  /* Let them run for 5 seconds.  */
+  {
+    struct timespec duration;
+    duration.tv_sec = 5;
+    duration.tv_nsec = 0;
+
+    nanosleep (&duration, NULL);
+  }
+
+  return 0;
+}
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif
+
+/* Without locking, the results of this test would be:
+glibc                OK
+musl libc            crash < 10 sec
+macOS                crash < 1 sec
+FreeBSD              crash < 1 sec
+NetBSD               crash < 2 sec
+OpenBSD              crash < 1 sec
+AIX                  crash < 2 sec
+HP-UX                OK
+IRIX                 OK
+Solaris 10           OK
+Solaris 11.0         OK
+Solaris 11.4         OK
+Solaris OpenIndiana  OK
+Haiku                crash < 1 sec
+Cygwin               crash < 1 sec
+mingw                OK
+MSVC                 OK (assuming compiler option /MD !)
+*/
diff --git a/gnulib-tests/test-setlocale_null-mt-one.c b/gnulib-tests/test-setlocale_null-mt-one.c
new file mode 100644 (file)
index 0000000..5f9b85b
--- /dev/null
@@ -0,0 +1,172 @@
+/* Multithread-safety test for setlocale_null_r (LC_xxx, ...).
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Work around GCC bug 44511.  */
+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__)
+# pragma GCC diagnostic ignored "-Wreturn-type"
+#endif
+
+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+
+/* Specification.  */
+#include <locale.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#include "glthread/thread.h"
+
+/* We want to use the system's setlocale() function here, not the gnulib
+   override.  */
+#undef setlocale
+
+
+/* Some common locale names.  */
+
+#if defined _WIN32 && !defined __CYGWIN__
+# define ENGLISH "English_United States"
+# define GERMAN  "German_Germany"
+# define FRENCH  "French_France"
+# define ENCODING ".1252"
+#else
+# define ENGLISH "en_US"
+# define GERMAN  "de_DE"
+# define FRENCH  "fr_FR"
+# if defined __sgi
+#  define ENCODING ".ISO8859-15"
+# elif defined __hpux
+#  define ENCODING ".utf8"
+# else
+#  define ENCODING ".UTF-8"
+# endif
+#endif
+
+static const char LOCALE1[] = ENGLISH ENCODING;
+static const char LOCALE2[] = GERMAN ENCODING;
+static const char LOCALE3[] = FRENCH ENCODING;
+
+static char *expected;
+
+static void *
+thread1_func (void *arg)
+{
+  for (;;)
+    {
+      char buf[SETLOCALE_NULL_MAX];
+
+      if (setlocale_null_r (LC_NUMERIC, buf, sizeof (buf)))
+        abort ();
+      if (strcmp (expected, buf) != 0)
+        {
+          fprintf (stderr, "thread1 disturbed by thread2!\n"); fflush (stderr);
+          abort ();
+        }
+    }
+
+  /*NOTREACHED*/
+}
+
+static void *
+thread2_func (void *arg)
+{
+  for (;;)
+    {
+      char buf[SETLOCALE_NULL_MAX];
+
+      setlocale_null_r (LC_NUMERIC, buf, sizeof (buf));
+      setlocale_null_r (LC_TIME, buf, sizeof (buf));
+    }
+
+  /*NOTREACHED*/
+}
+
+int
+main (int argc, char *argv[])
+{
+  if (setlocale (LC_ALL, LOCALE1) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE1 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_NUMERIC, LOCALE2) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE2 not recognized\n");
+      return 77;
+    }
+  if (setlocale (LC_TIME, LOCALE3) == NULL)
+    {
+      fprintf (stderr, "Skipping test: LOCALE3 not recognized\n");
+      return 77;
+    }
+
+  expected = strdup (setlocale (LC_NUMERIC, NULL));
+
+  /* Create the two threads.  */
+  gl_thread_create (thread1_func, NULL);
+  gl_thread_create (thread2_func, NULL);
+
+  /* Let them run for 2 seconds.  */
+  {
+    struct timespec duration;
+    duration.tv_sec = 2;
+    duration.tv_nsec = 0;
+
+    nanosleep (&duration, NULL);
+  }
+
+  return 0;
+}
+
+#else
+
+/* No multithreading available.  */
+
+#include <stdio.h>
+
+int
+main ()
+{
+  fputs ("Skipping test: multithreading not enabled\n", stderr);
+  return 77;
+}
+
+#endif
+
+/* Without locking, the results of this test would be:
+glibc                OK
+musl libc            OK
+macOS                OK
+FreeBSD              OK
+NetBSD               OK
+OpenBSD              crash < 1 sec
+AIX                  crash < 2 sec
+HP-UX                OK
+IRIX                 OK
+Solaris 10           OK
+Solaris 11.0         OK
+Solaris 11.4         OK
+Solaris OpenIndiana  OK
+Haiku                OK
+Cygwin               OK
+mingw                OK
+MSVC                 OK (assuming compiler option /MD !)
+*/
diff --git a/gnulib-tests/test-setlocale_null.c b/gnulib-tests/test-setlocale_null.c
new file mode 100644 (file)
index 0000000..ebe0d36
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test of setlocale_null_r function.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <locale.h>
+
+/* Check that SETLOCALE_NULL_ALL_MAX is a constant expression.  */
+static char buf[SETLOCALE_NULL_ALL_MAX];
+
+int
+main ()
+{
+  /* Check that setlocale_null_r() can be used with $(LIB_SETLOCALE_NULL).  */
+  return setlocale_null_r (LC_ALL, buf, sizeof (buf)) != 0;
+}
index 22a444f..09ae1aa 100644 (file)
@@ -1,5 +1,5 @@
 /* Test setsockopt() function.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 33beae3..09f8992 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sh-quote module.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -172,7 +172,7 @@ main (void)
 
   /* Check the shell_quote_argv function.  */
   {
-    char *argv[1];
+    const char *argv[1];
     char *result;
     argv[0] = NULL;
     result = shell_quote_argv (argv);
@@ -180,19 +180,19 @@ main (void)
     free (result);
   }
   {
-    char *argv[2];
+    const char *argv[2];
     char *result;
-    argv[0] = (char *) "foo bar/baz";
+    argv[0] = "foo bar/baz";
     argv[1] = NULL;
     result = shell_quote_argv (argv);
     ASSERT (strcmp (result, "'foo bar/baz'") == 0); /* or "\"foo bar/baz\"" */
     free (result);
   }
   {
-    char *argv[3];
+    const char *argv[3];
     char *result;
-    argv[0] = (char *) "foo bar/baz";
-    argv[1] = (char *) "$";
+    argv[0] = "foo bar/baz";
+    argv[1] = "$";
     argv[2] = NULL;
     result = shell_quote_argv (argv);
     ASSERT (strcmp (result, "'foo bar/baz' '$'") == 0); /* or "\"foo bar/baz\" \"\\$\"" */
index e0ef06c..fc4a45c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sigaction() function.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 0ee5146..b9d5176 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <signal.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 7b09bb1..bf000d7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sigprocmask.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sigsegv-catch-segv1.c b/gnulib-tests/test-sigsegv-catch-segv1.c
new file mode 100644 (file)
index 0000000..68f65c5
--- /dev/null
@@ -0,0 +1,130 @@
+/* Test that the handler is called, with the right fault address.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sigsegv.h"
+
+#include <stdint.h>
+#include <stdio.h>
+
+#if HAVE_SIGSEGV_RECOVERY
+
+# include "mmap-anon-util.h"
+# include <stdlib.h>
+
+# if SIGSEGV_FAULT_ADDRESS_ALIGNMENT > 1UL
+#  include <unistd.h>
+#  define SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS (getpagesize () - 1)
+# else
+#  define SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS 0
+# endif
+
+uintptr_t page;
+
+volatile int handler_called = 0;
+
+int
+handler (void *fault_address, int serious)
+{
+  handler_called++;
+  if (handler_called > 10)
+    abort ();
+  if (fault_address
+      != (void *)((page + 0x678) & ~SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS))
+    abort ();
+  if (mprotect ((void *) page, 0x4000, PROT_READ_WRITE) == 0)
+    return 1;
+  return 0;
+}
+
+void
+crasher (uintptr_t p)
+{
+  *(volatile int *) (p + 0x678) = 42;
+}
+
+int
+main ()
+{
+  int prot_unwritable;
+  void *p;
+
+  /* Preparations.  */
+# if !HAVE_MAP_ANONYMOUS
+  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+# endif
+
+# if defined __linux__ && defined __sparc__
+  /* On Linux 2.6.26/SPARC64, PROT_READ has the same effect as
+     PROT_READ | PROT_WRITE.  */
+  prot_unwritable = PROT_NONE;
+# else
+  prot_unwritable = PROT_READ;
+# endif
+
+  /* Setup some mmaped memory.  */
+  p = mmap_zeromap ((void *) 0x12340000, 0x4000);
+  if (p == (void *)(-1))
+    {
+      fprintf (stderr, "mmap_zeromap failed.\n");
+      exit (2);
+    }
+  page = (uintptr_t) p;
+
+  /* Make it read-only.  */
+  if (mprotect ((void *) page, 0x4000, prot_unwritable) < 0)
+    {
+      fprintf (stderr, "mprotect failed.\n");
+      exit (2);
+    }
+  /* Test whether it's possible to make it read-write after it was read-only.
+     This is not possible on Cygwin.  */
+  if (mprotect ((void *) page, 0x4000, PROT_READ_WRITE) < 0
+      || mprotect ((void *) page, 0x4000, prot_unwritable) < 0)
+    {
+      fprintf (stderr, "mprotect failed.\n");
+      exit (2);
+    }
+
+  /* Install the SIGSEGV handler.  */
+  sigsegv_install_handler (&handler);
+
+  /* The first write access should invoke the handler and then complete.  */
+  crasher (page);
+  /* The second write access should not invoke the handler.  */
+  crasher (page);
+
+  /* Check that the handler was called only once.  */
+  if (handler_called != 1)
+    exit (1);
+  /* Test passed!  */
+  printf ("Test passed.\n");
+  return 0;
+}
+
+#else
+
+int
+main ()
+{
+  return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-sigsegv-catch-segv2.c b/gnulib-tests/test-sigsegv-catch-segv2.c
new file mode 100644 (file)
index 0000000..b2a4804
--- /dev/null
@@ -0,0 +1,153 @@
+/* Test that the handler can be exited multiple times.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sigsegv.h"
+
+#include <stdint.h>
+#include <stdio.h>
+
+#if HAVE_SIGSEGV_RECOVERY
+
+# if defined _WIN32 && !defined __CYGWIN__
+  /* Windows doesn't have sigset_t.  */
+  typedef int sigset_t;
+#  define sigemptyset(set)
+#  define sigprocmask(how,set,oldset)
+# endif
+
+# include "mmap-anon-util.h"
+# include <stdlib.h> /* for abort, exit */
+# include <signal.h>
+# include <setjmp.h>
+
+# if SIGSEGV_FAULT_ADDRESS_ALIGNMENT > 1UL
+#  include <unistd.h>
+#  define SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS (getpagesize () - 1)
+# else
+#  define SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS 0
+# endif
+
+jmp_buf mainloop;
+sigset_t mainsigset;
+
+volatile int pass = 0;
+uintptr_t page;
+
+volatile int handler_called = 0;
+
+static void
+handler_continuation (void *arg1, void *arg2, void *arg3)
+{
+  longjmp (mainloop, pass);
+}
+
+int
+handler (void *fault_address, int serious)
+{
+  handler_called++;
+  if (handler_called > 10)
+    abort ();
+  if (fault_address
+      != (void *)((page + 0x678 + 8 * pass) & ~SIGSEGV_FAULT_ADDRESS_ROUNDOFF_BITS))
+    abort ();
+  pass++;
+  printf ("Fault %d caught.\n", pass);
+  sigprocmask (SIG_SETMASK, &mainsigset, NULL);
+  return sigsegv_leave_handler (handler_continuation, NULL, NULL, NULL);
+}
+
+void
+crasher (uintptr_t p)
+{
+  *(volatile int *) (p + 0x678 + 8 * pass) = 42;
+}
+
+int
+main ()
+{
+  int prot_unwritable;
+  void *p;
+  sigset_t emptyset;
+
+  /* Preparations.  */
+# if !HAVE_MAP_ANONYMOUS
+  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+# endif
+
+# if defined __linux__ && defined __sparc__
+  /* On Linux 2.6.26/SPARC64, PROT_READ has the same effect as
+     PROT_READ | PROT_WRITE.  */
+  prot_unwritable = PROT_NONE;
+# else
+  prot_unwritable = PROT_READ;
+# endif
+
+  /* Setup some mmaped memory.  */
+  p = mmap_zeromap ((void *) 0x12340000, 0x4000);
+  if (p == (void *)(-1))
+    {
+      fprintf (stderr, "mmap_zeromap failed.\n");
+      exit (2);
+    }
+  page = (uintptr_t) p;
+
+  /* Make it read-only.  */
+  if (mprotect ((void *) page, 0x4000, prot_unwritable) < 0)
+    {
+      fprintf (stderr, "mprotect failed.\n");
+      exit (2);
+    }
+
+  /* Install the SIGSEGV handler.  */
+  if (sigsegv_install_handler (&handler) < 0)
+    exit (2);
+
+  /* Save the current signal mask.  */
+  sigemptyset (&emptyset);
+  sigprocmask (SIG_BLOCK, &emptyset, &mainsigset);
+
+  /* Provoke two SIGSEGVs in a row.  */
+  switch (setjmp (mainloop))
+    {
+    case 0: case 1:
+      printf ("Doing SIGSEGV pass %d.\n", pass + 1);
+      crasher (page);
+      printf ("no SIGSEGV?!\n"); exit (1);
+    case 2:
+      break;
+    default:
+      abort ();
+    }
+
+  /* Test passed!  */
+  printf ("Test passed.\n");
+  return 0;
+}
+
+#else
+
+int
+main ()
+{
+  return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-sigsegv-catch-stackoverflow1.c b/gnulib-tests/test-sigsegv-catch-stackoverflow1.c
new file mode 100644 (file)
index 0000000..2f1e6f4
--- /dev/null
@@ -0,0 +1,149 @@
+/* Test the stack overflow handler.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible and Eric Blake.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sigsegv.h"
+
+#include <stdio.h>
+#include <limits.h>
+
+#if HAVE_STACK_OVERFLOW_RECOVERY
+
+# if defined _WIN32 && !defined __CYGWIN__
+  /* Windows doesn't have sigset_t.  */
+  typedef int sigset_t;
+#  define sigemptyset(set)
+#  define sigprocmask(how,set,oldset)
+# endif
+
+# include <stddef.h> /* needed for NULL on SunOS4 */
+# include <stdlib.h> /* for abort, exit */
+# include <signal.h>
+# include <setjmp.h>
+# if HAVE_SETRLIMIT
+#  include <sys/types.h>
+#  include <sys/time.h>
+#  include <sys/resource.h>
+# endif
+# include "altstack-util.h"
+
+jmp_buf mainloop;
+sigset_t mainsigset;
+
+volatile int pass = 0;
+
+volatile char *stack_lower_bound;
+volatile char *stack_upper_bound;
+
+static void
+stackoverflow_handler_continuation (void *arg1, void *arg2, void *arg3)
+{
+  int arg = (int) (long) arg1;
+  longjmp (mainloop, arg);
+}
+
+void
+stackoverflow_handler (int emergency, stackoverflow_context_t scp)
+{
+  char dummy;
+  volatile char *addr = &dummy;
+  if (!(addr >= stack_lower_bound && addr <= stack_upper_bound))
+    abort ();
+  pass++;
+  printf ("Stack overflow %d caught.\n", pass);
+  sigprocmask (SIG_SETMASK, &mainsigset, NULL);
+  sigsegv_leave_handler (stackoverflow_handler_continuation,
+                         (void *) (long) (emergency ? -1 : pass), NULL, NULL);
+}
+
+volatile int *
+recurse_1 (int n, volatile int *p)
+{
+  if (n < INT_MAX)
+    *recurse_1 (n + 1, p) += n;
+  return p;
+}
+
+int
+recurse (volatile int n)
+{
+  return *recurse_1 (n, &n);
+}
+
+int
+main ()
+{
+  sigset_t emptyset;
+
+# if HAVE_SETRLIMIT && defined RLIMIT_STACK
+  /* Before starting the endless recursion, try to be friendly to the user's
+     machine.  On some Linux 2.2.x systems, there is no stack limit for user
+     processes at all.  We don't want to kill such systems.  */
+  struct rlimit rl;
+  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
+  setrlimit (RLIMIT_STACK, &rl);
+# endif
+
+  /* Prepare the storage for the alternate stack.  */
+  prepare_alternate_stack ();
+
+  /* Install the stack overflow handler.  */
+  if (stackoverflow_install_handler (&stackoverflow_handler,
+                                     mystack, MYSTACK_SIZE)
+      < 0)
+    exit (2);
+  stack_lower_bound = mystack;
+  stack_upper_bound = mystack + MYSTACK_SIZE - 1;
+
+  /* Save the current signal mask.  */
+  sigemptyset (&emptyset);
+  sigprocmask (SIG_BLOCK, &emptyset, &mainsigset);
+
+  /* Provoke two stack overflows in a row.  */
+  switch (setjmp (mainloop))
+    {
+    case -1:
+      printf ("emergency exit\n"); exit (1);
+    case 0: case 1:
+      printf ("Starting recursion pass %d.\n", pass + 1);
+      recurse (0);
+      printf ("no endless recursion?!\n"); exit (1);
+    case 2:
+      break;
+    default:
+      abort ();
+    }
+
+  /* Validate that the alternate stack did not overflow.  */
+  check_alternate_stack_no_overflow ();
+
+  printf ("Test passed.\n");
+  exit (0);
+}
+
+#else
+
+int
+main ()
+{
+  return 77;
+}
+
+#endif
diff --git a/gnulib-tests/test-sigsegv-catch-stackoverflow2.c b/gnulib-tests/test-sigsegv-catch-stackoverflow2.c
new file mode 100644 (file)
index 0000000..5914e32
--- /dev/null
@@ -0,0 +1,211 @@
+/* Test that stack overflow and SIGSEGV are correctly distinguished.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible and Eric Blake.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sigsegv.h"
+
+#include <stdint.h>
+#include <stdio.h>
+#include <limits.h>
+
+#if HAVE_STACK_OVERFLOW_RECOVERY && HAVE_SIGSEGV_RECOVERY
+
+# if defined _WIN32 && !defined __CYGWIN__
+  /* Windows doesn't have sigset_t.  */
+  typedef int sigset_t;
+#  define sigemptyset(set)
+#  define sigprocmask(how,set,oldset)
+# endif
+
+# include "mmap-anon-util.h"
+# include <stddef.h> /* needed for NULL on SunOS4 */
+# include <stdlib.h> /* for abort, exit */
+# include <signal.h>
+# include <setjmp.h>
+# if HAVE_SETRLIMIT
+#  include <sys/types.h>
+#  include <sys/time.h>
+#  include <sys/resource.h>
+# endif
+# include "altstack-util.h"
+
+jmp_buf mainloop;
+sigset_t mainsigset;
+
+volatile int pass = 0;
+uintptr_t page;
+volatile int *null_pointer_to_volatile_int /* = NULL */;
+
+static void
+stackoverflow_handler_continuation (void *arg1, void *arg2, void *arg3)
+{
+  int arg = (int) (long) arg1;
+  longjmp (mainloop, arg);
+}
+
+void
+stackoverflow_handler (int emergency, stackoverflow_context_t scp)
+{
+  pass++;
+  if (pass <= 2)
+    printf ("Stack overflow %d caught.\n", pass);
+  else
+    {
+      printf ("Segmentation violation misdetected as stack overflow.\n");
+      exit (1);
+    }
+  sigprocmask (SIG_SETMASK, &mainsigset, NULL);
+  sigsegv_leave_handler (stackoverflow_handler_continuation,
+                         (void *) (long) (emergency ? -1 : pass), NULL, NULL);
+}
+
+int
+sigsegv_handler (void *address, int emergency)
+{
+  /* This test is necessary to distinguish stack overflow and SIGSEGV.  */
+  if (!emergency)
+    return 0;
+
+  pass++;
+  if (pass <= 2)
+    {
+      printf ("Stack overflow %d missed.\n", pass);
+      exit (1);
+    }
+  else
+    printf ("Segmentation violation correctly detected.\n");
+  sigprocmask (SIG_SETMASK, &mainsigset, NULL);
+  return sigsegv_leave_handler (stackoverflow_handler_continuation,
+                                (void *) (long) pass, NULL, NULL);
+}
+
+volatile int *
+recurse_1 (int n, volatile int *p)
+{
+  if (n < INT_MAX)
+    *recurse_1 (n + 1, p) += n;
+  return p;
+}
+
+int
+recurse (volatile int n)
+{
+  return *recurse_1 (n, &n);
+}
+
+int
+main ()
+{
+  int prot_unwritable;
+  void *p;
+  sigset_t emptyset;
+
+# if HAVE_SETRLIMIT && defined RLIMIT_STACK
+  /* Before starting the endless recursion, try to be friendly to the user's
+     machine.  On some Linux 2.2.x systems, there is no stack limit for user
+     processes at all.  We don't want to kill such systems.  */
+  struct rlimit rl;
+  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
+  setrlimit (RLIMIT_STACK, &rl);
+# endif
+
+  /* Prepare the storage for the alternate stack.  */
+  prepare_alternate_stack ();
+
+  /* Install the stack overflow handler.  */
+  if (stackoverflow_install_handler (&stackoverflow_handler,
+                                     mystack, MYSTACK_SIZE)
+      < 0)
+    exit (2);
+
+  /* Preparations.  */
+# if !HAVE_MAP_ANONYMOUS
+  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+# endif
+
+# if defined __linux__ && defined __sparc__
+  /* On Linux 2.6.26/SPARC64, PROT_READ has the same effect as
+     PROT_READ | PROT_WRITE.  */
+  prot_unwritable = PROT_NONE;
+# else
+  prot_unwritable = PROT_READ;
+# endif
+
+  /* Setup some mmaped memory.  */
+  p = mmap_zeromap ((void *) 0x12340000, 0x4000);
+  if (p == (void *)(-1))
+    {
+      fprintf (stderr, "mmap_zeromap failed.\n");
+      exit (2);
+    }
+  page = (uintptr_t) p;
+
+  /* Make it read-only.  */
+  if (mprotect ((void *) page, 0x4000, prot_unwritable) < 0)
+    {
+      fprintf (stderr, "mprotect failed.\n");
+      exit (2);
+    }
+
+  /* Install the SIGSEGV handler.  */
+  if (sigsegv_install_handler (&sigsegv_handler) < 0)
+    exit (2);
+
+  /* Save the current signal mask.  */
+  sigemptyset (&emptyset);
+  sigprocmask (SIG_BLOCK, &emptyset, &mainsigset);
+
+  /* Provoke two stack overflows in a row.  */
+  switch (setjmp (mainloop))
+    {
+    case -1:
+      printf ("emergency exit\n"); exit (1);
+    case 0: case 1:
+      printf ("Starting recursion pass %d.\n", pass + 1);
+      recurse (0);
+      printf ("no endless recursion?!\n"); exit (1);
+    case 2:
+      *(volatile int *) (page + 0x678) = 42;
+      break;
+    case 3:
+      *null_pointer_to_volatile_int = 42;
+      break;
+    case 4:
+      break;
+    default:
+      abort ();
+    }
+
+  /* Validate that the alternate stack did not overflow.  */
+  check_alternate_stack_no_overflow ();
+
+  printf ("Test passed.\n");
+  exit (0);
+}
+
+#else
+
+int
+main ()
+{
+  return 77;
+}
+
+#endif
index 2f0a995..be9ee83 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of sleep() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 50b42c3..ea6de1c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of snprintf() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4ff8357..8fd603c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2008-2021 Free Software Foundation, Inc.
  * Written by Simon Josefsson.
  *
  * This program is free software: you can redistribute it and/or modify
index 49d5497..cd0f3c3 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stat-time.h>.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 19971e7..6f0a995 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 425246e..e728ca2 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of stat.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,12 +32,18 @@ test_stat_func (int (*func) (char const *, struct stat *), bool print)
   ASSERT (cwd);
   ASSERT (func (".", &st1) == 0);
   ASSERT (func ("./", &st2) == 0);
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
   ASSERT (func (cwd, &st2) == 0);
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
   ASSERT (func ("/", &st1) == 0);
   ASSERT (func ("///", &st2) == 0);
+#if !(defined _WIN32 && !defined __CYGWIN__ && !_GL_WINDOWS_STAT_INODES)
   ASSERT (SAME_INODE (st1, st2));
+#endif
 
   errno = 0;
   ASSERT (func ("", &st1) == -1);
index bced3f6..38812b6 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdalign.h>.
-   Copyright 2009-2018 Free Software Foundation, Inc.
+   Copyright 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ CHECK_STATIC (struct4);
 int
 main ()
 {
-#if defined __SUNPRO_C
+#if defined __SUNPRO_C && __SUNPRO_C < 0x5150
   /* Avoid a test failure due to Sun Studio Developer Bug Report #2125432.  */
   fputs ("Skipping test: known Sun C compiler bug\n", stderr);
   return 77;
@@ -89,6 +89,11 @@ main ()
      https://lists.gnu.org/r/bug-gnulib/2017-03/msg00078.html  */
   fputs ("Skipping test: known HP-UX Itanium cc compiler bug\n", stderr);
   return 77;
+#elif defined __clang__ && defined __ibmxl__
+  /* Avoid a test failure with IBM xlc 16.1.  It ignores alignas (8),
+     _Alignas (8), and __attribute__ ((__aligned__ (8))).  */
+  fputs ("Skipping test: known AIX XL C compiler deficiency\n", stderr);
+  return 77;
 #else
   CHECK_ALIGNED (static_char_alignas);
   CHECK_ALIGNED (static_char_Alignas);
index 6b775bf..60e5242 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdbool.h> substitute.
-   Copyright (C) 2002-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
 
-/* We want this test to succeed even when using gcc's -Werror; but to
-   do that requires a pragma that didn't exist before 4.3.0.  */
-#ifndef __GNUC__
+/* Define ADDRESS_CHECK_OKAY if it is OK to assign an address to a 'bool'
+   and this does not generate a warning (because we want this test to succeed
+   even when using gcc's -Werror).  */
+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) \
+    || (__clang_major__ >= 4)
+/* We can silence the warning.  */
+# pragma GCC diagnostic ignored "-Waddress"
 # define ADDRESS_CHECK_OKAY
-#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
-/* No way to silence -Waddress.  */
+#elif defined __GNUC__ || defined __clang__
+/* There may be a warning.  */
 #else
-# pragma GCC diagnostic ignored "-Waddress"
+/* Ignore warnings from other compilers.  */
 # define ADDRESS_CHECK_OKAY
 #endif
 
 
 /* Several tests cannot be guaranteed with gnulib's <stdbool.h>, at
    least, not for all compilers and compiler options.  */
-#if HAVE_STDBOOL_H || 3 <= __GNUC__
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__
 struct s { _Bool s: 1; _Bool t; } s;
 #endif
 
 char a[true == 1 ? 1 : -1];
 char b[false == 0 ? 1 : -1];
 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__ /* See above.  */
 char d[(bool) 0.5 == true ? 1 : -1];
 # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
 /* C99 may plausibly be interpreted as not requiring support for a cast from
    a variable's address to bool in a static initializer.  So treat it like a
    GCC extension.  */
-#  ifdef __GNUC__
+#  if defined __GNUC__ || defined __clang__
 bool e = &s;
 #  endif
 # endif
@@ -73,7 +77,7 @@ char f[(_Bool) 0.0 == false ? 1 : -1];
 #endif
 char g[true];
 char h[sizeof (_Bool)];
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+#if HAVE_STDBOOL_H || 3 <= __GNUC__ || 4 <= __clang_major__ /* See above.  */
 char i[sizeof s.t];
 #endif
 enum { j = false, k = true, l = false * true, m = true * 256 };
@@ -92,7 +96,7 @@ main ()
 {
   int error = 0;
 
-#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above.  */
+#if HAVE_STDBOOL_H || 3 <= __GNUC_ || 4 <= __clang_major___ /* See above.  */
 # ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning.  */
   /* A cast from a variable's address to bool is valid in expressions.  */
   {
index 311001a..21b46b9 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stddef.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ verify (alignof (ptrdiff_t) <= alignof (max_align_t));
 verify (alignof (size_t) <= alignof (max_align_t));
 verify (alignof (wchar_t) <= alignof (max_align_t));
 verify (alignof (struct d) <= alignof (max_align_t));
-#if defined __GNUC__ || defined __IBM__ALIGNOF__
+#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
 verify (__alignof__ (double) <= __alignof__ (max_align_t));
 verify (__alignof__ (int) <= __alignof__ (max_align_t));
 verify (__alignof__ (long double) <= __alignof__ (max_align_t));
index 8a46557..dc6fad7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdint.h> substitute.
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 #include "verify.h"
 #include "intprops.h"
 
-#if __GNUC__ >= 2 && DO_PEDANTIC
+#if ((__GNUC__ >= 2) || (__clang_major__ >= 4)) && DO_PEDANTIC
 # define verify_same_types(expr1,expr2)  \
     extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \
     extern void _verify_func(__LINE__) (__typeof__ (expr2) *);
@@ -217,12 +217,14 @@ err or;
 /* 7.18.2.4. Limits of integer types capable of holding object pointers */
 
 intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX };
+verify (sizeof (void *) <= sizeof (intptr_t));
 verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN);
 verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX);
 verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0);
 verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0);
 
 uintptr_t h[2] = { 17, UINTPTR_MAX };
+verify (sizeof (void *) <= sizeof (uintptr_t));
 verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX);
 verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0);
 
@@ -361,7 +363,7 @@ verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
   */
 #define verify_width(width, min, max) \
   _GL_VERIFY ((max) >> ((width) - 1 - ((min) < 0)) == 1, \
-              "verify_width check")
+              "verify_width check", -)
 
 /* Macros specified by ISO/IEC TS 18661-1:2014.  */
 
index c307d8c..8fd000a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdio.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3a5c608..427263e 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdlib.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index cd0df39..2e4125b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of strerror() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index da3679a..6e72194 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of strerror_r() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -165,9 +165,6 @@ main (void)
 
     strerror_r (EACCES, buf, sizeof buf);
     strerror_r (-5, buf, sizeof buf);
-    ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
-    ASSERT (msg2 == msg4 || STREQ (msg2, str2));
-    ASSERT (msg3 == msg4 || STREQ (msg3, str3));
     ASSERT (STREQ (msg4, str4));
 
     free (str1);
index f2b670e..55bd3df 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of character set conversion.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 75313b2..bad996f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <string.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 0332ca6..4ac1ac5 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <strings.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index dc7e280..6470ebc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2010-2021 Free Software Foundation, Inc.
  * Written by Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
similarity index 68%
rename from gnulib-tests/test-strtoumax.c
rename to gnulib-tests/test-strtoimax.c
index a70b803..3aa83c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2021 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8 @@
 #include <inttypes.h>
 
 #include "signature.h"
-#ifndef strtoumax
-SIGNATURE_CHECK (strtoumax, uintmax_t, (const char *, char **, int));
+#ifndef strtoimax
+SIGNATURE_CHECK (strtoimax, intmax_t, (const char *, char **, int));
 #endif
 
 #include <errno.h>
@@ -34,9 +34,9 @@ main (void)
   {
     const char input[] = "";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -44,9 +44,9 @@ main (void)
   {
     const char input[] = " ";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -54,9 +54,9 @@ main (void)
   {
     const char input[] = " +";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -64,9 +64,9 @@ main (void)
   {
     const char input[] = " -";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -76,9 +76,9 @@ main (void)
   {
     const char input[] = "0";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 1);
     ASSERT (errno == 0);
@@ -86,9 +86,9 @@ main (void)
   {
     const char input[] = "+0";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -96,9 +96,9 @@ main (void)
   {
     const char input[] = "-0";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -106,9 +106,9 @@ main (void)
   {
     const char input[] = "23";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -116,9 +116,9 @@ main (void)
   {
     const char input[] = " 23";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
@@ -126,9 +126,9 @@ main (void)
   {
     const char input[] = "+23";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
@@ -136,10 +136,10 @@ main (void)
   {
     const char input[] = "-23";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
-    ASSERT (result == - (uintmax_t) 23);
+    result = strtoimax (input, &ptr, 10);
+    ASSERT (result == -23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
   }
@@ -148,9 +148,9 @@ main (void)
   {
     const char input[] = "2147483647";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
+    result = strtoimax (input, &ptr, 10);
     ASSERT (result == 2147483647);
     ASSERT (ptr == input + 10);
     ASSERT (errno == 0);
@@ -158,23 +158,24 @@ main (void)
   {
     const char input[] = "-2147483648";
     char *ptr;
-    uintmax_t result;
+    intmax_t result;
     errno = 0;
-    result = strtoumax (input, &ptr, 10);
-    ASSERT (result == - (uintmax_t) 2147483648U);
+    result = strtoimax (input, &ptr, 10);
+    ASSERT (result == -2147483647 - 1);
     ASSERT (ptr == input + 11);
     ASSERT (errno == 0);
   }
-  {
-    const char input[] = "4294967295";
-    char *ptr;
-    uintmax_t result;
-    errno = 0;
-    result = strtoumax (input, &ptr, 10);
-    ASSERT (result == 4294967295U);
-    ASSERT (ptr == input + 10);
-    ASSERT (errno == 0);
-  }
+  if (sizeof (intmax_t) > sizeof (int))
+    {
+      const char input[] = "4294967295";
+      char *ptr;
+      intmax_t result;
+      errno = 0;
+      result = strtoimax (input, &ptr, 10);
+      ASSERT (result == (intmax_t) 65535 * (intmax_t) 65537);
+      ASSERT (ptr == input + 10);
+      ASSERT (errno == 0);
+    }
 
   return 0;
 }
similarity index 53%
rename from gnulib-tests/test-strtoull.c
rename to gnulib-tests/test-strtoll.c
index a581557..5f2b193 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2018 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2021 Free Software Foundation, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8 @@
 #include <stdlib.h>
 
 #include "signature.h"
-#ifndef strtoull
-SIGNATURE_CHECK (strtoull, unsigned long long, (const char *, char **, int));
+#ifndef strtoll
+SIGNATURE_CHECK (strtoll, long long, (const char *, char **, int));
 #endif
 
 #include <errno.h>
@@ -34,9 +34,9 @@ main (void)
   {
     const char input[] = "";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -44,9 +44,9 @@ main (void)
   {
     const char input[] = " ";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -54,9 +54,9 @@ main (void)
   {
     const char input[] = " +";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -64,9 +64,9 @@ main (void)
   {
     const char input[] = " -";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input);
     ASSERT (errno == 0 || errno == EINVAL);
@@ -76,9 +76,9 @@ main (void)
   {
     const char input[] = "0";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 1);
     ASSERT (errno == 0);
@@ -86,9 +86,9 @@ main (void)
   {
     const char input[] = "+0";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -96,9 +96,9 @@ main (void)
   {
     const char input[] = "-0";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 0);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -106,9 +106,9 @@ main (void)
   {
     const char input[] = "23";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 2);
     ASSERT (errno == 0);
@@ -116,9 +116,9 @@ main (void)
   {
     const char input[] = " 23";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
@@ -126,9 +126,9 @@ main (void)
   {
     const char input[] = "+23";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
@@ -136,10 +136,10 @@ main (void)
   {
     const char input[] = "-23";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
-    ASSERT (result == - 23ULL);
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == -23);
     ASSERT (ptr == input + 3);
     ASSERT (errno == 0);
   }
@@ -148,9 +148,9 @@ main (void)
   {
     const char input[] = "2147483647";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
+    result = strtoll (input, &ptr, 10);
     ASSERT (result == 2147483647);
     ASSERT (ptr == input + 10);
     ASSERT (errno == 0);
@@ -158,21 +158,84 @@ main (void)
   {
     const char input[] = "-2147483648";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
-    ASSERT (result == - 2147483648ULL);
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == -2147483647 - 1);
     ASSERT (ptr == input + 11);
     ASSERT (errno == 0);
   }
+  if (sizeof (long long) > sizeof (int))
+    {
+      const char input[] = "4294967295";
+      char *ptr;
+      long long result;
+      errno = 0;
+      result = strtoll (input, &ptr, 10);
+      ASSERT (result == 65535LL * 65537LL);
+      ASSERT (ptr == input + 10);
+      ASSERT (errno == 0);
+    }
+
+  /* Hexadecimal integer syntax.  */
   {
-    const char input[] = "4294967295";
+    const char input[] = "0x2A";
     char *ptr;
-    unsigned long long result;
+    long long result;
     errno = 0;
-    result = strtoull (input, &ptr, 10);
-    ASSERT (result == 4294967295U);
-    ASSERT (ptr == input + 10);
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0x2A";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 16);
+    ASSERT (result == 42LL);
+    ASSERT (ptr == input + 4);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0x2A";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 0);
+    ASSERT (result == 42LL);
+    ASSERT (ptr == input + 4);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0x";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 10);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0x";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 16);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
+    ASSERT (errno == 0);
+  }
+  {
+    const char input[] = "0x";
+    char *ptr;
+    long long result;
+    errno = 0;
+    result = strtoll (input, &ptr, 0);
+    ASSERT (result == 0LL);
+    ASSERT (ptr == input + 1);
     ASSERT (errno == 0);
   }
 
index d58f27e..95a3fbf 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ddc8994..3128d0a 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of symlink.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -67,7 +67,8 @@ test_symlink (int (*func) (char const *, char const *), bool print)
   ASSERT (errno == EEXIST);
   errno = 0;
   ASSERT (func ("nowhere", BASE "dir/") == -1);
-  ASSERT (errno == EEXIST || errno == EINVAL);
+  ASSERT (errno == EEXIST || errno == EINVAL
+          || errno == ENOENT /* Lustre FS on Linux */);
   ASSERT (close (creat (BASE "file", 0600)) == 0);
   errno = 0;
   ASSERT (func ("nowhere", BASE "file") == -1);
index 7643bed..151bf31 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/ioctl.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-sys_random.c b/gnulib-tests/test-sys_random.c
new file mode 100644 (file)
index 0000000..1bf5336
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test of <sys/random.h> substitute.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include <sys/random.h>
+
+/* Check that the necessary constants are defined.  */
+int flags[] =
+  {
+    GRND_RANDOM,
+    GRND_NONBLOCK
+  };
+
+int
+main (void)
+{
+  return 0;
+}
index d9ca02d..48667ce 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/select.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1335823..49f4958 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/socket.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 3c68c3c..e5f88c0 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/stat.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6a35e0f..764321b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/time.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a44164d..a0bcc04 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/types.h> substitute.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 0b9347c..723f36b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/uio.h> substitute.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5c91563..595956a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <sys/wait.h> substitute.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 699f2fb..4508f57 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of macros shared between <sys/wait.h> and <stdlib.h>.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gnulib-tests/test-thread_create.c b/gnulib-tests/test-thread_create.c
new file mode 100644 (file)
index 0000000..f4213d4
--- /dev/null
@@ -0,0 +1,78 @@
+/* Test of gl_thread_create () macro.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011.  */
+
+#include <config.h>
+
+#include "glthread/thread.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+static gl_thread_t main_thread_before;
+static gl_thread_t main_thread_after;
+static gl_thread_t worker_thread;
+
+static int dummy;
+static volatile int work_done;
+
+static void *
+worker_thread_func (void *arg)
+{
+  work_done = 1;
+  return &dummy;
+}
+
+int
+main ()
+{
+  main_thread_before = gl_thread_self ();
+
+  if (glthread_create (&worker_thread, worker_thread_func, NULL) == 0)
+    {
+      void *ret;
+
+      /* Check that gl_thread_self () has the same value before than after the
+         first call to gl_thread_create ().  */
+      main_thread_after = gl_thread_self ();
+      ASSERT (memcmp (&main_thread_before, &main_thread_after,
+                      sizeof (gl_thread_t))
+              == 0);
+
+      gl_thread_join (worker_thread, &ret);
+
+      /* Check the return value of the thread.  */
+      ASSERT (ret == &dummy);
+
+      /* Check that worker_thread_func () has finished executing.  */
+      ASSERT (work_done);
+
+      return 0;
+    }
+  else
+    {
+#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS
+      fputs ("glthread_create failed\n", stderr);
+      return 1;
+#else
+      fputs ("Skipping test: multithreading not enabled\n", stderr);
+      return 77;
+#endif
+    }
+}
diff --git a/gnulib-tests/test-thread_self.c b/gnulib-tests/test-thread_self.c
new file mode 100644 (file)
index 0000000..69d876d
--- /dev/null
@@ -0,0 +1,39 @@
+/* Test of gl_thread_self () macro.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2011.  */
+
+#include <config.h>
+
+#include "glthread/thread.h"
+
+gl_thread_t main_thread;
+
+int
+main ()
+{
+  /* Check that gl_thread_self () can be used with just $(LIBTHREAD), not
+     $(LIBMULTITHREAD), i.e. in libraries that are multithread-safe but don't
+     create threads themselves.  */
+  /* This is not the case on AIX with --enable-threads=isoc+posix, because in
+     this case, $(LIBTHREAD) is empty whereas $(LIBMULTITHREAD) is '-lpthread'.
+   */
+#if !defined _AIX
+  main_thread = gl_thread_self ();
+#endif
+
+  return 0;
+}
index e016397..e5a4522 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <time.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,6 +34,10 @@ pid_t t2;
    per POSIX 2008.  */
 verify (sizeof NULL == sizeof (void *));
 
+/* Check that TIME_UTC is defined and a positive integer.  */
+int t3 = TIME_UTC;
+verify (TIME_UTC > 0);
+
 int
 main (void)
 {
index 2abeac5..4af9f83 100644 (file)
@@ -1,5 +1,5 @@
 /* Test timespec functions.
-   Copyright 2015-2018 Free Software Foundation, Inc.
+   Copyright 2015-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2219456..ca7422c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <unistd.h> substitute.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index a5dd594..e61fbbc 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of unsetenv.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d1d18c1..7813f1e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Test suite for update-copyright.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -37,9 +37,23 @@ trap 'rm -f $TMP_BASE*' 0 1 2 3 15
 TMP=$TMP_BASE
 s=$TMP-script
 cat <<\EOF > $s
-eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"'
-  & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
-    if 0;
+#!/bin/sh
+#! -*-perl-*-
+# This is a prologue that allows to run a perl script as an executable
+# on systems that are compliant to a POSIX version before POSIX:2017.
+# On such systems, the usual invocation of an executable through execlp()
+# or execvp() fails with ENOEXEC if it is a script that does not start
+# with a #! line.  The script interpreter mentioned in the #! line has
+# to be /bin/sh, because on GuixSD systems that is the only program that
+# has a fixed file name.  The second line is essential for perl and is
+# also useful for editing this file in Emacs.  The next two lines below
+# are valid code in both sh and perl.  When executed by sh, they re-execute
+# the script through the perl program found in $PATH.  The '-x' option
+# is essential as well; without it, perl would re-execute the script
+# through /bin/sh.  When executed by perl, the next two lines are a no-op.
+eval 'exec perl -wSx -pi "$0" "$@"'
+     if 0;
+
 s/a/b/
 EOF
 chmod a+x $s
index 4007a28..9d99743 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of vasnprintf() and asnprintf() functions.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4c2ac33..cbebce7 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of vasprintf() and asprintf() functions.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5cd37f7..3a7e1c5 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 : ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+. "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-cvs
 repo=`pwd`/$tmpdir/repo
@@ -44,7 +44,7 @@ for i in with-cvsu without; do
     cvs -Q -d "$repo" import -m imp m M M0 &&
     cvs -Q -d "$repo" co m && cd m &&
     printf '%s\n' b c d/a > expected &&
-    vc-list-files | sort > actual &&
+    $BOURNE_SHELL "$abs_aux_dir/vc-list-files" | sort > actual &&
     compare expected actual &&
     ok=1
   test $ok = 0 && fail=1
index 2775fd8..3359ffb 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Unit tests for vc-list-files
-# Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 : ${srcdir=.}
-. "$srcdir/init.sh"; path_prepend_ "$abs_aux_dir" .
+. "$srcdir/init.sh"; path_prepend_ .
 
 tmpdir=vc-git-$$
 GIT_DIR= GIT_WORK_TREE=; unset GIT_DIR GIT_WORK_TREE
@@ -35,7 +35,7 @@ mkdir $tmpdir && cd $tmpdir &&
   git add . > /dev/null &&
   git commit -q -a -m log &&
   printf '%s\n' b c d/a > expected &&
-  vc-list-files > actual &&
+  $BOURNE_SHELL "$abs_aux_dir/vc-list-files" > actual &&
   compare expected actual &&
   fail=0
 
index 20ccffc..e97ea2a 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the "verify" module.
 
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index af97076..65b926a 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the "verify" module.
 
-   Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # define EXP_FAIL 0
 #endif
 
-int x;
-enum { a, b, c };
+/* ======================= Test verify, verify_expr ======================= */
+
+int gx;
+enum { A, B, C };
 
 #if EXP_FAIL == 1
-verify (x >= 0);                  /* should give ERROR: non-constant expression */
+verify (gx >= 0);                 /* should give ERROR: non-constant expression */
 #endif
-verify (c == 2);                  /* should be ok */
+verify (C == 2);                  /* should be ok */
 #if EXP_FAIL == 2
 verify (1 + 1 == 3);              /* should give ERROR */
 #endif
@@ -39,7 +41,7 @@ verify (1 == 1); verify (1 == 1); /* should be ok */
 
 enum
 {
-  item = verify_true (1 == 1) * 0 + 17 /* should be ok */
+  item = verify_expr (1 == 1, 10 * 0 + 17) /* should be ok */
 };
 
 static int
@@ -48,7 +50,7 @@ function (int n)
 #if EXP_FAIL == 3
   verify (n >= 0);                  /* should give ERROR: non-constant expression */
 #endif
-  verify (c == 2);                  /* should be ok */
+  verify (C == 2);                  /* should be ok */
 #if EXP_FAIL == 4
   verify (1 + 1 == 3);              /* should give ERROR */
 #endif
@@ -62,8 +64,56 @@ function (int n)
   return 0;
 }
 
+/* ============================== Test assume ============================== */
+
+static int
+f (int a)
+{
+  return a;
+}
+
+typedef struct { unsigned int context : 4; unsigned int halt : 1; } state;
+
+void test_assume_expressions (state *s);
+int test_assume_optimization (int x);
+_Noreturn void test_assume_noreturn (void);
+
+void
+test_assume_expressions (state *s)
+{
+  /* Check that 'assume' accepts a function call, even of a non-const
+     function.  */
+  assume (f (1));
+  /* Check that 'assume' accepts a bit-field expression.  */
+  assume (s->halt);
+}
+
+int
+test_assume_optimization (int x)
+{
+  /* Check that the compiler uses 'assume' for optimization.
+     This function, when compiled with optimization, should have code
+     equivalent to
+       return x + 3;
+     Use 'objdump --disassemble test-verify.o' to verify this.  */
+  assume (x >= 4);
+  return (x > 1 ? x + 3 : 2 * x + 10);
+}
+
+_Noreturn void
+test_assume_noreturn (void)
+{
+  /* Check that the compiler's data-flow analysis recognizes 'assume (0)'.
+     This function should not elicit a warning.  */
+  assume (0);
+}
+
+/* ============================== Main ===================================== */
 int
 main (void)
 {
+  state s = { 0, 1 };
+  test_assume_expressions (&s);
+  test_assume_optimization (5);
   return !(function (0) == 0 && function (1) == 8);
 }
index 931aa08..a098556 100644 (file)
@@ -1,5 +1,5 @@
 /* Test suite for version-etc.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNUlib Library.
 
    This program is free software: you can redistribute it and/or modify
index b796f3e..20b9e9b 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Test suite for version-etc.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -33,7 +33,7 @@ There is NO WARRANTY, to the extent permitted by law.
 Written by Sergey Poznyakoff and Eric Blake.
 EOT
 
-test-version-etc${EXEEXT} --version |
+${CHECKER} test-version-etc${EXEEXT} --version |
  sed '1s/test-version-etc (.*) .*/test-version-etc (PROJECT) VERSION/
       /^Packaged by/d
       2,3 s/Copyright (C) [0-9]\{4,4\}/COPYRIGHT/' |
index ac1b508..65c685c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <wchar.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 50c82f5..b01c543 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP1252 locale.
-./test-wcrtomb-w32${EXEEXT} French_France 1252
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} French_France 1252
index 783c70c..5481634 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP1256 locale.
-./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256
index 619ea64..f35879d 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP932 locale.
-./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932
index 67b6803..8eec6cb 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP950 locale.
-./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950
index 9841fa9..fd47d6f 100755 (executable)
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 # Test a CP936 locale.
-./test-wcrtomb-w32${EXEEXT} Chinese_China 936
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} Chinese_China 936
diff --git a/gnulib-tests/test-wcrtomb-w32-6.sh b/gnulib-tests/test-wcrtomb-w32-6.sh
new file mode 100755 (executable)
index 0000000..802237d
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test a GB18030 locale.
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} Chinese_China 54936
diff --git a/gnulib-tests/test-wcrtomb-w32-7.sh b/gnulib-tests/test-wcrtomb-w32-7.sh
new file mode 100755 (executable)
index 0000000..fb04e58
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Test some UTF-8 locales.
+${CHECKER} ./test-wcrtomb-w32${EXEEXT} French_France Japanese_Japan Chinese_Taiwan Chinese_China 65001
index 19770d1..b354260 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of wide character to multibyte character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "localcharset.h"
 #include "macros.h"
 
 #if defined _WIN32 && !defined __CYGWIN__
@@ -257,6 +258,8 @@ test_one_locale (const char *name, int codepage)
 
     case 54936:
       /* Locale encoding is CP54936 = GB18030.  */
+      if (strcmp (locale_charset (), "GB18030") != 0)
+        return 77;
       {
         /* Convert "B\250\271\201\060\211\070er": "Büßer" */
         memset (buf, 'x', 8);
@@ -275,6 +278,8 @@ test_one_locale (const char *name, int codepage)
 
     case 65001:
       /* Locale encoding is CP65001 = UTF-8.  */
+      if (strcmp (locale_charset (), "UTF-8") != 0)
+        return 77;
       {
         /* Convert "B\303\274\303\237er": "Büßer" */
         memset (buf, 'x', 8);
index 3c53fcb..74f2d1d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of conversion of wide character to multibyte character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -156,6 +156,10 @@ main (int argc, char *argv[])
           check_character (input + 3, 4);
         }
         return 0;
+
+      case '5':
+        /* C locale; tested above.  */
+        return 0;
       }
 
   return 1;
index 3eda8f3..1a31b6e 100755 (executable)
@@ -4,7 +4,7 @@
 : ${LOCALE_FR=fr_FR}
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR \
-  ./test-wcrtomb${EXEEXT} 1 \
+  ${CHECKER} ./test-wcrtomb${EXEEXT} 1 \
   || exit 1
 fi
 
@@ -12,7 +12,7 @@ fi
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
 if test $LOCALE_FR_UTF8 != none; then
   LC_ALL=$LOCALE_FR_UTF8 \
-  ./test-wcrtomb${EXEEXT} 2 \
+  ${CHECKER} ./test-wcrtomb${EXEEXT} 2 \
   || exit 1
 fi
 
@@ -20,7 +20,7 @@ fi
 : ${LOCALE_JA=ja_JP}
 if test $LOCALE_JA != none; then
   LC_ALL=$LOCALE_JA \
-  ./test-wcrtomb${EXEEXT} 3 \
+  ${CHECKER} ./test-wcrtomb${EXEEXT} 3 \
   || exit 1
 fi
 
@@ -28,8 +28,12 @@ fi
 : ${LOCALE_ZH_CN=zh_CN.GB18030}
 if test $LOCALE_ZH_CN != none; then
   LC_ALL=$LOCALE_ZH_CN \
-  ./test-wcrtomb${EXEEXT} 4 \
+  ${CHECKER} ./test-wcrtomb${EXEEXT} 4 \
   || exit 1
 fi
 
+# Test in the POSIX locale.
+LC_ALL=C     ${CHECKER} ./test-wcrtomb${EXEEXT} 5 || exit 1
+LC_ALL=POSIX ${CHECKER} ./test-wcrtomb${EXEEXT} 5 || exit 1
+
 exit 0
index 673cdc3..f96c73d 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <wctype.h> substitute.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 4aa6ab7..e5e3a54 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of wcwidth() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,7 +35,7 @@ main ()
 {
   wchar_t wc;
 
-#if !GNULIB_WCHAR_SINGLE
+#if !GNULIB_WCHAR_SINGLE_LOCALE
 # ifdef C_CTYPE_ASCII
   /* Test width of ASCII characters.  */
   for (wc = 0x20; wc < 0x7F; wc++)
@@ -69,9 +69,29 @@ main ()
 #endif
 
       /* Test width of some zero width characters.  */
-      ASSERT (wcwidth (0x200B) == 0);
+      /* While it is desirable that U+200B, U+200C, U+200D have width 0,
+         because this makes wcswidth work better on strings that contain these
+         characters, it is acceptable if an implementation treats these
+         characters like control characters.  */
+      ASSERT (wcwidth (0x200B) <= 0);
       ASSERT (wcwidth (0xFEFF) <= 0);
 
+      /* Test width of some math symbols.
+         U+2202 is marked as having ambiguous width (A) in EastAsianWidth.txt
+         (see <https://www.unicode.org/Public/12.0.0/ucd/EastAsianWidth.txt>).
+         The Unicode Standard Annex 11
+         <https://www.unicode.org/reports/tr11/tr11-36.html>
+         says
+           "Ambiguous characters behave like wide or narrow characters
+            depending on the context (language tag, script identification,
+            associated font, source of data, or explicit markup; all can
+            provide the context). If the context cannot be established
+            reliably, they should be treated as narrow characters by default."
+         For wcwidth(), the only available context information is the locale.
+         "fr_FR.UTF-8" is a Western locale, not an East Asian locale, therefore
+         U+2202 should be treated like a narrow character.  */
+      ASSERT (wcwidth (0x2202) == 1);
+
       /* Test width of some CJK characters.  */
       ASSERT (wcwidth (0x3000) == 2);
       ASSERT (wcwidth (0xB250) == 2);
index 28c3bf7..3da598b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of xalloc_die() function.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 8596cd1..b88d959 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Test suite for xalloc_die.
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is part of the GNUlib Library.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -18,7 +18,7 @@
 
 . "${srcdir=.}/init.sh"; path_prepend_ .
 
-test-xalloc-die${EXEEXT} > out 2> err
+${CHECKER} test-xalloc-die${EXEEXT} > out 2> err
 case $? in
   1) ;;
   *) Exit 1;;
similarity index 70%
rename from lib/strtoul.c
rename to gnulib-tests/test-xstdopen.c
index 260f4d9..89f3090 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991, 1997, 2009-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
+/* Test of xstdopen() function.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#define UNSIGNED        1
+#include <config.h>
 
-#include "strtol.c"
+#include "xstdopen.h"
+
+#include <fcntl.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+  xstdopen ();
+  ASSERT (open ("Makefile", O_RDONLY) >= 3);
+
+  return 0;
+}
diff --git a/gnulib-tests/test-xstdopen.sh b/gnulib-tests/test-xstdopen.sh
new file mode 100755 (executable)
index 0000000..4420167
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Test with all of stdin, stdout, stderr open.
+${CHECKER} ./test-xstdopen${EXEEXT} || exit 1
+
+# The syntax for closed file descriptors in sh scripts is specified by POSIX in
+# section 2.7.5 of
+# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
+
+# Test with stdin closed.
+${CHECKER} ./test-xstdopen${EXEEXT} <&- || exit 1
+
+# Test with stdout closed.
+${CHECKER} ./test-xstdopen${EXEEXT} >&- || exit 1
+
+# Test with stderr closed.
+${CHECKER} ./test-xstdopen${EXEEXT} 2>&- || exit 1
+
+# Test with all of stdin, stdout, stderr closed.
+${CHECKER} ./test-xstdopen${EXEEXT} <&- >&- 2>&- || exit 1
diff --git a/gnulib-tests/test-xstrtoimax.c b/gnulib-tests/test-xstrtoimax.c
new file mode 100644 (file)
index 0000000..cc2f6ae
--- /dev/null
@@ -0,0 +1,4 @@
+#define __xstrtol xstrtoimax
+#define __strtol_t intmax_t
+#define __spec PRIdMAX
+#include "test-xstrtol.c"
similarity index 55%
rename from gnulib-tests/test-xstrtoumax.sh
rename to gnulib-tests/test-xstrtoimax.sh
index bdbdbf5..6a48e67 100755 (executable)
@@ -5,16 +5,16 @@
 too_big=99999999999999999999999999999999999999999999999999999999999999999999
 result=0
 
-# test xstrtoumax
-test-xstrtoumax 1 >> out 2>&1 || result=1
-test-xstrtoumax -1 >> out 2>&1 && result=1
-test-xstrtoumax 1k >> out 2>&1 || result=1
-test-xstrtoumax ${too_big}h >> out 2>&1 && result=1
-test-xstrtoumax $too_big >> out 2>&1 && result=1
-test-xstrtoumax x >> out 2>&1 && result=1
-test-xstrtoumax 9x >> out 2>&1 && result=1
-test-xstrtoumax 010 >> out 2>&1 || result=1
-test-xstrtoumax MiB >> out 2>&1 || result=1
+# test xstrtoimax
+${CHECKER} test-xstrtoimax 1 >> out 2>&1 || result=1
+${CHECKER} test-xstrtoimax -1 >> out 2>&1 || result=1
+${CHECKER} test-xstrtoimax 1k >> out 2>&1 || result=1
+${CHECKER} test-xstrtoimax ${too_big}h >> out 2>&1 && result=1
+${CHECKER} test-xstrtoimax $too_big >> out 2>&1 && result=1
+${CHECKER} test-xstrtoimax x >> out 2>&1 && result=1
+${CHECKER} test-xstrtoimax 9x >> out 2>&1 && result=1
+${CHECKER} test-xstrtoimax 010 >> out 2>&1 || result=1
+${CHECKER} test-xstrtoimax MiB >> out 2>&1 || result=1
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
@@ -31,7 +31,7 @@ mv k out
 # compare expected output
 cat > exp <<EOF
 1->1 ()
-invalid X argument '-1'
+-1->-1 ()
 1k->1024 ()
 invalid suffix in X argument '${too_big}h'
 X argument '$too_big' too large
index 00e537b..f07a1f4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of xstrtol module.
-   Copyright (C) 1995-1996, 1998-2001, 2003-2018 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998-2001, 2003-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include "xstrtol.h"
+#include "xstrtol-error.h"
 #include "error.h"
 
 #ifndef __xstrtol
index 5425bc7..15dd911 100755 (executable)
@@ -6,29 +6,29 @@ too_big=99999999999999999999999999999999999999999999999999999999999999999999
 result=0
 
 # test xstrtol
-test-xstrtol 1 >> out 2>&1 || result=1
-test-xstrtol -1 >> out 2>&1 || result=1
-test-xstrtol 1k >> out 2>&1 || result=1
-test-xstrtol ${too_big}h >> out 2>&1 && result=1
-test-xstrtol $too_big >> out 2>&1 && result=1
-test-xstrtol x >> out 2>&1 && result=1
-test-xstrtol 9x >> out 2>&1 && result=1
-test-xstrtol 010 >> out 2>&1 || result=1
+${CHECKER} test-xstrtol 1 >> out 2>&1 || result=1
+${CHECKER} test-xstrtol -1 >> out 2>&1 || result=1
+${CHECKER} test-xstrtol 1k >> out 2>&1 || result=1
+${CHECKER} test-xstrtol ${too_big}h >> out 2>&1 && result=1
+${CHECKER} test-xstrtol $too_big >> out 2>&1 && result=1
+${CHECKER} test-xstrtol x >> out 2>&1 && result=1
+${CHECKER} test-xstrtol 9x >> out 2>&1 && result=1
+${CHECKER} test-xstrtol 010 >> out 2>&1 || result=1
 # suffix without integer is valid
-test-xstrtol MiB >> out 2>&1 || result=1
-test-xstrtol 1bB >> out 2>&1 && result=1
+${CHECKER} test-xstrtol MiB >> out 2>&1 || result=1
+${CHECKER} test-xstrtol 1bB >> out 2>&1 && result=1
 
 # test xstrtoul
-test-xstrtoul 1 >> out 2>&1 || result=1
-test-xstrtoul -1 >> out 2>&1 && result=1
-test-xstrtoul 1k >> out 2>&1 || result=1
-test-xstrtoul ${too_big}h >> out 2>&1 && result=1
-test-xstrtoul $too_big >> out 2>&1 && result=1
-test-xstrtoul x >> out 2>&1 && result=1
-test-xstrtoul 9x >> out 2>&1 && result=1
-test-xstrtoul 010 >> out 2>&1 || result=1
-test-xstrtoul MiB >> out 2>&1 || result=1
-test-xstrtoul 1bB >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul 1 >> out 2>&1 || result=1
+${CHECKER} test-xstrtoul -1 >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul 1k >> out 2>&1 || result=1
+${CHECKER} test-xstrtoul ${too_big}h >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul $too_big >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul x >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul 9x >> out 2>&1 && result=1
+${CHECKER} test-xstrtoul 010 >> out 2>&1 || result=1
+${CHECKER} test-xstrtoul MiB >> out 2>&1 || result=1
+${CHECKER} test-xstrtoul 1bB >> out 2>&1 && result=1
 
 # Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
 # does not understand '\r'.
diff --git a/gnulib-tests/test-xstrtoumax.c b/gnulib-tests/test-xstrtoumax.c
deleted file mode 100644 (file)
index 2e68c2e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#define __xstrtol xstrtoumax
-#define __strtol_t uintmax_t
-#define __spec PRIuMAX
-#include "test-xstrtol.c"
index d04a4c4..b637444 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of xvasprintf() and xasprintf() functions.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 1913b97..5460a04 100644 (file)
@@ -1,6 +1,6 @@
 /* Add two struct timespec values.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,36 +33,30 @@ timespec_add (struct timespec a, struct timespec b)
   int ns = a.tv_nsec + b.tv_nsec;
   int nsd = ns - TIMESPEC_HZ;
   int rns = ns;
-  time_t tmin = TYPE_MINIMUM (time_t);
-  time_t tmax = TYPE_MAXIMUM (time_t);
 
   if (0 <= nsd)
     {
       rns = nsd;
-      if (bs < tmax)
-        bs++;
+      time_t bs1;
+      if (!INT_ADD_WRAPV (bs, 1, &bs1))
+        bs = bs1;
       else if (rs < 0)
         rs++;
       else
         goto high_overflow;
     }
 
-  /* INT_ADD_WRAPV is not appropriate since time_t might be unsigned.
-     In theory time_t might be narrower than int, so plain
-     INT_ADD_OVERFLOW does not suffice.  */
-  if (! INT_ADD_OVERFLOW (rs, bs) && tmin <= rs + bs && rs + bs <= tmax)
-    rs += bs;
-  else
+  if (INT_ADD_WRAPV (rs, bs, &rs))
     {
-      if (rs < 0)
+      if (bs < 0)
         {
-          rs = tmin;
+          rs = TYPE_MINIMUM (time_t);
           rns = 0;
         }
       else
         {
         high_overflow:
-          rs = tmax;
+          rs = TYPE_MAXIMUM (time_t);
           rns = TIMESPEC_HZ - 1;
         }
     }
index 9eac36e..88ef69a 100644 (file)
@@ -1,6 +1,6 @@
 /* Subtract two struct timespec values.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,36 +33,30 @@ timespec_sub (struct timespec a, struct timespec b)
   time_t bs = b.tv_sec;
   int ns = a.tv_nsec - b.tv_nsec;
   int rns = ns;
-  time_t tmin = TYPE_MINIMUM (time_t);
-  time_t tmax = TYPE_MAXIMUM (time_t);
 
   if (ns < 0)
     {
       rns = ns + TIMESPEC_HZ;
-      if (bs < tmax)
-        bs++;
+      time_t bs1;
+      if (!INT_ADD_WRAPV (bs, 1, &bs1))
+        bs = bs1;
       else if (- TYPE_SIGNED (time_t) < rs)
         rs--;
       else
         goto low_overflow;
     }
 
-  /* INT_SUBTRACT_WRAPV is not appropriate since time_t might be unsigned.
-     In theory time_t might be narrower than int, so plain
-     INT_SUBTRACT_OVERFLOW does not suffice.  */
-  if (! INT_SUBTRACT_OVERFLOW (rs, bs) && tmin <= rs - bs && rs - bs <= tmax)
-    rs -= bs;
-  else
+  if (INT_SUBTRACT_WRAPV (rs, bs, &rs))
     {
-      if (rs < 0)
+      if (0 < bs)
         {
         low_overflow:
-          rs = tmin;
+          rs = TYPE_MINIMUM (time_t);
           rns = 0;
         }
       else
         {
-          rs = tmax;
+          rs = TYPE_MAXIMUM (time_t);
           rns = TIMESPEC_HZ - 1;
         }
     }
index ee25a65..680014b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of u8_mbtoucr() function.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 91c3dea..ed8b077 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of u8_uctomb() function.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index bd3a32e..c957d3c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of uc_width() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 5ba7caa..2a68670 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of uc_width() function.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 2ade585..23866c9 100755 (executable)
@@ -4,7 +4,7 @@ tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
 tmpfiles="$tmpfiles uc_width.out"
-./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
+${CHECKER} ./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
 
 tmpfiles="$tmpfiles uc_width.ok"
 cat > uc_width.ok <<\EOF
diff --git a/gnulib-tests/unused-parameter.h b/gnulib-tests/unused-parameter.h
deleted file mode 100644 (file)
index 40a0ff8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* A C macro for declaring that specific function parameters are not used.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
-   declarations for parameters that are not used.  This helps to reduce
-   warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
-       type param _GL_UNUSED_PARAMETER
-   or more generally
-       param_decl _GL_UNUSED_PARAMETER
-   For example:
-       int param _GL_UNUSED_PARAMETER
-       int *(*param)(void) _GL_UNUSED_PARAMETER
-   Other possible, but obscure and discouraged syntaxes:
-       int _GL_UNUSED_PARAMETER *(*param)(void)
-       _GL_UNUSED_PARAMETER int *(*param)(void)
- */
-#ifndef _GL_UNUSED_PARAMETER
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-#  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
-# else
-#  define _GL_UNUSED_PARAMETER
-# endif
-#endif
index 1e5e584..635a1b2 100644 (file)
@@ -1,18 +1,18 @@
 /* w32sock.h --- internal auxiliary functions for Windows socket functions
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paolo Bonzini */
index 72d67cc..612937a 100644 (file)
@@ -1,17 +1,17 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
   __attribute__ ((__warning__ (message)))
+# elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
+#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
 #  define _GL_WARN_ON_USE(function, message) \
@@ -99,24 +106,35 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
 # endif
 #endif
 
-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
-   is like _GL_WARN_ON_USE (function, "string"), except that the function is
-   declared with the given prototype, consisting of return type, parameters,
-   and attributes.
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
+   is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
+   function is declared with the given prototype, consisting of return type,
+   parameters, and attributes.
    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
    not work in this case.  */
 #ifndef _GL_WARN_ON_USE_CXX
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes \
-     __attribute__ ((__warning__ (msg)))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# if !defined __cplusplus
+#  define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+     _GL_WARN_ON_USE (function, msg)
+# else
+#  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes \
+  __attribute__ ((__warning__ (msg)))
+#  elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_clang function parameters_and_attributes \
+  __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+#  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes
-# else /* Unsupported.  */
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes
+#  else /* Unsupported.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
 _GL_WARN_EXTERN_C int _gl_warn_on_use
+#  endif
 # endif
 #endif
 
index 070f97a..6f6bed5 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert wide character to unibyte character.
-   Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 58c3c0c..ff8dfe9 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 int
index 47addc4..aaf5cee 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
diff --git a/gnulib-tests/windows-thread.c b/gnulib-tests/windows-thread.c
new file mode 100644 (file)
index 0000000..a60967f
--- /dev/null
@@ -0,0 +1,243 @@
+/* Creating and controlling threads (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-thread.h"
+
+#include <errno.h>
+#include <process.h>
+#include <stdlib.h>
+
+#include "windows-once.h"
+#include "windows-tls.h"
+
+/* The Thread-Local Storage (TLS) key that allows to access each thread's
+   'struct glwthread_thread_struct *' pointer.  */
+static DWORD self_key = (DWORD)-1;
+
+/* Initializes self_key.  This function must only be called once.  */
+static void
+do_init_self_key (void)
+{
+  self_key = TlsAlloc ();
+  /* If this fails, we're hosed.  */
+  if (self_key == (DWORD)-1)
+    abort ();
+}
+
+/* Initializes self_key.  */
+static void
+init_self_key (void)
+{
+  static glwthread_once_t once = GLWTHREAD_ONCE_INIT;
+  glwthread_once (&once, do_init_self_key);
+}
+
+/* This structure contains information about a thread.
+   It is stored in TLS under key self_key.  */
+struct glwthread_thread_struct
+{
+  /* Fields for managing the handle.  */
+  HANDLE volatile handle;
+  CRITICAL_SECTION handle_lock;
+  /* Fields for managing the exit value.  */
+  BOOL volatile detached;
+  void * volatile result;
+  /* Fields for managing the thread start.  */
+  void * (*func) (void *);
+  void *arg;
+};
+
+/* Return a real HANDLE object for the current thread.  */
+static HANDLE
+get_current_thread_handle (void)
+{
+  HANDLE this_handle;
+
+  /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic
+     identifier, not a real handle.  */
+  if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (),
+                        GetCurrentProcess (), &this_handle,
+                        0, FALSE, DUPLICATE_SAME_ACCESS))
+    abort ();
+  return this_handle;
+}
+
+glwthread_thread_t
+glwthread_thread_self (void)
+{
+  glwthread_thread_t thread;
+
+  if (self_key == (DWORD)-1)
+    init_self_key ();
+  thread = TlsGetValue (self_key);
+  if (thread == NULL)
+    {
+      /* This happens only in threads that have not been created through
+         glthread_create(), such as the main thread.  */
+      for (;;)
+        {
+          thread =
+            (struct glwthread_thread_struct *)
+            malloc (sizeof (struct glwthread_thread_struct));
+          if (thread != NULL)
+            break;
+          /* Memory allocation failed.  There is not much we can do.  Have to
+             busy-loop, waiting for the availability of memory.  */
+          Sleep (1);
+        }
+
+      thread->handle = get_current_thread_handle ();
+      InitializeCriticalSection (&thread->handle_lock);
+      thread->detached = FALSE; /* This can lead to a memory leak.  */
+      thread->result = NULL; /* just to be deterministic */
+      TlsSetValue (self_key, thread);
+    }
+  return thread;
+}
+
+/* The main function of a freshly creating thread.  It's a wrapper around
+   the FUNC and ARG arguments passed to glthread_create_func.  */
+static unsigned int WINAPI
+wrapper_func (void *varg)
+{
+  struct glwthread_thread_struct *thread =
+    (struct glwthread_thread_struct *) varg;
+
+  EnterCriticalSection (&thread->handle_lock);
+  /* Create a new handle for the thread only if the parent thread did not yet
+     fill in the handle.  */
+  if (thread->handle == NULL)
+    thread->handle = get_current_thread_handle ();
+  LeaveCriticalSection (&thread->handle_lock);
+
+  if (self_key == (DWORD)-1)
+    init_self_key ();
+  TlsSetValue (self_key, thread);
+
+  /* Run the thread.  Store the exit value if the thread was not terminated
+     otherwise.  */
+  thread->result = thread->func (thread->arg);
+
+  /* Process the TLS destructors.  */
+  glwthread_tls_process_destructors ();
+
+  if (thread->detached)
+    {
+      /* Clean up the thread, like thrd_join would do.  */
+      DeleteCriticalSection (&thread->handle_lock);
+      CloseHandle (thread->handle);
+      free (thread);
+    }
+
+  return 0;
+}
+
+int
+glwthread_thread_create (glwthread_thread_t *threadp, unsigned int attr,
+                         void * (*func) (void *), void *arg)
+{
+  struct glwthread_thread_struct *thread =
+    (struct glwthread_thread_struct *)
+    malloc (sizeof (struct glwthread_thread_struct));
+  if (thread == NULL)
+    return ENOMEM;
+  thread->handle = NULL;
+  InitializeCriticalSection (&thread->handle_lock);
+  thread->detached = (attr & GLWTHREAD_ATTR_DETACHED ? TRUE : FALSE);
+  thread->result = NULL; /* just to be deterministic */
+  thread->func = func;
+  thread->arg = arg;
+
+  {
+    unsigned int thread_id;
+    HANDLE thread_handle;
+
+    thread_handle = (HANDLE)
+      _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id);
+      /* calls CreateThread with the same arguments */
+    if (thread_handle == NULL)
+      {
+        DeleteCriticalSection (&thread->handle_lock);
+        free (thread);
+        return EAGAIN;
+      }
+
+    EnterCriticalSection (&thread->handle_lock);
+    if (thread->handle == NULL)
+      thread->handle = thread_handle;
+    else
+      /* thread->handle was already set by the thread itself.  */
+      CloseHandle (thread_handle);
+    LeaveCriticalSection (&thread->handle_lock);
+
+    *threadp = thread;
+    return 0;
+  }
+}
+
+int
+glwthread_thread_join (glwthread_thread_t thread, void **retvalp)
+{
+  if (thread == NULL)
+    return EINVAL;
+
+  if (thread == glwthread_thread_self ())
+    return EDEADLK;
+
+  if (thread->detached)
+    return EINVAL;
+
+  if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED)
+    return EINVAL;
+
+  if (retvalp != NULL)
+    *retvalp = thread->result;
+
+  DeleteCriticalSection (&thread->handle_lock);
+  CloseHandle (thread->handle);
+  free (thread);
+
+  return 0;
+}
+
+int
+glwthread_thread_detach (glwthread_thread_t thread)
+{
+  if (thread == NULL)
+    return EINVAL;
+
+  if (thread->detached)
+    return EINVAL;
+
+  thread->detached = TRUE;
+  return 0;
+}
+
+void
+glwthread_thread_exit (void *retval)
+{
+  glwthread_thread_t thread = glwthread_thread_self ();
+  thread->result = retval;
+  glwthread_tls_process_destructors ();
+  _endthreadex (0); /* calls ExitThread (0) */
+  abort ();
+}
diff --git a/gnulib-tests/windows-thread.h b/gnulib-tests/windows-thread.h
new file mode 100644 (file)
index 0000000..680565d
--- /dev/null
@@ -0,0 +1,55 @@
+/* Creating and controlling threads (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_THREAD_H
+#define _WINDOWS_THREAD_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+/* The glwthread_thread_t is a pointer to a structure in memory.
+   Why not the thread handle?  If it were the thread handle, it would be hard
+   to implement glwthread_thread_self() (since GetCurrentThread () returns a
+   pseudo-handle, DuplicateHandle (GetCurrentThread ()) returns a handle that
+   must be closed afterwards, and there is no function for quickly retrieving
+   a thread handle from its id).
+   Why not the thread id?  I tried it.  It did not work: Sometimes ids appeared
+   that did not belong to running threads, and glthread_join failed with ESRCH.
+ */
+typedef struct glwthread_thread_struct *glwthread_thread_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* attr is a bit mask, consisting of the following bits: */
+#define GLWTHREAD_ATTR_DETACHED 1
+extern int glwthread_thread_create (glwthread_thread_t *threadp,
+                                    unsigned int attr,
+                                    void * (*func) (void *), void *arg);
+extern int glwthread_thread_join (glwthread_thread_t thread, void **retvalp);
+extern int glwthread_thread_detach (glwthread_thread_t thread);
+extern glwthread_thread_t glwthread_thread_self (void);
+extern _Noreturn void glwthread_thread_exit (void *retval);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_THREAD_H */
diff --git a/gnulib-tests/windows-tls.c b/gnulib-tests/windows-tls.c
new file mode 100644 (file)
index 0000000..dfadcfd
--- /dev/null
@@ -0,0 +1,339 @@
+/* Thread-local storage (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-tls.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "windows-once.h"
+
+void *
+glwthread_tls_get (glwthread_tls_key_t key)
+{
+  return TlsGetValue (key);
+}
+
+int
+glwthread_tls_set (glwthread_tls_key_t key, void *value)
+{
+  if (!TlsSetValue (key, value))
+    return EINVAL;
+  return 0;
+}
+
+/* The following variables keep track of TLS keys with non-NULL destructor.  */
+
+static glwthread_once_t dtor_table_init_once = GLWTHREAD_ONCE_INIT;
+
+static CRITICAL_SECTION dtor_table_lock;
+
+struct dtor { glwthread_tls_key_t key; void (*destructor) (void *); };
+
+/* The table of dtors.  */
+static struct dtor *dtor_table;
+/* Number of active entries in the dtor_table.  */
+static unsigned int dtors_count;
+/* Valid indices into dtor_table are 0..dtors_used-1.  */
+static unsigned int dtors_used;
+/* Allocation size of dtor_table.  */
+static unsigned int dtors_allocated;
+/* Invariant: 0 <= dtors_count <= dtors_used <= dtors_allocated.  */
+
+/* Number of threads that are currently processing destructors.  */
+static unsigned int dtor_processing_threads;
+
+static void
+dtor_table_initialize (void)
+{
+  InitializeCriticalSection (&dtor_table_lock);
+  /* The other variables are already initialized to NULL or 0, respectively.  */
+}
+
+static void
+dtor_table_ensure_initialized (void)
+{
+  glwthread_once (&dtor_table_init_once, dtor_table_initialize);
+}
+
+/* Shrinks dtors_used down to dtors_count, by replacing inactive entries
+   with active ones.  */
+static void
+dtor_table_shrink_used (void)
+{
+  unsigned int i = 0;
+  unsigned int j = dtors_used;
+
+  for (;;)
+    {
+      BOOL i_found = FALSE;
+      BOOL j_found = FALSE;
+      /* Find the next inactive entry, from the left.  */
+      for (; i < dtors_count;)
+        {
+          if (dtor_table[i].destructor == NULL)
+            {
+              i_found = TRUE;
+              break;
+            }
+          i++;
+        }
+
+      /* Find the next active entry, from the right.  */
+      for (; j > dtors_count;)
+        {
+          j--;
+          if (dtor_table[j].destructor != NULL)
+            {
+              j_found = TRUE;
+              break;
+            }
+        }
+
+      if (i_found != j_found)
+        /* dtors_count was apparently wrong.  */
+        abort ();
+
+      if (!i_found)
+        break;
+
+      /* i_found and j_found are TRUE.  Swap the two entries.  */
+      dtor_table[i] = dtor_table[j];
+
+      i++;
+    }
+
+  dtors_used = dtors_count;
+}
+
+void
+glwthread_tls_process_destructors (void)
+{
+  unsigned int repeat;
+
+  dtor_table_ensure_initialized ();
+
+  EnterCriticalSection (&dtor_table_lock);
+  if (dtor_processing_threads == 0)
+    {
+      /* Now it's the appropriate time for shrinking dtors_used.  */
+      if (dtors_used > dtors_count)
+        dtor_table_shrink_used ();
+    }
+  dtor_processing_threads++;
+
+  for (repeat = GLWTHREAD_DESTRUCTOR_ITERATIONS; repeat > 0; repeat--)
+    {
+      unsigned int destructors_run = 0;
+
+      /* Iterate across dtor_table.  We don't need to make a copy of dtor_table,
+         because
+           * When another thread calls glwthread_tls_key_create with a non-NULL
+             destructor argument, this will possibly reallocate the dtor_table
+             array and increase dtors_allocated as well as dtors_used and
+             dtors_count, but it will not change dtors_used nor the contents of
+             the first dtors_used entries of dtor_table.
+           * When another thread calls glwthread_tls_key_delete, this will
+             possibly set some 'destructor' member to NULL, thus marking an
+             entry as inactive, but it will not otherwise change dtors_used nor
+             the contents of the first dtors_used entries of dtor_table.  */
+      unsigned int i_limit = dtors_used;
+      unsigned int i;
+
+      for (i = 0; i < i_limit; i++)
+        {
+          struct dtor current = dtor_table[i];
+          if (current.destructor != NULL)
+            {
+              /* The current dtor has not been deleted yet.  */
+              void *current_value = glwthread_tls_get (current.key);
+              if (current_value != NULL)
+                {
+                  /* The current value is non-NULL.  Run the destructor.  */
+                  glwthread_tls_set (current.key, NULL);
+                  LeaveCriticalSection (&dtor_table_lock);
+                  current.destructor (current_value);
+                  EnterCriticalSection (&dtor_table_lock);
+                  destructors_run++;
+                }
+            }
+        }
+
+      /* When all TLS values were already NULL, no further iterations are
+         needed.  */
+      if (destructors_run == 0)
+        break;
+    }
+
+  dtor_processing_threads--;
+  LeaveCriticalSection (&dtor_table_lock);
+}
+
+int
+glwthread_tls_key_create (glwthread_tls_key_t *keyp, void (*destructor) (void *))
+{
+  if (destructor != NULL)
+    {
+      dtor_table_ensure_initialized ();
+
+      EnterCriticalSection (&dtor_table_lock);
+      if (dtor_processing_threads == 0)
+        {
+          /* Now it's the appropriate time for shrinking dtors_used.  */
+          if (dtors_used > dtors_count)
+            dtor_table_shrink_used ();
+        }
+
+      while (dtors_used == dtors_allocated)
+        {
+          /* Need to grow the dtor_table.  */
+          unsigned int new_allocated = 2 * dtors_allocated + 1;
+          if (new_allocated < 7)
+            new_allocated = 7;
+          if (new_allocated <= dtors_allocated) /* overflow? */
+            new_allocated = UINT_MAX;
+
+          LeaveCriticalSection (&dtor_table_lock);
+          {
+            struct dtor *new_table =
+              (struct dtor *) malloc (new_allocated * sizeof (struct dtor));
+            if (new_table == NULL)
+              return ENOMEM;
+            EnterCriticalSection (&dtor_table_lock);
+            /* Attention! dtors_used, dtors_allocated may have changed!  */
+            if (dtors_used < new_allocated)
+              {
+                if (dtors_allocated < new_allocated)
+                  {
+                    /* The new_table is useful.  */
+                    memcpy (new_table, dtor_table,
+                            dtors_used * sizeof (struct dtor));
+                    dtor_table = new_table;
+                    dtors_allocated = new_allocated;
+                  }
+                else
+                  {
+                    /* The new_table is not useful, since another thread
+                       meanwhile allocated a drop_table that is at least
+                       as large.  */
+                    free (new_table);
+                  }
+                break;
+              }
+            /* The new_table is not useful, since other threads increased
+               dtors_used.  Free it any retry.  */
+            free (new_table);
+          }
+        }
+      /* Here dtors_used < dtors_allocated.  */
+      {
+        /* Allocate a new key.  */
+        glwthread_tls_key_t key = TlsAlloc ();
+        if (key == (DWORD)-1)
+          {
+            LeaveCriticalSection (&dtor_table_lock);
+            return EAGAIN;
+          }
+        /* Store the new dtor in the dtor_table, after all used entries.
+           Do not overwrite inactive entries with indices < dtors_used, in order
+           not to disturb glwthread_tls_process_destructors invocations that may
+           be executing in other threads.  */
+        dtor_table[dtors_used].key = key;
+        dtor_table[dtors_used].destructor = destructor;
+        dtors_used++;
+        dtors_count++;
+        LeaveCriticalSection (&dtor_table_lock);
+        *keyp = key;
+      }
+    }
+  else
+    {
+      /* Allocate a new key.  */
+      glwthread_tls_key_t key = TlsAlloc ();
+      if (key == (DWORD)-1)
+        return EAGAIN;
+      *keyp = key;
+    }
+  return 0;
+}
+
+int
+glwthread_tls_key_delete (glwthread_tls_key_t key)
+{
+  /* Should the destructor be called for all threads that are currently running?
+     Probably not, because
+       - ISO C does not specify when the destructor is to be invoked at all.
+       - In POSIX, the destructor functions specified with pthread_key_create()
+         are invoked at thread exit.
+       - It would be hard to implement, because there are no primitives for
+         accessing thread-specific values from a different thread.  */
+  dtor_table_ensure_initialized ();
+
+  EnterCriticalSection (&dtor_table_lock);
+  if (dtor_processing_threads == 0)
+    {
+      /* Now it's the appropriate time for shrinking dtors_used.  */
+      if (dtors_used > dtors_count)
+        dtor_table_shrink_used ();
+      /* Here dtors_used == dtors_count.  */
+
+      /* Find the key in dtor_table.  */
+      {
+        unsigned int i_limit = dtors_used;
+        unsigned int i;
+
+        for (i = 0; i < i_limit; i++)
+          if (dtor_table[i].key == key)
+            {
+              if (i < dtors_used - 1)
+                /* Swap the entries i and dtors_used - 1.  */
+                dtor_table[i] = dtor_table[dtors_used - 1];
+              dtors_count = dtors_used = dtors_used - 1;
+              break;
+            }
+      }
+    }
+  else
+    {
+      /* Be careful not to disturb the glwthread_tls_process_destructors
+         invocations that are executing in other threads.  */
+      unsigned int i_limit = dtors_used;
+      unsigned int i;
+
+      for (i = 0; i < i_limit; i++)
+        if (dtor_table[i].destructor != NULL /* skip inactive entries */
+            && dtor_table[i].key == key)
+          {
+            /* Mark this entry as inactive.  */
+            dtor_table[i].destructor = NULL;
+            dtors_count = dtors_count - 1;
+            break;
+          }
+    }
+  LeaveCriticalSection (&dtor_table_lock);
+  /* Now we have ensured that glwthread_tls_process_destructors will no longer
+     use this key.  */
+
+  if (!TlsFree (key))
+    return EINVAL;
+  return 0;
+}
diff --git a/gnulib-tests/windows-tls.h b/gnulib-tests/windows-tls.h
new file mode 100644 (file)
index 0000000..c822d25
--- /dev/null
@@ -0,0 +1,42 @@
+/* Thread-local storage (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#ifndef _WINDOWS_TLS_H
+#define _WINDOWS_TLS_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+typedef DWORD glwthread_tls_key_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int glwthread_tls_key_create (glwthread_tls_key_t *keyp, void (*destructor) (void *));
+extern void *glwthread_tls_get (glwthread_tls_key_t key);
+extern int glwthread_tls_set (glwthread_tls_key_t key, void *value);
+extern int glwthread_tls_key_delete (glwthread_tls_key_t key);
+extern void glwthread_tls_process_destructors (void);
+#define GLWTHREAD_DESTRUCTOR_ITERATIONS 4
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_TLS_H */
similarity index 96%
rename from lib/xstrtol-error.c
rename to gnulib-tests/xstrtol-error.c
index 8ea6830..80b650f 100644 (file)
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2018 Free Software
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -17,7 +17,7 @@
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
-#include "xstrtol.h"
+#include "xstrtol-error.h"
 
 #include <stdlib.h>
 
diff --git a/gnulib-tests/xstrtol-error.h b/gnulib-tests/xstrtol-error.h
new file mode 100644 (file)
index 0000000..83abc68
--- /dev/null
@@ -0,0 +1,45 @@
+/* Error reporting interface for xstrto* functions.
+
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2021 Free Software
+   Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef XSTRTOL_ERROR_H_
+# define XSTRTOL_ERROR_H_ 1
+
+# include "xstrtol.h"
+
+# include <getopt.h>
+
+/* Report an error for an invalid integer in an option argument.
+
+   ERR is the error code returned by one of the xstrto* functions.
+
+   Use OPT_IDX to decide whether to print the short option string "C"
+   or "-C" or a long option string derived from LONG_OPTION.  OPT_IDX
+   is -2 if the short option "C" was used, without any leading "-"; it
+   is -1 if the short option "-C" was used; otherwise it is an index
+   into LONG_OPTIONS, which should have a name preceded by two '-'
+   characters.
+
+   ARG is the option-argument containing the integer.
+
+   After reporting an error, exit with a failure status.  */
+
+_Noreturn void xstrtol_fatal (enum strtol_error,
+                              int, char, struct option const *,
+                              char const *);
+
+#endif /* not XSTRTOL_ERROR_H_ */
index d5592c5..bfeff50 100644 (file)
@@ -1,5 +1,5 @@
 /* Return a pointer to a zero-size object in memory.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -36,8 +36,9 @@
 /* Test whether mmap() and mprotect() are available.
    We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX.
    HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an
-   mprotect() function in libgcc.a.  */
-#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+   mprotect() function in libgcc.a.
+   And OS/2 kLIBC has <sys/mman.h> and mprotect(), but not mmap().  */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__
 # include <fcntl.h>
 # include <unistd.h>
 # include <sys/types.h>
@@ -58,7 +59,7 @@ zerosize_ptr (void)
 {
 /* Use mmap and mprotect when they exist.  Don't test HAVE_MMAP, because it is
    not defined on HP-UX 11 (since it does not support MAP_FIXED).  */
-#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__
 # if HAVE_MAP_ANONYMOUS
   const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
   const int fd = -1;
index c2407cc..2edb30a 100644 (file)
@@ -1,6 +1,6 @@
 # Automakefile for GNU Diffutils library.
 
-# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free Software
+# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2021 Free Software
 # Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
index 61aa2ce..31a3c99 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 
 # Automakefile for GNU Diffutils library.
 
-# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2018 Free Software
+# Copyright (C) 2001-2002, 2004, 2006, 2009-2013, 2015-2021 Free Software
 # Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -67,7 +67,8 @@
 #  --no-libtool \
 #  --macro-prefix=gl \
 #  --avoid=localename \
-#  --avoid=lock \
+#  --avoid=lock-tests \
+#  --avoid=setlocale \
 #  announce-gen \
 #  argmatch \
 #  binary-io \
@@ -86,7 +87,7 @@
 #  file-type \
 #  filenamecat \
 #  fnmatch-gnu \
-#  getopt \
+#  getopt-gnu \
 #  gettext-h \
 #  gettime \
 #  git-version-gen \
 #  mbrtowc \
 #  mkstemp \
 #  mktime \
+#  nstrftime \
 #  progname \
 #  propername \
 #  rawmemchr \
 #  stat-time \
 #  stdint \
 #  strcase \
-#  strftime \
 #  strptime \
-#  strtoumax \
+#  strtoimax \
 #  sys_wait \
 #  system-quote \
 #  unistd \
 #  unlocked-io \
 #  update-copyright \
-#  vararrays \
 #  verify \
 #  version-etc \
 #  version-etc-fsf \
 #  wcwidth \
 #  xalloc \
 #  xfreopen \
+#  xmalloca \
 #  xreadlink \
-#  xstrtoumax \
+#  xstdopen \
+#  xstrtoimax \
 #  xvasprintf
 
 
@@ -212,19 +214,22 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_1 = unistr/u8-mbtoucr.c
-@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_2 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
-@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_3 = uniwidth/width.c
+@GL_GENERATE_SIGSEGV_H_TRUE@am__append_1 = sigsegv.c stackvma.c
+@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__append_2 = unistr/u8-mbtoucr.c
+@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__append_3 = unistr/u8-uctomb.c unistr/u8-uctomb-aux.c
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__append_4 = uniwidth/width.c
 subdir = lib
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -234,13 +239,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -248,49 +254,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -298,30 +312,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
@@ -338,57 +355,70 @@ am__v_AR_1 =
 libdiffutils_a_AR = $(AR) $(ARFLAGS)
 am__DEPENDENCIES_1 =
 am__libdiffutils_a_SOURCES_DIST = allocator.c areadlink.c argmatch.c \
-       binary-io.h binary-io.c bitrotate.h bitrotate.c c-ctype.h \
-       c-ctype.c c-stack.h c-stack.c c-strcase.h c-strcasecmp.c \
-       c-strncasecmp.c careadlinkat.c cloexec.c diffseq.h dirname.c \
-       basename.c dirname-lgpl.c basename-lgpl.c stripslash.c \
+       basename-lgpl.c binary-io.h binary-io.c bitrotate.h \
+       bitrotate.c c-ctype.h c-ctype.c c-stack.h c-stack.c \
+       c-strcase.h c-strcasecmp.c c-strncasecmp.c careadlinkat.c \
+       cloexec.c diffseq.h dirname.c basename.c dirname-lgpl.c \
+       stripslash.c malloc/dynarray_at_failure.c \
+       malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c \
+       malloc/dynarray_resize.c malloc/dynarray_resize_clear.c \
        exclude.c exitfail.c fd-hook.c file-type.c filenamecat.c \
-       filenamecat-lgpl.c freopen-safer.c getprogname.h getprogname.c \
-       gettext.h gettime.c hard-locale.c hash.c imaxtostr.c \
+       filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \
+       gettime.c hard-locale.c hash.c ialloc.c idx.h imaxtostr.c \
        inttostr.c offtostr.c uinttostr.c umaxtostr.c localcharset.c \
-       malloca.c mbchar.c mbiter.h mbiter.c mbscasecmp.c mbslen.c \
-       mbsstr.c mbuiter.h mbuiter.c minmax.h nstrftime.c progname.h \
-       progname.c propername.h propername.c quotearg.c sh-quote.h \
-       sh-quote.c sig-handler.c size_max.h stat-time.c striconv.h \
-       striconv.c strnlen1.h strnlen1.c system-quote.h system-quote.c \
-       tempname.c timespec.c trim.c unistd.c unistr/u8-mbtoucr.c \
-       unistr/u8-uctomb.c unistr/u8-uctomb-aux.c uniwidth/width.c \
-       version-etc.h version-etc.c version-etc-fsf.c wctype-h.c \
-       xmalloc.c xalloc-die.c xfreopen.c xfreopen.h xreadlink.c \
-       xsize.h xsize.c xstriconv.h xstriconv.c xstrndup.h xstrndup.c \
-       xstrtol.c xstrtoul.c xstrtol-error.c xstrtoumax.c xvasprintf.h \
-       xvasprintf.c xasprintf.c cmpbuf.c prepargs.c
+       glthread/lock.h glthread/lock.c malloca.c mbchar.c mbiter.h \
+       mbiter.c mbscasecmp.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \
+       minmax.h nstrftime.c progname.h progname.c propername.h \
+       propername.c quotearg.c setlocale_null.c sh-quote.h sh-quote.c \
+       sigsegv.c stackvma.c size_max.h stat-time.c stdopen.c \
+       striconv.h striconv.c strnlen1.h strnlen1.c system-quote.h \
+       system-quote.c tempname.c glthread/threadlib.c timespec.c \
+       trim.c unistd.c unistr/u8-mbtoucr.c unistr/u8-uctomb.c \
+       unistr/u8-uctomb-aux.c uniwidth/width.c version-etc.h \
+       version-etc.c version-etc-fsf.c wctype-h.c xmalloc.c \
+       xalloc-die.c xfreopen.c xfreopen.h xmalloca.c xreadlink.c \
+       xsize.h xsize.c xstdopen.c xstriconv.h xstriconv.c \
+       xstrtoimax.c xstrtol.c xstrtoul.c xvasprintf.h xvasprintf.c \
+       xasprintf.c cmpbuf.c prepargs.c
 am__dirstamp = $(am__leading_dot)dirstamp
-@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_1 = unistr/u8-mbtoucr.$(OBJEXT)
-@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_2 = unistr/u8-uctomb.$(OBJEXT) \
+@GL_GENERATE_SIGSEGV_H_TRUE@am__objects_1 = sigsegv.$(OBJEXT) \
+@GL_GENERATE_SIGSEGV_H_TRUE@   stackvma.$(OBJEXT)
+@LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE@am__objects_2 = unistr/u8-mbtoucr.$(OBJEXT)
+@LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@am__objects_3 = unistr/u8-uctomb.$(OBJEXT) \
 @LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE@   unistr/u8-uctomb-aux.$(OBJEXT)
-@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_3 = uniwidth/width.$(OBJEXT)
+@LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE@am__objects_4 = uniwidth/width.$(OBJEXT)
 am_libdiffutils_a_OBJECTS = allocator.$(OBJEXT) areadlink.$(OBJEXT) \
-       argmatch.$(OBJEXT) binary-io.$(OBJEXT) bitrotate.$(OBJEXT) \
-       c-ctype.$(OBJEXT) c-stack.$(OBJEXT) c-strcasecmp.$(OBJEXT) \
-       c-strncasecmp.$(OBJEXT) careadlinkat.$(OBJEXT) \
-       cloexec.$(OBJEXT) dirname.$(OBJEXT) basename.$(OBJEXT) \
-       dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \
-       stripslash.$(OBJEXT) exclude.$(OBJEXT) exitfail.$(OBJEXT) \
-       fd-hook.$(OBJEXT) file-type.$(OBJEXT) filenamecat.$(OBJEXT) \
-       filenamecat-lgpl.$(OBJEXT) freopen-safer.$(OBJEXT) \
+       argmatch.$(OBJEXT) basename-lgpl.$(OBJEXT) binary-io.$(OBJEXT) \
+       bitrotate.$(OBJEXT) c-ctype.$(OBJEXT) c-stack.$(OBJEXT) \
+       c-strcasecmp.$(OBJEXT) c-strncasecmp.$(OBJEXT) \
+       careadlinkat.$(OBJEXT) cloexec.$(OBJEXT) dirname.$(OBJEXT) \
+       basename.$(OBJEXT) dirname-lgpl.$(OBJEXT) stripslash.$(OBJEXT) \
+       malloc/dynarray_at_failure.$(OBJEXT) \
+       malloc/dynarray_emplace_enlarge.$(OBJEXT) \
+       malloc/dynarray_finalize.$(OBJEXT) \
+       malloc/dynarray_resize.$(OBJEXT) \
+       malloc/dynarray_resize_clear.$(OBJEXT) exclude.$(OBJEXT) \
+       exitfail.$(OBJEXT) fd-hook.$(OBJEXT) file-type.$(OBJEXT) \
+       filenamecat.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
        getprogname.$(OBJEXT) gettime.$(OBJEXT) hard-locale.$(OBJEXT) \
-       hash.$(OBJEXT) imaxtostr.$(OBJEXT) inttostr.$(OBJEXT) \
-       offtostr.$(OBJEXT) uinttostr.$(OBJEXT) umaxtostr.$(OBJEXT) \
-       localcharset.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \
+       hash.$(OBJEXT) ialloc.$(OBJEXT) imaxtostr.$(OBJEXT) \
+       inttostr.$(OBJEXT) offtostr.$(OBJEXT) uinttostr.$(OBJEXT) \
+       umaxtostr.$(OBJEXT) localcharset.$(OBJEXT) \
+       glthread/lock.$(OBJEXT) malloca.$(OBJEXT) mbchar.$(OBJEXT) \
        mbiter.$(OBJEXT) mbscasecmp.$(OBJEXT) mbslen.$(OBJEXT) \
        mbsstr.$(OBJEXT) mbuiter.$(OBJEXT) nstrftime.$(OBJEXT) \
        progname.$(OBJEXT) propername.$(OBJEXT) quotearg.$(OBJEXT) \
-       sh-quote.$(OBJEXT) sig-handler.$(OBJEXT) stat-time.$(OBJEXT) \
-       striconv.$(OBJEXT) strnlen1.$(OBJEXT) system-quote.$(OBJEXT) \
-       tempname.$(OBJEXT) timespec.$(OBJEXT) trim.$(OBJEXT) \
-       unistd.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
-       $(am__objects_3) version-etc.$(OBJEXT) \
+       setlocale_null.$(OBJEXT) sh-quote.$(OBJEXT) $(am__objects_1) \
+       stat-time.$(OBJEXT) stdopen.$(OBJEXT) striconv.$(OBJEXT) \
+       strnlen1.$(OBJEXT) system-quote.$(OBJEXT) tempname.$(OBJEXT) \
+       glthread/threadlib.$(OBJEXT) timespec.$(OBJEXT) trim.$(OBJEXT) \
+       unistd.$(OBJEXT) $(am__objects_2) $(am__objects_3) \
+       $(am__objects_4) version-etc.$(OBJEXT) \
        version-etc-fsf.$(OBJEXT) wctype-h.$(OBJEXT) xmalloc.$(OBJEXT) \
-       xalloc-die.$(OBJEXT) xfreopen.$(OBJEXT) xreadlink.$(OBJEXT) \
-       xsize.$(OBJEXT) xstriconv.$(OBJEXT) xstrndup.$(OBJEXT) \
-       xstrtol.$(OBJEXT) xstrtoul.$(OBJEXT) xstrtol-error.$(OBJEXT) \
-       xstrtoumax.$(OBJEXT) xvasprintf.$(OBJEXT) xasprintf.$(OBJEXT) \
+       xalloc-die.$(OBJEXT) xfreopen.$(OBJEXT) xmalloca.$(OBJEXT) \
+       xreadlink.$(OBJEXT) xsize.$(OBJEXT) xstdopen.$(OBJEXT) \
+       xstriconv.$(OBJEXT) xstrtoimax.$(OBJEXT) xstrtol.$(OBJEXT) \
+       xstrtoul.$(OBJEXT) xvasprintf.$(OBJEXT) xasprintf.$(OBJEXT) \
        cmpbuf.$(OBJEXT) prepargs.$(OBJEXT)
 libdiffutils_a_OBJECTS = $(am_libdiffutils_a_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
@@ -406,14 +436,14 @@ am__v_at_1 =
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__maybe_remake_depfiles = depfiles
-am__depfiles_remade = ./$(DEPDIR)/alloca.Po ./$(DEPDIR)/allocator.Po \
-       ./$(DEPDIR)/anytostr.Po ./$(DEPDIR)/areadlink.Po \
-       ./$(DEPDIR)/argmatch.Po ./$(DEPDIR)/asnprintf.Po \
-       ./$(DEPDIR)/asprintf.Po ./$(DEPDIR)/basename-lgpl.Po \
-       ./$(DEPDIR)/basename.Po ./$(DEPDIR)/binary-io.Po \
-       ./$(DEPDIR)/bitrotate.Po ./$(DEPDIR)/btowc.Po \
-       ./$(DEPDIR)/c-ctype.Po ./$(DEPDIR)/c-stack.Po \
-       ./$(DEPDIR)/c-strcasecmp.Po ./$(DEPDIR)/c-strncasecmp.Po \
+am__depfiles_remade = ./$(DEPDIR)/allocator.Po ./$(DEPDIR)/anytostr.Po \
+       ./$(DEPDIR)/areadlink.Po ./$(DEPDIR)/argmatch.Po \
+       ./$(DEPDIR)/asnprintf.Po ./$(DEPDIR)/asprintf.Po \
+       ./$(DEPDIR)/basename-lgpl.Po ./$(DEPDIR)/basename.Po \
+       ./$(DEPDIR)/binary-io.Po ./$(DEPDIR)/bitrotate.Po \
+       ./$(DEPDIR)/btowc.Po ./$(DEPDIR)/c-ctype.Po \
+       ./$(DEPDIR)/c-stack.Po ./$(DEPDIR)/c-strcasecmp.Po \
+       ./$(DEPDIR)/c-strncasecmp.Po ./$(DEPDIR)/calloc.Po \
        ./$(DEPDIR)/careadlinkat.Po ./$(DEPDIR)/cloexec.Po \
        ./$(DEPDIR)/close.Po ./$(DEPDIR)/cmpbuf.Po \
        ./$(DEPDIR)/dirname-lgpl.Po ./$(DEPDIR)/dirname.Po \
@@ -423,47 +453,52 @@ am__depfiles_remade = ./$(DEPDIR)/alloca.Po ./$(DEPDIR)/allocator.Po \
        ./$(DEPDIR)/file-type.Po ./$(DEPDIR)/filenamecat-lgpl.Po \
        ./$(DEPDIR)/filenamecat.Po ./$(DEPDIR)/float.Po \
        ./$(DEPDIR)/fnmatch.Po ./$(DEPDIR)/fnmatch_loop.Po \
-       ./$(DEPDIR)/freopen-safer.Po ./$(DEPDIR)/freopen.Po \
-       ./$(DEPDIR)/fstat.Po ./$(DEPDIR)/getdtablesize.Po \
-       ./$(DEPDIR)/getopt.Po ./$(DEPDIR)/getopt1.Po \
-       ./$(DEPDIR)/getprogname.Po ./$(DEPDIR)/gettime.Po \
-       ./$(DEPDIR)/gettimeofday.Po ./$(DEPDIR)/hard-locale.Po \
-       ./$(DEPDIR)/hash.Po ./$(DEPDIR)/iconv.Po \
+       ./$(DEPDIR)/fopen.Po ./$(DEPDIR)/free.Po \
+       ./$(DEPDIR)/freopen.Po ./$(DEPDIR)/fstat.Po \
+       ./$(DEPDIR)/getdtablesize.Po ./$(DEPDIR)/getopt.Po \
+       ./$(DEPDIR)/getopt1.Po ./$(DEPDIR)/getpagesize.Po \
+       ./$(DEPDIR)/getprogname.Po ./$(DEPDIR)/getrandom.Po \
+       ./$(DEPDIR)/gettime.Po ./$(DEPDIR)/gettimeofday.Po \
+       ./$(DEPDIR)/hard-locale.Po ./$(DEPDIR)/hash.Po \
+       ./$(DEPDIR)/ialloc.Po ./$(DEPDIR)/iconv.Po \
        ./$(DEPDIR)/iconv_close.Po ./$(DEPDIR)/iconv_open.Po \
        ./$(DEPDIR)/imaxtostr.Po ./$(DEPDIR)/inttostr.Po \
        ./$(DEPDIR)/isblank.Po ./$(DEPDIR)/iswblank.Po \
-       ./$(DEPDIR)/itold.Po ./$(DEPDIR)/localcharset.Po \
-       ./$(DEPDIR)/localeconv.Po ./$(DEPDIR)/localtime-buffer.Po \
+       ./$(DEPDIR)/iswdigit.Po ./$(DEPDIR)/iswxdigit.Po \
+       ./$(DEPDIR)/itold.Po ./$(DEPDIR)/lc-charset-dispatch.Po \
+       ./$(DEPDIR)/localcharset.Po ./$(DEPDIR)/localeconv.Po \
        ./$(DEPDIR)/lstat.Po ./$(DEPDIR)/malloc.Po \
        ./$(DEPDIR)/malloca.Po ./$(DEPDIR)/mbchar.Po \
        ./$(DEPDIR)/mbiter.Po ./$(DEPDIR)/mbrtowc.Po \
        ./$(DEPDIR)/mbscasecmp.Po ./$(DEPDIR)/mbsinit.Po \
        ./$(DEPDIR)/mbslen.Po ./$(DEPDIR)/mbsrtowcs-state.Po \
        ./$(DEPDIR)/mbsrtowcs.Po ./$(DEPDIR)/mbsstr.Po \
-       ./$(DEPDIR)/mbtowc.Po ./$(DEPDIR)/mbuiter.Po \
-       ./$(DEPDIR)/memchr.Po ./$(DEPDIR)/mkdir.Po \
+       ./$(DEPDIR)/mbtowc-lock.Po ./$(DEPDIR)/mbtowc.Po \
+       ./$(DEPDIR)/mbuiter.Po ./$(DEPDIR)/memchr.Po \
+       ./$(DEPDIR)/mempcpy.Po ./$(DEPDIR)/mkdir.Po \
        ./$(DEPDIR)/mkstemp.Po ./$(DEPDIR)/mktime.Po \
        ./$(DEPDIR)/msvc-inval.Po ./$(DEPDIR)/msvc-nothrow.Po \
-       ./$(DEPDIR)/nl_langinfo.Po ./$(DEPDIR)/nstrftime.Po \
-       ./$(DEPDIR)/offtostr.Po ./$(DEPDIR)/open.Po \
-       ./$(DEPDIR)/prepargs.Po ./$(DEPDIR)/printf-args.Po \
-       ./$(DEPDIR)/printf-parse.Po ./$(DEPDIR)/progname.Po \
-       ./$(DEPDIR)/propername.Po ./$(DEPDIR)/quotearg.Po \
-       ./$(DEPDIR)/raise.Po ./$(DEPDIR)/rawmemchr.Po \
-       ./$(DEPDIR)/readlink.Po ./$(DEPDIR)/regcomp.Po \
-       ./$(DEPDIR)/regex.Po ./$(DEPDIR)/regex_internal.Po \
-       ./$(DEPDIR)/regexec.Po ./$(DEPDIR)/setenv.Po \
-       ./$(DEPDIR)/sh-quote.Po ./$(DEPDIR)/sig-handler.Po \
-       ./$(DEPDIR)/sigaction.Po ./$(DEPDIR)/sigprocmask.Po \
+       ./$(DEPDIR)/nl_langinfo-lock.Po ./$(DEPDIR)/nl_langinfo.Po \
+       ./$(DEPDIR)/nstrftime.Po ./$(DEPDIR)/offtostr.Po \
+       ./$(DEPDIR)/open.Po ./$(DEPDIR)/prepargs.Po \
+       ./$(DEPDIR)/printf-args.Po ./$(DEPDIR)/printf-parse.Po \
+       ./$(DEPDIR)/progname.Po ./$(DEPDIR)/propername.Po \
+       ./$(DEPDIR)/quotearg.Po ./$(DEPDIR)/raise.Po \
+       ./$(DEPDIR)/rawmemchr.Po ./$(DEPDIR)/readlink.Po \
+       ./$(DEPDIR)/realloc.Po ./$(DEPDIR)/reallocarray.Po \
+       ./$(DEPDIR)/regcomp.Po ./$(DEPDIR)/regex.Po \
+       ./$(DEPDIR)/regex_internal.Po ./$(DEPDIR)/regexec.Po \
+       ./$(DEPDIR)/setenv.Po ./$(DEPDIR)/setlocale-lock.Po \
+       ./$(DEPDIR)/setlocale_null.Po ./$(DEPDIR)/sh-quote.Po \
+       ./$(DEPDIR)/sigsegv.Po ./$(DEPDIR)/stackvma.Po \
        ./$(DEPDIR)/stat-time.Po ./$(DEPDIR)/stat-w32.Po \
-       ./$(DEPDIR)/stat.Po ./$(DEPDIR)/strcasecmp.Po \
-       ./$(DEPDIR)/strerror-override.Po ./$(DEPDIR)/strerror.Po \
-       ./$(DEPDIR)/striconv.Po ./$(DEPDIR)/stripslash.Po \
-       ./$(DEPDIR)/strncasecmp.Po ./$(DEPDIR)/strndup.Po \
+       ./$(DEPDIR)/stat.Po ./$(DEPDIR)/stdopen.Po \
+       ./$(DEPDIR)/strcasecmp.Po ./$(DEPDIR)/strerror-override.Po \
+       ./$(DEPDIR)/strerror.Po ./$(DEPDIR)/striconv.Po \
+       ./$(DEPDIR)/stripslash.Po ./$(DEPDIR)/strncasecmp.Po \
        ./$(DEPDIR)/strnlen.Po ./$(DEPDIR)/strnlen1.Po \
        ./$(DEPDIR)/strptime.Po ./$(DEPDIR)/strtoimax.Po \
-       ./$(DEPDIR)/strtol.Po ./$(DEPDIR)/strtoul.Po \
-       ./$(DEPDIR)/strtoull.Po ./$(DEPDIR)/strtoumax.Po \
+       ./$(DEPDIR)/strtol.Po ./$(DEPDIR)/strtoll.Po \
        ./$(DEPDIR)/system-quote.Po ./$(DEPDIR)/tempname.Po \
        ./$(DEPDIR)/time_r.Po ./$(DEPDIR)/time_rz.Po \
        ./$(DEPDIR)/timegm.Po ./$(DEPDIR)/timespec.Po \
@@ -473,13 +508,23 @@ am__depfiles_remade = ./$(DEPDIR)/alloca.Po ./$(DEPDIR)/allocator.Po \
        ./$(DEPDIR)/vasnprintf.Po ./$(DEPDIR)/vasprintf.Po \
        ./$(DEPDIR)/version-etc-fsf.Po ./$(DEPDIR)/version-etc.Po \
        ./$(DEPDIR)/wcrtomb.Po ./$(DEPDIR)/wctype-h.Po \
-       ./$(DEPDIR)/wcwidth.Po ./$(DEPDIR)/xalloc-die.Po \
+       ./$(DEPDIR)/wcwidth.Po ./$(DEPDIR)/windows-mutex.Po \
+       ./$(DEPDIR)/windows-once.Po ./$(DEPDIR)/windows-recmutex.Po \
+       ./$(DEPDIR)/windows-rwlock.Po ./$(DEPDIR)/wmemchr.Po \
+       ./$(DEPDIR)/wmempcpy.Po ./$(DEPDIR)/xalloc-die.Po \
        ./$(DEPDIR)/xasprintf.Po ./$(DEPDIR)/xfreopen.Po \
-       ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xreadlink.Po \
-       ./$(DEPDIR)/xsize.Po ./$(DEPDIR)/xstriconv.Po \
-       ./$(DEPDIR)/xstrndup.Po ./$(DEPDIR)/xstrtol-error.Po \
-       ./$(DEPDIR)/xstrtol.Po ./$(DEPDIR)/xstrtoul.Po \
-       ./$(DEPDIR)/xstrtoumax.Po ./$(DEPDIR)/xvasprintf.Po \
+       ./$(DEPDIR)/xmalloc.Po ./$(DEPDIR)/xmalloca.Po \
+       ./$(DEPDIR)/xreadlink.Po ./$(DEPDIR)/xsize.Po \
+       ./$(DEPDIR)/xstdopen.Po ./$(DEPDIR)/xstriconv.Po \
+       ./$(DEPDIR)/xstrtoimax.Po ./$(DEPDIR)/xstrtol.Po \
+       ./$(DEPDIR)/xstrtoul.Po ./$(DEPDIR)/xvasprintf.Po \
+       glthread/$(DEPDIR)/lock.Po glthread/$(DEPDIR)/threadlib.Po \
+       malloc/$(DEPDIR)/dynarray-skeleton.Po \
+       malloc/$(DEPDIR)/dynarray_at_failure.Po \
+       malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po \
+       malloc/$(DEPDIR)/dynarray_finalize.Po \
+       malloc/$(DEPDIR)/dynarray_resize.Po \
+       malloc/$(DEPDIR)/dynarray_resize_clear.Po \
        unistr/$(DEPDIR)/u8-mbtoucr.Po \
        unistr/$(DEPDIR)/u8-uctomb-aux.Po \
        unistr/$(DEPDIR)/u8-uctomb.Po uniwidth/$(DEPDIR)/width.Po
@@ -505,8 +550,8 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 HEADERS = $(noinst_HEADERS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-       $(LISP)config.hin
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+       config.hin
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
 # *not* preserved.
@@ -523,10 +568,8 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.hin \
-       $(srcdir)/gnulib.mk $(top_srcdir)/build-aux/depcomp alloca.c
+       $(srcdir)/gnulib.mk $(top_srcdir)/build-aux/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALLOCA = @ALLOCA@
@@ -548,9 +591,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -565,321 +611,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -914,13 +1050,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -942,17 +1079,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -968,7 +1109,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -977,7 +1117,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -1000,11 +1140,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -1021,10 +1220,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -1038,14 +1242,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -1059,23 +1268,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -1114,12 +1324,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -1140,20 +1353,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -1162,8 +1389,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -1184,6 +1413,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -1193,6 +1424,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -1216,6 +1448,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -1225,6 +1459,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -1249,31 +1484,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1293,6 +1540,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1300,10 +1548,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1325,7 +1576,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1337,29 +1590,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1371,6 +1680,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1381,6 +1691,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1407,6 +1722,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1415,6 +1731,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1428,10 +1745,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1505,68 +1824,78 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
-BUILT_SOURCES = $(ALLOCA_H) ctype.h $(ERRNO_H) fcntl.h $(FLOAT_H) \
+BUILT_SOURCES = $(ALLOCA_H) ctype.h malloc/dynarray.gl.h \
+       malloc/dynarray-skeleton.gl.h $(ERRNO_H) fcntl.h $(FLOAT_H) \
        $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(ICONV_H) \
        iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h \
-       iconv_open-osf.h iconv_open-solaris.h inttypes.h langinfo.h \
-       $(LIMITS_H) locale.h signal.h $(STDARG_H) $(STDBOOL_H) \
+       iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h \
+       inttypes.h langinfo.h $(LIMITS_H) locale.h signal.h \
+       $(SIGSEGV_H) $(STDALIGN_H) $(STDARG_H) $(STDBOOL_H) \
        $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h strings.h \
-       sys/stat.h sys/time.h sys/types.h sys/wait.h time.h unistd.h \
-       $(LIBUNISTRING_UNISTR_H) $(LIBUNISTRING_UNITYPES_H) \
-       $(LIBUNISTRING_UNIWIDTH_H) wchar.h wctype.h
+       sys/random.h sys/stat.h sys/time.h sys/types.h sys/wait.h \
+       time.h unistd.h $(LIBUNISTRING_UNISTR_H) \
+       $(LIBUNISTRING_UNITYPES_H) $(LIBUNISTRING_UNIWIDTH_H) wchar.h \
+       wctype.h
 CLEANFILES = 
 
 #if GNU_MAKE
 #      [nicer features that work only with GNU Make]
 #else
 #      [fallback features that work in any 'make' implementation; see
-#      http://www.opengroup.org/susv3/utilities/make.html
-#      for the 2004 POSIX specification]
+#      https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
+#      for the POSIX specification]
 #endif
-EXTRA_DIST = alloca.c alloca.in.h allocator.h \
+EXTRA_DIST = alloca.in.h allocator.h \
        $(top_srcdir)/build-aux/announce-gen areadlink.h argmatch.h \
-       assure.h btowc.c c-strcaseeq.h careadlinkat.h cloexec.h \
-       close.c ctype.in.h stripslash.c dirname.h \
-       $(top_srcdir)/build-aux/do-release-commit-and-tag dosname.h \
-       dup2.c errno.in.h error.c error.h exclude.h exitfail.h fcntl.c \
+       assure.h attribute.h basename-lgpl.h btowc.c c-strcaseeq.h \
+       calloc.c calloc.c careadlinkat.h cloexec.h close.c ctype.in.h \
+       stripslash.c dirname.h \
+       $(top_srcdir)/build-aux/do-release-commit-and-tag dup2.c \
+       dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h \
+       errno.in.h error.c error.h exclude.h exitfail.h fcntl.c \
        fcntl.in.h fd-hook.h file-type.h filename.h filenamecat.h \
        flexmember.h float.c float.in.h itold.c fnmatch.c \
-       fnmatch_loop.c fnmatch.in.h freopen.c stdio--.h stdio-safer.h \
-       fstat.c stat-w32.c stat-w32.h \
+       fnmatch_loop.c fnmatch.c fnmatch.in.h fopen.c fopen.c free.c \
+       freopen.c fstat.c stat-w32.c stat-w32.h \
        $(top_srcdir)/build-aux/gendocs.sh getdtablesize.c \
        getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h \
        getopt-pfx-ext.h getopt.c getopt.in.h getopt1.c getopt_int.h \
-       gettimeofday.c $(top_srcdir)/build-aux/git-version-gen \
+       getpagesize.c getrandom.c gettimeofday.c \
+       $(top_srcdir)/build-aux/git-version-gen \
        $(top_srcdir)/build-aux/gitlog-to-changelog \
        $(top_srcdir)/build-aux/gnu-web-doc-update \
        $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
        hard-locale.h hash.h $(top_srcdir)/build-aux/config.rpath \
-       iconv.in.h iconv_open-aix.h iconv_open-hpux.h \
+       ialloc.h iconv.in.h iconv_open-aix.h iconv_open-hpux.h \
        iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h \
-       iconv.c iconv_close.c iconv_open-aix.gperf \
+       iconv_open-zos.h iconv.c iconv_close.c iconv_open-aix.gperf \
        iconv_open-hpux.gperf iconv_open-irix.gperf \
-       iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c \
-       ignore-value.h intprops.h anytostr.c inttostr.h inttypes.in.h \
-       isblank.c iswblank.c langinfo.in.h cdefs.h libc-config.h \
-       limits.in.h localcharset.h locale.in.h localeconv.c \
-       localtime-buffer.c localtime-buffer.h lstat.c \
-       $(top_srcdir)/maint.mk malloc.c malloca.h mbchar.h mbrtowc.c \
-       mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c \
-       str-kmp.h mbtowc-impl.h mbtowc.c memchr.c memchr.valgrind \
-       mkdir.c mkstemp.c mktime-internal.h mktime.c mktime-internal.h \
-       mktime.c msvc-inval.c msvc-inval.h msvc-nothrow.c \
-       msvc-nothrow.h nl_langinfo.c strftime.h open.c pathmax.h \
-       quote.h quote.h quotearg.h raise.c rawmemchr.c \
-       rawmemchr.valgrind readlink.c regcomp.c regex.c regex.h \
-       regex_internal.c regex_internal.h regexec.c setenv.c \
-       sig-handler.h sigaction.c signal.in.h sigprocmask.c \
-       _Noreturn.h arg-nonnull.h c++defs.h unused-parameter.h \
-       warn-on-use.h stat-w32.c stat-w32.h stat.c stat-macros.h \
-       stat-time.h stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \
-       stdio.in.h stdlib.in.h strcasecmp.c strncasecmp.c streq.h \
-       strerror.c strerror-override.c strerror-override.h string.in.h \
-       strings.in.h strndup.c strnlen.c strptime.c strtol.c strtoul.c \
-       strtoull.c strtoimax.c strtoumax.c sys_stat.in.h sys_time.in.h \
+       iconv_open-osf.gperf iconv_open-solaris.gperf \
+       iconv_open-zos.gperf iconv_open.c ignore-value.h intprops.h \
+       anytostr.c inttostr.h inttypes.in.h isblank.c iswblank.c \
+       iswdigit.c iswxdigit.c langinfo.in.h cdefs.h libc-config.h \
+       limits.in.h localcharset.h locale.in.h localeconv.c lstat.c \
+       $(top_srcdir)/maint.mk malloc.c malloc.c malloca.h mbchar.h \
+       lc-charset-dispatch.c lc-charset-dispatch.h \
+       mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c \
+       mbtowc-lock.h windows-initguard.h mbsinit.c mbsrtowcs-impl.h \
+       mbsrtowcs-state.c mbsrtowcs.c str-kmp.h mbtowc-impl.h mbtowc.c \
+       memchr.c memchr.valgrind mempcpy.c mkdir.c mkstemp.c \
+       mktime-internal.h mktime.c mktime-internal.h mktime.c \
+       msvc-inval.c msvc-inval.h msvc-nothrow.c msvc-nothrow.h \
+       nl_langinfo-lock.c nl_langinfo.c windows-initguard.h \
+       strftime.h open.c pathmax.h quote.h quote.h quotearg.h raise.c \
+       rawmemchr.c rawmemchr.valgrind readlink.c realloc.c realloc.c \
+       reallocarray.c regcomp.c regex.c regex.h regex_internal.c \
+       regex_internal.h regexec.c setenv.c setlocale-lock.c \
+       setlocale_null.h windows-initguard.h signal.in.h sigsegv.in.h \
+       stackvma.h _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h \
+       stat-w32.c stat-w32.h stat.c stat-macros.h stat-time.h \
+       stdalign.in.h stdarg.in.h stdbool.in.h stddef.in.h stdint.in.h \
+       stdio.in.h stdlib.in.h stdopen.h strcasecmp.c strncasecmp.c \
+       streq.h strerror.c strerror-override.c strerror-override.h \
+       string.in.h strings.in.h strnlen.c strptime.c strtoimax.c \
+       strtol.c strtoll.c sys_random.in.h sys_stat.in.h sys_time.in.h \
        sys_types.in.h sys_wait.in.h tempname.h time.in.h time_r.c \
        time-internal.h time_rz.c mktime-internal.h timegm.c \
        timespec.h trim.h tzset.c unistd.in.h unistr.in.h \
@@ -1577,74 +1906,91 @@ EXTRA_DIST = alloca.c alloca.in.h allocator.h \
        float+.h printf-args.c printf-args.h printf-parse.c \
        printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \
        vasprintf.c $(top_srcdir)/build-aux/vc-list-files verify.h \
-       wchar.in.h wcrtomb.c wctype.in.h wcwidth.c xalloc.h \
-       xalloc-oversized.h xreadlink.h xstrtol.h xalloc.h
-MOSTLYCLEANDIRS = sys sys
+       wchar.in.h wcrtomb.c wctype.in.h wcwidth.c windows-initguard.h \
+       windows-mutex.c windows-mutex.h windows-once.c windows-once.h \
+       windows-initguard.h windows-recmutex.c windows-recmutex.h \
+       windows-initguard.h windows-rwlock.c windows-rwlock.h \
+       wmemchr-impl.h wmemchr.c wmempcpy.c xalloc.h xalloc.h \
+       xalloc-oversized.h xmalloca.h xreadlink.h xstdopen.h xstrtol.h \
+       xalloc.h
+MOSTLYCLEANDIRS = sys sys sys
 MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t ctype.h \
-       ctype.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \
-       float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \
-       getopt-cdefs.h getopt-cdefs.h-t iconv.h iconv.h-t \
-       iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t \
-       iconv_open-osf.h-t iconv_open-solaris.h-t inttypes.h \
+       ctype.h-t malloc/dynarray.gl.h malloc/dynarray.gl.h-t \
+       malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t \
+       errno.h errno.h-t fcntl.h fcntl.h-t float.h float.h-t \
+       fnmatch.h fnmatch.h-t getopt.h getopt.h-t getopt-cdefs.h \
+       getopt-cdefs.h-t iconv.h iconv.h-t iconv_open-aix.h-t \
+       iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t \
+       iconv_open-solaris.h-t iconv_open-zos.h-t inttypes.h \
        inttypes.h-t langinfo.h langinfo.h-t limits.h limits.h-t \
-       locale.h locale.h-t signal.h signal.h-t stdarg.h stdarg.h-t \
-       stdbool.h stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t \
-       stdio.h stdio.h-t stdlib.h stdlib.h-t string.h string.h-t \
-       strings.h strings.h-t sys/stat.h sys/stat.h-t sys/time.h \
-       sys/time.h-t sys/types.h sys/types.h-t sys/wait.h sys/wait.h-t \
-       time.h time.h-t unistd.h unistd.h-t unistr.h unistr.h-t \
-       unitypes.h unitypes.h-t uniwidth.h uniwidth.h-t wchar.h \
-       wchar.h-t wctype.h wctype.h-t
+       locale.h locale.h-t signal.h signal.h-t sigsegv.h sigsegv.h-t \
+       stdalign.h stdalign.h-t stdarg.h stdarg.h-t stdbool.h \
+       stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
+       stdio.h-t stdlib.h stdlib.h-t string.h string.h-t strings.h \
+       strings.h-t sys/random.h sys/random.h-t sys/stat.h \
+       sys/stat.h-t sys/time.h sys/time.h-t sys/types.h sys/types.h-t \
+       sys/wait.h sys/wait.h-t time.h time.h-t unistd.h unistd.h-t \
+       unistr.h unistr.h-t unitypes.h unitypes.h-t uniwidth.h \
+       uniwidth.h-t wchar.h wchar.h-t wctype.h wctype.h-t
 MAINTAINERCLEANFILES = iconv_open-aix.h iconv_open-hpux.h \
-       iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+       iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h \
+       iconv_open-zos.h
 SUFFIXES = 
 # No GNU Make output.
 noinst_LIBRARIES = libdiffutils.a
 noinst_HEADERS = cmpbuf.h prepargs.h
 libdiffutils_a_SOURCES = allocator.c areadlink.c argmatch.c \
-       binary-io.h binary-io.c bitrotate.h bitrotate.c c-ctype.h \
-       c-ctype.c c-stack.h c-stack.c c-strcase.h c-strcasecmp.c \
-       c-strncasecmp.c careadlinkat.c cloexec.c diffseq.h dirname.c \
-       basename.c dirname-lgpl.c basename-lgpl.c stripslash.c \
+       basename-lgpl.c binary-io.h binary-io.c bitrotate.h \
+       bitrotate.c c-ctype.h c-ctype.c c-stack.h c-stack.c \
+       c-strcase.h c-strcasecmp.c c-strncasecmp.c careadlinkat.c \
+       cloexec.c diffseq.h dirname.c basename.c dirname-lgpl.c \
+       stripslash.c malloc/dynarray_at_failure.c \
+       malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c \
+       malloc/dynarray_resize.c malloc/dynarray_resize_clear.c \
        exclude.c exitfail.c fd-hook.c file-type.c filenamecat.c \
-       filenamecat-lgpl.c freopen-safer.c getprogname.h getprogname.c \
-       gettext.h gettime.c hard-locale.c hash.c imaxtostr.c \
+       filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \
+       gettime.c hard-locale.c hash.c ialloc.c idx.h imaxtostr.c \
        inttostr.c offtostr.c uinttostr.c umaxtostr.c localcharset.c \
-       malloca.c mbchar.c mbiter.h mbiter.c mbscasecmp.c mbslen.c \
-       mbsstr.c mbuiter.h mbuiter.c minmax.h nstrftime.c progname.h \
-       progname.c propername.h propername.c quotearg.c sh-quote.h \
-       sh-quote.c sig-handler.c size_max.h stat-time.c striconv.h \
+       glthread/lock.h glthread/lock.c malloca.c mbchar.c mbiter.h \
+       mbiter.c mbscasecmp.c mbslen.c mbsstr.c mbuiter.h mbuiter.c \
+       minmax.h nstrftime.c progname.h progname.c propername.h \
+       propername.c quotearg.c setlocale_null.c sh-quote.h sh-quote.c \
+       $(am__append_1) size_max.h stat-time.c stdopen.c striconv.h \
        striconv.c strnlen1.h strnlen1.c system-quote.h system-quote.c \
-       tempname.c timespec.c trim.c unistd.c $(am__append_1) \
-       $(am__append_2) $(am__append_3) version-etc.h version-etc.c \
-       version-etc-fsf.c wctype-h.c xmalloc.c xalloc-die.c xfreopen.c \
-       xfreopen.h xreadlink.c xsize.h xsize.c xstriconv.h xstriconv.c \
-       xstrndup.h xstrndup.c xstrtol.c xstrtoul.c xstrtol-error.c \
-       xstrtoumax.c xvasprintf.h xvasprintf.c xasprintf.c cmpbuf.c \
-       prepargs.c
-libdiffutils_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
-libdiffutils_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
-EXTRA_libdiffutils_a_SOURCES = alloca.c btowc.c close.c stripslash.c \
-       dup2.c error.c fcntl.c float.c itold.c fnmatch.c \
-       fnmatch_loop.c freopen.c fstat.c stat-w32.c getdtablesize.c \
-       getopt.c getopt1.c gettimeofday.c iconv.c iconv_close.c \
-       iconv_open.c anytostr.c isblank.c iswblank.c localeconv.c \
-       localtime-buffer.c lstat.c malloc.c mbrtowc.c mbsinit.c \
-       mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c mkdir.c \
-       mkstemp.c mktime.c mktime.c msvc-inval.c msvc-nothrow.c \
-       nl_langinfo.c open.c raise.c rawmemchr.c readlink.c regcomp.c \
-       regex.c regex_internal.c regexec.c setenv.c sigaction.c \
-       sigprocmask.c stat-w32.c stat.c strcasecmp.c strncasecmp.c \
-       strerror.c strerror-override.c strndup.c strnlen.c strptime.c \
-       strtol.c strtoul.c strtoull.c strtoimax.c strtoumax.c time_r.c \
-       time_rz.c timegm.c tzset.c unsetenv.c asnprintf.c \
-       printf-args.c printf-parse.c vasnprintf.c asprintf.c \
-       vasprintf.c wcrtomb.c wcwidth.c
+       tempname.c glthread/threadlib.c timespec.c trim.c unistd.c \
+       $(am__append_2) $(am__append_3) $(am__append_4) version-etc.h \
+       version-etc.c version-etc-fsf.c wctype-h.c xmalloc.c \
+       xalloc-die.c xfreopen.c xfreopen.h xmalloca.c xreadlink.c \
+       xsize.h xsize.c xstdopen.c xstriconv.h xstriconv.c \
+       xstrtoimax.c xstrtol.c xstrtoul.c xvasprintf.h xvasprintf.c \
+       xasprintf.c cmpbuf.c prepargs.c
+libdiffutils_a_LIBADD = $(gl_LIBOBJS)
+libdiffutils_a_DEPENDENCIES = $(gl_LIBOBJS)
+EXTRA_libdiffutils_a_SOURCES = btowc.c calloc.c calloc.c close.c \
+       stripslash.c dup2.c malloc/dynarray-skeleton.c error.c fcntl.c \
+       float.c itold.c fnmatch.c fnmatch_loop.c fnmatch.c fopen.c \
+       fopen.c free.c freopen.c fstat.c stat-w32.c getdtablesize.c \
+       getopt.c getopt1.c getpagesize.c getrandom.c gettimeofday.c \
+       iconv.c iconv_close.c iconv_open.c anytostr.c isblank.c \
+       iswblank.c iswdigit.c iswxdigit.c localeconv.c lstat.c \
+       malloc.c malloc.c lc-charset-dispatch.c mbrtowc.c \
+       mbtowc-lock.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c mbtowc.c \
+       memchr.c mempcpy.c mkdir.c mkstemp.c mktime.c mktime.c \
+       msvc-inval.c msvc-nothrow.c nl_langinfo-lock.c nl_langinfo.c \
+       open.c raise.c rawmemchr.c readlink.c realloc.c realloc.c \
+       reallocarray.c regcomp.c regex.c regex_internal.c regexec.c \
+       setenv.c setlocale-lock.c stat-w32.c stat.c strcasecmp.c \
+       strncasecmp.c strerror.c strerror-override.c strnlen.c \
+       strptime.c strtoimax.c strtol.c strtoll.c time_r.c time_rz.c \
+       timegm.c tzset.c unsetenv.c asnprintf.c printf-args.c \
+       printf-parse.c vasnprintf.c asprintf.c vasprintf.c wcrtomb.c \
+       wcwidth.c windows-mutex.c windows-once.c windows-recmutex.c \
+       windows-rwlock.c wmemchr.c wmempcpy.c
 
 # Use this preprocessor expression to decide whether #include_next works.
 # Do not rely on a 'configure'-time test for this, since the expression
 # might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
 GPERF = gperf
 V_GPERF = $(V_GPERF_@AM_V@)
 V_GPERF_ = $(V_GPERF_@AM_DEFAULT_V@)
@@ -1668,11 +2014,6 @@ CXXDEFS_H = $(srcdir)/c++defs.h
 # Because this Makefile snippet defines a variable used by other
 # gnulib Makefile snippets, it must be present in all makefiles that
 # need it. This is ensured by the applicability 'all' defined above.
-UNUSED_PARAMETER_H = $(srcdir)/unused-parameter.h
-
-# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all makefiles that
-# need it. This is ensured by the applicability 'all' defined above.
 WARN_ON_USE_H = $(srcdir)/warn-on-use.h
 all: $(BUILT_SOURCES) config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
@@ -1727,6 +2068,32 @@ distclean-hdr:
 
 clean-noinstLIBRARIES:
        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+malloc/$(am__dirstamp):
+       @$(MKDIR_P) malloc
+       @: > malloc/$(am__dirstamp)
+malloc/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) malloc/$(DEPDIR)
+       @: > malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_at_failure.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_emplace_enlarge.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_finalize.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_resize.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray_resize_clear.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
+glthread/$(am__dirstamp):
+       @$(MKDIR_P) glthread
+       @: > glthread/$(am__dirstamp)
+glthread/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) glthread/$(DEPDIR)
+       @: > glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
+glthread/threadlib.$(OBJEXT): glthread/$(am__dirstamp) \
+       glthread/$(DEPDIR)/$(am__dirstamp)
 unistr/$(am__dirstamp):
        @$(MKDIR_P) unistr
        @: > unistr/$(am__dirstamp)
@@ -1747,6 +2114,8 @@ uniwidth/$(DEPDIR)/$(am__dirstamp):
        @: > uniwidth/$(DEPDIR)/$(am__dirstamp)
 uniwidth/width.$(OBJEXT): uniwidth/$(am__dirstamp) \
        uniwidth/$(DEPDIR)/$(am__dirstamp)
+malloc/dynarray-skeleton.$(OBJEXT): malloc/$(am__dirstamp) \
+       malloc/$(DEPDIR)/$(am__dirstamp)
 
 libdiffutils.a: $(libdiffutils_a_OBJECTS) $(libdiffutils_a_DEPENDENCIES) $(EXTRA_libdiffutils_a_DEPENDENCIES) 
        $(AM_V_at)-rm -f libdiffutils.a
@@ -1755,13 +2124,14 @@ libdiffutils.a: $(libdiffutils_a_OBJECTS) $(libdiffutils_a_DEPENDENCIES) $(EXTRA
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
+       -rm -f glthread/*.$(OBJEXT)
+       -rm -f malloc/*.$(OBJEXT)
        -rm -f unistr/*.$(OBJEXT)
        -rm -f uniwidth/*.$(OBJEXT)
 
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocator.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anytostr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/areadlink.Po@am__quote@ # am--include-marker
@@ -1777,6 +2147,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-stack.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/calloc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/careadlinkat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ # am--include-marker
@@ -1795,17 +2166,21 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freopen-safer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getrandom.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ialloc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv_close.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv_open.Po@am__quote@ # am--include-marker
@@ -1813,10 +2188,12 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inttostr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isblank.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswblank.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswdigit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iswxdigit.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lc-charset-dispatch.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ # am--include-marker
@@ -1829,14 +2206,17 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc-lock.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbuiter.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdir.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-inval.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvc-nothrow.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo-lock.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nstrftime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/offtostr.Po@am__quote@ # am--include-marker
@@ -1850,33 +2230,34 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raise.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reallocarray.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale-lock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale_null.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh-quote.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig-handler.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigsegv.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stackvma.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strcasecmp.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/striconv.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strncasecmp.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strptime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoimax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoul.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoull.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoumax.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoll.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/system-quote.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_r.Po@am__quote@ # am--include-marker
@@ -1896,19 +2277,33 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-mutex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-once.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-recmutex.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windows-rwlock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmemchr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmempcpy.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfreopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloca.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xreadlink.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstdopen.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstriconv.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol-error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoimax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoul.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtoumax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray-skeleton.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_at_failure.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_finalize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_resize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/dynarray_resize_clear.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-mbtoucr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb-aux.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@unistr/$(DEPDIR)/u8-uctomb.Po@am__quote@ # am--include-marker
@@ -1987,7 +2382,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -2028,7 +2422,8 @@ all-am: Makefile $(LIBRARIES) $(HEADERS) config.h
 installdirs:
 install: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -2055,6 +2450,10 @@ clean-generic:
 distclean-generic:
        -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+       -rm -f glthread/$(DEPDIR)/$(am__dirstamp)
+       -rm -f glthread/$(am__dirstamp)
+       -rm -f malloc/$(DEPDIR)/$(am__dirstamp)
+       -rm -f malloc/$(am__dirstamp)
        -rm -f unistr/$(DEPDIR)/$(am__dirstamp)
        -rm -f unistr/$(am__dirstamp)
        -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
@@ -2070,8 +2469,7 @@ clean: clean-am
 clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
 
 distclean: distclean-am
-               -rm -f ./$(DEPDIR)/alloca.Po
-       -rm -f ./$(DEPDIR)/allocator.Po
+               -rm -f ./$(DEPDIR)/allocator.Po
        -rm -f ./$(DEPDIR)/anytostr.Po
        -rm -f ./$(DEPDIR)/areadlink.Po
        -rm -f ./$(DEPDIR)/argmatch.Po
@@ -2086,6 +2484,7 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/c-stack.Po
        -rm -f ./$(DEPDIR)/c-strcasecmp.Po
        -rm -f ./$(DEPDIR)/c-strncasecmp.Po
+       -rm -f ./$(DEPDIR)/calloc.Po
        -rm -f ./$(DEPDIR)/careadlinkat.Po
        -rm -f ./$(DEPDIR)/cloexec.Po
        -rm -f ./$(DEPDIR)/close.Po
@@ -2104,17 +2503,21 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/float.Po
        -rm -f ./$(DEPDIR)/fnmatch.Po
        -rm -f ./$(DEPDIR)/fnmatch_loop.Po
-       -rm -f ./$(DEPDIR)/freopen-safer.Po
+       -rm -f ./$(DEPDIR)/fopen.Po
+       -rm -f ./$(DEPDIR)/free.Po
        -rm -f ./$(DEPDIR)/freopen.Po
        -rm -f ./$(DEPDIR)/fstat.Po
        -rm -f ./$(DEPDIR)/getdtablesize.Po
        -rm -f ./$(DEPDIR)/getopt.Po
        -rm -f ./$(DEPDIR)/getopt1.Po
+       -rm -f ./$(DEPDIR)/getpagesize.Po
        -rm -f ./$(DEPDIR)/getprogname.Po
+       -rm -f ./$(DEPDIR)/getrandom.Po
        -rm -f ./$(DEPDIR)/gettime.Po
        -rm -f ./$(DEPDIR)/gettimeofday.Po
        -rm -f ./$(DEPDIR)/hard-locale.Po
        -rm -f ./$(DEPDIR)/hash.Po
+       -rm -f ./$(DEPDIR)/ialloc.Po
        -rm -f ./$(DEPDIR)/iconv.Po
        -rm -f ./$(DEPDIR)/iconv_close.Po
        -rm -f ./$(DEPDIR)/iconv_open.Po
@@ -2122,10 +2525,12 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/inttostr.Po
        -rm -f ./$(DEPDIR)/isblank.Po
        -rm -f ./$(DEPDIR)/iswblank.Po
+       -rm -f ./$(DEPDIR)/iswdigit.Po
+       -rm -f ./$(DEPDIR)/iswxdigit.Po
        -rm -f ./$(DEPDIR)/itold.Po
+       -rm -f ./$(DEPDIR)/lc-charset-dispatch.Po
        -rm -f ./$(DEPDIR)/localcharset.Po
        -rm -f ./$(DEPDIR)/localeconv.Po
-       -rm -f ./$(DEPDIR)/localtime-buffer.Po
        -rm -f ./$(DEPDIR)/lstat.Po
        -rm -f ./$(DEPDIR)/malloc.Po
        -rm -f ./$(DEPDIR)/malloca.Po
@@ -2138,14 +2543,17 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/mbsrtowcs-state.Po
        -rm -f ./$(DEPDIR)/mbsrtowcs.Po
        -rm -f ./$(DEPDIR)/mbsstr.Po
+       -rm -f ./$(DEPDIR)/mbtowc-lock.Po
        -rm -f ./$(DEPDIR)/mbtowc.Po
        -rm -f ./$(DEPDIR)/mbuiter.Po
        -rm -f ./$(DEPDIR)/memchr.Po
+       -rm -f ./$(DEPDIR)/mempcpy.Po
        -rm -f ./$(DEPDIR)/mkdir.Po
        -rm -f ./$(DEPDIR)/mkstemp.Po
        -rm -f ./$(DEPDIR)/mktime.Po
        -rm -f ./$(DEPDIR)/msvc-inval.Po
        -rm -f ./$(DEPDIR)/msvc-nothrow.Po
+       -rm -f ./$(DEPDIR)/nl_langinfo-lock.Po
        -rm -f ./$(DEPDIR)/nl_langinfo.Po
        -rm -f ./$(DEPDIR)/nstrftime.Po
        -rm -f ./$(DEPDIR)/offtostr.Po
@@ -2159,33 +2567,34 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/raise.Po
        -rm -f ./$(DEPDIR)/rawmemchr.Po
        -rm -f ./$(DEPDIR)/readlink.Po
+       -rm -f ./$(DEPDIR)/realloc.Po
+       -rm -f ./$(DEPDIR)/reallocarray.Po
        -rm -f ./$(DEPDIR)/regcomp.Po
        -rm -f ./$(DEPDIR)/regex.Po
        -rm -f ./$(DEPDIR)/regex_internal.Po
        -rm -f ./$(DEPDIR)/regexec.Po
        -rm -f ./$(DEPDIR)/setenv.Po
+       -rm -f ./$(DEPDIR)/setlocale-lock.Po
+       -rm -f ./$(DEPDIR)/setlocale_null.Po
        -rm -f ./$(DEPDIR)/sh-quote.Po
-       -rm -f ./$(DEPDIR)/sig-handler.Po
-       -rm -f ./$(DEPDIR)/sigaction.Po
-       -rm -f ./$(DEPDIR)/sigprocmask.Po
+       -rm -f ./$(DEPDIR)/sigsegv.Po
+       -rm -f ./$(DEPDIR)/stackvma.Po
        -rm -f ./$(DEPDIR)/stat-time.Po
        -rm -f ./$(DEPDIR)/stat-w32.Po
        -rm -f ./$(DEPDIR)/stat.Po
+       -rm -f ./$(DEPDIR)/stdopen.Po
        -rm -f ./$(DEPDIR)/strcasecmp.Po
        -rm -f ./$(DEPDIR)/strerror-override.Po
        -rm -f ./$(DEPDIR)/strerror.Po
        -rm -f ./$(DEPDIR)/striconv.Po
        -rm -f ./$(DEPDIR)/stripslash.Po
        -rm -f ./$(DEPDIR)/strncasecmp.Po
-       -rm -f ./$(DEPDIR)/strndup.Po
        -rm -f ./$(DEPDIR)/strnlen.Po
        -rm -f ./$(DEPDIR)/strnlen1.Po
        -rm -f ./$(DEPDIR)/strptime.Po
        -rm -f ./$(DEPDIR)/strtoimax.Po
        -rm -f ./$(DEPDIR)/strtol.Po
-       -rm -f ./$(DEPDIR)/strtoul.Po
-       -rm -f ./$(DEPDIR)/strtoull.Po
-       -rm -f ./$(DEPDIR)/strtoumax.Po
+       -rm -f ./$(DEPDIR)/strtoll.Po
        -rm -f ./$(DEPDIR)/system-quote.Po
        -rm -f ./$(DEPDIR)/tempname.Po
        -rm -f ./$(DEPDIR)/time_r.Po
@@ -2205,19 +2614,33 @@ distclean: distclean-am
        -rm -f ./$(DEPDIR)/wcrtomb.Po
        -rm -f ./$(DEPDIR)/wctype-h.Po
        -rm -f ./$(DEPDIR)/wcwidth.Po
+       -rm -f ./$(DEPDIR)/windows-mutex.Po
+       -rm -f ./$(DEPDIR)/windows-once.Po
+       -rm -f ./$(DEPDIR)/windows-recmutex.Po
+       -rm -f ./$(DEPDIR)/windows-rwlock.Po
+       -rm -f ./$(DEPDIR)/wmemchr.Po
+       -rm -f ./$(DEPDIR)/wmempcpy.Po
        -rm -f ./$(DEPDIR)/xalloc-die.Po
        -rm -f ./$(DEPDIR)/xasprintf.Po
        -rm -f ./$(DEPDIR)/xfreopen.Po
        -rm -f ./$(DEPDIR)/xmalloc.Po
+       -rm -f ./$(DEPDIR)/xmalloca.Po
        -rm -f ./$(DEPDIR)/xreadlink.Po
        -rm -f ./$(DEPDIR)/xsize.Po
+       -rm -f ./$(DEPDIR)/xstdopen.Po
        -rm -f ./$(DEPDIR)/xstriconv.Po
-       -rm -f ./$(DEPDIR)/xstrndup.Po
-       -rm -f ./$(DEPDIR)/xstrtol-error.Po
+       -rm -f ./$(DEPDIR)/xstrtoimax.Po
        -rm -f ./$(DEPDIR)/xstrtol.Po
        -rm -f ./$(DEPDIR)/xstrtoul.Po
-       -rm -f ./$(DEPDIR)/xstrtoumax.Po
        -rm -f ./$(DEPDIR)/xvasprintf.Po
+       -rm -f glthread/$(DEPDIR)/lock.Po
+       -rm -f glthread/$(DEPDIR)/threadlib.Po
+       -rm -f malloc/$(DEPDIR)/dynarray-skeleton.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_at_failure.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_finalize.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_resize.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_resize_clear.Po
        -rm -f unistr/$(DEPDIR)/u8-mbtoucr.Po
        -rm -f unistr/$(DEPDIR)/u8-uctomb-aux.Po
        -rm -f unistr/$(DEPDIR)/u8-uctomb.Po
@@ -2267,8 +2690,7 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
-               -rm -f ./$(DEPDIR)/alloca.Po
-       -rm -f ./$(DEPDIR)/allocator.Po
+               -rm -f ./$(DEPDIR)/allocator.Po
        -rm -f ./$(DEPDIR)/anytostr.Po
        -rm -f ./$(DEPDIR)/areadlink.Po
        -rm -f ./$(DEPDIR)/argmatch.Po
@@ -2283,6 +2705,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/c-stack.Po
        -rm -f ./$(DEPDIR)/c-strcasecmp.Po
        -rm -f ./$(DEPDIR)/c-strncasecmp.Po
+       -rm -f ./$(DEPDIR)/calloc.Po
        -rm -f ./$(DEPDIR)/careadlinkat.Po
        -rm -f ./$(DEPDIR)/cloexec.Po
        -rm -f ./$(DEPDIR)/close.Po
@@ -2301,17 +2724,21 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/float.Po
        -rm -f ./$(DEPDIR)/fnmatch.Po
        -rm -f ./$(DEPDIR)/fnmatch_loop.Po
-       -rm -f ./$(DEPDIR)/freopen-safer.Po
+       -rm -f ./$(DEPDIR)/fopen.Po
+       -rm -f ./$(DEPDIR)/free.Po
        -rm -f ./$(DEPDIR)/freopen.Po
        -rm -f ./$(DEPDIR)/fstat.Po
        -rm -f ./$(DEPDIR)/getdtablesize.Po
        -rm -f ./$(DEPDIR)/getopt.Po
        -rm -f ./$(DEPDIR)/getopt1.Po
+       -rm -f ./$(DEPDIR)/getpagesize.Po
        -rm -f ./$(DEPDIR)/getprogname.Po
+       -rm -f ./$(DEPDIR)/getrandom.Po
        -rm -f ./$(DEPDIR)/gettime.Po
        -rm -f ./$(DEPDIR)/gettimeofday.Po
        -rm -f ./$(DEPDIR)/hard-locale.Po
        -rm -f ./$(DEPDIR)/hash.Po
+       -rm -f ./$(DEPDIR)/ialloc.Po
        -rm -f ./$(DEPDIR)/iconv.Po
        -rm -f ./$(DEPDIR)/iconv_close.Po
        -rm -f ./$(DEPDIR)/iconv_open.Po
@@ -2319,10 +2746,12 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/inttostr.Po
        -rm -f ./$(DEPDIR)/isblank.Po
        -rm -f ./$(DEPDIR)/iswblank.Po
+       -rm -f ./$(DEPDIR)/iswdigit.Po
+       -rm -f ./$(DEPDIR)/iswxdigit.Po
        -rm -f ./$(DEPDIR)/itold.Po
+       -rm -f ./$(DEPDIR)/lc-charset-dispatch.Po
        -rm -f ./$(DEPDIR)/localcharset.Po
        -rm -f ./$(DEPDIR)/localeconv.Po
-       -rm -f ./$(DEPDIR)/localtime-buffer.Po
        -rm -f ./$(DEPDIR)/lstat.Po
        -rm -f ./$(DEPDIR)/malloc.Po
        -rm -f ./$(DEPDIR)/malloca.Po
@@ -2335,14 +2764,17 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/mbsrtowcs-state.Po
        -rm -f ./$(DEPDIR)/mbsrtowcs.Po
        -rm -f ./$(DEPDIR)/mbsstr.Po
+       -rm -f ./$(DEPDIR)/mbtowc-lock.Po
        -rm -f ./$(DEPDIR)/mbtowc.Po
        -rm -f ./$(DEPDIR)/mbuiter.Po
        -rm -f ./$(DEPDIR)/memchr.Po
+       -rm -f ./$(DEPDIR)/mempcpy.Po
        -rm -f ./$(DEPDIR)/mkdir.Po
        -rm -f ./$(DEPDIR)/mkstemp.Po
        -rm -f ./$(DEPDIR)/mktime.Po
        -rm -f ./$(DEPDIR)/msvc-inval.Po
        -rm -f ./$(DEPDIR)/msvc-nothrow.Po
+       -rm -f ./$(DEPDIR)/nl_langinfo-lock.Po
        -rm -f ./$(DEPDIR)/nl_langinfo.Po
        -rm -f ./$(DEPDIR)/nstrftime.Po
        -rm -f ./$(DEPDIR)/offtostr.Po
@@ -2356,33 +2788,34 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/raise.Po
        -rm -f ./$(DEPDIR)/rawmemchr.Po
        -rm -f ./$(DEPDIR)/readlink.Po
+       -rm -f ./$(DEPDIR)/realloc.Po
+       -rm -f ./$(DEPDIR)/reallocarray.Po
        -rm -f ./$(DEPDIR)/regcomp.Po
        -rm -f ./$(DEPDIR)/regex.Po
        -rm -f ./$(DEPDIR)/regex_internal.Po
        -rm -f ./$(DEPDIR)/regexec.Po
        -rm -f ./$(DEPDIR)/setenv.Po
+       -rm -f ./$(DEPDIR)/setlocale-lock.Po
+       -rm -f ./$(DEPDIR)/setlocale_null.Po
        -rm -f ./$(DEPDIR)/sh-quote.Po
-       -rm -f ./$(DEPDIR)/sig-handler.Po
-       -rm -f ./$(DEPDIR)/sigaction.Po
-       -rm -f ./$(DEPDIR)/sigprocmask.Po
+       -rm -f ./$(DEPDIR)/sigsegv.Po
+       -rm -f ./$(DEPDIR)/stackvma.Po
        -rm -f ./$(DEPDIR)/stat-time.Po
        -rm -f ./$(DEPDIR)/stat-w32.Po
        -rm -f ./$(DEPDIR)/stat.Po
+       -rm -f ./$(DEPDIR)/stdopen.Po
        -rm -f ./$(DEPDIR)/strcasecmp.Po
        -rm -f ./$(DEPDIR)/strerror-override.Po
        -rm -f ./$(DEPDIR)/strerror.Po
        -rm -f ./$(DEPDIR)/striconv.Po
        -rm -f ./$(DEPDIR)/stripslash.Po
        -rm -f ./$(DEPDIR)/strncasecmp.Po
-       -rm -f ./$(DEPDIR)/strndup.Po
        -rm -f ./$(DEPDIR)/strnlen.Po
        -rm -f ./$(DEPDIR)/strnlen1.Po
        -rm -f ./$(DEPDIR)/strptime.Po
        -rm -f ./$(DEPDIR)/strtoimax.Po
        -rm -f ./$(DEPDIR)/strtol.Po
-       -rm -f ./$(DEPDIR)/strtoul.Po
-       -rm -f ./$(DEPDIR)/strtoull.Po
-       -rm -f ./$(DEPDIR)/strtoumax.Po
+       -rm -f ./$(DEPDIR)/strtoll.Po
        -rm -f ./$(DEPDIR)/system-quote.Po
        -rm -f ./$(DEPDIR)/tempname.Po
        -rm -f ./$(DEPDIR)/time_r.Po
@@ -2402,19 +2835,33 @@ maintainer-clean: maintainer-clean-am
        -rm -f ./$(DEPDIR)/wcrtomb.Po
        -rm -f ./$(DEPDIR)/wctype-h.Po
        -rm -f ./$(DEPDIR)/wcwidth.Po
+       -rm -f ./$(DEPDIR)/windows-mutex.Po
+       -rm -f ./$(DEPDIR)/windows-once.Po
+       -rm -f ./$(DEPDIR)/windows-recmutex.Po
+       -rm -f ./$(DEPDIR)/windows-rwlock.Po
+       -rm -f ./$(DEPDIR)/wmemchr.Po
+       -rm -f ./$(DEPDIR)/wmempcpy.Po
        -rm -f ./$(DEPDIR)/xalloc-die.Po
        -rm -f ./$(DEPDIR)/xasprintf.Po
        -rm -f ./$(DEPDIR)/xfreopen.Po
        -rm -f ./$(DEPDIR)/xmalloc.Po
+       -rm -f ./$(DEPDIR)/xmalloca.Po
        -rm -f ./$(DEPDIR)/xreadlink.Po
        -rm -f ./$(DEPDIR)/xsize.Po
+       -rm -f ./$(DEPDIR)/xstdopen.Po
        -rm -f ./$(DEPDIR)/xstriconv.Po
-       -rm -f ./$(DEPDIR)/xstrndup.Po
-       -rm -f ./$(DEPDIR)/xstrtol-error.Po
+       -rm -f ./$(DEPDIR)/xstrtoimax.Po
        -rm -f ./$(DEPDIR)/xstrtol.Po
        -rm -f ./$(DEPDIR)/xstrtoul.Po
-       -rm -f ./$(DEPDIR)/xstrtoumax.Po
        -rm -f ./$(DEPDIR)/xvasprintf.Po
+       -rm -f glthread/$(DEPDIR)/lock.Po
+       -rm -f glthread/$(DEPDIR)/threadlib.Po
+       -rm -f malloc/$(DEPDIR)/dynarray-skeleton.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_at_failure.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_emplace_enlarge.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_finalize.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_resize.Po
+       -rm -f malloc/$(DEPDIR)/dynarray_resize_clear.Po
        -rm -f unistr/$(DEPDIR)/u8-mbtoucr.Po
        -rm -f unistr/$(DEPDIR)/u8-uctomb-aux.Po
        -rm -f unistr/$(DEPDIR)/u8-uctomb.Po
@@ -2437,7 +2884,7 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
        clean-generic clean-noinstLIBRARIES cscopelist-am ctags \
@@ -2461,7 +2908,7 @@ uninstall-am:
 @GL_GENERATE_ALLOCA_H_TRUE@alloca.h: alloca.in.h $(top_builddir)/config.status
 @GL_GENERATE_ALLOCA_H_TRUE@    $(AM_V_GEN)rm -f $@-t $@ && \
 @GL_GENERATE_ALLOCA_H_TRUE@    { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-@GL_GENERATE_ALLOCA_H_TRUE@      cat $(srcdir)/alloca.in.h; \
+@GL_GENERATE_ALLOCA_H_TRUE@      sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \
 @GL_GENERATE_ALLOCA_H_TRUE@    } > $@-t && \
 @GL_GENERATE_ALLOCA_H_TRUE@    mv -f $@-t $@
 @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
@@ -2477,7 +2924,7 @@ ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
-             -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+             -e 's/@''GNULIB_ISBLANK''@/$(GL_GNULIB_ISBLANK)/g' \
              -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -2485,6 +2932,28 @@ ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
        } > $@-t && \
        mv $@-t $@
 
+malloc/dynarray.gl.h: malloc/dynarray.h
+       $(AM_V_at)$(MKDIR_P) malloc
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \
+       } > $@-t && \
+       mv $@-t $@
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+       $(AM_V_at)$(MKDIR_P) malloc
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
+             -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
+             -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
+             -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
+             -e 's|__glibc_likely|_GL_LIKELY|g' \
+             -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+             < $(srcdir)/malloc/dynarray-skeleton.c; \
+       } > $@-t && \
+       mv $@-t $@
+
 # We need the following in order to create <errno.h> when the system
 # doesn't have one that is POSIX compliant.
 @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
@@ -2517,12 +2986,16 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
-             -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
-             -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-             -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \
+             -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \
+             -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \
+             -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \
+             -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \
              -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
              -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+             -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
              -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
              -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
              -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
@@ -2560,7 +3033,7 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
 @GL_GENERATE_FNMATCH_H_TRUE@         -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_FNMATCH_H_TRUE@         -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @GL_GENERATE_FNMATCH_H_TRUE@         -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \
-@GL_GENERATE_FNMATCH_H_TRUE@         -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \
+@GL_GENERATE_FNMATCH_H_TRUE@         -e 's/@''GNULIB_FNMATCH''@/$(GL_GNULIB_FNMATCH)/g' \
 @GL_GENERATE_FNMATCH_H_TRUE@         -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \
 @GL_GENERATE_FNMATCH_H_TRUE@         -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \
 @GL_GENERATE_FNMATCH_H_TRUE@         -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2609,7 +3082,7 @@ clean-GNUmakefile:
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \
-@GL_GENERATE_ICONV_H_TRUE@           -e 's/@''GNULIB_ICONV''@/$(GNULIB_ICONV)/g' \
+@GL_GENERATE_ICONV_H_TRUE@           -e 's/@''GNULIB_ICONV''@/$(GL_GNULIB_ICONV)/g' \
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
 @GL_GENERATE_ICONV_H_TRUE@           -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
@@ -2638,6 +3111,9 @@ $(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf
 $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \
        mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
+$(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > $(srcdir)/iconv_open-zos.h-t && \
+       mv $(srcdir)/iconv_open-zos.h-t $(srcdir)/iconv_open-zos.h
 
 # We need the following in order to create <inttypes.h> when the system
 # doesn't have one that works with the given compiler.
@@ -2649,15 +3125,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
              -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
              -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
-             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
-             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
-             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \
              -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
              -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
              -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
@@ -2687,7 +3160,7 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
-             -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
+             -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \
              -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
              -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
              -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
@@ -2727,10 +3200,11 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
-             -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-             -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-             -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
-             -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+             -e 's/@''GNULIB_LOCALECONV''@/$(GL_GNULIB_LOCALECONV)/g' \
+             -e 's/@''GNULIB_SETLOCALE''@/$(GL_GNULIB_SETLOCALE)/g' \
+             -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GL_GNULIB_SETLOCALE_NULL)/g' \
+             -e 's/@''GNULIB_DUPLOCALE''@/$(GL_GNULIB_DUPLOCALE)/g' \
+             -e 's/@''GNULIB_LOCALENAME''@/$(GL_GNULIB_LOCALENAME)/g' \
              -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
              -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
              -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
@@ -2741,6 +3215,7 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
              -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
              -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
+             -e 's|@''LOCALENAME_ENHANCE_LOCALE_FUNCS''@|$(LOCALENAME_ENHANCE_LOCALE_FUNCS)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -2758,11 +3233,11 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
-             -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \
-             -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \
-             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
-             -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+             -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GL_GNULIB_PTHREAD_SIGMASK)/g' \
+             -e 's/@''GNULIB_RAISE''@/$(GL_GNULIB_RAISE)/g' \
+             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GL_GNULIB_SIGNAL_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_SIGPROCMASK''@/$(GL_GNULIB_SIGPROCMASK)/g' \
+             -e 's/@''GNULIB_SIGACTION''@/$(GL_GNULIB_SIGACTION)/g' \
              -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
              -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
              -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
@@ -2781,6 +3256,26 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
        } > $@-t && \
        mv $@-t $@
 
+@GL_GENERATE_SIGSEGV_H_TRUE@sigsegv.h: sigsegv.in.h $(top_builddir)/config.status
+@GL_GENERATE_SIGSEGV_H_TRUE@   $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_SIGSEGV_H_TRUE@   { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_SIGSEGV_H_TRUE@     cat $(srcdir)/sigsegv.in.h; \
+@GL_GENERATE_SIGSEGV_H_TRUE@   } > $@-t && \
+@GL_GENERATE_SIGSEGV_H_TRUE@   mv $@-t $@
+@GL_GENERATE_SIGSEGV_H_FALSE@sigsegv.h: $(top_builddir)/config.status
+@GL_GENERATE_SIGSEGV_H_FALSE@  rm -f $@
+
+# We need the following in order to create <stdalign.h> when the system
+# doesn't have one that works.
+@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_TRUE@  $(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_STDALIGN_H_TRUE@  { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+@GL_GENERATE_STDALIGN_H_TRUE@    cat $(srcdir)/stdalign.in.h; \
+@GL_GENERATE_STDALIGN_H_TRUE@  } > $@-t && \
+@GL_GENERATE_STDALIGN_H_TRUE@  mv $@-t $@
+@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status
+@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@
+
 # We need the following in order to create <stdarg.h> when the system
 # doesn't have one that works with the given compiler.
 @GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
@@ -2844,8 +3339,6 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-@GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
@@ -2860,7 +3353,7 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-@GL_GENERATE_STDINT_H_TRUE@          -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
+@GL_GENERATE_STDINT_H_TRUE@          -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
 @GL_GENERATE_STDINT_H_TRUE@          < $(srcdir)/stdint.in.h; \
 @GL_GENERATE_STDINT_H_TRUE@    } > $@-t && \
 @GL_GENERATE_STDINT_H_TRUE@    mv $@-t $@
@@ -2877,61 +3370,68 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
-             -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
-             -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
-             -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
-             -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
-             -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
-             -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
-             -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
-             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
-             -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
-             -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
-             -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
-             -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
-             -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
-             -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
-             -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
-             -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
-             -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
-             -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
-             -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
-             -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
-             -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
-             -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
-             -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
-             -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
-             -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
-             -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
-             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
-             -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
-             -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
-             -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
-             -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
-             -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
-             -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
-             -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
-             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
-             -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
-             -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
-             -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
-             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
-             -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
-             -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
-             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \
+             -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \
+             -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \
+             -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \
+             -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \
+             -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \
+             -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \
+             -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \
+             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \
+             -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \
+             -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \
+             -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \
+             -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \
+             -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \
+             -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \
+             -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \
+             -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \
+             -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \
+             -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \
+             -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \
+             -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \
+             -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \
+             -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \
+             -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \
+             -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \
+             -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \
+             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \
+             -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \
+             -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \
+             -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \
+             -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \
+             -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \
+             -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \
+             -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \
+             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \
+             -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \
+             -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \
+             -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \
+             -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \
+             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \
+             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \
+             -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \
+             -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \
+             -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
+             -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
+             -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
              < $(srcdir)/stdio.in.h | \
-         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+         sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
              -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@@ -2997,53 +3497,71 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-             -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
-             -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
-             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-             -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
-             -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
-             -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
-             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
-             -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
-             -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
-             -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-             -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-             -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
-             -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
-             -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-             -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
-             -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
-             -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
-             -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
-             -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
-             -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-             -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-             -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
-             -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-             -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-             -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
-             -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
-             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
-             -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-             -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-             -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \
+             -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \
+             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
+             -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
+             -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
+             -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
+             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
+             -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \
+             -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \
+             -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' \
+             -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \
+             -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \
+             -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \
+             -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \
+             -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
+             -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
+             -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
+             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \
+             -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \
+             -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \
+             -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \
+             -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \
+             -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \
+             -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \
+             -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \
+             -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \
+             -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \
+             -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \
+             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \
+             -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \
+             -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \
+             -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \
+             -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \
+             -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
+             -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
+             -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
+             -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
+             -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
              -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
              -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+             -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
              -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
+             -e 's|@''HAVE_MBTOWC''@|$(HAVE_MBTOWC)|g' \
              -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
              -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
              -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
              -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@@ -3056,28 +3574,44 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
              -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
              -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+             -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
              -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
              -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+             -e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \
+             -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
              -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+             -e 's|@''HAVE_STRTOUL''@|$(HAVE_STRTOUL)|g' \
              -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
              -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
              -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
              -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
              -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
              -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
              -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+             -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
              -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
              -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
              -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
              -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
              -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
+             -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
              -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
              -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+             -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \
              -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
              -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+             -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
              -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+             -e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \
+             -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
+             -e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \
+             -e 's|@''REPLACE_STRTOUL''@|$(REPLACE_STRTOUL)|g' \
+             -e 's|@''REPLACE_STRTOULL''@|$(REPLACE_STRTOULL)|g' \
              -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
              -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3097,50 +3631,54 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-             -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-             -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-             -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-             -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-             -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-             -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-             -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-             -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-             -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-             -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-             -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-             -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-             -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-             -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-             -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-             -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-             -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-             -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-             -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-             -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-             -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-             -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-             -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-             -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-             -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-             -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-             -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-             -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-             -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-             -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-             -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-             -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-             -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-             -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-             -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-             -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-             -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-             -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' \
+             -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \
+             -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \
+             -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \
+             -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \
+             -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \
+             -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \
+             -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \
+             -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \
+             -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \
+             -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \
+             -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \
+             -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \
+             -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \
+             -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \
+             -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \
+             -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \
+             -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \
+             -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
+             -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
+             -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
+             -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
+             -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
+             -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
+             -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
+             -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
+             -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
+             -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
+             -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \
+             -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \
+             -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \
+             -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \
+             -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \
+             -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \
+             -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \
+             -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \
+             -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g' \
+             -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \
+             -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \
+             -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \
+             -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
+             -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
              < $(srcdir)/string.in.h | \
          sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
              -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
              -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
              -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
              -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
              -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
              -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@@ -3156,8 +3694,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
              -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
+             -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
+             -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
              -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
              -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -3171,6 +3713,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
              -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3191,7 +3734,7 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
-             -e 's/@''GNULIB_FFS''@/$(GNULIB_FFS)/g' \
+             -e 's/@''GNULIB_FFS''@/$(GL_GNULIB_FFS)/g' \
              -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \
              -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
              -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
@@ -3202,6 +3745,28 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE
        } > $@-t && \
        mv $@-t $@
 
+# We need the following in order to create <sys/random.h> when the system
+# doesn't have one.
+sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \
+             -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \
+             -e 's/@''GNULIB_GETRANDOM''@/$(GL_GNULIB_GETRANDOM)/g' \
+             -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \
+             -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_random.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+
 # We need the following in order to create <sys/stat.h> when the system
 # has one that is incomplete.
 sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -3215,23 +3780,29 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
              -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
              -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
-             -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-             -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-             -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-             -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
-             -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-             -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-             -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
-             -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
-             -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
-             -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
-             -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-             -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-             -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-             -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \
+             -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \
+             -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \
+             -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \
+             -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \
+             -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \
+             -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \
+             -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \
+             -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \
+             -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \
+             -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \
+             -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \
+             -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \
+             -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \
+             -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \
+             -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \
+             -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \
+             -e 's/@''GNULIB_MDA_UMASK''@/$(GL_GNULIB_MDA_UMASK)/g' \
              -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
              -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
              -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
              -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@@ -3240,13 +3811,16 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
              -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
              -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+             -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
              -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
              -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
              -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
              -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
              -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
              -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
              -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
              -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
              -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3268,7 +3842,7 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
-             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GL_GNULIB_GETTIMEOFDAY)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
              -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
@@ -3309,7 +3883,7 @@ sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
-             -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \
+             -e 's/@''GNULIB_WAITPID''@/$(GL_GNULIB_WAITPID)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
              < $(srcdir)/sys_wait.in.h; \
@@ -3326,22 +3900,24 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-             -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
-             -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-             -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-             -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \
+             -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \
+             -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \
+             -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
+             -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
+             -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
+             -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \
+             -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \
+             -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_MDA_TZSET''@/$(GL_GNULIB_MDA_TZSET)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
              -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
              -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-             -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
              -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
              -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@@ -3355,6 +3931,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -3374,62 +3951,95 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
              -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
-             -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-             -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-             -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
-             -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
-             -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-             -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-             -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-             -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-             -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-             -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
-             -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
-             -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
-             -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
-             -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
-             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
-             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
-             -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
-             -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-             -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-             -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-             -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-             -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-             -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-             -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
-             -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-             -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-             -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
-             -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
-             -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
-             -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
-             -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
-             -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
-             -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
-             -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
-             -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
-             -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
-             -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
-             -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-             -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-             -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-             -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
-             -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
-             -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
-             -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-             -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-             -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \
+             -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \
+             -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g' \
+             -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \
+             -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \
+             -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \
+             -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \
+             -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \
+             -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \
+             -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \
+             -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \
+             -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \
+             -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \
+             -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \
+             -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \
+             -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \
+             -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \
+             -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
+             -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
+             -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
+             -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
+             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
+             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
+             -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \
+             -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \
+             -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \
+             -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \
+             -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \
+             -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \
+             -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \
+             -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \
+             -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \
+             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \
+             -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \
+             -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \
+             -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \
+             -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \
+             -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \
+             -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \
+             -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \
+             -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \
+             -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \
+             -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \
+             -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \
+             -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \
+             -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \
+             -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \
+             -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \
+             -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \
+             -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \
+             -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \
+             -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \
+             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/g' \
+             -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \
+             -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \
+             -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \
+             -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \
+             -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \
+             -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \
+             -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \
+             -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \
+             -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \
+             -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \
+             -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \
+             -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \
+             -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \
+             -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \
+             -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \
+             -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \
+             -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \
+             -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \
+             -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \
+             -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \
+             -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \
+             -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
+             -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
+             -e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
              -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
              -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@@ -3437,6 +4047,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
              -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+             -e 's|@''HAVE_GETENTROPY''@|$(HAVE_GETENTROPY)|g' \
              -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
@@ -3458,6 +4069,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
              -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
              -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
              -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@@ -3471,10 +4083,18 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
              -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
          | \
-         sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+         sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
+             -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
+             -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
+             -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
+             -e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
+             -e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
+             -e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
+             -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
              -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@@ -3505,6 +4125,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
              -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
              -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+             -e 's|@''UNISTD_H_HAVE_SYS_RANDOM_H''@|$(UNISTD_H_HAVE_SYS_RANDOM_H)|g' \
              -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
              -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -3547,47 +4168,49 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
              -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
              -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-             -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-             -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-             -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-             -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
-             -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
-             -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
-             -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
-             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
-             -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
-             -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
-             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
-             -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
-             -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
-             -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
-             -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
-             -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
-             -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
-             -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
-             -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
-             -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
-             -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
-             -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
-             -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
-             -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
-             -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
-             -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
-             -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
-             -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
-             -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
-             -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
-             -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
-             -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
-             -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
-             -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
-             -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
-             -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
-             -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
-             -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-             -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-             -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-             -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
+             -e 's/@''GNULIB_BTOWC''@/$(GL_GNULIB_BTOWC)/g' \
+             -e 's/@''GNULIB_WCTOB''@/$(GL_GNULIB_WCTOB)/g' \
+             -e 's/@''GNULIB_MBSINIT''@/$(GL_GNULIB_MBSINIT)/g' \
+             -e 's/@''GNULIB_MBRTOWC''@/$(GL_GNULIB_MBRTOWC)/g' \
+             -e 's/@''GNULIB_MBRLEN''@/$(GL_GNULIB_MBRLEN)/g' \
+             -e 's/@''GNULIB_MBSRTOWCS''@/$(GL_GNULIB_MBSRTOWCS)/g' \
+             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GL_GNULIB_MBSNRTOWCS)/g' \
+             -e 's/@''GNULIB_WCRTOMB''@/$(GL_GNULIB_WCRTOMB)/g' \
+             -e 's/@''GNULIB_WCSRTOMBS''@/$(GL_GNULIB_WCSRTOMBS)/g' \
+             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GL_GNULIB_WCSNRTOMBS)/g' \
+             -e 's/@''GNULIB_WCWIDTH''@/$(GL_GNULIB_WCWIDTH)/g' \
+             -e 's/@''GNULIB_WMEMCHR''@/$(GL_GNULIB_WMEMCHR)/g' \
+             -e 's/@''GNULIB_WMEMCMP''@/$(GL_GNULIB_WMEMCMP)/g' \
+             -e 's/@''GNULIB_WMEMCPY''@/$(GL_GNULIB_WMEMCPY)/g' \
+             -e 's/@''GNULIB_WMEMMOVE''@/$(GL_GNULIB_WMEMMOVE)/g' \
+             -e 's/@''GNULIB_WMEMPCPY''@/$(GL_GNULIB_WMEMPCPY)/g' \
+             -e 's/@''GNULIB_WMEMSET''@/$(GL_GNULIB_WMEMSET)/g' \
+             -e 's/@''GNULIB_WCSLEN''@/$(GL_GNULIB_WCSLEN)/g' \
+             -e 's/@''GNULIB_WCSNLEN''@/$(GL_GNULIB_WCSNLEN)/g' \
+             -e 's/@''GNULIB_WCSCPY''@/$(GL_GNULIB_WCSCPY)/g' \
+             -e 's/@''GNULIB_WCPCPY''@/$(GL_GNULIB_WCPCPY)/g' \
+             -e 's/@''GNULIB_WCSNCPY''@/$(GL_GNULIB_WCSNCPY)/g' \
+             -e 's/@''GNULIB_WCPNCPY''@/$(GL_GNULIB_WCPNCPY)/g' \
+             -e 's/@''GNULIB_WCSCAT''@/$(GL_GNULIB_WCSCAT)/g' \
+             -e 's/@''GNULIB_WCSNCAT''@/$(GL_GNULIB_WCSNCAT)/g' \
+             -e 's/@''GNULIB_WCSCMP''@/$(GL_GNULIB_WCSCMP)/g' \
+             -e 's/@''GNULIB_WCSNCMP''@/$(GL_GNULIB_WCSNCMP)/g' \
+             -e 's/@''GNULIB_WCSCASECMP''@/$(GL_GNULIB_WCSCASECMP)/g' \
+             -e 's/@''GNULIB_WCSNCASECMP''@/$(GL_GNULIB_WCSNCASECMP)/g' \
+             -e 's/@''GNULIB_WCSCOLL''@/$(GL_GNULIB_WCSCOLL)/g' \
+             -e 's/@''GNULIB_WCSXFRM''@/$(GL_GNULIB_WCSXFRM)/g' \
+             -e 's/@''GNULIB_WCSDUP''@/$(GL_GNULIB_WCSDUP)/g' \
+             -e 's/@''GNULIB_WCSCHR''@/$(GL_GNULIB_WCSCHR)/g' \
+             -e 's/@''GNULIB_WCSRCHR''@/$(GL_GNULIB_WCSRCHR)/g' \
+             -e 's/@''GNULIB_WCSCSPN''@/$(GL_GNULIB_WCSCSPN)/g' \
+             -e 's/@''GNULIB_WCSSPN''@/$(GL_GNULIB_WCSSPN)/g' \
+             -e 's/@''GNULIB_WCSPBRK''@/$(GL_GNULIB_WCSPBRK)/g' \
+             -e 's/@''GNULIB_WCSSTR''@/$(GL_GNULIB_WCSSTR)/g' \
+             -e 's/@''GNULIB_WCSTOK''@/$(GL_GNULIB_WCSTOK)/g' \
+             -e 's/@''GNULIB_WCSWIDTH''@/$(GL_GNULIB_WCSWIDTH)/g' \
+             -e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -3603,6 +4226,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
              -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
              -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+             -e 's|@''HAVE_WMEMPCPY''@|$(HAVE_WMEMPCPY)|g' \
              -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
              -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
              -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
@@ -3629,6 +4253,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
              -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
              -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
              -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
          | \
          sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
@@ -3645,6 +4270,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
              -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
              -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+             -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -3663,18 +4289,22 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
              -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-             -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-             -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-             -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-             -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
-             -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
-             -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
+             -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
+             -e 's/@''GNULIB_ISWBLANK''@/$(GL_GNULIB_ISWBLANK)/g' \
+             -e 's/@''GNULIB_ISWDIGIT''@/$(GL_GNULIB_ISWDIGIT)/g' \
+             -e 's/@''GNULIB_ISWXDIGIT''@/$(GL_GNULIB_ISWXDIGIT)/g' \
+             -e 's/@''GNULIB_WCTYPE''@/$(GL_GNULIB_WCTYPE)/g' \
+             -e 's/@''GNULIB_ISWCTYPE''@/$(GL_GNULIB_ISWCTYPE)/g' \
+             -e 's/@''GNULIB_WCTRANS''@/$(GL_GNULIB_WCTRANS)/g' \
+             -e 's/@''GNULIB_TOWCTRANS''@/$(GL_GNULIB_TOWCTRANS)/g' \
              -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
              -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
              -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
              -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
              -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
              -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+             -e 's/@''REPLACE_ISWDIGIT''@/$(REPLACE_ISWDIGIT)/g' \
+             -e 's/@''REPLACE_ISWXDIGIT''@/$(REPLACE_ISWXDIGIT)/g' \
              -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
              -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
index 94fdfaf..cb72f26 100644 (file)
@@ -1,10 +1,41 @@
+/* A C macro for declaring that a function does not return.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (defined __cplusplus \
+      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
+      && 0)
+    /* [[noreturn]] is not practically usable, because with it the syntax
+         extern _Noreturn void func (...);
+       would not be valid; such a declaration would only be valid with 'extern'
+       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
+       AIX system header files and several gnulib header files use precisely
+       this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
-# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
-        || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+# elif ((!defined __cplusplus || defined __clang__) \
+        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+            || (!defined __STRICT_ANSI__ \
+                && (__4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+                    || (defined __apple_build_version__ \
+                        ? 6000000 <= __apple_build_version__ \
+                        : 3 < __clang_major__ + (5 <= __clang_minor__))))))
    /* _Noreturn works as-is.  */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
+        || 0x5110 <= __SUNPRO_C)
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
diff --git a/lib/alloca.c b/lib/alloca.c
deleted file mode 100644 (file)
index ee0f018..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-/* alloca.c -- allocate automatically reclaimed memory
-   (Mostly) portable public-domain implementation -- D A Gwyn
-
-   This implementation of the PWB library alloca function,
-   which is used to allocate space off the run-time stack so
-   that it is automatically reclaimed upon procedure exit,
-   was inspired by discussions with J. Q. Johnson of Cornell.
-   J.Otto Tennant <jot@cray.com> contributed the Cray support.
-
-   There are some preprocessor constants that can
-   be defined when compiling for your specific system, for
-   improved efficiency; however, the defaults should be okay.
-
-   The general concept of this implementation is to keep
-   track of all alloca-allocated blocks, and reclaim any
-   that are found to be deeper in the stack than the current
-   invocation.  This heuristic does not reclaim storage as
-   soon as it becomes invalid, but it will do so eventually.
-
-   As a special case, alloca(0) reclaims storage without
-   allocating any.  It is a good idea to use alloca(0) in
-   your main control loop, etc. to force garbage collection.  */
-
-#include <config.h>
-
-#include <alloca.h>
-
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef emacs
-# include "lisp.h"
-# include "blockinput.h"
-# ifdef EMACS_FREE
-#  undef free
-#  define free EMACS_FREE
-# endif
-#else
-# define memory_full() abort ()
-#endif
-
-/* If compiling with GCC 2, this file's not needed.  */
-#if !defined (__GNUC__) || __GNUC__ < 2
-
-/* If someone has defined alloca as a macro,
-   there must be some other way alloca is supposed to work.  */
-# ifndef alloca
-
-#  ifdef emacs
-#   ifdef static
-/* actually, only want this if static is defined as ""
-   -- this is for usg, in which emacs must undefine static
-   in order to make unexec workable
-   */
-#    ifndef STACK_DIRECTION
-you
-lose
--- must know STACK_DIRECTION at compile-time
-/* Using #error here is not wise since this file should work for
-   old and obscure compilers.  */
-#    endif /* STACK_DIRECTION undefined */
-#   endif /* static */
-#  endif /* emacs */
-
-/* If your stack is a linked list of frames, you have to
-   provide an "address metric" ADDRESS_FUNCTION macro.  */
-
-#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
-long i00afunc ();
-#   define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
-#  else
-#   define ADDRESS_FUNCTION(arg) &(arg)
-#  endif
-
-/* Define STACK_DIRECTION if you know the direction of stack
-   growth for your system; otherwise it will be automatically
-   deduced at run-time.
-
-   STACK_DIRECTION > 0 => grows toward higher addresses
-   STACK_DIRECTION < 0 => grows toward lower addresses
-   STACK_DIRECTION = 0 => direction of growth unknown  */
-
-#  ifndef STACK_DIRECTION
-#   define STACK_DIRECTION      0       /* Direction unknown.  */
-#  endif
-
-#  if STACK_DIRECTION != 0
-
-#   define STACK_DIR    STACK_DIRECTION /* Known at compile-time.  */
-
-#  else /* STACK_DIRECTION == 0; need run-time code.  */
-
-static int stack_dir;           /* 1 or -1 once known.  */
-#   define STACK_DIR    stack_dir
-
-static int
-find_stack_direction (int *addr, int depth)
-{
-  int dir, dummy = 0;
-  if (! addr)
-    addr = &dummy;
-  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
-  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
-  return dir + dummy;
-}
-
-#  endif /* STACK_DIRECTION == 0 */
-
-/* An "alloca header" is used to:
-   (a) chain together all alloca'ed blocks;
-   (b) keep track of stack depth.
-
-   It is very important that sizeof(header) agree with malloc
-   alignment chunk size.  The following default should work okay.  */
-
-#  ifndef       ALIGN_SIZE
-#   define ALIGN_SIZE   sizeof(double)
-#  endif
-
-typedef union hdr
-{
-  char align[ALIGN_SIZE];       /* To force sizeof(header).  */
-  struct
-    {
-      union hdr *next;          /* For chaining headers.  */
-      char *deep;               /* For stack depth measure.  */
-    } h;
-} header;
-
-static header *last_alloca_header = NULL;       /* -> last alloca header.  */
-
-/* Return a pointer to at least SIZE bytes of storage,
-   which will be automatically reclaimed upon exit from
-   the procedure that called alloca.  Originally, this space
-   was supposed to be taken from the current stack frame of the
-   caller, but that method cannot be made to work for some
-   implementations of C, for example under Gould's UTX/32.  */
-
-void *
-alloca (size_t size)
-{
-  auto char probe;              /* Probes stack depth: */
-  register char *depth = ADDRESS_FUNCTION (probe);
-
-#  if STACK_DIRECTION == 0
-  if (STACK_DIR == 0)           /* Unknown growth direction.  */
-    STACK_DIR = find_stack_direction (NULL, (size & 1) + 20);
-#  endif
-
-  /* Reclaim garbage, defined as all alloca'd storage that
-     was allocated from deeper in the stack than currently.  */
-
-  {
-    register header *hp;        /* Traverses linked list.  */
-
-#  ifdef emacs
-    BLOCK_INPUT;
-#  endif
-
-    for (hp = last_alloca_header; hp != NULL;)
-      if ((STACK_DIR > 0 && hp->h.deep > depth)
-          || (STACK_DIR < 0 && hp->h.deep < depth))
-        {
-          register header *np = hp->h.next;
-
-          free (hp);            /* Collect garbage.  */
-
-          hp = np;              /* -> next header.  */
-        }
-      else
-        break;                  /* Rest are not deeper.  */
-
-    last_alloca_header = hp;    /* -> last valid storage.  */
-
-#  ifdef emacs
-    UNBLOCK_INPUT;
-#  endif
-  }
-
-  if (size == 0)
-    return NULL;                /* No allocation required.  */
-
-  /* Allocate combined header + user data storage.  */
-
-  {
-    /* Address of header.  */
-    register header *new;
-
-    size_t combined_size = sizeof (header) + size;
-    if (combined_size < sizeof (header))
-      memory_full ();
-
-    new = malloc (combined_size);
-
-    if (! new)
-      memory_full ();
-
-    new->h.next = last_alloca_header;
-    new->h.deep = depth;
-
-    last_alloca_header = new;
-
-    /* User storage begins just after header.  */
-
-    return (void *) (new + 1);
-  }
-}
-
-#  if defined (CRAY) && defined (CRAY_STACKSEG_END)
-
-#   ifdef DEBUG_I00AFUNC
-#    include <stdio.h>
-#   endif
-
-#   ifndef CRAY_STACK
-#    define CRAY_STACK
-#    ifndef CRAY2
-/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
-struct stack_control_header
-  {
-    long shgrow:32;             /* Number of times stack has grown.  */
-    long shaseg:32;             /* Size of increments to stack.  */
-    long shhwm:32;              /* High water mark of stack.  */
-    long shsize:32;             /* Current size of stack (all segments).  */
-  };
-
-/* The stack segment linkage control information occurs at
-   the high-address end of a stack segment.  (The stack
-   grows from low addresses to high addresses.)  The initial
-   part of the stack segment linkage control information is
-   0200 (octal) words.  This provides for register storage
-   for the routine which overflows the stack.  */
-
-struct stack_segment_linkage
-  {
-    long ss[0200];              /* 0200 overflow words.  */
-    long sssize:32;             /* Number of words in this segment.  */
-    long ssbase:32;             /* Offset to stack base.  */
-    long:32;
-    long sspseg:32;             /* Offset to linkage control of previous
-                                   segment of stack.  */
-    long:32;
-    long sstcpt:32;             /* Pointer to task common address block.  */
-    long sscsnm;                /* Private control structure number for
-                                   microtasking.  */
-    long ssusr1;                /* Reserved for user.  */
-    long ssusr2;                /* Reserved for user.  */
-    long sstpid;                /* Process ID for pid based multi-tasking.  */
-    long ssgvup;                /* Pointer to multitasking thread giveup.  */
-    long sscray[7];             /* Reserved for Cray Research.  */
-    long ssa0;
-    long ssa1;
-    long ssa2;
-    long ssa3;
-    long ssa4;
-    long ssa5;
-    long ssa6;
-    long ssa7;
-    long sss0;
-    long sss1;
-    long sss2;
-    long sss3;
-    long sss4;
-    long sss5;
-    long sss6;
-    long sss7;
-  };
-
-#    else /* CRAY2 */
-/* The following structure defines the vector of words
-   returned by the STKSTAT library routine.  */
-struct stk_stat
-  {
-    long now;                   /* Current total stack size.  */
-    long maxc;                  /* Amount of contiguous space which would
-                                   be required to satisfy the maximum
-                                   stack demand to date.  */
-    long high_water;            /* Stack high-water mark.  */
-    long overflows;             /* Number of stack overflow ($STKOFEN) calls.  */
-    long hits;                  /* Number of internal buffer hits.  */
-    long extends;               /* Number of block extensions.  */
-    long stko_mallocs;          /* Block allocations by $STKOFEN.  */
-    long underflows;            /* Number of stack underflow calls ($STKRETN).  */
-    long stko_free;             /* Number of deallocations by $STKRETN.  */
-    long stkm_free;             /* Number of deallocations by $STKMRET.  */
-    long segments;              /* Current number of stack segments.  */
-    long maxs;                  /* Maximum number of stack segments so far.  */
-    long pad_size;              /* Stack pad size.  */
-    long current_address;       /* Current stack segment address.  */
-    long current_size;          /* Current stack segment size.  This
-                                   number is actually corrupted by STKSTAT to
-                                   include the fifteen word trailer area.  */
-    long initial_address;       /* Address of initial segment.  */
-    long initial_size;          /* Size of initial segment.  */
-  };
-
-/* The following structure describes the data structure which trails
-   any stack segment.  I think that the description in 'asdef' is
-   out of date.  I only describe the parts that I am sure about.  */
-
-struct stk_trailer
-  {
-    long this_address;          /* Address of this block.  */
-    long this_size;             /* Size of this block (does not include
-                                   this trailer).  */
-    long unknown2;
-    long unknown3;
-    long link;                  /* Address of trailer block of previous
-                                   segment.  */
-    long unknown5;
-    long unknown6;
-    long unknown7;
-    long unknown8;
-    long unknown9;
-    long unknown10;
-    long unknown11;
-    long unknown12;
-    long unknown13;
-    long unknown14;
-  };
-
-#    endif /* CRAY2 */
-#   endif /* not CRAY_STACK */
-
-#   ifdef CRAY2
-/* Determine a "stack measure" for an arbitrary ADDRESS.
-   I doubt that "lint" will like this much.  */
-
-static long
-i00afunc (long *address)
-{
-  struct stk_stat status;
-  struct stk_trailer *trailer;
-  long *block, size;
-  long result = 0;
-
-  /* We want to iterate through all of the segments.  The first
-     step is to get the stack status structure.  We could do this
-     more quickly and more directly, perhaps, by referencing the
-     $LM00 common block, but I know that this works.  */
-
-  STKSTAT (&status);
-
-  /* Set up the iteration.  */
-
-  trailer = (struct stk_trailer *) (status.current_address
-                                    + status.current_size
-                                    - 15);
-
-  /* There must be at least one stack segment.  Therefore it is
-     a fatal error if "trailer" is null.  */
-
-  if (trailer == 0)
-    abort ();
-
-  /* Discard segments that do not contain our argument address.  */
-
-  while (trailer != 0)
-    {
-      block = (long *) trailer->this_address;
-      size = trailer->this_size;
-      if (block == 0 || size == 0)
-        abort ();
-      trailer = (struct stk_trailer *) trailer->link;
-      if ((block <= address) && (address < (block + size)))
-        break;
-    }
-
-  /* Set the result to the offset in this segment and add the sizes
-     of all predecessor segments.  */
-
-  result = address - block;
-
-  if (trailer == 0)
-    {
-      return result;
-    }
-
-  do
-    {
-      if (trailer->this_size <= 0)
-        abort ();
-      result += trailer->this_size;
-      trailer = (struct stk_trailer *) trailer->link;
-    }
-  while (trailer != 0);
-
-  /* We are done.  Note that if you present a bogus address (one
-     not in any segment), you will get a different number back, formed
-     from subtracting the address of the first block.  This is probably
-     not what you want.  */
-
-  return (result);
-}
-
-#   else /* not CRAY2 */
-/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
-   Determine the number of the cell within the stack,
-   given the address of the cell.  The purpose of this
-   routine is to linearize, in some sense, stack addresses
-   for alloca.  */
-
-static long
-i00afunc (long address)
-{
-  long stkl = 0;
-
-  long size, pseg, this_segment, stack;
-  long result = 0;
-
-  struct stack_segment_linkage *ssptr;
-
-  /* Register B67 contains the address of the end of the
-     current stack segment.  If you (as a subprogram) store
-     your registers on the stack and find that you are past
-     the contents of B67, you have overflowed the segment.
-
-     B67 also points to the stack segment linkage control
-     area, which is what we are really interested in.  */
-
-  stkl = CRAY_STACKSEG_END ();
-  ssptr = (struct stack_segment_linkage *) stkl;
-
-  /* If one subtracts 'size' from the end of the segment,
-     one has the address of the first word of the segment.
-
-     If this is not the first segment, 'pseg' will be
-     nonzero.  */
-
-  pseg = ssptr->sspseg;
-  size = ssptr->sssize;
-
-  this_segment = stkl - size;
-
-  /* It is possible that calling this routine itself caused
-     a stack overflow.  Discard stack segments which do not
-     contain the target address.  */
-
-  while (!(this_segment <= address && address <= stkl))
-    {
-#    ifdef DEBUG_I00AFUNC
-      fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
-#    endif
-      if (pseg == 0)
-        break;
-      stkl = stkl - pseg;
-      ssptr = (struct stack_segment_linkage *) stkl;
-      size = ssptr->sssize;
-      pseg = ssptr->sspseg;
-      this_segment = stkl - size;
-    }
-
-  result = address - this_segment;
-
-  /* If you subtract pseg from the current end of the stack,
-     you get the address of the previous stack segment's end.
-     This seems a little convoluted to me, but I'll bet you save
-     a cycle somewhere.  */
-
-  while (pseg != 0)
-    {
-#    ifdef DEBUG_I00AFUNC
-      fprintf (stderr, "%011o %011o\n", pseg, size);
-#    endif
-      stkl = stkl - pseg;
-      ssptr = (struct stack_segment_linkage *) stkl;
-      size = ssptr->sssize;
-      pseg = ssptr->sspseg;
-      result += size;
-    }
-  return (result);
-}
-
-#   endif /* not CRAY2 */
-#  endif /* CRAY */
-
-# endif /* no alloca */
-#endif /* not GCC 2 */
index 5ad8af8..65c2d4d 100644 (file)
@@ -1,22 +1,20 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2018 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation,
    Inc.
 
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, see
-   <https://www.gnu.org/licenses/>.
-  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
    means there is a real alloca function.  */
  */
 
 #ifndef alloca
-# ifdef __GNUC__
+  /* Some version of mingw have an <alloca.h> that causes trouble when
+     included after 'alloca' gets defined as a macro.  As a workaround,
+     include this <alloca.h> first and define 'alloca' as a macro afterwards
+     if needed.  */
+# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@
+#  include_next <alloca.h>
+# endif
+#endif
+#ifndef alloca
+# if defined __GNUC__ || (__clang_major__ >= 4)
 #  define alloca __builtin_alloca
 # elif defined _AIX
 #  define alloca __alloca
index 2c1a3da..2262de9 100644 (file)
@@ -1,3 +1,20 @@
+/* Memory allocators such as malloc+free.
+
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
 #include "allocator.h"
index ab312f5..f0e8f34 100644 (file)
@@ -1,18 +1,18 @@
 /* Memory allocators such as malloc+free.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
index c7f6104..8294353 100644 (file)
@@ -1,18 +1,18 @@
 /* anytostr.c -- convert integers to printable strings
 
-   Copyright (C) 2001, 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert */
@@ -32,7 +32,7 @@
    INT_BUFSIZE_BOUND (INTTYPE) bytes long.  Return the address of the
    printable string, which need not start at BUF.  */
 
-char * __attribute_warn_unused_result__
+_GL_ATTRIBUTE_NODISCARD char *
 anytostr (inttype i, char *buf)
 {
   char *p = buf + INT_STRLEN_BOUND (inttype);
index ab9d755..90ae0d5 100644 (file)
@@ -1,19 +1,19 @@
 /* areadlink.c -- readlink wrapper to return the link name in malloc'd storage
    Unlike xreadlink and xreadlink_with_size, don't ever call exit.
 
-   Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering <jim@meyering.net>
index 9ab139d..a351150 100644 (file)
@@ -1,19 +1,19 @@
 /* Read symbolic links without size limitation.
 
-   Copyright (C) 2001, 2003-2004, 2007, 2009-2018 Free Software Foundation,
+   Copyright (C) 2001, 2003-2004, 2007, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering <jim@meyering.net>  */
index 5f03408..b4de241 100644 (file)
@@ -1,24 +1,24 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
    that the values passed as arguments n, ..., m must be non-NULL pointers.
    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
 #ifndef _GL_ARG_NONNULL
-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
 # else
 #  define _GL_ARG_NONNULL(params)
index 5c2202b..dfdb4e3 100644 (file)
@@ -1,6 +1,6 @@
 /* argmatch.c -- find a match for a string in an array
 
-   Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2018 Free Software
+   Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
 #include <stdlib.h>
 #include <string.h>
 
-#include "gettext.h"
 #define _(msgid) gettext (msgid)
 
 #include "error.h"
 #include "quotearg.h"
-#include "quote.h"
 #include "getprogname.h"
 
 #if USE_UNLOCKED_IO
@@ -82,7 +80,7 @@ argmatch_exit_fn argmatch_die = __argmatch_die;
 
 ptrdiff_t
 argmatch (const char *arg, const char *const *arglist,
-          const char *vallist, size_t valsize)
+          const void *vallist, size_t valsize)
 {
   size_t i;                     /* Temporary index in ARGLIST.  */
   size_t arglen;                /* Length of ARG.  */
@@ -106,8 +104,8 @@ argmatch (const char *arg, const char *const *arglist,
             {
               /* Second nonexact match found.  */
               if (vallist == NULL
-                  || memcmp (vallist + valsize * matchind,
-                             vallist + valsize * i, valsize))
+                  || memcmp ((char const *) vallist + valsize * matchind,
+                             (char const *) vallist + valsize * i, valsize))
                 {
                   /* There is a real ambiguity, or we could not
                      disambiguate. */
@@ -144,7 +142,7 @@ argmatch_invalid (const char *context, const char *value, ptrdiff_t problem)
    VALSIZE is the size of the elements of VALLIST */
 void
 argmatch_valid (const char *const *arglist,
-                const char *vallist, size_t valsize)
+                const void *vallist, size_t valsize)
 {
   size_t i;
   const char *last_val = NULL;
@@ -154,10 +152,10 @@ argmatch_valid (const char *const *arglist,
   fputs (_("Valid arguments are:"), stderr);
   for (i = 0; arglist[i]; i++)
     if ((i == 0)
-        || memcmp (last_val, vallist + valsize * i, valsize))
+        || memcmp (last_val, (char const *) vallist + valsize * i, valsize))
       {
         fprintf (stderr, "\n  - %s", quote (arglist[i]));
-        last_val = vallist + valsize * i;
+        last_val = (char const *) vallist + valsize * i;
       }
     else
       {
@@ -175,7 +173,7 @@ argmatch_valid (const char *const *arglist,
 ptrdiff_t
 __xargmatch_internal (const char *context,
                       const char *arg, const char *const *arglist,
-                      const char *vallist, size_t valsize,
+                      const void *vallist, size_t valsize,
                       argmatch_exit_fn exit_fn)
 {
   ptrdiff_t res = argmatch (arg, arglist, vallist, valsize);
@@ -194,14 +192,14 @@ __xargmatch_internal (const char *context,
 /* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
    return the first corresponding argument in ARGLIST */
 const char *
-argmatch_to_argument (const char *value,
+argmatch_to_argument (const void *value,
                       const char *const *arglist,
-                      const char *vallist, size_t valsize)
+                      const void *vallist, size_t valsize)
 {
   size_t i;
 
   for (i = 0; arglist[i]; i++)
-    if (!memcmp (value, vallist + valsize * i, valsize))
+    if (!memcmp (value, (char const *) vallist + valsize * i, valsize))
       return arglist[i];
   return NULL;
 }
@@ -268,7 +266,7 @@ main (int argc, const char *const *argv)
                              backup_args, backup_vals);
 
   printf ("The version control is '%s'\n",
-          ARGMATCH_TO_ARGUMENT (backup_type, backup_args, backup_vals));
+          ARGMATCH_TO_ARGUMENT (&backup_type, backup_args, backup_vals));
 
   return 0;
 }
index e6b4c48..3ef6813 100644 (file)
@@ -1,6 +1,6 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
 
-   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2018 Free Software
+   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
 #ifndef ARGMATCH_H_
 # define ARGMATCH_H_ 1
 
+# include <limits.h>
+# include <stdbool.h>
 # include <stddef.h>
+# include <stdio.h>
+# include <string.h> /* memcmp */
 
+# include "gettext.h"
+# include "quote.h"
 # include "verify.h"
 
-#ifdef  __cplusplus
+# ifdef  __cplusplus
 extern "C" {
-#endif
+# endif
 
 # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
 
@@ -44,10 +50,10 @@ extern "C" {
    to the same values in VALLIST).  */
 
 ptrdiff_t argmatch (char const *arg, char const *const *arglist,
-                    char const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE;
+                    void const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE;
 
 # define ARGMATCH(Arg, Arglist, Vallist) \
-  argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
+  argmatch (Arg, Arglist, (void const *) (Vallist), sizeof *(Vallist))
 
 /* xargmatch calls this function when it fails.  This function should not
    return.  By default, this is a function that calls ARGMATCH_DIE which
@@ -70,10 +76,10 @@ void argmatch_invalid (char const *context, char const *value,
 /* Report on stderr the list of possible arguments.  */
 
 void argmatch_valid (char const *const *arglist,
-                     char const *vallist, size_t valsize);
+                     void const *vallist, size_t valsize);
 
 # define ARGMATCH_VALID(Arglist, Vallist) \
-  argmatch_valid (Arglist, (char const *) (Vallist), sizeof *(Vallist))
+  argmatch_valid (Arglist, (void const *) (Vallist), sizeof *(Vallist))
 
 
 
@@ -82,30 +88,244 @@ void argmatch_valid (char const *const *arglist,
 
 ptrdiff_t __xargmatch_internal (char const *context,
                                 char const *arg, char const *const *arglist,
-                                char const *vallist, size_t valsize,
+                                void const *vallist, size_t valsize,
                                 argmatch_exit_fn exit_fn);
 
 /* Programmer friendly interface to __xargmatch_internal. */
 
 # define XARGMATCH(Context, Arg, Arglist, Vallist)              \
   ((Vallist) [__xargmatch_internal (Context, Arg, Arglist,      \
-                                    (char const *) (Vallist),   \
+                                    (void const *) (Vallist),   \
                                     sizeof *(Vallist),          \
                                     argmatch_die)])
 
 /* Convert a value into a corresponding argument. */
 
-char const *argmatch_to_argument (char const *value,
+char const *argmatch_to_argument (void const *value,
                                   char const *const *arglist,
-                                  char const *vallist, size_t valsize)
+                                  void const *vallist, size_t valsize)
   _GL_ATTRIBUTE_PURE;
 
 # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist)                  \
   argmatch_to_argument (Value, Arglist,                                 \
-                        (char const *) (Vallist), sizeof *(Vallist))
-
-#ifdef  __cplusplus
+                        (void const *) (Vallist), sizeof *(Vallist))
+
+# define ARGMATCH_DEFINE_GROUP(Name, Type)                              \
+  /* The type of the values of this group.  */                          \
+  typedef Type argmatch_##Name##_type;                                  \
+                                                                        \
+  /* The size of the type of the values of this group. */               \
+  enum argmatch_##Name##_size_enum                                      \
+  {                                                                     \
+    argmatch_##Name##_size = sizeof (argmatch_##Name##_type)            \
+  };                                                                    \
+                                                                        \
+  /* Argument mapping of this group.  */                                \
+  typedef struct                                                        \
+  {                                                                     \
+    /* Argument (e.g., "simple").  */                                   \
+    const char *arg;                                                    \
+    /* Value (e.g., simple_backups).  */                                \
+    const argmatch_##Name##_type val;                                   \
+  } argmatch_##Name##_arg;                                              \
+                                                                        \
+  /* Documentation of this group.  */                                   \
+  typedef struct                                                        \
+  {                                                                     \
+    /* Argument (e.g., "simple").  */                                   \
+    const char *arg;                                                    \
+    /* Documentation (e.g., N_("always make simple backups")).  */      \
+    const char *doc;                                                    \
+  } argmatch_##Name##_doc;                                              \
+                                                                        \
+  /* All the features of an argmatch group.  */                         \
+  typedef struct                                                        \
+  {                                                                     \
+    const argmatch_##Name##_arg* args;                                  \
+    const argmatch_##Name##_doc* docs;                                  \
+                                                                        \
+    /* Printed before the usage message.  */                            \
+    const char *doc_pre;                                                \
+    /* Printed after the usage message.  */                             \
+    const char *doc_post;                                               \
+  } argmatch_##Name##_group_type;                                       \
+                                                                        \
+  /* The structure the user must build.  */                             \
+  extern const argmatch_##Name##_group_type argmatch_##Name##_group;    \
+                                                                        \
+  /* Print the documentation of this group.  */                         \
+  void argmatch_##Name##_usage (FILE *out);                             \
+                                                                        \
+  /* If nonnegative, the index I of ARG in ARGS, i.e,                   \
+     ARGS[I] == ARG.                                                    \
+     Return -1 for invalid argument, -2 for ambiguous argument. */      \
+  ptrdiff_t argmatch_##Name##_choice (const char *arg);                 \
+                                                                        \
+  /* A pointer to the corresponding value if it exists, or              \
+     report an error and exit with failure if the argument was          \
+     not recognized. */                                                 \
+  const argmatch_##Name##_type*                                         \
+  argmatch_##Name##_value (const char *context, const char *arg);       \
+                                                                        \
+  /* The first argument in ARGS that matches this value, or NULL.  */   \
+  const char *                                                          \
+  argmatch_##Name##_argument (const argmatch_##Name##_type *val);       \
+                                                                        \
+  ptrdiff_t                                                             \
+  argmatch_##Name##_choice (const char *arg)                            \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    size_t size = argmatch_##Name##_size;                               \
+    ptrdiff_t res = -1;      /* Index of first nonexact match.  */      \
+    bool ambiguous = false;  /* Whether multiple nonexact match(es). */ \
+    size_t arglen = strlen (arg);                                       \
+                                                                        \
+    /* Test all elements for either exact match or abbreviated          \
+       matches.  */                                                     \
+    for (size_t i = 0; g->args[i].arg; i++)                             \
+      if (!strncmp (g->args[i].arg, arg, arglen))                       \
+        {                                                               \
+          if (strlen (g->args[i].arg) == arglen)                        \
+            /* Exact match found.  */                                   \
+            return i;                                                   \
+          else if (res == -1)                                           \
+            /* First nonexact match found.  */                          \
+            res = i;                                                    \
+          else if (memcmp (&g->args[res].val, &g->args[i].val, size))   \
+            /* Second nonexact match found.  */                         \
+            /* There is a real ambiguity, or we could not               \
+               disambiguate. */                                         \
+            ambiguous = true;                                           \
+        }                                                               \
+    return ambiguous ? -2 : res;                                        \
+  }                                                                     \
+                                                                        \
+  const char *                                                          \
+  argmatch_##Name##_argument (const argmatch_##Name##_type *val)        \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    size_t size = argmatch_##Name##_size;                               \
+    for (size_t i = 0; g->args[i].arg; i++)                             \
+      if (!memcmp (val, &g->args[i].val, size))                         \
+        return g->args[i].arg;                                          \
+    return NULL;                                                        \
+  }                                                                     \
+                                                                        \
+  /* List the valid values of this group. */                            \
+  static void                                                           \
+  argmatch_##Name##_valid (FILE *out)                                   \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    size_t size = argmatch_##Name##_size;                               \
+                                                                        \
+    /* Try to put synonyms on the same line.  Synonyms are expected     \
+       to follow each other. */                                         \
+    fputs (gettext ("Valid arguments are:"), out);                      \
+    for (int i = 0; g->args[i].arg; i++)                                \
+      if (i == 0                                                        \
+          || memcmp (&g->args[i-1].val, &g->args[i].val, size))         \
+        fprintf (out, "\n  - %s", quote (g->args[i].arg));              \
+      else                                                              \
+        fprintf (out, ", %s", quote (g->args[i].arg));                  \
+    putc ('\n', out);                                                   \
+  }                                                                     \
+                                                                        \
+  const argmatch_##Name##_type*                                         \
+  argmatch_##Name##_value (const char *context, const char *arg)        \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    ptrdiff_t res = argmatch_##Name##_choice (arg);                     \
+    if (res < 0)                                                        \
+      {                                                                 \
+        argmatch_invalid (context, arg, res);                           \
+        argmatch_##Name##_valid (stderr);                               \
+        argmatch_die ();                                                \
+      }                                                                 \
+    return &g->args[res].val;                                           \
+  }                                                                     \
+                                                                        \
+  /* The column in which the documentation is displayed.                \
+     The leftmost possible, but no more than 20. */                     \
+  static int                                                            \
+  argmatch_##Name##_doc_col (void)                                      \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    size_t size = argmatch_##Name##_size;                               \
+    int res = 0;                                                        \
+    for (int i = 0; g->docs[i].arg; ++i)                                \
+      {                                                                 \
+        int col = 4;                                                    \
+        int ival = argmatch_##Name##_choice (g->docs[i].arg);           \
+        if (ival < 0)                                                   \
+          /* Pseudo argument, display it. */                            \
+          col += strlen (g->docs[i].arg);                               \
+        else                                                            \
+          /* Genuine argument, display it with its synonyms. */         \
+          for (int j = 0; g->args[j].arg; ++j)                          \
+            if (! memcmp (&g->args[ival].val, &g->args[j].val, size))   \
+              col += (col == 4 ? 0 : 2) + strlen (g->args[j].arg);      \
+        if (res <= col)                                                 \
+          res = col <= 20 ? col : 20;                                   \
+      }                                                                 \
+    return res ? res : 20;                                              \
+  }                                                                     \
+                                                                        \
+  void                                                                  \
+  argmatch_##Name##_usage (FILE *out)                                   \
+  {                                                                     \
+    const argmatch_##Name##_group_type *g = &argmatch_##Name##_group;   \
+    size_t size = argmatch_##Name##_size;                               \
+    /* Width of the screen.  Help2man does not seem to support          \
+       arguments on several lines, so in that case pretend a very       \
+       large width. */                                                  \
+    const int screen_width = getenv ("HELP2MAN") ? INT_MAX : 80;        \
+    if (g->doc_pre)                                                     \
+      fprintf (out, "%s\n", gettext (g->doc_pre));                      \
+    int doc_col = argmatch_##Name##_doc_col ();                         \
+    for (int i = 0; g->docs[i].arg; ++i)                                \
+      {                                                                 \
+        int col = 0;                                                    \
+        bool first = true;                                              \
+        int ival = argmatch_##Name##_choice (g->docs[i].arg);           \
+        if (ival < 0)                                                   \
+          /* Pseudo argument, display it. */                            \
+          col += fprintf (out,  "  %s", g->docs[i].arg);                \
+        else                                                            \
+          /* Genuine argument, display it with its synonyms. */         \
+          for (int j = 0; g->args[j].arg; ++j)                          \
+            if (! memcmp (&g->args[ival].val, &g->args[j].val, size))   \
+              {                                                         \
+                if (!first                                              \
+                    && screen_width < col + 2 + strlen (g->args[j].arg)) \
+                  {                                                     \
+                    fprintf (out, ",\n");                               \
+                    col = 0;                                            \
+                    first = true;                                       \
+                  }                                                     \
+                if (first)                                              \
+                  {                                                     \
+                    col += fprintf (out, " ");                          \
+                    first = false;                                      \
+                  }                                                     \
+                else                                                    \
+                  col += fprintf (out, ",");                            \
+                col += fprintf (out,  " %s", g->args[j].arg);           \
+              }                                                         \
+        /* The doc.  Separated by at least two spaces. */               \
+        if (doc_col < col + 2)                                          \
+          {                                                             \
+            fprintf (out, "\n");                                        \
+            col = 0;                                                    \
+          }                                                             \
+        fprintf (out, "%*s%s\n",                                        \
+                 doc_col - col, "", gettext (g->docs[i].doc));          \
+      }                                                                 \
+    if (g->doc_post)                                                    \
+      fprintf (out, "%s\n", gettext (g->doc_post));                     \
+  }
+
+# ifdef  __cplusplus
 }
-#endif
+# endif
 
 #endif /* ARGMATCH_H_ */
index 2298455..c5367b2 100644 (file)
@@ -1,18 +1,18 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 061072f..9c78c13 100644 (file)
@@ -1,19 +1,19 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2007, 2009-2018 Free Software Foundation,
+   Copyright (C) 1999, 2002, 2006-2007, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 1cc600a..49aa82f 100644 (file)
@@ -1,18 +1,18 @@
 /* Run-time assert-like macros.
 
-   Copyright (C) 2014-2018 Free Software Foundation, Inc.
+   Copyright (C) 2014-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 #define _GL_ASSURE_H
 
 #include <assert.h>
+#include "verify.h"
+
+/* Evaluate an assertion E that is guaranteed to be true.
+   If NDEBUG is not defined, abort the program if E is false.
+   If NDEBUG is defined, the compiler can assume E and behavior is
+   undefined if E is false, fails to evaluate, or has side effects.
+
+   Unlike standard 'assert', this macro evaluates E even when NDEBUG
+   is defined, so as to catch typos, avoid some GCC warnings, and
+   improve performance when E is simple enough.
+
+   Also see the documentation for 'assume' in verify.h.  */
+
+#ifdef NDEBUG
+# define affirm(E) assume (E)
+#else
+# define affirm(E) assert (E)
+#endif
 
 /* Check E's value at runtime, and report an error and abort if not.
    However, do nothing if NDEBUG is defined.
 
-   Unlike standard 'assert', this macro always compiles E even when NDEBUG
-   is defined, so as to catch typos and avoid some GCC warnings.  */
+   Unlike standard 'assert', this macro compiles E even when NDEBUG
+   is defined, so as to catch typos and avoid some GCC warnings.
+   Unlike 'affirm', it is OK for E to use hard-to-optimize features,
+   since E is not executed if NDEBUG is defined.  */
 
 #ifdef NDEBUG
 # define assure(E) ((void) (0 && (E)))
diff --git a/lib/attribute.h b/lib/attribute.h
new file mode 100644 (file)
index 0000000..80a23f5
--- /dev/null
@@ -0,0 +1,218 @@
+/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
+
+   Copyright 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+/* Provide public ATTRIBUTE_* names for the private _GL_ATTRIBUTE_*
+   macros used within Gnulib.  */
+
+/* These attributes can be placed in two ways:
+     - At the start of a declaration (i.e. even before storage-class
+       specifiers!); then they apply to all entities that are declared
+       by the declaration.
+     - Immediately after the name of an entity being declared by the
+       declaration; then they apply to that entity only.  */
+
+#ifndef _GL_ATTRIBUTE_H
+#define _GL_ATTRIBUTE_H
+
+
+/* This file defines two types of attributes:
+   * C2x standard attributes.  These have macro names that do not begin with
+     'ATTRIBUTE_'.
+   * Selected GCC attributes; see:
+     https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
+     https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
+     https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html
+     These names begin with 'ATTRIBUTE_' to avoid name clashes.  */
+
+
+/* =============== Attributes for specific kinds of functions =============== */
+
+/* Attributes for functions that should not be used.  */
+
+/* Warn if the entity is used.  */
+/* Applies to:
+     - function, variable,
+     - struct, union, struct/union member,
+     - enumeration, enumeration item,
+     - typedef,
+   in C++ also: namespace, class, template specialization.  */
+#define DEPRECATED _GL_ATTRIBUTE_DEPRECATED
+
+/* If a function call is not optimized way, warn with MSG.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING (msg)
+
+/* If a function call is not optimized way, report an error with MSG.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR (msg)
+
+
+/* Attributes for memory-allocating functions.  */
+
+/* The function returns a pointer to freshly allocated memory.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC
+
+/* ATTRIBUTE_ALLOC_SIZE ((N)) - The Nth argument of the function
+   is the size of the returned memory block.
+   ATTRIBUTE_ALLOC_SIZE ((M, N)) - Multiply the Mth and Nth arguments
+   to determine the size of the returned memory block.  */
+/* Applies to: function, pointer to function, function types.  */
+#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args)
+
+
+/* Attributes for variadic functions.  */
+
+/* The variadic function expects a trailing NULL argument.
+   ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
+   ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos)
+
+
+/* ================== Attributes for compiler diagnostics ================== */
+
+/* Attributes that help the compiler diagnose programmer mistakes.
+   Some of them may also help for some compiler optimizations.  */
+
+/* ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK)) -
+   The STRING-INDEXth function argument is a format string of style
+   ARCHETYPE, which is one of:
+     printf, gnu_printf
+     scanf, gnu_scanf,
+     strftime, gnu_strftime,
+     strfmon,
+   or the same thing prefixed and suffixed with '__'.
+   If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
+   are suitable for the format string.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT (spec)
+
+/* ATTRIBUTE_NONNULL ((N1, N2,...)) - Arguments N1, N2,... must not be NULL.
+   ATTRIBUTE_NONNULL () - All pointer arguments must not be null.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL (args)
+
+/* The function's return value is a non-NULL pointer.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL
+
+/* Warn if the caller does not use the return value,
+   unless the caller uses something like ignore_value.  */
+/* Applies to: function, enumeration, class.  */
+#define NODISCARD _GL_ATTRIBUTE_NODISCARD
+
+
+/* Attributes that disable false alarms when the compiler diagnoses
+   programmer "mistakes".  */
+
+/* Do not warn if the entity is not used.  */
+/* Applies to:
+     - function, variable,
+     - struct, union, struct/union member,
+     - enumeration, enumeration item,
+     - typedef,
+   in C++ also: class.  */
+#define MAYBE_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
+
+/* 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'.  */
+#define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING
+
+/* Do not warn if control flow falls through to the immediately
+   following 'case' or 'default' label.  */
+/* Applies to: Empty statement (;), inside a 'switch' statement.  */
+#define FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
+
+
+/* ================== Attributes for debugging information ================== */
+
+/* Attributes regarding debugging information emitted by the compiler.  */
+
+/* Omit the function from stack traces when debugging.  */
+/* Applies to: function.  */
+#define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL
+
+/* Make the entity visible to debuggers etc., even with '-fwhole-program'.  */
+/* Applies to: functions, variables.  */
+#define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+
+
+/* ========== Attributes that mainly direct compiler optimizations ========== */
+
+/* The function does not throw exceptions.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW
+
+/* Do not inline the function.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE
+
+/* Always inline the function, and report an error if the compiler
+   cannot inline.  */
+/* Applies to: function.  */
+#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
+
+/* It is OK for a compiler to omit duplicate calls with the same arguments.
+   This attribute is safe for a function that neither depends on
+   nor affects observable state, and always returns exactly once -
+   e.g., does not loop forever, and does not call longjmp.
+   (This attribute is stricter than ATTRIBUTE_PURE.)  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
+
+/* It is OK for a compiler to omit duplicate calls with the same
+   arguments if observable state is not changed between calls.
+   This attribute is safe for a function that does not affect
+   observable state, and always returns exactly once.
+   (This attribute is looser than ATTRIBUTE_CONST.)  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
+
+/* The function is rarely executed.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD
+
+/* If called from some other compilation unit, the function executes
+   code from that unit only by return or by exception handling,
+   letting the compiler optimize that unit more aggressively.  */
+/* Applies to: functions.  */
+#define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF
+
+/* For struct members: The member has the smallest possible alignment.
+   For struct, union, class: All members have the smallest possible alignment,
+   minimizing the memory required.  */
+/* Applies to: struct members, struct, union,
+   in C++ also: class.  */
+#define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED
+
+
+/* ================ Attributes that make invalid code valid ================ */
+
+/* Attributes that prevent fatal compiler optimizations for code that is not
+   fully ISO C compliant.  */
+
+/* Pointers to the type may point to the same storage as pointers to
+   other types, thus disabling strict aliasing optimization.  */
+/* Applies to: types.  */
+#define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS
+
+
+#endif /* _GL_ATTRIBUTE_H */
index 33f9994..5dbd157 100644 (file)
@@ -1,37 +1,37 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
-#include "dirname.h"
+/* Specification.  */
+#include "basename-lgpl.h"
 
+#include <stdbool.h>
 #include <string.h>
 
-/* Return the address of the last file name component of NAME.  If
-   NAME has no relative file name components because it is a file
-   system root, return the empty string.  */
+#include "filename.h"
 
 char *
 last_component (char const *name)
 {
   char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
   char const *p;
-  bool saw_slash = false;
+  bool last_was_slash = false;
 
   while (ISSLASH (*base))
     base++;
@@ -39,21 +39,17 @@ last_component (char const *name)
   for (p = base; *p; p++)
     {
       if (ISSLASH (*p))
-        saw_slash = true;
-      else if (saw_slash)
+        last_was_slash = true;
+      else if (last_was_slash)
         {
           base = p;
-          saw_slash = false;
+          last_was_slash = false;
         }
     }
 
   return (char *) base;
 }
 
-/* Return the length of the basename NAME.  Typically NAME is the
-   value returned by base_name or last_component.  Act like strlen
-   (NAME), except omit all trailing slashes.  */
-
 size_t
 base_len (char const *name)
 {
diff --git a/lib/basename-lgpl.h b/lib/basename-lgpl.h
new file mode 100644 (file)
index 0000000..d520c09
--- /dev/null
@@ -0,0 +1,78 @@
+/* Extract the last component (base name) of a file name.
+
+   Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
+   Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _BASENAME_LGPL_H
+#define _BASENAME_LGPL_H
+
+#include <stddef.h>
+
+#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the address of the last file name component of FILENAME.
+   If FILENAME has some trailing slash(es), they are considered to be
+   part of the last component.
+   If FILENAME has no relative file name components because it is a file
+   system root, return the empty string.
+   Examples:
+              FILENAME      RESULT
+              "foo.c"       "foo.c"
+              "foo/bar.c"   "bar.c"
+              "/foo/bar.c"  "bar.c"
+              "foo/bar/"    "bar/"
+              "foo/bar//"   "bar//"
+              "/"           ""
+              "//"          ""
+              ""            ""
+   The return value is a tail of the given FILENAME; do NOT free() it!  */
+
+/* This function was traditionally called 'basename', but we avoid this
+   function name because
+     * Various platforms have different functions in their libc.
+       In particular, the glibc basename(), defined in <string.h>, does
+       not consider trailing slashes to be part of the component:
+              FILENAME      RESULT
+              "foo/bar/"    ""
+              "foo/bar//"   ""
+     * The 'basename' command eliminates trailing slashes and for a root
+       produces a non-empty result:
+              FILENAME      RESULT
+              "foo/bar/"    "bar"
+              "foo/bar//"   "bar"
+              "/"           "/"
+              "//"          "/"
+ */
+extern char *last_component (char const *filename) _GL_ATTRIBUTE_PURE;
+
+/* Return the length of the basename FILENAME.
+   Typically FILENAME is the value returned by base_name or last_component.
+   Act like strlen (FILENAME), except omit all trailing slashes.  */
+extern size_t base_len (char const *filename) _GL_ATTRIBUTE_PURE;
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* _BASENAME_LGPL_H */
index 02adb8c..1181134 100644 (file)
@@ -1,6 +1,6 @@
 /* basename.c -- return the last element in a file name
 
-   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 Free Software
+   Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <string.h>
 #include "xalloc.h"
-#include "xstrndup.h"
 
 char *
 base_name (char const *name)
 {
   char const *base = last_component (name);
-  size_t length;
-
-  /* If there is no last component, then name is a file system root or the
-     empty string.  */
-  if (! *base)
-    return xstrndup (name, base_len (name));
-
-  /* Collapse a sequence of trailing slashes into one.  */
-  length = base_len (base);
-  if (ISSLASH (base[length]))
-    length++;
-
-  /* On systems with drive letters, "a/b:c" must return "./b:c" rather
-     than "b:c" to avoid confusion with a drive letter.  On systems
-     with pure POSIX semantics, this is not an issue.  */
-  if (FILE_SYSTEM_PREFIX_LEN (base))
+  idx_t length;
+  int dotslash_len;
+  if (*base)
+    {
+      length = base_len (base);
+
+      /* Collapse a sequence of trailing slashes into one.  */
+      length += ISSLASH (base[length]);
+
+      /* On systems with drive letters, "a/b:c" must return "./b:c" rather
+         than "b:c" to avoid confusion with a drive letter.  On systems
+         with pure POSIX semantics, this is not an issue.  */
+      dotslash_len = FILE_SYSTEM_PREFIX_LEN (base) != 0 ? 2 : 0;
+    }
+  else
+    {
+      /* There is no last component, so NAME is a file system root or
+         the empty string.  */
+      base = name;
+      length = base_len (base);
+      dotslash_len = 0;
+    }
+
+  char *p = ximalloc (dotslash_len + length + 1);
+  if (dotslash_len)
     {
-      char *p = xmalloc (length + 3);
       p[0] = '.';
       p[1] = '/';
-      memcpy (p + 2, base, length);
-      p[length + 2] = '\0';
-      return p;
     }
 
   /* Finally, copy the basename.  */
-  return xstrndup (base, length);
+  memcpy (p + dotslash_len, base, length);
+  p[dotslash_len + length] = '\0';
+  return p;
 }
index f9cc4dd..adc0ae2 100644 (file)
@@ -1,17 +1,17 @@
 /* Binary mode I/O.
-   Copyright 2017-2018 Free Software Foundation, Inc.
+   Copyright 2017-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include "binary-io.h"
 
 #if defined __DJGPP__ || defined __EMX__
-# include <errno.h>
 # include <unistd.h>
 
 int
-__gl_setmode_check (int fd)
+set_binary_mode (int fd, int mode)
 {
   if (isatty (fd))
-    {
-      errno = EINVAL;
-      return -1;
-    }
+    /* If FD refers to a console (not a pipe, not a regular file),
+       O_TEXT is the only reasonable mode, both on input and on output.
+       Silently ignore the request.  If we were to return -1 here,
+       all programs that use xset_binary_mode would fail when run
+       with console input or console output.  */
+    return O_TEXT;
   else
-    return 0;
+    return __gl_setmode (fd, mode);
 }
+
 #endif
index 1f21fc0..0fa8d54 100644 (file)
@@ -1,17 +1,17 @@
 /* Binary mode I/O.
-   Copyright (C) 2001, 2003, 2005, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _BINARY_H
@@ -53,25 +53,21 @@ __gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED)
 }
 #endif
 
-#if defined __DJGPP__ || defined __EMX__
-extern int __gl_setmode_check (int);
-#else
-BINARY_IO_INLINE int
-__gl_setmode_check (int fd _GL_UNUSED) { return 0; }
-#endif
-
 /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY.
    Return the old mode if successful, -1 (setting errno) on failure.
    Ordinarily this function would be called 'setmode', since that is
-   its name on MS-Windows, but it is called 'set_binary_mode' here
+   its old name on MS-Windows, but it is called 'set_binary_mode' here
    to avoid colliding with a BSD function of another name.  */
 
+#if defined __DJGPP__ || defined __EMX__
+extern int set_binary_mode (int fd, int mode);
+#else
 BINARY_IO_INLINE int
 set_binary_mode (int fd, int mode)
 {
-  int r = __gl_setmode_check (fd);
-  return r != 0 ? r : __gl_setmode (fd, mode);
+  return __gl_setmode (fd, mode);
 }
+#endif
 
 /* This macro is obsolescent.  */
 #define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))
index a8f6028..e8987f2 100644 (file)
@@ -1,3 +1,21 @@
+/* Rotate bits in integers.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define BITROTATE_INLINE _GL_EXTERN_INLINE
 #include "bitrotate.h"
index 9eb6a6f..ceb734a 100644 (file)
@@ -1,17 +1,17 @@
 /* bitrotate.h - Rotate bits in integers
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
@@ -95,7 +95,8 @@ rotr_sz (size_t x, int n)
 BITROTATE_INLINE uint16_t
 rotl16 (uint16_t x, int n)
 {
-  return ((x << n) | (x >> (16 - n))) & UINT16_MAX;
+  return (((unsigned int) x << n) | ((unsigned int) x >> (16 - n)))
+         & UINT16_MAX;
 }
 
 /* Given an unsigned 16-bit argument X, return the value corresponding
@@ -106,7 +107,8 @@ rotl16 (uint16_t x, int n)
 BITROTATE_INLINE uint16_t
 rotr16 (uint16_t x, int n)
 {
-  return ((x >> n) | (x << (16 - n))) & UINT16_MAX;
+  return (((unsigned int) x >> n) | ((unsigned int) x << (16 - n)))
+         & UINT16_MAX;
 }
 
 /* Given an unsigned 8-bit argument X, return the value corresponding
@@ -117,7 +119,7 @@ rotr16 (uint16_t x, int n)
 BITROTATE_INLINE uint8_t
 rotl8 (uint8_t x, int n)
 {
-  return ((x << n) | (x >> (8 - n))) & UINT8_MAX;
+  return (((unsigned int) x << n) | ((unsigned int) x >> (8 - n))) & UINT8_MAX;
 }
 
 /* Given an unsigned 8-bit argument X, return the value corresponding
@@ -128,7 +130,7 @@ rotl8 (uint8_t x, int n)
 BITROTATE_INLINE uint8_t
 rotr8 (uint8_t x, int n)
 {
-  return ((x >> n) | (x << (8 - n))) & UINT8_MAX;
+  return (((unsigned int) x >> n) | ((unsigned int) x << (8 - n))) & UINT8_MAX;
 }
 
 _GL_INLINE_HEADER_END
index 54124b2..b8239af 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 72ff1ff..a47b61a 100644 (file)
@@ -1,17 +1,17 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_CXXDEFS_H
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA (func, rettype, parameters);
+   is to be used when func is a Microsoft deprecated alias, on native Windows.
+   It declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to _func, if GNULIB_NAMESPACE is defined.
+   Example:
+     _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
+ */
+#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
    except that the C function rpl_func may have a slightly different
     _GL_EXTERN_C int _gl_cxxalias_dummy
 #endif
 
+/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
+   is like  _GL_CXXALIAS_MDA (func, rettype, parameters);
+   except that the C function func may have a slightly different declaration.
+   A cast is used to silence the "invalid conversion" error that would
+   otherwise occur.  */
+#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
+
 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
    declares a C++ alias called GNULIB_NAMESPACE::func
    that redirects to the system provided function func, if GNULIB_NAMESPACE
    _GL_CXXALIASWARN_2 (func, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN_2(func,namespace) \
     _GL_WARN_ON_USE (func, \
                      "The symbol ::" #func " refers to the system function. " \
    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
    we enable the warning only when not optimizing.  */
-# if !__OPTIMIZE__
+# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+    _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
                          "The symbol ::" #func " refers to the system function. " \
                          "Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
-     extern __typeof__ (func) func
 # else
 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
      _GL_EXTERN_C int _gl_cxxalias_dummy
index 5d9d4d8..300f97c 100644 (file)
@@ -1,3 +1,21 @@
+/* Character handling in C locale.
+
+   Copyright (C) 2003-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define C_CTYPE_INLINE _GL_EXTERN_INLINE
 #include "c-ctype.h"
index d55d4f6..3a652ac 100644 (file)
@@ -5,20 +5,20 @@
    <ctype.h> functions' behaviour depends on the current locale set via
    setlocale.
 
-   Copyright (C) 2000-2003, 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2006, 2008-2021 Free Software Foundation, Inc.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef C_CTYPE_H
 #define C_CTYPE_H
index 9bbe6fe..1965bdd 100644 (file)
@@ -1,6 +1,6 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004, 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <config.h>
 
-#ifndef __attribute__
-# if __GNUC__ < 3
-#  define __attribute__(x)
-# endif
-#endif
-
-#include "gettext.h"
-#define _(msgid) gettext (msgid)
+#include "c-stack.h"
 
 #include <errno.h>
-
+#include <inttypes.h>
 #include <signal.h>
-#if ! HAVE_STACK_T && ! defined stack_t
-typedef struct sigaltstack stack_t;
-#endif
-#ifndef SIGSTKSZ
-# define SIGSTKSZ 16384
-#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
-/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
-   more than the Linux default of an 8k alternate stack when deciding
-   if a fault was caused by stack overflow.  */
-# undef SIGSTKSZ
-# define SIGSTKSZ 16384
-#endif
-
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
-
-/* Posix 2001 declares ucontext_t in <ucontext.h>, Posix 200x in
-   <signal.h>.  */
-#if HAVE_UCONTEXT_H
-# include <ucontext.h>
-#endif
-
 #include <unistd.h>
 
-#if HAVE_LIBSIGSEGV
-# include <sigsegv.h>
+#if DEBUG
+# include <stdio.h>
 #endif
 
-#include "c-stack.h"
+#include <sigsegv.h>
+
 #include "exitfail.h"
-#include "ignore-value.h"
 #include "getprogname.h"
+#include "idx.h"
+#include "ignore-value.h"
 
-#if defined SA_ONSTACK && defined SA_SIGINFO
-# define SIGINFO_WORKS 1
-#else
-# define SIGINFO_WORKS 0
-# ifndef SA_ONSTACK
-#  define SA_ONSTACK 0
-# endif
-#endif
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#if HAVE_STACK_OVERFLOW_RECOVERY
+
+/* Storage for the alternate signal stack.
+   64 KiB is not too large for Gnulib-using apps, and is large enough
+   for all known platforms.  Smaller sizes may run into trouble.
+   For example, libsigsegv 2.6 through 2.8 have a bug where some
+   architectures use more than the Linux default of an 8 KiB alternate
+   stack when deciding if a fault was caused by stack overflow.  */
+static max_align_t alternate_signal_stack[(64 * 1024
+                                           + sizeof (max_align_t) - 1)
+                                          / sizeof (max_align_t)];
 
 /* The user-specified action to take when a SEGV-related program error
    or stack overflow occurs.  */
-static void (* volatile segv_action) (int);
+static _GL_ASYNC_SAFE void (* volatile segv_action) (int);
 
 /* Translated messages for program errors and stack overflow.  Do not
    translate them in the signal handler, since gettext is not
@@ -99,64 +81,59 @@ static void (* volatile segv_action) (int);
 static char const * volatile program_error_message;
 static char const * volatile stack_overflow_message;
 
-#if ((HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC) \
-     || (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK            \
-         && HAVE_STACK_OVERFLOW_HANDLING))
-
 /* Output an error message, then exit with status EXIT_FAILURE if it
    appears to have been a stack overflow, or with a core dump
    otherwise.  This function is async-signal-safe.  */
 
-static _Noreturn void
+static char const * volatile progname;
+
+static _GL_ASYNC_SAFE _Noreturn void
 die (int signo)
 {
-  char const *message;
-#if !SIGINFO_WORKS && !HAVE_LIBSIGSEGV
-  /* We can't easily determine whether it is a stack overflow; so
-     assume that the rest of our program is perfect (!) and that
-     this segmentation violation is a stack overflow.  */
-  signo = 0;
-#endif /* !SIGINFO_WORKS && !HAVE_LIBSIGSEGV */
   segv_action (signo);
-  message = signo ? program_error_message : stack_overflow_message;
-  ignore_value (write (STDERR_FILENO, getprogname (), strlen (getprogname ())));
-  ignore_value (write (STDERR_FILENO, ": ", 2));
-  ignore_value (write (STDERR_FILENO, message, strlen (message)));
-  ignore_value (write (STDERR_FILENO, "\n", 1));
+  char const *message = signo ? program_error_message : stack_overflow_message;
+
+  /* If the message is short, write it all at once to avoid
+     interleaving with other messages.  Avoid writev as it is not
+     documented to be async-signal-safe.  */
+  size_t prognamelen = strlen (progname);
+  size_t messagelen = strlen (message);
+  static char const separator[] = {':', ' '};
+  char buf[sizeof alternate_signal_stack / 16 + sizeof separator];
+  idx_t buflen;
+  if (prognamelen + messagelen < sizeof buf - sizeof separator)
+    {
+      char *p = mempcpy (buf, progname, prognamelen);
+      p = mempcpy (p, separator, sizeof separator);
+      p = mempcpy (p, message, messagelen);
+      *p++ = '\n';
+      buflen = p - buf;
+    }
+  else
+    {
+      ignore_value (write (STDERR_FILENO, progname, prognamelen));
+      ignore_value (write (STDERR_FILENO, separator, sizeof separator));
+      ignore_value (write (STDERR_FILENO, message, messagelen));
+      buf[0] = '\n';
+      buflen = 1;
+    }
+  ignore_value (write (STDERR_FILENO, buf, buflen));
+
   if (! signo)
     _exit (exit_failure);
   raise (signo);
   abort ();
 }
-#endif
-
-#if (HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK \
-     && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV
 
-/* Storage for the alternate signal stack.  */
-static union
-{
-  char buffer[SIGSTKSZ];
-
-  /* These other members are for proper alignment.  There's no
-     standard way to guarantee stack alignment, but this seems enough
-     in practice.  */
-  long double ld;
-  long l;
-  void *p;
-} alternate_signal_stack;
-
-static void
-null_action (int signo __attribute__ ((unused)))
+static _GL_ASYNC_SAFE void
+null_action (int signo _GL_UNUSED)
 {
 }
 
-#endif /* SIGALTSTACK || LIBSIGSEGV */
-
-/* Only use libsigsegv if we need it; platforms like Solaris can
-   detect stack overflow without the overhead of an external
-   library.  */
-#if HAVE_LIBSIGSEGV && ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC
+/* Pacify GCC 9.3.1, which otherwise would complain about segv_handler.  */
+# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+#  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
 
 /* Nonzero if general segv handler could not be installed.  */
 static volatile int segv_handler_missing;
@@ -164,14 +141,16 @@ static volatile int segv_handler_missing;
 /* Handle a segmentation violation and exit if it cannot be stack
    overflow.  This function is async-signal-safe.  */
 
-static int segv_handler (void *address __attribute__ ((unused)),
-                         int serious)
+static _GL_ASYNC_SAFE int
+segv_handler (void *address _GL_UNUSED, int serious)
 {
 # if DEBUG
   {
     char buf[1024];
-    sprintf (buf, "segv_handler serious=%d\n", serious);
-    write (STDERR_FILENO, buf, strlen (buf));
+    int saved_errno = errno;
+    ignore_value (write (STDERR_FILENO, buf,
+                         sprintf (buf, "segv_handler serious=%d\n", serious)));
+    errno = saved_errno;
   }
 # endif
 
@@ -185,16 +164,16 @@ static int segv_handler (void *address __attribute__ ((unused)),
 /* Handle a segmentation violation that is likely to be a stack
    overflow and exit.  This function is async-signal-safe.  */
 
-static _Noreturn void
-overflow_handler (int emergency,
-                  stackoverflow_context_t context __attribute__ ((unused)))
+static _GL_ASYNC_SAFE _Noreturn void
+overflow_handler (int emergency, stackoverflow_context_t context _GL_UNUSED)
 {
 # if DEBUG
   {
     char buf[1024];
-    sprintf (buf, "overflow_handler emergency=%d segv_handler_missing=%d\n",
-             emergency, segv_handler_missing);
-    write (STDERR_FILENO, buf, strlen (buf));
+    ignore_value (write (STDERR_FILENO, buf,
+                         sprintf (buf, ("overflow_handler emergency=%d"
+                                        " segv_handler_missing=%d\n"),
+                                  emergency, segv_handler_missing)));
   }
 # endif
 
@@ -202,16 +181,17 @@ overflow_handler (int emergency,
 }
 
 int
-c_stack_action (void (*action) (int))
+c_stack_action (_GL_ASYNC_SAFE void (*action) (int))
 {
   segv_action = action ? action : null_action;
   program_error_message = _("program error");
   stack_overflow_message = _("stack overflow");
+  progname = getprogname ();
 
   /* Always install the overflow handler.  */
   if (stackoverflow_install_handler (overflow_handler,
-                                     alternate_signal_stack.buffer,
-                                     sizeof alternate_signal_stack.buffer))
+                                     alternate_signal_stack,
+                                     sizeof alternate_signal_stack))
     {
       errno = ENOTSUP;
       return -1;
@@ -222,110 +202,10 @@ c_stack_action (void (*action) (int))
   return 0;
 }
 
-#elif HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK && HAVE_STACK_OVERFLOW_HANDLING
-
-# if SIGINFO_WORKS
-
-/* Handle a segmentation violation and exit.  This function is
-   async-signal-safe.  */
-
-static _Noreturn void
-segv_handler (int signo, siginfo_t *info,
-              void *context __attribute__ ((unused)))
-{
-  /* Clear SIGNO if it seems to have been a stack overflow.  */
-#  if ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC
-  /* We can't easily determine whether it is a stack overflow; so
-     assume that the rest of our program is perfect (!) and that
-     this segmentation violation is a stack overflow.
-
-     Note that although both Linux and Solaris provide
-     sigaltstack, SA_ONSTACK, and SA_SIGINFO, currently only
-     Solaris satisfies the XSI heuristic.  This is because
-     Solaris populates uc_stack with the details of the
-     interrupted stack, while Linux populates it with the details
-     of the current stack.  */
-  signo = 0;
-#  else
-  if (0 < info->si_code)
-    {
-      /* If the faulting address is within the stack, or within one
-         page of the stack, assume that it is a stack overflow.  */
-      ucontext_t const *user_context = context;
-      char const *stack_base = user_context->uc_stack.ss_sp;
-      size_t stack_size = user_context->uc_stack.ss_size;
-      char const *faulting_address = info->si_addr;
-      size_t page_size = sysconf (_SC_PAGESIZE);
-      size_t s = faulting_address - stack_base + page_size;
-      if (s < stack_size + 2 * page_size)
-        signo = 0;
-
-#   if DEBUG
-      {
-        char buf[1024];
-        sprintf (buf,
-                 "segv_handler fault=%p base=%p size=%lx page=%lx signo=%d\n",
-                 faulting_address, stack_base, (unsigned long) stack_size,
-                 (unsigned long) page_size, signo);
-        write (STDERR_FILENO, buf, strlen (buf));
-      }
-#   endif
-    }
-#  endif
-
-  die (signo);
-}
-# endif
-
-int
-c_stack_action (void (*action) (int))
-{
-  int r;
-  stack_t st;
-  struct sigaction act;
-  st.ss_flags = 0;
-# if SIGALTSTACK_SS_REVERSED
-  /* Irix mistakenly treats ss_sp as the upper bound, rather than
-     lower bound, of the alternate stack.  */
-  st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ - sizeof (void *);
-  st.ss_size = sizeof alternate_signal_stack.buffer - sizeof (void *);
-# else
-  st.ss_sp = alternate_signal_stack.buffer;
-  st.ss_size = sizeof alternate_signal_stack.buffer;
-# endif
-  r = sigaltstack (&st, NULL);
-  if (r != 0)
-    return r;
-
-  segv_action = action ? action : null_action;
-  program_error_message = _("program error");
-  stack_overflow_message = _("stack overflow");
-
-  sigemptyset (&act.sa_mask);
-
-# if SIGINFO_WORKS
-  /* POSIX 1003.1-2001 says SA_RESETHAND implies SA_NODEFER, but
-     this is not true on Solaris 8 at least.  It doesn't hurt to use
-     SA_NODEFER here, so leave it in.  */
-  act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
-  act.sa_sigaction = segv_handler;
-# else
-  act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
-  act.sa_handler = die;
-# endif
-
-# if FAULT_YIELDS_SIGBUS
-  if (sigaction (SIGBUS, &act, NULL) < 0)
-    return -1;
-# endif
-  return sigaction (SIGSEGV, &act, NULL);
-}
-
-#else /* ! ((HAVE_SIGALTSTACK && HAVE_DECL_SIGALTSTACK
-             && HAVE_STACK_OVERFLOW_HANDLING) || HAVE_LIBSIGSEGV) */
+#else /* !HAVE_STACK_OVERFLOW_RECOVERY */
 
 int
-c_stack_action (void (*action) (int)  __attribute__ ((unused)))
+c_stack_action (_GL_ASYNC_SAFE void (*action) (int)  _GL_UNUSED)
 {
   errno = ENOTSUP;
   return -1;
index 57963c0..a9a8b13 100644 (file)
@@ -1,6 +1,6 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    A null ACTION acts like an action that does nothing.
 
-   ACTION must be async-signal-safe.  ACTION together with its callees
-   must not require more than SIGSTKSZ bytes of stack space.  Also,
-   ACTION should not call longjmp, because this implementation does
-   not guarantee that it is safe to return to the original stack.
+   Restrictions:
+   - ACTION must be async-signal-safe.
+   - ACTION together with its callees must not require more than 64 KiB of
+     stack space.
+   - ACTION must not create and then invoke nested functions
+     <https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html>, because
+     this implementation does not guarantee an executable stack.
+   - ACTION should not call longjmp, because this implementation does not
+     guarantee that it is safe to return to the original stack.
 
    This function may install a handler for the SIGSEGV signal or for the SIGBUS
    signal or exercise other system dependent exception handling APIs.  */
 
-extern int c_stack_action (void (* /*action*/) (int));
+extern int c_stack_action (_GL_ASYNC_SAFE void (* /*action*/) (int));
index 41f439e..82f99bb 100644 (file)
@@ -1,19 +1,19 @@
 /* Case-insensitive string comparison functions in C locale.
-   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2018 Free Software
+   Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef C_STRCASE_H
 #define C_STRCASE_H
index 2b1ac99..3c22455 100644 (file)
@@ -1,18 +1,18 @@
 /* c-strcasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -52,5 +52,5 @@ c_strcasecmp (const char *s1, const char *s2)
     /* On machines where 'char' and 'int' are types of the same size, the
        difference of two 'unsigned char' values - including the sign bit -
        doesn't fit in an 'int'.  */
-    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+    return _GL_CMP (c1, c2);
 }
index 9bde9de..66b9cf3 100644 (file)
@@ -1,17 +1,17 @@
 /* Optimized case-insensitive string comparison in C locale.
-   Copyright (C) 2001-2002, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
@@ -27,7 +27,7 @@
 
 /* Help GCC to generate good code for string comparisons with
    immediate strings. */
-#if defined (__GNUC__) && defined (__OPTIMIZE__)
+#if (defined __GNUC__ || defined __clang__) && defined __OPTIMIZE__
 
 /* Case insensitive comparison of ASCII characters.  */
 # if C_CTYPE_ASCII
index 8151c1a..f3ca786 100644 (file)
@@ -1,18 +1,18 @@
 /* c-strncasecmp.c -- case insensitive string comparator in C locale
-   Copyright (C) 1998-1999, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -52,5 +52,5 @@ c_strncasecmp (const char *s1, const char *s2, size_t n)
     /* On machines where 'char' and 'int' are types of the same size, the
        difference of two 'unsigned char' values - including the sign bit -
        doesn't fit in an 'int'.  */
-    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+    return _GL_CMP (c1, c2);
 }
diff --git a/lib/calloc.c b/lib/calloc.c
new file mode 100644 (file)
index 0000000..25064e9
--- /dev/null
@@ -0,0 +1,55 @@
+/* calloc() function that is glibc compatible.
+   This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
+   Copyright (C) 2004-2007, 2009-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+#include <errno.h>
+
+#include "xalloc-oversized.h"
+
+/* Call the system's calloc below.  */
+#undef calloc
+
+/* Allocate and zero-fill an NxS-byte block of memory from the heap,
+   even if N or S is zero.  */
+
+void *
+rpl_calloc (size_t n, size_t s)
+{
+  if (n == 0 || s == 0)
+    n = s = 1;
+
+  if (xalloc_oversized (n, s))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  void *result = calloc (n, s);
+
+#if !HAVE_MALLOC_POSIX
+  if (result == NULL)
+    errno = ENOMEM;
+#endif
+
+  return result;
+}
index b5ae905..9d0c125 100644 (file)
@@ -1,19 +1,19 @@
 /* Read symbolic links into a buffer without size limitation, relative to fd.
 
-   Copyright (C) 2001, 2003-2004, 2007, 2009-2018 Free Software Foundation,
+   Copyright (C) 2001, 2003-2004, 2007, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
@@ -22,6 +22,9 @@
 
 #include "careadlinkat.h"
 
+#include "idx.h"
+#include "minmax.h"
+
 #include <errno.h>
 #include <limits.h>
 #include <string.h>
 
 #include "allocator.h"
 
-/* Assuming the current directory is FD, get the symbolic link value
-   of FILENAME as a null-terminated string and put it into a buffer.
-   If FD is AT_FDCWD, FILENAME is interpreted relative to the current
-   working directory, as in openat.
-
-   If the link is small enough to fit into BUFFER put it there.
-   BUFFER's size is BUFFER_SIZE, and BUFFER can be null
-   if BUFFER_SIZE is zero.
-
-   If the link is not small, put it into a dynamically allocated
-   buffer managed by ALLOC.  It is the caller's responsibility to free
-   the returned value if it is nonnull and is not BUFFER.  A null
-   ALLOC stands for the standard allocator.
-
-   The PREADLINKAT function specifies how to read links.  It operates
-   like POSIX readlinkat()
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
-   but can assume that its first argument is the same as FD.
-
-   If successful, return the buffer address; otherwise return NULL and
-   set errno.  */
-
-char *
-careadlinkat (int fd, char const *filename,
+enum { STACK_BUF_SIZE = 1024 };
+
+/* Act like careadlinkat (see below), with an additional argument
+   STACK_BUF that can be used as temporary storage.
+
+   If GCC_LINT is defined, do not inline this function with GCC 10.1
+   and later, to avoid creating a pointer to the stack that GCC
+   -Wreturn-local-addr incorrectly complains about.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
+   Although the noinline attribute can hurt performance a bit, no better way
+   to pacify GCC is known; even an explicit #pragma does not pacify GCC.
+   When the GCC bug is fixed this workaround should be limited to the
+   broken GCC versions.  */
+#if _GL_GNUC_PREREQ (10, 1)
+# if defined GCC_LINT || defined lint
+__attribute__ ((__noinline__))
+# elif __OPTIMIZE__ && !__NO_INLINE__
+#  define GCC_BOGUS_WRETURN_LOCAL_ADDR
+# endif
+#endif
+static char *
+readlink_stk (int fd, char const *filename,
               char *buffer, size_t buffer_size,
               struct allocator const *alloc,
-              ssize_t (*preadlinkat) (int, char const *, char *, size_t))
+              ssize_t (*preadlinkat) (int, char const *, char *, size_t),
+              char stack_buf[STACK_BUF_SIZE])
 {
-  char *buf;
-  size_t buf_size;
-  size_t buf_size_max =
-    SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
-  char stack_buf[1024];
-
   if (! alloc)
     alloc = &stdlib_allocator;
 
-  if (! buffer_size)
+  if (!buffer)
     {
-      /* Allocate the initial buffer on the stack.  This way, in the
-         common case of a symlink of small size, we get away with a
-         single small malloc() instead of a big malloc() followed by a
-         shrinking realloc().  */
       buffer = stack_buf;
-      buffer_size = sizeof stack_buf;
+      buffer_size = STACK_BUF_SIZE;
     }
 
-  buf = buffer;
-  buf_size = buffer_size;
+  char *buf = buffer;
+  idx_t buf_size_max = MIN (IDX_MAX, MIN (SSIZE_MAX, SIZE_MAX));
+  idx_t buf_size = MIN (buffer_size, buf_size_max);
 
-  do
+  while (buf)
     {
       /* Attempt to read the link into the current buffer.  */
-      ssize_t link_length = preadlinkat (fd, filename, buf, buf_size);
-      size_t link_size;
+      idx_t link_length = preadlinkat (fd, filename, buf, buf_size);
       if (link_length < 0)
         {
-          /* On AIX 5L v5.3 and HP-UX 11i v2 04/09, readlink returns -1
-             with errno == ERANGE if the buffer is too small.  */
-          int readlinkat_errno = errno;
-          if (readlinkat_errno != ERANGE)
+          if (buf != buffer)
             {
-              if (buf != buffer)
-                {
-                  alloc->free (buf);
-                  errno = readlinkat_errno;
-                }
-              return NULL;
+              int readlinkat_errno = errno;
+              alloc->free (buf);
+              errno = readlinkat_errno;
             }
+          return NULL;
         }
 
-      link_size = link_length;
+      idx_t link_size = link_length;
 
       if (link_size < buf_size)
         {
@@ -117,19 +104,19 @@ careadlinkat (int fd, char const *filename,
 
           if (buf == stack_buf)
             {
-              char *b = (char *) alloc->allocate (link_size);
+              char *b = alloc->allocate (link_size);
               buf_size = link_size;
               if (! b)
                 break;
-              memcpy (b, buf, link_size);
-              buf = b;
+              return memcpy (b, buf, link_size);
             }
-          else if (link_size < buf_size && buf != buffer && alloc->reallocate)
+
+          if (link_size < buf_size && buf != buffer && alloc->reallocate)
             {
               /* Shrink BUF before returning it.  */
-              char *b = (char *) alloc->reallocate (buf, link_size);
+              char *b = alloc->reallocate (buf, link_size);
               if (b)
-                buf = b;
+                return b;
             }
 
           return buf;
@@ -138,23 +125,60 @@ careadlinkat (int fd, char const *filename,
       if (buf != buffer)
         alloc->free (buf);
 
-      if (buf_size <= buf_size_max / 2)
-        buf_size *= 2;
-      else if (buf_size < buf_size_max)
-        buf_size = buf_size_max;
-      else if (buf_size_max < SIZE_MAX)
+      if (buf_size_max / 2 <= buf_size)
         {
           errno = ENAMETOOLONG;
           return NULL;
         }
-      else
-        break;
-      buf = (char *) alloc->allocate (buf_size);
+
+      buf_size = 2 * buf_size + 1;
+      buf = alloc->allocate (buf_size);
     }
-  while (buf);
 
   if (alloc->die)
     alloc->die (buf_size);
   errno = ENOMEM;
   return NULL;
 }
+
+
+/* Assuming the current directory is FD, get the symbolic link value
+   of FILENAME as a null-terminated string and put it into a buffer.
+   If FD is AT_FDCWD, FILENAME is interpreted relative to the current
+   working directory, as in openat.
+
+   If the link is small enough to fit into BUFFER put it there.
+   BUFFER's size is BUFFER_SIZE, and BUFFER can be null
+   if BUFFER_SIZE is zero.
+
+   If the link is not small, put it into a dynamically allocated
+   buffer managed by ALLOC.  It is the caller's responsibility to free
+   the returned value if it is nonnull and is not BUFFER.  A null
+   ALLOC stands for the standard allocator.
+
+   The PREADLINKAT function specifies how to read links.  It operates
+   like POSIX readlinkat()
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
+   but can assume that its first argument is the same as FD.
+
+   If successful, return the buffer address; otherwise return NULL and
+   set errno.  */
+
+char *
+careadlinkat (int fd, char const *filename,
+              char *buffer, size_t buffer_size,
+              struct allocator const *alloc,
+              ssize_t (*preadlinkat) (int, char const *, char *, size_t))
+{
+  /* Allocate the initial buffer on the stack.  This way, in the
+     common case of a symlink of small size, we get away with a
+     single small malloc instead of a big malloc followed by a
+     shrinking realloc.  */
+  #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
+   #warning "GCC might issue a bogus -Wreturn-local-addr warning here."
+   #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
+  #endif
+  char stack_buf[STACK_BUF_SIZE];
+  return readlink_stk (fd, filename, buffer, buffer_size, alloc,
+                       preadlinkat, stack_buf);
+}
index 051d3ed..a3517b8 100644 (file)
@@ -1,18 +1,18 @@
 /* Read symbolic links into a buffer without size limitation, relative to fd.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
@@ -40,14 +40,14 @@ struct allocator;
 
    The PREADLINKAT function specifies how to read links.  It operates
    like POSIX readlinkat()
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>
    but can assume that its first argument is the same as FD.
 
    If successful, return the buffer address; otherwise return NULL and
    set errno.  */
 
 char *careadlinkat (int fd, char const *filename,
-                    char *buffer, size_t buffer_size,
+                    char *restrict buffer, size_t buffer_size,
                     struct allocator const *alloc,
                     ssize_t (*preadlinkat) (int, char const *,
                                             char *, size_t));
index 70fb638..b883b25 100644 (file)
@@ -1,17 +1,17 @@
-/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -25,7 +25,7 @@
 
 /* The GNU libc does not support any K&R compilers or the traditional mode
    of ISO C compilers anymore.  Check for some of the combinations not
-   anymore supported.  */
+   supported anymore.  */
 #if defined __GNUC__ && !defined __STDC__
 # error "You need a ISO C conforming compiler to use the glibc headers"
 #endif
 #undef __P
 #undef __PMT
 
-#ifdef __GNUC__
+/* Compilers that lack __has_attribute may object to
+       #if defined __has_attribute && __has_attribute (...)
+   even though they do not need to evaluate the right-hand side of the &&.
+   Similarly for __has_builtin, etc.  */
+#if (defined __has_attribute \
+     && (!defined __clang_minor__ \
+         || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+#ifdef __has_builtin
+# define __glibc_has_builtin(name) __has_builtin (name)
+#else
+# define __glibc_has_builtin(name) 0
+#endif
+#ifdef __has_extension
+# define __glibc_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_has_extension(ext) 0
+#endif
+
+#if defined __GNUC__ || defined __clang__
 
 /* All functions, except those with callbacks or those that
    synchronize memory, are leaf functions.  */
 # endif
 
 /* GCC can always grok prototypes.  For C++ programs we add throw()
-   to help it optimize the function calls.  But this works only with
-   gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
+   to help it optimize the function calls.  But this only works with
+   gcc 2.8.x and egcs.  For gcc 3.4 and up we even mark C functions
    as non-throwing using a function attribute since programs can use
    the -fexceptions options for C code as well.  */
-# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus \
+     && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
 #  define __THROW      __attribute__ ((__nothrow__ __LEAF))
 #  define __THROWNL    __attribute__ ((__nothrow__))
 #  define __NTH(fct)   __attribute__ ((__nothrow__ __LEAF)) fct
 #  define __NTHNL(fct)  __attribute__ ((__nothrow__)) fct
 # else
-#  if defined __cplusplus && __GNUC_PREREQ (2,8)
-#   define __THROW     throw ()
-#   define __THROWNL   throw ()
-#   define __NTH(fct)  __LEAF_ATTR fct throw ()
-#   define __NTHNL(fct) fct throw ()
+#  if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
+#   if __cplusplus >= 201103L
+#    define __THROW    noexcept (true)
+#   else
+#    define __THROW    throw ()
+#   endif
+#   define __THROWNL   __THROW
+#   define __NTH(fct)  __LEAF_ATTR fct __THROW
+#   define __NTHNL(fct) fct __THROW
 #  else
 #   define __THROW
 #   define __THROWNL
@@ -70,7 +97,7 @@
 #  endif
 # endif
 
-#else  /* Not GCC.  */
+#else  /* Not GCC or clang.  */
 
 # if (defined __cplusplus                                              \
       || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
 # define __THROWNL
 # define __NTH(fct)    fct
 
-#endif /* GCC.  */
-
-/* Compilers that are not clang may object to
-       #if defined __clang__ && __has_extension(...)
-   even though they do not need to evaluate the right-hand side of the &&.  */
-#if defined __clang__ && defined __has_extension
-# define __glibc_clang_has_extension(ext) __has_extension (ext)
-#else
-# define __glibc_clang_has_extension(ext) 0
-#endif
+#endif /* GCC || clang.  */
 
 /* These two macros are not used in glibc anymore.  They are kept here
    only because some other projects expect the macros to be defined.  */
 #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
 
+/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.  */
+#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0)
+# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
+# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
+#else
+# define __glibc_objsize0(__o) __bos0 (__o)
+# define __glibc_objsize(__o) __bos (__o)
+#endif
+
 #if __GNUC_PREREQ (4,3)
-# define __warndecl(name, msg) \
-  extern void name (void) __attribute__((__warning__ (msg)))
 # define __warnattr(msg) __attribute__((__warning__ (msg)))
 # define __errordecl(name, msg) \
   extern void name (void) __attribute__((__error__ (msg)))
 #else
-# define __warndecl(name, msg) extern void name (void)
 # define __warnattr(msg)
 # define __errordecl(name, msg) extern void name (void)
 #endif
 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
 # define __flexarr     []
 # define __glibc_c99_flexarr_available 1
-#elif __GNUC_PREREQ (2,97)
-/* GCC 2.97 supports C99 flexible array members as an extension,
+#elif __GNUC_PREREQ (2,97) || defined __clang__
+/* GCC 2.97 and clang support C99 flexible array members as an extension,
    even when in C89 mode or compiling C++ (any version).  */
 # define __flexarr     []
 # define __glibc_c99_flexarr_available 1
    Example:
    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
 
-#if defined __GNUC__ && __GNUC__ >= 2
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
 
 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
 # ifdef __cplusplus
 */
 #endif
 
-/* GCC has various useful declarations that can be made with the
-   `__attribute__' syntax.  All of the ways we use this do fine if
-   they are omitted for compilers that don't understand it. */
-#if !defined __GNUC__ || __GNUC__ < 2
+/* GCC and clang have various useful declarations that can be made with
+   the '__attribute__' syntax.  All of the ways we use this do fine if
+   they are omitted for compilers that don't understand it.  */
+#if !(defined __GNUC__ || defined __clang__)
 # define __attribute__(xyz)    /* Ignore */
 #endif
 
 /* At some point during the gcc 2.96 development the `malloc' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
 # define __attribute_malloc__ __attribute__ ((__malloc__))
 #else
 # define __attribute_malloc__ /* Ignore */
 /* At some point during the gcc 2.96 development the `pure' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
 # define __attribute_pure__ __attribute__ ((__pure__))
 #else
 # define __attribute_pure__ /* Ignore */
 #endif
 
 /* This declaration tells the compiler that the value is constant.  */
-#if __GNUC_PREREQ (2,5)
+#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
 # define __attribute_const__ __attribute__ ((__const__))
 #else
 # define __attribute_const__ /* Ignore */
 #endif
 
+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
+# define __attribute_maybe_unused__ __attribute__ ((__unused__))
+/* Once the next version of the C standard comes out, we can
+   do something like the following here:
+   #elif defined __STDC_VERSION__ && 202???L <= __STDC_VERSION__
+   # define __attribute_maybe_unused__ [[__maybe_unused__]]   */
+#else
+# define __attribute_maybe_unused__ /* Ignore */
+#endif
+
 /* At some point during the gcc 3.1 development the `used' attribute
    for functions was introduced.  We don't want to use it unconditionally
    (although this would be possible) since it generates warnings.  */
-#if __GNUC_PREREQ (3,1)
+#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
 # define __attribute_used__ __attribute__ ((__used__))
 # define __attribute_noinline__ __attribute__ ((__noinline__))
 #else
 #endif
 
 /* Since version 3.2, gcc allows marking deprecated functions.  */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
 # define __attribute_deprecated__ __attribute__ ((__deprecated__))
 #else
 # define __attribute_deprecated__ /* Ignore */
 /* Since version 4.5, gcc also allows one to specify the message printed
    when a deprecated function is used.  clang claims to be gcc 4.2, but
    may also support this feature.  */
-#if __GNUC_PREREQ (4,5) || \
-    __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+#if __GNUC_PREREQ (4,5) \
+    || __glibc_has_extension (__attribute_deprecated_with_message__)
 # define __attribute_deprecated_msg__(msg) \
         __attribute__ ((__deprecated__ (msg)))
 #else
    If several `format_arg' attributes are given for the same function, in
    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
    all designated arguments are considered.  */
-#if __GNUC_PREREQ (2,8)
+#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
 # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
 #else
 # define __attribute_format_arg__(x) /* Ignore */
    attribute for functions was introduced.  We don't want to use it
    unconditionally (although this would be possible) since it
    generates warnings.  */
-#if __GNUC_PREREQ (2,97)
+#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
 # define __attribute_format_strfmon__(a,b) \
   __attribute__ ((__format__ (__strfmon__, a, b)))
 #else
 #endif
 
 /* The nonnull function attribute marks pointer parameters that
-   must not be NULL.  Do not define __nonnull if it is already defined,
-   for portability when this file is used in Gnulib.  */
-#ifndef __nonnull
-# if __GNUC_PREREQ (3,3)
-#  define __nonnull(params) __attribute__ ((__nonnull__ params))
+   must not be NULL.  This has the name __nonnull in glibc,
+   and __attribute_nonnull__ in files shared with Gnulib to avoid
+   collision with a different __nonnull in DragonFlyBSD 5.9.  */
+#ifndef __attribute_nonnull__
+# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
+#  define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
 # else
-#  define __nonnull(params)
+#  define __attribute_nonnull__(params)
 # endif
 #endif
+#ifndef __nonnull
+# define __nonnull(params) __attribute_nonnull__ (params)
+#endif
 
 /* If fortification mode, we warn about unused results of certain
    function calls which can lead to problems.  */
-#if __GNUC_PREREQ (3,4)
+#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
 # define __attribute_warn_unused_result__ \
    __attribute__ ((__warn_unused_result__))
 # if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
 #endif
 
 /* Forces a function to be always inlined.  */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
 /* The Linux kernel defines __always_inline in stddef.h (283d7573), and
    it conflicts with this definition.  Therefore undefine it first to
    allow either header to be included first.  */
 
 /* Associate error messages with the source location of the call site rather
    than with the source location inside the function.  */
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
 # define __attribute_artificial__ __attribute__ ((__artificial__))
 #else
 # define __attribute_artificial__ /* Ignore */
    semantics.
 
    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
-   semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
+   semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
    __GNUC_GNU_INLINE__ macro definitions.  */
 #if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
      || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
    run in pedantic mode if the uses are carefully marked using the
    `__extension__' keyword.  But this is not generally available before
    version 2.8.  */
-#if !__GNUC_PREREQ (2,8)
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
 # define __extension__         /* Ignore */
 #endif
 
-/* __restrict is known in EGCS 1.2 and above. */
-#if !__GNUC_PREREQ (2,92)
+/* __restrict is known in EGCS 1.2 and above, and in clang.
+   It works also in C++ mode (outside of arrays), but only when spelled
+   as '__restrict', not 'restrict'.  */
+#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
 #  define __restrict   restrict
 # else
 
 /* ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
      array_name[restrict]
-   GCC 3.1 supports this.  */
-#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+   GCC 3.1 and clang support this.
+   This syntax is not usable in C++ mode.  */
+#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
 # define __restrict_arr        __restrict
 #else
 # ifdef __GNUC__
 # endif
 #endif
 
-#if __GNUC__ >= 3
+#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
 # define __glibc_unlikely(cond)        __builtin_expect ((cond), 0)
 # define __glibc_likely(cond)  __builtin_expect ((cond), 1)
 #else
 # define __glibc_likely(cond)  (cond)
 #endif
 
-#ifdef __has_attribute
-# define __glibc_has_attribute(attr)   __has_attribute (attr)
-#else
-# define __glibc_has_attribute(attr)   0
-#endif
-
 #if (!defined _Noreturn \
      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
-     &&  !__GNUC_PREREQ (4,7))
+     &&  !(__GNUC_PREREQ (4,7) \
+           || (3 < __clang_major__ + (5 <= __clang_minor__))))
 # if __GNUC_PREREQ (2,8)
 #  define _Noreturn __attribute__ ((__noreturn__))
 # else
 # define __attribute_nonstring__
 #endif
 
+/* Undefine (also defined in libc-symbols.h).  */
+#undef __attribute_copy__
+#if __GNUC_PREREQ (9, 0)
+/* Copies attributes from the declaration or type referenced by
+   the argument.  */
+# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
+#else
+# define __attribute_copy__(arg)
+#endif
+
 #if (!defined _Static_assert && !defined __cplusplus \
      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
-     && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+     && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
+         || defined __STRICT_ANSI__))
 # define _Static_assert(expr, diagnostic) \
     extern int (*__Static_assert_function (void)) \
       [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
 #endif
 
-/* The #ifndef lets Gnulib avoid including these on non-glibc
-   platforms, where the includes typically do not exist.  */
-#ifndef __WORDSIZE
+/* Gnulib avoids including these, as they don't work on non-glibc or
+   older glibc platforms.  */
+#ifndef __GNULIB_CDEFS
 # include <bits/wordsize.h>
 # include <bits/long-double.h>
 #endif
 
-#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+# ifdef __REDIRECT
+
+/* Alias name defined automatically.  */
+#  define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
+#  define __LDBL_REDIR_DECL(name) \
+  extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined automatically, with leading underscores.  */
+#  define __LDBL_REDIR2_DECL(name) \
+  extern __typeof (__##name) __##name \
+    __asm (__ASMNAME ("__" #name "ieee128"));
+
+/* Alias name defined manually.  */
+#  define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
+#  define __LDBL_REDIR1_DECL(name, alias) \
+  extern __typeof (name) name __asm (__ASMNAME (#alias));
+
+#  define __LDBL_REDIR1_NTH(name, proto, alias) \
+  __REDIRECT_NTH (name, proto, alias)
+#  define __REDIRECT_NTH_LDBL(name, proto, alias) \
+  __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
+
+/* Unused.  */
+#  define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
+#  define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
+
+# else
+_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
+# endif
+#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
 # define __LDBL_COMPAT 1
 # ifdef __REDIRECT
 #  define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
 #  define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
 #  define __LDBL_REDIR_NTH(name, proto) \
   __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+#  define __LDBL_REDIR2_DECL(name) \
+  extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
 #  define __LDBL_REDIR1_DECL(name, alias) \
   extern __typeof (name) name __asm (__ASMNAME (#alias));
 #  define __LDBL_REDIR_DECL(name) \
   __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
 # endif
 #endif
-#if !defined __LDBL_COMPAT || !defined __REDIRECT
+#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
+    || !defined __REDIRECT
 # define __LDBL_REDIR1(name, proto, alias) name proto
 # define __LDBL_REDIR(name, proto) name proto
 # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
 # define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# define __LDBL_REDIR2_DECL(name)
 # define __LDBL_REDIR_DECL(name)
 # ifdef __REDIRECT
 #  define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
    check is required to enable the use of generic selection.  */
 #if !defined __cplusplus \
     && (__GNUC_PREREQ (4, 9) \
-       || __glibc_clang_has_extension (c_generic_selections) \
+       || __glibc_has_extension (c_generic_selections) \
        || (!defined __GNUC__ && defined __STDC_VERSION__ \
            && __STDC_VERSION__ >= 201112L))
 # define __HAVE_GENERIC_SELECTION 1
 # define __HAVE_GENERIC_SELECTION 0
 #endif
 
+#if __GNUC_PREREQ (10, 0)
+/* Designates a 1-based positional argument ref-index of pointer type
+   that can be used to access size-index elements of the pointed-to
+   array according to access mode, or at least one element when
+   size-index is not provided:
+     access (access-mode, <ref-index> [, <size-index>])  */
+#define __attr_access(x) __attribute__ ((__access__ x))
+#else
+#  define __attr_access(x)
+#endif
+
+/* Specify that a function such as setjmp or vfork may return
+   twice.  */
+#if __GNUC_PREREQ (4, 1)
+# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
+#else
+# define __attribute_returns_twice__ /* Ignore.  */
+#endif
+
 #endif  /* sys/cdefs.h */
index 238ab18..7defa93 100644 (file)
@@ -1,21 +1,21 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 1991, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-   The code is taken from glibc/manual/llio.texi  */
+/* The code is taken from glibc/manual/llio.texi  */
 
 #include <config.h>
 
index 5902805..97a3659 100644 (file)
@@ -1,21 +1,19 @@
 /* cloexec.c - set or clear the close-on-exec descriptor flag
 
-   Copyright (C) 2004, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-*/
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <stdbool.h>
 
index 01c326a..5b9ab6c 100644 (file)
@@ -1,17 +1,17 @@
 /* close replacement.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -28,7 +28,8 @@
 
 #undef close
 
-#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#if defined _WIN32 && !defined __CYGWIN__
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static int
 close_nothrow (int fd)
 {
@@ -36,7 +37,7 @@ close_nothrow (int fd)
 
   TRY_MSVC_INVAL
     {
-      result = close (fd);
+      result = _close (fd);
     }
   CATCH_MSVC_INVAL
     {
@@ -47,6 +48,9 @@ close_nothrow (int fd)
 
   return result;
 }
+# else
+#  define close_nothrow _close
+# endif
 #else
 # define close_nothrow close
 #endif
index 70f5f75..7cee45a 100644 (file)
@@ -1,6 +1,6 @@
 /* Buffer primitives for comparison operations.
 
-   Copyright (C) 1993, 1995, 1998, 2001-2002, 2006, 2009-2013, 2015-2018 Free
+   Copyright (C) 1993, 1995, 1998, 2001-2002, 2006, 2009-2013, 2015-2021 Free
    Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -54,28 +54,28 @@ block_read (int fd, char *buf, size_t nbytes)
       size_t bytes_to_read = MIN (bytes_remaining, readlim);
       ssize_t nread = read (fd, bp, bytes_to_read);
       if (nread <= 0)
-       {
-         if (nread == 0)
-           break;
-
-         /* Accommodate Tru64 5.1, which can't read more than INT_MAX
-            bytes at a time.  They call that a 64-bit OS?  */
-         if (errno == EINVAL && INT_MAX < bytes_to_read)
-           {
-             readlim = INT_MAX;
-             continue;
-           }
-
-         /* This is needed for programs that have signal handlers on
-            older hosts without SA_RESTART.  It also accommodates
-            ancient AIX hosts that set errno to EINTR after uncaught
-            SIGCONT.  See <news:1r77ojINN85n@ftp.UU.NET>
-            (1993-04-22).  */
-         if (! SA_RESTART && errno == EINTR)
-           continue;
-
-         return SIZE_MAX;
-       }
+        {
+          if (nread == 0)
+            break;
+
+          /* Accommodate Tru64 5.1, which can't read more than INT_MAX
+             bytes at a time.  They call that a 64-bit OS?  */
+          if (errno == EINVAL && INT_MAX < bytes_to_read)
+            {
+              readlim = INT_MAX;
+              continue;
+            }
+
+          /* This is needed for programs that have signal handlers on
+             older hosts without SA_RESTART.  It also accommodates
+             ancient AIX hosts that set errno to EINTR after uncaught
+             SIGCONT.  See <news:1r77ojINN85n@ftp.UU.NET>
+             (1993-04-22).  */
+          if (! SA_RESTART && errno == EINTR)
+            continue;
+
+          return SIZE_MAX;
+        }
       bp += nread;
     }
   while (bp < buflim);
index 90cc14c..79b9f06 100644 (file)
@@ -1,6 +1,6 @@
 /* Buffer primitives for comparison operations.
 
-   Copyright (C) 2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 9a5be99..1a6ccb7 100644 (file)
@@ -1,5 +1,113 @@
 /* lib/config.hin.  Generated from configure.ac by autoheader.  */
 
+/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+
+
 /* Define if building universal (internal helper macro) */
 #undef AC_APPLE_UNIVERSAL_BUILD
 
 /* Define to the number of bits in type 'wint_t'. */
 #undef BITSIZEOF_WINT_T
 
-/* Define to 1 if the `closedir' function returns void instead of `int'. */
+/* Define to 1 if the `closedir' function returns void instead of int. */
 #undef CLOSEDIR_VOID
 
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#undef CRAY_STACKSEG_END
-
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
 #undef C_ALLOCA
 
-/* Define to 1 if the C locale may have encoding errors. */
-#undef C_LOCALE_MAYBE_EILSEQ
-
 /* Define as the bit index in the word where to find bit 0 of the exponent of
    'double'. */
 #undef DBL_EXPBIT0_BIT
    language is requested. */
 #undef ENABLE_NLS
 
-/* Define to 1 if an invalid memory address access may yield a SIGBUS. */
-#undef FAULT_YIELDS_SIGBUS
-
 /* Define this to 1 if F_DUPFD behavior does not match POSIX */
 #undef FCNTL_DUPFD_BUGGY
 
 /* Define to nothing if C supports flexible array members, and to 1 if it does
-   not. That way, with a declaration like 'struct s { int n; double
+   not. That way, with a declaration like 'struct s { int n; short
    d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
-   compilers. When computing the size of such an object, don't use 'sizeof
-   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
-   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
-   MSVC and with C++ compilers. */
+   compilers. Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate
+   the size in bytes of such a struct containing an N-element array. */
 #undef FLEXIBLE_ARRAY_MEMBER
 
+/* Define to 1 if fopen() fails to recognize a trailing slash. */
+#undef FOPEN_TRAILING_SLASH_BUG
+
 /* Define to 1 if mkdir mistakenly creates a directory given with a trailing
    dot component. */
 #undef FUNC_MKDIR_DOT_BUG
 /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
 #undef FUNC_NL_LANGINFO_YESEXPR_WORKS
 
-/* Define if gettimeofday clobbers the localtime buffer. */
-#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
-
 /* Define this to 'void' or 'struct timezone' to match the system's
    declaration of the second argument to gettimeofday. */
 #undef GETTIMEOFDAY_TIMEZONE
 #undef GNULIB_FNMATCH_GNU
 
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
-   whether the gnulib module freopen-safer shall be considered present. */
-#undef GNULIB_FREOPEN_SAFER
+   whether the gnulib module fopen-gnu shall be considered present. */
+#undef GNULIB_FOPEN_GNU
 
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module fscanf shall be considered present. */
 #undef GNULIB_FSCANF
 
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module isblank shall be considered present. */
+#undef GNULIB_ISBLANK
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module lock shall be considered present. */
+#undef GNULIB_LOCK
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module msvc-nothrow shall be considered present. */
 #undef GNULIB_MSVC_NOTHROW
 
+/* Define to 1 to disable use of VLAs */
+#undef GNULIB_NO_VLA
+
 /* enable some gnulib portability checks */
 #undef GNULIB_PORTCHECK
 
 #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
 
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module reallocarray shall be considered present. */
+#undef GNULIB_REALLOCARRAY
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module scanf shall be considered present. */
 #undef GNULIB_SCANF
 
    whether the gnulib module snprintf shall be considered present. */
 #undef GNULIB_SNPRINTF
 
+/* Define to 1 if you want the FILE stream functions getc, putc, etc. to use
+   unlocked I/O if available, throughout the package. Unlocked I/O can improve
+   performance, sometimes dramatically. But unlocked I/O is safe only in
+   single-threaded programs, as well as in multithreaded programs for which
+   you can guarantee that every FILE stream, including stdin, stdout, stderr,
+   is used only in a single thread. */
+#undef GNULIB_STDIO_SINGLE_THREAD
+
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module strerror shall be considered present. */
 #undef GNULIB_STRERROR
    whether the gnulib module strerror_r-posix shall be considered present. */
 #undef GNULIB_STRERROR_R_POSIX
 
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module tempname shall be considered present. */
+#undef GNULIB_TEMPNAME
+
 /* Define to 1 when the gnulib module accept should be tested. */
 #undef GNULIB_TEST_ACCEPT
 
+/* Define to 1 when the gnulib module atoll should be tested. */
+#undef GNULIB_TEST_ATOLL
+
 /* Define to 1 when the gnulib module bind should be tested. */
 #undef GNULIB_TEST_BIND
 
 /* Define to 1 when the gnulib module btowc should be tested. */
 #undef GNULIB_TEST_BTOWC
 
+/* Define to 1 when the gnulib module calloc-posix should be tested. */
+#undef GNULIB_TEST_CALLOC_POSIX
+
 /* Define to 1 when the gnulib module cloexec should be tested. */
 #undef GNULIB_TEST_CLOEXEC
 
 /* Define to 1 when the gnulib module fdopen should be tested. */
 #undef GNULIB_TEST_FDOPEN
 
+/* Define to 1 when the gnulib module fgetc should be tested. */
+#undef GNULIB_TEST_FGETC
+
+/* Define to 1 when the gnulib module fgets should be tested. */
+#undef GNULIB_TEST_FGETS
+
 /* Define to 1 when the gnulib module fnmatch should be tested. */
 #undef GNULIB_TEST_FNMATCH
 
+/* Define to 1 when the gnulib module fopen should be tested. */
+#undef GNULIB_TEST_FOPEN
+
+/* Define to 1 when the gnulib module fprintf should be tested. */
+#undef GNULIB_TEST_FPRINTF
+
+/* Define to 1 when the gnulib module fputc should be tested. */
+#undef GNULIB_TEST_FPUTC
+
+/* Define to 1 when the gnulib module fputs should be tested. */
+#undef GNULIB_TEST_FPUTS
+
+/* Define to 1 when the gnulib module fread should be tested. */
+#undef GNULIB_TEST_FREAD
+
+/* Define to 1 when the gnulib module free-posix should be tested. */
+#undef GNULIB_TEST_FREE_POSIX
+
 /* Define to 1 when the gnulib module freopen should be tested. */
 #undef GNULIB_TEST_FREOPEN
 
+/* Define to 1 when the gnulib module fscanf should be tested. */
+#undef GNULIB_TEST_FSCANF
+
 /* Define to 1 when the gnulib module fstat should be tested. */
 #undef GNULIB_TEST_FSTAT
 
 /* Define to 1 when the gnulib module ftruncate should be tested. */
 #undef GNULIB_TEST_FTRUNCATE
 
+/* Define to 1 when the gnulib module fwrite should be tested. */
+#undef GNULIB_TEST_FWRITE
+
+/* Define to 1 when the gnulib module getc should be tested. */
+#undef GNULIB_TEST_GETC
+
+/* Define to 1 when the gnulib module getchar should be tested. */
+#undef GNULIB_TEST_GETCHAR
+
 /* Define to 1 when the gnulib module getcwd should be tested. */
 #undef GNULIB_TEST_GETCWD
 
 /* Define to 1 when the gnulib module getdtablesize should be tested. */
 #undef GNULIB_TEST_GETDTABLESIZE
 
+/* Define to 1 when the gnulib module getopt-posix should be tested. */
+#undef GNULIB_TEST_GETOPT_POSIX
+
 /* Define to 1 when the gnulib module getpagesize should be tested. */
 #undef GNULIB_TEST_GETPAGESIZE
 
+/* Define to 1 when the gnulib module getrandom should be tested. */
+#undef GNULIB_TEST_GETRANDOM
+
 /* Define to 1 when the gnulib module gettimeofday should be tested. */
 #undef GNULIB_TEST_GETTIMEOFDAY
 
 /* Define to 1 when the gnulib module iswblank should be tested. */
 #undef GNULIB_TEST_ISWBLANK
 
+/* Define to 1 when the gnulib module iswdigit should be tested. */
+#undef GNULIB_TEST_ISWDIGIT
+
+/* Define to 1 when the gnulib module iswxdigit should be tested. */
+#undef GNULIB_TEST_ISWXDIGIT
+
 /* Define to 1 when the gnulib module listen should be tested. */
 #undef GNULIB_TEST_LISTEN
 
 /* Define to 1 when the gnulib module memchr should be tested. */
 #undef GNULIB_TEST_MEMCHR
 
+/* Define to 1 when the gnulib module mempcpy should be tested. */
+#undef GNULIB_TEST_MEMPCPY
+
+/* Define to 1 when the gnulib module mkdir should be tested. */
+#undef GNULIB_TEST_MKDIR
+
 /* Define to 1 when the gnulib module mkstemp should be tested. */
 #undef GNULIB_TEST_MKSTEMP
 
 /* Define to 1 when the gnulib module pipe should be tested. */
 #undef GNULIB_TEST_PIPE
 
+/* Define to 1 when the gnulib module printf should be tested. */
+#undef GNULIB_TEST_PRINTF
+
+/* Define to 1 when the gnulib module pthread_sigmask should be tested. */
+#undef GNULIB_TEST_PTHREAD_SIGMASK
+
+/* Define to 1 when the gnulib module pthread-thread should be tested. */
+#undef GNULIB_TEST_PTHREAD_THREAD
+
+/* Define to 1 when the gnulib module putc should be tested. */
+#undef GNULIB_TEST_PUTC
+
+/* Define to 1 when the gnulib module putchar should be tested. */
+#undef GNULIB_TEST_PUTCHAR
+
 /* Define to 1 when the gnulib module putenv should be tested. */
 #undef GNULIB_TEST_PUTENV
 
+/* Define to 1 when the gnulib module puts should be tested. */
+#undef GNULIB_TEST_PUTS
+
 /* Define to 1 when the gnulib module raise should be tested. */
 #undef GNULIB_TEST_RAISE
 
 /* Define to 1 when the gnulib module readlink should be tested. */
 #undef GNULIB_TEST_READLINK
 
+/* Define to 1 when the gnulib module reallocarray should be tested. */
+#undef GNULIB_TEST_REALLOCARRAY
+
+/* Define to 1 when the gnulib module realloc-posix should be tested. */
+#undef GNULIB_TEST_REALLOC_POSIX
+
+/* Define to 1 when the gnulib module scanf should be tested. */
+#undef GNULIB_TEST_SCANF
+
 /* Define to 1 when the gnulib module select should be tested. */
 #undef GNULIB_TEST_SELECT
 
 /* Define to 1 when the gnulib module setenv should be tested. */
 #undef GNULIB_TEST_SETENV
 
-/* Define to 1 when the gnulib module setlocale should be tested. */
-#undef GNULIB_TEST_SETLOCALE
+/* Define to 1 when the gnulib module setlocale_null should be tested. */
+#undef GNULIB_TEST_SETLOCALE_NULL
 
 /* Define to 1 when the gnulib module setsockopt should be tested. */
 #undef GNULIB_TEST_SETSOCKOPT
 /* Define to 1 when the gnulib module strerror_r should be tested. */
 #undef GNULIB_TEST_STRERROR_R
 
-/* Define to 1 when the gnulib module strndup should be tested. */
-#undef GNULIB_TEST_STRNDUP
-
 /* Define to 1 when the gnulib module strnlen should be tested. */
 #undef GNULIB_TEST_STRNLEN
 
 /* Define to 1 when the gnulib module strptime should be tested. */
 #undef GNULIB_TEST_STRPTIME
 
-/* Define to 1 when the gnulib module strtoull should be tested. */
-#undef GNULIB_TEST_STRTOULL
+/* Define to 1 when the gnulib module strtoll should be tested. */
+#undef GNULIB_TEST_STRTOLL
 
 /* Define to 1 when the gnulib module symlink should be tested. */
 #undef GNULIB_TEST_SYMLINK
 /* Define to 1 when the gnulib module vasprintf should be tested. */
 #undef GNULIB_TEST_VASPRINTF
 
+/* Define to 1 when the gnulib module vfprintf should be tested. */
+#undef GNULIB_TEST_VFPRINTF
+
+/* Define to 1 when the gnulib module vprintf should be tested. */
+#undef GNULIB_TEST_VPRINTF
+
 /* Define to 1 when the gnulib module wcrtomb should be tested. */
 #undef GNULIB_TEST_WCRTOMB
 
 /* Define to 1 when the gnulib module wcwidth should be tested. */
 #undef GNULIB_TEST_WCWIDTH
 
+/* Define to 1 when the gnulib module wmemchr should be tested. */
+#undef GNULIB_TEST_WMEMCHR
+
+/* Define to 1 when the gnulib module wmempcpy should be tested. */
+#undef GNULIB_TEST_WMEMPCPY
+
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module unistr/u8-mbtoucr shall be considered present. */
 #undef GNULIB_UNISTR_U8_MBTOUCR
    whether the gnulib module unistr/u8-uctomb shall be considered present. */
 #undef GNULIB_UNISTR_U8_UCTOMB
 
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module xalloc shall be considered present. */
+#undef GNULIB_XALLOC
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module xalloc-die shall be considered present. */
+#undef GNULIB_XALLOC_DIE
+
 /* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
    may be supplied by this distribution. */
 #undef HAVE_ALLOCA
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
+/* Define to 1 if you have the `atoll' function. */
+#undef HAVE_ATOLL
+
+/* Define to 1 if you have the <bcrypt.h> header file. */
+#undef HAVE_BCRYPT_H
+
 /* Define to 1 if you have the <bp-sym.h> header file. */
 #undef HAVE_BP_SYM_H
 
    the CoreFoundation framework. */
 #undef HAVE_CFPREFERENCESCOPYAPPVALUE
 
-/* Define to 1 if you have the `chsize' function. */
-#undef HAVE_CHSIZE
-
 /* Define to 1 if you have the `clock_gettime' function. */
 #undef HAVE_CLOCK_GETTIME
 
 /* Define to 1 if you have the <crtdefs.h> header file. */
 #undef HAVE_CRTDEFS_H
 
-/* Define to 1 if C supports variable-length arrays. */
-#undef HAVE_C_VARARRAYS
-
 /* Define if the GNU dcgettext() function is already present or preinstalled.
    */
 #undef HAVE_DCGETTEXT
    you don't. */
 #undef HAVE_DECL_CLEARERR_UNLOCKED
 
+/* Define to 1 if you have the declaration of `ecvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_ECVT
+
+/* Define to 1 if you have the declaration of `execvpe', and to 0 if you
+   don't. */
+#undef HAVE_DECL_EXECVPE
+
+/* Define to 1 if you have the declaration of `fcloseall', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FCLOSEALL
+
+/* Define to 1 if you have the declaration of `fcvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FCVT
+
 /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
    don't. */
 #undef HAVE_DECL_FEOF_UNLOCKED
    you don't. */
 #undef HAVE_DECL_FWRITE_UNLOCKED
 
+/* Define to 1 if you have the declaration of `gcvt', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GCVT
+
 /* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
    you don't. */
 #undef HAVE_DECL_GETCHAR_UNLOCKED
    */
 #undef HAVE_DECL_SETENV
 
-/* Define to 1 if you have the declaration of `sigaltstack', and to 0 if you
-   don't. */
-#undef HAVE_DECL_SIGALTSTACK
-
 /* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
    */
 #undef HAVE_DECL_SLEEP
    don't. */
 #undef HAVE_DECL_STRNCASECMP
 
-/* Define to 1 if you have the declaration of `strndup', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRNDUP
-
 /* Define to 1 if you have the declaration of `strnlen', and to 0 if you
    don't. */
 #undef HAVE_DECL_STRNLEN
 
-/* Define to 1 if you have the declaration of `strtoull', and to 0 if you
+/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you
    don't. */
-#undef HAVE_DECL_STRTOULL
+#undef HAVE_DECL_STRTOIMAX
 
-/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
+/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
    don't. */
-#undef HAVE_DECL_STRTOUMAX
+#undef HAVE_DECL_STRTOLL
 
 /* Define to 1 if you have the declaration of `towlower', and to 0 if you
    don't. */
    don't. */
 #undef HAVE_DECL_WCRTOMB
 
+/* Define to 1 if you have the declaration of `wcsdup', and to 0 if you don't.
+   */
+#undef HAVE_DECL_WCSDUP
+
 /* Define to 1 if you have the declaration of `wctob', and to 0 if you don't.
    */
 #undef HAVE_DECL_WCTOB
    */
 #undef HAVE_DIRENT_H
 
-/* Define to 1 if you have the 'dup2' function. */
-#undef HAVE_DUP2
+/* 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 `fork' function. */
 #undef HAVE_FORK
 
+/* Define if the 'free' function is guaranteed to preserve errno. */
+#undef HAVE_FREE_POSIX
+
 /* Define to 1 if you have the `ftruncate' function. */
 #undef HAVE_FTRUNCATE
 
 /* Define to 1 if you have the `getprogname' function. */
 #undef HAVE_GETPROGNAME
 
+/* Define to 1 if you have the `getrandom' function. */
+#undef HAVE_GETRANDOM
+
+/* Define to 1 if you have the `getrlimit' function. */
+#undef HAVE_GETRLIMIT
+
 /* Define if the GNU gettext() function is already present or preinstalled. */
 #undef HAVE_GETTEXT
 
 /* Define if you have the libsigsegv library. */
 #undef HAVE_LIBSIGSEGV
 
+/* Define to 1 if the bcrypt library is guaranteed to be present. */
+#undef HAVE_LIB_BCRYPT
+
 /* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 
 /* Define to 1 if you have the <malloc.h> header file. */
 #undef HAVE_MALLOC_H
 
-/* Define if the 'malloc' function is POSIX compliant. */
+/* Define if malloc, realloc, and calloc set errno on allocation failure. */
 #undef HAVE_MALLOC_POSIX
 
 /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
 /* Define to 1 if <wchar.h> declares mbstate_t. */
 #undef HAVE_MBSTATE_T
 
+/* Define to 1 if you have the `mbtowc' function. */
+#undef HAVE_MBTOWC
+
 /* Define to 1 if you have the `mempcpy' function. */
 #undef HAVE_MEMPCPY
 
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
 /* Define to 1 if <limits.h> defines the MIN and MAX macros. */
 #undef HAVE_MINMAX_IN_LIMITS_H
 
 /* Define to 1 if you have the `pipe' function. */
 #undef HAVE_PIPE
 
+/* 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. */
+#undef HAVE_PTHREAD_ATFORK
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
+#undef HAVE_PTHREAD_MUTEX_RECURSIVE
+
+/* Define if the POSIX multithreading library has read/write locks. */
+#undef HAVE_PTHREAD_RWLOCK
+
+/* Define if the 'pthread_rwlock_rdlock' function prefers a writer to a
+   reader. */
+#undef HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+
+/* Define to 1 if the pthread_sigmask function can be used (despite bugs). */
+#undef HAVE_PTHREAD_SIGMASK
+
+/* Define to 1 if the system has the type `pthread_spinlock_t'. */
+#undef HAVE_PTHREAD_SPINLOCK_T
+
+/* Define to 1 if the system has the type `pthread_t'. */
+#undef HAVE_PTHREAD_T
+
 /* Define to 1 if you have the `raise' function. */
 #undef HAVE_RAISE
 
 /* Define to 1 if you have the `readlinkat' function. */
 #undef HAVE_READLINKAT
 
-/* Define to 1 if you have run the test for working tzset. */
-#undef HAVE_RUN_TZSET_TEST
+/* Define to 1 if you have the `reallocarray' function. */
+#undef HAVE_REALLOCARRAY
 
 /* Define to 1 if the system has the type `sa_family_t'. */
 #undef HAVE_SA_FAMILY_T
 
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the <sdkddkver.h> header file. */
+#undef HAVE_SDKDDKVER_H
+
 /* Define to 1 if you have the <search.h> header file. */
 #undef HAVE_SEARCH_H
 
    buffer had been large enough. */
 #undef HAVE_SNPRINTF_RETVAL_C99
 
-/* Define to 1 if extending the stack slightly past the limit causes a SIGSEGV
-   which can be handled on an alternate stack established with sigaltstack. */
-#undef HAVE_STACK_OVERFLOW_HANDLING
-
-/* Define to 1 if the system has the type `stack_t'. */
-#undef HAVE_STACK_T
+/* Define if the string produced by the snprintf function is always NUL
+   terminated. */
+#undef HAVE_SNPRINTF_TRUNCATION_C99
 
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
    uintmax_t. */
 #undef HAVE_STDINT_H_WITH_UINTMAX
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
-/* Always define to 1, for backward compatibility. You can assume <string.h>
-   exists. */
+/* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
 /* Define to 1 if you have the `strncasecmp' function. */
 #undef HAVE_STRNCASECMP
 
-/* Define to 1 if you have the `strndup' function. */
-#undef HAVE_STRNDUP
-
 /* Define to 1 if you have the `strnlen' function. */
 #undef HAVE_STRNLEN
 
 /* Define to 1 if you have the `strptime' function. */
 #undef HAVE_STRPTIME
 
-/* Define to 1 if you have the `strtoull' function. */
-#undef HAVE_STRTOULL
+/* Define to 1 if you have the `strtoimax' function. */
+#undef HAVE_STRTOIMAX
 
-/* Define to 1 if you have the `strtoumax' function. */
-#undef HAVE_STRTOUMAX
+/* Define to 1 if you have the `strtoll' function. */
+#undef HAVE_STRTOLL
 
 /* Define to 1 if `decimal_point' is a member of `struct lconv'. */
 #undef HAVE_STRUCT_LCONV_DECIMAL_POINT
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/random.h> header file. */
+#undef HAVE_SYS_RANDOM_H
+
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #undef HAVE_SYS_WAIT_H
 
+/* 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. */
+#undef HAVE_THREADS_H
+
 /* Define to 1 if you have the `timegm' function. */
 #undef HAVE_TIMEGM
 
    `tzname'. */
 #undef HAVE_TZNAME
 
-/* Define to 1 if you have the `tzset' function. */
-#undef HAVE_TZSET
-
-/* Define to 1 if you have the <ucontext.h> header file. */
-#undef HAVE_UCONTEXT_H
-
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
 /* Define to 1 if you have the <vfork.h> header file. */
 #undef HAVE_VFORK_H
 
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+   declarations. */
+#undef HAVE_VISIBILITY
+
 /* Define to 1 if you have the <wchar.h> header file. */
 #undef HAVE_WCHAR_H
 
 /* Define to 1 if you have the `wcwidth' function. */
 #undef HAVE_WCWIDTH
 
+/* Define to 1 if the compiler and linker support weak declarations of
+   symbols. */
+#undef HAVE_WEAK_SYMBOLS
+
 /* Define to 1 if you have the <winsock2.h> header file. */
 #undef HAVE_WINSOCK2_H
 
 /* Define if you have the 'wint_t' type. */
 #undef HAVE_WINT_T
 
-/* Define to 1 if you have the `wmemchr' function. */
-#undef HAVE_WMEMCHR
-
-/* Define to 1 if you have the `wmemcpy' function. */
-#undef HAVE_WMEMCPY
-
 /* Define to 1 if you have the `wmempcpy' function. */
 #undef HAVE_WMEMPCPY
 
 /* Define to 1 if O_NOFOLLOW works. */
 #undef HAVE_WORKING_O_NOFOLLOW
 
+/* Define if you have the sigaltstack() function and it works. */
+#undef HAVE_WORKING_SIGALTSTACK
+
 /* Define to 1 if `vfork' works. */
 #undef HAVE_WORKING_VFORK
 
 /* Define to 1 if you have the <xlocale.h> header file. */
 #undef HAVE_XLOCALE_H
 
-/* Define to 1 if extending the stack slightly past the limit causes a
-   SIGSEGV, and an alternate stack can be established with sigaltstack, and
-   the signal handler is passed a context that specifies the run time stack.
-   This behavior is defined by POSIX 1003.1-2001 with the X/Open System
-   Interface (XSI) option and is a standardized way to implement a SEGV-based
-   stack overflow detection heuristic. */
-#undef HAVE_XSI_STACK_OVERFLOW_HEURISTIC
-
 /* 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
+
 /* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
 #undef HAVE__SET_INVALID_PARAMETER_HANDLER
 
    */
 #undef MBRTOWC_EMPTY_INPUT_BUG
 
+/* Define if the mbrtowc function may signal encoding errors in the C locale.
+   */
+#undef MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ
+
 /* Define if the mbrtowc function has the NULL pwc argument bug. */
 #undef MBRTOWC_NULL_ARG1_BUG
 
 /* Define if the mbrtowc function returns a wrong return value. */
 #undef MBRTOWC_RETVAL_BUG
 
+/* Define if the mbrtowc function stores a wide character when reporting
+   incomplete input. */
+#undef MBRTOWC_STORES_INCOMPLETE_BUG
+
 /* Use GNU style printf and scanf.  */
 #ifndef __USE_MINGW_ANSI_STDIO
 # undef __USE_MINGW_ANSI_STDIO
 #endif
 
 
+/* Define to 1 on musl libc. */
+#undef MUSL_LIBC
+
 /* Define if the compilation of mktime.c should define 'mktime_internal'. */
 #undef NEED_MKTIME_INTERNAL
 
    algorithmic workarounds. */
 #undef NEED_MKTIME_WORKING
 
+/* Define to 1 if nl_langinfo is multithread-safe. */
+#undef NL_LANGINFO_MTSAFE
+
 /* Define to 1 if open() fails to recognize a trailing slash. */
 #undef OPEN_TRAILING_SLASH_BUG
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-#undef PRI_MACROS_BROKEN
-
 /* Define to the type that is the result of default argument promotions of
    type mode_t. */
 #undef PROMOTED_MODE_T
 /* Name of "pr" program. */
 #undef PR_PROGRAM
 
+/* Define if pthread_create is an inline function. */
+#undef PTHREAD_CREATE_IS_INLINE
+
+/* Define if the pthread_in_use() detection is hard. */
+#undef PTHREAD_IN_USE_DETECTION_HARD
+
+/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno.
+   */
+#undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO
+
+/* Define to 1 if pthread_sigmask may return 0 and have no effect. */
+#undef PTHREAD_SIGMASK_INEFFECTIVE
+
+/* Define to 1 if pthread_sigmask() unblocks signals incorrectly. */
+#undef PTHREAD_SIGMASK_UNBLOCK_BUG
+
 /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
    'ptrdiff_t'. */
 #undef PTRDIFF_T_SUFFIX
 /* Define to 1 if readlink fails to recognize a trailing slash. */
 #undef READLINK_TRAILING_SLASH_BUG
 
+/* Define to 1 if readlink sets errno instead of truncating a too-long link.
+   */
+#undef READLINK_TRUNCATE_BUG
+
 /* Define to 1 if stat needs help when passed a file name with a trailing
    slash */
 #undef REPLACE_FUNC_STAT_FILE
 /* Define if vasnprintf exists but is overridden by gnulib. */
 #undef REPLACE_VASNPRINTF
 
+/* Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe. */
+#undef SETLOCALE_NULL_ALL_MTSAFE
+
+/* Define to 1 if setlocale (category, NULL) is multithread-safe. */
+#undef SETLOCALE_NULL_ONE_MTSAFE
+
 /* Define if sigaltstack() interprets the stack_t.ss_sp field incorrectly, as
    the highest address of the alternate stack range rather than as the lowest
    address. */
    'size_t'. */
 #undef SIZE_T_SUFFIX
 
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at runtime.
-       STACK_DIRECTION > 0 => grows toward higher addresses
-       STACK_DIRECTION < 0 => grows toward lower addresses
-       STACK_DIRECTION = 0 => direction of growth unknown */
+/* Define on Solaris 11 and its derivates. */
+#undef SOLARIS11
+
+/* Define as the direction of stack growth for your system. STACK_DIRECTION >
+   0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward
+   lower addresses STACK_DIRECTION = 0 => spaghetti stack. */
 #undef STACK_DIRECTION
 
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
 #undef STAT_MACROS_BROKEN
 
-/* Always define to 1, for backward compatibility. You can assume the C90
-   standard headers exist. */
+/* Define to 1 if all of the C90 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
 
 /* Define to 1 if strerror_r returns char *. */
    timespec. */
 #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
 
-/* Define if tzset clobbers localtime's static buffer. */
-#undef TZSET_CLOBBERS_LOCALTIME
+/* Define if the combination of the ISO C and POSIX multithreading APIs can be
+   used. */
+#undef USE_ISOC_AND_POSIX_THREADS
+
+/* Define if the ISO C multithreading library can be used. */
+#undef USE_ISOC_THREADS
+
+/* Define if the POSIX multithreading library can be used. */
+#undef USE_POSIX_THREADS
+
+/* Define if references to the POSIX multithreading library are satisfied by
+   libc. */
+#undef USE_POSIX_THREADS_FROM_LIBC
+
+/* Define if references to the POSIX multithreading library should be made
+   weak. */
+#undef USE_POSIX_THREADS_WEAK
 
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable NetBSD extensions on NetBSD.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
 #ifndef _NETBSD_SOURCE
 # undef _NETBSD_SOURCE
 #endif
-/* Enable OpenBSD extensions on NetBSD.  */
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
 #ifndef _OPENBSD_SOURCE
 # undef _OPENBSD_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
-   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
 #ifndef _XOPEN_SOURCE
 # undef _XOPEN_SOURCE
 #endif
-/* Enable X/Open compliant socket functions that do not require linking
-   with -lxnet on HP-UX 11.11.  */
-#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-# undef _HPUX_ALT_XOPEN_SOCKET_API
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
 
 
-/* Define to 1 if you want getc etc. to use unlocked I/O if available.
-   Unlocked I/O can improve performance in unithreaded apps, but it is not
-   safe for multithreaded apps. */
+/* An alias of GNULIB_STDIO_SINGLE_THREAD. */
 #undef USE_UNLOCKED_IO
 
+/* Define if the native Windows multithreading API can be used. */
+#undef USE_WINDOWS_THREADS
+
 /* Version number of package */
 #undef VERSION
 
    'wchar_t'. */
 #undef WCHAR_T_SUFFIX
 
+/* Define if the wcrtomb function does not work in the C locale. */
+#undef WCRTOMB_C_LOCALE_BUG
+
+/* Define if the wcrtomb function has an incorrect return value. */
+#undef WCRTOMB_RETVAL_BUG
+
 /* Define if WSAStartup is needed. */
 #undef WINDOWS_SOCKETS
 
 # endif
 #endif
 
-/* Enable large inode numbers on Mac OS X 10.5. */
-#undef _DARWIN_USE_64_BIT_INODE
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
 /* enable compile-time and run-time bounds-checking, and some warnings */
 #undef _FORTIFY_SOURCE
 
+/* True if the compiler says it groks GNU C version MAJOR.MINOR.  */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define _GL_GNUC_PREREQ(major, minor) \
+    ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#else
+# define _GL_GNUC_PREREQ(major, minor) 0
+#endif
+
+
+/* Define to enable the declarations of ISO C 11 types and functions. */
+#undef _ISOC11_SOURCE
+
 /* Define for large files, on AIX-style hosts. */
 #undef _LARGE_FILES
 
 /* Define to 1 on Solaris. */
 #undef _LCONV_C99
 
-/* Define to 1 if on MINIX. */
-#undef _MINIX
-
-/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */
-#undef _NETBSD_SOURCE
-
 /* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (defined __cplusplus \
+      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
+      && 0)
+    /* [[noreturn]] is not practically usable, because with it the syntax
+         extern _Noreturn void func (...);
+       would not be valid; such a declaration would only be valid with 'extern'
+       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
+       AIX system header files and several gnulib header files use precisely
+       this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
-# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
-        || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+# elif ((!defined __cplusplus || defined __clang__) \
+        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+            || (!defined __STRICT_ANSI__ \
+                && (_GL_GNUC_PREREQ (4, 7) \
+                    || (defined __apple_build_version__ \
+                        ? 6000000 <= __apple_build_version__ \
+                        : 3 < __clang_major__ + (5 <= __clang_minor__))))))
    /* _Noreturn works as-is.  */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
 #endif
 
 
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-#undef _POSIX_1_SOURCE
-
 /* Define to 1 in order to get the POSIX compatible declarations of socket
    functions. */
 #undef _POSIX_PII_SOCKET
 
-/* Define to 1 if you need to in order for 'stat' and other things to work. */
-#undef _POSIX_SOURCE
-
 /* Define if you want <regex.h> to include <limits.h>, so that it consistently
    overrides <limits.h>'s RE_DUP_MAX. */
 #undef _REGEX_INCLUDE_LIMITS_H
 /* 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. */
+#undef _TIME_BITS
+
 /* For standard stat data types on VMS. */
 #undef _USE_STD_STAT
 
    used. */
 #undef __GETOPT_PREFIX
 
+/* For 64-bit time_t on 32-bit mingw. */
+#undef __MINGW_USE_VC2005_COMPAT
+
 /* Define to 1 if the system <stdint.h> predates C++11. */
 #undef __STDC_CONSTANT_MACROS
 
 /* Define to 1 if the system <stdint.h> predates C++11. */
 #undef __STDC_LIMIT_MACROS
 
-/* Define to 1 if C does not support variable-length arrays, and if the
-   compiler does not already define this. */
-#undef __STDC_NO_VLA__
+/* The _GL_ASYNC_SAFE marker should be attached to functions that are
+   signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
+   invoked from such signal handlers.  Such functions have some restrictions:
+     * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
+       or should be listed as async-signal-safe in POSIX
+       <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
+       section 2.4.3.  Note that malloc(), sprintf(), and fwrite(), in
+       particular, are NOT async-signal-safe.
+     * All memory locations (variables and struct fields) that these functions
+       access must be marked 'volatile'.  This holds for both read and write
+       accesses.  Otherwise the compiler might optimize away stores to and
+       reads from such locations that occur in the program, depending on its
+       data flow analysis.  For example, when the program contains a loop
+       that is intended to inspect a variable set from within a signal handler
+           while (!signal_occurred)
+             ;
+       the compiler is allowed to transform this into an endless loop if the
+       variable 'signal_occurred' is not declared 'volatile'.
+   Additionally, recall that:
+     * A signal handler should not modify errno (except if it is a handler
+       for a fatal signal and ends by raising the same signal again, thus
+       provoking the termination of the process).  If it invokes a function
+       that may clobber errno, it needs to save and restore the value of
+       errno.  */
+#define _GL_ASYNC_SAFE
+
+
+/* Attributes.  */
+#if (defined __has_attribute \
+     && (!defined __clang_minor__ \
+         || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
+#else
+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
+# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
+# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
+# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
+# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
+# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
+# ifdef _ICC
+#  define _GL_ATTR_may_alias 0
+# else
+#  define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# endif
+# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
+# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
+# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
+# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
+# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
+# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
+#endif
+
+#ifdef __has_c_attribute
+# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
+#else
+# define _GL_HAS_C_ATTRIBUTE(attr) 0
+#endif
+
+
+#if _GL_HAS_ATTRIBUTE (alloc_size)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+#else
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (always_inline)
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+#else
+# define _GL_ATTRIBUTE_ALWAYS_INLINE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (artificial)
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+#else
+# define _GL_ATTRIBUTE_ARTIFICIAL
+#endif
+
+/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
+   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
+   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__))
+# else
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
+#else
+# define _GL_ATTRIBUTE_COLD
+#endif
+
+#if _GL_HAS_ATTRIBUTE (const)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST
+#endif
+
+/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers
+   that can be freed by passing them as the Ith argument to the
+   function F.  _GL_ATTRIBUTE_DEALLOC_FREE is for functions that
+   return pointers that can be freed via 'free'; it can be used
+   only after including stdlib.h.  */
+#if _GL_GNUC_PREREQ (11, 0)
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+#else
+# define _GL_ATTRIBUTE_DEALLOC(f, i)
+#endif
+#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+
+#if _GL_HAS_C_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+#elif _GL_HAS_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+#else
+# define _GL_ATTRIBUTE_DEPRECATED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (error)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+#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
+
+#if _GL_HAS_ATTRIBUTE (externally_visible)
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+#else
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#endif
+
+/* FALLTHROUGH is special, because it always expands to something.  */
+#if _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)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (format)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (leaf)
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+#else
+# define _GL_ATTRIBUTE_LEAF
+#endif
+
+/* 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
+#endif
+
+#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#else
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+#endif
+/* Earlier spellings of this macro.  */
+#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
+
+#if _GL_HAS_ATTRIBUTE (malloc)
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+#else
+# define _GL_ATTRIBUTE_MALLOC
+#endif
+
+#if _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
+#endif
+
+#if _GL_HAS_ATTRIBUTE (noinline)
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+#else
+# define _GL_ATTRIBUTE_NOINLINE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonnull)
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+#else
+# define _GL_ATTRIBUTE_NONNULL(args)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonstring)
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+#else
+# define _GL_ATTRIBUTE_NONSTRING
+#endif
+
+/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead.  */
+
+#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+#else
+# define _GL_ATTRIBUTE_NOTHROW
+#endif
+
+#if _GL_HAS_ATTRIBUTE (packed)
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+#else
+# define _GL_ATTRIBUTE_PACKED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (pure)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (returns_nonnull)
+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+#else
+# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#endif
+
+#if _GL_HAS_ATTRIBUTE (sentinel)
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+#else
+# define _GL_ATTRIBUTE_SENTINEL(pos)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (unused)
+# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_ATTRIBUTE_UNUSED
+#endif
+/* Earlier spellings of this macro.  */
+#define _GL_UNUSED _GL_ATTRIBUTE_UNUSED
+
+
+/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'.  */
+#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5)
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#else
+# define _GL_UNUSED_LABEL
+#endif
+
 
 /* Please see the Gnulib manual for how to use these macros.
 
      https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
 
      DragonFly; see
-     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+     http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
 
      FreeBSD; see:
      https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
 /* Define to a type if <wchar.h> does not define. */
 #undef mbstate_t
 
+/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
+   n1 and n2 are expressions without side effects, that evaluate to real
+   numbers (excluding NaN).
+   It returns
+     1  if n1 > n2
+     0  if n1 == n2
+     -1 if n1 < n2
+   The naïve code   (n1 > n2 ? 1 : n1 < n2 ? -1 : 0)  produces a conditional
+   jump with nearly all GCC versions up to GCC 10.
+   This variant     (n1 < n2 ? -1 : n1 > n2)  produces a conditional with many
+   GCC versions up to GCC 9.
+   The better code  (n1 > n2) - (n1 < n2)  from Hacker's Delight § 2-9
+   avoids conditional jumps in all GCC versions >= 3.4.  */
+#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
+
+
 /* Define to the real name of the mktime_internal function. */
 #undef mktime_internal
 
 /* Define to `long int' if <sys/types.h> does not define. */
 #undef off_t
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define as the type of the result of subtracting two pointers, if the system
 
 /* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
+   supported only directly.  */
 #undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
-   __restrict__, even though the corresponding Sun C compiler ends up with
-   "#define restrict _Restrict" or "#define restrict __restrict__" in the
-   previous line.  Perhaps some future version of Sun C++ will work with
-   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
-#if defined __SUNPRO_CC && !defined __RESTRICT
+/* Work around a bug in older versions of Sun C++, which did not
+   #define __restrict__ or support _Restrict or __restrict__
+   even though the corresponding Sun C compiler ended up with
+   "#define restrict _Restrict" or "#define restrict __restrict__"
+   in the previous line.  This workaround can be removed once
+   we assume Oracle Developer Studio 12.5 (2016) or later.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
 # define _Restrict
 # define __restrict__
 #endif
 /* Define as a signed type of the same size as size_t. */
 #undef ssize_t
 
+/* Define to 'struct sigaltstack' if that's the type of the argument to
+   sigaltstack */
+#undef stack_t
+
 /* Define to `int' if <sys/types.h> doesn't define. */
 #undef uid_t
 
-/* Define as a marker that can be attached to declarations that might not
-    be used.  This helps to reduce warnings, such as from
-    GCC -Wunused-parameter.  */
-#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_UNUSED __attribute__ ((__unused__))
-#else
-# define _GL_UNUSED
-#endif
-/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
-   is a misnomer outside of parameter lists.  */
-#define _UNUSED_PARAMETER_ _GL_UNUSED
-
-/* gcc supports the "unused" attribute on possibly unused labels, and
-   g++ has since version 4.5.  Note to support C++ as well as C,
-   _GL_UNUSED_LABEL should be used with a trailing ;  */
-#if !defined __cplusplus || __GNUC__ > 4 \
-    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-# define _GL_UNUSED_LABEL _GL_UNUSED
-#else
-# define _GL_UNUSED_LABEL
-#endif
-
-/* The __pure__ attribute was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
-#endif
-
-/* The __const__ attribute was added in gcc 2.95.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST /* empty */
-#endif
-
-/* The __malloc__ attribute was added in gcc 3.  */
-#if 3 <= __GNUC__
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC /* empty */
-#endif
 
+  /* This definition is a duplicate of the one in unitypes.h.
+     It is here so that we can cope with an older version of unitypes.h
+     that does not contain this definition and that is pre-installed among
+     the public header files.  */
+  # if defined __restrict \
+       || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+       || __clang_major__ >= 3
+  #  define _UC_RESTRICT __restrict
+  # elif 199901L <= __STDC_VERSION__ || defined restrict
+  #  define _UC_RESTRICT restrict
+  # else
+  #  define _UC_RESTRICT
+  # endif
+  
 
 /* Define as a macro for copying va_list variables. */
 #undef va_copy
index cfcb118..70ad70b 100644 (file)
@@ -1,25 +1,25 @@
 /* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
 
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible.  */
 
 /*
  * ISO C 99 <ctype.h> for platforms on which it is incomplete.
- * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
  */
 
 #ifndef _@GUARD_PREFIX@_CTYPE_H
index 9244729..1cac430 100644 (file)
@@ -1,6 +1,6 @@
 /* Analyze differences between two vectors.
 
-   Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2018 Free Software
+   Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    The basic algorithm is described in:
    "An O(ND) Difference Algorithm and its Variations", Eugene W. Myers,
    Algorithmica Vol. 1, 1986, pp. 251-266,
-   <http://dx.doi.org/10.1007/BF01840446>.
+   <https://doi.org/10.1007/BF01840446>.
    See especially section 4.2, which describes the variation used below.
 
    The basic algorithm was independently discovered as described in:
    "Algorithms for Approximate String Matching", Esko Ukkonen,
    Information and Control Vol. 64, 1985, pp. 100-118,
-   <http://dx.doi.org/10.1016/S0019-9958(85)80046-2>.
+   <https://doi.org/10.1016/S0019-9958(85)80046-2>.
 
    Unless the 'find_minimal' flag is set, this code uses the TOO_EXPENSIVE
    heuristic, by Paul Eggert, to limit the cost to O(N**1.5 log N)
      EXTRA_CONTEXT_FIELDS    Declarations of fields for 'struct context'.
      NOTE_DELETE(ctxt, xoff) Record the removal of the object xvec[xoff].
      NOTE_INSERT(ctxt, yoff) Record the insertion of the object yvec[yoff].
+     NOTE_ORDERED            (Optional) A boolean expression saying that
+                             NOTE_DELETE and NOTE_INSERT calls must be
+                             issued in offset order.
      EARLY_ABORT(ctxt)       (Optional) A boolean expression that triggers an
                              early abort of the computation.
      USE_HEURISTIC           (Optional) Define if you want to support the
                              heuristic for large vectors.
+
    It is also possible to use this file with abstract arrays.  In this case,
    xvec and yvec are not represented in memory.  They only exist conceptually.
    In this case, the list of defines above is amended as follows:
@@ -63,6 +67,7 @@
      XVECREF_YVECREF_EQUAL(ctxt, xoff, yoff)
                              A three-argument macro: References xvec[xoff] and
                              yvec[yoff] and tests these elements for equality.
+
    Before including this file, you also need to include:
      #include <limits.h>
      #include <stdbool.h>
 # define EARLY_ABORT(ctxt) false
 #endif
 
+#ifndef NOTE_ORDERED
+# define NOTE_ORDERED false
+#endif
+
 /* Use this to suppress gcc's "...may be used before initialized" warnings.
    Beware: The Code argument must not contain commas.  */
 #ifndef IF_LINT
 # endif
 #endif
 
-/* As above, but when Code must contain one comma. */
-#ifndef IF_LINT2
-# if defined GCC_LINT || defined lint
-#  define IF_LINT2(Code1, Code2) Code1, Code2
-# else
-#  define IF_LINT2(Code1, Code2) /* empty */
-# endif
-#endif
-
 /*
  * Context of comparison operation.
  */
@@ -468,49 +468,89 @@ compareseq (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim,
   #define XREF_YREF_EQUAL(x,y)  XVECREF_YVECREF_EQUAL (ctxt, x, y)
 #endif
 
-  /* Slide down the bottom initial diagonal.  */
-  while (xoff < xlim && yoff < ylim && XREF_YREF_EQUAL (xoff, yoff))
+  while (true)
     {
-      xoff++;
-      yoff++;
-    }
+      /* Slide down the bottom initial diagonal.  */
+      while (xoff < xlim && yoff < ylim && XREF_YREF_EQUAL (xoff, yoff))
+        {
+          xoff++;
+          yoff++;
+        }
 
-  /* Slide up the top initial diagonal. */
-  while (xoff < xlim && yoff < ylim && XREF_YREF_EQUAL (xlim - 1, ylim - 1))
-    {
-      xlim--;
-      ylim--;
-    }
+      /* Slide up the top initial diagonal. */
+      while (xoff < xlim && yoff < ylim && XREF_YREF_EQUAL (xlim - 1, ylim - 1))
+        {
+          xlim--;
+          ylim--;
+        }
 
-  /* Handle simple cases. */
-  if (xoff == xlim)
-    while (yoff < ylim)
-      {
-        NOTE_INSERT (ctxt, yoff);
-        if (EARLY_ABORT (ctxt))
-          return true;
-        yoff++;
-      }
-  else if (yoff == ylim)
-    while (xoff < xlim)
-      {
-        NOTE_DELETE (ctxt, xoff);
-        if (EARLY_ABORT (ctxt))
-          return true;
-        xoff++;
-      }
-  else
-    {
-      struct partition part IF_LINT2 (= { .xmid = 0, .ymid = 0 });
+      /* Handle simple cases. */
+      if (xoff == xlim)
+        {
+          while (yoff < ylim)
+            {
+              NOTE_INSERT (ctxt, yoff);
+              if (EARLY_ABORT (ctxt))
+                return true;
+              yoff++;
+            }
+          break;
+        }
+      if (yoff == ylim)
+        {
+          while (xoff < xlim)
+            {
+              NOTE_DELETE (ctxt, xoff);
+              if (EARLY_ABORT (ctxt))
+                return true;
+              xoff++;
+            }
+          break;
+        }
+
+      struct partition part;
 
       /* Find a point of correspondence in the middle of the vectors.  */
       diag (xoff, xlim, yoff, ylim, find_minimal, &part, ctxt);
 
       /* Use the partitions to split this problem into subproblems.  */
-      if (compareseq (xoff, part.xmid, yoff, part.ymid, part.lo_minimal, ctxt))
-        return true;
-      if (compareseq (part.xmid, xlim, part.ymid, ylim, part.hi_minimal, ctxt))
-        return true;
+      OFFSET xoff1, xlim1, yoff1, ylim1, xoff2, xlim2, yoff2, ylim2;
+      bool find_minimal1, find_minimal2;
+      if (!NOTE_ORDERED
+          && ((xlim + ylim) - (part.xmid + part.ymid)
+              < (part.xmid + part.ymid) - (xoff + yoff)))
+        {
+          /* The second problem is smaller and the caller doesn't
+             care about order, so do the second problem first to
+             lessen recursion.  */
+          xoff1 = part.xmid; xlim1 = xlim;
+          yoff1 = part.ymid; ylim1 = ylim;
+          find_minimal1 = part.hi_minimal;
+
+          xoff2 = xoff; xlim2 = part.xmid;
+          yoff2 = yoff; ylim2 = part.ymid;
+          find_minimal2 = part.lo_minimal;
+        }
+      else
+        {
+          xoff1 = xoff; xlim1 = part.xmid;
+          yoff1 = yoff; ylim1 = part.ymid;
+          find_minimal1 = part.lo_minimal;
+
+          xoff2 = part.xmid; xlim2 = xlim;
+          yoff2 = part.ymid; ylim2 = ylim;
+          find_minimal2 = part.hi_minimal;
+        }
+
+      /* Recurse to do one subproblem.  */
+      bool early = compareseq (xoff1, xlim1, yoff1, ylim1, find_minimal1, ctxt);
+      if (early)
+        return early;
+
+      /* Iterate to do the other subproblem.  */
+      xoff = xoff2; xlim = xlim2;
+      yoff = yoff2; ylim = ylim2;
+      find_minimal = find_minimal2;
     }
 
   return false;
index a40f6a9..95f9c99 100644 (file)
@@ -1,19 +1,19 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 766f862..d8b07d3 100644 (file)
@@ -1,6 +1,6 @@
 /* dirname.c -- return all but the last element in a file name
 
-   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 Free Software
+   Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 8b51111..492a438 100644 (file)
@@ -1,36 +1,33 @@
-/*  Take file names apart into directory and base names.
+/* Take file names apart into directory and base names.
 
-    Copyright (C) 1998, 2001, 2003-2006, 2009-2018 Free Software Foundation,
-    Inc.
+   Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation,
+   Inc.
 
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 3 of the License, or
-    (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef DIRNAME_H_
 # define DIRNAME_H_ 1
 
 # include <stdbool.h>
 # include <stddef.h>
-# include "dosname.h"
+# include "filename.h"
+# include "basename-lgpl.h"
 
 # ifndef DIRECTORY_SEPARATOR
 #  define DIRECTORY_SEPARATOR '/'
 # endif
 
-# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
-#  define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
-# endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -41,9 +38,7 @@ char *dir_name (char const *file);
 # endif
 
 char *mdir_name (char const *file);
-size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
 size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
-char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
 
 bool strip_trailing_slashes (char *file);
 
diff --git a/lib/dosname.h b/lib/dosname.h
deleted file mode 100644 (file)
index fef3b6d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* File names on MS-DOS/Windows systems.
-
-   Copyright (C) 2000-2001, 2004-2006, 2009-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-   From Paul Eggert and Jim Meyering.  */
-
-#ifndef _DOSNAME_H
-#define _DOSNAME_H
-
-#if (defined _WIN32 || defined __CYGWIN__ \
-     || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__)
-   /* This internal macro assumes ASCII, but all hosts that support drive
-      letters use ASCII.  */
-# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a'  \
-                              <= 'z' - 'a')
-# define FILE_SYSTEM_PREFIX_LEN(Filename) \
-          (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
-# ifndef __CYGWIN__
-#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
-# endif
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-#else
-# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
-# define ISSLASH(C) ((C) == '/')
-#endif
-
-#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
-#endif
-
-#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
-#  define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
-# else
-#  define IS_ABSOLUTE_FILE_NAME(F)                              \
-     (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0)
-#endif
-#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
-
-#endif /* DOSNAME_H_ */
index c7d1767..53e5552 100644 (file)
@@ -1,18 +1,18 @@
 /* Duplicate an open file descriptor to a specified file descriptor.
 
-   Copyright (C) 1999, 2004-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Paul Eggert */
 #include <errno.h>
 #include <fcntl.h>
 
-#if HAVE_DUP2
+#undef dup2
 
-# undef dup2
-
-# if defined _WIN32 && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
 
 /* Get declarations of the native Windows API functions.  */
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
 
-#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-#   include "msvc-inval.h"
-#  endif
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+#  include "msvc-inval.h"
+# endif
 
 /* Get _get_osfhandle.  */
-#  if GNULIB_MSVC_NOTHROW
-#   include "msvc-nothrow.h"
-#  else
-#   include <io.h>
-#  endif
+# if GNULIB_MSVC_NOTHROW
+#  include "msvc-nothrow.h"
+# else
+#  include <io.h>
+# endif
 
-#  if HAVE_MSVC_INVALID_PARAMETER_HANDLER
+# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
 static int
 dup2_nothrow (int fd, int desired_fd)
 {
@@ -54,7 +52,7 @@ dup2_nothrow (int fd, int desired_fd)
 
   TRY_MSVC_INVAL
     {
-      result = dup2 (fd, desired_fd);
+      result = _dup2 (fd, desired_fd);
     }
   CATCH_MSVC_INVAL
     {
@@ -65,9 +63,9 @@ dup2_nothrow (int fd, int desired_fd)
 
   return result;
 }
-#  else
-#   define dup2_nothrow dup2
-#  endif
+# else
+#  define dup2_nothrow _dup2
+# endif
 
 static int
 ms_windows_dup2 (int fd, int desired_fd)
@@ -103,11 +101,11 @@ ms_windows_dup2 (int fd, int desired_fd)
   return result;
 }
 
-#  define dup2 ms_windows_dup2
+# define dup2 ms_windows_dup2
 
-# elif defined __KLIBC__
+#elif defined __KLIBC__
 
-#  include <InnoTekLIBC/backend.h>
+# include <InnoTekLIBC/backend.h>
 
 static int
 klibc_dup2dirfd (int fd, int desired_fd)
@@ -155,81 +153,37 @@ klibc_dup2 (int fd, int desired_fd)
   return dupfd;
 }
 
-#  define dup2 klibc_dup2
-# endif
+# define dup2 klibc_dup2
+#endif
 
 int
 rpl_dup2 (int fd, int desired_fd)
 {
   int result;
 
-# ifdef F_GETFL
+#ifdef F_GETFL
   /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
      On Cygwin 1.5.x, dup2 (1, 1) returns 0.
      On Cygwin 1.7.17, dup2 (1, -1) dumps core.
      On Cygwin 1.7.25, dup2 (1, 256) can dump core.
      On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC.  */
-#  if HAVE_SETDTABLESIZE
+# if HAVE_SETDTABLESIZE
   setdtablesize (desired_fd + 1);
-#  endif
+# endif
   if (desired_fd < 0)
     fd = desired_fd;
   if (fd == desired_fd)
     return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
-# endif
+#endif
 
   result = dup2 (fd, desired_fd);
 
   /* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x.  */
   if (result == -1 && errno == EMFILE)
     errno = EBADF;
-# if REPLACE_FCHDIR
+#if REPLACE_FCHDIR
   if (fd != desired_fd && result != -1)
     result = _gl_register_dup (fd, result);
-# endif
-  return result;
-}
-
-#else /* !HAVE_DUP2 */
-
-/* On older platforms, dup2 did not exist.  */
-
-# ifndef F_DUPFD
-static int
-dupfd (int fd, int desired_fd)
-{
-  int duplicated_fd = dup (fd);
-  if (duplicated_fd < 0 || duplicated_fd == desired_fd)
-    return duplicated_fd;
-  else
-    {
-      int r = dupfd (fd, desired_fd);
-      int e = errno;
-      close (duplicated_fd);
-      errno = e;
-      return r;
-    }
-}
-# endif
-
-int
-dup2 (int fd, int desired_fd)
-{
-  int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
-  if (result == -1 || fd == desired_fd)
-    return result;
-  close (desired_fd);
-# ifdef F_DUPFD
-  result = fcntl (fd, F_DUPFD, desired_fd);
-#  if REPLACE_FCHDIR
-  if (0 <= result)
-    result = _gl_register_dup (fd, result);
-#  endif
-# else
-  result = dupfd (fd, desired_fd);
-# endif
-  if (result == -1 && (errno == EMFILE || errno == EINVAL))
-    errno = EBADF;
+#endif
   return result;
 }
-#endif /* !HAVE_DUP2 */
diff --git a/lib/dynarray.h b/lib/dynarray.h
new file mode 100644 (file)
index 0000000..ec64273
--- /dev/null
@@ -0,0 +1,284 @@
+/* Type-safe arrays which grow dynamically.
+   Copyright 2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert and Bruno Haible, 2021.  */
+
+#ifndef _GL_DYNARRAY_H
+#define _GL_DYNARRAY_H
+
+/* Before including this file, you need to define:
+
+   DYNARRAY_STRUCT
+      The struct tag of dynamic array to be defined.
+
+   DYNARRAY_ELEMENT
+      The type name of the element type.  Elements are copied
+      as if by memcpy, and can change address as the dynamic
+      array grows.
+
+   DYNARRAY_PREFIX
+      The prefix of the functions which are defined.
+
+   The following parameters are optional:
+
+   DYNARRAY_ELEMENT_FREE
+      DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the
+      contents of elements. E is of type  DYNARRAY_ELEMENT *.
+
+   DYNARRAY_ELEMENT_INIT
+      DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new
+      element.  E is of type  DYNARRAY_ELEMENT *.
+      If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is
+      defined, new elements are automatically zero-initialized.
+      Otherwise, new elements have undefined contents.
+
+   DYNARRAY_INITIAL_SIZE
+      The size of the statically allocated array (default:
+      at least 2, more elements if they fit into 128 bytes).
+      Must be a preprocessor constant.  If DYNARRAY_INITIAL_SIZE is 0,
+      there is no statically allocated array at, and all non-empty
+      arrays are heap-allocated.
+
+   DYNARRAY_FINAL_TYPE
+      The name of the type which holds the final array.  If not
+      defined, is PREFIX##finalize not provided.  DYNARRAY_FINAL_TYPE
+      must be a struct type, with members of type DYNARRAY_ELEMENT and
+      size_t at the start (in this order).
+
+   These macros are undefined after this header file has been
+   included.
+
+   The following types are provided (their members are private to the
+   dynarray implementation):
+
+     struct DYNARRAY_STRUCT
+
+   The following functions are provided:
+ */
+
+/* Initialize a dynamic array object.  This must be called before any
+   use of the object.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Deallocate the dynamic array and its elements.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Return true if the dynamic array is in an error state.  */
+#if 0
+static bool
+       DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Mark the dynamic array as failed.  All elements are deallocated as
+   a side effect.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Return the number of elements which have been added to the dynamic
+   array.  */
+#if 0
+static size_t
+       DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Return a pointer to the first array element, if any.  For a
+   zero-length array, the pointer can be NULL even though the dynamic
+   array has not entered the failure state.  */
+#if 0
+static DYNARRAY_ELEMENT *
+       DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Return a pointer one element past the last array element.  For a
+   zero-length array, the pointer can be NULL even though the dynamic
+   array has not entered the failure state.  */
+#if 0
+static DYNARRAY_ELEMENT *
+       DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Return a pointer to the array element at INDEX.  Terminate the
+   process if INDEX is out of bounds.  */
+#if 0
+static DYNARRAY_ELEMENT *
+       DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *list, size_t index);
+#endif
+
+/* Add ITEM at the end of the array, enlarging it by one element.
+   Mark *LIST as failed if the dynamic array allocation size cannot be
+   increased.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *list,
+                             DYNARRAY_ELEMENT item);
+#endif
+
+/* Allocate a place for a new element in *LIST and return a pointer to
+   it.  The pointer can be NULL if the dynamic array cannot be
+   enlarged due to a memory allocation failure.  */
+#if 0
+static DYNARRAY_ELEMENT *
+       DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Change the size of *LIST to SIZE.  If SIZE is larger than the
+   existing size, new elements are added (which can be initialized).
+   Otherwise, the list is truncated, and elements are freed.  Return
+   false on memory allocation failure (and mark *LIST as failed).  */
+#if 0
+static bool
+       DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *list, size_t size);
+#endif
+
+/* Remove the last element of LIST if it is present.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *list);
+#endif
+
+/* Remove all elements from the list.  The elements are freed, but the
+   list itself is not.  */
+#if 0
+static void
+       DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *list);
+#endif
+
+#if defined DYNARRAY_FINAL_TYPE
+/* Transfer the dynamic array to a permanent location at *RESULT.
+   Returns true on success on false on allocation failure.  In either
+   case, *LIST is re-initialized and can be reused.  A NULL pointer is
+   stored in *RESULT if LIST refers to an empty list.  On success, the
+   pointer in *RESULT is heap-allocated and must be deallocated using
+   free.  */
+#if 0
+static bool
+       DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list,
+                                  DYNARRAY_FINAL_TYPE *result);
+#endif
+#else /* !defined DYNARRAY_FINAL_TYPE */
+/* Transfer the dynamic array to a heap-allocated array and return a
+   pointer to it.  The pointer is NULL if memory allocation fails, or
+   if the array is empty, so this function should be used only for
+   arrays which are known not be empty (usually because they always
+   have a sentinel at the end).  If LENGTHP is not NULL, the array
+   length is written to *LENGTHP.  *LIST is re-initialized and can be
+   reused.  */
+#if 0
+static DYNARRAY_ELEMENT *
+       DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list,
+                                  size_t *lengthp);
+#endif
+#endif
+
+/* A minimal example which provides a growing list of integers can be
+   defined like this:
+
+     struct int_array
+     {
+       // Pointer to result array followed by its length,
+       // as required by DYNARRAY_FINAL_TYPE.
+       int *array;
+       size_t length;
+     };
+
+     #define DYNARRAY_STRUCT dynarray_int
+     #define DYNARRAY_ELEMENT int
+     #define DYNARRAY_PREFIX dynarray_int_
+     #define DYNARRAY_FINAL_TYPE struct int_array
+     #include <malloc/dynarray-skeleton.c>
+
+   To create a three-element array with elements 1, 2, 3, use this
+   code:
+
+     struct dynarray_int dyn;
+     dynarray_int_init (&dyn);
+     for (int i = 1; i <= 3; ++i)
+       {
+         int *place = dynarray_int_emplace (&dyn);
+         assert (place != NULL);
+         *place = i;
+       }
+     struct int_array result;
+     bool ok = dynarray_int_finalize (&dyn, &result);
+     assert (ok);
+     assert (result.length == 3);
+     assert (result.array[0] == 1);
+     assert (result.array[1] == 2);
+     assert (result.array[2] == 3);
+     free (result.array);
+
+   If the elements contain resources which must be freed, define
+   DYNARRAY_ELEMENT_FREE appropriately, like this:
+
+     struct str_array
+     {
+       char **array;
+       size_t length;
+     };
+
+     #define DYNARRAY_STRUCT dynarray_str
+     #define DYNARRAY_ELEMENT char *
+     #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr)
+     #define DYNARRAY_PREFIX dynarray_str_
+     #define DYNARRAY_FINAL_TYPE struct str_array
+     #include <malloc/dynarray-skeleton.c>
+ */
+
+
+/* The implementation is imported from glibc.  */
+
+/* Avoid possible conflicts with symbols exported by the GNU libc.  */
+#define __libc_dynarray_at_failure gl_dynarray_at_failure
+#define __libc_dynarray_emplace_enlarge gl_dynarray_emplace_enlarge
+#define __libc_dynarray_finalize gl_dynarray_finalize
+#define __libc_dynarray_resize_clear gl_dynarray_resize_clear
+#define __libc_dynarray_resize gl_dynarray_resize
+
+#if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNARRAY_PREFIX
+
+# ifndef _GL_LIKELY
+/* Rely on __builtin_expect, as provided by the module 'builtin-expect'.  */
+#  define _GL_LIKELY(cond) __builtin_expect ((cond), 1)
+#  define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0)
+# endif
+
+/* Define auxiliary structs and declare auxiliary functions, common to all
+   instantiations of dynarray.  */
+# include <malloc/dynarray.gl.h>
+
+/* Define the instantiation, specified through
+     DYNARRAY_STRUCT
+     DYNARRAY_ELEMENT
+     DYNARRAY_PREFIX
+   etc.  */
+# include <malloc/dynarray-skeleton.gl.h>
+
+#else
+
+/* This file is being included from one of the malloc/dynarray_*.c files.  */
+# include <malloc/dynarray.h>
+
+#endif
+
+#endif /* _GL_DYNARRAY_H */
index b95c4e9..3cad9e2 100644 (file)
@@ -1,19 +1,19 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ERRNO_H
 
index adc8733..f89dcc5 100644 (file)
@@ -1,18 +1,18 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
@@ -40,7 +40,7 @@
 # include <wchar.h>
 # define mbsrtowcs __mbsrtowcs
 # define USE_UNLOCKED_IO 0
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
+# define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(a, b)
 # define _GL_ARG_NONNULL(a)
 #else
 # include "getprogname.h"
@@ -119,7 +119,7 @@ int strerror_r (int errnum, char *buf, size_t buflen);
 #  endif
 # endif
 
-#define program_name getprogname ()
+# define program_name getprogname ()
 
 # if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r
 #  define __strerror_r strerror_r
@@ -202,7 +202,7 @@ print_errno_message (int errnum)
 #endif
 }
 
-static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3))
+static void _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0) _GL_ARG_NONNULL ((3))
 error_tail (int status, int errnum, const char *message, va_list args)
 {
 #if _LIBC
index 36401e1..814715e 100644 (file)
@@ -1,45 +1,26 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995-1997, 2003, 2006, 2008-2018 Free Software Foundation,
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2021 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _ERROR_H
 #define _ERROR_H 1
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
-
-/* On mingw, the flavor of printf depends on whether the extensions module
- * is in use; the check for <stdio.h> determines the witness macro.  */
-#ifndef _GL_ATTRIBUTE_SPEC_PRINTF
-# if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __gnu_printf__
-# else
-#  define _GL_ATTRIBUTE_SPEC_PRINTF __printf__
-# endif
-#endif
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM.  */
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -50,11 +31,21 @@ extern "C" {
    If STATUS is nonzero, terminate the program with 'exit (STATUS)'.  */
 
 extern void error (int __status, int __errnum, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 3, 4));
+#if GNULIB_VFPRINTF_POSIX
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
+#else
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
+#endif
+     ;
 
 extern void error_at_line (int __status, int __errnum, const char *__fname,
                            unsigned int __lineno, const char *__format, ...)
-     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF, 5, 6));
+#if GNULIB_VFPRINTF_POSIX
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
+#else
+     _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
+#endif
+     ;
 
 /* If NULL, error will flush stdout, then print on stderr the program
    name, a colon and a space.  Otherwise, error will call this
index 88f8187..417ab23 100644 (file)
@@ -1,6 +1,6 @@
 /* exclude.c -- exclude file names
 
-   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2018 Free Software
+   Copyright (C) 1992-1994, 1997, 1999-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -42,7 +42,7 @@
 #include "verify.h"
 #include "filename.h"
 
-#if USE_UNLOCKED_IO
+#if GNULIB_EXCLUDE_SINGLE_THREAD
 # include "unlocked-io.h"
 #endif
 
@@ -88,8 +88,8 @@ struct patopts
 struct exclude_pattern
   {
     struct patopts *exclude;
-    size_t exclude_alloc;
-    size_t exclude_count;
+    idx_t exclude_alloc;
+    idx_t exclude_count;
   };
 
 enum exclude_type
@@ -219,10 +219,10 @@ string_hasher_ci (void const *data, size_t n_buckets)
       else
         wc = *m.ptr;
 
-      value = (value * 31 + wc) % n_buckets;
+      value = value * 31 + wc;
     }
 
-  return value;
+  return value % n_buckets;
 }
 
 /* compare two strings for equality */
@@ -281,12 +281,10 @@ new_exclude_segment (struct exclude *ex, enum exclude_type type, int options)
 static void
 free_exclude_segment (struct exclude_segment *seg)
 {
-  size_t i;
-
   switch (seg->type)
     {
     case exclude_pattern:
-      for (i = 0; i < seg->v.pat.exclude_count; i++)
+      for (idx_t i = 0; i < seg->v.pat.exclude_count; i++)
         {
           if (seg->v.pat.exclude[i].options & EXCLUDE_REGEX)
             regfree (&seg->v.pat.exclude[i].v.re);
@@ -407,11 +405,10 @@ exclude_patopts (struct patopts const *opts, char const *f)
 static bool
 file_pattern_matches (struct exclude_segment const *seg, char const *f)
 {
-  size_t exclude_count = seg->v.pat.exclude_count;
+  idx_t exclude_count = seg->v.pat.exclude_count;
   struct patopts const *exclude = seg->v.pat.exclude;
-  size_t i;
 
-  for (i = 0; i < exclude_count; i++)
+  for (idx_t i = 0; i < exclude_count; i++)
     {
       if (exclude_patopts (exclude + i, f))
         return true;
@@ -533,8 +530,8 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
 
       pat = &seg->v.pat;
       if (pat->exclude_count == pat->exclude_alloc)
-        pat->exclude = x2nrealloc (pat->exclude, &pat->exclude_alloc,
-                                   sizeof *pat->exclude);
+        pat->exclude = xpalloc (pat->exclude, &pat->exclude_alloc, 1, -1,
+                                sizeof *pat->exclude);
       patopts = &pat->exclude[pat->exclude_count++];
 
       patopts->options = options;
@@ -547,7 +544,7 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
           if (options & FNM_LEADING_DIR)
             {
               char *tmp;
-              size_t len = strlen (pattern);
+              idx_t len = strlen (pattern);
 
               while (len > 0 && ISSLASH (pattern[len-1]))
                 --len;
@@ -556,7 +553,7 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
                 rc = 1;
               else
                 {
-                  tmp = xmalloc (len + 7);
+                  tmp = ximalloc (len + 7);
                   memcpy (tmp, pattern, len);
                   strcpy (tmp + len, "(/.*)?");
                   rc = regcomp (&patopts->v.re, tmp, cflags);
@@ -617,22 +614,22 @@ add_exclude_fp (void (*add_func) (struct exclude *, char const *, int, void *),
   char *p;
   char *pattern;
   char const *lim;
-  size_t buf_alloc = 0;
-  size_t buf_count = 0;
+  idx_t buf_alloc = 0;
+  idx_t buf_count = 0;
   int c;
   int e = 0;
 
   while ((c = getc (fp)) != EOF)
     {
       if (buf_count == buf_alloc)
-        buf = x2realloc (buf, &buf_alloc);
+        buf = xpalloc (buf, &buf_alloc, 1, -1, 1);
       buf[buf_count++] = c;
     }
 
   if (ferror (fp))
     e = errno;
 
-  buf = xrealloc (buf, buf_count + 1);
+  buf = xirealloc (buf, buf_count + 1);
   buf[buf_count] = line_end;
   lim = buf + buf_count + ! (buf_count == 0 || buf[buf_count - 1] == line_end);
 
@@ -683,7 +680,7 @@ add_exclude_file (void (*add_func) (struct exclude *, char const *, int),
 
   if (use_stdin)
     in = stdin;
-  else if (! (in = fopen (file_name, "r")))
+  else if (! (in = fopen (file_name, "re")))
     return -1;
 
   rc = add_exclude_fp (call_addfn, ex, in, options, line_end, &add_func);
index 0bb9a8c..9ecfbc9 100644 (file)
@@ -1,6 +1,6 @@
 /* exclude.h -- declarations for excluding file names
 
-   Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2018 Free
+   Copyright (C) 1992-1994, 1997, 1999, 2001-2003, 2005-2006, 2009-2021 Free
    Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 19c5cba..ebc1f58 100644 (file)
@@ -1,18 +1,18 @@
 /* Failure exit status
 
-   Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index a42057b..4add9e0 100644 (file)
@@ -1,18 +1,18 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 extern int volatile exit_failure;
index 74e0f5d..c744eb9 100644 (file)
@@ -1,18 +1,18 @@
 /* Provide file descriptor control.
 
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake <ebb9@byu.net>.  */
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <limits.h>
 #include <stdarg.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 #ifdef __KLIBC__
@@ -69,14 +70,14 @@ dupfd (int oldfd, int newfd, int flags)
       return -1;
     }
   if (old_handle == INVALID_HANDLE_VALUE
-      || (mode = setmode (oldfd, O_BINARY)) == -1)
+      || (mode = _setmode (oldfd, O_BINARY)) == -1)
     {
       /* oldfd is not open, or is an unassigned standard file
          descriptor.  */
       errno = EBADF;
       return -1;
     }
-  setmode (oldfd, mode);
+  _setmode (oldfd, mode);
   flags |= mode;
 
   for (;;)
@@ -490,7 +491,9 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
 #if !HAVE_FCNTL
   result = dupfd (fd, target, O_CLOEXEC);
 #else /* HAVE_FCNTL */
-# if defined __HAIKU__
+# if defined __NetBSD__ || defined __HAIKU__
+  /* On NetBSD 9.0, the system fcntl (fd, F_DUPFD_CLOEXEC, target)
+     has only the same effect as fcntl (fd, F_DUPFD, target).  */
   /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
      the FD_CLOEXEC flag on fd, not on target.  Therefore avoid the
      system fcntl in this case.  */
@@ -545,7 +548,7 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
 #ifdef __KLIBC__
 
 static int
-klibc_fcntl (int fd, int action, /* arg */...);
+klibc_fcntl (int fd, int action, /* arg */...)
 {
   va_list arg_ptr;
   int arg;
index a1e7d35..26dedc3 100644 (file)
@@ -1,18 +1,18 @@
 /* Like <fcntl.h>, but with non-working flags defined to 0.
 
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Paul Eggert */
 #endif
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 
+/* Native Windows platforms declare open(), creat() in <io.h>.  */
+#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+    && (defined _WIN32 && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 #else
 /* Normal invocation convention.  */
 
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
 
+/* Native Windows platforms declare open(), creat() in <io.h>.  */
+#if (@GNULIB_CREAT@ || @GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
+    && (defined _WIN32 && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
 #ifndef _@GUARD_PREFIX@_FCNTL_H
 #define _@GUARD_PREFIX@_FCNTL_H
 
 # include <unistd.h>
 #endif
 
-/* Native Windows platforms declare open(), creat() in <io.h>.  */
-#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
-    && (defined _WIN32 && ! defined __CYGWIN__)
-# include <io.h>
-#endif
-
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 
 /* Declare overridden functions.  */
 
+#if @GNULIB_CREAT@
+# if @REPLACE_CREAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef creat
+#   define creat rpl_creat
+#  endif
+_GL_FUNCDECL_RPL (creat, int, (const char *filename, mode_t mode)
+                             _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (creat, int, (const char *filename, mode_t mode));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef creat
+#   define creat _creat
+#  endif
+_GL_CXXALIAS_MDA (creat, int, (const char *filename, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
+# endif
+_GL_CXXALIASWARN (creat);
+#elif defined GNULIB_POSIXCHECK
+# undef creat
+/* Assume creat is always declared.  */
+_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
+                 "use gnulib module creat for portability");
+#elif @GNULIB_MDA_CREAT@
+/* On native Windows, map 'creat' to '_creat', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::creat always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef creat
+#   define creat _creat
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (creat, int, (const char *filename, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
+# endif
+_GL_CXXALIASWARN (creat);
+#endif
+
 #if @GNULIB_FCNTL@
 # if @REPLACE_FCNTL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #  endif
 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
+#  if !GNULIB_defined_rpl_fcntl
+#   define GNULIB_defined_rpl_fcntl 1
+#  endif
 # else
 #  if !@HAVE_FCNTL@
 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
+#   if !GNULIB_defined_fcntl
+#    define GNULIB_defined_fcntl 1
+#   endif
 #  endif
 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
 # endif
@@ -114,6 +167,12 @@ _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
                              _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef open
+#   define open _open
+#  endif
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
 # else
 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
 # endif
@@ -127,6 +186,22 @@ _GL_CXXALIASWARN (open);
 /* Assume open is always declared.  */
 _GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
                  "use gnulib module open for portability");
+#elif @GNULIB_MDA_OPEN@
+/* On native Windows, map 'open' to '_open', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::open always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef open
+#   define open _open
+#  endif
+_GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
+# else
+_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+# endif
+# if !defined __hpux
+_GL_CXXALIASWARN (open);
+# endif
 #endif
 
 #if @GNULIB_OPENAT@
index 95a0662..75b1626 100644 (file)
@@ -1,18 +1,18 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2009.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index dbc5b67..98e2a52 100644 (file)
@@ -1,17 +1,17 @@
 /* Hook for making file descriptor functions close(), ioctl() extensible.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
index 4daba6e..af7c10a 100644 (file)
@@ -1,6 +1,6 @@
 /* Return a string describing the type of a file.
 
-   Copyright (C) 1993-1994, 2001-2002, 2004-2006, 2009-2018 Free Software
+   Copyright (C) 1993-1994, 2001-2002, 2004-2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 22d39ce..90a4c44 100644 (file)
@@ -1,6 +1,6 @@
 /* Return a string describing the type of a file.
 
-   Copyright (C) 1993-1994, 2001-2002, 2004-2005, 2009-2018 Free Software
+   Copyright (C) 1993-1994, 2001-2002, 2004-2005, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index a7ad7e7..dafe3df 100644 (file)
 /* Basic filename support macros.
-   Copyright (C) 2001-2004, 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2007-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* From Paul Eggert and Jim Meyering.  */
 
 #ifndef _FILENAME_H
 #define _FILENAME_H
 
+#include <string.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 
-/* Pathname support.
-   ISSLASH(C)           tests whether C is a directory separator character.
-   IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
-                        it may be concatenated to a directory pathname.
-   IS_PATH_WITH_DIR(P)  tests whether P contains a directory specification.
+/* Filename support.
+   ISSLASH(C)                  tests whether C is a directory separator
+                               character.
+   HAS_DEVICE(Filename)        tests whether Filename contains a device
+                               specification.
+   FILE_SYSTEM_PREFIX_LEN(Filename)  length of the device specification
+                                     at the beginning of Filename,
+                                     index of the part consisting of
+                                     alternating components and slashes.
+   FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+                               1 when a non-empty device specification
+                               can be followed by an empty or relative
+                               part,
+                               0 when a non-empty device specification
+                               must be followed by a slash,
+                               0 when device specification don't exist.
+   IS_ABSOLUTE_FILE_NAME(Filename)
+                               tests whether Filename is independent of
+                               any notion of "current directory".
+   IS_RELATIVE_FILE_NAME(Filename)
+                               tests whether Filename may be concatenated
+                               to a directory filename.
+   Note: On native Windows, OS/2, DOS, "c:" is neither an absolute nor a
+   relative file name!
+   IS_FILE_NAME_WITH_DIR(Filename)  tests whether Filename contains a device
+                                    or directory specification.
  */
-#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+#if defined _WIN32 || defined __CYGWIN__ \
+    || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__
   /* Native Windows, Cygwin, OS/2, DOS */
 # define ISSLASH(C) ((C) == '/' || (C) == '\\')
-# define HAS_DEVICE(P) \
-    ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
-     && (P)[1] == ':')
-# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
-# define IS_PATH_WITH_DIR(P) \
-    (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+  /* Internal macro: Tests whether a character is a drive letter.  */
+# define _IS_DRIVE_LETTER(C) \
+    (((C) >= 'A' && (C) <= 'Z') || ((C) >= 'a' && (C) <= 'z'))
+  /* Help the compiler optimizing it.  This assumes ASCII.  */
+# undef _IS_DRIVE_LETTER
+# define _IS_DRIVE_LETTER(C) \
+    (((unsigned int) (C) | ('a' - 'A')) - 'a' <= 'z' - 'a')
+# define HAS_DEVICE(Filename) \
+    (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':')
+# define FILE_SYSTEM_PREFIX_LEN(Filename) (HAS_DEVICE (Filename) ? 2 : 0)
+# ifdef __CYGWIN__
+#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+# else
+   /* On native Windows, OS/2, DOS, the system has the notion of a
+      "current directory" on each drive.  */
+#  define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1
+# endif
+# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+#  define IS_ABSOLUTE_FILE_NAME(Filename) \
+     ISSLASH ((Filename)[FILE_SYSTEM_PREFIX_LEN (Filename)])
+# else
+#  define IS_ABSOLUTE_FILE_NAME(Filename) \
+     (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename))
+# endif
+# define IS_RELATIVE_FILE_NAME(Filename) \
+    (! (ISSLASH ((Filename)[0]) || HAS_DEVICE (Filename)))
+# define IS_FILE_NAME_WITH_DIR(Filename) \
+    (strchr ((Filename), '/') != NULL || strchr ((Filename), '\\') != NULL \
+     || HAS_DEVICE (Filename))
 #else
   /* Unix */
 # define ISSLASH(C) ((C) == '/')
-# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
-# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-# define FILE_SYSTEM_PREFIX_LEN(P) 0
+# define HAS_DEVICE(Filename) ((void) (Filename), 0)
+# define FILE_SYSTEM_PREFIX_LEN(Filename) ((void) (Filename), 0)
+# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+# define IS_ABSOLUTE_FILE_NAME(Filename) ISSLASH ((Filename)[0])
+# define IS_RELATIVE_FILE_NAME(Filename) (! ISSLASH ((Filename)[0]))
+# define IS_FILE_NAME_WITH_DIR(Filename) (strchr ((Filename), '/') != NULL)
 #endif
 
+/* Deprecated macros.  For backward compatibility with old users of the
+   'filename' module.  */
+#define IS_ABSOLUTE_PATH IS_ABSOLUTE_FILE_NAME
+#define IS_PATH_WITH_DIR IS_FILE_NAME_WITH_DIR
+
 
 #ifdef __cplusplus
 }
index f50ecc1..d52dc80 100644 (file)
@@ -1,18 +1,18 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering.  */
@@ -25,7 +25,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "dirname.h"
+#include "basename-lgpl.h"
+#include "filename.h"
 
 #if ! HAVE_MEMPCPY && ! defined mempcpy
 # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
@@ -41,7 +42,7 @@
    *BASE_IN_RESULT to point to the copy of BASE at the end of the
    returned concatenation.
 
-   Return NULL if malloc fails.  */
+   If malloc fails, return NULL with errno set.  */
 
 char *
 mfile_name_concat (char const *dir, char const *base, char **base_in_result)
@@ -68,20 +69,22 @@ mfile_name_concat (char const *dir, char const *base, char **base_in_result)
     }
 
   char *p_concat = malloc (dirlen + (sep != '\0')  + baselen + 1);
-  char *p;
-
   if (p_concat == NULL)
     return NULL;
 
-  p = mempcpy (p_concat, dir, dirlen);
-  *p = sep;
-  p += sep != '\0';
+  {
+    char *p;
+
+    p = mempcpy (p_concat, dir, dirlen);
+    *p = sep;
+    p += sep != '\0';
 
-  if (base_in_result)
-    *base_in_result = p;
+    if (base_in_result)
+      *base_in_result = p;
 
-  p = mempcpy (p, base, baselen);
-  *p = '\0';
+    p = mempcpy (p, base, baselen);
+    *p = '\0';
+  }
 
   return p_concat;
 }
index cad4595..8180acc 100644 (file)
@@ -1,6 +1,6 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index fee6153..e2ff466 100644 (file)
@@ -1,19 +1,19 @@
 /* Concatenate two arbitrary file names.
 
-   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2018 Free Software
+   Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering.  */
index 7e3f598..1b19a2b 100644 (file)
@@ -1,20 +1,20 @@
 /* Sizes of structs with flexible array members.
 
-   Copyright 2016-2018 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.
 
 # define FLEXALIGNOF(type) _Alignof (type)
 #endif
 
-/* Upper bound on the size of a struct of type TYPE with a flexible
-   array member named MEMBER that is followed by N bytes of other data.
-   This is not simply sizeof (TYPE) + N, since it may require
-   alignment on unusually picky C11 platforms, and
-   FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.
+/* Yield a properly aligned upper bound on the size of a struct of
+   type TYPE with a flexible array member named MEMBER that is
+   followed by N bytes of other data.  The result is suitable as an
+   argument to malloc.  For example:
+
+     struct s { int n; char d[FLEXIBLE_ARRAY_MEMBER]; };
+     struct s *p = malloc (FLEXSIZEOF (struct s, d, n * sizeof (char)));
+
+   FLEXSIZEOF (TYPE, MEMBER, N) is not simply (sizeof (TYPE) + N),
+   since FLEXIBLE_ARRAY_MEMBER may be 1 on pre-C11 platforms.  Nor is
+   it simply (offsetof (TYPE, MEMBER) + N), as that might yield a size
+   that causes malloc to yield a pointer that is not properly aligned
+   for TYPE; for example, if sizeof (int) == alignof (int) == 4,
+   malloc (offsetof (struct s, d) + 3 * sizeof (char)) is equivalent
+   to malloc (7) and might yield a pointer that is not a multiple of 4
+   (which means the pointer is not properly aligned for struct s),
+   whereas malloc (FLEXSIZEOF (struct s, d, 3 * sizeof (char))) is
+   equivalent to malloc (8) and must yield a pointer that is a
+   multiple of 4.
+
    Yield a value less than N if and only if arithmetic overflow occurs.  */
 
 #define FLEXSIZEOF(type, member, n) \
index 2cb858f..ad891f6 100644 (file)
@@ -1,19 +1,19 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _FLOATPLUS_H
 #define _FLOATPLUS_H
index 7caca83..dd1e84a 100644 (file)
@@ -1,18 +1,18 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 2cdbd12..f52aba3 100644 (file)
@@ -1,18 +1,18 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_FLOAT_H
      extern const long double LDBL_MAX;
 
    Unfortunately, this is not a constant expression.  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd;
     long double ld;
   };
+#  define GNULIB_defined_long_double_union 1
+# endif
 extern const union gl_long_double_union gl_LDBL_MAX;
 # define LDBL_MAX (gl_LDBL_MAX.ld)
 /* Minimum e such that 10^e is in the range of normalized numbers.  */
@@ -146,11 +149,14 @@ extern const union gl_long_double_union gl_LDBL_MAX;
 
    Unfortunately, this is not a constant expression, and the latter expression
    does not work well when GCC is optimizing..  */
+# if !GNULIB_defined_long_double_union
 union gl_long_double_union
   {
     struct { double hi; double lo; } dd;
     long double ld;
   };
+#  define GNULIB_defined_long_double_union 1
+# endif
 extern const union gl_long_double_union gl_LDBL_MAX;
 # define LDBL_MAX (gl_LDBL_MAX.ld)
 #endif
index 0fa0a3d..b8a71f1 100644 (file)
@@ -1,20 +1,22 @@
-/* Copyright (C) 1991-1993, 1996-2007, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
 #endif
 
 /* Enable GNU extensions in fnmatch.h.  */
 
 #include <fnmatch.h>
 
-#include <alloca.h>
 #include <assert.h>
-#include <ctype.h>
 #include <errno.h>
-#include <stddef.h>
-#include <stdbool.h>
-#include <stdlib.h>
+#include <ctype.h>
 #include <string.h>
-
-#define WIDE_CHAR_SUPPORT \
-  (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \
-   && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
-
-/* For platform which support the ISO C amendment 1 functionality we
-   support user defined character classes.  */
-#if defined _LIBC || WIDE_CHAR_SUPPORT
-# include <wctype.h>
-# include <wchar.h>
+#include <stdlib.h>
+#if defined _LIBC || HAVE_ALLOCA
+# include <alloca.h>
 #endif
+#include <wchar.h>
+#include <wctype.h>
+#include <stddef.h>
+#include <stdbool.h>
 
 /* We need some of the locale data (the collation sequence information)
    but there is no interface to get this information in general.  Therefore
    we support a correct implementation only in glibc.  */
 #ifdef _LIBC
 # include "../locale/localeinfo.h"
-# include "../locale/elem-hash.h"
 # include "../locale/coll-lookup.h"
 # include <shlib-compat.h>
 
 # define CONCAT(a,b) __CONCAT(a,b)
+# define btowc __btowc
+# define iswctype __iswctype
 # define mbsrtowcs __mbsrtowcs
+# define mempcpy __mempcpy
+# define strnlen __strnlen
+# define towlower __towlower
+# define wcscat __wcscat
+# define wcslen __wcslen
+# define wctype __wctype
+# define wmemchr __wmemchr
+# define wmempcpy __wmempcpy
 # define fnmatch __fnmatch
 extern int fnmatch (const char *pattern, const char *string, int flags);
 #endif
 
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
+#ifdef _LIBC
+# if __GNUC__ >= 7
+#  define FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+#  define FALLTHROUGH ((void) 0)
+# endif
+#else
+# include "attribute.h"
 #endif
 
-#include "flexmember.h"
+#include <intprops.h>
+#include <flexmember.h>
 
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
+#ifdef _LIBC
+typedef ptrdiff_t idx_t;
+#else
+# include "idx.h"
 #endif
 
 /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set.  */
 #define NO_LEADING_PERIOD(flags) \
   ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
 
-/* Comment out all this code if we are using the GNU C Library, and are not
-   actually compiling the library itself, and have not detected a bug
-   in the library.  This code is part of the GNU C
-   Library, but also included in many other GNU distributions.  Compiling
-   and linking in this code is a waste when using the GNU C library
-   (especially if it is a shared library).  Rather than having every GNU
-   program understand 'configure --with-gnu-libc' and omit the object files,
-   it is simpler to just do this in the source for each such file.  */
-
-#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
-
-
-# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
-#  define isblank(c) ((c) == ' ' || (c) == '\t')
+#ifndef _LIBC
+# if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+   and a page size can be as small as 4096 bytes.  So we cannot safely
+   allocate anything larger than 4096 bytes.  Also care for the possibility
+   of a few compiler-allocated temporary stack slots.  */
+#  define __libc_use_alloca(n) ((n) < 4032)
+# else
+/* Just use malloc.  */
+#  define __libc_use_alloca(n) false
+#  undef alloca
+#  define alloca(n) malloc (n)
 # endif
+# define alloca_account(size, avar) ((avar) += (size), alloca (size))
+#endif
 
-# define STREQ(s1, s2) (strcmp (s1, s2) == 0)
-
-# if defined _LIBC || WIDE_CHAR_SUPPORT
-/* The GNU C library provides support for user-defined character classes
-   and the functions from ISO C amendment 1.  */
-#  ifdef CHARCLASS_NAME_MAX
-#   define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
-#  else
+/* Provide support for user-defined character classes, based on the functions
+   from ISO C 90 amendment 1.  */
+#ifdef CHARCLASS_NAME_MAX
+# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
+#else
 /* This shouldn't happen but some implementation might still have this
    problem.  Use a reasonable default value.  */
-#   define CHAR_CLASS_MAX_LENGTH 256
-#  endif
-
-#  ifdef _LIBC
-#   define IS_CHAR_CLASS(string) __wctype (string)
-#  else
-#   define IS_CHAR_CLASS(string) wctype (string)
-#  endif
-
-#  ifdef _LIBC
-#   define ISWCTYPE(WC, WT)     __iswctype (WC, WT)
-#  else
-#   define ISWCTYPE(WC, WT)     iswctype (WC, WT)
-#  endif
-
-#  if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
-/* In this case we are implementing the multibyte character handling.  */
-#   define HANDLE_MULTIBYTE     1
-#  endif
+# define CHAR_CLASS_MAX_LENGTH 256
+#endif
 
-# else
-#  define CHAR_CLASS_MAX_LENGTH  6 /* Namely, 'xdigit'.  */
-
-#  define IS_CHAR_CLASS(string)                                               \
-   (STREQ (string, "alpha") || STREQ (string, "upper")                        \
-    || STREQ (string, "lower") || STREQ (string, "digit")                     \
-    || STREQ (string, "alnum") || STREQ (string, "xdigit")                    \
-    || STREQ (string, "space") || STREQ (string, "print")                     \
-    || STREQ (string, "punct") || STREQ (string, "graph")                     \
-    || STREQ (string, "cntrl") || STREQ (string, "blank"))
-# endif
+#define IS_CHAR_CLASS(string) wctype (string)
 
 /* Avoid depending on library functions or files
    whose names are inconsistent.  */
@@ -141,68 +120,53 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 /* Global variable.  */
 static int posixly_correct;
 
-# ifndef internal_function
-/* Inside GNU libc we mark some function in a special way.  In other
-   environments simply ignore the marking.  */
-#  define internal_function
-# endif
-
 /* Note that this evaluates C many times.  */
-# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
-# define CHAR   char
-# define UCHAR  unsigned char
-# define INT    int
-# define FCT    internal_fnmatch
-# define EXT    ext_match
-# define END    end_pattern
-# define L_(CS) CS
-# ifdef _LIBC
-#  define BTOWC(C)      __btowc (C)
-# else
-#  define BTOWC(C)      btowc (C)
-# endif
-# define STRLEN(S) strlen (S)
-# define STRCAT(D, S) strcat (D, S)
-# ifdef _LIBC
-#  define MEMPCPY(D, S, N) __mempcpy (D, S, N)
-# else
-#  if HAVE_MEMPCPY
-#   define MEMPCPY(D, S, N) mempcpy (D, S, N)
-#  else
-#   define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
-#  endif
-# endif
-# define MEMCHR(S, C, N) memchr (S, C, N)
-# include "fnmatch_loop.c"
-
-
-# if HANDLE_MULTIBYTE
-#  define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
-#  define CHAR  wchar_t
-#  define UCHAR wint_t
-#  define INT   wint_t
-#  define FCT   internal_fnwmatch
-#  define EXT   ext_wmatch
-#  define END   end_wpattern
-#  define L_(CS)        L##CS
-#  define BTOWC(C)      (C)
-#  ifdef _LIBC
-#   define STRLEN(S) __wcslen (S)
-#   define STRCAT(D, S) __wcscat (D, S)
-#   define MEMPCPY(D, S, N) __wmempcpy (D, S, N)
-#  else
-#   define STRLEN(S) wcslen (S)
-#   define STRCAT(D, S) wcscat (D, S)
-#   if HAVE_WMEMPCPY
-#    define MEMPCPY(D, S, N) wmempcpy (D, S, N)
-#   else
-#    define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N))
-#   endif
-#  endif
-#  define MEMCHR(S, C, N) wmemchr (S, C, N)
-#  define WIDE_CHAR_VERSION 1
-
-#  undef IS_CHAR_CLASS
+#define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
+#define CHAR    char
+#define UCHAR   unsigned char
+#define INT     int
+#define FCT     internal_fnmatch
+#define EXT     ext_match
+#define END     end_pattern
+#define STRUCT  fnmatch_struct
+#define L_(CS)  CS
+#define BTOWC(C) btowc (C)
+#define STRLEN(S) strlen (S)
+#define STRCAT(D, S) strcat (D, S)
+#define MEMPCPY(D, S, N) mempcpy (D, S, N)
+#define MEMCHR(S, C, N) memchr (S, C, N)
+#define WIDE_CHAR_VERSION 0
+#ifdef _LIBC
+# include <locale/weight.h>
+# define FINDIDX findidx
+#endif
+#include "fnmatch_loop.c"
+
+
+#define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
+#define CHAR    wchar_t
+#define UCHAR   wint_t
+#define INT     wint_t
+#define FCT     internal_fnwmatch
+#define EXT     ext_wmatch
+#define END     end_wpattern
+#define L_(CS)  L##CS
+#define BTOWC(C) (C)
+#define STRLEN(S) wcslen (S)
+#define STRCAT(D, S) wcscat (D, S)
+#define MEMPCPY(D, S, N) wmempcpy (D, S, N)
+#define MEMCHR(S, C, N) wmemchr (S, C, N)
+#define WIDE_CHAR_VERSION 1
+#ifdef _LIBC
+/* Change the name the header defines so it doesn't conflict with
+   the <locale/weight.h> version included above.  */
+# define findidx findidxwc
+# include <locale/weightwc.h>
+# undef findidx
+# define FINDIDX findidxwc
+#endif
+
+#undef IS_CHAR_CLASS
 /* We have to convert the wide character string in a multibyte string.  But
    we know that the character class names consist of alphanumeric characters
    from the portable character set, and since the wide character encoding
@@ -218,11 +182,11 @@ is_char_class (const wchar_t *wcs)
   do
     {
       /* Test for a printable character from the portable character set.  */
-#  ifdef _LIBC
+#ifdef _LIBC
       if (*wcs < 0x20 || *wcs > 0x7e
           || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60)
         return (wctype_t) 0;
-#  else
+#else
       switch (*wcs)
         {
         case L' ': case L'!': case L'"': case L'#': case L'%':
@@ -249,7 +213,7 @@ is_char_class (const wchar_t *wcs)
         default:
           return (wctype_t) 0;
         }
-#  endif
+#endif
 
       /* Avoid overrunning the buffer.  */
       if (cp == s + CHAR_CLASS_MAX_LENGTH)
@@ -261,96 +225,137 @@ is_char_class (const wchar_t *wcs)
 
   *cp = '\0';
 
-#  ifdef _LIBC
-  return __wctype (s);
-#  else
   return wctype (s);
-#  endif
 }
-#  define IS_CHAR_CLASS(string) is_char_class (string)
+#define IS_CHAR_CLASS(string) is_char_class (string)
 
-#  include "fnmatch_loop.c"
-# endif
+#include "fnmatch_loop.c"
 
 
 int
 fnmatch (const char *pattern, const char *string, int flags)
 {
-# if HANDLE_MULTIBYTE
-#  define ALLOCA_LIMIT 2000
-  if (__builtin_expect (MB_CUR_MAX, 1) != 1)
+  if (__glibc_unlikely (MB_CUR_MAX != 1))
     {
       mbstate_t ps;
-      size_t patsize;
-      size_t strsize;
-      size_t totsize;
+      size_t n;
+      const char *p;
+      wchar_t *wpattern_malloc = NULL;
       wchar_t *wpattern;
+      wchar_t *wstring_malloc = NULL;
       wchar_t *wstring;
-      int res;
+      size_t alloca_used = 0;
 
-      /* Calculate the size needed to convert the strings to
-         wide characters.  */
+      /* Convert the strings into wide characters.  */
       memset (&ps, '\0', sizeof (ps));
-      patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1;
-      if (__builtin_expect (patsize != 0, 1))
+      p = pattern;
+      n = strnlen (pattern, 1024);
+      if (__glibc_likely (n < 1024))
         {
+          wpattern = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
+                                                 alloca_used);
+          n = mbsrtowcs (wpattern, &p, n + 1, &ps);
+          if (__glibc_unlikely (n == (size_t) -1))
+            /* Something wrong.
+               XXX Do we have to set 'errno' to something which mbsrtows hasn't
+               already done?  */
+            return -1;
+          if (p)
+            {
+              memset (&ps, '\0', sizeof (ps));
+              goto prepare_wpattern;
+            }
+        }
+      else
+        {
+        prepare_wpattern:
+          n = mbsrtowcs (NULL, &pattern, 0, &ps);
+          if (__glibc_unlikely (n == (size_t) -1))
+            /* Something wrong.
+               XXX Do we have to set 'errno' to something which mbsrtows hasn't
+               already done?  */
+            return -1;
+          if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
+            {
+              __set_errno (ENOMEM);
+              return -2;
+            }
+          wpattern_malloc = wpattern
+            = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
           assert (mbsinit (&ps));
-          strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1;
-          if (__builtin_expect (strsize != 0, 1))
+          if (wpattern == NULL)
+            return -2;
+          (void) mbsrtowcs (wpattern, &pattern, n + 1, &ps);
+        }
+
+      assert (mbsinit (&ps));
+      n = strnlen (string, 1024);
+      p = string;
+      if (__glibc_likely (n < 1024))
+        {
+          wstring = (wchar_t *) alloca_account ((n + 1) * sizeof (wchar_t),
+                                                alloca_used);
+          n = mbsrtowcs (wstring, &p, n + 1, &ps);
+          if (__glibc_unlikely (n == (size_t) -1))
             {
-              assert (mbsinit (&ps));
-              totsize = patsize + strsize;
-              if (__builtin_expect (! (patsize <= totsize
-                                       && totsize <= SIZE_MAX / sizeof (wchar_t)),
-                                    0))
-                {
-                  errno = ENOMEM;
-                  return -1;
-                }
-
-              /* Allocate room for the wide characters.  */
-              if (__builtin_expect (totsize < ALLOCA_LIMIT, 1))
-                wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t));
-              else
-                {
-                  wpattern = malloc (totsize * sizeof (wchar_t));
-                  if (__builtin_expect (! wpattern, 0))
-                    {
-                      errno = ENOMEM;
-                      return -1;
-                    }
-                }
-              wstring = wpattern + patsize;
-
-              /* Convert the strings into wide characters.  */
-              mbsrtowcs (wpattern, &pattern, patsize, &ps);
-              assert (mbsinit (&ps));
-              mbsrtowcs (wstring, &string, strsize, &ps);
-
-              res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1,
-                                       flags & FNM_PERIOD, flags);
-
-              if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0))
-                free (wpattern);
-              return res;
+              /* Something wrong.
+                 XXX Do we have to set 'errno' to something which
+                 mbsrtows hasn't already done?  */
+            free_return:
+              free (wpattern_malloc);
+              return -1;
+            }
+          if (p)
+            {
+              memset (&ps, '\0', sizeof (ps));
+              goto prepare_wstring;
             }
         }
-    }
+      else
+        {
+        prepare_wstring:
+          n = mbsrtowcs (NULL, &string, 0, &ps);
+          if (__glibc_unlikely (n == (size_t) -1))
+            /* Something wrong.
+               XXX Do we have to set 'errno' to something which mbsrtows hasn't
+               already done?  */
+            goto free_return;
+          if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
+            {
+              free (wpattern_malloc);
+              __set_errno (ENOMEM);
+              return -2;
+            }
 
-# endif /* HANDLE_MULTIBYTE */
+          wstring_malloc = wstring
+            = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
+          if (wstring == NULL)
+            {
+              free (wpattern_malloc);
+              return -2;
+            }
+          assert (mbsinit (&ps));
+          (void) mbsrtowcs (wstring, &string, n + 1, &ps);
+        }
+
+      int res = internal_fnwmatch (wpattern, wstring, wstring + n,
+                                   flags & FNM_PERIOD, flags, NULL,
+                                   alloca_used);
+
+      free (wstring_malloc);
+      free (wpattern_malloc);
+
+      return res;
+    }
 
   return internal_fnmatch (pattern, string, string + strlen (string),
-                           flags & FNM_PERIOD, flags);
+                           flags & FNM_PERIOD, flags, NULL, 0);
 }
 
-# ifdef _LIBC
-#  undef fnmatch
+#undef fnmatch
 versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
-#  if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
 strong_alias (__fnmatch, __fnmatch_old)
 compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
-#  endif
+#endif
 libc_hidden_ver (__fnmatch, fnmatch)
-# endif
-
-#endif  /* _LIBC or not __GNU_LIBRARY__.  */
index af896bd..56596ee 100644 (file)
@@ -1,21 +1,21 @@
 /* Substitute for and wrapper around <fnmatch.h>.
-   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free
+   Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2021 Free
    Software Foundation, Inc.
 
    This file is part of the GNU C Library.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_FNMATCH_H
 
@@ -93,7 +93,7 @@ _GL_FUNCDECL_SYS (fnmatch, int,
 _GL_CXXALIAS_SYS (fnmatch, int,
                   (const char *pattern, const char *name, int flags));
 # endif
-# if !GNULIB_FNMATCH_GNU
+# if !GNULIB_FNMATCH_GNU && __GLIBC__ >= 2
 _GL_CXXALIASWARN (fnmatch);
 # endif
 #elif defined GNULIB_POSIXCHECK
index dcf5a15..7f938af 100644 (file)
@@ -1,33 +1,47 @@
-/* Copyright (C) 1991-1993, 1996-2006, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifdef _LIBC
+# include <stdint.h>
+#endif
+
+struct STRUCT
+{
+  const CHAR *pattern;
+  const CHAR *string;
+  bool no_leading_period;
+};
 
 /* Match STRING against the file name pattern PATTERN, returning zero if
    it matches, nonzero if not.  */
+static int FCT (const CHAR *pattern, const CHAR *string,
+                const CHAR *string_end, bool no_leading_period, int flags,
+                struct STRUCT *ends, size_t alloca_used);
 static int EXT (INT opt, const CHAR *pattern, const CHAR *string,
-                const CHAR *string_end, bool no_leading_period, int flags)
-     internal_function;
-static const CHAR *END (const CHAR *patternp) internal_function;
+                const CHAR *string_end, bool no_leading_period, int flags,
+                size_t alloca_used);
+static const CHAR *END (const CHAR *patternp);
 
 static int
-internal_function
 FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
-     bool no_leading_period, int flags)
+     bool no_leading_period, int flags, struct STRUCT *ends, size_t alloca_used)
 {
-  register const CHAR *p = pattern, *n = string;
-  register UCHAR c;
+  const CHAR *p = pattern, *n = string;
+  UCHAR c;
 #ifdef _LIBC
 # if WIDE_CHAR_VERSION
   const char *collseq = (const char *)
@@ -46,12 +60,10 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
       switch (c)
         {
         case L_('?'):
-          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+          if (__glibc_unlikely (flags & FNM_EXTMATCH) && *p == '(')
             {
-              int res;
-
-              res = EXT (c, p, n, string_end, no_leading_period,
-                         flags);
+              int res = EXT (c, p, n, string_end, no_leading_period,
+                             flags, alloca_used);
               if (res != -1)
                 return res;
             }
@@ -78,15 +90,20 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
           break;
 
         case L_('*'):
-          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+          if (__glibc_unlikely (flags & FNM_EXTMATCH) && *p == '(')
             {
-              int res;
-
-              res = EXT (c, p, n, string_end, no_leading_period,
-                         flags);
+              int res = EXT (c, p, n, string_end, no_leading_period,
+                             flags, alloca_used);
               if (res != -1)
                 return res;
             }
+          else if (ends != NULL)
+            {
+              ends->pattern = p - 1;
+              ends->string = n;
+              ends->no_leading_period = no_leading_period;
+              return 0;
+            }
 
           if (n != string_end && *n == L_('.') && no_leading_period)
             return FNM_NOMATCH;
@@ -111,7 +128,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                     /* There isn't another character; no match.  */
                     return FNM_NOMATCH;
                   else if (*n == L_('/')
-                           && __builtin_expect (flags & FNM_FILE_NAME, 0))
+                           && __glibc_unlikely (flags & FNM_FILE_NAME))
                     /* A slash does not match a wildcard under
                        FNM_FILE_NAME.  */
                     return FNM_NOMATCH;
@@ -147,49 +164,61 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
           else
             {
               const CHAR *endp;
+              struct STRUCT end;
 
+              end.pattern = NULL;
               endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'),
                              string_end - n);
               if (endp == NULL)
                 endp = string_end;
 
               if (c == L_('[')
-                  || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0
+                  || (__glibc_unlikely (flags & FNM_EXTMATCH)
                       && (c == L_('@') || c == L_('+') || c == L_('!'))
                       && *p == L_('(')))
                 {
                   int flags2 = ((flags & FNM_FILE_NAME)
                                 ? flags : (flags & ~FNM_PERIOD));
-                  bool no_leading_period2 = no_leading_period;
 
-                  for (--p; n < endp; ++n, no_leading_period2 = false)
-                    if (FCT (p, n, string_end, no_leading_period2, flags2)
-                        == 0)
-                      return 0;
+                  for (--p; n < endp; ++n, no_leading_period = false)
+                    if (FCT (p, n, string_end, no_leading_period, flags2,
+                             &end, alloca_used) == 0)
+                      goto found;
                 }
               else if (c == L_('/') && (flags & FNM_FILE_NAME))
                 {
                   while (n < string_end && *n != L_('/'))
                     ++n;
                   if (n < string_end && *n == L_('/')
-                      && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags)
-                          == 0))
+                      && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags,
+                               NULL, alloca_used) == 0))
                     return 0;
                 }
               else
                 {
                   int flags2 = ((flags & FNM_FILE_NAME)
                                 ? flags : (flags & ~FNM_PERIOD));
-                  int no_leading_period2 = no_leading_period;
 
                   if (c == L_('\\') && !(flags & FNM_NOESCAPE))
                     c = *p;
                   c = FOLD (c);
-                  for (--p; n < endp; ++n, no_leading_period2 = false)
+                  for (--p; n < endp; ++n, no_leading_period = false)
                     if (FOLD ((UCHAR) *n) == c
-                        && (FCT (p, n, string_end, no_leading_period2, flags2)
-                            == 0))
-                      return 0;
+                        && (FCT (p, n, string_end, no_leading_period, flags2,
+                                 &end, alloca_used) == 0))
+                      {
+                      found:
+                        if (end.pattern == NULL)
+                          return 0;
+                        break;
+                      }
+                  if (end.pattern != NULL)
+                    {
+                      p = end.pattern;
+                      n = end.string;
+                      no_leading_period = end.no_leading_period;
+                      continue;
+                    }
                 }
             }
 
@@ -201,7 +230,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             /* Nonzero if the sense of the character class is inverted.  */
             const CHAR *p_init = p;
             const CHAR *n_init = n;
-            register bool not;
+            bool not;
             CHAR cold;
             UCHAR fn;
 
@@ -227,8 +256,6 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             c = *p++;
             for (;;)
               {
-               bool is_range = false;
-
                 if (!(flags & FNM_NOESCAPE) && c == L_('\\'))
                   {
                     if (*p == L_('\0'))
@@ -243,9 +270,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                     /* Leave room for the null.  */
                     CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
                     size_t c1 = 0;
-#if defined _LIBC || WIDE_CHAR_SUPPORT
                     wctype_t wt;
-#endif
                     const CHAR *startp = p;
 
                     for (;;)
@@ -273,35 +298,19 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                       }
                     str[c1] = L_('\0');
 
-#if defined _LIBC || WIDE_CHAR_SUPPORT
                     wt = IS_CHAR_CLASS (str);
                     if (wt == 0)
                       /* Invalid character class name.  */
                       return FNM_NOMATCH;
 
-# if defined _LIBC && ! WIDE_CHAR_VERSION
+#if defined _LIBC && ! WIDE_CHAR_VERSION
                     /* The following code is glibc specific but does
                        there a good job in speeding up the code since
                        we can avoid the btowc() call.  */
                     if (_ISCTYPE ((UCHAR) *n, wt))
                       goto matched;
-# else
-                    if (ISWCTYPE (BTOWC ((UCHAR) *n), wt))
-                      goto matched;
-# endif
 #else
-                    if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
-                        || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
-                        || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n))
-                        || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
-                        || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
-                        || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n))
-                        || (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
-                        || (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
-                        || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
-                        || (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
-                        || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
-                        || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
+                    if (iswctype (BTOWC ((UCHAR) *n), wt))
                       goto matched;
 #endif
                     c = *p++;
@@ -309,7 +318,12 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 #ifdef _LIBC
                 else if (c == L_('[') && *p == L_('='))
                   {
-                    UCHAR str[1];
+                    /* It's important that STR be a scalar variable rather
+                       than a one-element array, because GCC (at least 4.9.2
+                       -O2 on x86-64) can be confused by the array and
+                       diagnose a "used initialized" in a dead branch in the
+                       findidx function.  */
+                    UCHAR str;
                     uint32_t nrules =
                       _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
                     const CHAR *startp = p;
@@ -321,7 +335,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                         c = L_('[');
                         goto normal_bracket;
                       }
-                    str[0] = c;
+                    str = c;
 
                     c = *++p;
                     if (c != L_('=') || p[1] != L_(']'))
@@ -334,7 +348,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
                     if (nrules == 0)
                       {
-                        if ((UCHAR) *n == str[0])
+                        if ((UCHAR) *n == str)
                           goto matched;
                       }
                     else
@@ -342,28 +356,21 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                         const int32_t *table;
 # if WIDE_CHAR_VERSION
                         const int32_t *weights;
-                        const int32_t *extra;
+                        const wint_t *extra;
 # else
                         const unsigned char *weights;
                         const unsigned char *extra;
 # endif
                         const int32_t *indirect;
                         int32_t idx;
-                        const UCHAR *cp = (const UCHAR *) str;
-
-                        /* This #include defines a local function!  */
-# if WIDE_CHAR_VERSION
-#  include <locale/weightwc.h>
-# else
-#  include <locale/weight.h>
-# endif
+                        const UCHAR *cp = (const UCHAR *) &str;
 
 # if WIDE_CHAR_VERSION
                         table = (const int32_t *)
                           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
                         weights = (const int32_t *)
                           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
-                        extra = (const int32_t *)
+                        extra = (const wint_t *)
                           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
                         indirect = (const int32_t *)
                           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
@@ -378,7 +385,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                           _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
 # endif
 
-                        idx = findidx (&cp);
+                        idx = FINDIDX (table, indirect, extra, &cp, 1);
                         if (idx != 0)
                           {
                             /* We found a table entry.  Now see whether the
@@ -388,7 +395,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                             int32_t idx2;
                             const UCHAR *np = (const UCHAR *) n;
 
-                            idx2 = findidx (&np);
+                            idx2 = FINDIDX (table, indirect, extra,
+                                            &np, string_end - n);
                             if (idx2 != 0
                                 && (idx >> 24) == (idx2 >> 24)
                                 && len == weights[idx2 & 0xffffff])
@@ -422,6 +430,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                   }
                 else
                   {
+                    bool is_range = false;
+
 #ifdef _LIBC
                     bool is_seqval = false;
 
@@ -468,25 +478,11 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                           {
                             int32_t table_size;
                             const int32_t *symb_table;
-# ifdef WIDE_CHAR_VERSION
-                            char str[c1];
-                            size_t strcnt;
-# else
-#  define str (startp + 1)
-# endif
                             const unsigned char *extra;
                             int32_t idx;
                             int32_t elem;
-                            int32_t second;
-                            int32_t hash;
-
-# ifdef WIDE_CHAR_VERSION
-                            /* We have to convert the name to a single-byte
-                               string.  This is possible since the names
-                               consist of ASCII characters and the internal
-                               representation is UCS4.  */
-                            for (strcnt = 0; strcnt < c1; ++strcnt)
-                              str[strcnt] = startp[1 + strcnt];
+# if WIDE_CHAR_VERSION
+                            CHAR *wextra;
 # endif
 
                             table_size =
@@ -499,81 +495,65 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                               _NL_CURRENT (LC_COLLATE,
                                            _NL_COLLATE_SYMB_EXTRAMB);
 
-                            /* Locate the character in the hashing table.  */
-                            hash = elem_hash (str, c1);
-
-                            idx = 0;
-                            elem = hash % table_size;
-                            if (symb_table[2 * elem] != 0)
-                              {
-                                second = hash % (table_size - 2) + 1;
-
-                                do
-                                  {
-                                    /* First compare the hashing value.  */
-                                    if (symb_table[2 * elem] == hash
-                                        && (c1
-                                            == extra[symb_table[2 * elem + 1]])
-                                        && memcmp (str,
-                                                   &extra[symb_table[2 * elem
-                                                                     + 1]
-                                                          + 1], c1) == 0)
-                                      {
-                                        /* Yep, this is the entry.  */
-                                        idx = symb_table[2 * elem + 1];
-                                        idx += 1 + extra[idx];
-                                        break;
-                                      }
-
-                                    /* Next entry.  */
-                                    elem += second;
-                                  }
-                                while (symb_table[2 * elem] != 0);
-                              }
+                            for (elem = 0; elem < table_size; elem++)
+                              if (symb_table[2 * elem] != 0)
+                                {
+                                  idx = symb_table[2 * elem + 1];
+                                  /* Skip the name of collating element.  */
+                                  idx += 1 + extra[idx];
+# if WIDE_CHAR_VERSION
+                                  /* Skip the byte sequence of the
+                                     collating element.  */
+                                  idx += 1 + extra[idx];
+                                  /* Adjust for the alignment.  */
+                                  idx = (idx + 3) & ~3;
+
+                                  wextra = (CHAR *) &extra[idx + 4];
+
+                                  if (/* Compare the length of the sequence.  */
+                                      c1 == wextra[0]
+                                      /* Compare the wide char sequence.  */
+                                      && (__wmemcmp (startp + 1, &wextra[1],
+                                                     c1)
+                                          == 0))
+                                    /* Yep, this is the entry.  */
+                                    break;
+# else
+                                  if (/* Compare the length of the sequence.  */
+                                      c1 == extra[idx]
+                                      /* Compare the byte sequence.  */
+                                      && memcmp (startp + 1,
+                                                 &extra[idx + 1], c1) == 0)
+                                    /* Yep, this is the entry.  */
+                                    break;
+# endif
+                                }
 
-                            if (symb_table[2 * elem] != 0)
+                            if (elem < table_size)
                               {
                                 /* Compare the byte sequence but only if
                                    this is not part of a range.  */
-# ifdef WIDE_CHAR_VERSION
-                                int32_t *wextra;
+                                if (! is_range
 
-                                idx += 1 + extra[idx];
-                                /* Adjust for the alignment.  */
-                                idx = (idx + 3) & ~3;
-
-                                wextra = (int32_t *) &extra[idx + 4];
-# endif
-
-                                if (! is_range)
-                                  {
-# ifdef WIDE_CHAR_VERSION
-                                    for (c1 = 0;
-                                         (int32_t) c1 < wextra[idx];
-                                         ++c1)
-                                      if (n[c1] != wextra[1 + c1])
-                                        break;
-
-                                    if ((int32_t) c1 == wextra[idx])
-                                      goto matched;
+# if WIDE_CHAR_VERSION
+                                    && __wmemcmp (n, &wextra[1], c1) == 0
 # else
-                                    for (c1 = 0; c1 < extra[idx]; ++c1)
-                                      if (n[c1] != extra[1 + c1])
-                                        break;
-
-                                    if (c1 == extra[idx])
-                                      goto matched;
+                                    && memcmp (n, &extra[idx + 1], c1) == 0
 # endif
+                                    )
+                                  {
+                                    n += c1 - 1;
+                                    goto matched;
                                   }
 
                                 /* Get the collation sequence value.  */
                                 is_seqval = true;
-# ifdef WIDE_CHAR_VERSION
-                                cold = wextra[1 + wextra[idx]];
+# if WIDE_CHAR_VERSION
+                                cold = wextra[1 + wextra[0]];
 # else
-                                /* Adjust for the alignment.  */
                                 idx += 1 + extra[idx];
-                                idx = (idx + 3) & ~4;
+                                /* Adjust for the alignment.  */
+                                idx = (idx + 3) & ~3;
                                 cold = *((int32_t *) &extra[idx]);
 # endif
 
@@ -583,10 +563,10 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                               {
                                 /* No valid character.  Match it as a
                                    single byte.  */
-                                if (!is_range && *n == str[0])
+                                if (!is_range && *n == startp[1])
                                   goto matched;
 
-                                cold = str[0];
+                                cold = startp[1];
                                 c = *p++;
                               }
                             else
@@ -594,7 +574,6 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                           }
                       }
                     else
-# undef str
 #endif
                       {
                         c = FOLD (c);
@@ -614,7 +593,6 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                            outside of is_seqval's scope.  */
                         is_seqval = false;
 #endif
-
                         cold = c;
                         c = *p++;
                       }
@@ -634,7 +612,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                         uint32_t lcollseq;
                         UCHAR cend = *p++;
 
-# ifdef WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION
                         /* Search in the 'names' array for the characters.  */
                         fcollseq = __collseq_table_lookup (collseq, fn);
                         if (fcollseq == ~((uint32_t) 0))
@@ -689,25 +667,11 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                               {
                                 int32_t table_size;
                                 const int32_t *symb_table;
-# ifdef WIDE_CHAR_VERSION
-                                char str[c1];
-                                size_t strcnt;
-# else
-#  define str (startp + 1)
-# endif
                                 const unsigned char *extra;
                                 int32_t idx;
                                 int32_t elem;
-                                int32_t second;
-                                int32_t hash;
-
-# ifdef WIDE_CHAR_VERSION
-                                /* We have to convert the name to a single-byte
-                                   string.  This is possible since the names
-                                   consist of ASCII characters and the internal
-                                   representation is UCS4.  */
-                                for (strcnt = 0; strcnt < c1; ++strcnt)
-                                  str[strcnt] = startp[1 + strcnt];
+# if WIDE_CHAR_VERSION
+                                CHAR *wextra;
 # endif
 
                                 table_size =
@@ -720,71 +684,64 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                   _NL_CURRENT (LC_COLLATE,
                                                _NL_COLLATE_SYMB_EXTRAMB);
 
-                                /* Locate the character in the hashing
-                                   table.  */
-                                hash = elem_hash (str, c1);
-
-                                idx = 0;
-                                elem = hash % table_size;
-                                if (symb_table[2 * elem] != 0)
-                                  {
-                                    second = hash % (table_size - 2) + 1;
-
-                                    do
-                                      {
-                                        /* First compare the hashing value.  */
-                                        if (symb_table[2 * elem] == hash
-                                            && (c1
-                                                == extra[symb_table[2 * elem + 1]])
-                                            && memcmp (str,
-                                                       &extra[symb_table[2 * elem + 1]
-                                                              + 1], c1) == 0)
-                                          {
-                                            /* Yep, this is the entry.  */
-                                            idx = symb_table[2 * elem + 1];
-                                            idx += 1 + extra[idx];
-                                            break;
-                                          }
-
-                                        /* Next entry.  */
-                                        elem += second;
-                                      }
-                                    while (symb_table[2 * elem] != 0);
-                                  }
+                                for (elem = 0; elem < table_size; elem++)
+                                  if (symb_table[2 * elem] != 0)
+                                    {
+                                      idx = symb_table[2 * elem + 1];
+                                      /* Skip the name of collating
+                                         element.  */
+                                      idx += 1 + extra[idx];
+# if WIDE_CHAR_VERSION
+                                      /* Skip the byte sequence of the
+                                         collating element.  */
+                                      idx += 1 + extra[idx];
+                                      /* Adjust for the alignment.  */
+                                      idx = (idx + 3) & ~3;
+
+                                      wextra = (CHAR *) &extra[idx + 4];
+
+                                      if (/* Compare the length of the
+                                             sequence.  */
+                                          c1 == wextra[0]
+                                          /* Compare the wide char sequence.  */
+                                          && (__wmemcmp (startp + 1,
+                                                         &wextra[1], c1)
+                                              == 0))
+                                        /* Yep, this is the entry.  */
+                                        break;
+# else
+                                      if (/* Compare the length of the
+                                             sequence.  */
+                                          c1 == extra[idx]
+                                          /* Compare the byte sequence.  */
+                                          && memcmp (startp + 1,
+                                                     &extra[idx + 1], c1) == 0)
+                                        /* Yep, this is the entry.  */
+                                        break;
+# endif
+                                    }
 
-                                if (symb_table[2 * elem] != 0)
+                                if (elem < table_size)
                                   {
-                                    /* Compare the byte sequence but only if
-                                       this is not part of a range.  */
-# ifdef WIDE_CHAR_VERSION
-                                    int32_t *wextra;
-
-                                    idx += 1 + extra[idx];
-                                    /* Adjust for the alignment.  */
-                                    idx = (idx + 3) & ~4;
-
-                                    wextra = (int32_t *) &extra[idx + 4];
-# endif
                                     /* Get the collation sequence value.  */
                                     is_seqval = true;
-# ifdef WIDE_CHAR_VERSION
-                                    cend = wextra[1 + wextra[idx]];
+# if WIDE_CHAR_VERSION
+                                    cend = wextra[1 + wextra[0]];
 # else
-                                    /* Adjust for the alignment.  */
                                     idx += 1 + extra[idx];
-                                    idx = (idx + 3) & ~4;
+                                    /* Adjust for the alignment.  */
+                                    idx = (idx + 3) & ~3;
                                     cend = *((int32_t *) &extra[idx]);
 # endif
                                   }
-                                else if (symb_table[2 * elem] != 0 && c1 == 1)
+                                else if (c1 == 1)
                                   {
-                                    cend = str[0];
+                                    cend = startp[1];
                                     c = *p++;
                                   }
                                 else
                                   return FNM_NOMATCH;
                               }
-# undef str
                           }
                         else
                           {
@@ -799,7 +756,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                            characters which are not mentioned in the
                            collation specification.  */
                         if (
-# ifdef WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION
                             lcollseq == 0xffffffff ||
 # endif
                             lcollseq <= fcollseq)
@@ -811,7 +768,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                               hcollseq = cend;
                             else
                               {
-# ifdef WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION
                                 hcollseq =
                                   __collseq_table_lookup (collseq, cend);
                                 if (hcollseq == ~((uint32_t) 0))
@@ -832,7 +789,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                             if (lcollseq <= hcollseq && fcollseq <= hcollseq)
                               goto matched;
                           }
-# ifdef WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION
                       range_not_matched:
 # endif
 #else
@@ -848,7 +805,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                           return FNM_NOMATCH;
 
                         /* It is a range.  */
-                        if (cold <= fn && fn <= cend)
+                        if ((UCHAR) cold <= fn && fn <= cend)
                           goto matched;
 #endif
 
@@ -866,11 +823,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
           matched:
             /* Skip the rest of the [...] that already matched.  */
-            do
+            while ((c = *p++) != L_(']'))
               {
-              ignore_next:
-                c = *p++;
-
                 if (c == L_('\0'))
                   /* [... (unterminated) loses.  */
                   return FNM_NOMATCH;
@@ -898,12 +852,11 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
                         if (c < L_('a') || c >= L_('z'))
                           {
-                            p = startp;
-                            goto ignore_next;
+                            p = startp - 2;
+                            break;
                           }
                       }
                     p += 2;
-                    c = *p++;
                   }
                 else if (c == L_('[') && *p == L_('='))
                   {
@@ -914,25 +867,21 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                     if (c != L_('=') || p[1] != L_(']'))
                       return FNM_NOMATCH;
                     p += 2;
-                    c = *p++;
                   }
                 else if (c == L_('[') && *p == L_('.'))
                   {
-                    ++p;
                     while (1)
                       {
                         c = *++p;
-                        if (c == '\0')
+                        if (c == L_('\0'))
                           return FNM_NOMATCH;
 
-                        if (*p == L_('.') && p[1] == L_(']'))
+                        if (c == L_('.') && p[1] == L_(']'))
                           break;
                       }
                     p += 2;
-                    c = *p++;
                   }
               }
-            while (c != L_(']'));
             if (not)
               return FNM_NOMATCH;
           }
@@ -941,11 +890,10 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
         case L_('+'):
         case L_('@'):
         case L_('!'):
-          if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(')
+          if (__glibc_unlikely (flags & FNM_EXTMATCH) && *p == '(')
             {
-              int res;
-
-              res = EXT (c, p, n, string_end, no_leading_period, flags);
+              int res = EXT (c, p, n, string_end, no_leading_period, flags,
+                             alloca_used);
               if (res != -1)
                 return res;
             }
@@ -983,7 +931,6 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
 
 static const CHAR *
-internal_function
 END (const CHAR *pattern)
 {
   const CHAR *p = pattern;
@@ -1013,7 +960,12 @@ END (const CHAR *pattern)
       }
     else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
               || *p == L_('!')) && p[1] == L_('('))
-      p = END (p + 1);
+      {
+        p = END (p + 1);
+        if (*p == L_('\0'))
+          /* This is an invalid pattern.  */
+          return pattern;
+      }
     else if (*p == L_(')'))
       break;
 
@@ -1022,29 +974,33 @@ END (const CHAR *pattern)
 
 
 static int
-internal_function
 EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
-     bool no_leading_period, int flags)
+     bool no_leading_period, int flags, size_t alloca_used)
 {
   const CHAR *startp;
-  size_t level;
+  ptrdiff_t level;
   struct patternlist
   {
     struct patternlist *next;
-    CHAR str[FLEXIBLE_ARRAY_MEMBER];
+    CHAR malloced;
+    CHAR str __flexarr;
   } *list = NULL;
   struct patternlist **lastp = &list;
   size_t pattern_len = STRLEN (pattern);
+  bool any_malloced = false;
   const CHAR *p;
   const CHAR *rs;
-  enum { ALLOCA_LIMIT = 8000 };
+  int retval = 0;
 
   /* Parse the pattern.  Store the individual parts in the list.  */
   level = 0;
-  for (startp = p = pattern + 1; ; ++p)
+  for (startp = p = pattern + 1; level >= 0; ++p)
     if (*p == L_('\0'))
-      /* This is an invalid pattern.  */
-      return -1;
+      {
+        /* This is an invalid pattern.  */
+        retval = -1;
+        goto out;
+      }
     else if (*p == L_('['))
       {
         /* Handle brackets special.  */
@@ -1061,8 +1017,11 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
         /* Skip over all characters of the list.  */
         while (*p != L_(']'))
           if (*p++ == L_('\0'))
-            /* This is no valid pattern.  */
-            return -1;
+            {
+              /* This is no valid pattern.  */
+              retval = -1;
+              goto out;
+            }
       }
     else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@')
               || *p == L_('!')) && p[1] == L_('('))
@@ -1075,26 +1034,37 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             /* This means we found the end of the pattern.  */
 #define NEW_PATTERN \
             struct patternlist *newp;                                         \
-            size_t plen;                                                      \
-            size_t plensize;                                                  \
-            size_t newpsize;                                                  \
-                                                                              \
-            plen = (opt == L_('?') || opt == L_('@')                          \
-                    ? pattern_len                                             \
-                    : p - startp + 1UL);                                      \
-            plensize = plen * sizeof (CHAR);                                  \
-            newpsize = FLEXSIZEOF (struct patternlist, str, plensize);        \
-            if ((size_t) -1 / sizeof (CHAR) < plen                            \
-                || newpsize < offsetof (struct patternlist, str)              \
-                || ALLOCA_LIMIT <= newpsize)                                  \
-              return -1;                                                      \
-            newp = (struct patternlist *) alloca (newpsize);                  \
-            *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0');    \
+            size_t plen = (opt == L_('?') || opt == L_('@')                   \
+                           ? pattern_len : (p - startp + 1UL));               \
+            idx_t slen = FLEXSIZEOF (struct patternlist, str, 0);             \
+            idx_t new_used = alloca_used + slen;                              \
+            idx_t plensize;                                                   \
+            if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize)           \
+                || INT_ADD_WRAPV (new_used, plensize, &new_used))             \
+              {                                                               \
+                retval = -2;                                                  \
+                goto out;                                                     \
+              }                                                               \
+            slen += plensize;                                                 \
+            bool malloced = ! __libc_use_alloca (new_used);                   \
+            if (__glibc_unlikely (malloced))                                  \
+              {                                                               \
+                newp = malloc (slen);                                         \
+                if (newp == NULL)                                             \
+                  {                                                           \
+                    retval = -2;                                              \
+                    goto out;                                                 \
+                  }                                                           \
+                any_malloced = true;                                          \
+              }                                                               \
+            else                                                              \
+              newp = alloca_account (slen, alloca_used);                      \
             newp->next = NULL;                                                \
+            newp->malloced = malloced;                                        \
+            *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0');   \
             *lastp = newp;                                                    \
             lastp = &newp->next
             NEW_PATTERN;
-            break;
           }
       }
     else if (*p == L_('|'))
@@ -1112,8 +1082,9 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
   switch (opt)
     {
     case L_('*'):
-      if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-        return 0;
+      if (FCT (p, string, string_end, no_leading_period, flags, NULL,
+               alloca_used) == 0)
+        goto success;
       FALLTHROUGH;
     case L_('+'):
       do
@@ -1122,7 +1093,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
             /* First match the prefix with the current pattern with the
                current pattern.  */
             if (FCT (list->str, string, rs, no_leading_period,
-                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0
+                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
+                     NULL, alloca_used) == 0
                 /* This was successful.  Now match the rest with the rest
                    of the pattern.  */
                 && (FCT (p, rs, string_end,
@@ -1130,7 +1102,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                          ? no_leading_period
                          : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
                          flags & FNM_FILE_NAME
-                         ? flags : flags & ~FNM_PERIOD) == 0
+                         ? flags : flags & ~FNM_PERIOD, NULL, alloca_used) == 0
                     /* This didn't work.  Try the whole pattern.  */
                     || (rs != string
                         && FCT (pattern - 1, rs, string_end,
@@ -1138,18 +1110,21 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                                 ? no_leading_period
                                 : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
                                 flags & FNM_FILE_NAME
-                                ? flags : flags & ~FNM_PERIOD) == 0)))
+                                ? flags : flags & ~FNM_PERIOD, NULL,
+                                alloca_used) == 0)))
               /* It worked.  Signal success.  */
-              return 0;
+              goto success;
         }
       while ((list = list->next) != NULL);
 
       /* None of the patterns lead to a match.  */
-      return FNM_NOMATCH;
+      retval = FNM_NOMATCH;
+      break;
 
     case L_('?'):
-      if (FCT (p, string, string_end, no_leading_period, flags) == 0)
-        return 0;
+      if (FCT (p, string, string_end, no_leading_period, flags, NULL,
+               alloca_used) == 0)
+        goto success;
       FALLTHROUGH;
     case L_('@'):
       do
@@ -1159,13 +1134,15 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
            pattern list.  */
         if (FCT (STRCAT (list->str, p), string, string_end,
                  no_leading_period,
-                 flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+                 flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
+                 NULL, alloca_used) == 0)
           /* It worked.  Signal success.  */
-          return 0;
+          goto success;
       while ((list = list->next) != NULL);
 
       /* None of the patterns lead to a match.  */
-      return FNM_NOMATCH;
+      retval = FNM_NOMATCH;
+      break;
 
     case L_('!'):
       for (rs = string; rs <= string_end; ++rs)
@@ -1174,7 +1151,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 
           for (runp = list; runp != NULL; runp = runp->next)
             if (FCT (runp->str, string, rs,  no_leading_period,
-                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0)
+                     flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
+                     NULL, alloca_used) == 0)
               break;
 
           /* If none of the patterns matched see whether the rest does.  */
@@ -1183,22 +1161,35 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
                        rs == string
                        ? no_leading_period
                        : rs[-1] == '/' && NO_LEADING_PERIOD (flags),
-                       flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD)
-                  == 0))
+                       flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD,
+                       NULL, alloca_used) == 0))
             /* This is successful.  */
-            return 0;
+            goto success;
         }
 
       /* None of the patterns together with the rest of the pattern
          lead to a match.  */
-      return FNM_NOMATCH;
+      retval = FNM_NOMATCH;
+      break;
 
     default:
       assert (! "Invalid extended matching operator");
+      retval = -1;
       break;
     }
 
-  return -1;
+ success:
+ out:
+  if (any_malloced)
+    while (list != NULL)
+      {
+        struct patternlist *old = list;
+        list = list->next;
+        if (old->malloced)
+          free (old);
+      }
+
+  return retval;
 }
 
 
@@ -1209,9 +1200,12 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
 #undef FCT
 #undef EXT
 #undef END
+#undef STRUCT
 #undef MEMPCPY
 #undef MEMCHR
 #undef STRLEN
 #undef STRCAT
 #undef L_
 #undef BTOWC
+#undef WIDE_CHAR_VERSION
+#undef FINDIDX
diff --git a/lib/fopen.c b/lib/fopen.c
new file mode 100644 (file)
index 0000000..cebcdac
--- /dev/null
@@ -0,0 +1,230 @@
+/* Open a stream to a file.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+
+/* If the user's config.h happens to include <stdio.h>, let it include only
+   the system's <stdio.h> here, so that orig_fopen doesn't recurse to
+   rpl_fopen.  */
+#define _GL_ALREADY_INCLUDING_STDIO_H
+#include <config.h>
+
+/* Get the original definition of fopen.  It might be defined as a macro.  */
+#include <stdio.h>
+#undef _GL_ALREADY_INCLUDING_STDIO_H
+
+static FILE *
+orig_fopen (const char *filename, const char *mode)
+{
+  return fopen (filename, mode);
+}
+
+/* Specification.  */
+/* Write "stdio.h" here, not <stdio.h>, otherwise OSF/1 5.1 DTK cc eliminates
+   this include because of the preliminary #include <stdio.h> above.  */
+#include "stdio.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+FILE *
+rpl_fopen (const char *filename, const char *mode)
+{
+  int open_direction;
+  int open_flags;
+#if GNULIB_FOPEN_GNU
+  bool open_flags_gnu;
+# define BUF_SIZE 80
+  char fdopen_mode_buf[BUF_SIZE + 1];
+#endif
+
+#if defined _WIN32 && ! defined __CYGWIN__
+  if (strcmp (filename, "/dev/null") == 0)
+    filename = "NUL";
+#endif
+
+  /* Parse the mode.  */
+  open_direction = 0;
+  open_flags = 0;
+#if GNULIB_FOPEN_GNU
+  open_flags_gnu = false;
+#endif
+  {
+    const char *p = mode;
+#if GNULIB_FOPEN_GNU
+    char *q = fdopen_mode_buf;
+#endif
+
+    for (; *p != '\0'; p++)
+      {
+        switch (*p)
+          {
+          case 'r':
+            open_direction = O_RDONLY;
+#if GNULIB_FOPEN_GNU
+            if (q < fdopen_mode_buf + BUF_SIZE)
+              *q++ = *p;
+#endif
+            continue;
+          case 'w':
+            open_direction = O_WRONLY;
+            open_flags |= O_CREAT | O_TRUNC;
+#if GNULIB_FOPEN_GNU
+            if (q < fdopen_mode_buf + BUF_SIZE)
+              *q++ = *p;
+#endif
+            continue;
+          case 'a':
+            open_direction = O_WRONLY;
+            open_flags |= O_CREAT | O_APPEND;
+#if GNULIB_FOPEN_GNU
+            if (q < fdopen_mode_buf + BUF_SIZE)
+              *q++ = *p;
+#endif
+            continue;
+          case 'b':
+            /* While it is non-standard, O_BINARY is guaranteed by
+               gnulib <fcntl.h>.  We can also assume that orig_fopen
+               supports the 'b' flag.  */
+            open_flags |= O_BINARY;
+#if GNULIB_FOPEN_GNU
+            if (q < fdopen_mode_buf + BUF_SIZE)
+              *q++ = *p;
+#endif
+            continue;
+          case '+':
+            open_direction = O_RDWR;
+#if GNULIB_FOPEN_GNU
+            if (q < fdopen_mode_buf + BUF_SIZE)
+              *q++ = *p;
+#endif
+            continue;
+#if GNULIB_FOPEN_GNU
+          case 'x':
+            open_flags |= O_EXCL;
+            open_flags_gnu = true;
+            continue;
+          case 'e':
+            open_flags |= O_CLOEXEC;
+            open_flags_gnu = true;
+            continue;
+#endif
+          default:
+            break;
+          }
+#if GNULIB_FOPEN_GNU
+        /* The rest of the mode string can be a platform-dependent extension.
+           Copy it unmodified.  */
+        {
+          size_t len = strlen (p);
+          if (len > fdopen_mode_buf + BUF_SIZE - q)
+            len = fdopen_mode_buf + BUF_SIZE - q;
+          memcpy (q, p, len);
+          q += len;
+        }
+#endif
+        break;
+      }
+#if GNULIB_FOPEN_GNU
+    *q = '\0';
+#endif
+  }
+
+#if FOPEN_TRAILING_SLASH_BUG
+  /* Fail if the mode requires write access and the filename ends in a slash,
+     as POSIX says such a filename must name a directory
+     <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>:
+       "A pathname that contains at least one non-<slash> character and that
+        ends with one or more trailing <slash> characters shall not be resolved
+        successfully unless the last pathname component before the trailing
+        <slash> characters names an existing directory"
+     If the named file already exists as a directory, then if a mode that
+     requires write access is specified, fopen() must fail because POSIX
+     <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html>
+     says that it fails with errno = EISDIR in this case.
+     If the named file does not exist or does not name a directory, then
+     fopen() must fail since the file does not contain a '.' directory.  */
+  {
+    size_t len = strlen (filename);
+    if (len > 0 && filename[len - 1] == '/')
+      {
+        int fd;
+        struct stat statbuf;
+        FILE *fp;
+
+        if (open_direction != O_RDONLY)
+          {
+            errno = EISDIR;
+            return NULL;
+          }
+
+        fd = open (filename, open_direction | open_flags,
+                   S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+        if (fd < 0)
+          return NULL;
+
+        if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+          {
+            close (fd);
+            errno = ENOTDIR;
+            return NULL;
+          }
+
+# if GNULIB_FOPEN_GNU
+        fp = fdopen (fd, fdopen_mode_buf);
+# else
+        fp = fdopen (fd, mode);
+# endif
+        if (fp == NULL)
+          {
+            int saved_errno = errno;
+            close (fd);
+            errno = saved_errno;
+          }
+        return fp;
+      }
+  }
+#endif
+
+#if GNULIB_FOPEN_GNU
+  if (open_flags_gnu)
+    {
+      int fd;
+      FILE *fp;
+
+      fd = open (filename, open_direction | open_flags,
+                 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+      if (fd < 0)
+        return NULL;
+
+      fp = fdopen (fd, fdopen_mode_buf);
+      if (fp == NULL)
+        {
+          int saved_errno = errno;
+          close (fd);
+          errno = saved_errno;
+        }
+      return fp;
+    }
+#endif
+
+  return orig_fopen (filename, mode);
+}
diff --git a/lib/free.c b/lib/free.c
new file mode 100644 (file)
index 0000000..780f03d
--- /dev/null
@@ -0,0 +1,53 @@
+/* Make free() preserve errno.
+
+   Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Paul Eggert */
+
+#include <config.h>
+
+/* Specification.  */
+#include <stdlib.h>
+
+/* A function definition is only needed if HAVE_FREE_POSIX is not defined.  */
+#if !HAVE_FREE_POSIX
+
+# include <errno.h>
+
+void
+rpl_free (void *p)
+# undef free
+{
+# if defined __GNUC__ && !defined __clang__
+  /* An invalid GCC optimization
+     <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396>
+     would optimize away the assignments in the code below, when link-time
+     optimization (LTO) is enabled.  Make the code more complicated, so that
+     GCC does not grok how to optimize it.  */
+  int err[2];
+  err[0] = errno;
+  err[1] = errno;
+  errno = 0;
+  free (p);
+  errno = err[errno == 0];
+# else
+  int err = errno;
+  free (p);
+  errno = err;
+# endif
+}
+
+#endif
diff --git a/lib/freopen-safer.c b/lib/freopen-safer.c
deleted file mode 100644 (file)
index 79cc862..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Invoke freopen, but avoid some glitches.
-
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Eric Blake.  */
-
-#include <config.h>
-
-#include "stdio-safer.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdbool.h>
-#include <unistd.h>
-
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
-#endif
-
-/* Guarantee that FD is open; all smaller FDs must already be open.
-   Return true if successful.  */
-static bool
-protect_fd (int fd)
-{
-  int value = open ("/dev/null", O_RDONLY);
-  if (value != fd)
-    {
-      if (0 <= value)
-        {
-          close (value);
-          errno = EBADF; /* Unexpected; this is as good as anything else.  */
-        }
-      return false;
-    }
-  return true;
-}
-
-/* Like freopen, but guarantee that reopening stdin, stdout, or stderr
-   preserves the invariant that STDxxx_FILENO==fileno(stdxxx), and
-   that no other stream will interfere with the standard streams.
-   This is necessary because most freopen implementations will change
-   the associated fd of a stream to the lowest available slot.  */
-
-FILE *
-freopen_safer (char const *name, char const *mode, FILE *f)
-{
-  /* Unfortunately, we cannot use the fopen_safer approach of using
-     fdopen (dup_safer (fileno (freopen (cmd, mode, f)))), because we
-     need to return f itself.  The implementation of freopen(NULL,m,f)
-     is system-dependent, so the best we can do is guarantee that all
-     lower-valued standard fds are open prior to the freopen call,
-     even though this puts more pressure on open fds.  */
-  bool protect_in = false;
-  bool protect_out = false;
-  bool protect_err = false;
-  int saved_errno;
-
-  switch (fileno (f))
-    {
-    default: /* -1 or not a standard stream.  */
-      if (dup2 (STDERR_FILENO, STDERR_FILENO) != STDERR_FILENO)
-        protect_err = true;
-      FALLTHROUGH;
-    case STDERR_FILENO:
-      if (dup2 (STDOUT_FILENO, STDOUT_FILENO) != STDOUT_FILENO)
-        protect_out = true;
-      FALLTHROUGH;
-    case STDOUT_FILENO:
-      if (dup2 (STDIN_FILENO, STDIN_FILENO) != STDIN_FILENO)
-        protect_in = true;
-      FALLTHROUGH;
-    case STDIN_FILENO:
-      /* Nothing left to protect.  */
-      break;
-    }
-  if (protect_in && !protect_fd (STDIN_FILENO))
-    f = NULL;
-  else if (protect_out && !protect_fd (STDOUT_FILENO))
-    f = NULL;
-  else if (protect_err && !protect_fd (STDERR_FILENO))
-    f = NULL;
-  else
-    f = freopen (name, mode, f);
-  saved_errno = errno;
-  if (protect_err)
-    close (STDERR_FILENO);
-  if (protect_out)
-    close (STDOUT_FILENO);
-  if (protect_in)
-    close (STDIN_FILENO);
-  if (!f)
-    errno = saved_errno;
-  return f;
-}
index 4111c24..845df85 100644 (file)
@@ -1,17 +1,17 @@
 /* Open a stream to a file.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
index 41ee761..512c688 100644 (file)
@@ -1,17 +1,17 @@
 /* fstat() replacement.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* If the user's config.h happens to include <sys/stat.h>, let it include only
@@ -40,10 +40,14 @@ orig_fstat (int fd, struct stat *buf)
 #endif
 
 /* Specification.  */
+#ifdef __osf__
 /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
    eliminates this include because of the preliminary #include <sys/stat.h>
    above.  */
-#include "sys/stat.h"
+# include "sys/stat.h"
+#else
+# include <sys/stat.h>
+#endif
 
 #include "stat-time.h"
 
index ac05bc4..5006c2d 100644 (file)
@@ -1,18 +1,18 @@
 /* getdtablesize() function: Return maximum possible file descriptor value + 1.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 12b5a87..33e3d4b 100644 (file)
@@ -1,22 +1,21 @@
 /* getopt-on-non-glibc compatibility macros.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
 
-   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 the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This file is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with gnulib; if not, see
-   <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GETOPT_CDEFS_H
 #define _GETOPT_CDEFS_H 1
@@ -57,7 +56,7 @@
 #endif
 
 #ifndef __THROW
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major__ >= 4)
 #  define __THROW       throw ()
 # else
 #  define __THROW
index e51b6c7..ceb14d0 100644 (file)
@@ -1,19 +1,19 @@
 /* Declarations for getopt (basic, portable features only).
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
index cb41206..f82a8c6 100644 (file)
@@ -1,19 +1,19 @@
 /* Declarations for getopt (GNU extensions).
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
index c62f9e2..b1733a3 100644 (file)
@@ -1,22 +1,21 @@
 /* getopt (basic, portable features) gnulib wrapper header.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
 
-   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 the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This file is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with gnulib; if not, see
-   <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GETOPT_PFX_CORE_H
 #define _GETOPT_PFX_CORE_H 1
 # define optind __GETOPT_ID (optind)
 # define optopt __GETOPT_ID (optopt)
 
+/* Work around a a problem on macOS, which declares getopt with a
+   trailing __DARWIN_ALIAS(getopt) that would expand to something like
+   __asm("_" "rpl_getopt" "$UNIX2003") were it not for the following
+   hack to suppress the macOS declaration <https://bugs.gnu.org/40205>.  */
+# ifdef __APPLE__
+#  define _GETOPT
+# endif
+
 /* The system's getopt.h may have already included getopt-core.h to
    declare the unprefixed identifiers.  Undef _GETOPT_CORE_H so that
    getopt-core.h declares them with prefixes.  */
index 753f129..b9a14ba 100644 (file)
@@ -1,22 +1,21 @@
 /* getopt (GNU extensions) gnulib wrapper header.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library.
 
-   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 the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This file is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with gnulib; if not, see
-   <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GETOPT_PFX_EXT_H
 #define _GETOPT_PFX_EXT_H 1
index 11e36ee..b106989 100644 (file)
@@ -1,19 +1,19 @@
 /* Getopt for GNU.
-   Copyright (C) 1987-2018 Free Software Foundation, Inc.
+   Copyright (C) 1987-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 \f
index 5fb58dd..bf884f0 100644 (file)
@@ -1,22 +1,22 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of gnulib.
    Unlike most of the getopt implementation, it is NOT shared
    with the GNU C Library, which supplies a different version of
    this file.
 
-   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 the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This file is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with gnulib; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_GETOPT_H
 
index 9c7fff4..5a92806 100644 (file)
@@ -1,19 +1,19 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987-2018 Free Software Foundation, Inc.
+   Copyright (C) 1987-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 \f
index b0e9a6d..91254e4 100644 (file)
@@ -1,19 +1,19 @@
 /* Internal declarations for getopt.
-   Copyright (C) 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1989-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library and is also part of gnulib.
    Patches to this file should be submitted to both projects.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
similarity index 57%
rename from gnulib-tests/getpagesize.c
rename to lib/getpagesize.c
index 9e79ed6..b7493ec 100644 (file)
@@ -1,18 +1,18 @@
 /* getpagesize emulation for systems where it cannot be done in a C macro.
 
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible and Martin Lambers.  */
index 58da144..9a80281 100644 (file)
@@ -1,17 +1,17 @@
 /* Program name management.
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -43,7 +43,7 @@
 # include <string.h>
 #endif
 
-#ifdef __sgi
+#if defined __sgi || defined __osf__
 # include <string.h>
 # include <unistd.h>
 # include <stdio.h>
 # include <sys/procfs.h>
 #endif
 
-#include "dirname.h"
+#if defined __SCO_VERSION__ || defined __sysv5__
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+#endif
+
+#include "basename-lgpl.h"
 
 #ifndef HAVE_GETPROGNAME             /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
 char const *
@@ -70,10 +76,10 @@ getprogname (void)
     p = "?";
   return last_component (p);
 # elif HAVE_DECL___ARGV                                     /* mingw, MSVC */
-  /* https://msdn.microsoft.com/en-us/library/dn727674.aspx */
+  /* https://docs.microsoft.com/en-us/cpp/c-runtime-library/argc-argv-wargv */
   const char *p = __argv && __argv[0] ? __argv[0] : "?";
   return last_component (p);
-# elif HAVE_VAR___PROGNAME                                  /* OpenBSD, QNX */
+# elif HAVE_VAR___PROGNAME                                  /* OpenBSD, Android, QNX */
   /* https://man.openbsd.org/style.9 */
   /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */
   /* Be careful to declare this only when we absolutely need it
@@ -82,7 +88,11 @@ getprogname (void)
      malfunction (have zero length) with Fedora 25's glibc.  */
   extern char *__progname;
   const char *p = __progname;
+#  if defined __ANDROID__
+  return last_component (p);
+#  else
   return p && p[0] ? p : "?";
+#  endif
 # elif _AIX                                                 /* AIX */
   /* Idea by Bastien ROUCARIÈS,
      https://lists.gnu.org/r/bug-gnulib/2010-12/msg00095.html
@@ -214,12 +224,16 @@ getprogname (void)
       free (buf.ps_pathptr);
     }
   return p;
-# elif defined __sgi                                        /* IRIX */
+# elif defined __sgi || defined __osf__                     /* IRIX or Tru64 */
   char filename[50];
   int fd;
 
-  sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
-  fd = open (filename, O_RDONLY);
+  # if defined __sgi
+    sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
+  # else
+    sprintf (filename, "/proc/%d", (int) getpid ());
+  # endif
+  fd = open (filename, O_RDONLY | O_CLOEXEC);
   if (0 <= fd)
     {
       prpsinfo_t buf;
@@ -229,17 +243,50 @@ getprogname (void)
         {
           char *name = buf.pr_fname;
           size_t namesize = sizeof buf.pr_fname;
+          /* It may not be NUL-terminated.  */
           char *namenul = memchr (name, '\0', namesize);
           size_t namelen = namenul ? namenul - name : namesize;
           char *namecopy = malloc (namelen + 1);
           if (namecopy)
             {
-              namecopy[namelen] = 0;
+              namecopy[namelen] = '\0';
               return memcpy (namecopy, name, namelen);
             }
         }
     }
   return NULL;
+# elif defined __SCO_VERSION__ || defined __sysv5__                /* SCO OpenServer6/UnixWare */
+  char buf[80];
+  int fd;
+  sprintf (buf, "/proc/%d/cmdline", getpid());
+  fd = open (buf, O_RDONLY);
+  if (0 <= fd)
+    {
+      size_t n = read (fd, buf, 79);
+      if (n > 0)
+        {
+          buf[n] = '\0'; /* Guarantee null-termination */
+          char *progname;
+          progname = strrchr (buf, '/');
+          if (progname)
+            {
+              progname = progname + 1; /* Skip the '/' */
+            }
+          else
+            {
+              progname = buf;
+            }
+          char *ret;
+          ret = malloc (strlen (progname) + 1);
+          if (ret)
+            {
+              strcpy (ret, progname);
+              return ret;
+            }
+        }
+      close (fd);
+    }
+  return "?";
 # else
 #  error "getprogname module not ported to this OS"
 # endif
index ee6688f..eb12dcd 100644 (file)
@@ -1,17 +1,17 @@
 /* Program name management.
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
+   it under the terms of the GNU Lesser General Public License as published by
+   the Free Software Foundation; either version 2.1 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_GETPROGNAME_H
diff --git a/lib/getrandom.c b/lib/getrandom.c
new file mode 100644 (file)
index 0000000..a186c4d
--- /dev/null
@@ -0,0 +1,191 @@
+/* Obtain a series of random bytes.
+
+   Copyright 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+#include <config.h>
+
+#include <sys/random.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#if defined _WIN32 && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# if HAVE_BCRYPT_H
+#  include <bcrypt.h>
+# else
+#  define NTSTATUS LONG
+typedef void * BCRYPT_ALG_HANDLE;
+#  define BCRYPT_USE_SYSTEM_PREFERRED_RNG 0x00000002
+#  if HAVE_LIB_BCRYPT
+extern NTSTATUS WINAPI BCryptGenRandom (BCRYPT_ALG_HANDLE, UCHAR *, ULONG, ULONG);
+#  endif
+# endif
+# if !HAVE_LIB_BCRYPT
+#  include <wincrypt.h>
+#  ifndef CRYPT_VERIFY_CONTEXT
+#   define CRYPT_VERIFY_CONTEXT 0xF0000000
+#  endif
+# endif
+#endif
+
+#include "minmax.h"
+
+#if defined _WIN32 && ! defined __CYGWIN__
+
+/* Don't assume that UNICODE is not defined.  */
+# undef LoadLibrary
+# define LoadLibrary LoadLibraryA
+# undef CryptAcquireContext
+# define CryptAcquireContext CryptAcquireContextA
+
+# if !HAVE_LIB_BCRYPT
+
+/* Avoid warnings from gcc -Wcast-function-type.  */
+#  define GetProcAddress \
+    (void *) GetProcAddress
+
+/* BCryptGenRandom with the BCRYPT_USE_SYSTEM_PREFERRED_RNG flag works only
+   starting with Windows 7.  */
+typedef NTSTATUS (WINAPI * BCryptGenRandomFuncType) (BCRYPT_ALG_HANDLE, UCHAR *, ULONG, ULONG);
+static BCryptGenRandomFuncType BCryptGenRandomFunc = NULL;
+static BOOL initialized = FALSE;
+
+static void
+initialize (void)
+{
+  HMODULE bcrypt = LoadLibrary ("bcrypt.dll");
+  if (bcrypt != NULL)
+    {
+      BCryptGenRandomFunc =
+        (BCryptGenRandomFuncType) GetProcAddress (bcrypt, "BCryptGenRandom");
+    }
+  initialized = TRUE;
+}
+
+# else
+
+#  define BCryptGenRandomFunc BCryptGenRandom
+
+# endif
+
+#else
+/* These devices exist on all platforms except native Windows.  */
+
+/* Name of a device through which the kernel returns high quality random
+   numbers, from an entropy pool.  When the pool is empty, the call blocks
+   until entropy sources have added enough bits of entropy.  */
+# ifndef NAME_OF_RANDOM_DEVICE
+#  define NAME_OF_RANDOM_DEVICE "/dev/random"
+# endif
+
+/* Name of a device through which the kernel returns random or pseudo-random
+   numbers.  It uses an entropy pool, but, in order to avoid blocking, adds
+   bits generated by a pseudo-random number generator, as needed.  */
+# ifndef NAME_OF_NONCE_DEVICE
+#  define NAME_OF_NONCE_DEVICE "/dev/urandom"
+# endif
+
+#endif
+
+/* Set BUFFER (of size LENGTH) to random bytes under the control of FLAGS.
+   Return the number of bytes written (> 0).
+   Upon error, return -1 and set errno.  */
+ssize_t
+getrandom (void *buffer, size_t length, unsigned int flags)
+#undef getrandom
+{
+#if defined _WIN32 && ! defined __CYGWIN__
+  /* BCryptGenRandom, defined in <bcrypt.h>
+     <https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom>
+     with the BCRYPT_USE_SYSTEM_PREFERRED_RNG flag
+     works in Windows 7 and newer.  */
+  static int bcrypt_not_working /* = 0 */;
+  if (!bcrypt_not_working)
+    {
+# if !HAVE_LIB_BCRYPT
+      if (!initialized)
+        initialize ();
+# endif
+      if (BCryptGenRandomFunc != NULL
+          && BCryptGenRandomFunc (NULL, buffer, length,
+                                  BCRYPT_USE_SYSTEM_PREFERRED_RNG)
+             == 0 /*STATUS_SUCCESS*/)
+        return length;
+      bcrypt_not_working = 1;
+    }
+# if !HAVE_LIB_BCRYPT
+  /* CryptGenRandom, defined in <wincrypt.h>
+     <https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom>
+     works in older releases as well, but is now deprecated.
+     CryptAcquireContext, defined in <wincrypt.h>
+     <https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta>  */
+  {
+    static int crypt_initialized /* = 0 */;
+    static HCRYPTPROV provider;
+    if (!crypt_initialized)
+      {
+        if (CryptAcquireContext (&provider, NULL, NULL, PROV_RSA_FULL,
+                                 CRYPT_VERIFY_CONTEXT))
+          crypt_initialized = 1;
+        else
+          crypt_initialized = -1;
+      }
+    if (crypt_initialized >= 0)
+      {
+        if (!CryptGenRandom (provider, length, buffer))
+          {
+            errno = EIO;
+            return -1;
+          }
+        return length;
+      }
+  }
+# endif
+  errno = ENOSYS;
+  return -1;
+#elif HAVE_GETRANDOM
+  return getrandom (buffer, length, flags);
+#else
+  static int randfd[2] = { -1, -1 };
+  bool devrandom = (flags & GRND_RANDOM) != 0;
+  int fd = randfd[devrandom];
+
+  if (fd < 0)
+    {
+      static char const randdevice[][MAX (sizeof NAME_OF_NONCE_DEVICE,
+                                          sizeof NAME_OF_RANDOM_DEVICE)]
+        = { NAME_OF_NONCE_DEVICE, NAME_OF_RANDOM_DEVICE };
+      int oflags = (O_RDONLY + O_CLOEXEC
+                    + (flags & GRND_NONBLOCK ? O_NONBLOCK : 0));
+      fd = open (randdevice[devrandom], oflags);
+      if (fd < 0)
+        {
+          if (errno == ENOENT || errno == ENOTDIR)
+            errno = ENOSYS;
+          return -1;
+        }
+      randfd[devrandom] = fd;
+    }
+
+  return read (fd, buffer, length);
+#endif
+}
index 8eef008..f1c7a24 100644 (file)
@@ -1,19 +1,19 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBGETTEXT_H
 #define _LIBGETTEXT_H 1
@@ -184,9 +184,16 @@ npgettext_aux (const char *domain,
 
 #include <string.h>
 
-#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
-     /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc)
-        || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
+/* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported.
+   This relates to the -Wvla and -Wvla-larger-than warnings, enabled in
+   the default GCC many warnings set.  This allows programs to disable use
+   of VLAs, which may be unintended, or may be awkward to support portably,
+   or may have security implications due to non-deterministic stack usage.  */
+
+#if (!defined GNULIB_NO_VLA \
+     && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
+     /*  || (__STDC_VERSION__ == 199901L && !defined __HP_cc)
+         || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ))
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
 #else
 # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
index bb59c44..8f28a32 100644 (file)
@@ -1,18 +1,18 @@
 /* gettime -- get the system clock
 
-   Copyright (C) 2002, 2004-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
index 1bd50fa..2a222fc 100644 (file)
@@ -1,19 +1,19 @@
 /* Provide gettimeofday for systems that don't have it or for which it's broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
 
 # include <windows.h>
 #endif
 
-#include "localtime-buffer.h"
-
 #ifdef WINDOWS_NATIVE
 
+/* Don't assume that UNICODE is not defined.  */
+# undef LoadLibrary
+# define LoadLibrary LoadLibraryA
+
+# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+
 /* Avoid warnings from gcc -Wcast-function-type.  */
-# define GetProcAddress \
-   (void *) GetProcAddress
+#  define GetProcAddress \
+    (void *) GetProcAddress
 
 /* GetSystemTimePreciseAsFileTime was introduced only in Windows 8.  */
 typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
@@ -54,6 +58,12 @@ initialize (void)
   initialized = TRUE;
 }
 
+# else
+
+#  define GetSystemTimePreciseAsFileTimeFunc GetSystemTimePreciseAsFileTime
+
+# endif
+
 #endif
 
 /* This is a wrapper for gettimeofday.  It is used only on systems
@@ -72,10 +82,10 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
 
   /* On native Windows, there are two ways to get the current time:
      GetSystemTimeAsFileTime
-     <https://msdn.microsoft.com/en-us/library/ms724397.aspx>
+     <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime>
      or
      GetSystemTimePreciseAsFileTime
-     <https://msdn.microsoft.com/en-us/library/hh706895.aspx>.
+     <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>.
      GetSystemTimeAsFileTime produces values that jump by increments of
      15.627 milliseconds (!) on average.
      Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2
@@ -84,15 +94,17 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
      <http://www.windowstimestamp.com/description>.  */
   FILETIME current_time;
 
+# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
   if (!initialized)
     initialize ();
+# endif
   if (GetSystemTimePreciseAsFileTimeFunc != NULL)
     GetSystemTimePreciseAsFileTimeFunc (&current_time);
   else
     GetSystemTimeAsFileTime (&current_time);
 
   /* Convert from FILETIME to 'struct timeval'.  */
-  /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+  /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */
   ULONGLONG since_1601 =
     ((ULONGLONG) current_time.dwHighDateTime << 32)
     | (ULONGLONG) current_time.dwLowDateTime;
@@ -109,11 +121,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
 #else
 
 # if HAVE_GETTIMEOFDAY
-#  if GETTIMEOFDAY_CLOBBERS_LOCALTIME
-  /* Save and restore the contents of the buffer used for localtime's
-     result around the call to gettimeofday.  */
-  struct tm save = *localtime_buffer_addr;
-#  endif
 
 #  if defined timeval /* 'struct timeval' overridden by gnulib?  */
 #   undef timeval
@@ -128,10 +135,6 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
   int result = gettimeofday (tv, (struct timezone *) tz);
 #  endif
 
-#  if GETTIMEOFDAY_CLOBBERS_LOCALTIME
-  *localtime_buffer_addr = save;
-#  endif
-
   return result;
 
 # else
diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c
new file mode 100644 (file)
index 0000000..44335e3
--- /dev/null
@@ -0,0 +1,749 @@
+/* Locking in multithreaded situations.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h.  */
+
+#include <config.h>
+
+#include "glthread/lock.h"
+
+/* ========================================================================= */
+
+#if USE_ISOC_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+int
+glthread_lock_init (gl_lock_t *lock)
+{
+  if (mtx_init (&lock->mutex, mtx_plain) != thrd_success)
+    return ENOMEM;
+  lock->init_needed = 0;
+  return 0;
+}
+
+int
+glthread_lock_lock (gl_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_lock (&lock->mutex) != thrd_success)
+    return EAGAIN;
+  return 0;
+}
+
+int
+glthread_lock_unlock (gl_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_unlock (&lock->mutex) != thrd_success)
+    return EINVAL;
+  return 0;
+}
+
+int
+glthread_lock_destroy (gl_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  mtx_destroy (&lock->mutex);
+  return 0;
+}
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+int
+glthread_rwlock_init (gl_rwlock_t *lock)
+{
+  if (mtx_init (&lock->lock, mtx_plain) != thrd_success
+      || cnd_init (&lock->waiting_readers) != thrd_success
+      || cnd_init (&lock->waiting_writers) != thrd_success)
+    return ENOMEM;
+  lock->waiting_writers_count = 0;
+  lock->runcount = 0;
+  lock->init_needed = 0;
+  return 0;
+}
+
+int
+glthread_rwlock_rdlock (gl_rwlock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_lock (&lock->lock) != thrd_success)
+    return EAGAIN;
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow, and whether no writer is waiting.  The latter
+     condition is because POSIX recommends that "write locks shall take
+     precedence over read locks", to avoid "writer starvation".  */
+  while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_readers.  */
+      if (cnd_wait (&lock->waiting_readers, &lock->lock) != thrd_success)
+        {
+          mtx_unlock (&lock->lock);
+          return EINVAL;
+        }
+    }
+  lock->runcount++;
+  if (mtx_unlock (&lock->lock) != thrd_success)
+    return EINVAL;
+  return 0;
+}
+
+int
+glthread_rwlock_wrlock (gl_rwlock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_lock (&lock->lock) != thrd_success)
+    return EAGAIN;
+  /* Test whether no readers or writers are currently running.  */
+  while (!(lock->runcount == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_writers.  */
+      lock->waiting_writers_count++;
+      if (cnd_wait (&lock->waiting_writers, &lock->lock) != thrd_success)
+        {
+          lock->waiting_writers_count--;
+          mtx_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->waiting_writers_count--;
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  if (mtx_unlock (&lock->lock) != thrd_success)
+    return EINVAL;
+  return 0;
+}
+
+int
+glthread_rwlock_unlock (gl_rwlock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_lock (&lock->lock) != thrd_success)
+    return EAGAIN;
+  if (lock->runcount < 0)
+    {
+      /* Drop a writer lock.  */
+      if (!(lock->runcount == -1))
+        {
+          mtx_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount = 0;
+    }
+  else
+    {
+      /* Drop a reader lock.  */
+      if (!(lock->runcount > 0))
+        {
+          mtx_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount--;
+    }
+  if (lock->runcount == 0)
+    {
+      /* POSIX recommends that "write locks shall take precedence over read
+         locks", to avoid "writer starvation".  */
+      if (lock->waiting_writers_count > 0)
+        {
+          /* Wake up one of the waiting writers.  */
+          if (cnd_signal (&lock->waiting_writers) != thrd_success)
+            {
+              mtx_unlock (&lock->lock);
+              return EINVAL;
+            }
+        }
+      else
+        {
+          /* Wake up all waiting readers.  */
+          if (cnd_broadcast (&lock->waiting_readers) != thrd_success)
+            {
+              mtx_unlock (&lock->lock);
+              return EINVAL;
+            }
+        }
+    }
+  if (mtx_unlock (&lock->lock) != thrd_success)
+    return EINVAL;
+  return 0;
+}
+
+int
+glthread_rwlock_destroy (gl_rwlock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  mtx_destroy (&lock->lock);
+  cnd_destroy (&lock->waiting_readers);
+  cnd_destroy (&lock->waiting_writers);
+  return 0;
+}
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+int
+glthread_recursive_lock_init (gl_recursive_lock_t *lock)
+{
+  if (mtx_init (&lock->mutex, mtx_plain | mtx_recursive) != thrd_success)
+    return ENOMEM;
+  lock->init_needed = 0;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock (gl_recursive_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_lock (&lock->mutex) != thrd_success)
+    return EAGAIN;
+  return 0;
+}
+
+int
+glthread_recursive_lock_unlock (gl_recursive_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  if (mtx_unlock (&lock->mutex) != thrd_success)
+    return EINVAL;
+  return 0;
+}
+
+int
+glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
+{
+  if (lock->init_needed)
+    call_once (&lock->init_once, lock->init_func);
+  mtx_destroy (&lock->mutex);
+  return 0;
+}
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
+
+#  if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP
+
+#   if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+     /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
+
+int
+glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock)
+{
+  pthread_rwlockattr_t attributes;
+  int err;
+
+  err = pthread_rwlockattr_init (&attributes);
+  if (err != 0)
+    return err;
+  /* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that
+     causes the writer to be preferred. PTHREAD_RWLOCK_PREFER_WRITER_NP does not
+     do this; see
+     http://man7.org/linux/man-pages/man3/pthread_rwlockattr_setkind_np.3.html */
+  err = pthread_rwlockattr_setkind_np (&attributes,
+                                       PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+  if (err == 0)
+    err = pthread_rwlock_init(lock, &attributes);
+  /* pthread_rwlockattr_destroy always returns 0.  It cannot influence the
+     return value.  */
+  pthread_rwlockattr_destroy (&attributes);
+  return err;
+}
+
+#   endif
+#  else
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_rwlock_init (&lock->rwlock, NULL);
+  if (err != 0)
+    return err;
+  lock->initialized = 1;
+  return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_rwlock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_rwlock_rdlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_rwlock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_rwlock_wrlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+  if (!lock->initialized)
+    return EINVAL;
+  return pthread_rwlock_unlock (&lock->rwlock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  if (!lock->initialized)
+    return EINVAL;
+  err = pthread_rwlock_destroy (&lock->rwlock);
+  if (err != 0)
+    return err;
+  lock->initialized = 0;
+  return 0;
+}
+
+#  endif
+
+# else
+
+int
+glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_init (&lock->lock, NULL);
+  if (err != 0)
+    return err;
+  err = pthread_cond_init (&lock->waiting_readers, NULL);
+  if (err != 0)
+    return err;
+  err = pthread_cond_init (&lock->waiting_writers, NULL);
+  if (err != 0)
+    return err;
+  lock->waiting_writers_count = 0;
+  lock->runcount = 0;
+  return 0;
+}
+
+int
+glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow, and whether no writer is waiting.  The latter
+     condition is because POSIX recommends that "write locks shall take
+     precedence over read locks", to avoid "writer starvation".  */
+  while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_readers.  */
+      err = pthread_cond_wait (&lock->waiting_readers, &lock->lock);
+      if (err != 0)
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return err;
+        }
+    }
+  lock->runcount++;
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  /* Test whether no readers or writers are currently running.  */
+  while (!(lock->runcount == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_writers.  */
+      lock->waiting_writers_count++;
+      err = pthread_cond_wait (&lock->waiting_writers, &lock->lock);
+      if (err != 0)
+        {
+          lock->waiting_writers_count--;
+          pthread_mutex_unlock (&lock->lock);
+          return err;
+        }
+      lock->waiting_writers_count--;
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_lock (&lock->lock);
+  if (err != 0)
+    return err;
+  if (lock->runcount < 0)
+    {
+      /* Drop a writer lock.  */
+      if (!(lock->runcount == -1))
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount = 0;
+    }
+  else
+    {
+      /* Drop a reader lock.  */
+      if (!(lock->runcount > 0))
+        {
+          pthread_mutex_unlock (&lock->lock);
+          return EINVAL;
+        }
+      lock->runcount--;
+    }
+  if (lock->runcount == 0)
+    {
+      /* POSIX recommends that "write locks shall take precedence over read
+         locks", to avoid "writer starvation".  */
+      if (lock->waiting_writers_count > 0)
+        {
+          /* Wake up one of the waiting writers.  */
+          err = pthread_cond_signal (&lock->waiting_writers);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->lock);
+              return err;
+            }
+        }
+      else
+        {
+          /* Wake up all waiting readers.  */
+          err = pthread_cond_broadcast (&lock->waiting_readers);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->lock);
+              return err;
+            }
+        }
+    }
+  return pthread_mutex_unlock (&lock->lock);
+}
+
+int
+glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_destroy (&lock->lock);
+  if (err != 0)
+    return err;
+  err = pthread_cond_destroy (&lock->waiting_readers);
+  if (err != 0)
+    return err;
+  err = pthread_cond_destroy (&lock->waiting_writers);
+  if (err != 0)
+    return err;
+  return 0;
+}
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+#  if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_mutexattr_t attributes;
+  int err;
+
+  err = pthread_mutexattr_init (&attributes);
+  if (err != 0)
+    return err;
+  err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutex_init (lock, &attributes);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutexattr_destroy (&attributes);
+  if (err != 0)
+    return err;
+  return 0;
+}
+
+#  else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_mutexattr_t attributes;
+  int err;
+
+  err = pthread_mutexattr_init (&attributes);
+  if (err != 0)
+    return err;
+  err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutex_init (&lock->recmutex, &attributes);
+  if (err != 0)
+    {
+      pthread_mutexattr_destroy (&attributes);
+      return err;
+    }
+  err = pthread_mutexattr_destroy (&attributes);
+  if (err != 0)
+    return err;
+  lock->initialized = 1;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (!lock->initialized)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->guard);
+      if (err != 0)
+        return err;
+      if (!lock->initialized)
+        {
+          err = glthread_recursive_lock_init_multithreaded (lock);
+          if (err != 0)
+            {
+              pthread_mutex_unlock (&lock->guard);
+              return err;
+            }
+        }
+      err = pthread_mutex_unlock (&lock->guard);
+      if (err != 0)
+        return err;
+    }
+  return pthread_mutex_lock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (!lock->initialized)
+    return EINVAL;
+  return pthread_mutex_unlock (&lock->recmutex);
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+  int err;
+
+  if (!lock->initialized)
+    return EINVAL;
+  err = pthread_mutex_destroy (&lock->recmutex);
+  if (err != 0)
+    return err;
+  lock->initialized = 0;
+  return 0;
+}
+
+#  endif
+
+# else
+
+int
+glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
+{
+  int err;
+
+  err = pthread_mutex_init (&lock->mutex, NULL);
+  if (err != 0)
+    return err;
+  lock->owner = (pthread_t) 0;
+  lock->depth = 0;
+  return 0;
+}
+
+int
+glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
+{
+  pthread_t self = pthread_self ();
+  if (lock->owner != self)
+    {
+      int err;
+
+      err = pthread_mutex_lock (&lock->mutex);
+      if (err != 0)
+        return err;
+      lock->owner = self;
+    }
+  if (++(lock->depth) == 0) /* wraparound? */
+    {
+      lock->depth--;
+      return EAGAIN;
+    }
+  return 0;
+}
+
+int
+glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != pthread_self ())
+    return EPERM;
+  if (lock->depth == 0)
+    return EINVAL;
+  if (--(lock->depth) == 0)
+    {
+      lock->owner = (pthread_t) 0;
+      return pthread_mutex_unlock (&lock->mutex);
+    }
+  else
+    return 0;
+}
+
+int
+glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
+{
+  if (lock->owner != (pthread_t) 0)
+    return EBUSY;
+  return pthread_mutex_destroy (&lock->mutex);
+}
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT;
+
+int
+glthread_once_singlethreaded (pthread_once_t *once_control)
+{
+  /* We don't know whether pthread_once_t is an integer type, a floating-point
+     type, a pointer type, or a structure type.  */
+  char *firstbyte = (char *)once_control;
+  if (*firstbyte == *(const char *)&fresh_once)
+    {
+      /* First time use of once_control.  Invert the first byte.  */
+      *firstbyte = ~ *(const char *)&fresh_once;
+      return 1;
+    }
+  else
+    return 0;
+}
+
+# if !(PTHREAD_IN_USE_DETECTION_HARD || USE_POSIX_THREADS_WEAK)
+
+int
+glthread_once_multithreaded (pthread_once_t *once_control,
+                             void (*init_function) (void))
+{
+  int err = pthread_once (once_control, init_function);
+  if (err == ENOSYS)
+    {
+      /* This happens on FreeBSD 11: The pthread_once function in libc returns
+         ENOSYS.  */
+      if (glthread_once_singlethreaded (once_control))
+        init_function ();
+      return 0;
+    }
+  return err;
+}
+
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+#endif
+
+/* ========================================================================= */
diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
new file mode 100644 (file)
index 0000000..cc4c519
--- /dev/null
@@ -0,0 +1,791 @@
+/* Locking in multithreaded situations.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-win32.h.  */
+
+/* This file contains locking primitives for use with a given thread library.
+   It does not contain primitives for creating threads or for other
+   synchronization primitives.
+
+   Normal (non-recursive) locks:
+     Type:                gl_lock_t
+     Declaration:         gl_lock_define(extern, name)
+     Initializer:         gl_lock_define_initialized(, name)
+     Initialization:      gl_lock_init (name);
+     Taking the lock:     gl_lock_lock (name);
+     Releasing the lock:  gl_lock_unlock (name);
+     De-initialization:   gl_lock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_lock_init (&name);
+     Taking the lock:     err = glthread_lock_lock (&name);
+     Releasing the lock:  err = glthread_lock_unlock (&name);
+     De-initialization:   err = glthread_lock_destroy (&name);
+
+   Read-Write (non-recursive) locks:
+     Type:                gl_rwlock_t
+     Declaration:         gl_rwlock_define(extern, name)
+     Initializer:         gl_rwlock_define_initialized(, name)
+     Initialization:      gl_rwlock_init (name);
+     Taking the lock:     gl_rwlock_rdlock (name);
+                          gl_rwlock_wrlock (name);
+     Releasing the lock:  gl_rwlock_unlock (name);
+     De-initialization:   gl_rwlock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_rwlock_init (&name);
+     Taking the lock:     err = glthread_rwlock_rdlock (&name);
+                          err = glthread_rwlock_wrlock (&name);
+     Releasing the lock:  err = glthread_rwlock_unlock (&name);
+     De-initialization:   err = glthread_rwlock_destroy (&name);
+
+   Recursive locks:
+     Type:                gl_recursive_lock_t
+     Declaration:         gl_recursive_lock_define(extern, name)
+     Initializer:         gl_recursive_lock_define_initialized(, name)
+     Initialization:      gl_recursive_lock_init (name);
+     Taking the lock:     gl_recursive_lock_lock (name);
+     Releasing the lock:  gl_recursive_lock_unlock (name);
+     De-initialization:   gl_recursive_lock_destroy (name);
+   Equivalent functions with control of error handling:
+     Initialization:      err = glthread_recursive_lock_init (&name);
+     Taking the lock:     err = glthread_recursive_lock_lock (&name);
+     Releasing the lock:  err = glthread_recursive_lock_unlock (&name);
+     De-initialization:   err = glthread_recursive_lock_destroy (&name);
+
+  Once-only execution:
+     Type:                gl_once_t
+     Initializer:         gl_once_define(extern, name)
+     Execution:           gl_once (name, initfunction);
+   Equivalent functions with control of error handling:
+     Execution:           err = glthread_once (&name, initfunction);
+*/
+
+
+#ifndef _LOCK_H
+#define _LOCK_H
+
+#include <errno.h>
+#include <stdlib.h>
+
+#if !defined c11_threads_in_use
+# if HAVE_THREADS_H && USE_POSIX_THREADS_FROM_LIBC
+#  define c11_threads_in_use() 1
+# elif HAVE_THREADS_H && USE_POSIX_THREADS_WEAK
+#  include <threads.h>
+#  pragma weak thrd_exit
+#  define c11_threads_in_use() (thrd_exit != NULL)
+# else
+#  define c11_threads_in_use() 0
+# endif
+#endif
+
+/* ========================================================================= */
+
+#if USE_ISOC_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+/* Use the ISO C threads library.  */
+
+# include <threads.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef struct
+        {
+          int volatile init_needed;
+          once_flag init_once;
+          void (*init_func) (void);
+          mtx_t mutex;
+        }
+        gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_lock_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    static void _atomic_init_##NAME (void);       \
+    STORAGECLASS gl_lock_t NAME =                 \
+      { 1, ONCE_FLAG_INIT, _atomic_init_##NAME }; \
+    static void _atomic_init_##NAME (void)        \
+    {                                             \
+      if (glthread_lock_init (&(NAME)))           \
+        abort ();                                 \
+    }
+extern int glthread_lock_init (gl_lock_t *lock);
+extern int glthread_lock_lock (gl_lock_t *lock);
+extern int glthread_lock_unlock (gl_lock_t *lock);
+extern int glthread_lock_destroy (gl_lock_t *lock);
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef struct
+        {
+          int volatile init_needed;
+          once_flag init_once;
+          void (*init_func) (void);
+          mtx_t lock; /* protects the remaining fields */
+          cnd_t waiting_readers; /* waiting readers */
+          cnd_t waiting_writers; /* waiting writers */
+          unsigned int waiting_writers_count; /* number of waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    static void _atomic_init_##NAME (void);       \
+    STORAGECLASS gl_rwlock_t NAME =               \
+      { 1, ONCE_FLAG_INIT, _atomic_init_##NAME }; \
+    static void _atomic_init_##NAME (void)        \
+    {                                             \
+      if (glthread_rwlock_init (&(NAME)))         \
+        abort ();                                 \
+    }
+extern int glthread_rwlock_init (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy (gl_rwlock_t *lock);
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+typedef struct
+        {
+          int volatile init_needed;
+          once_flag init_once;
+          void (*init_func) (void);
+          mtx_t mutex;
+        }
+        gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+    static void _atomic_init_##NAME (void);       \
+    STORAGECLASS gl_recursive_lock_t NAME =       \
+      { 1, ONCE_FLAG_INIT, _atomic_init_##NAME }; \
+    static void _atomic_init_##NAME (void)        \
+    {                                             \
+      if (glthread_recursive_lock_init (&(NAME))) \
+        abort ();                                 \
+    }
+extern int glthread_recursive_lock_init (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy (gl_recursive_lock_t *lock);
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef once_flag gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS once_flag NAME = ONCE_FLAG_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (call_once (ONCE_CONTROL, INITFUNCTION), 0)
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <pthread.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+/* The pthread_in_use() detection needs to be done at runtime.  */
+#  define pthread_in_use() \
+     glthread_in_use ()
+extern int glthread_in_use (void);
+
+# endif
+
+# if USE_POSIX_THREADS_WEAK
+
+/* Use weak references to the POSIX threads library.  */
+
+/* Weak references avoid dragging in external libraries if the other parts
+   of the program don't use them.  Here we use them, because we don't want
+   every program that uses libintl to depend on libpthread.  This assumes
+   that libpthread would not be loaded after libintl; i.e. if libintl is
+   loaded first, by an executable that does not depend on libpthread, and
+   then a module is dynamically loaded that depends on libpthread, libintl
+   will not be multithread-safe.  */
+
+/* The way to test at runtime whether libpthread is present is to test
+   whether a function pointer's value, such as &pthread_mutex_init, is
+   non-NULL.  However, some versions of GCC have a bug through which, in
+   PIC mode, &foo != NULL always evaluates to true if there is a direct
+   call to foo(...) in the same function.  To avoid this, we test the
+   address of a function in libpthread that we don't use.  */
+
+#  pragma weak pthread_mutex_init
+#  pragma weak pthread_mutex_lock
+#  pragma weak pthread_mutex_unlock
+#  pragma weak pthread_mutex_destroy
+#  pragma weak pthread_rwlock_init
+#  pragma weak pthread_rwlock_rdlock
+#  pragma weak pthread_rwlock_wrlock
+#  pragma weak pthread_rwlock_unlock
+#  pragma weak pthread_rwlock_destroy
+#  pragma weak pthread_once
+#  pragma weak pthread_cond_init
+#  pragma weak pthread_cond_wait
+#  pragma weak pthread_cond_signal
+#  pragma weak pthread_cond_broadcast
+#  pragma weak pthread_cond_destroy
+#  pragma weak pthread_mutexattr_init
+#  pragma weak pthread_mutexattr_settype
+#  pragma weak pthread_mutexattr_destroy
+#  pragma weak pthread_rwlockattr_init
+#  if __GNU_LIBRARY__ > 1
+#   pragma weak pthread_rwlockattr_setkind_np
+#  endif
+#  pragma weak pthread_rwlockattr_destroy
+#  ifndef pthread_self
+#   pragma weak pthread_self
+#  endif
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+    /* Considering all platforms with USE_POSIX_THREADS_WEAK, only few symbols
+       can be used to determine whether libpthread is in use.  These are:
+         pthread_mutexattr_gettype
+         pthread_rwlockattr_destroy
+         pthread_rwlockattr_init
+     */
+#   pragma weak pthread_mutexattr_gettype
+#   define pthread_in_use() \
+      (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+#  endif
+
+# else
+
+#  if !PTHREAD_IN_USE_DETECTION_HARD
+#   define pthread_in_use() 1
+#  endif
+
+# endif
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef pthread_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_mutex_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    PTHREAD_MUTEX_INITIALIZER
+# define glthread_lock_init(LOCK) \
+    (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0)
+# define glthread_lock_lock(LOCK) \
+    (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+# define glthread_lock_unlock(LOCK) \
+    (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+# define glthread_lock_destroy(LOCK) \
+    (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
+
+#  if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP
+
+typedef pthread_rwlock_t gl_rwlock_t;
+#   define gl_rwlock_define(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_rwlock_t NAME;
+#   define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer;
+#   if HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+#    if defined PTHREAD_RWLOCK_INITIALIZER
+#     define gl_rwlock_initializer \
+        PTHREAD_RWLOCK_INITIALIZER
+#    else
+#     define gl_rwlock_initializer \
+        PTHREAD_RWLOCK_INITIALIZER_NP
+#    endif
+#    define glthread_rwlock_init(LOCK) \
+       (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0)
+#   else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
+#    define gl_rwlock_initializer \
+       PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
+#    define glthread_rwlock_init(LOCK) \
+       (pthread_in_use () ? glthread_rwlock_init_for_glibc (LOCK) : 0)
+extern int glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock);
+#   endif
+#   define glthread_rwlock_rdlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0)
+#   define glthread_rwlock_wrlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0)
+#   define glthread_rwlock_unlock(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0)
+#   define glthread_rwlock_destroy(LOCK) \
+      (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0)
+
+#  else
+
+typedef struct
+        {
+          int initialized;
+          pthread_mutex_t guard;   /* protects the initialization */
+          pthread_rwlock_t rwlock; /* read-write lock */
+        }
+        gl_rwlock_t;
+#   define gl_rwlock_define(STORAGECLASS, NAME) \
+      STORAGECLASS gl_rwlock_t NAME;
+#   define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+#   define gl_rwlock_initializer \
+      { 0, PTHREAD_MUTEX_INITIALIZER }
+#   define glthread_rwlock_init(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_rdlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_wrlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_unlock(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+#   define glthread_rwlock_destroy(LOCK) \
+      (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+#  endif
+
+# else
+
+typedef struct
+        {
+          pthread_mutex_t lock; /* protects the remaining fields */
+          pthread_cond_t waiting_readers; /* waiting readers */
+          pthread_cond_t waiting_writers; /* waiting writers */
+          unsigned int waiting_writers_count; /* number of waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+    { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 }
+# define glthread_rwlock_init(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_wrlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_unlock(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0)
+# define glthread_rwlock_destroy(LOCK) \
+    (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock);
+extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock);
+
+# endif
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+# if HAVE_PTHREAD_MUTEX_RECURSIVE
+
+#  if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+
+typedef pthread_mutex_t gl_recursive_lock_t;
+#   define gl_recursive_lock_define(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_mutex_t NAME;
+#   define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer;
+#   ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#    define gl_recursive_lock_initializer \
+       PTHREAD_RECURSIVE_MUTEX_INITIALIZER
+#   else
+#    define gl_recursive_lock_initializer \
+       PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#   endif
+#   define glthread_recursive_lock_init(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_lock(LOCK) \
+      (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0)
+#   define glthread_recursive_lock_unlock(LOCK) \
+      (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0)
+#   define glthread_recursive_lock_destroy(LOCK) \
+      (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+
+#  else
+
+typedef struct
+        {
+          pthread_mutex_t recmutex; /* recursive mutex */
+          pthread_mutex_t guard;    /* protects the initialization */
+          int initialized;
+        }
+        gl_recursive_lock_t;
+#   define gl_recursive_lock_define(STORAGECLASS, NAME) \
+      STORAGECLASS gl_recursive_lock_t NAME;
+#   define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+      STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+#   define gl_recursive_lock_initializer \
+      { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 }
+#   define glthread_recursive_lock_init(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_lock(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_unlock(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+#   define glthread_recursive_lock_destroy(LOCK) \
+      (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+#  endif
+
+# else
+
+/* Old versions of POSIX threads on Solaris did not have recursive locks.
+   We have to implement them ourselves.  */
+
+typedef struct
+        {
+          pthread_mutex_t mutex;
+          pthread_t owner;
+          unsigned long depth;
+        }
+        gl_recursive_lock_t;
+#  define gl_recursive_lock_define(STORAGECLASS, NAME) \
+     STORAGECLASS gl_recursive_lock_t NAME;
+#  define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+     STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+#  define gl_recursive_lock_initializer \
+     { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 }
+#  define glthread_recursive_lock_init(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_lock(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_unlock(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0)
+#  define glthread_recursive_lock_destroy(LOCK) \
+     (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0)
+extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock);
+extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock);
+
+# endif
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef pthread_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
+# if PTHREAD_IN_USE_DETECTION_HARD || USE_POSIX_THREADS_WEAK
+#  define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+     (pthread_in_use ()                                                        \
+      ? pthread_once (ONCE_CONTROL, INITFUNCTION)                              \
+      : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+# else
+#  define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+     (pthread_in_use ()                                                        \
+      ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION)               \
+      : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (pthread_once_t *once_control,
+                                        void (*init_function) (void));
+# endif
+extern int glthread_once_singlethreaded (pthread_once_t *once_control);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if USE_WINDOWS_THREADS
+
+# define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+# include <windows.h>
+
+# include "windows-mutex.h"
+# include "windows-rwlock.h"
+# include "windows-recmutex.h"
+# include "windows-once.h"
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* We can use CRITICAL_SECTION directly, rather than the native Windows Event,
+   Mutex, Semaphore types, because
+     - we need only to synchronize inside a single process (address space),
+       not inter-process locking,
+     - we don't need to support trylock operations.  (TryEnterCriticalSection
+       does not work on Windows 95/98/ME.  Packages that need trylock usually
+       define their own mutex type.)  */
+
+/* There is no way to statically initialize a CRITICAL_SECTION.  It needs
+   to be done lazily, once only.  For this we need spinlocks.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef glwthread_mutex_t gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_lock_t NAME;
+# define gl_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_lock_t NAME = gl_lock_initializer;
+# define gl_lock_initializer \
+    GLWTHREAD_MUTEX_INIT
+# define glthread_lock_init(LOCK) \
+    (glwthread_mutex_init (LOCK), 0)
+# define glthread_lock_lock(LOCK) \
+    glwthread_mutex_lock (LOCK)
+# define glthread_lock_unlock(LOCK) \
+    glwthread_mutex_unlock (LOCK)
+# define glthread_lock_destroy(LOCK) \
+    glwthread_mutex_destroy (LOCK)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef glwthread_rwlock_t gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME;
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer;
+# define gl_rwlock_initializer \
+    GLWTHREAD_RWLOCK_INIT
+# define glthread_rwlock_init(LOCK) \
+    (glwthread_rwlock_init (LOCK), 0)
+# define glthread_rwlock_rdlock(LOCK) \
+    glwthread_rwlock_rdlock (LOCK)
+# define glthread_rwlock_wrlock(LOCK) \
+    glwthread_rwlock_wrlock (LOCK)
+# define glthread_rwlock_unlock(LOCK) \
+    glwthread_rwlock_unlock (LOCK)
+# define glthread_rwlock_destroy(LOCK) \
+    glwthread_rwlock_destroy (LOCK)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+typedef glwthread_recmutex_t gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME;
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \
+    STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer;
+# define gl_recursive_lock_initializer \
+    GLWTHREAD_RECMUTEX_INIT
+# define glthread_recursive_lock_init(LOCK) \
+    (glwthread_recmutex_init (LOCK), 0)
+# define glthread_recursive_lock_lock(LOCK) \
+    glwthread_recmutex_lock (LOCK)
+# define glthread_recursive_lock_unlock(LOCK) \
+    glwthread_recmutex_unlock (LOCK)
+# define glthread_recursive_lock_destroy(LOCK) \
+    glwthread_recmutex_destroy (LOCK)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef glwthread_once_t gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_once_t NAME = GLWTHREAD_ONCE_INIT;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (glwthread_once (ONCE_CONTROL, INITFUNCTION), 0)
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+#if !(USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS)
+
+/* Provide dummy implementation if threads are not supported.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+typedef int gl_lock_t;
+# define gl_lock_define(STORAGECLASS, NAME)
+# define gl_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_lock_init(NAME) 0
+# define glthread_lock_lock(NAME) 0
+# define glthread_lock_unlock(NAME) 0
+# define glthread_lock_destroy(NAME) 0
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+typedef int gl_rwlock_t;
+# define gl_rwlock_define(STORAGECLASS, NAME)
+# define gl_rwlock_define_initialized(STORAGECLASS, NAME)
+# define glthread_rwlock_init(NAME) 0
+# define glthread_rwlock_rdlock(NAME) 0
+# define glthread_rwlock_wrlock(NAME) 0
+# define glthread_rwlock_unlock(NAME) 0
+# define glthread_rwlock_destroy(NAME) 0
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+typedef int gl_recursive_lock_t;
+# define gl_recursive_lock_define(STORAGECLASS, NAME)
+# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME)
+# define glthread_recursive_lock_init(NAME) 0
+# define glthread_recursive_lock_lock(NAME) 0
+# define glthread_recursive_lock_unlock(NAME) 0
+# define glthread_recursive_lock_destroy(NAME) 0
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+typedef int gl_once_t;
+# define gl_once_define(STORAGECLASS, NAME) \
+    STORAGECLASS gl_once_t NAME = 0;
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+    (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0)
+
+#endif
+
+/* ========================================================================= */
+
+/* Macros with built-in error handling.  */
+
+/* -------------------------- gl_lock_t datatype -------------------------- */
+
+#define gl_lock_init(NAME) \
+   do                                  \
+     {                                 \
+       if (glthread_lock_init (&NAME)) \
+         abort ();                     \
+     }                                 \
+   while (0)
+#define gl_lock_lock(NAME) \
+   do                                  \
+     {                                 \
+       if (glthread_lock_lock (&NAME)) \
+         abort ();                     \
+     }                                 \
+   while (0)
+#define gl_lock_unlock(NAME) \
+   do                                    \
+     {                                   \
+       if (glthread_lock_unlock (&NAME)) \
+         abort ();                       \
+     }                                   \
+   while (0)
+#define gl_lock_destroy(NAME) \
+   do                                     \
+     {                                    \
+       if (glthread_lock_destroy (&NAME)) \
+         abort ();                        \
+     }                                    \
+   while (0)
+
+/* ------------------------- gl_rwlock_t datatype ------------------------- */
+
+#define gl_rwlock_init(NAME) \
+   do                                    \
+     {                                   \
+       if (glthread_rwlock_init (&NAME)) \
+         abort ();                       \
+     }                                   \
+   while (0)
+#define gl_rwlock_rdlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_rdlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_wrlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_wrlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_unlock(NAME) \
+   do                                      \
+     {                                     \
+       if (glthread_rwlock_unlock (&NAME)) \
+         abort ();                         \
+     }                                     \
+   while (0)
+#define gl_rwlock_destroy(NAME) \
+   do                                       \
+     {                                      \
+       if (glthread_rwlock_destroy (&NAME)) \
+         abort ();                          \
+     }                                      \
+   while (0)
+
+/* --------------------- gl_recursive_lock_t datatype --------------------- */
+
+#define gl_recursive_lock_init(NAME) \
+   do                                            \
+     {                                           \
+       if (glthread_recursive_lock_init (&NAME)) \
+         abort ();                               \
+     }                                           \
+   while (0)
+#define gl_recursive_lock_lock(NAME) \
+   do                                            \
+     {                                           \
+       if (glthread_recursive_lock_lock (&NAME)) \
+         abort ();                               \
+     }                                           \
+   while (0)
+#define gl_recursive_lock_unlock(NAME) \
+   do                                              \
+     {                                             \
+       if (glthread_recursive_lock_unlock (&NAME)) \
+         abort ();                                 \
+     }                                             \
+   while (0)
+#define gl_recursive_lock_destroy(NAME) \
+   do                                               \
+     {                                              \
+       if (glthread_recursive_lock_destroy (&NAME)) \
+         abort ();                                  \
+     }                                              \
+   while (0)
+
+/* -------------------------- gl_once_t datatype -------------------------- */
+
+#define gl_once(NAME, INITFUNCTION) \
+   do                                           \
+     {                                          \
+       if (glthread_once (&NAME, INITFUNCTION)) \
+         abort ();                              \
+     }                                          \
+   while (0)
+
+/* ========================================================================= */
+
+#endif /* _LOCK_H */
diff --git a/lib/glthread/threadlib.c b/lib/glthread/threadlib.c
new file mode 100644 (file)
index 0000000..793bc69
--- /dev/null
@@ -0,0 +1,108 @@
+/* Multithreading primitives.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.  */
+
+#include <config.h>
+
+/* ========================================================================= */
+
+#if USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS
+
+/* Use the POSIX threads library.  */
+
+# include <errno.h>
+# include <pthread.h>
+# include <stdlib.h>
+
+# if PTHREAD_IN_USE_DETECTION_HARD
+
+#  if defined __FreeBSD__ || defined __DragonFly__                 /* FreeBSD */
+
+/* Test using pthread_key_create.  */
+
+int
+glthread_in_use (void)
+{
+  static int tested;
+  static int result; /* 1: linked with -lpthread, 0: only with libc */
+
+  if (!tested)
+    {
+      pthread_key_t key;
+      int err = pthread_key_create (&key, NULL);
+
+      if (err == ENOSYS)
+        result = 0;
+      else
+        {
+          result = 1;
+          if (err == 0)
+            pthread_key_delete (key);
+        }
+      tested = 1;
+    }
+  return result;
+}
+
+#  else                                                     /* Solaris, HP-UX */
+
+/* Test using pthread_create.  */
+
+/* The function to be executed by a dummy thread.  */
+static void *
+dummy_thread_func (void *arg)
+{
+  return arg;
+}
+
+int
+glthread_in_use (void)
+{
+  static int tested;
+  static int result; /* 1: linked with -lpthread, 0: only with libc */
+
+  if (!tested)
+    {
+      pthread_t thread;
+
+      if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0)
+        /* Thread creation failed.  */
+        result = 0;
+      else
+        {
+          /* Thread creation works.  */
+          void *retval;
+          if (pthread_join (thread, &retval) != 0)
+            abort ();
+          result = 1;
+        }
+      tested = 1;
+    }
+  return result;
+}
+
+#  endif
+
+# endif
+
+#endif
+
+/* ========================================================================= */
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
index d281e6c..e7c7e10 100644 (file)
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,7 +35,8 @@
 #  --no-libtool \
 #  --macro-prefix=gl \
 #  --avoid=localename \
-#  --avoid=lock \
+#  --avoid=lock-tests \
+#  --avoid=setlocale \
 #  announce-gen \
 #  argmatch \
 #  binary-io \
@@ -54,7 +55,7 @@
 #  file-type \
 #  filenamecat \
 #  fnmatch-gnu \
-#  getopt \
+#  getopt-gnu \
 #  gettext-h \
 #  gettime \
 #  git-version-gen \
@@ -74,6 +75,7 @@
 #  mbrtowc \
 #  mkstemp \
 #  mktime \
+#  nstrftime \
 #  progname \
 #  propername \
 #  rawmemchr \
 #  stat-time \
 #  stdint \
 #  strcase \
-#  strftime \
 #  strptime \
-#  strtoumax \
+#  strtoimax \
 #  sys_wait \
 #  system-quote \
 #  unistd \
 #  unlocked-io \
 #  update-copyright \
-#  vararrays \
 #  verify \
 #  version-etc \
 #  version-etc-fsf \
 #  wcwidth \
 #  xalloc \
 #  xfreopen \
+#  xmalloca \
 #  xreadlink \
-#  xstrtoumax \
+#  xstdopen \
+#  xstrtoimax \
 #  xvasprintf
 
 
@@ -121,21 +123,10 @@ EXTRA_libdiffutils_a_SOURCES =
 # Use this preprocessor expression to decide whether #include_next works.
 # Do not rely on a 'configure'-time test for this, since the expression
 # might appear in an installed header, which is used by some other compiler.
-HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+HAVE_INCLUDE_NEXT = (__GNUC__ || __clang__ || 60000000 <= __DECC_VER)
 
 ## end   gnulib module absolute-header
 
-## begin gnulib module alloca
-
-
-libdiffutils_a_LIBADD += @ALLOCA@
-libdiffutils_a_DEPENDENCIES += @ALLOCA@
-EXTRA_DIST += alloca.c
-
-EXTRA_libdiffutils_a_SOURCES += alloca.c
-
-## end   gnulib module alloca
-
 ## begin gnulib module alloca-opt
 
 BUILT_SOURCES += $(ALLOCA_H)
@@ -146,7 +137,7 @@ if GL_GENERATE_ALLOCA_H
 alloca.h: alloca.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         cat $(srcdir)/alloca.in.h; \
+         sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \
        } > $@-t && \
        mv -f $@-t $@
 else
@@ -197,6 +188,21 @@ EXTRA_DIST += assure.h
 
 ## end   gnulib module assure
 
+## begin gnulib module attribute
+
+
+EXTRA_DIST += attribute.h
+
+## end   gnulib module attribute
+
+## begin gnulib module basename-lgpl
+
+libdiffutils_a_SOURCES += basename-lgpl.c
+
+EXTRA_DIST += basename-lgpl.h
+
+## end   gnulib module basename-lgpl
+
 ## begin gnulib module binary-io
 
 libdiffutils_a_SOURCES += binary-io.h binary-io.c
@@ -243,6 +249,24 @@ EXTRA_DIST += c-strcaseeq.h
 
 ## end   gnulib module c-strcaseeq
 
+## begin gnulib module calloc-gnu
+
+
+EXTRA_DIST += calloc.c
+
+EXTRA_libdiffutils_a_SOURCES += calloc.c
+
+## end   gnulib module calloc-gnu
+
+## begin gnulib module calloc-posix
+
+
+EXTRA_DIST += calloc.c
+
+EXTRA_libdiffutils_a_SOURCES += calloc.c
+
+## end   gnulib module calloc-posix
+
 ## begin gnulib module careadlinkat
 
 libdiffutils_a_SOURCES += careadlinkat.c
@@ -282,7 +306,7 @@ ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \
-             -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \
+             -e 's/@''GNULIB_ISBLANK''@/$(GL_GNULIB_ISBLANK)/g' \
              -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -313,7 +337,7 @@ EXTRA_libdiffutils_a_SOURCES += stripslash.c
 
 ## begin gnulib module dirname-lgpl
 
-libdiffutils_a_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
+libdiffutils_a_SOURCES += dirname-lgpl.c stripslash.c
 
 EXTRA_DIST += dirname.h
 
@@ -326,13 +350,6 @@ EXTRA_DIST += $(top_srcdir)/build-aux/do-release-commit-and-tag
 
 ## end   gnulib module do-release-commit-and-tag
 
-## begin gnulib module dosname
-
-
-EXTRA_DIST += dosname.h
-
-## end   gnulib module dosname
-
 ## begin gnulib module dup2
 
 
@@ -342,6 +359,42 @@ EXTRA_libdiffutils_a_SOURCES += dup2.c
 
 ## end   gnulib module dup2
 
+## begin gnulib module dynarray
+
+BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
+
+malloc/dynarray.gl.h: malloc/dynarray.h
+       $(AM_V_at)$(MKDIR_P) malloc
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+       $(AM_V_at)$(MKDIR_P) malloc
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
+             -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
+             -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
+             -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
+             -e 's|__glibc_likely|_GL_LIKELY|g' \
+             -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+             < $(srcdir)/malloc/dynarray-skeleton.c; \
+       } > $@-t && \
+       mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
+
+libdiffutils_a_SOURCES += malloc/dynarray_at_failure.c                 malloc/dynarray_emplace_enlarge.c                 malloc/dynarray_finalize.c                 malloc/dynarray_resize.c                 malloc/dynarray_resize_clear.c
+
+EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
+
+EXTRA_libdiffutils_a_SOURCES += malloc/dynarray-skeleton.c
+
+## end   gnulib module dynarray
+
 ## begin gnulib module errno
 
 BUILT_SOURCES += $(ERRNO_H)
@@ -424,12 +477,16 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
-             -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
-             -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
-             -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \
+             -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \
+             -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \
+             -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \
+             -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \
+             -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \
              -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
              -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+             -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
              -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
              -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
              -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
@@ -529,6 +586,15 @@ EXTRA_libdiffutils_a_SOURCES += fnmatch.c fnmatch_loop.c
 
 ## end   gnulib module fnmatch
 
+## begin gnulib module fnmatch-gnu
+
+
+EXTRA_DIST += fnmatch.c
+
+EXTRA_libdiffutils_a_SOURCES += fnmatch.c
+
+## end   gnulib module fnmatch-gnu
+
 ## begin gnulib module fnmatch-h
 
 BUILT_SOURCES += $(FNMATCH_H)
@@ -544,7 +610,7 @@ fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \
-             -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \
+             -e 's/@''GNULIB_FNMATCH''@/$(GL_GNULIB_FNMATCH)/g' \
              -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \
              -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -563,22 +629,41 @@ EXTRA_DIST += fnmatch.in.h
 
 ## end   gnulib module fnmatch-h
 
-## begin gnulib module freopen
+## begin gnulib module fopen
 
 
-EXTRA_DIST += freopen.c
+EXTRA_DIST += fopen.c
 
-EXTRA_libdiffutils_a_SOURCES += freopen.c
+EXTRA_libdiffutils_a_SOURCES += fopen.c
 
-## end   gnulib module freopen
+## end   gnulib module fopen
+
+## begin gnulib module fopen-gnu
+
+
+EXTRA_DIST += fopen.c
+
+EXTRA_libdiffutils_a_SOURCES += fopen.c
+
+## end   gnulib module fopen-gnu
+
+## begin gnulib module free-posix
 
-## begin gnulib module freopen-safer
 
-libdiffutils_a_SOURCES += freopen-safer.c
+EXTRA_DIST += free.c
 
-EXTRA_DIST += stdio--.h stdio-safer.h
+EXTRA_libdiffutils_a_SOURCES += free.c
 
-## end   gnulib module freopen-safer
+## end   gnulib module free-posix
+
+## begin gnulib module freopen
+
+
+EXTRA_DIST += freopen.c
+
+EXTRA_libdiffutils_a_SOURCES += freopen.c
+
+## end   gnulib module freopen
 
 ## begin gnulib module fstat
 
@@ -641,12 +726,30 @@ EXTRA_libdiffutils_a_SOURCES += getopt.c getopt1.c
 
 ## end   gnulib module getopt-posix
 
+## begin gnulib module getpagesize
+
+
+EXTRA_DIST += getpagesize.c
+
+EXTRA_libdiffutils_a_SOURCES += getpagesize.c
+
+## end   gnulib module getpagesize
+
 ## begin gnulib module getprogname
 
 libdiffutils_a_SOURCES += getprogname.h getprogname.c
 
 ## end   gnulib module getprogname
 
+## begin gnulib module getrandom
+
+
+EXTRA_DIST += getrandom.c
+
+EXTRA_libdiffutils_a_SOURCES += getrandom.c
+
+## end   gnulib module getrandom
+
 ## begin gnulib module gettext-h
 
 libdiffutils_a_SOURCES += gettext.h
@@ -689,8 +792,8 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
 #      [nicer features that work only with GNU Make]
 #else
 #      [fallback features that work in any 'make' implementation; see
-#      http://www.opengroup.org/susv3/utilities/make.html
-#      for the 2004 POSIX specification]
+#      https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
+#      for the POSIX specification]
 #endif
 
 ## end   gnulib module gnu-make
@@ -750,6 +853,14 @@ EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
 
 ## end   gnulib module havelib
 
+## begin gnulib module ialloc
+
+libdiffutils_a_SOURCES += ialloc.c
+
+EXTRA_DIST += ialloc.h
+
+## end   gnulib module ialloc
+
 ## begin gnulib module iconv-h
 
 BUILT_SOURCES += $(ICONV_H)
@@ -765,7 +876,7 @@ iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \
-             -e 's/@''GNULIB_ICONV''@/$(GNULIB_ICONV)/g' \
+             -e 's/@''GNULIB_ICONV''@/$(GL_GNULIB_ICONV)/g' \
              -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \
              -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
              -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
@@ -803,17 +914,26 @@ $(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf
 $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf
        $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t && \
        mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
-BUILT_SOURCES        += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
-MOSTLYCLEANFILES     += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t
-MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
-EXTRA_DIST           += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+$(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf
+       $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-zos.gperf > $(srcdir)/iconv_open-zos.h-t && \
+       mv $(srcdir)/iconv_open-zos.h-t $(srcdir)/iconv_open-zos.h
+BUILT_SOURCES        += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
+MOSTLYCLEANFILES     += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t iconv_open-zos.h-t
+MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
+EXTRA_DIST           += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h
 
-EXTRA_DIST += iconv.c iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
+EXTRA_DIST += iconv.c iconv_close.c iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open-zos.gperf iconv_open.c
 
 EXTRA_libdiffutils_a_SOURCES += iconv.c iconv_close.c iconv_open.c
 
 ## end   gnulib module iconv_open
 
+## begin gnulib module idx
+
+libdiffutils_a_SOURCES += idx.h
+
+## end   gnulib module idx
+
 ## begin gnulib module ignore-value
 
 
@@ -852,15 +972,12 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-             -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
              -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
              -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-             -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
-             -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
-             -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
-             -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+             -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \
+             -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \
+             -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \
+             -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \
              -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
              -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
              -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
@@ -902,6 +1019,24 @@ EXTRA_libdiffutils_a_SOURCES += iswblank.c
 
 ## end   gnulib module iswblank
 
+## begin gnulib module iswdigit
+
+
+EXTRA_DIST += iswdigit.c
+
+EXTRA_libdiffutils_a_SOURCES += iswdigit.c
+
+## end   gnulib module iswdigit
+
+## begin gnulib module iswxdigit
+
+
+EXTRA_DIST += iswxdigit.c
+
+EXTRA_libdiffutils_a_SOURCES += iswxdigit.c
+
+## end   gnulib module iswxdigit
+
 ## begin gnulib module langinfo
 
 BUILT_SOURCES += langinfo.h
@@ -917,7 +1052,7 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
-             -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \
+             -e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \
              -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
              -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
              -e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
@@ -993,10 +1128,11 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
-             -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
-             -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
-             -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
-             -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+             -e 's/@''GNULIB_LOCALECONV''@/$(GL_GNULIB_LOCALECONV)/g' \
+             -e 's/@''GNULIB_SETLOCALE''@/$(GL_GNULIB_SETLOCALE)/g' \
+             -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GL_GNULIB_SETLOCALE_NULL)/g' \
+             -e 's/@''GNULIB_DUPLOCALE''@/$(GL_GNULIB_DUPLOCALE)/g' \
+             -e 's/@''GNULIB_LOCALENAME''@/$(GL_GNULIB_LOCALENAME)/g' \
              -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
              -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
              -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
@@ -1007,6 +1143,7 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
              -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
              -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \
+             -e 's|@''LOCALENAME_ENHANCE_LOCALE_FUNCS''@|$(LOCALENAME_ENHANCE_LOCALE_FUNCS)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -1028,14 +1165,11 @@ EXTRA_libdiffutils_a_SOURCES += localeconv.c
 
 ## end   gnulib module localeconv
 
-## begin gnulib module localtime-buffer
-
+## begin gnulib module lock
 
-EXTRA_DIST += localtime-buffer.c localtime-buffer.h
+libdiffutils_a_SOURCES += glthread/lock.h glthread/lock.c
 
-EXTRA_libdiffutils_a_SOURCES += localtime-buffer.c
-
-## end   gnulib module localtime-buffer
+## end   gnulib module lock
 
 ## begin gnulib module lstat
 
@@ -1052,6 +1186,15 @@ EXTRA_DIST += $(top_srcdir)/maint.mk
 
 ## end   gnulib module maintainer-makefile
 
+## begin gnulib module malloc-gnu
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libdiffutils_a_SOURCES += malloc.c
+
+## end   gnulib module malloc-gnu
+
 ## begin gnulib module malloc-posix
 
 
@@ -1086,9 +1229,9 @@ libdiffutils_a_SOURCES += mbiter.h mbiter.c
 ## begin gnulib module mbrtowc
 
 
-EXTRA_DIST += mbrtowc.c
+EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c mbtowc-lock.h windows-initguard.h
 
-EXTRA_libdiffutils_a_SOURCES += mbrtowc.c
+EXTRA_libdiffutils_a_SOURCES += lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c
 
 ## end   gnulib module mbrtowc
 
@@ -1154,6 +1297,15 @@ EXTRA_libdiffutils_a_SOURCES += memchr.c
 
 ## end   gnulib module memchr
 
+## begin gnulib module mempcpy
+
+
+EXTRA_DIST += mempcpy.c
+
+EXTRA_libdiffutils_a_SOURCES += mempcpy.c
+
+## end   gnulib module mempcpy
+
 ## begin gnulib module minmax
 
 libdiffutils_a_SOURCES += minmax.h
@@ -1217,9 +1369,9 @@ EXTRA_libdiffutils_a_SOURCES += msvc-nothrow.c
 ## begin gnulib module nl_langinfo
 
 
-EXTRA_DIST += nl_langinfo.c
+EXTRA_DIST += nl_langinfo-lock.c nl_langinfo.c windows-initguard.h
 
-EXTRA_libdiffutils_a_SOURCES += nl_langinfo.c
+EXTRA_libdiffutils_a_SOURCES += nl_langinfo-lock.c nl_langinfo.c
 
 ## end   gnulib module nl_langinfo
 
@@ -1301,6 +1453,33 @@ EXTRA_libdiffutils_a_SOURCES += readlink.c
 
 ## end   gnulib module readlink
 
+## begin gnulib module realloc-gnu
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libdiffutils_a_SOURCES += realloc.c
+
+## end   gnulib module realloc-gnu
+
+## begin gnulib module realloc-posix
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libdiffutils_a_SOURCES += realloc.c
+
+## end   gnulib module realloc-posix
+
+## begin gnulib module reallocarray
+
+
+EXTRA_DIST += reallocarray.c
+
+EXTRA_libdiffutils_a_SOURCES += reallocarray.c
+
+## end   gnulib module reallocarray
+
 ## begin gnulib module regex
 
 
@@ -1319,21 +1498,21 @@ EXTRA_libdiffutils_a_SOURCES += setenv.c
 
 ## end   gnulib module setenv
 
-## begin gnulib module sh-quote
+## begin gnulib module setlocale-null
 
-libdiffutils_a_SOURCES += sh-quote.h sh-quote.c
+libdiffutils_a_SOURCES += setlocale_null.c
 
-## end   gnulib module sh-quote
+EXTRA_DIST += setlocale-lock.c setlocale_null.h windows-initguard.h
 
-## begin gnulib module sigaction
+EXTRA_libdiffutils_a_SOURCES += setlocale-lock.c
 
-libdiffutils_a_SOURCES += sig-handler.c
+## end   gnulib module setlocale-null
 
-EXTRA_DIST += sig-handler.h sigaction.c
+## begin gnulib module sh-quote
 
-EXTRA_libdiffutils_a_SOURCES += sigaction.c
+libdiffutils_a_SOURCES += sh-quote.h sh-quote.c
 
-## end   gnulib module sigaction
+## end   gnulib module sh-quote
 
 ## begin gnulib module signal-h
 
@@ -1349,11 +1528,11 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
-             -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \
-             -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \
-             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
-             -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+             -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GL_GNULIB_PTHREAD_SIGMASK)/g' \
+             -e 's/@''GNULIB_RAISE''@/$(GL_GNULIB_RAISE)/g' \
+             -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GL_GNULIB_SIGNAL_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_SIGPROCMASK''@/$(GL_GNULIB_SIGPROCMASK)/g' \
+             -e 's/@''GNULIB_SIGACTION''@/$(GL_GNULIB_SIGACTION)/g' \
              -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
              -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
              -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
@@ -1377,14 +1556,30 @@ EXTRA_DIST += signal.in.h
 
 ## end   gnulib module signal-h
 
-## begin gnulib module sigprocmask
+## begin gnulib module sigsegv
 
+BUILT_SOURCES += $(SIGSEGV_H)
 
-EXTRA_DIST += sigprocmask.c
+if GL_GENERATE_SIGSEGV_H
+sigsegv.h: sigsegv.in.h $(top_builddir)/config.status
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/sigsegv.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+else
+sigsegv.h: $(top_builddir)/config.status
+       rm -f $@
+endif
+MOSTLYCLEANFILES += sigsegv.h sigsegv.h-t
+
+if GL_GENERATE_SIGSEGV_H
+libdiffutils_a_SOURCES += sigsegv.c stackvma.c
+endif
 
-EXTRA_libdiffutils_a_SOURCES += sigprocmask.c
+EXTRA_DIST += sigsegv.in.h stackvma.h
 
-## end   gnulib module sigprocmask
+## end   gnulib module sigsegv
 
 ## begin gnulib module size_max
 
@@ -1428,18 +1623,6 @@ EXTRA_DIST += c++defs.h
 
 ## end   gnulib module snippet/c++defs
 
-## begin gnulib module snippet/unused-parameter
-
-# Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all makefiles that
-# need it. This is ensured by the applicability 'all' defined above.
-
-UNUSED_PARAMETER_H=$(srcdir)/unused-parameter.h
-
-EXTRA_DIST += unused-parameter.h
-
-## end   gnulib module snippet/unused-parameter
-
 ## begin gnulib module snippet/warn-on-use
 
 # Because this Makefile snippet defines a variable used by other
@@ -1476,6 +1659,29 @@ EXTRA_DIST += stat-time.h
 
 ## end   gnulib module stat-time
 
+## begin gnulib module stdalign
+
+BUILT_SOURCES += $(STDALIGN_H)
+
+# We need the following in order to create <stdalign.h> when the system
+# doesn't have one that works.
+if GL_GENERATE_STDALIGN_H
+stdalign.h: stdalign.in.h $(top_builddir)/config.status
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/stdalign.in.h; \
+       } > $@-t && \
+       mv $@-t $@
+else
+stdalign.h: $(top_builddir)/config.status
+       rm -f $@
+endif
+MOSTLYCLEANFILES += stdalign.h stdalign.h-t
+
+EXTRA_DIST += stdalign.in.h
+
+## end   gnulib module stdalign
+
 ## begin gnulib module stdarg
 
 BUILT_SOURCES += $(STDARG_H)
@@ -1580,8 +1786,6 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
              -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
              -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
              -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-             -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-             -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
              -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
              -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
              -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
@@ -1596,7 +1800,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
              -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
              -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
              -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
-             -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
+             -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
              < $(srcdir)/stdint.in.h; \
        } > $@-t && \
        mv $@-t $@
@@ -1624,61 +1828,68 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
-             -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
-             -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
-             -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \
-             -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
-             -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
-             -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
-             -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
-             -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
-             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
-             -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
-             -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
-             -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
-             -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
-             -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
-             -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
-             -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
-             -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
-             -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
-             -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
-             -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
-             -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
-             -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
-             -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
-             -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
-             -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
-             -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
-             -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
-             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
-             -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
-             -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
-             -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
-             -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
-             -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
-             -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
-             -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
-             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
-             -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
-             -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
-             -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
-             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
-             -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
-             -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
-             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
-             -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
-             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \
+             -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \
+             -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \
+             -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \
+             -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \
+             -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \
+             -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \
+             -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \
+             -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \
+             -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \
+             -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \
+             -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \
+             -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \
+             -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \
+             -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \
+             -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \
+             -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \
+             -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \
+             -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \
+             -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \
+             -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \
+             -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \
+             -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' \
+             -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \
+             -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \
+             -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \
+             -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \
+             -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \
+             -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \
+             -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \
+             -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \
+             -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \
+             -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \
+             -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \
+             -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \
+             -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \
+             -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \
+             -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \
+             -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \
+             -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \
+             -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \
+             -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \
+             -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' \
+             -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \
+             -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \
+             -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \
+             -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
+             -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
+             -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
              < $(srcdir)/stdio.in.h | \
-         sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+         sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+             -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
              -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
              -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
              -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
@@ -1753,53 +1964,71 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-             -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
-             -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
-             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-             -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
-             -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
-             -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
-             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
-             -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
-             -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
-             -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
-             -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
-             -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
-             -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \
-             -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-             -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
-             -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
-             -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \
-             -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
-             -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-             -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \
-             -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
-             -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
-             -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \
-             -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
-             -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
-             -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
-             -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
-             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
-             -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
-             -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
-             -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \
+             -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \
+             -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \
+             -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
+             -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
+             -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
+             -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
+             -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
+             -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
+             -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \
+             -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \
+             -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \
+             -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \
+             -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' \
+             -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \
+             -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \
+             -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \
+             -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \
+             -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
+             -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
+             -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
+             -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \
+             -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \
+             -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \
+             -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \
+             -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \
+             -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \
+             -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \
+             -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \
+             -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \
+             -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \
+             -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \
+             -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \
+             -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \
+             -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \
+             -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \
+             -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \
+             -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \
+             -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \
+             -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
+             -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
+             -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
              < $(srcdir)/stdlib.in.h | \
          sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+             -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
              -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
              -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''HAVE_DECL_ECVT''@|$(HAVE_DECL_ECVT)|g' \
+             -e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
+             -e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
              -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
              -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
              -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
+             -e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
              -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \
+             -e 's|@''HAVE_MBTOWC''@|$(HAVE_MBTOWC)|g' \
              -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
              -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
              -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \
              -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+             -e 's|@''HAVE_POSIX_MEMALIGN''@|$(HAVE_POSIX_MEMALIGN)|g' \
              -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
              -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
              -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
@@ -1812,28 +2041,44 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
              -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
              -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \
              -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \
+             -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
              -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
              -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+             -e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \
+             -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
              -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+             -e 's|@''HAVE_STRTOUL''@|$(HAVE_STRTOUL)|g' \
              -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
              -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
              -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
              -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
              -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+             -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
              -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \
              -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+             -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+             -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
              -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \
              -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
              -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
              -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
              -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
              -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
              -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
+             -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
              -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
              -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
+             -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \
              -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
              -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+             -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
              -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+             -e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \
+             -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
+             -e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \
+             -e 's|@''REPLACE_STRTOUL''@|$(REPLACE_STRTOUL)|g' \
+             -e 's|@''REPLACE_STRTOULL''@|$(REPLACE_STRTOULL)|g' \
              -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
              -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -1848,6 +2093,14 @@ EXTRA_DIST += stdlib.in.h
 
 ## end   gnulib module stdlib
 
+## begin gnulib module stdopen
+
+libdiffutils_a_SOURCES += stdopen.c
+
+EXTRA_DIST += stdopen.h
+
+## end   gnulib module stdopen
+
 ## begin gnulib module strcase
 
 
@@ -1904,50 +2157,54 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
-             -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \
-             -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
-             -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
-             -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
-             -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
-             -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
-             -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
-             -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
-             -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
-             -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
-             -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
-             -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
-             -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
-             -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
-             -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
-             -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
-             -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
-             -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
-             -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
-             -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
-             -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
-             -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
-             -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
-             -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
-             -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
-             -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
-             -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
-             -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
-             -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
-             -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
-             -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
-             -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
-             -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
-             -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
-             -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
-             -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
-             -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
-             -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' \
+             -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \
+             -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \
+             -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \
+             -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \
+             -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \
+             -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \
+             -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \
+             -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \
+             -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \
+             -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \
+             -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \
+             -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \
+             -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \
+             -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \
+             -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \
+             -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \
+             -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \
+             -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
+             -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
+             -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
+             -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
+             -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
+             -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
+             -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
+             -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
+             -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
+             -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
+             -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \
+             -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \
+             -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \
+             -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \
+             -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \
+             -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \
+             -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \
+             -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \
+             -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g' \
+             -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \
+             -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \
+             -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \
+             -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \
+             -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
+             -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
              < $(srcdir)/string.in.h | \
          sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
              -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
              -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
              -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-             -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
              -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
              -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
              -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@@ -1963,8 +2220,12 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
              -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
              -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \
+             -e 's|@''HAVE_STRERRORNAME_NP''@|$(HAVE_STRERRORNAME_NP)|g' \
+             -e 's|@''HAVE_SIGABBREV_NP''@|$(HAVE_SIGABBREV_NP)|g' \
+             -e 's|@''HAVE_SIGDESCR_NP''@|$(HAVE_SIGDESCR_NP)|g' \
              -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
              -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+             -e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
              -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
              -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
              -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -1978,6 +2239,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
              -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
              -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
+             -e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g' \
              -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
              -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2007,7 +2269,7 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
-             -e 's/@''GNULIB_FFS''@/$(GNULIB_FFS)/g' \
+             -e 's/@''GNULIB_FFS''@/$(GL_GNULIB_FFS)/g' \
              -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \
              -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
              -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
@@ -2023,15 +2285,6 @@ EXTRA_DIST += strings.in.h
 
 ## end   gnulib module strings
 
-## begin gnulib module strndup
-
-
-EXTRA_DIST += strndup.c
-
-EXTRA_libdiffutils_a_SOURCES += strndup.c
-
-## end   gnulib module strndup
-
 ## begin gnulib module strnlen
 
 
@@ -2056,23 +2309,55 @@ EXTRA_libdiffutils_a_SOURCES += strptime.c
 
 ## end   gnulib module strptime
 
-## begin gnulib module strtoull
+## begin gnulib module strtoimax
+
+
+EXTRA_DIST += strtoimax.c
+
+EXTRA_libdiffutils_a_SOURCES += strtoimax.c
 
+## end   gnulib module strtoimax
 
-EXTRA_DIST += strtol.c strtoul.c strtoull.c
+## begin gnulib module strtoll
 
-EXTRA_libdiffutils_a_SOURCES += strtol.c strtoul.c strtoull.c
 
-## end   gnulib module strtoull
+EXTRA_DIST += strtol.c strtoll.c
 
-## begin gnulib module strtoumax
+EXTRA_libdiffutils_a_SOURCES += strtol.c strtoll.c
 
+## end   gnulib module strtoll
 
-EXTRA_DIST += strtoimax.c strtoumax.c
+## begin gnulib module sys_random
+
+BUILT_SOURCES += sys/random.h
+
+# We need the following in order to create <sys/random.h> when the system
+# doesn't have one.
+sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+       $(AM_V_at)$(MKDIR_P) sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \
+             -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \
+             -e 's/@''GNULIB_GETRANDOM''@/$(GL_GNULIB_GETRANDOM)/g' \
+             -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \
+             -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             < $(srcdir)/sys_random.in.h; \
+       } > $@-t && \
+       mv -f $@-t $@
+MOSTLYCLEANFILES += sys/random.h sys/random.h-t
+MOSTLYCLEANDIRS += sys
 
-EXTRA_libdiffutils_a_SOURCES += strtoimax.c strtoumax.c
+EXTRA_DIST += sys_random.in.h
 
-## end   gnulib module strtoumax
+## end   gnulib module sys_random
 
 ## begin gnulib module sys_stat
 
@@ -2091,23 +2376,29 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
              -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
              -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
-             -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
-             -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
-             -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
-             -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
-             -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
-             -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
-             -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
-             -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
-             -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
-             -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
-             -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
-             -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
-             -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
-             -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \
+             -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \
+             -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \
+             -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \
+             -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \
+             -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \
+             -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \
+             -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \
+             -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \
+             -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \
+             -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \
+             -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \
+             -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \
+             -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \
+             -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \
+             -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_STRUCT_STAT)/g' \
+             -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \
+             -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \
+             -e 's/@''GNULIB_MDA_UMASK''@/$(GL_GNULIB_MDA_UMASK)/g' \
              -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
              -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
              -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+             -e 's|@''HAVE_GETUMASK''@|$(HAVE_GETUMASK)|g' \
              -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
              -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
              -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
@@ -2116,13 +2407,16 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
              -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
              -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+             -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
              -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
              -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
              -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
              -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
              -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
              -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+             -e 's|@''REPLACE_MKFIFOAT''@|$(REPLACE_MKFIFOAT)|g' \
              -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+             -e 's|@''REPLACE_MKNODAT''@|$(REPLACE_MKNODAT)|g' \
              -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
              -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2154,7 +2448,7 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
-             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+             -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GL_GNULIB_GETTIMEOFDAY)/g' \
              -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
              -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
              -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
@@ -2213,7 +2507,7 @@ sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
-             -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \
+             -e 's/@''GNULIB_WAITPID''@/$(GL_GNULIB_WAITPID)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
              < $(srcdir)/sys_wait.in.h; \
@@ -2240,6 +2534,12 @@ EXTRA_DIST += tempname.h
 
 ## end   gnulib module tempname
 
+## begin gnulib module threadlib
+
+libdiffutils_a_SOURCES += glthread/threadlib.c
+
+## end   gnulib module threadlib
+
 ## begin gnulib module time
 
 BUILT_SOURCES += time.h
@@ -2254,22 +2554,24 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-             -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
-             -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \
-             -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
-             -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
-             -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \
-             -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
-             -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
-             -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
-             -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \
-             -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \
+             -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \
+             -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \
+             -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
+             -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
+             -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
+             -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
+             -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
+             -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \
+             -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \
+             -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \
+             -e 's/@''GNULIB_MDA_TZSET''@/$(GL_GNULIB_MDA_TZSET)/g' \
              -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
              -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
              -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
              -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+             -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
              -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
-             -e 's|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \
              -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
              -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
              -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \
@@ -2283,6 +2585,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
              -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
              -e 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@''TIME_H_DEFINES_TIME_UTC''@|$(TIME_H_DEFINES_TIME_UTC)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
@@ -2364,62 +2667,95 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
              -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
-             -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \
-             -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
-             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-             -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \
-             -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
-             -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
-             -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
-             -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
-             -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
-             -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
-             -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
-             -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \
-             -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
-             -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
-             -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
-             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
-             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
-             -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
-             -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-             -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-             -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
-             -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-             -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-             -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-             -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
-             -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-             -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-             -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
-             -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
-             -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
-             -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
-             -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
-             -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
-             -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
-             -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
-             -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
-             -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
-             -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \
-             -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
-             -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
-             -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
-             -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \
-             -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
-             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \
-             -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
-             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
-             -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
-             -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
-             -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
-             -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \
+             -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \
+             -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g' \
+             -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \
+             -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \
+             -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \
+             -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \
+             -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \
+             -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \
+             -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \
+             -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \
+             -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \
+             -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \
+             -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \
+             -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \
+             -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \
+             -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \
+             -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \
+             -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
+             -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
+             -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
+             -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
+             -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
+             -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
+             -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \
+             -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \
+             -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \
+             -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \
+             -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \
+             -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \
+             -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \
+             -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \
+             -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \
+             -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \
+             -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \
+             -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \
+             -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \
+             -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \
+             -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \
+             -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \
+             -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \
+             -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \
+             -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \
+             -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \
+             -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \
+             -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \
+             -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \
+             -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \
+             -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \
+             -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \
+             -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \
+             -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \
+             -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \
+             -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/g' \
+             -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONBLOCKING)/g' \
+             -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)/g' \
+             -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \
+             -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \
+             -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \
+             -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \
+             -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \
+             -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \
+             -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \
+             -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \
+             -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \
+             -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \
+             -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \
+             -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \
+             -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \
+             -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \
+             -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \
+             -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \
+             -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \
+             -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \
+             -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \
+             -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \
+             -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \
+             -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \
+             -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
+             -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
+             -e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
              < $(srcdir)/unistd.in.h | \
          sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
              -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
              -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+             -e 's|@''HAVE_EXECVPE''@|$(HAVE_EXECVPE)|g' \
              -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
              -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \
              -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
@@ -2427,6 +2763,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
              -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
              -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+             -e 's|@''HAVE_GETENTROPY''@|$(HAVE_GETENTROPY)|g' \
              -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
@@ -2448,6 +2785,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
              -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+             -e 's|@''HAVE_DECL_EXECVPE''@|$(HAVE_DECL_EXECVPE)|g' \
              -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
              -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
              -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
@@ -2461,10 +2799,18 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
              -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
          | \
-         sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+         sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
+             -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
              -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
              -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
              -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+             -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
+             -e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
+             -e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
+             -e 's|@''REPLACE_EXECV''@|$(REPLACE_EXECV)|g' \
+             -e 's|@''REPLACE_EXECVE''@|$(REPLACE_EXECVE)|g' \
+             -e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
+             -e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
              -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
              -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
              -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@@ -2495,6 +2841,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
              -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
              -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+             -e 's|@''UNISTD_H_HAVE_SYS_RANDOM_H''@|$(UNISTD_H_HAVE_SYS_RANDOM_H)|g' \
              -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
              -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2582,12 +2929,12 @@ EXTRA_DIST += uniwidth/cjk.h
 
 ## end   gnulib module uniwidth/width
 
-## begin gnulib module unlocked-io
+## begin gnulib module unlocked-io-internal
 
 
 EXTRA_DIST += unlocked-io.h
 
-## end   gnulib module unlocked-io
+## end   gnulib module unlocked-io-internal
 
 ## begin gnulib module unsetenv
 
@@ -2673,47 +3020,49 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
              -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
              -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-             -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-             -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \
-             -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \
-             -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \
-             -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \
-             -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \
-             -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \
-             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \
-             -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \
-             -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \
-             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \
-             -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \
-             -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \
-             -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \
-             -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \
-             -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \
-             -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \
-             -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \
-             -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \
-             -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \
-             -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \
-             -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \
-             -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \
-             -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \
-             -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \
-             -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \
-             -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \
-             -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \
-             -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \
-             -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \
-             -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \
-             -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \
-             -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \
-             -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \
-             -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \
-             -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \
-             -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \
-             -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \
-             -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \
-             -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \
-             -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
+             -e 's/@''GNULIB_BTOWC''@/$(GL_GNULIB_BTOWC)/g' \
+             -e 's/@''GNULIB_WCTOB''@/$(GL_GNULIB_WCTOB)/g' \
+             -e 's/@''GNULIB_MBSINIT''@/$(GL_GNULIB_MBSINIT)/g' \
+             -e 's/@''GNULIB_MBRTOWC''@/$(GL_GNULIB_MBRTOWC)/g' \
+             -e 's/@''GNULIB_MBRLEN''@/$(GL_GNULIB_MBRLEN)/g' \
+             -e 's/@''GNULIB_MBSRTOWCS''@/$(GL_GNULIB_MBSRTOWCS)/g' \
+             -e 's/@''GNULIB_MBSNRTOWCS''@/$(GL_GNULIB_MBSNRTOWCS)/g' \
+             -e 's/@''GNULIB_WCRTOMB''@/$(GL_GNULIB_WCRTOMB)/g' \
+             -e 's/@''GNULIB_WCSRTOMBS''@/$(GL_GNULIB_WCSRTOMBS)/g' \
+             -e 's/@''GNULIB_WCSNRTOMBS''@/$(GL_GNULIB_WCSNRTOMBS)/g' \
+             -e 's/@''GNULIB_WCWIDTH''@/$(GL_GNULIB_WCWIDTH)/g' \
+             -e 's/@''GNULIB_WMEMCHR''@/$(GL_GNULIB_WMEMCHR)/g' \
+             -e 's/@''GNULIB_WMEMCMP''@/$(GL_GNULIB_WMEMCMP)/g' \
+             -e 's/@''GNULIB_WMEMCPY''@/$(GL_GNULIB_WMEMCPY)/g' \
+             -e 's/@''GNULIB_WMEMMOVE''@/$(GL_GNULIB_WMEMMOVE)/g' \
+             -e 's/@''GNULIB_WMEMPCPY''@/$(GL_GNULIB_WMEMPCPY)/g' \
+             -e 's/@''GNULIB_WMEMSET''@/$(GL_GNULIB_WMEMSET)/g' \
+             -e 's/@''GNULIB_WCSLEN''@/$(GL_GNULIB_WCSLEN)/g' \
+             -e 's/@''GNULIB_WCSNLEN''@/$(GL_GNULIB_WCSNLEN)/g' \
+             -e 's/@''GNULIB_WCSCPY''@/$(GL_GNULIB_WCSCPY)/g' \
+             -e 's/@''GNULIB_WCPCPY''@/$(GL_GNULIB_WCPCPY)/g' \
+             -e 's/@''GNULIB_WCSNCPY''@/$(GL_GNULIB_WCSNCPY)/g' \
+             -e 's/@''GNULIB_WCPNCPY''@/$(GL_GNULIB_WCPNCPY)/g' \
+             -e 's/@''GNULIB_WCSCAT''@/$(GL_GNULIB_WCSCAT)/g' \
+             -e 's/@''GNULIB_WCSNCAT''@/$(GL_GNULIB_WCSNCAT)/g' \
+             -e 's/@''GNULIB_WCSCMP''@/$(GL_GNULIB_WCSCMP)/g' \
+             -e 's/@''GNULIB_WCSNCMP''@/$(GL_GNULIB_WCSNCMP)/g' \
+             -e 's/@''GNULIB_WCSCASECMP''@/$(GL_GNULIB_WCSCASECMP)/g' \
+             -e 's/@''GNULIB_WCSNCASECMP''@/$(GL_GNULIB_WCSNCASECMP)/g' \
+             -e 's/@''GNULIB_WCSCOLL''@/$(GL_GNULIB_WCSCOLL)/g' \
+             -e 's/@''GNULIB_WCSXFRM''@/$(GL_GNULIB_WCSXFRM)/g' \
+             -e 's/@''GNULIB_WCSDUP''@/$(GL_GNULIB_WCSDUP)/g' \
+             -e 's/@''GNULIB_WCSCHR''@/$(GL_GNULIB_WCSCHR)/g' \
+             -e 's/@''GNULIB_WCSRCHR''@/$(GL_GNULIB_WCSRCHR)/g' \
+             -e 's/@''GNULIB_WCSCSPN''@/$(GL_GNULIB_WCSCSPN)/g' \
+             -e 's/@''GNULIB_WCSSPN''@/$(GL_GNULIB_WCSSPN)/g' \
+             -e 's/@''GNULIB_WCSPBRK''@/$(GL_GNULIB_WCSPBRK)/g' \
+             -e 's/@''GNULIB_WCSSTR''@/$(GL_GNULIB_WCSSTR)/g' \
+             -e 's/@''GNULIB_WCSTOK''@/$(GL_GNULIB_WCSTOK)/g' \
+             -e 's/@''GNULIB_WCSWIDTH''@/$(GL_GNULIB_WCSWIDTH)/g' \
+             -e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
+             -e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
              < $(srcdir)/wchar.in.h | \
          sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
              -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
@@ -2729,6 +3078,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \
              -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \
              -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \
+             -e 's|@''HAVE_WMEMPCPY''@|$(HAVE_WMEMPCPY)|g' \
              -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \
              -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \
              -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \
@@ -2755,6 +3105,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
              -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
              -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+             -e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
              -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
          | \
          sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
@@ -2771,6 +3122,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
              -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
              -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
              -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+             -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
              -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -2808,18 +3160,22 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
              -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
              -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
              -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \
-             -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
-             -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \
-             -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-             -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
-             -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
-             -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \
+             -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
+             -e 's/@''GNULIB_ISWBLANK''@/$(GL_GNULIB_ISWBLANK)/g' \
+             -e 's/@''GNULIB_ISWDIGIT''@/$(GL_GNULIB_ISWDIGIT)/g' \
+             -e 's/@''GNULIB_ISWXDIGIT''@/$(GL_GNULIB_ISWXDIGIT)/g' \
+             -e 's/@''GNULIB_WCTYPE''@/$(GL_GNULIB_WCTYPE)/g' \
+             -e 's/@''GNULIB_ISWCTYPE''@/$(GL_GNULIB_ISWCTYPE)/g' \
+             -e 's/@''GNULIB_WCTRANS''@/$(GL_GNULIB_WCTRANS)/g' \
+             -e 's/@''GNULIB_TOWCTRANS''@/$(GL_GNULIB_TOWCTRANS)/g' \
              -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \
              -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
              -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \
              -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
              -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
              -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+             -e 's/@''REPLACE_ISWDIGIT''@/$(REPLACE_ISWDIGIT)/g' \
+             -e 's/@''REPLACE_ISWXDIGIT''@/$(REPLACE_ISWXDIGIT)/g' \
              -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
              -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
              -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2842,6 +3198,60 @@ EXTRA_libdiffutils_a_SOURCES += wcwidth.c
 
 ## end   gnulib module wcwidth
 
+## begin gnulib module windows-mutex
+
+
+EXTRA_DIST += windows-initguard.h windows-mutex.c windows-mutex.h
+
+EXTRA_libdiffutils_a_SOURCES += windows-mutex.c
+
+## end   gnulib module windows-mutex
+
+## begin gnulib module windows-once
+
+
+EXTRA_DIST += windows-once.c windows-once.h
+
+EXTRA_libdiffutils_a_SOURCES += windows-once.c
+
+## end   gnulib module windows-once
+
+## begin gnulib module windows-recmutex
+
+
+EXTRA_DIST += windows-initguard.h windows-recmutex.c windows-recmutex.h
+
+EXTRA_libdiffutils_a_SOURCES += windows-recmutex.c
+
+## end   gnulib module windows-recmutex
+
+## begin gnulib module windows-rwlock
+
+
+EXTRA_DIST += windows-initguard.h windows-rwlock.c windows-rwlock.h
+
+EXTRA_libdiffutils_a_SOURCES += windows-rwlock.c
+
+## end   gnulib module windows-rwlock
+
+## begin gnulib module wmemchr
+
+
+EXTRA_DIST += wmemchr-impl.h wmemchr.c
+
+EXTRA_libdiffutils_a_SOURCES += wmemchr.c
+
+## end   gnulib module wmemchr
+
+## begin gnulib module wmempcpy
+
+
+EXTRA_DIST += wmempcpy.c
+
+EXTRA_libdiffutils_a_SOURCES += wmempcpy.c
+
+## end   gnulib module wmempcpy
+
 ## begin gnulib module xalloc
 
 libdiffutils_a_SOURCES += xmalloc.c
@@ -2854,6 +3264,8 @@ EXTRA_DIST += xalloc.h
 
 libdiffutils_a_SOURCES += xalloc-die.c
 
+EXTRA_DIST += xalloc.h
+
 ## end   gnulib module xalloc-die
 
 ## begin gnulib module xalloc-oversized
@@ -2869,6 +3281,14 @@ libdiffutils_a_SOURCES += xfreopen.c xfreopen.h
 
 ## end   gnulib module xfreopen
 
+## begin gnulib module xmalloca
+
+libdiffutils_a_SOURCES += xmalloca.c
+
+EXTRA_DIST += xmalloca.h
+
+## end   gnulib module xmalloca
+
 ## begin gnulib module xreadlink
 
 libdiffutils_a_SOURCES += xreadlink.c
@@ -2883,32 +3303,34 @@ libdiffutils_a_SOURCES += xsize.h xsize.c
 
 ## end   gnulib module xsize
 
+## begin gnulib module xstdopen
+
+libdiffutils_a_SOURCES += xstdopen.c
+
+EXTRA_DIST += xstdopen.h
+
+## end   gnulib module xstdopen
+
 ## begin gnulib module xstriconv
 
 libdiffutils_a_SOURCES += xstriconv.h xstriconv.c
 
 ## end   gnulib module xstriconv
 
-## begin gnulib module xstrndup
+## begin gnulib module xstrtoimax
 
-libdiffutils_a_SOURCES += xstrndup.h xstrndup.c
+libdiffutils_a_SOURCES += xstrtoimax.c
 
-## end   gnulib module xstrndup
+## end   gnulib module xstrtoimax
 
 ## begin gnulib module xstrtol
 
-libdiffutils_a_SOURCES += xstrtol.c xstrtoul.c xstrtol-error.c
+libdiffutils_a_SOURCES += xstrtol.c xstrtoul.c
 
 EXTRA_DIST += xstrtol.h
 
 ## end   gnulib module xstrtol
 
-## begin gnulib module xstrtoumax
-
-libdiffutils_a_SOURCES += xstrtoumax.c
-
-## end   gnulib module xstrtoumax
-
 ## begin gnulib module xvasprintf
 
 libdiffutils_a_SOURCES += xvasprintf.h xvasprintf.c xasprintf.c
index 49bc6ca..8b6802d 100644 (file)
@@ -1,19 +1,19 @@
 /* hard-locale.c -- Determine whether a locale is hard.
 
-   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 Free Software
+   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 #include "hard-locale.h"
 
 #include <locale.h>
-#include <stdlib.h>
 #include <string.h>
 
-#ifdef __GLIBC__
-# define GLIBC_VERSION __GLIBC__
-#elif defined __UCLIBC__
-# define GLIBC_VERSION 2
-#else
-# define GLIBC_VERSION 0
-#endif
-
-/* Return true if the current CATEGORY locale is hard, i.e. if you
-   can't get away with assuming traditional C or POSIX behavior.  */
 bool
 hard_locale (int category)
 {
-  bool hard = true;
-  char const *p = setlocale (category, NULL);
-
-  if (p)
-    {
-      if (2 <= GLIBC_VERSION)
-        {
-          if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
-            hard = false;
-        }
-      else
-        {
-          char *locale = strdup (p);
-          if (locale)
-            {
-              /* Temporarily set the locale to the "C" and "POSIX" locales
-                 to find their names, so that we can determine whether one
-                 or the other is the caller's locale.  */
-              if (((p = setlocale (category, "C"))
-                   && strcmp (p, locale) == 0)
-                  || ((p = setlocale (category, "POSIX"))
-                      && strcmp (p, locale) == 0))
-                hard = false;
+  char locale[SETLOCALE_NULL_MAX];
 
-              /* Restore the caller's locale.  */
-              setlocale (category, locale);
-              free (locale);
-            }
-        }
-    }
+  if (setlocale_null_r (category, locale, sizeof (locale)))
+    return false;
 
-  return hard;
+  return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);
 }
index 22eecc5..eba6601 100644 (file)
@@ -1,18 +1,18 @@
 /* Determine whether a locale is hard.
 
-   Copyright (C) 1999, 2003-2004, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef HARD_LOCALE_H_
@@ -20,6 +20,9 @@
 
 # include <stdbool.h>
 
-bool hard_locale (int);
+/* Return true if the specified CATEGORY of the current locale is hard, i.e.
+   different from the C or POSIX locale that has a fixed behavior.
+   CATEGORY must be one of the LC_* values, but not LC_ALL.  */
+extern bool hard_locale (int category);
 
 #endif /* HARD_LOCALE_H_ */
index 98a8ea3..5f5f8fc 100644 (file)
@@ -1,20 +1,20 @@
 /* hash - hashing table processing.
 
-   Copyright (C) 1998-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2004, 2006-2007, 2009-2021 Free Software Foundation, Inc.
 
    Written by Jim Meyering, 1992.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* A generic hash table package.  */
@@ -138,38 +138,24 @@ static const Hash_tuning default_tuning =
 
 /* Information and lookup.  */
 
-/* The following few functions provide information about the overall hash
-   table organization: the number of entries, number of buckets and maximum
-   length of buckets.  */
-
-/* Return the number of buckets in the hash table.  The table size, the total
-   number of buckets (used plus unused), or the maximum number of slots, are
-   the same quantity.  */
-
 size_t
 hash_get_n_buckets (const Hash_table *table)
 {
   return table->n_buckets;
 }
 
-/* Return the number of slots in use (non-empty buckets).  */
-
 size_t
 hash_get_n_buckets_used (const Hash_table *table)
 {
   return table->n_buckets_used;
 }
 
-/* Return the number of active entries.  */
-
 size_t
 hash_get_n_entries (const Hash_table *table)
 {
   return table->n_entries;
 }
 
-/* Return the length of the longest chain (bucket).  */
-
 size_t
 hash_get_max_bucket_length (const Hash_table *table)
 {
@@ -194,9 +180,6 @@ hash_get_max_bucket_length (const Hash_table *table)
   return max_bucket_length;
 }
 
-/* Do a mild validation of a hash table, by traversing it and checking two
-   statistics.  */
-
 bool
 hash_table_ok (const Hash_table *table)
 {
@@ -254,9 +237,6 @@ safe_hasher (const Hash_table *table, const void *key)
   return table->bucket + n;
 }
 
-/* If ENTRY matches an entry already in the hash table, return the
-   entry from the table.  Otherwise, return NULL.  */
-
 void *
 hash_lookup (const Hash_table *table, const void *entry)
 {
@@ -275,15 +255,6 @@ hash_lookup (const Hash_table *table, const void *entry)
 
 /* Walking.  */
 
-/* The functions in this page traverse the hash table and process the
-   contained entries.  For the traversal to work properly, the hash table
-   should not be resized nor modified while any particular entry is being
-   processed.  In particular, entries should not be added, and an entry
-   may be removed only if there is no shrink threshold and the entry being
-   removed has already been passed to hash_get_next.  */
-
-/* Return the first data in the table, or NULL if the table is empty.  */
-
 void *
 hash_get_first (const Hash_table *table)
 {
@@ -299,10 +270,6 @@ hash_get_first (const Hash_table *table)
       return bucket->data;
 }
 
-/* Return the user data for the entry following ENTRY, where ENTRY has been
-   returned by a previous call to either 'hash_get_first' or 'hash_get_next'.
-   Return NULL if there are no more entries.  */
-
 void *
 hash_get_next (const Hash_table *table, const void *entry)
 {
@@ -328,10 +295,6 @@ hash_get_next (const Hash_table *table, const void *entry)
   return NULL;
 }
 
-/* Fill BUFFER with pointers to active user entries in the hash table, then
-   return the number of pointers copied.  Do not copy more than BUFFER_SIZE
-   pointers.  */
-
 size_t
 hash_get_entries (const Hash_table *table, void **buffer,
                   size_t buffer_size)
@@ -356,14 +319,6 @@ hash_get_entries (const Hash_table *table, void **buffer,
   return counter;
 }
 
-/* Call a PROCESSOR function for each entry of a hash table, and return the
-   number of entries for which the processor function returned success.  A
-   pointer to some PROCESSOR_DATA which will be made available to each call to
-   the processor function.  The PROCESSOR accepts two arguments: the first is
-   the user entry being walked into, the second is the value of PROCESSOR_DATA
-   as received.  The walking continue for as long as the PROCESSOR function
-   returns nonzero.  When it returns zero, the walking is interrupted.  */
-
 size_t
 hash_do_for_each (const Hash_table *table, Hash_processor processor,
                   void *processor_data)
@@ -390,9 +345,6 @@ hash_do_for_each (const Hash_table *table, Hash_processor processor,
 
 /* Allocation and clean-up.  */
 
-/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
-   This is a convenience routine for constructing other hashing functions.  */
-
 #if USE_DIFF_HASH
 
 /* About hashings, Paul Eggert writes to me (FP), on 1994-01-01: "Please see
@@ -546,7 +498,7 @@ compute_bucket_size (size_t candidate, const Hash_tuning *tuning)
   if (!tuning->is_n_buckets)
     {
       float new_candidate = candidate / tuning->growth_threshold;
-      if (SIZE_MAX <= new_candidate)
+      if ((float) SIZE_MAX <= new_candidate)
         return 0;
       candidate = new_candidate;
     }
@@ -556,40 +508,6 @@ compute_bucket_size (size_t candidate, const Hash_tuning *tuning)
   return candidate;
 }
 
-/* Allocate and return a new hash table, or NULL upon failure.  The initial
-   number of buckets is automatically selected so as to _guarantee_ that you
-   may insert at least CANDIDATE different user entries before any growth of
-   the hash table size occurs.  So, if have a reasonably tight a-priori upper
-   bound on the number of entries you intend to insert in the hash table, you
-   may save some table memory and insertion time, by specifying it here.  If
-   the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
-   argument has its meaning changed to the wanted number of buckets.
-
-   TUNING points to a structure of user-supplied values, in case some fine
-   tuning is wanted over the default behavior of the hasher.  If TUNING is
-   NULL, the default tuning parameters are used instead.  If TUNING is
-   provided but the values requested are out of bounds or might cause
-   rounding errors, return NULL.
-
-   The user-supplied HASHER function, when not NULL, accepts two
-   arguments ENTRY and TABLE_SIZE.  It computes, by hashing ENTRY contents, a
-   slot number for that entry which should be in the range 0..TABLE_SIZE-1.
-   This slot number is then returned.
-
-   The user-supplied COMPARATOR function, when not NULL, accepts two
-   arguments pointing to user data, it then returns true for a pair of entries
-   that compare equal, or false otherwise.  This function is internally called
-   on entries which are already known to hash to the same bucket index,
-   but which are distinct pointers.
-
-   The user-supplied DATA_FREER function, when not NULL, may be later called
-   with the user data as an argument, just before the entry containing the
-   data gets freed.  This happens from within 'hash_free' or 'hash_clear'.
-   You should specify this function only if you want these functions to free
-   all of your 'data' data.  This is typically the case when your data is
-   simply an auxiliary struct that you have malloc'd to aggregate several
-   values.  */
-
 Hash_table *
 hash_initialize (size_t candidate, const Hash_tuning *tuning,
                  Hash_hasher hasher, Hash_comparator comparator,
@@ -645,10 +563,6 @@ hash_initialize (size_t candidate, const Hash_tuning *tuning,
   return NULL;
 }
 
-/* Make all buckets empty, placing any chained entries on the free list.
-   Apply the user-specified function data_freer (if any) to the datas of any
-   affected entries.  */
-
 void
 hash_clear (Hash_table *table)
 {
@@ -687,11 +601,6 @@ hash_clear (Hash_table *table)
   table->n_entries = 0;
 }
 
-/* Reclaim all storage associated with a hash table.  If a data_freer
-   function has been supplied by the user when the hash table was created,
-   this function applies it to the data of each entry before freeing that
-   entry.  */
-
 void
 hash_free (Hash_table *table)
 {
@@ -931,14 +840,6 @@ transfer_entries (Hash_table *dst, Hash_table *src, bool safe)
   return true;
 }
 
-/* For an already existing hash table, change the number of buckets through
-   specifying CANDIDATE.  The contents of the hash table are preserved.  The
-   new number of buckets is automatically selected so as to _guarantee_ that
-   the table may receive at least CANDIDATE different user entries, including
-   those already in the table, before any other growth of the hash table size
-   occurs.  If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
-   exact number of buckets desired.  Return true iff the rehash succeeded.  */
-
 bool
 hash_rehash (Hash_table *table, size_t candidate)
 {
@@ -1018,22 +919,6 @@ hash_rehash (Hash_table *table, size_t candidate)
   return false;
 }
 
-/* Insert ENTRY into hash TABLE if there is not already a matching entry.
-
-   Return -1 upon memory allocation failure.
-   Return 1 if insertion succeeded.
-   Return 0 if there is already a matching entry in the table,
-   and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT
-   to that entry.
-
-   This interface is easier to use than hash_insert when you must
-   distinguish between the latter two cases.  More importantly,
-   hash_insert is unusable for some types of ENTRY values.  When using
-   hash_insert, the only way to distinguish those cases is to compare
-   the return value and ENTRY.  That works only when you can have two
-   different ENTRY values that point to data that compares "equal".  Thus,
-   when the ENTRY value is a simple scalar, you must use
-   hash_insert_if_absent.  ENTRY must not be NULL.  */
 int
 hash_insert_if_absent (Hash_table *table, void const *entry,
                        void const **matched_ent)
@@ -1076,7 +961,7 @@ hash_insert_if_absent (Hash_table *table, void const *entry,
              : (table->n_buckets * tuning->growth_factor
                 * tuning->growth_threshold));
 
-          if (SIZE_MAX <= candidate)
+          if ((float) SIZE_MAX <= candidate)
             return -1;
 
           /* If the rehash fails, arrange to return NULL.  */
@@ -1116,12 +1001,6 @@ hash_insert_if_absent (Hash_table *table, void const *entry,
   return 1;
 }
 
-/* If ENTRY matches an entry already in the hash table, return the pointer
-   to the entry from the table.  Otherwise, insert ENTRY and return ENTRY.
-   Return NULL if the storage required for insertion cannot be allocated.
-   This implementation does not support duplicate entries or insertion of
-   NULL.  */
-
 void *
 hash_insert (Hash_table *table, void const *entry)
 {
@@ -1132,12 +1011,8 @@ hash_insert (Hash_table *table, void const *entry)
           : (void *) (err == 0 ? matched_ent : entry));
 }
 
-/* If ENTRY is already in the table, remove it and return the just-deleted
-   data (the user may want to deallocate its storage).  If ENTRY is not in the
-   table, don't modify the table and return NULL.  */
-
 void *
-hash_delete (Hash_table *table, const void *entry)
+hash_remove (Hash_table *table, const void *entry)
 {
   void *data;
   struct hash_entry *bucket;
@@ -1196,6 +1071,12 @@ hash_delete (Hash_table *table, const void *entry)
   return data;
 }
 
+void *
+hash_delete (Hash_table *table, const void *entry)
+{
+  return hash_remove (table, entry);
+}
+
 /* Testing.  */
 
 #if TESTING
index 562f5e6..230d5cd 100644 (file)
@@ -1,19 +1,19 @@
 /* hash - hashing table processing.
-   Copyright (C) 1998-1999, 2001, 2003, 2009-2018 Free Software Foundation,
+   Copyright (C) 1998-1999, 2001, 2003, 2009-2021 Free Software Foundation,
    Inc.
    Written by Jim Meyering <meyering@ascend.com>, 1998.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* A generic hash table package.  */
 # include <stdio.h>
 # include <stdbool.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The warn_unused_result attribute appeared first in gcc-3.4.0.  */
-# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  define _GL_ATTRIBUTE_WUR __attribute__ ((__warn_unused_result__))
-# else
-#  define _GL_ATTRIBUTE_WUR /* empty */
+# ifdef __cplusplus
+extern "C" {
 # endif
 
-# ifndef _GL_ATTRIBUTE_DEPRECATED
-/* The __attribute__((__deprecated__)) feature
-   is available in gcc versions 3.1 and newer.  */
-#  if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1)
-#   define _GL_ATTRIBUTE_DEPRECATED /* empty */
-#  else
-#   define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#  endif
-# endif
-
-typedef size_t (*Hash_hasher) (const void *, size_t);
-typedef bool (*Hash_comparator) (const void *, const void *);
-typedef void (*Hash_data_freer) (void *);
-typedef bool (*Hash_processor) (void *, void *);
-
 struct hash_tuning
   {
     /* This structure is mainly used for 'hash_initialize', see the block
@@ -68,36 +49,213 @@ struct hash_table;
 
 typedef struct hash_table Hash_table;
 
-/* Information and lookup.  */
-size_t hash_get_n_buckets (const Hash_table *) _GL_ATTRIBUTE_PURE;
-size_t hash_get_n_buckets_used (const Hash_table *) _GL_ATTRIBUTE_PURE;
-size_t hash_get_n_entries (const Hash_table *) _GL_ATTRIBUTE_PURE;
-size_t hash_get_max_bucket_length (const Hash_table *) _GL_ATTRIBUTE_PURE;
-bool hash_table_ok (const Hash_table *) _GL_ATTRIBUTE_PURE;
-void hash_print_statistics (const Hash_table *, FILE *);
-void *hash_lookup (const Hash_table *, const void *);
-
-/* Walking.  */
-void *hash_get_first (const Hash_table *) _GL_ATTRIBUTE_PURE;
-void *hash_get_next (const Hash_table *, const void *);
-size_t hash_get_entries (const Hash_table *, void **, size_t);
-size_t hash_do_for_each (const Hash_table *, Hash_processor, void *);
-
-/* Allocation and clean-up.  */
-size_t hash_string (const char *, size_t) _GL_ATTRIBUTE_PURE;
-void hash_reset_tuning (Hash_tuning *);
-Hash_table *hash_initialize (size_t, const Hash_tuning *,
-                             Hash_hasher, Hash_comparator,
-                             Hash_data_freer) _GL_ATTRIBUTE_WUR;
-void hash_clear (Hash_table *);
-void hash_free (Hash_table *);
-
-/* Insertion and deletion.  */
-bool hash_rehash (Hash_table *, size_t) _GL_ATTRIBUTE_WUR;
-void *hash_insert (Hash_table *, const void *) _GL_ATTRIBUTE_WUR;
-
-int hash_insert_if_absent (Hash_table *table, const void *entry,
-                           const void **matched_ent);
-void *hash_delete (Hash_table *, const void *);
+/*
+ * Information and lookup.
+ */
+
+/* The following few functions provide information about the overall hash
+   table organization: the number of entries, number of buckets and maximum
+   length of buckets.  */
+
+/* Return the number of buckets in the hash table.  The table size, the total
+   number of buckets (used plus unused), or the maximum number of slots, are
+   the same quantity.  */
+extern size_t hash_get_n_buckets (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+/* Return the number of slots in use (non-empty buckets).  */
+extern size_t hash_get_n_buckets_used (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+/* Return the number of active entries.  */
+extern size_t hash_get_n_entries (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+/* Return the length of the longest chain (bucket).  */
+extern size_t hash_get_max_bucket_length (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+/* Do a mild validation of a hash table, by traversing it and checking two
+   statistics.  */
+extern bool hash_table_ok (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+extern void hash_print_statistics (const Hash_table *table, FILE *stream);
+
+/* If ENTRY matches an entry already in the hash table, return the
+   entry from the table.  Otherwise, return NULL.  */
+extern void *hash_lookup (const Hash_table *table, const void *entry);
+
+/*
+ * Walking.
+ */
+
+/* The functions in this page traverse the hash table and process the
+   contained entries.  For the traversal to work properly, the hash table
+   should not be resized nor modified while any particular entry is being
+   processed.  In particular, entries should not be added, and an entry
+   may be removed only if there is no shrink threshold and the entry being
+   removed has already been passed to hash_get_next.  */
+
+/* Return the first data in the table, or NULL if the table is empty.  */
+extern void *hash_get_first (const Hash_table *table)
+       _GL_ATTRIBUTE_PURE;
+
+/* Return the user data for the entry following ENTRY, where ENTRY has been
+   returned by a previous call to either 'hash_get_first' or 'hash_get_next'.
+   Return NULL if there are no more entries.  */
+extern void *hash_get_next (const Hash_table *table, const void *entry);
+
+/* Fill BUFFER with pointers to active user entries in the hash table, then
+   return the number of pointers copied.  Do not copy more than BUFFER_SIZE
+   pointers.  */
+extern size_t hash_get_entries (const Hash_table *table, void **buffer,
+                                size_t buffer_size);
+
+typedef bool (*Hash_processor) (void *entry, void *processor_data);
+
+/* Call a PROCESSOR function for each entry of a hash table, and return the
+   number of entries for which the processor function returned success.  A
+   pointer to some PROCESSOR_DATA which will be made available to each call to
+   the processor function.  The PROCESSOR accepts two arguments: the first is
+   the user entry being walked into, the second is the value of PROCESSOR_DATA
+   as received.  The walking continue for as long as the PROCESSOR function
+   returns nonzero.  When it returns zero, the walking is interrupted.  */
+extern size_t hash_do_for_each (const Hash_table *table,
+                                Hash_processor processor, void *processor_data);
+
+/*
+ * Allocation and clean-up.
+ */
+
+/* Return a hash index for a NUL-terminated STRING between 0 and N_BUCKETS-1.
+   This is a convenience routine for constructing other hashing functions.  */
+extern size_t hash_string (const char *string, size_t n_buckets)
+       _GL_ATTRIBUTE_PURE;
+
+extern void hash_reset_tuning (Hash_tuning *tuning);
+
+typedef size_t (*Hash_hasher) (const void *entry, size_t table_size);
+typedef bool (*Hash_comparator) (const void *entry1, const void *entry2);
+typedef void (*Hash_data_freer) (void *entry);
+
+/* Allocate and return a new hash table, or NULL upon failure.  The initial
+   number of buckets is automatically selected so as to _guarantee_ that you
+   may insert at least CANDIDATE different user entries before any growth of
+   the hash table size occurs.  So, if have a reasonably tight a-priori upper
+   bound on the number of entries you intend to insert in the hash table, you
+   may save some table memory and insertion time, by specifying it here.  If
+   the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
+   argument has its meaning changed to the wanted number of buckets.
+
+   TUNING points to a structure of user-supplied values, in case some fine
+   tuning is wanted over the default behavior of the hasher.  If TUNING is
+   NULL, the default tuning parameters are used instead.  If TUNING is
+   provided but the values requested are out of bounds or might cause
+   rounding errors, return NULL.
+
+   The user-supplied HASHER function, when not NULL, accepts two
+   arguments ENTRY and TABLE_SIZE.  It computes, by hashing ENTRY contents, a
+   slot number for that entry which should be in the range 0..TABLE_SIZE-1.
+   This slot number is then returned.
+
+   The user-supplied COMPARATOR function, when not NULL, accepts two
+   arguments pointing to user data, it then returns true for a pair of entries
+   that compare equal, or false otherwise.  This function is internally called
+   on entries which are already known to hash to the same bucket index,
+   but which are distinct pointers.
+
+   The user-supplied DATA_FREER function, when not NULL, may be later called
+   with the user data as an argument, just before the entry containing the
+   data gets freed.  This happens from within 'hash_free' or 'hash_clear'.
+   You should specify this function only if you want these functions to free
+   all of your 'data' data.  This is typically the case when your data is
+   simply an auxiliary struct that you have malloc'd to aggregate several
+   values.  */
+_GL_ATTRIBUTE_NODISCARD
+extern Hash_table *hash_initialize (size_t candidate,
+                                    const Hash_tuning *tuning,
+                                    Hash_hasher hasher,
+                                    Hash_comparator comparator,
+                                    Hash_data_freer data_freer);
+
+/* Same as hash_initialize, but invokes xalloc_die on memory exhaustion.  */
+/* This function is defined by module 'xhash'.  */
+_GL_ATTRIBUTE_NODISCARD
+extern Hash_table *hash_xinitialize (size_t candidate,
+                                     const Hash_tuning *tuning,
+                                     Hash_hasher hasher,
+                                     Hash_comparator comparator,
+                                     Hash_data_freer data_freer);
+
+/* Make all buckets empty, placing any chained entries on the free list.
+   Apply the user-specified function data_freer (if any) to the datas of any
+   affected entries.  */
+extern void hash_clear (Hash_table *table);
+
+/* Reclaim all storage associated with a hash table.  If a data_freer
+   function has been supplied by the user when the hash table was created,
+   this function applies it to the data of each entry before freeing that
+   entry.  */
+extern void hash_free (Hash_table *table);
+
+/*
+ * Insertion and deletion.
+ */
+
+/* For an already existing hash table, change the number of buckets through
+   specifying CANDIDATE.  The contents of the hash table are preserved.  The
+   new number of buckets is automatically selected so as to _guarantee_ that
+   the table may receive at least CANDIDATE different user entries, including
+   those already in the table, before any other growth of the hash table size
+   occurs.  If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
+   exact number of buckets desired.  Return true iff the rehash succeeded.  */
+_GL_ATTRIBUTE_NODISCARD
+extern bool hash_rehash (Hash_table *table, size_t candidate);
+
+/* If ENTRY matches an entry already in the hash table, return the pointer
+   to the entry from the table.  Otherwise, insert ENTRY and return ENTRY.
+   Return NULL if the storage required for insertion cannot be allocated.
+   This implementation does not support duplicate entries or insertion of
+   NULL.  */
+_GL_ATTRIBUTE_NODISCARD
+extern void *hash_insert (Hash_table *table, const void *entry);
+
+/* Same as hash_insert, but invokes xalloc_die on memory exhaustion.  */
+/* This function is defined by module 'xhash'.  */
+extern void *hash_xinsert (Hash_table *table, const void *entry);
+
+/* Insert ENTRY into hash TABLE if there is not already a matching entry.
+
+   Return -1 upon memory allocation failure.
+   Return 1 if insertion succeeded.
+   Return 0 if there is already a matching entry in the table,
+   and in that case, if MATCHED_ENT is non-NULL, set *MATCHED_ENT
+   to that entry.
+
+   This interface is easier to use than hash_insert when you must
+   distinguish between the latter two cases.  More importantly,
+   hash_insert is unusable for some types of ENTRY values.  When using
+   hash_insert, the only way to distinguish those cases is to compare
+   the return value and ENTRY.  That works only when you can have two
+   different ENTRY values that point to data that compares "equal".  Thus,
+   when the ENTRY value is a simple scalar, you must use
+   hash_insert_if_absent.  ENTRY must not be NULL.  */
+extern int hash_insert_if_absent (Hash_table *table, const void *entry,
+                                  const void **matched_ent);
+
+/* If ENTRY is already in the table, remove it and return the just-deleted
+   data (the user may want to deallocate its storage).  If ENTRY is not in the
+   table, don't modify the table and return NULL.  */
+extern void *hash_remove (Hash_table *table, const void *entry);
+
+/* Same as hash_remove.  This interface is deprecated.
+   FIXME: Remove in 2022.  */
+_GL_ATTRIBUTE_DEPRECATED
+extern void *hash_delete (Hash_table *table, const void *entry);
+
+# ifdef __cplusplus
+}
+# endif
 
 #endif
diff --git a/lib/ialloc.c b/lib/ialloc.c
new file mode 100644 (file)
index 0000000..f506b84
--- /dev/null
@@ -0,0 +1,21 @@
+/* malloc with idx_t rather than size_t
+
+   Copyright 2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#define IALLOC_INLINE _GL_EXTERN_INLINE
+#include "ialloc.h"
diff --git a/lib/ialloc.h b/lib/ialloc.h
new file mode 100644 (file)
index 0000000..ebe4aaa
--- /dev/null
@@ -0,0 +1,94 @@
+/* ialloc.h -- malloc with idx_t rather than size_t
+
+   Copyright 2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef IALLOC_H_
+#define IALLOC_H_
+
+#include "idx.h"
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef IALLOC_INLINE
+# define IALLOC_INLINE _GL_INLINE
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+IALLOC_INLINE void * _GL_ATTRIBUTE_COLD
+_gl_alloc_nomem (void)
+{
+  errno = ENOMEM;
+  return NULL;
+}
+
+IALLOC_INLINE void *
+imalloc (idx_t s)
+{
+  return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
+}
+
+IALLOC_INLINE void *
+irealloc (void *p, idx_t s)
+{
+  /* Work around GNU realloc glitch by treating a zero size as if it
+     were 1, so that returning NULL is equivalent to failing.  */
+  return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
+}
+
+IALLOC_INLINE void *
+icalloc (idx_t n, idx_t s)
+{
+  if (SIZE_MAX < n)
+    {
+      if (s != 0)
+        return _gl_alloc_nomem ();
+      n = 0;
+    }
+  if (SIZE_MAX < s)
+    {
+      if (n != 0)
+        return _gl_alloc_nomem ();
+      s = 0;
+    }
+  return calloc (n, s);
+}
+
+IALLOC_INLINE void *
+ireallocarray (void *p, idx_t n, idx_t s)
+{
+  /* Work around GNU reallocarray glitch by treating a zero size as if
+     it were 1, so that returning NULL is equivalent to failing.  */
+  if (n == 0 || s == 0)
+    n = s = 1;
+  return (n <= SIZE_MAX && s <= SIZE_MAX
+          ? reallocarray (p, n, s)
+          : _gl_alloc_nomem ());
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index a04a5e0..bf51493 100644 (file)
@@ -1,18 +1,18 @@
 /* Character set conversion.
-   Copyright (C) 1999-2001, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2001, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -26,9 +26,6 @@
 # include <stdint.h>
 # include <stdlib.h>
 # include "unistr.h"
-# ifndef uintptr_t
-#  define uintptr_t unsigned long
-# endif
 #endif
 
 #if REPLACE_ICONV_UTF
index f8f7262..3a2f94e 100644 (file)
@@ -1,19 +1,19 @@
 /* A GNU-like <iconv.h>.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_ICONV_H
 
@@ -80,17 +80,22 @@ _GL_WARN_ON_USE (iconv_open, "iconv_open is not working correctly everywhere - "
 #  endif
 _GL_FUNCDECL_RPL (iconv, size_t,
                   (iconv_t cd,
-                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
-                   char **outbuf, size_t *outbytesleft));
+                   @ICONV_CONST@ char **restrict inbuf,
+                   size_t *restrict inbytesleft,
+                   char **restrict outbuf, size_t *restrict outbytesleft));
 _GL_CXXALIAS_RPL (iconv, size_t,
                   (iconv_t cd,
-                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
-                   char **outbuf, size_t *outbytesleft));
+                   @ICONV_CONST@ char **restrict inbuf,
+                   size_t *restrict inbytesleft,
+                   char **restrict outbuf, size_t *restrict outbytesleft));
 # else
-_GL_CXXALIAS_SYS (iconv, size_t,
-                  (iconv_t cd,
-                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
-                   char **outbuf, size_t *outbytesleft));
+/* Need to cast, because on some versions of Solaris, ICONV_CONST does
+   not have the right value for C++.  */
+_GL_CXXALIAS_SYS_CAST (iconv, size_t,
+                       (iconv_t cd,
+                        @ICONV_CONST@ char **restrict inbuf,
+                        size_t *restrict inbytesleft,
+                        char **restrict outbuf, size_t *restrict outbytesleft));
 # endif
 _GL_CXXALIASWARN (iconv);
 # ifndef ICONV_CONST
index 5ae2959..7429b92 100644 (file)
@@ -1,18 +1,18 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -20,9 +20,6 @@
 #include <iconv.h>
 
 #include <stdint.h>
-#ifndef uintptr_t
-# define uintptr_t unsigned long
-#endif
 
 int
 rpl_iconv_close (iconv_t cd)
index 6782b99..d073759 100644 (file)
@@ -1,3 +1,19 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 %struct-type
 %language=ANSI-C
index 4b44ffa..85ed767 100644 (file)
@@ -29,7 +29,7 @@
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
-#line 1 "./iconv_open-aix.gperf"
+#line 17 "./iconv_open-aix.gperf"
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 
 #define TOTAL_KEYWORDS 32
@@ -156,74 +156,74 @@ static const struct stringpool_t stringpool_contents =
 static const struct mapping mappings[] =
   {
     {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#line 43 "./iconv_open-aix.gperf"
+#line 59 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "IBM-eucTW"},
-#line 42 "./iconv_open-aix.gperf"
+#line 58 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "IBM-eucKR"},
-#line 25 "./iconv_open-aix.gperf"
-    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "IBM-852"},
 #line 41 "./iconv_open-aix.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "IBM-852"},
+#line 57 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "IBM-eucJP"},
-#line 14 "./iconv_open-aix.gperf"
+#line 30 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "ISO8859-2"},
-#line 27 "./iconv_open-aix.gperf"
+#line 43 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "IBM-857"},
-#line 24 "./iconv_open-aix.gperf"
+#line 40 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "IBM-850"},
-#line 19 "./iconv_open-aix.gperf"
+#line 35 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-7"},
-#line 33 "./iconv_open-aix.gperf"
+#line 49 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "IBM-932"},
-#line 40 "./iconv_open-aix.gperf"
+#line 56 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "IBM-eucCN"},
-#line 44 "./iconv_open-aix.gperf"
+#line 60 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "big5"},
-#line 23 "./iconv_open-aix.gperf"
+#line 39 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "IBM-437"},
     {-1},
-#line 17 "./iconv_open-aix.gperf"
+#line 33 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "ISO8859-5"},
-#line 22 "./iconv_open-aix.gperf"
+#line 38 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "ISO8859-15"},
-#line 15 "./iconv_open-aix.gperf"
-    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "ISO8859-3"},
 #line 31 "./iconv_open-aix.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "ISO8859-3"},
+#line 47 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "IBM-921"},
-#line 35 "./iconv_open-aix.gperf"
+#line 51 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "IBM-1046"},
-#line 20 "./iconv_open-aix.gperf"
+#line 36 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "ISO8859-8"},
-#line 26 "./iconv_open-aix.gperf"
+#line 42 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "IBM-856"},
-#line 37 "./iconv_open-aix.gperf"
+#line 53 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "IBM-1125"},
-#line 18 "./iconv_open-aix.gperf"
+#line 34 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "ISO8859-6"},
-#line 29 "./iconv_open-aix.gperf"
+#line 45 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "IBM-865"},
-#line 32 "./iconv_open-aix.gperf"
+#line 48 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "IBM-922"},
-#line 39 "./iconv_open-aix.gperf"
+#line 55 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "IBM-1252"},
-#line 21 "./iconv_open-aix.gperf"
+#line 37 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "ISO8859-9"},
     {-1},
-#line 34 "./iconv_open-aix.gperf"
+#line 50 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "IBM-943"},
-#line 16 "./iconv_open-aix.gperf"
+#line 32 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "ISO8859-4"},
-#line 13 "./iconv_open-aix.gperf"
+#line 29 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "ISO8859-1"},
     {-1}, {-1},
-#line 38 "./iconv_open-aix.gperf"
+#line 54 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "IBM-1129"},
     {-1},
-#line 30 "./iconv_open-aix.gperf"
+#line 46 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "IBM-869"},
-#line 36 "./iconv_open-aix.gperf"
+#line 52 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "IBM-1124"},
     {-1}, {-1},
-#line 28 "./iconv_open-aix.gperf"
+#line 44 "./iconv_open-aix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, "IBM-861"}
   };
 
index 5a35c83..f4664d6 100644 (file)
@@ -1,3 +1,19 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 struct mapping { int standard_name; const char vendor_name[9 + 1]; };
 %struct-type
 %language=ANSI-C
index 8766e38..fe3c289 100644 (file)
@@ -29,7 +29,7 @@
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
-#line 1 "./iconv_open-hpux.gperf"
+#line 17 "./iconv_open-hpux.gperf"
 struct mapping { int standard_name; const char vendor_name[9 + 1]; };
 
 #define TOTAL_KEYWORDS 44
@@ -180,93 +180,93 @@ static const struct stringpool_t stringpool_contents =
 static const struct mapping mappings[] =
   {
     {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#line 40 "./iconv_open-hpux.gperf"
+#line 56 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "cp1256"},
-#line 34 "./iconv_open-hpux.gperf"
+#line 50 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "cp1250"},
-#line 35 "./iconv_open-hpux.gperf"
+#line 51 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "cp1251"},
-#line 23 "./iconv_open-hpux.gperf"
+#line 39 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "cp850"},
-#line 49 "./iconv_open-hpux.gperf"
+#line 65 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "tis620"},
-#line 38 "./iconv_open-hpux.gperf"
+#line 54 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "cp1254"},
-#line 16 "./iconv_open-hpux.gperf"
+#line 32 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "iso88596"},
-#line 53 "./iconv_open-hpux.gperf"
+#line 69 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "eucTW"},
-#line 13 "./iconv_open-hpux.gperf"
+#line 29 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "iso88591"},
-#line 19 "./iconv_open-hpux.gperf"
+#line 35 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "iso88599"},
-#line 39 "./iconv_open-hpux.gperf"
+#line 55 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "cp1255"},
-#line 54 "./iconv_open-hpux.gperf"
+#line 70 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "big5"},
-#line 25 "./iconv_open-hpux.gperf"
-    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "cp855"},
 #line 41 "./iconv_open-hpux.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "cp855"},
+#line 57 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "cp1257"},
-#line 52 "./iconv_open-hpux.gperf"
+#line 68 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "eucKR"},
-#line 26 "./iconv_open-hpux.gperf"
+#line 42 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "cp857"},
-#line 15 "./iconv_open-hpux.gperf"
+#line 31 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "iso88595"},
-#line 20 "./iconv_open-hpux.gperf"
+#line 36 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "iso885915"},
-#line 31 "./iconv_open-hpux.gperf"
+#line 47 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "cp866"},
-#line 17 "./iconv_open-hpux.gperf"
+#line 33 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "iso88597"},
-#line 27 "./iconv_open-hpux.gperf"
+#line 43 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "cp861"},
-#line 32 "./iconv_open-hpux.gperf"
+#line 48 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "cp869"},
-#line 33 "./iconv_open-hpux.gperf"
+#line 49 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "cp874"},
-#line 29 "./iconv_open-hpux.gperf"
+#line 45 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "cp864"},
-#line 36 "./iconv_open-hpux.gperf"
+#line 52 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "cp1252"},
-#line 21 "./iconv_open-hpux.gperf"
+#line 37 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "cp437"},
-#line 24 "./iconv_open-hpux.gperf"
+#line 40 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "cp852"},
-#line 22 "./iconv_open-hpux.gperf"
+#line 38 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "cp775"},
-#line 30 "./iconv_open-hpux.gperf"
+#line 46 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "cp865"},
-#line 51 "./iconv_open-hpux.gperf"
+#line 67 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "eucJP"},
-#line 14 "./iconv_open-hpux.gperf"
+#line 30 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "iso88592"},
-#line 55 "./iconv_open-hpux.gperf"
+#line 71 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "sjis"},
-#line 42 "./iconv_open-hpux.gperf"
+#line 58 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "cp1258"},
-#line 56 "./iconv_open-hpux.gperf"
+#line 72 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "utf8"},
-#line 48 "./iconv_open-hpux.gperf"
+#line 64 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "kana8"},
-#line 43 "./iconv_open-hpux.gperf"
+#line 59 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "roman8"},
-#line 46 "./iconv_open-hpux.gperf"
+#line 62 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "hebrew8"},
-#line 50 "./iconv_open-hpux.gperf"
+#line 66 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, "hp15CN"},
-#line 18 "./iconv_open-hpux.gperf"
+#line 34 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, "iso88598"},
-#line 47 "./iconv_open-hpux.gperf"
+#line 63 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, "turkish8"},
-#line 45 "./iconv_open-hpux.gperf"
+#line 61 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, "greek8"},
-#line 44 "./iconv_open-hpux.gperf"
+#line 60 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "arabic8"},
-#line 28 "./iconv_open-hpux.gperf"
+#line 44 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48, "cp862"},
-#line 37 "./iconv_open-hpux.gperf"
+#line 53 "./iconv_open-hpux.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49, "cp1253"}
   };
 
index 3672a80..9885d92 100644 (file)
@@ -1,3 +1,19 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 %struct-type
 %language=ANSI-C
index 68eaa37..9eec045 100644 (file)
@@ -29,7 +29,7 @@
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
-#line 1 "./iconv_open-irix.gperf"
+#line 17 "./iconv_open-irix.gperf"
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 
 #define TOTAL_KEYWORDS 19
@@ -130,43 +130,43 @@ static const struct stringpool_t stringpool_contents =
 static const struct mapping mappings[] =
   {
     {-1}, {-1}, {-1}, {-1}, {-1},
-#line 24 "./iconv_open-irix.gperf"
+#line 40 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5, "DOS855"},
-#line 29 "./iconv_open-irix.gperf"
+#line 45 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "eucTW"},
-#line 28 "./iconv_open-irix.gperf"
+#line 44 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "eucKR"},
-#line 25 "./iconv_open-irix.gperf"
+#line 41 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "WIN1251"},
-#line 30 "./iconv_open-irix.gperf"
+#line 46 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "sjis"},
-#line 17 "./iconv_open-irix.gperf"
+#line 33 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "ISO8859-5"},
-#line 22 "./iconv_open-irix.gperf"
+#line 38 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "ISO8859-15"},
-#line 13 "./iconv_open-irix.gperf"
+#line 29 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "ISO8859-1"},
-#line 27 "./iconv_open-irix.gperf"
+#line 43 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "eucJP"},
-#line 23 "./iconv_open-irix.gperf"
+#line 39 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "KOI8"},
-#line 14 "./iconv_open-irix.gperf"
+#line 30 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "ISO8859-2"},
-#line 26 "./iconv_open-irix.gperf"
+#line 42 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "eucCN"},
-#line 21 "./iconv_open-irix.gperf"
+#line 37 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "ISO8859-9"},
-#line 20 "./iconv_open-irix.gperf"
+#line 36 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "ISO8859-8"},
-#line 19 "./iconv_open-irix.gperf"
+#line 35 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "ISO8859-7"},
-#line 18 "./iconv_open-irix.gperf"
+#line 34 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "ISO8859-6"},
-#line 16 "./iconv_open-irix.gperf"
+#line 32 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "ISO8859-4"},
-#line 15 "./iconv_open-irix.gperf"
-    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "ISO8859-3"},
 #line 31 "./iconv_open-irix.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "ISO8859-3"},
+#line 47 "./iconv_open-irix.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "TIS620"}
   };
 
index f468ff6..d818d79 100644 (file)
@@ -1,3 +1,19 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 %struct-type
 %language=ANSI-C
index bda4e3b..cf23c08 100644 (file)
@@ -29,7 +29,7 @@
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
-#line 1 "./iconv_open-osf.gperf"
+#line 17 "./iconv_open-osf.gperf"
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 
 #define TOTAL_KEYWORDS 38
@@ -168,84 +168,84 @@ static const struct stringpool_t stringpool_contents =
 static const struct mapping mappings[] =
   {
     {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
-#line 41 "./iconv_open-osf.gperf"
+#line 57 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "cp1255"},
-#line 24 "./iconv_open-osf.gperf"
+#line 40 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "cp775"},
-#line 36 "./iconv_open-osf.gperf"
+#line 52 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "cp1250"},
-#line 47 "./iconv_open-osf.gperf"
+#line 63 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "eucTW"},
-#line 46 "./iconv_open-osf.gperf"
+#line 62 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "eucKR"},
-#line 50 "./iconv_open-osf.gperf"
+#line 66 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "TACTIS"},
-#line 17 "./iconv_open-osf.gperf"
+#line 33 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "ISO8859-5"},
-#line 22 "./iconv_open-osf.gperf"
+#line 38 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-15"},
-#line 48 "./iconv_open-osf.gperf"
+#line 64 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "big5"},
-#line 27 "./iconv_open-osf.gperf"
+#line 43 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "cp855"},
-#line 44 "./iconv_open-osf.gperf"
+#line 60 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "cp1258"},
-#line 25 "./iconv_open-osf.gperf"
+#line 41 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "cp850"},
-#line 31 "./iconv_open-osf.gperf"
+#line 47 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "cp865"},
-#line 45 "./iconv_open-osf.gperf"
+#line 61 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "eucJP"},
-#line 43 "./iconv_open-osf.gperf"
+#line 59 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "cp1257"},
-#line 42 "./iconv_open-osf.gperf"
+#line 58 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "cp1256"},
-#line 20 "./iconv_open-osf.gperf"
+#line 36 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "ISO8859-8"},
-#line 49 "./iconv_open-osf.gperf"
+#line 65 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "SJIS"},
     {-1},
-#line 21 "./iconv_open-osf.gperf"
+#line 37 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "ISO8859-9"},
-#line 19 "./iconv_open-osf.gperf"
+#line 35 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "ISO8859-7"},
-#line 18 "./iconv_open-osf.gperf"
+#line 34 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "ISO8859-6"},
     {-1},
-#line 28 "./iconv_open-osf.gperf"
+#line 44 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "cp857"},
-#line 38 "./iconv_open-osf.gperf"
+#line 54 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "cp1252"},
-#line 33 "./iconv_open-osf.gperf"
+#line 49 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "cp869"},
-#line 35 "./iconv_open-osf.gperf"
+#line 51 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "KSC5601"},
-#line 32 "./iconv_open-osf.gperf"
+#line 48 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "cp866"},
-#line 23 "./iconv_open-osf.gperf"
+#line 39 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "cp437"},
-#line 37 "./iconv_open-osf.gperf"
+#line 53 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "cp1251"},
-#line 14 "./iconv_open-osf.gperf"
+#line 30 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "ISO8859-2"},
-#line 40 "./iconv_open-osf.gperf"
+#line 56 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "cp1254"},
-#line 34 "./iconv_open-osf.gperf"
+#line 50 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "cp874"},
-#line 26 "./iconv_open-osf.gperf"
+#line 42 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "cp852"},
-#line 39 "./iconv_open-osf.gperf"
+#line 55 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "cp1253"},
-#line 13 "./iconv_open-osf.gperf"
+#line 29 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "ISO8859-1"},
-#line 30 "./iconv_open-osf.gperf"
+#line 46 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "cp862"},
-#line 16 "./iconv_open-osf.gperf"
+#line 32 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, "ISO8859-4"},
     {-1}, {-1},
-#line 15 "./iconv_open-osf.gperf"
+#line 31 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, "ISO8859-3"},
-#line 29 "./iconv_open-osf.gperf"
+#line 45 "./iconv_open-osf.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "cp861"}
   };
 
index 7d7da38..648dd3a 100644 (file)
@@ -1,3 +1,19 @@
+/* Character set conversion.
+   Copyright (C) 2007, 2009, 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 %struct-type
 %language=ANSI-C
index de7dbce..b38b16c 100644 (file)
@@ -29,7 +29,7 @@
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
 
-#line 1 "./iconv_open-solaris.gperf"
+#line 17 "./iconv_open-solaris.gperf"
 struct mapping { int standard_name; const char vendor_name[10 + 1]; };
 
 #define TOTAL_KEYWORDS 13
@@ -132,32 +132,32 @@ static const struct stringpool_t stringpool_contents =
 static const struct mapping mappings[] =
   {
     {-1}, {-1}, {-1}, {-1}, {-1},
-#line 19 "./iconv_open-solaris.gperf"
+#line 35 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5, "646"},
-#line 30 "./iconv_open-solaris.gperf"
+#line 46 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str6, "ansi-1251"},
-#line 18 "./iconv_open-solaris.gperf"
+#line 34 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7},
     {-1}, {-1},
-#line 20 "./iconv_open-solaris.gperf"
+#line 36 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "ISO8859-1"},
-#line 29 "./iconv_open-solaris.gperf"
+#line 45 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "ISO8859-15"},
-#line 28 "./iconv_open-solaris.gperf"
+#line 44 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "ISO8859-9"},
-#line 27 "./iconv_open-solaris.gperf"
+#line 43 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-8"},
-#line 26 "./iconv_open-solaris.gperf"
+#line 42 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "ISO8859-7"},
-#line 25 "./iconv_open-solaris.gperf"
+#line 41 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "ISO8859-6"},
-#line 24 "./iconv_open-solaris.gperf"
+#line 40 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "ISO8859-5"},
-#line 23 "./iconv_open-solaris.gperf"
+#line 39 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "ISO8859-4"},
-#line 22 "./iconv_open-solaris.gperf"
+#line 38 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "ISO8859-3"},
-#line 21 "./iconv_open-solaris.gperf"
+#line 37 "./iconv_open-solaris.gperf"
     {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "ISO8859-2"}
   };
 
diff --git a/lib/iconv_open-zos.gperf b/lib/iconv_open-zos.gperf
new file mode 100644 (file)
index 0000000..1c3552e
--- /dev/null
@@ -0,0 +1,76 @@
+/* Character set conversion.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+ASCII, "00367"
+ISO-8859-1, "ISO8859-1"
+ISO-8859-2, "ISO8859-2"
+ISO-8859-3, "00913"
+ISO-8859-4, "ISO8859-4"
+ISO-8859-5, "ISO8859-5"
+ISO-8859-6, "ISO8859-6"
+ISO-8859-7, "ISO8859-7"
+ISO-8859-8, "05012"
+ISO-8859-9, "ISO8859-9"
+ISO-8859-13, "ISO8859-13"
+ISO-8859-15, "ISO8859-15"
+KOI8-R, "00878"
+KOI8-U, "01168"
+CP437, "IBM-437"
+CP775, "00775"
+CP850, "09042"
+CP852, "IBM-852"
+CP855, "13143"
+CP856, "IBM-856"
+CP857, "00857"
+CP861, "IBM-861"
+CP862, "IBM-862"
+CP864, "IBM-864"
+CP865, "00865"
+CP866, "04962"
+CP869, "IBM-869"
+CP874, "TIS-620"
+CP922, "IBM-922"
+CP932, "IBM-943"
+CP943, "IBM-943"
+CP949, "IBM-1363"
+CP1046, "IBM-1046"
+CP1124, "IBM-1124"
+CP1125, "IBM-1125"
+CP1129, "01129"
+CP1131, "01131"
+CP1250, "IBM-5346"
+CP1251, "IBM-5347"
+CP1252, "IBM-5348"
+CP1253, "IBM-5349"
+CP1254, "IBM-5350"
+CP1255, "09447"
+CP1256, "09448"
+CP1257, "09449"
+GB2312, "IBM-eucCN"
+EUC-JP, "01350"
+EUC-KR, "IBM-eucKR"
+GBK, "IBM-1386"
diff --git a/lib/iconv_open-zos.h b/lib/iconv_open-zos.h
new file mode 100644 (file)
index 0000000..5f84725
--- /dev/null
@@ -0,0 +1,329 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf -m 10 ./iconv_open-zos.gperf  */
+/* Computed positions: -k'4,$' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
+#endif
+
+#line 17 "./iconv_open-zos.gperf"
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+
+#define TOTAL_KEYWORDS 49
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 11
+#define MIN_HASH_VALUE 3
+#define MAX_HASH_VALUE 64
+/* maximum key range = 62, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+mapping_hash (register const char *str, register size_t len)
+{
+  static const unsigned char asso_values[] =
+    {
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 16, 38,
+      14,  1, 32, 22, 29,  3,  0,  7, 40,  2,
+       5, 18, 23, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65,  0, 65,  0, 65, 65, 65,  0,
+      43, 65,  1, 65, 65,  8, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+      65, 65
+    };
+  register unsigned int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[3]+6];
+      /*FALLTHROUGH*/
+      case 3:
+        break;
+    }
+  return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+struct stringpool_t
+  {
+    char stringpool_str3[sizeof("GBK")];
+    char stringpool_str5[sizeof("ASCII")];
+    char stringpool_str7[sizeof("CP1253")];
+    char stringpool_str8[sizeof("EUC-KR")];
+    char stringpool_str9[sizeof("CP1257")];
+    char stringpool_str10[sizeof("CP857")];
+    char stringpool_str11[sizeof("ISO-8859-8")];
+    char stringpool_str12[sizeof("ISO-8859-3")];
+    char stringpool_str13[sizeof("ISO-8859-13")];
+    char stringpool_str14[sizeof("ISO-8859-7")];
+    char stringpool_str15[sizeof("CP437")];
+    char stringpool_str16[sizeof("CP1129")];
+    char stringpool_str17[sizeof("CP869")];
+    char stringpool_str18[sizeof("ISO-8859-9")];
+    char stringpool_str19[sizeof("CP922")];
+    char stringpool_str20[sizeof("CP1252")];
+    char stringpool_str21[sizeof("CP852")];
+    char stringpool_str22[sizeof("CP1250")];
+    char stringpool_str23[sizeof("CP850")];
+    char stringpool_str24[sizeof("CP862")];
+    char stringpool_str25[sizeof("ISO-8859-2")];
+    char stringpool_str26[sizeof("CP932")];
+    char stringpool_str27[sizeof("GB2312")];
+    char stringpool_str28[sizeof("CP1255")];
+    char stringpool_str29[sizeof("CP855")];
+    char stringpool_str30[sizeof("KOI8-R")];
+    char stringpool_str31[sizeof("CP1125")];
+    char stringpool_str32[sizeof("CP865")];
+    char stringpool_str33[sizeof("ISO-8859-5")];
+    char stringpool_str34[sizeof("ISO-8859-15")];
+    char stringpool_str35[sizeof("CP1256")];
+    char stringpool_str36[sizeof("CP856")];
+    char stringpool_str37[sizeof("KOI8-U")];
+    char stringpool_str38[sizeof("CP1254")];
+    char stringpool_str39[sizeof("CP866")];
+    char stringpool_str40[sizeof("ISO-8859-6")];
+    char stringpool_str41[sizeof("CP1124")];
+    char stringpool_str42[sizeof("CP864")];
+    char stringpool_str43[sizeof("ISO-8859-4")];
+    char stringpool_str44[sizeof("CP1251")];
+    char stringpool_str45[sizeof("CP775")];
+    char stringpool_str46[sizeof("CP943")];
+    char stringpool_str47[sizeof("CP1131")];
+    char stringpool_str48[sizeof("CP861")];
+    char stringpool_str49[sizeof("ISO-8859-1")];
+    char stringpool_str50[sizeof("EUC-JP")];
+    char stringpool_str52[sizeof("CP949")];
+    char stringpool_str55[sizeof("CP874")];
+    char stringpool_str64[sizeof("CP1046")];
+  };
+static const struct stringpool_t stringpool_contents =
+  {
+    "GBK",
+    "ASCII",
+    "CP1253",
+    "EUC-KR",
+    "CP1257",
+    "CP857",
+    "ISO-8859-8",
+    "ISO-8859-3",
+    "ISO-8859-13",
+    "ISO-8859-7",
+    "CP437",
+    "CP1129",
+    "CP869",
+    "ISO-8859-9",
+    "CP922",
+    "CP1252",
+    "CP852",
+    "CP1250",
+    "CP850",
+    "CP862",
+    "ISO-8859-2",
+    "CP932",
+    "GB2312",
+    "CP1255",
+    "CP855",
+    "KOI8-R",
+    "CP1125",
+    "CP865",
+    "ISO-8859-5",
+    "ISO-8859-15",
+    "CP1256",
+    "CP856",
+    "KOI8-U",
+    "CP1254",
+    "CP866",
+    "ISO-8859-6",
+    "CP1124",
+    "CP864",
+    "ISO-8859-4",
+    "CP1251",
+    "CP775",
+    "CP943",
+    "CP1131",
+    "CP861",
+    "ISO-8859-1",
+    "EUC-JP",
+    "CP949",
+    "CP874",
+    "CP1046"
+  };
+#define stringpool ((const char *) &stringpool_contents)
+
+static const struct mapping mappings[] =
+  {
+    {-1}, {-1}, {-1},
+#line 76 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str3, "IBM-1386"},
+    {-1},
+#line 28 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str5, "00367"},
+    {-1},
+#line 68 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str7, "IBM-5349"},
+#line 75 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8, "IBM-eucKR"},
+#line 72 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str9, "09449"},
+#line 48 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str10, "00857"},
+#line 36 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str11, "05012"},
+#line 31 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12, "00913"},
+#line 38 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13, "ISO8859-13"},
+#line 35 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14, "ISO8859-7"},
+#line 42 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str15, "IBM-437"},
+#line 63 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str16, "01129"},
+#line 54 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17, "IBM-869"},
+#line 37 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18, "ISO8859-9"},
+#line 56 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str19, "IBM-922"},
+#line 67 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20, "IBM-5348"},
+#line 45 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str21, "IBM-852"},
+#line 65 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str22, "IBM-5346"},
+#line 44 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str23, "09042"},
+#line 50 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24, "IBM-862"},
+#line 30 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str25, "ISO8859-2"},
+#line 57 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26, "IBM-943"},
+#line 73 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str27, "IBM-eucCN"},
+#line 70 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str28, "09447"},
+#line 46 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29, "13143"},
+#line 40 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30, "00878"},
+#line 62 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31, "IBM-1125"},
+#line 52 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str32, "00865"},
+#line 33 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str33, "ISO8859-5"},
+#line 39 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str34, "ISO8859-15"},
+#line 71 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str35, "09448"},
+#line 47 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36, "IBM-856"},
+#line 41 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str37, "01168"},
+#line 69 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38, "IBM-5350"},
+#line 53 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39, "04962"},
+#line 34 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str40, "ISO8859-6"},
+#line 61 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str41, "IBM-1124"},
+#line 51 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str42, "IBM-864"},
+#line 32 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str43, "ISO8859-4"},
+#line 66 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44, "IBM-5347"},
+#line 43 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str45, "00775"},
+#line 58 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str46, "IBM-943"},
+#line 64 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str47, "01131"},
+#line 49 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48, "IBM-861"},
+#line 29 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49, "ISO8859-1"},
+#line 74 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str50, "01350"},
+    {-1},
+#line 59 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str52, "IBM-1363"},
+    {-1}, {-1},
+#line 55 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str55, "TIS-620"},
+    {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
+#line 60 "./iconv_open-zos.gperf"
+    {(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64, "IBM-1046"}
+  };
+
+const struct mapping *
+mapping_lookup (register const char *str, register size_t len)
+{
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register unsigned int key = mapping_hash (str, len);
+
+      if (key <= MAX_HASH_VALUE)
+        {
+          register int o = mappings[key].standard_name;
+          if (o >= 0)
+            {
+              register const char *s = o + stringpool;
+
+              if (*str == *s && !strcmp (str + 1, s + 1))
+                return &mappings[key];
+            }
+        }
+    }
+  return 0;
+}
index eb8ff36..e573556 100644 (file)
@@ -1,18 +1,18 @@
 /* Character set conversion.
-   Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -36,6 +36,7 @@
 #define ICONV_FLAVOR_IRIX "iconv_open-irix.h"
 #define ICONV_FLAVOR_OSF "iconv_open-osf.h"
 #define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h"
+#define ICONV_FLAVOR_ZOS "iconv_open-zos.h"
 
 #ifdef ICONV_FLAVOR
 # include ICONV_FLAVOR
diff --git a/lib/idx.h b/lib/idx.h
new file mode 100644 (file)
index 0000000..483587e
--- /dev/null
+++ b/lib/idx.h
@@ -0,0 +1,114 @@
+/* A type for indices and sizes.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _IDX_H
+#define _IDX_H
+
+/* Get ptrdiff_t.  */
+#include <stddef.h>
+
+/* Get PTRDIFF_MAX.  */
+#include <stdint.h>
+
+/* The type 'idx_t' holds an (array) index or an (object) size.
+   Its implementation promotes to a signed integer type,
+   which can hold the values
+     0..2^63-1 (on 64-bit platforms) or
+     0..2^31-1 (on 32-bit platforms).
+
+   Why a signed integer type?
+
+     * Security: Signed types can be checked for overflow via
+       '-fsanitize=undefined', but unsigned types cannot.
+
+     * Comparisons without surprises: ISO C99 § 6.3.1.8 specifies a few
+       surprising results for comparisons, such as
+
+           (int) -3 < (unsigned long) 7  =>  false
+           (int) -3 < (unsigned int) 7   =>  false
+       and on 32-bit machines:
+           (long) -3 < (unsigned int) 7  =>  false
+
+       This is surprising because the natural comparison order is by
+       value in the realm of infinite-precision signed integers (ℤ).
+
+       The best way to get rid of such surprises is to use signed types
+       for numerical integer values, and use unsigned types only for
+       bit masks and enums.
+
+   Why not use 'size_t' directly?
+
+     * Because 'size_t' is an unsigned type, and a signed type is better.
+       See above.
+
+   Why not use 'ptrdiff_t' directly?
+
+     * Maintainability: When reading and modifying code, it helps to know that
+       a certain variable cannot have negative values.  For example, when you
+       have a loop
+
+         int n = ...;
+         for (int i = 0; i < n; i++) ...
+
+       or
+
+         ptrdiff_t n = ...;
+         for (ptrdiff_t i = 0; i < n; i++) ...
+
+       you have to ask yourself "what if n < 0?".  Whereas in
+
+         idx_t n = ...;
+         for (idx_t i = 0; i < n; i++) ...
+
+       you know that this case cannot happen.
+
+       Similarly, when a programmer writes
+
+         idx_t = ptr2 - ptr1;
+
+       there is an implied assertion that ptr1 and ptr2 point into the same
+       object and that ptr1 <= ptr2.
+
+     * Being future-proof: In the future, range types (integers which are
+       constrained to a certain range of values) may be added to C compilers
+       or to the C standard.  Several programming languages (Ada, Haskell,
+       Common Lisp, Pascal) already have range types.  Such range types may
+       help producing good code and good warnings.  The type 'idx_t' could
+       then be typedef'ed to a range type that is signed after promotion.  */
+
+/* In the future, idx_t could be typedef'ed to a signed range type.
+   The clang "extended integer types", supported in Clang 11 or newer
+   <https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types>,
+   are a special case of range types.  However, these types don't support binary
+   operators with plain integer types (e.g. expressions such as x > 1).
+   Therefore, they don't behave like signed types (and not like unsigned types
+   either).  So, we cannot use them here.  */
+
+/* Use the signed type 'ptrdiff_t'.  */
+/* Note: ISO C does not mandate that 'size_t' and 'ptrdiff_t' have the same
+   size, but it is so on all platforms we have seen since 1990.  */
+typedef ptrdiff_t idx_t;
+
+/* IDX_MAX is the maximum value of an idx_t.  */
+#define IDX_MAX PTRDIFF_MAX
+
+/* So far no need has been found for an IDX_WIDTH macro.
+   Perhaps there should be another macro IDX_VALUE_BITS that does not
+   count the sign bit and is therefore one less than PTRDIFF_WIDTH.  */
+
+#endif /* _IDX_H */
index 95eac1c..6099aba 100644 (file)
@@ -1,18 +1,18 @@
 /* ignore a function return without a compiler warning.  -*- coding: utf-8 -*-
 
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering, Eric Blake and Pádraig Brady.  */
@@ -39,8 +39,9 @@
    versions 3.4 and newer have __attribute__ ((__warn_unused_result__))
    which may cause unwanted diagnostics in that case.  Use __typeof__
    and __extension__ to work around the problem, if the workaround is
-   known to be needed.  */
-#if 3 < __GNUC__ + (4 <= __GNUC_MINOR__)
+   known to be needed.
+   The workaround is not needed with clang.  */
+#if (3 < __GNUC__ + (4 <= __GNUC_MINOR__)) && !defined __clang__
 # define ignore_value(x) \
     (__extension__ ({ __typeof__ (x) __x = (x); (void) __x; }))
 #else
index b91ac98..6a9c6a9 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert 'intmax_t' integer to printable string.
+
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define anytostr imaxtostr
 #define inttype intmax_t
 #include "anytostr.c"
index cdaf658..9d10028 100644 (file)
@@ -1,18 +1,18 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2.1 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
@@ -48,7 +48,7 @@
 /* Minimum and maximum values for integer types and expressions.  */
 
 /* The width in bits of the integer type or expression T.
-   Do not evaluate T.
+   Do not evaluate T.  T must not be a bit-field expression.
    Padding bits are not supported; this is checked at compile-time below.  */
 #define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
 
@@ -70,7 +70,7 @@
    ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
    : _GL_INT_NEGATE_CONVERT (e, 1))
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
-  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1)
+  (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
 
 /* Work around OpenVMS incompatibility with C99.  */
 #if !defined LLONG_MAX && defined __INT64_MAX
@@ -86,6 +86,7 @@
 /* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
 #if (2 <= __GNUC__ \
+     || (4 <= __clang_major__) \
      || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
      || (0x5110 <= __SUNPRO_C && !__STDC__))
 # define _GL_HAVE___TYPEOF__ 1
@@ -94,8 +95,9 @@
 #endif
 
 /* Return 1 if the integer type or expression T might be signed.  Return 0
-   if it is definitely unsigned.  This macro does not evaluate its argument,
-   and expands to an integer constant expression.  */
+   if it is definitely unsigned.  T must not be a bit-field expression.
+   This macro does not evaluate its argument, and expands to an
+   integer constant expression.  */
 #if _GL_HAVE___TYPEOF__
 # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
 #else
 #define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
 
 /* Bound on length of the string representing an integer type or expression T.
+   T must not be a bit-field expression.
+
    Subtract 1 for the sign bit if T is signed, and then add 1 more for
    a minus sign if needed.
 
-   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
-   signed, this macro may overestimate the true bound by one byte when
+   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 1 when its argument is
+   unsigned, this macro may overestimate the true bound by one byte when
    applied to unsigned types of size 2, 4, 16, ... bytes.  */
 #define INT_STRLEN_BOUND(t)                                     \
   (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \
    + _GL_SIGNED_TYPE_OR_EXPR (t))
 
 /* Bound on buffer size needed to represent an integer type or expression T,
-   including the terminating null.  */
+   including the terminating null.  T must not be a bit-field expression.  */
 #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
 
 
    operators might not yield numerically correct answers due to
    arithmetic overflow.  They do not rely on undefined or
    implementation-defined behavior.  Their implementations are simple
-   and straightforward, but they are a bit harder to use than the
+   and straightforward, but they are harder to use and may be less
+   efficient than the INT_<op>_WRAPV, INT_<op>_OK, and
    INT_<op>_OVERFLOW macros described below.
 
    Example usage:
    must have minimum value MIN and maximum MAX.  Unsigned types should
    use a zero MIN of the proper type.
 
+   Because all arguments are subject to integer promotions, these
+   macros typically do not work on types narrower than 'int'.
+
    These macros are tuned for constant MIN and MAX.  For commutative
    operations such as A + B, they are also tuned for constant B.  */
 
    ? (a) < (min) >> (b)                                 \
    : (max) >> (b) < (a))
 
-/* True if __builtin_add_overflow (A, B, P) works when P is non-null.  */
-#if 5 <= __GNUC__ && !defined __ICC
-# define _GL_HAS_BUILTIN_OVERFLOW 1
+/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
+   (A, B, P) work when P is non-null.  */
+/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
+   see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>.  */
+#if 7 <= __GNUC__ && !defined __ICC
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
 #else
-# define _GL_HAS_BUILTIN_OVERFLOW 0
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
 #endif
 
-/* True if __builtin_add_overflow_p (A, B, C) works.  */
-#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+/* True if __builtin_mul_overflow (A, B, P) works when P is non-null.  */
+#ifdef __clang__
+/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>.  */
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
+#else
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
+   __builtin_sub_overflow_p and __builtin_mul_overflow_p.  */
+#if defined __clang__ || defined __ICC
+/* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it
+   would presumably run afoul of Clang bug 16404.  ICC 2021.1's
+   __builtin_add_overflow_p etc. are not treated as integral constant
+   expressions even when all arguments are.  */
+# define _GL_HAS_BUILTIN_OVERFLOW_P 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+#endif
 
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
 
    The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
    might not yield numerically correct answers due to arithmetic overflow.
-   The INT_<op>_WRAPV macros also store the low-order bits of the answer.
+   The INT_<op>_WRAPV macros compute the low-order bits of the sum,
+   difference, and product of two C integers, and return 1 if these
+   low-order bits are not numerically correct.
    These macros work correctly on all known practical hosts, and do not rely
    on undefined behavior due to signed arithmetic overflow.
 
    arguments should not have side effects.
 
    The WRAPV macros are not constant expressions.  They support only
-   +, binary -, and *.  The result type must be signed.
+   +, binary -, and *.
+
+   Because the WRAPV macros convert the result, they report overflow
+   in different circumstances than the OVERFLOW macros do.  For
+   example, in the typical case with 16-bit 'short' and 32-bit 'int',
+   if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
+   returns false because the addition cannot overflow after A and B
+   are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns
+   true or false depending on whether the sum fits into 'short'.
 
-   These macros are tuned for their last argument being a constant.
+   These macros are tuned for their last input argument being a constant.
 
    Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
    A % B, and A << B would overflow, respectively.  */
 
 /* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
    Return 1 if the result overflows.  See above for restrictions.  */
-#define INT_ADD_WRAPV(a, b, r) \
-  _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
-#define INT_SUBTRACT_WRAPV(a, b, r) \
-  _GL_INT_OP_WRAPV (a, b, r, -, __builtin_sub_overflow, INT_SUBTRACT_OVERFLOW)
-#define INT_MULTIPLY_WRAPV(a, b, r) \
-  _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW)
+#if _GL_HAS_BUILTIN_ADD_OVERFLOW
+# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
+# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
+#else
+# define INT_ADD_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
+# define INT_SUBTRACT_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
+#endif
+#if _GL_HAS_BUILTIN_MUL_OVERFLOW
+# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
+       || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
+      && !defined __ICC)
+#  define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
+# else
+   /* Work around GCC bug 91450.  */
+#  define INT_MULTIPLY_WRAPV(a, b, r) \
+    ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
+      && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
+     ? ((void) __builtin_mul_overflow (a, b, r), 1) \
+     : __builtin_mul_overflow (a, b, r))
+# endif
+#else
+# define INT_MULTIPLY_WRAPV(a, b, r) \
+   _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
+#endif
 
 /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390.  See:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
    https://llvm.org/bugs/show_bug.cgi?id=25390
    For now, assume all versions of GCC-like compilers generate bogus
-   warnings for _Generic.  This matters only for older compilers that
-   lack __builtin_add_overflow.  */
-#if __GNUC__
+   warnings for _Generic.  This matters only for compilers that
+   lack relevant builtins.  */
+#if __GNUC__ || defined __clang__
 # define _GL__GENERIC_BOGUS 1
 #else
 # define _GL__GENERIC_BOGUS 0
 #endif
 
 /* Store the low-order bits of A <op> B into *R, where OP specifies
-   the operation.  BUILTIN is the builtin operation, and OVERFLOW the
-   overflow predicate.  Return 1 if the result overflows.  See above
-   for restrictions.  */
-#if _GL_HAS_BUILTIN_OVERFLOW
-# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
-#elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
-# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+   the operation and OVERFLOW the overflow predicate.  Return 1 if the
+   result overflows.  See above for restrictions.  */
+#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
    (_Generic \
     (*(r), \
      signed char: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                         signed char, SCHAR_MIN, SCHAR_MAX), \
+     unsigned char: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned char, 0, UCHAR_MAX), \
      short int: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                         short int, SHRT_MIN, SHRT_MAX), \
+     unsigned short int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned short int, 0, USHRT_MAX), \
      int: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
                         int, INT_MIN, INT_MAX), \
+     unsigned int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                        unsigned int, 0, UINT_MAX), \
      long int: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
                         long int, LONG_MIN, LONG_MAX), \
+     unsigned long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX), \
      long long int: \
        _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        long long int, LLONG_MIN, LLONG_MAX)))
+                        long long int, LLONG_MIN, LLONG_MAX), \
+     unsigned long long int: \
+       _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                        unsigned long long int, 0, ULLONG_MAX)))
 #else
-# define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation and OVERFLOW the overflow predicate.  If *R is
+   signed, its type is ST with bounds SMIN..SMAX; otherwise its type
+   is UT with bounds U..UMAX.  ST and UT are narrower than int.
+   Return 1 if the result overflows.  See above for restrictions.  */
+# if _GL_HAVE___TYPEOF__
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (TYPE_SIGNED (__typeof__ (*(r))) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
+# else
+#  define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+    (overflow (a, b, smin, smax) \
+     ? (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
+     : (overflow (a, b, 0, umax) \
+        ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
+        : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
+# endif
+
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
    (sizeof *(r) == sizeof (signed char) \
-    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                       signed char, SCHAR_MIN, SCHAR_MAX) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 signed char, SCHAR_MIN, SCHAR_MAX, \
+                                 unsigned char, UCHAR_MAX) \
     : sizeof *(r) == sizeof (short int) \
-    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                       short int, SHRT_MIN, SHRT_MAX) \
+    ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+                                 short int, SHRT_MIN, SHRT_MAX, \
+                                 unsigned short int, USHRT_MAX) \
     : sizeof *(r) == sizeof (int) \
-    ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
-                       int, INT_MIN, INT_MAX) \
+    ? (EXPR_SIGNED (*(r)) \
+       ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          int, INT_MIN, INT_MAX) \
+       : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+                          unsigned int, 0, UINT_MAX)) \
     : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
 # ifdef LLONG_MAX
 #  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
     (sizeof *(r) == sizeof (long int) \
-     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                        long int, LONG_MIN, LONG_MAX) \
-     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
-                        long long int, LLONG_MIN, LLONG_MAX))
+     ? (EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           long int, LONG_MIN, LONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                           unsigned long int, 0, ULONG_MAX)) \
+     : (EXPR_SIGNED (*(r)) \
+        ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           long long int, LLONG_MIN, LLONG_MAX) \
+        : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+                           unsigned long long int, 0, ULLONG_MAX)))
 # else
 #  define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
-    _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
-                     long int, LONG_MIN, LONG_MAX)
+    (EXPR_SIGNED (*(r)) \
+     ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        long int, LONG_MIN, LONG_MAX) \
+     : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+                        unsigned long int, 0, ULONG_MAX))
 # endif
 #endif
 
    overflow problems.  *R's type is T, with extrema TMIN and TMAX.
    T must be a signed integer type.  Return 1 if the result overflows.  */
 #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
-  (sizeof ((a) op (b)) < sizeof (t) \
-   ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \
-   : _GL_INT_OP_CALC1 (a, b, r, op, overflow, ut, t, tmin, tmax))
-#define _GL_INT_OP_CALC1(a, b, r, op, overflow, ut, t, tmin, tmax) \
-  ((overflow (a, b) \
-    || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \
-    || (tmax) < ((a) op (b))) \
+  (overflow (a, b, tmin, tmax) \
    ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
    : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
 
 #define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
   ((t) ((ut) (a) op (ut) (b)))
 
+/* Return true if the numeric values A + B, A - B, A * B fall outside
+   the range TMIN..TMAX.  Arguments should be integer expressions
+   without side effects.  TMIN should be signed and nonpositive.
+   TMAX should be positive, and should be signed unless TMIN is zero.  */
+#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? (((tmin) \
+       ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
+          && (a) < (tmin) - (b)) \
+       : (a) <= -1 - (b)) \
+      || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
+   : (a) < 0 \
+   ? (((tmin) \
+       ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
+          && (b) < (tmin) - (a)) \
+       : (b) <= -1 - (a)) \
+      || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
+          && (tmax) < (a) + (b))) \
+   : (tmax) < (b) || (tmax) - (b) < (a))
+#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  (((a) < 0) == ((b) < 0) \
+   ? ((a) < (b) \
+      ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
+      : (tmax) < (a) - (b)) \
+   : (a) < 0 \
+   ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
+      || (a) - (tmin) < (b)) \
+   : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+          && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
+       && (tmax) <= -1 - (b)) \
+      || (tmax) + (b) < (a)))
+#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
+  ((b) < 0 \
+   ? ((a) < 0 \
+      ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+         ? (a) < (tmax) / (b) \
+         : ((INT_NEGATE_OVERFLOW (b) \
+             ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
+             : (tmax) / -(b)) \
+            <= -1 - (a))) \
+      : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
+      ? (EXPR_SIGNED (a) \
+         ? 0 < (a) + (tmin) \
+         : 0 < (a) && -1 - (tmin) < (a) - 1) \
+      : (tmin) / (b) < (a)) \
+   : (b) == 0 \
+   ? 0 \
+   : ((a) < 0 \
+      ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
+         ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
+         : (tmin) / (a) < (b)) \
+      : (tmax) / (b) < (a)))
+
+/* The following macros compute A + B, A - B, and A * B, respectively.
+   If no overflow occurs, they set *R to the result and return 1;
+   otherwise, they return 0 and may modify *R.
+
+   Example usage:
+
+     long int result;
+     if (INT_ADD_OK (a, b, &result))
+       printf ("result is %ld\n", result);
+     else
+       printf ("overflow\n");
+
+   A, B, and *R should be integers; they need not be the same type,
+   and they need not be all signed or all unsigned.
+
+   These macros work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   These macros are not constant expressions.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for B being a constant.  */
+
+#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
+#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
+#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
+
 #endif /* _GL_INTPROPS_H */
index c96b5ca..2fafd1c 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert 'int' integer to printable string.
+
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define anytostr inttostr
 #define inttype int
 #include "anytostr.c"
index 2afeb8e..db1f8fa 100644 (file)
@@ -1,18 +1,18 @@
 /* inttostr.h -- convert integers to printable strings
 
-   Copyright (C) 2001-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert */
 
 #include "intprops.h"
 
-#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
-#  define __GNUC_PREREQ(maj, min) \
-         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-# else
-#  define __GNUC_PREREQ(maj, min) 0
-# endif
-#endif
-
-#if __GNUC_PREREQ (3,4)
-# undef __attribute_warn_unused_result__
-# define __attribute_warn_unused_result__ \
-   __attribute__ ((__warn_unused_result__))
-#else
-# define __attribute_warn_unused_result__ /* empty */
-#endif
-
-char *imaxtostr (intmax_t, char *) __attribute_warn_unused_result__;
-char *inttostr (int, char *) __attribute_warn_unused_result__;
-char *offtostr (off_t, char *) __attribute_warn_unused_result__;
-char *uinttostr (unsigned int, char *) __attribute_warn_unused_result__;
-char *umaxtostr (uintmax_t, char *) __attribute_warn_unused_result__;
+_GL_ATTRIBUTE_NODISCARD char *imaxtostr (intmax_t, char *);
+_GL_ATTRIBUTE_NODISCARD char *inttostr (int, char *);
+_GL_ATTRIBUTE_NODISCARD char *offtostr (off_t, char *);
+_GL_ATTRIBUTE_NODISCARD char *uinttostr (unsigned int, char *);
+_GL_ATTRIBUTE_NODISCARD char *umaxtostr (uintmax_t, char *);
index c7d7968..41cb422 100644 (file)
@@ -1,23 +1,23 @@
-/* Copyright (C) 2006-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
  * ISO C 99 <inttypes.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
  */
 
 #if __GNUC__ >= 3
@@ -38,6 +38,8 @@
 #  endif
 
 #  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+
+#  define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
 # endif
 #endif
 
 #ifndef __GLIBC__
 # include <stdint.h>
 #endif
-/* Get CHAR_BIT.  */
+/* Get CHAR_BIT, INT_MAX, LONG_MAX, etc.  */
 #include <limits.h>
 /* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
 #if defined _WIN32 && ! defined __CYGWIN__
 # include <stdio.h>
 #endif
 
-#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
-# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
+#if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1)
+# error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to <bug-gnulib@gnu.org>."
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 # define _LONG_LONG_FORMAT_PREFIX "ll"
 #endif
 
-#if !defined PRId8 || @PRI_MACROS_BROKEN@
-# undef PRId8
+#if !defined PRId8
 # ifdef INT8_MAX
 #  define PRId8 "d"
 # endif
 #endif
-#if !defined PRIi8 || @PRI_MACROS_BROKEN@
-# undef PRIi8
+#if !defined PRIi8
 # ifdef INT8_MAX
 #  define PRIi8 "i"
 # endif
 #endif
-#if !defined PRIo8 || @PRI_MACROS_BROKEN@
-# undef PRIo8
+#if !defined PRIo8
 # ifdef UINT8_MAX
 #  define PRIo8 "o"
 # endif
 #endif
-#if !defined PRIu8 || @PRI_MACROS_BROKEN@
-# undef PRIu8
+#if !defined PRIu8
 # ifdef UINT8_MAX
 #  define PRIu8 "u"
 # endif
 #endif
-#if !defined PRIx8 || @PRI_MACROS_BROKEN@
-# undef PRIx8
+#if !defined PRIx8
 # ifdef UINT8_MAX
 #  define PRIx8 "x"
 # endif
 #endif
-#if !defined PRIX8 || @PRI_MACROS_BROKEN@
-# undef PRIX8
+#if !defined PRIX8
 # ifdef UINT8_MAX
 #  define PRIX8 "X"
 # endif
 #endif
-#if !defined PRId16 || @PRI_MACROS_BROKEN@
-# undef PRId16
+#if !defined PRId16
 # ifdef INT16_MAX
 #  define PRId16 "d"
 # endif
 #endif
-#if !defined PRIi16 || @PRI_MACROS_BROKEN@
-# undef PRIi16
+#if !defined PRIi16
 # ifdef INT16_MAX
 #  define PRIi16 "i"
 # endif
 #endif
-#if !defined PRIo16 || @PRI_MACROS_BROKEN@
-# undef PRIo16
+#if !defined PRIo16
 # ifdef UINT16_MAX
 #  define PRIo16 "o"
 # endif
 #endif
-#if !defined PRIu16 || @PRI_MACROS_BROKEN@
-# undef PRIu16
+#if !defined PRIu16
 # ifdef UINT16_MAX
 #  define PRIu16 "u"
 # endif
 #endif
-#if !defined PRIx16 || @PRI_MACROS_BROKEN@
-# undef PRIx16
+#if !defined PRIx16
 # ifdef UINT16_MAX
 #  define PRIx16 "x"
 # endif
 #endif
-#if !defined PRIX16 || @PRI_MACROS_BROKEN@
-# undef PRIX16
+#if !defined PRIX16
 # ifdef UINT16_MAX
 #  define PRIX16 "X"
 # endif
 #endif
-#if !defined PRId32 || @PRI_MACROS_BROKEN@
-# undef PRId32
+#if !defined PRId32
 # ifdef INT32_MAX
 #  define PRId32 "d"
 # endif
 #endif
-#if !defined PRIi32 || @PRI_MACROS_BROKEN@
-# undef PRIi32
+#if !defined PRIi32
 # ifdef INT32_MAX
 #  define PRIi32 "i"
 # endif
 #endif
-#if !defined PRIo32 || @PRI_MACROS_BROKEN@
-# undef PRIo32
+#if !defined PRIo32
 # ifdef UINT32_MAX
 #  define PRIo32 "o"
 # endif
 #endif
-#if !defined PRIu32 || @PRI_MACROS_BROKEN@
-# undef PRIu32
+#if !defined PRIu32
 # ifdef UINT32_MAX
 #  define PRIu32 "u"
 # endif
 #endif
-#if !defined PRIx32 || @PRI_MACROS_BROKEN@
-# undef PRIx32
+#if !defined PRIx32
 # ifdef UINT32_MAX
 #  define PRIx32 "x"
 # endif
 #endif
-#if !defined PRIX32 || @PRI_MACROS_BROKEN@
-# undef PRIX32
+#if !defined PRIX32
 # ifdef UINT32_MAX
 #  define PRIX32 "X"
 # endif
 #  define _PRI64_PREFIX "l"
 # elif defined _MSC_VER || defined __MINGW32__
 #  define _PRI64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# elif LONG_MAX >> 30 == 1
 #  define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined PRId64 || @PRI_MACROS_BROKEN@
-#  undef PRId64
+# if !defined PRId64
 #  define PRId64 _PRI64_PREFIX "d"
 # endif
-# if !defined PRIi64 || @PRI_MACROS_BROKEN@
-#  undef PRIi64
+# if !defined PRIi64
 #  define PRIi64 _PRI64_PREFIX "i"
 # endif
 #endif
 #  define _PRIu64_PREFIX "l"
 # elif defined _MSC_VER || defined __MINGW32__
 #  define _PRIu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# elif ULONG_MAX >> 31 == 1
 #  define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined PRIo64 || @PRI_MACROS_BROKEN@
-#  undef PRIo64
+# if !defined PRIo64
 #  define PRIo64 _PRIu64_PREFIX "o"
 # endif
-# if !defined PRIu64 || @PRI_MACROS_BROKEN@
-#  undef PRIu64
+# if !defined PRIu64
 #  define PRIu64 _PRIu64_PREFIX "u"
 # endif
-# if !defined PRIx64 || @PRI_MACROS_BROKEN@
-#  undef PRIx64
+# if !defined PRIx64
 #  define PRIx64 _PRIu64_PREFIX "x"
 # endif
-# if !defined PRIX64 || @PRI_MACROS_BROKEN@
-#  undef PRIX64
+# if !defined PRIX64
 #  define PRIX64 _PRIu64_PREFIX "X"
 # endif
 #endif
 
-#if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST8
+#if !defined PRIdLEAST8
 # define PRIdLEAST8 "d"
 #endif
-#if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST8
+#if !defined PRIiLEAST8
 # define PRIiLEAST8 "i"
 #endif
-#if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST8
+#if !defined PRIoLEAST8
 # define PRIoLEAST8 "o"
 #endif
-#if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST8
+#if !defined PRIuLEAST8
 # define PRIuLEAST8 "u"
 #endif
-#if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST8
+#if !defined PRIxLEAST8
 # define PRIxLEAST8 "x"
 #endif
-#if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST8
+#if !defined PRIXLEAST8
 # define PRIXLEAST8 "X"
 #endif
-#if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST16
+#if !defined PRIdLEAST16
 # define PRIdLEAST16 "d"
 #endif
-#if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST16
+#if !defined PRIiLEAST16
 # define PRIiLEAST16 "i"
 #endif
-#if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST16
+#if !defined PRIoLEAST16
 # define PRIoLEAST16 "o"
 #endif
-#if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST16
+#if !defined PRIuLEAST16
 # define PRIuLEAST16 "u"
 #endif
-#if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST16
+#if !defined PRIxLEAST16
 # define PRIxLEAST16 "x"
 #endif
-#if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST16
+#if !defined PRIXLEAST16
 # define PRIXLEAST16 "X"
 #endif
-#if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdLEAST32
+#if !defined PRIdLEAST32
 # define PRIdLEAST32 "d"
 #endif
-#if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiLEAST32
+#if !defined PRIiLEAST32
 # define PRIiLEAST32 "i"
 #endif
-#if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoLEAST32
+#if !defined PRIoLEAST32
 # define PRIoLEAST32 "o"
 #endif
-#if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuLEAST32
+#if !defined PRIuLEAST32
 # define PRIuLEAST32 "u"
 #endif
-#if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxLEAST32
+#if !defined PRIxLEAST32
 # define PRIxLEAST32 "x"
 #endif
-#if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXLEAST32
+#if !defined PRIXLEAST32
 # define PRIXLEAST32 "X"
 #endif
 #ifdef INT64_MAX
-# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIdLEAST64
+# if !defined PRIdLEAST64
 #  define PRIdLEAST64 PRId64
 # endif
-# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIiLEAST64
+# if !defined PRIiLEAST64
 #  define PRIiLEAST64 PRIi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIoLEAST64
+# if !defined PRIoLEAST64
 #  define PRIoLEAST64 PRIo64
 # endif
-# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIuLEAST64
+# if !defined PRIuLEAST64
 #  define PRIuLEAST64 PRIu64
 # endif
-# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIxLEAST64
+# if !defined PRIxLEAST64
 #  define PRIxLEAST64 PRIx64
 # endif
-# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIXLEAST64
+# if !defined PRIXLEAST64
 #  define PRIXLEAST64 PRIX64
 # endif
 #endif
 
-#if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST8
+#if !defined PRIdFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define PRIdFAST8 PRId64
 # else
 #  define PRIdFAST8 "d"
 # endif
 #endif
-#if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST8
+#if !defined PRIiFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define PRIiFAST8 PRIi64
 # else
 #  define PRIiFAST8 "i"
 # endif
 #endif
-#if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST8
+#if !defined PRIoFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIoFAST8 PRIo64
 # else
 #  define PRIoFAST8 "o"
 # endif
 #endif
-#if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST8
+#if !defined PRIuFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIuFAST8 PRIu64
 # else
 #  define PRIuFAST8 "u"
 # endif
 #endif
-#if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST8
+#if !defined PRIxFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIxFAST8 PRIx64
 # else
 #  define PRIxFAST8 "x"
 # endif
 #endif
-#if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST8
+#if !defined PRIXFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define PRIXFAST8 PRIX64
 # else
 #  define PRIXFAST8 "X"
 # endif
 #endif
-#if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST16
+#if !defined PRIdFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define PRIdFAST16 PRId64
 # else
 #  define PRIdFAST16 "d"
 # endif
 #endif
-#if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST16
+#if !defined PRIiFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define PRIiFAST16 PRIi64
 # else
 #  define PRIiFAST16 "i"
 # endif
 #endif
-#if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST16
+#if !defined PRIoFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIoFAST16 PRIo64
 # else
 #  define PRIoFAST16 "o"
 # endif
 #endif
-#if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST16
+#if !defined PRIuFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIuFAST16 PRIu64
 # else
 #  define PRIuFAST16 "u"
 # endif
 #endif
-#if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST16
+#if !defined PRIxFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIxFAST16 PRIx64
 # else
 #  define PRIxFAST16 "x"
 # endif
 #endif
-#if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST16
+#if !defined PRIXFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define PRIXFAST16 PRIX64
 # else
 #  define PRIXFAST16 "X"
 # endif
 #endif
-#if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIdFAST32
+#if !defined PRIdFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define PRIdFAST32 PRId64
 # else
 #  define PRIdFAST32 "d"
 # endif
 #endif
-#if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIiFAST32
+#if !defined PRIiFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define PRIiFAST32 PRIi64
 # else
 #  define PRIiFAST32 "i"
 # endif
 #endif
-#if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIoFAST32
+#if !defined PRIoFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIoFAST32 PRIo64
 # else
 #  define PRIoFAST32 "o"
 # endif
 #endif
-#if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIuFAST32
+#if !defined PRIuFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIuFAST32 PRIu64
 # else
 #  define PRIuFAST32 "u"
 # endif
 #endif
-#if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIxFAST32
+#if !defined PRIxFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIxFAST32 PRIx64
 # else
 #  define PRIxFAST32 "x"
 # endif
 #endif
-#if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
-# undef PRIXFAST32
+#if !defined PRIXFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define PRIXFAST32 PRIX64
 # else
 # endif
 #endif
 #ifdef INT64_MAX
-# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIdFAST64
+# if !defined PRIdFAST64
 #  define PRIdFAST64 PRId64
 # endif
-# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIiFAST64
+# if !defined PRIiFAST64
 #  define PRIiFAST64 PRIi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIoFAST64
+# if !defined PRIoFAST64
 #  define PRIoFAST64 PRIo64
 # endif
-# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIuFAST64
+# if !defined PRIuFAST64
 #  define PRIuFAST64 PRIu64
 # endif
-# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIxFAST64
+# if !defined PRIxFAST64
 #  define PRIxFAST64 PRIx64
 # endif
-# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
-#  undef PRIXFAST64
+# if !defined PRIXFAST64
 #  define PRIXFAST64 PRIX64
 # endif
 #endif
 
-#if !defined PRIdMAX || @PRI_MACROS_BROKEN@
-# undef PRIdMAX
+#if !defined PRIdMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define PRIdMAX PRId64
 # else
 #  define PRIdMAX "ld"
 # endif
 #endif
-#if !defined PRIiMAX || @PRI_MACROS_BROKEN@
-# undef PRIiMAX
+#if !defined PRIiMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define PRIiMAX PRIi64
 # else
 #  define PRIiMAX "li"
 # endif
 #endif
-#if !defined PRIoMAX || @PRI_MACROS_BROKEN@
-# undef PRIoMAX
+#if !defined PRIoMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIoMAX PRIo64
 # else
 #  define PRIoMAX "lo"
 # endif
 #endif
-#if !defined PRIuMAX || @PRI_MACROS_BROKEN@
-# undef PRIuMAX
+#if !defined PRIuMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIuMAX PRIu64
 # else
 #  define PRIuMAX "lu"
 # endif
 #endif
-#if !defined PRIxMAX || @PRI_MACROS_BROKEN@
-# undef PRIxMAX
+#if !defined PRIxMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIxMAX PRIx64
 # else
 #  define PRIxMAX "lx"
 # endif
 #endif
-#if !defined PRIXMAX || @PRI_MACROS_BROKEN@
-# undef PRIXMAX
+#if !defined PRIXMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define PRIXMAX PRIX64
 # else
 # endif
 #endif
 
-#if !defined PRIdPTR || @PRI_MACROS_BROKEN@
-# undef PRIdPTR
+#if !defined PRIdPTR
 # ifdef INTPTR_MAX
 #  define PRIdPTR @PRIPTR_PREFIX@ "d"
 # endif
 #endif
-#if !defined PRIiPTR || @PRI_MACROS_BROKEN@
-# undef PRIiPTR
+#if !defined PRIiPTR
 # ifdef INTPTR_MAX
 #  define PRIiPTR @PRIPTR_PREFIX@ "i"
 # endif
 #endif
-#if !defined PRIoPTR || @PRI_MACROS_BROKEN@
-# undef PRIoPTR
+#if !defined PRIoPTR
 # ifdef UINTPTR_MAX
 #  define PRIoPTR @PRIPTR_PREFIX@ "o"
 # endif
 #endif
-#if !defined PRIuPTR || @PRI_MACROS_BROKEN@
-# undef PRIuPTR
+#if !defined PRIuPTR
 # ifdef UINTPTR_MAX
 #  define PRIuPTR @PRIPTR_PREFIX@ "u"
 # endif
 #endif
-#if !defined PRIxPTR || @PRI_MACROS_BROKEN@
-# undef PRIxPTR
+#if !defined PRIxPTR
 # ifdef UINTPTR_MAX
 #  define PRIxPTR @PRIPTR_PREFIX@ "x"
 # endif
 #endif
-#if !defined PRIXPTR || @PRI_MACROS_BROKEN@
-# undef PRIXPTR
+#if !defined PRIXPTR
 # ifdef UINTPTR_MAX
 #  define PRIXPTR @PRIPTR_PREFIX@ "X"
 # endif
 #endif
 
-#if !defined SCNd8 || @PRI_MACROS_BROKEN@
-# undef SCNd8
+#if !defined SCNd8
 # ifdef INT8_MAX
 #  define SCNd8 "hhd"
 # endif
 #endif
-#if !defined SCNi8 || @PRI_MACROS_BROKEN@
-# undef SCNi8
+#if !defined SCNi8
 # ifdef INT8_MAX
 #  define SCNi8 "hhi"
 # endif
 #endif
-#if !defined SCNo8 || @PRI_MACROS_BROKEN@
-# undef SCNo8
+#if !defined SCNo8
 # ifdef UINT8_MAX
 #  define SCNo8 "hho"
 # endif
 #endif
-#if !defined SCNu8 || @PRI_MACROS_BROKEN@
-# undef SCNu8
+#if !defined SCNu8
 # ifdef UINT8_MAX
 #  define SCNu8 "hhu"
 # endif
 #endif
-#if !defined SCNx8 || @PRI_MACROS_BROKEN@
-# undef SCNx8
+#if !defined SCNx8
 # ifdef UINT8_MAX
 #  define SCNx8 "hhx"
 # endif
 #endif
-#if !defined SCNd16 || @PRI_MACROS_BROKEN@
-# undef SCNd16
+#if !defined SCNd16
 # ifdef INT16_MAX
 #  define SCNd16 "hd"
 # endif
 #endif
-#if !defined SCNi16 || @PRI_MACROS_BROKEN@
-# undef SCNi16
+#if !defined SCNi16
 # ifdef INT16_MAX
 #  define SCNi16 "hi"
 # endif
 #endif
-#if !defined SCNo16 || @PRI_MACROS_BROKEN@
-# undef SCNo16
+#if !defined SCNo16
 # ifdef UINT16_MAX
 #  define SCNo16 "ho"
 # endif
 #endif
-#if !defined SCNu16 || @PRI_MACROS_BROKEN@
-# undef SCNu16
+#if !defined SCNu16
 # ifdef UINT16_MAX
 #  define SCNu16 "hu"
 # endif
 #endif
-#if !defined SCNx16 || @PRI_MACROS_BROKEN@
-# undef SCNx16
+#if !defined SCNx16
 # ifdef UINT16_MAX
 #  define SCNx16 "hx"
 # endif
 #endif
-#if !defined SCNd32 || @PRI_MACROS_BROKEN@
-# undef SCNd32
+#if !defined SCNd32
 # ifdef INT32_MAX
 #  define SCNd32 "d"
 # endif
 #endif
-#if !defined SCNi32 || @PRI_MACROS_BROKEN@
-# undef SCNi32
+#if !defined SCNi32
 # ifdef INT32_MAX
 #  define SCNi32 "i"
 # endif
 #endif
-#if !defined SCNo32 || @PRI_MACROS_BROKEN@
-# undef SCNo32
+#if !defined SCNo32
 # ifdef UINT32_MAX
 #  define SCNo32 "o"
 # endif
 #endif
-#if !defined SCNu32 || @PRI_MACROS_BROKEN@
-# undef SCNu32
+#if !defined SCNu32
 # ifdef UINT32_MAX
 #  define SCNu32 "u"
 # endif
 #endif
-#if !defined SCNx32 || @PRI_MACROS_BROKEN@
-# undef SCNx32
+#if !defined SCNx32
 # ifdef UINT32_MAX
 #  define SCNx32 "x"
 # endif
 #  define _SCN64_PREFIX "l"
 # elif defined _MSC_VER || defined __MINGW32__
 #  define _SCN64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# elif LONG_MAX >> 30 == 1
 #  define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined SCNd64 || @PRI_MACROS_BROKEN@
-#  undef SCNd64
+# if !defined SCNd64
 #  define SCNd64 _SCN64_PREFIX "d"
 # endif
-# if !defined SCNi64 || @PRI_MACROS_BROKEN@
-#  undef SCNi64
+# if !defined SCNi64
 #  define SCNi64 _SCN64_PREFIX "i"
 # endif
 #endif
 #  define _SCNu64_PREFIX "l"
 # elif defined _MSC_VER || defined __MINGW32__
 #  define _SCNu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# elif ULONG_MAX >> 31 == 1
 #  define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
 # endif
-# if !defined SCNo64 || @PRI_MACROS_BROKEN@
-#  undef SCNo64
+# if !defined SCNo64
 #  define SCNo64 _SCNu64_PREFIX "o"
 # endif
-# if !defined SCNu64 || @PRI_MACROS_BROKEN@
-#  undef SCNu64
+# if !defined SCNu64
 #  define SCNu64 _SCNu64_PREFIX "u"
 # endif
-# if !defined SCNx64 || @PRI_MACROS_BROKEN@
-#  undef SCNx64
+# if !defined SCNx64
 #  define SCNx64 _SCNu64_PREFIX "x"
 # endif
 #endif
 
-#if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST8
+#if !defined SCNdLEAST8
 # define SCNdLEAST8 "hhd"
 #endif
-#if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST8
+#if !defined SCNiLEAST8
 # define SCNiLEAST8 "hhi"
 #endif
-#if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST8
+#if !defined SCNoLEAST8
 # define SCNoLEAST8 "hho"
 #endif
-#if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST8
+#if !defined SCNuLEAST8
 # define SCNuLEAST8 "hhu"
 #endif
-#if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST8
+#if !defined SCNxLEAST8
 # define SCNxLEAST8 "hhx"
 #endif
-#if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST16
+#if !defined SCNdLEAST16
 # define SCNdLEAST16 "hd"
 #endif
-#if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST16
+#if !defined SCNiLEAST16
 # define SCNiLEAST16 "hi"
 #endif
-#if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST16
+#if !defined SCNoLEAST16
 # define SCNoLEAST16 "ho"
 #endif
-#if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST16
+#if !defined SCNuLEAST16
 # define SCNuLEAST16 "hu"
 #endif
-#if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST16
+#if !defined SCNxLEAST16
 # define SCNxLEAST16 "hx"
 #endif
-#if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdLEAST32
+#if !defined SCNdLEAST32
 # define SCNdLEAST32 "d"
 #endif
-#if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiLEAST32
+#if !defined SCNiLEAST32
 # define SCNiLEAST32 "i"
 #endif
-#if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoLEAST32
+#if !defined SCNoLEAST32
 # define SCNoLEAST32 "o"
 #endif
-#if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuLEAST32
+#if !defined SCNuLEAST32
 # define SCNuLEAST32 "u"
 #endif
-#if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxLEAST32
+#if !defined SCNxLEAST32
 # define SCNxLEAST32 "x"
 #endif
 #ifdef INT64_MAX
-# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNdLEAST64
+# if !defined SCNdLEAST64
 #  define SCNdLEAST64 SCNd64
 # endif
-# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNiLEAST64
+# if !defined SCNiLEAST64
 #  define SCNiLEAST64 SCNi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNoLEAST64
+# if !defined SCNoLEAST64
 #  define SCNoLEAST64 SCNo64
 # endif
-# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNuLEAST64
+# if !defined SCNuLEAST64
 #  define SCNuLEAST64 SCNu64
 # endif
-# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNxLEAST64
+# if !defined SCNxLEAST64
 #  define SCNxLEAST64 SCNx64
 # endif
 #endif
 
-#if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST8
+#if !defined SCNdFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define SCNdFAST8 SCNd64
 # elif INT_FAST8_MAX == 0x7fff
 #  define SCNdFAST8 "d"
 # endif
 #endif
-#if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST8
+#if !defined SCNiFAST8
 # if INT_FAST8_MAX > INT32_MAX
 #  define SCNiFAST8 SCNi64
 # elif INT_FAST8_MAX == 0x7fff
 #  define SCNiFAST8 "i"
 # endif
 #endif
-#if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST8
+#if !defined SCNoFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNoFAST8 SCNo64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNoFAST8 "o"
 # endif
 #endif
-#if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST8
+#if !defined SCNuFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNuFAST8 SCNu64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNuFAST8 "u"
 # endif
 #endif
-#if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST8
+#if !defined SCNxFAST8
 # if UINT_FAST8_MAX > UINT32_MAX
 #  define SCNxFAST8 SCNx64
 # elif UINT_FAST8_MAX == 0xffff
 #  define SCNxFAST8 "x"
 # endif
 #endif
-#if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST16
+#if !defined SCNdFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define SCNdFAST16 SCNd64
 # elif INT_FAST16_MAX == 0x7fff
 #  define SCNdFAST16 "d"
 # endif
 #endif
-#if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST16
+#if !defined SCNiFAST16
 # if INT_FAST16_MAX > INT32_MAX
 #  define SCNiFAST16 SCNi64
 # elif INT_FAST16_MAX == 0x7fff
 #  define SCNiFAST16 "i"
 # endif
 #endif
-#if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST16
+#if !defined SCNoFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNoFAST16 SCNo64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNoFAST16 "o"
 # endif
 #endif
-#if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST16
+#if !defined SCNuFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNuFAST16 SCNu64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNuFAST16 "u"
 # endif
 #endif
-#if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST16
+#if !defined SCNxFAST16
 # if UINT_FAST16_MAX > UINT32_MAX
 #  define SCNxFAST16 SCNx64
 # elif UINT_FAST16_MAX == 0xffff
 #  define SCNxFAST16 "x"
 # endif
 #endif
-#if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNdFAST32
+#if !defined SCNdFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define SCNdFAST32 SCNd64
 # else
 #  define SCNdFAST32 "d"
 # endif
 #endif
-#if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNiFAST32
+#if !defined SCNiFAST32
 # if INT_FAST32_MAX > INT32_MAX
 #  define SCNiFAST32 SCNi64
 # else
 #  define SCNiFAST32 "i"
 # endif
 #endif
-#if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNoFAST32
+#if !defined SCNoFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNoFAST32 SCNo64
 # else
 #  define SCNoFAST32 "o"
 # endif
 #endif
-#if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNuFAST32
+#if !defined SCNuFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNuFAST32 SCNu64
 # else
 #  define SCNuFAST32 "u"
 # endif
 #endif
-#if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
-# undef SCNxFAST32
+#if !defined SCNxFAST32
 # if UINT_FAST32_MAX > UINT32_MAX
 #  define SCNxFAST32 SCNx64
 # else
 # endif
 #endif
 #ifdef INT64_MAX
-# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNdFAST64
+# if !defined SCNdFAST64
 #  define SCNdFAST64 SCNd64
 # endif
-# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNiFAST64
+# if !defined SCNiFAST64
 #  define SCNiFAST64 SCNi64
 # endif
 #endif
 #ifdef UINT64_MAX
-# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNoFAST64
+# if !defined SCNoFAST64
 #  define SCNoFAST64 SCNo64
 # endif
-# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNuFAST64
+# if !defined SCNuFAST64
 #  define SCNuFAST64 SCNu64
 # endif
-# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
-#  undef SCNxFAST64
+# if !defined SCNxFAST64
 #  define SCNxFAST64 SCNx64
 # endif
 #endif
 
-#if !defined SCNdMAX || @PRI_MACROS_BROKEN@
-# undef SCNdMAX
+#if !defined SCNdMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define SCNdMAX SCNd64
 # else
 #  define SCNdMAX "ld"
 # endif
 #endif
-#if !defined SCNiMAX || @PRI_MACROS_BROKEN@
-# undef SCNiMAX
+#if !defined SCNiMAX
 # if @INT32_MAX_LT_INTMAX_MAX@
 #  define SCNiMAX SCNi64
 # else
 #  define SCNiMAX "li"
 # endif
 #endif
-#if !defined SCNoMAX || @PRI_MACROS_BROKEN@
-# undef SCNoMAX
+#if !defined SCNoMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNoMAX SCNo64
 # else
 #  define SCNoMAX "lo"
 # endif
 #endif
-#if !defined SCNuMAX || @PRI_MACROS_BROKEN@
-# undef SCNuMAX
+#if !defined SCNuMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNuMAX SCNu64
 # else
 #  define SCNuMAX "lu"
 # endif
 #endif
-#if !defined SCNxMAX || @PRI_MACROS_BROKEN@
-# undef SCNxMAX
+#if !defined SCNxMAX
 # if @UINT32_MAX_LT_UINTMAX_MAX@
 #  define SCNxMAX SCNx64
 # else
 # endif
 #endif
 
-#if !defined SCNdPTR || @PRI_MACROS_BROKEN@
-# undef SCNdPTR
+#if !defined SCNdPTR
 # ifdef INTPTR_MAX
 #  define SCNdPTR @PRIPTR_PREFIX@ "d"
 # endif
 #endif
-#if !defined SCNiPTR || @PRI_MACROS_BROKEN@
-# undef SCNiPTR
+#if !defined SCNiPTR
 # ifdef INTPTR_MAX
 #  define SCNiPTR @PRIPTR_PREFIX@ "i"
 # endif
 #endif
-#if !defined SCNoPTR || @PRI_MACROS_BROKEN@
-# undef SCNoPTR
+#if !defined SCNoPTR
 # ifdef UINTPTR_MAX
 #  define SCNoPTR @PRIPTR_PREFIX@ "o"
 # endif
 #endif
-#if !defined SCNuPTR || @PRI_MACROS_BROKEN@
-# undef SCNuPTR
+#if !defined SCNuPTR
 # ifdef UINTPTR_MAX
 #  define SCNuPTR @PRIPTR_PREFIX@ "u"
 # endif
 #endif
-#if !defined SCNxPTR || @PRI_MACROS_BROKEN@
-# undef SCNxPTR
+#if !defined SCNxPTR
 # ifdef UINTPTR_MAX
 #  define SCNxPTR @PRIPTR_PREFIX@ "x"
 # endif
@@ -1091,15 +939,19 @@ _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
 #   define strtoimax rpl_strtoimax
 #  endif
 _GL_FUNCDECL_RPL (strtoimax, intmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoimax, intmax_t,
+                  (const char *restrict, char **restrict, int));
 # else
 #  if !@HAVE_DECL_STRTOIMAX@
 #   undef strtoimax
 _GL_FUNCDECL_SYS (strtoimax, intmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
+_GL_CXXALIAS_SYS (strtoimax, intmax_t,
+                  (const char *restrict, char **restrict, int));
 # endif
 _GL_CXXALIASWARN (strtoimax);
 #elif defined GNULIB_POSIXCHECK
@@ -1117,15 +969,19 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
 #   define strtoumax rpl_strtoumax
 #  endif
 _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoumax, uintmax_t,
+                  (const char *restrict, char **restrict, int));
 # else
 #  if !@HAVE_DECL_STRTOUMAX@
 #   undef strtoumax
 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
-                  (const char *, char **, int) _GL_ARG_NONNULL ((1)));
+                  (const char *restrict, char **restrict, int)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
+_GL_CXXALIAS_SYS (strtoumax, uintmax_t,
+                  (const char *restrict, char **restrict, int));
 # endif
 _GL_CXXALIASWARN (strtoumax);
 #elif defined GNULIB_POSIXCHECK
index df4b4aa..8984f37 100644 (file)
@@ -1,18 +1,18 @@
 /* Test whether a character is a blank.
 
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index bdd86cb..55628ec 100644 (file)
@@ -1,18 +1,18 @@
 /* Test wide character for being blank.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
diff --git a/lib/iswdigit.c b/lib/iswdigit.c
new file mode 100644 (file)
index 0000000..8ec9a6e
--- /dev/null
@@ -0,0 +1,26 @@
+/* Test wide character for being a digit.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wctype.h>
+
+int
+iswdigit (wint_t wc)
+{
+  return wc >= '0' && wc <= '9';
+}
diff --git a/lib/iswxdigit.c b/lib/iswxdigit.c
new file mode 100644 (file)
index 0000000..fcdcdba
--- /dev/null
@@ -0,0 +1,33 @@
+/* Test wide character for being a hexadecimal digit.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wctype.h>
+
+int
+iswxdigit (wint_t wc)
+{
+  return ((wc >= '0' && wc <= '9')
+#if 'A' == 0x41 && 'a' == 0x61
+          /* Optimization, assuming ASCII */
+          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')
+#else
+          || (wc >= 'A' && wc <= 'F') || (wc >= 'a' && wc <= 'f')
+#endif
+         );
+}
index 6a43bd8..7984866 100644 (file)
@@ -1,18 +1,18 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 96c237a..4873899 100644 (file)
@@ -1,22 +1,22 @@
 /* Substitute for and wrapper around <langinfo.h>.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
  * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
- * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
  */
 
 #ifndef _@GUARD_PREFIX@_LANGINFO_H
diff --git a/lib/lc-charset-dispatch.c b/lib/lc-charset-dispatch.c
new file mode 100644 (file)
index 0000000..88a0bd3
--- /dev/null
@@ -0,0 +1,82 @@
+/* Dispatching based on the current locale's character encoding.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2018.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "lc-charset-dispatch.h"
+
+#if GNULIB_defined_mbstate_t
+
+# include "localcharset.h"
+# include "streq.h"
+
+# if GNULIB_WCHAR_SINGLE_LOCALE
+/* When we know that the locale does not change, provide a speedup by
+   caching the value of locale_encoding_classification.  */
+#  define locale_encoding_classification_cached locale_encoding_classification
+# else
+/* By default, don't make assumptions, hence no caching.  */
+#  define locale_encoding_classification_uncached locale_encoding_classification
+# endif
+
+# if GNULIB_WCHAR_SINGLE_LOCALE
+static inline
+# endif
+enc_t
+locale_encoding_classification_uncached (void)
+{
+  const char *encoding = locale_charset ();
+  if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+    return enc_utf8;
+  if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+    return enc_eucjp;
+  if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+      || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+      || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+    return enc_94;
+  if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+    return enc_euctw;
+  if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+    return enc_gb18030;
+  if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+    return enc_sjis;
+  return enc_other;
+}
+
+# if GNULIB_WCHAR_SINGLE_LOCALE
+
+static int cached_locale_enc = -1;
+
+enc_t
+locale_encoding_classification_cached (void)
+{
+  if (cached_locale_enc < 0)
+    cached_locale_enc = locale_encoding_classification_uncached ();
+  return cached_locale_enc;
+}
+
+# endif
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+
+#endif
diff --git a/lib/lc-charset-dispatch.h b/lib/lc-charset-dispatch.h
new file mode 100644 (file)
index 0000000..59b485d
--- /dev/null
@@ -0,0 +1,40 @@
+/* Dispatching based on the current locale's character encoding.
+   Copyright (C) 2018-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2018.  */
+
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+
+/* A classification of special values of the encoding of the current locale.  */
+typedef enum
+  {
+    enc_other,      /* other */
+    enc_utf8,       /* UTF-8 */
+    enc_eucjp,      /* EUC-JP */
+    enc_94,         /* EUC-KR, GB2312, BIG5 */
+    enc_euctw,      /* EUC-TW */
+    enc_gb18030,    /* GB18030 */
+    enc_sjis        /* SJIS */
+  }
+  enc_t;
+
+/* Returns a classification of special values of the encoding of the current
+   locale.  */
+extern enc_t locale_encoding_classification (void);
+
+#endif
index d7b4093..f68749f 100644 (file)
@@ -1,18 +1,18 @@
 /* System definitions for code taken from the GNU C Library
 
-   Copyright 2017-2018 Free Software Foundation, Inc.
+   Copyright 2017-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with this program; if not, see
    <https://www.gnu.org/licenses/>.  */
 
 
    When compiled as part of glibc this is a no-op; when compiled as
    part of Gnulib this includes Gnulib's <config.h> and defines macros
-   that glibc library code would normally assume.  */
+   that glibc library code would normally assume.
+
+   Note: This header file MUST NOT be included by public header files
+   of Gnulib.  */
 
 #include <config.h>
 
 /* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
-   _FEATURES_H, __WORDSIZE, and __set_errno.  On FreeBSD 11 it
-   includes <sys/cdefs.h> which defines __nonnull.  Elsewhere it
-   is harmless.  */
+   _FEATURES_H, __WORDSIZE, and __set_errno.  On FreeBSD 11 and
+   DragonFlyBSD 5.9 it includes <sys/cdefs.h> which defines __nonnull.
+   Elsewhere it is harmless.  */
 #include <errno.h>
 
 /* From glibc <errno.h>.  */
 
 #ifndef __glibc_clang_prereq
 # if defined __clang_major__ && defined __clang_minor__
-#  define __glibc_clang_prereq(maj, min) \
-     ((maj) < __clang_major__ + ((min) <= __clang_minor__))
+#  ifdef __apple_build_version__
+/* Apple for some reason renumbers __clang_major__ and __clang_minor__.
+   Gnulib code uses only __glibc_clang_prereq (3, 5); map it to
+   6000000 <= __apple_build_version__.  Support for other calls to
+   __glibc_clang_prereq can be added here as needed.  */
+#   define __glibc_clang_prereq(maj, min) \
+      ((maj) == 3 && (min) == 5 ? 6000000 <= __apple_build_version__ : 0)
+#  else
+#   define __glibc_clang_prereq(maj, min) \
+      ((maj) < __clang_major__ + ((min) <= __clang_minor__))
+#  endif
 # else
 #  define __glibc_clang_prereq(maj, min) 0
 # endif
 #endif
 
-
-/* Prepare to include <cdefs.h>, which is our copy of glibc
-   <sys/cdefs.h>.  */
+#ifndef __attribute_nonnull__
+/* <sys/cdefs.h> either does not exist, or is too old for Gnulib.
+   Prepare to include <cdefs.h>, which is Gnulib's version of a
+   more-recent glibc <sys/cdefs.h>.  */
 
 /* Define _FEATURES_H so that <cdefs.h> does not include <features.h>.  */
-#ifndef _FEATURES_H
-# define _FEATURES_H 1
-#endif
-/* Define __WORDSIZE so that <cdefs.h> does not attempt to include
-   nonexistent files.  Make it a syntax error, since Gnulib does not
-   use __WORDSIZE now, and if Gnulib uses it later the syntax error
-   will let us know that __WORDSIZE needs configuring.  */
-#ifndef __WORDSIZE
-# define __WORDSIZE %%%
-#endif
+# ifndef _FEATURES_H
+#  define _FEATURES_H 1
+# endif
+/* Define __GNULIB_CDEFS so that <cdefs.h> does not attempt to include
+   nonexistent files.  */
+# define __GNULIB_CDEFS
 /* Undef the macros unconditionally defined by our copy of glibc
    <sys/cdefs.h>, so that they do not clash with any system-defined
    versions.  */
-#undef _SYS_CDEFS_H
-#undef __ASMNAME
-#undef __ASMNAME2
-#undef __BEGIN_DECLS
-#undef __CONCAT
-#undef __END_DECLS
-#undef __HAVE_GENERIC_SELECTION
-#undef __LDBL_COMPAT
-#undef __LDBL_REDIR
-#undef __LDBL_REDIR1
-#undef __LDBL_REDIR1_DECL
-#undef __LDBL_REDIR1_NTH
-#undef __LDBL_REDIR_DECL
-#undef __LDBL_REDIR_NTH
-#undef __LEAF
-#undef __LEAF_ATTR
-#undef __NTH
-#undef __NTHNL
-#undef __P
-#undef __PMT
-#undef __REDIRECT
-#undef __REDIRECT_LDBL
-#undef __REDIRECT_NTH
-#undef __REDIRECT_NTHNL
-#undef __REDIRECT_NTH_LDBL
-#undef __STRING
-#undef __THROW
-#undef __THROWNL
-#undef __always_inline
-#undef __attribute__
-#undef __attribute_alloc_size__
-#undef __attribute_artificial__
-#undef __attribute_const__
-#undef __attribute_deprecated__
-#undef __attribute_deprecated_msg__
-#undef __attribute_format_arg__
-#undef __attribute_format_strfmon__
-#undef __attribute_malloc__
-#undef __attribute_noinline__
-#undef __attribute_nonstring__
-#undef __attribute_pure__
-#undef __attribute_used__
-#undef __attribute_warn_unused_result__
-#undef __bos
-#undef __bos0
-#undef __errordecl
-#undef __extension__
-#undef __extern_always_inline
-#undef __extern_inline
-#undef __flexarr
-#undef __fortify_function
-#undef __glibc_c99_flexarr_available
-#undef __glibc_clang_has_extension
-#undef __glibc_likely
-#undef __glibc_macro_warning
-#undef __glibc_macro_warning1
-#undef __glibc_unlikely
-#undef __inline
-#undef __ptr_t
-#undef __restrict
-#undef __restrict_arr
-#undef __va_arg_pack
-#undef __va_arg_pack_len
-#undef __warnattr
-#undef __warndecl
+# undef _SYS_CDEFS_H
+# undef __ASMNAME
+# undef __ASMNAME2
+# undef __BEGIN_DECLS
+# undef __CONCAT
+# undef __END_DECLS
+# undef __HAVE_GENERIC_SELECTION
+# undef __LDBL_COMPAT
+# undef __LDBL_REDIR
+# undef __LDBL_REDIR1
+# undef __LDBL_REDIR1_DECL
+# undef __LDBL_REDIR1_NTH
+# undef __LDBL_REDIR2_DECL
+# undef __LDBL_REDIR_DECL
+# undef __LDBL_REDIR_NTH
+# undef __LEAF
+# undef __LEAF_ATTR
+# undef __NTH
+# undef __NTHNL
+# undef __REDIRECT
+# undef __REDIRECT_LDBL
+# undef __REDIRECT_NTH
+# undef __REDIRECT_NTHNL
+# undef __REDIRECT_NTH_LDBL
+# undef __STRING
+# undef __THROW
+# undef __THROWNL
+# undef __attr_access
+# undef __attribute__
+# undef __attribute_alloc_size__
+# undef __attribute_artificial__
+# undef __attribute_const__
+# undef __attribute_deprecated__
+# undef __attribute_deprecated_msg__
+# undef __attribute_format_arg__
+# undef __attribute_format_strfmon__
+# undef __attribute_malloc__
+# undef __attribute_noinline__
+# undef __attribute_nonstring__
+# undef __attribute_pure__
+# undef __attribute_returns_twice__
+# undef __attribute_used__
+# undef __attribute_warn_unused_result__
+# undef __bos
+# undef __bos0
+# undef __errordecl
+# undef __extension__
+# undef __extern_always_inline
+# undef __extern_inline
+# undef __flexarr
+# undef __fortify_function
+# undef __glibc_c99_flexarr_available
+# undef __glibc_has_attribute
+# undef __glibc_has_builtin
+# undef __glibc_has_extension
+# undef __glibc_macro_warning
+# undef __glibc_macro_warning1
+# undef __glibc_objsize
+# undef __glibc_objsize0
+# undef __glibc_unlikely
+# undef __inline
+# undef __ptr_t
+# undef __restrict
+# undef __restrict_arr
+# undef __va_arg_pack
+# undef __va_arg_pack_len
+# undef __warnattr
 
 /* Include our copy of glibc <sys/cdefs.h>.  */
-#include <cdefs.h>
+# include <cdefs.h>
 
 /* <cdefs.h> __inline is too pessimistic for non-GCC.  */
-#undef __inline
-#ifndef HAVE___INLINE
-# if 199901 <= __STDC_VERSION__ || defined inline
-#  define __inline inline
-# else
-#  define __inline
+# undef __inline
+# ifndef HAVE___INLINE
+#  if 199901 <= __STDC_VERSION__ || defined inline
+#   define __inline inline
+#  else
+#   define __inline
+#  endif
 # endif
-#endif
+
+#endif /* defined __glibc_likely */
 
 
 /* A substitute for glibc <libc-symbols.h>, good enough for Gnulib.  */
 #define attribute_hidden
-#define libc_hidden_proto(name, ...)
+#define libc_hidden_proto(name)
 #define libc_hidden_def(name)
 #define libc_hidden_weak(name)
 #define libc_hidden_ver(local, name)
 
 /* A substitute for glibc <shlib-compat.h>, good enough for Gnulib.  */
 #define SHLIB_COMPAT(lib, introduced, obsoleted) 0
-#define versioned_symbol(lib, local, symbol, version)
+#define compat_symbol(lib, local, symbol, version) extern int dummy
+#define versioned_symbol(lib, local, symbol, version) extern int dummy
index 89d7195..2ecafeb 100644 (file)
@@ -1,30 +1,46 @@
 /* A GNU-like <limits.h>.
 
-   Copyright 2016-2018 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 3, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-#ifndef _@GUARD_PREFIX@_LIMITS_H
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
-/* The include_next requires a split double-inclusion guard.  */
+#if defined _GL_ALREADY_INCLUDING_LIMITS_H
+/* Special invocation convention:
+   On Haiku/x86_64, we have a sequence of nested includes
+   <limits.h> -> <syslimits.h> -> <limits.h>.
+   In this situation, LONG_MAX and INT_MAX are not yet defined,
+   therefore we should not attempt to define LONG_BIT.  */
+
 #@INCLUDE_NEXT@ @NEXT_LIMITS_H@
 
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+
+# define _GL_ALREADY_INCLUDING_LIMITS_H
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_LIMITS_H@
+
+# undef _GL_ALREADY_INCLUDING_LIMITS_H
+
 #ifndef _@GUARD_PREFIX@_LIMITS_H
 #define _@GUARD_PREFIX@_LIMITS_H
 
 # endif
 #endif
 
-/* Macros specified by ISO/IEC TS 18661-1:2014.  */
+/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014.  */
 
 #if (! defined ULLONG_WIDTH                                             \
-     && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+     && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
+         || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
 # define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
 # define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
 # define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
 # define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
 # define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
 # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
-#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
+#endif
+
+/* Macros specified by C2x.  */
+
+#if (! defined BOOL_WIDTH \
+     && (defined _GNU_SOURCE \
+         || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
+# define BOOL_MAX 1
+# define BOOL_WIDTH 1
+#endif
 
 #endif /* _@GUARD_PREFIX@_LIMITS_H */
 #endif /* _@GUARD_PREFIX@_LIMITS_H */
+#endif
index 58c5718..3c50858 100644 (file)
@@ -1,19 +1,19 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
 
@@ -58,6 +58,9 @@
 #elif defined WINDOWS_NATIVE
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
+  /* For the use of setlocale() below, the Gnulib override in setlocale.c is
+     not needed; see the platform lists in setlocale_null.m4.  */
+# undef setlocale
 #endif
 #if defined OS2
 # define INCL_DOS
@@ -150,7 +153,8 @@ static const struct table_entry alias_table[] =
     { "ISO8859-2",  "ISO-8859-2" },
     { "ISO8859-4",  "ISO-8859-4" },
     { "ISO8859-5",  "ISO-8859-5" },
-    { "ISO8859-7",  "ISO-8859-7" }
+    { "ISO8859-7",  "ISO-8859-7" },
+    { "US-ASCII",   "ASCII" }
 #   define alias_table_defined
 #  endif
 #  if defined __APPLE__ && defined __MACH__                 /* Mac OS X */
@@ -377,27 +381,164 @@ static const struct table_entry alias_table[] =
     /* The list of encodings is taken from "List of OS/2 Codepages"
        by Alex Taylor:
        <http://altsan.org/os2/toolkits/uls/index.html#codepages>.
-       See also "IBM Globalization - Code page identifiers":
-       <https://www-01.ibm.com/software/globalization/cp/cp_cpgid.html>.  */
-    { "CP1089", "ISO-8859-6" },
-    { "CP1208", "UTF-8" },
-    { "CP1381", "GB2312" },
-    { "CP1386", "GBK" },
-    { "CP3372", "EUC-JP" },
-    { "CP813",  "ISO-8859-7" },
-    { "CP819",  "ISO-8859-1" },
-    { "CP878",  "KOI8-R" },
-    { "CP912",  "ISO-8859-2" },
-    { "CP913",  "ISO-8859-3" },
-    { "CP914",  "ISO-8859-4" },
-    { "CP915",  "ISO-8859-5" },
-    { "CP916",  "ISO-8859-8" },
-    { "CP920",  "ISO-8859-9" },
-    { "CP921",  "ISO-8859-13" },
-    { "CP923",  "ISO-8859-15" },
-    { "CP954",  "EUC-JP" },
-    { "CP964",  "EUC-TW" },
-    { "CP970",  "EUC-KR" }
+       See also "__convcp() of kLIBC":
+       <https://github.com/bitwiseworks/libc/blob/master/src/emx/src/lib/locale/__convcp.c>.  */
+    { "CP1004",        "CP1252" },
+  /*{ "CP1041",        "CP943" },*/
+  /*{ "CP1088",        "CP949" },*/
+    { "CP1089",        "ISO-8859-6" },
+  /*{ "CP1114",        "CP950" },*/
+  /*{ "CP1115",        "GB2312" },*/
+    { "CP1208",        "UTF-8" },
+  /*{ "CP1380",        "GB2312" },*/
+    { "CP1381",        "GB2312" },
+    { "CP1383",        "GB2312" },
+    { "CP1386",        "GBK" },
+  /*{ "CP301",         "CP943" },*/
+    { "CP3372",        "EUC-JP" },
+    { "CP4946",        "CP850" },
+  /*{ "CP5048",        "JIS_X0208-1990" },*/
+  /*{ "CP5049",        "JIS_X0212-1990" },*/
+  /*{ "CP5067",        "KS_C_5601-1987" },*/
+    { "CP813",         "ISO-8859-7" },
+    { "CP819",         "ISO-8859-1" },
+    { "CP878",         "KOI8-R" },
+  /*{ "CP897",         "CP943" },*/
+    { "CP912",         "ISO-8859-2" },
+    { "CP913",         "ISO-8859-3" },
+    { "CP914",         "ISO-8859-4" },
+    { "CP915",         "ISO-8859-5" },
+    { "CP916",         "ISO-8859-8" },
+    { "CP920",         "ISO-8859-9" },
+    { "CP921",         "ISO-8859-13" },
+    { "CP923",         "ISO-8859-15" },
+  /*{ "CP941",         "CP943" },*/
+  /*{ "CP947",         "CP950" },*/
+  /*{ "CP951",         "CP949" },*/
+  /*{ "CP952",         "JIS_X0208-1990" },*/
+  /*{ "CP953",         "JIS_X0212-1990" },*/
+    { "CP954",         "EUC-JP" },
+    { "CP964",         "EUC-TW" },
+    { "CP970",         "EUC-KR" },
+  /*{ "CP971",         "KS_C_5601-1987" },*/
+    { "IBM-1004",      "CP1252" },
+  /*{ "IBM-1006",      "?" },*/
+  /*{ "IBM-1008",      "?" },*/
+  /*{ "IBM-1041",      "CP943" },*/
+  /*{ "IBM-1051",      "?" },*/
+  /*{ "IBM-1088",      "CP949" },*/
+    { "IBM-1089",      "ISO-8859-6" },
+  /*{ "IBM-1098",      "?" },*/
+  /*{ "IBM-1114",      "CP950" },*/
+  /*{ "IBM-1115",      "GB2312" },*/
+  /*{ "IBM-1116",      "?" },*/
+  /*{ "IBM-1117",      "?" },*/
+  /*{ "IBM-1118",      "?" },*/
+  /*{ "IBM-1119",      "?" },*/
+    { "IBM-1124",      "CP1124" },
+    { "IBM-1125",      "CP1125" },
+    { "IBM-1131",      "CP1131" },
+    { "IBM-1208",      "UTF-8" },
+    { "IBM-1250",      "CP1250" },
+    { "IBM-1251",      "CP1251" },
+    { "IBM-1252",      "CP1252" },
+    { "IBM-1253",      "CP1253" },
+    { "IBM-1254",      "CP1254" },
+    { "IBM-1255",      "CP1255" },
+    { "IBM-1256",      "CP1256" },
+    { "IBM-1257",      "CP1257" },
+  /*{ "IBM-1275",      "?" },*/
+  /*{ "IBM-1276",      "?" },*/
+  /*{ "IBM-1277",      "?" },*/
+  /*{ "IBM-1280",      "?" },*/
+  /*{ "IBM-1281",      "?" },*/
+  /*{ "IBM-1282",      "?" },*/
+  /*{ "IBM-1283",      "?" },*/
+  /*{ "IBM-1380",      "GB2312" },*/
+    { "IBM-1381",      "GB2312" },
+    { "IBM-1383",      "GB2312" },
+    { "IBM-1386",      "GBK" },
+  /*{ "IBM-301",       "CP943" },*/
+    { "IBM-3372",      "EUC-JP" },
+    { "IBM-367",       "ASCII" },
+    { "IBM-437",       "CP437" },
+    { "IBM-4946",      "CP850" },
+  /*{ "IBM-5048",      "JIS_X0208-1990" },*/
+  /*{ "IBM-5049",      "JIS_X0212-1990" },*/
+  /*{ "IBM-5067",      "KS_C_5601-1987" },*/
+    { "IBM-813",       "ISO-8859-7" },
+    { "IBM-819",       "ISO-8859-1" },
+    { "IBM-850",       "CP850" },
+  /*{ "IBM-851",       "?" },*/
+    { "IBM-852",       "CP852" },
+    { "IBM-855",       "CP855" },
+    { "IBM-856",       "CP856" },
+    { "IBM-857",       "CP857" },
+  /*{ "IBM-859",       "?" },*/
+    { "IBM-860",       "CP860" },
+    { "IBM-861",       "CP861" },
+    { "IBM-862",       "CP862" },
+    { "IBM-863",       "CP863" },
+    { "IBM-864",       "CP864" },
+    { "IBM-865",       "CP865" },
+    { "IBM-866",       "CP866" },
+  /*{ "IBM-868",       "?" },*/
+    { "IBM-869",       "CP869" },
+    { "IBM-874",       "CP874" },
+    { "IBM-878",       "KOI8-R" },
+  /*{ "IBM-895",       "?" },*/
+  /*{ "IBM-897",       "CP943" },*/
+  /*{ "IBM-907",       "?" },*/
+  /*{ "IBM-909",       "?" },*/
+    { "IBM-912",       "ISO-8859-2" },
+    { "IBM-913",       "ISO-8859-3" },
+    { "IBM-914",       "ISO-8859-4" },
+    { "IBM-915",       "ISO-8859-5" },
+    { "IBM-916",       "ISO-8859-8" },
+    { "IBM-920",       "ISO-8859-9" },
+    { "IBM-921",       "ISO-8859-13" },
+    { "IBM-922",       "CP922" },
+    { "IBM-923",       "ISO-8859-15" },
+    { "IBM-932",       "CP932" },
+  /*{ "IBM-941",       "CP943" },*/
+  /*{ "IBM-942",       "?" },*/
+    { "IBM-943",       "CP943" },
+  /*{ "IBM-947",       "CP950" },*/
+    { "IBM-949",       "CP949" },
+    { "IBM-950",       "CP950" },
+  /*{ "IBM-951",       "CP949" },*/
+  /*{ "IBM-952",       "JIS_X0208-1990" },*/
+  /*{ "IBM-953",       "JIS_X0212-1990" },*/
+    { "IBM-954",       "EUC-JP" },
+  /*{ "IBM-955",       "?" },*/
+    { "IBM-964",       "EUC-TW" },
+    { "IBM-970",       "EUC-KR" },
+  /*{ "IBM-971",       "KS_C_5601-1987" },*/
+    { "IBM-eucCN",     "GB2312" },
+    { "IBM-eucJP",     "EUC-JP" },
+    { "IBM-eucKR",     "EUC-KR" },
+    { "IBM-eucTW",     "EUC-TW" },
+    { "IBM33722",      "EUC-JP" },
+    { "ISO8859-1",     "ISO-8859-1" },
+    { "ISO8859-2",     "ISO-8859-2" },
+    { "ISO8859-3",     "ISO-8859-3" },
+    { "ISO8859-4",     "ISO-8859-4" },
+    { "ISO8859-5",     "ISO-8859-5" },
+    { "ISO8859-6",     "ISO-8859-6" },
+    { "ISO8859-7",     "ISO-8859-7" },
+    { "ISO8859-8",     "ISO-8859-8" },
+    { "ISO8859-9",     "ISO-8859-9" },
+  /*{ "JISX0201-1976", "JISX0201-1976" },*/
+  /*{ "JISX0208-1978", "?" },*/
+  /*{ "JISX0208-1983", "JIS_X0208-1983" },*/
+  /*{ "JISX0208-1990", "JIS_X0208-1990" },*/
+  /*{ "JISX0212-1990", "JIS_X0212-1990" },*/
+  /*{ "KSC5601-1987",  "KS_C_5601-1987" },*/
+    { "SJIS-1",        "CP943" },
+    { "SJIS-2",        "CP943" },
+    { "eucJP",         "EUC-JP" },
+    { "eucKR",         "EUC-KR" },
+    { "eucTW-1993",    "EUC-TW" }
 #   define alias_table_defined
 #  endif
 #  if defined VMS                                           /* OpenVMS */
@@ -675,8 +816,11 @@ static const struct table_entry locale_table[] =
 
 
 /* Determine the current locale's character encoding, and canonicalize it
-   into one of the canonical names listed in localcharset.h.
-   The result must not be freed; it is statically allocated.
+   into one of the canonical names listed below.
+   The result must not be freed; it is statically allocated.  The result
+   becomes invalid when setlocale() is used to change the global locale, or
+   when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
+   is changed; threads in multithreaded programs should not do this.
    If the canonical name cannot be determined, the result is a non-canonical
    name.  */
 
@@ -688,6 +832,13 @@ locale_charset (void)
 {
   const char *codeset;
 
+  /* This function must be multithread-safe.  To achieve this without using
+     thread-local storage, we use a simple strcpy or memcpy to fill this static
+     buffer.  Filling it through, for example, strcpy + strcat would not be
+     guaranteed to leave the buffer's contents intact if another thread is
+     currently accessing it.  If necessary, the contents is first assembled in
+     a stack-allocated buffer.  */
+
 #if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
 
 # if HAVE_LANGINFO_CODESET
@@ -702,7 +853,7 @@ locale_charset (void)
   if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
     {
       const char *locale;
-      static char buf[2 + 10 + 1];
+      static char resultbuf[2 + 10 + 1];
 
       locale = getenv ("LC_ALL");
       if (locale == NULL || locale[0] == '\0')
@@ -726,11 +877,12 @@ locale_charset (void)
               modifier = strchr (dot, '@');
               if (modifier == NULL)
                 return dot;
-              if (modifier - dot < sizeof (buf))
+              if (modifier - dot < sizeof (resultbuf))
                 {
-                  memcpy (buf, dot, modifier - dot);
-                  buf [modifier - dot] = '\0';
-                  return buf;
+                  /* This way of filling resultbuf is multithread-safe.  */
+                  memcpy (resultbuf, dot, modifier - dot);
+                  resultbuf [modifier - dot] = '\0';
+                  return resultbuf;
                 }
             }
         }
@@ -746,8 +898,13 @@ locale_charset (void)
          converting to GetConsoleOutputCP().  This leads to correct results,
          except when SetConsoleOutputCP has been called and a raster font is
          in use.  */
-      sprintf (buf, "CP%u", GetACP ());
-      codeset = buf;
+      {
+        char buf[2 + 10 + 1];
+
+        sprintf (buf, "CP%u", GetACP ());
+        strcpy (resultbuf, buf);
+        codeset = resultbuf;
+      }
     }
 #  endif
 
@@ -757,42 +914,44 @@ locale_charset (void)
 
 # elif defined WINDOWS_NATIVE
 
-  static char buf[2 + 10 + 1];
+  char buf[2 + 10 + 1];
+  static char resultbuf[2 + 10 + 1];
 
   /* The Windows API has a function returning the locale's codepage as
      a number, but the value doesn't change according to what the
      'setlocale' call specified.  So we use it as a last resort, in
      case the string returned by 'setlocale' doesn't specify the
      codepage.  */
-  char *current_locale = setlocale (LC_ALL, NULL);
-  char *pdot;
+  char *current_locale = setlocale (LC_CTYPE, NULL);
+  char *pdot = strrchr (current_locale, '.');
 
-  /* If they set different locales for different categories,
-     'setlocale' will return a semi-colon separated list of locale
-     values.  To make sure we use the correct one, we choose LC_CTYPE.  */
-  if (strchr (current_locale, ';'))
-    current_locale = setlocale (LC_CTYPE, NULL);
-
-  pdot = strrchr (current_locale, '.');
   if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
     sprintf (buf, "CP%s", pdot + 1);
   else
     {
       /* The Windows API has a function returning the locale's codepage as a
-        number: GetACP().
-        When the output goes to a console window, it needs to be provided in
-        GetOEMCP() encoding if the console is using a raster font, or in
-        GetConsoleOutputCP() encoding if it is using a TrueType font.
-        But in GUI programs and for output sent to files and pipes, GetACP()
-        encoding is the best bet.  */
+         number: GetACP().
+         When the output goes to a console window, it needs to be provided in
+         GetOEMCP() encoding if the console is using a raster font, or in
+         GetConsoleOutputCP() encoding if it is using a TrueType font.
+         But in GUI programs and for output sent to files and pipes, GetACP()
+         encoding is the best bet.  */
       sprintf (buf, "CP%u", GetACP ());
     }
-  codeset = buf;
+  /* For a locale name such as "French_France.65001", in Windows 10,
+     setlocale now returns "French_France.utf8" instead.  */
+  if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0)
+    codeset = "UTF-8";
+  else
+    {
+      strcpy (resultbuf, buf);
+      codeset = resultbuf;
+    }
 
 # elif defined OS2
 
   const char *locale;
-  static char buf[2 + 10 + 1];
+  static char resultbuf[2 + 10 + 1];
   ULONG cp[3];
   ULONG cplen;
 
@@ -821,11 +980,12 @@ locale_charset (void)
           modifier = strchr (dot, '@');
           if (modifier == NULL)
             return dot;
-          if (modifier - dot < sizeof (buf))
+          if (modifier - dot < sizeof (resultbuf))
             {
-              memcpy (buf, dot, modifier - dot);
-              buf [modifier - dot] = '\0';
-              return buf;
+              /* This way of filling resultbuf is multithread-safe.  */
+              memcpy (resultbuf, dot, modifier - dot);
+              resultbuf [modifier - dot] = '\0';
+              return resultbuf;
             }
         }
 
@@ -841,8 +1001,11 @@ locale_charset (void)
         codeset = "";
       else
         {
+          char buf[2 + 10 + 1];
+
           sprintf (buf, "CP%u", cp[0]);
-          codeset = buf;
+          strcpy (resultbuf, buf);
+          codeset = resultbuf;
         }
     }
 
index e4ba296..0ff4954 100644 (file)
@@ -1,19 +1,19 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LOCALCHARSET_H
 #define _LOCALCHARSET_H
@@ -26,7 +26,10 @@ extern "C" {
 
 /* Determine the current locale's character encoding, and canonicalize it
    into one of the canonical names listed below.
-   The result must not be freed; it is statically allocated.
+   The result must not be freed; it is statically allocated.  The result
+   becomes invalid when setlocale() is used to change the global locale, or
+   when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
+   is changed; threads in multithreaded programs should not do this.
    If the canonical name cannot be determined, the result is a non-canonical
    name.  */
 extern const char * locale_charset (void);
@@ -45,15 +48,15 @@ extern const char * locale_charset (void);
                                     (darwin = Mac OS X, windows = native Windows)
 
    ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin minix cygwin
-   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
-   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+   ISO-8859-2              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
    ISO-8859-3              Y   glibc solaris cygwin
    ISO-8859-4              Y   hpux osf solaris freebsd netbsd openbsd darwin
-   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+   ISO-8859-5              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
    ISO-8859-6              Y   glibc aix hpux solaris cygwin
-   ISO-8859-7              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
-   ISO-8859-8              Y   glibc aix hpux osf solaris cygwin
-   ISO-8859-9              Y   glibc aix hpux irix osf solaris freebsd darwin cygwin
+   ISO-8859-7              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+   ISO-8859-8              Y   glibc aix hpux osf solaris cygwin zos
+   ISO-8859-9              Y   glibc aix hpux irix osf solaris freebsd darwin cygwin zos
    ISO-8859-13                 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
    ISO-8859-14                 glibc cygwin
    ISO-8859-15                 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
@@ -76,7 +79,7 @@ extern const char * locale_charset (void);
    CP874                       windows dos
    CP922                       aix
    CP932                       aix cygwin windows dos
-   CP943                       aix
+   CP943                       aix zos
    CP949                       osf darwin windows dos
    CP950                       windows dos
    CP1046                      aix
@@ -92,17 +95,17 @@ extern const char * locale_charset (void);
    CP1255                      glibc windows
    CP1256                      windows
    CP1257                      windows
-   GB2312                  Y   glibc aix hpux irix solaris freebsd netbsd darwin cygwin
+   GB2312                  Y   glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
    EUC-JP                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
-   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+   EUC-KR                  Y   glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
    EUC-TW                      glibc aix hpux irix osf solaris netbsd
-   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin cygwin
+   BIG5                    Y   glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
    BIG5-HKSCS                  glibc hpux solaris netbsd darwin
    GBK                         glibc aix osf solaris freebsd darwin cygwin windows dos
    GB18030                     glibc hpux solaris freebsd netbsd darwin
    SHIFT_JIS               Y   hpux osf solaris freebsd netbsd darwin
    JOHAB                       glibc solaris windows
-   TIS-620                     glibc aix hpux osf solaris cygwin
+   TIS-620                     glibc aix hpux osf solaris cygwin zos
    VISCII                  Y   glibc
    TCVN5712-1                  glibc
    ARMSCII-8                   glibc freebsd netbsd darwin
@@ -116,7 +119,7 @@ extern const char * locale_charset (void);
    HP-KANA8                    hpux
    DEC-KANJI                   osf
    DEC-HANYU                   osf
-   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin cygwin
+   UTF-8                   Y   glibc aix hpux osf solaris netbsd darwin cygwin zos
 
    Note: Names which are not marked as being a MIME name should not be used in
    Internet protocols for information interchange (mail, news, etc.).
index 123df7a..1063070 100644 (file)
@@ -1,17 +1,17 @@
 /* A POSIX <locale.h>.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 # define LC_MESSAGES 1729
 #endif
 
+/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and
+   int_n_*.  Instead of overriding 'struct lconv', merely define these member
+   names as macros.  This avoids trouble in C++ mode.  */
+#if defined _MSC_VER
+# define int_p_cs_precedes   p_cs_precedes
+# define int_p_sign_posn     p_sign_posn
+# define int_p_sep_by_space  p_sep_by_space
+# define int_n_cs_precedes   n_cs_precedes
+# define int_n_sign_posn     n_sign_posn
+# define int_n_sep_by_space  n_sep_by_space
+#endif
+
 /* Bionic libc's 'struct lconv' is just a dummy.  */
 #if @REPLACE_STRUCT_LCONV@
 # define lconv rpl_lconv
@@ -72,7 +84,7 @@ struct lconv
   /* All 'char *' are actually 'const char *'.  */
 
   /* Members that depend on the LC_NUMERIC category of the locale.  See
-     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
+     <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
 
   /* Symbol used as decimal point.  */
   char *decimal_point;
@@ -84,7 +96,7 @@ struct lconv
   char *grouping;
 
   /* Members that depend on the LC_MONETARY category of the locale.  See
-     <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
+     <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
 
   /* Symbol used as decimal point.  */
   char *mon_decimal_point;
@@ -156,7 +168,9 @@ _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
 # else
 _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (localeconv);
+# endif
 #elif @REPLACE_STRUCT_LCONV@
 # undef localeconv
 # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
@@ -181,7 +195,9 @@ _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
 # else
 _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (setlocale);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef setlocale
 # if HAVE_RAW_DECL_SETLOCALE
@@ -190,7 +206,12 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
 # endif
 #endif
 
-#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@)
+#if @GNULIB_SETLOCALE_NULL@
+/* Included here for convenience.  */
+# include "setlocale_null.h"
+#endif
+
+#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_NEWLOCALE@)
 # if @REPLACE_NEWLOCALE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef newlocale
@@ -211,6 +232,11 @@ _GL_CXXALIAS_SYS (newlocale, locale_t,
 # if @HAVE_NEWLOCALE@
 _GL_CXXALIASWARN (newlocale);
 # endif
+# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
+#  ifndef HAVE_WORKING_NEWLOCALE
+#   define HAVE_WORKING_NEWLOCALE 1
+#  endif
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef newlocale
 # if HAVE_RAW_DECL_NEWLOCALE
@@ -218,7 +244,7 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable");
 # endif
 #endif
 
-#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@)
+#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
 # if @REPLACE_DUPLOCALE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef duplocale
@@ -235,6 +261,11 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
 # if @HAVE_DUPLOCALE@
 _GL_CXXALIASWARN (duplocale);
 # endif
+# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
+#  ifndef HAVE_WORKING_DUPLOCALE
+#   define HAVE_WORKING_DUPLOCALE 1
+#  endif
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef duplocale
 # if HAVE_RAW_DECL_DUPLOCALE
@@ -243,7 +274,7 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
 # endif
 #endif
 
-#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@)
+#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_FREELOCALE@)
 # if @REPLACE_FREELOCALE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef freelocale
@@ -254,7 +285,9 @@ _GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
 # else
 #  if @HAVE_FREELOCALE@
-_GL_CXXALIAS_SYS (freelocale, void, (locale_t locale));
+/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is
+                                   int.  */
+_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
 #  endif
 # endif
 # if @HAVE_FREELOCALE@
index 87cface..25e95a1 100644 (file)
@@ -1,17 +1,17 @@
 /* Query locale dependent information for formatting numbers.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
diff --git a/lib/localtime-buffer.c b/lib/localtime-buffer.c
deleted file mode 100644 (file)
index 910c8bc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
-   Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-/* written by Jim Meyering */
-
-#include <config.h>
-
-/* Specification.  */
-#include "localtime-buffer.h"
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-static struct tm tm_zero_buffer;
-struct tm *localtime_buffer_addr = &tm_zero_buffer;
-
-/* This is a wrapper for localtime.
-
-   On the first call, record the address of the static buffer that
-   localtime uses for its result.  */
-
-struct tm *
-rpl_localtime (time_t const *timep)
-#undef localtime
-{
-  struct tm *tm = localtime (timep);
-
-  if (localtime_buffer_addr == &tm_zero_buffer)
-    localtime_buffer_addr = tm;
-
-  return tm;
-}
-
-/* Same as above, since gmtime and localtime use the same buffer.  */
-struct tm *
-rpl_gmtime (time_t const *timep)
-#undef gmtime
-{
-  struct tm *tm = gmtime (timep);
-
-  if (localtime_buffer_addr == &tm_zero_buffer)
-    localtime_buffer_addr = tm;
-
-  return tm;
-}
-
-#endif
diff --git a/lib/localtime-buffer.h b/lib/localtime-buffer.h
deleted file mode 100644 (file)
index f381ff0..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Provide access to the last buffer returned by localtime() or gmtime().
-
-   Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-/* written by Jim Meyering */
-
-#include <time.h>
-
-#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
-
-/* The address of the last buffer returned by localtime() or gmtime().  */
-extern struct tm *localtime_buffer_addr;
-
-#endif
index 5873bbd..7de0bf1 100644 (file)
@@ -1,18 +1,18 @@
 /* Work around a bug of lstat on some systems
 
-   Copyright (C) 1997-2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 1997-2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
@@ -42,10 +42,14 @@ orig_lstat (const char *filename, struct stat *buf)
 }
 
 /* Specification.  */
+# ifdef __osf__
 /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
    eliminates this include because of the preliminary #include <sys/stat.h>
    above.  */
-# include "sys/stat.h"
+#  include "sys/stat.h"
+# else
+#  include <sys/stat.h>
+# endif
 
 # include "stat-time.h"
 
index 471c3ab..0d8b359 100644 (file)
@@ -1,51 +1,46 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering and Bruno Haible */
 
 #define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
-/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h.  */
-#ifdef malloc
-# define NEED_MALLOC_GNU 1
-# undef malloc
-/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU.  */
-#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
-# define NEED_MALLOC_GNU 1
-#endif
 
 #include <stdlib.h>
 
 #include <errno.h>
 
-/* Allocate an N-byte block of memory from the heap.
-   If N is zero, allocate a 1-byte block.  */
+#include "xalloc-oversized.h"
+
+/* Allocate an N-byte block of memory from the heap, even if N is 0.  */
 
 void *
 rpl_malloc (size_t n)
 {
-  void *result;
-
-#if NEED_MALLOC_GNU
   if (n == 0)
     n = 1;
-#endif
 
-  result = malloc (n);
+  if (xalloc_oversized (n, 1))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  void *result = malloc (n);
 
 #if !HAVE_MALLOC_POSIX
   if (result == NULL)
diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleton.c
new file mode 100644 (file)
index 0000000..48210e3
--- /dev/null
@@ -0,0 +1,528 @@
+/* Type-safe arrays which grow dynamically.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* Pre-processor macros which act as parameters:
+
+   DYNARRAY_STRUCT
+      The struct tag of dynamic array to be defined.
+   DYNARRAY_ELEMENT
+      The type name of the element type.  Elements are copied
+      as if by memcpy, and can change address as the dynamic
+      array grows.
+   DYNARRAY_PREFIX
+      The prefix of the functions which are defined.
+
+   The following parameters are optional:
+
+   DYNARRAY_ELEMENT_FREE
+      DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the
+      contents of elements. E is of type  DYNARRAY_ELEMENT *.
+   DYNARRAY_ELEMENT_INIT
+      DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new
+      element.  E is of type  DYNARRAY_ELEMENT *.
+      If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is
+      defined, new elements are automatically zero-initialized.
+      Otherwise, new elements have undefined contents.
+   DYNARRAY_INITIAL_SIZE
+      The size of the statically allocated array (default:
+      at least 2, more elements if they fit into 128 bytes).
+      Must be a preprocessor constant.  If DYNARRAY_INITIAL_SIZE is 0,
+      there is no statically allocated array at, and all non-empty
+      arrays are heap-allocated.
+   DYNARRAY_FINAL_TYPE
+      The name of the type which holds the final array.  If not
+      defined, is PREFIX##finalize not provided.  DYNARRAY_FINAL_TYPE
+      must be a struct type, with members of type DYNARRAY_ELEMENT and
+      size_t at the start (in this order).
+
+   These macros are undefined after this header file has been
+   included.
+
+   The following types are provided (their members are private to the
+   dynarray implementation):
+
+     struct DYNARRAY_STRUCT
+
+   The following functions are provided:
+
+     void DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *);
+     void DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *);
+     bool DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *);
+     void DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *);
+     size_t DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *);
+     DYNARRAY_ELEMENT *DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *);
+     DYNARRAY_ELEMENT *DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *);
+     DYNARRAY_ELEMENT *DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *, size_t);
+     void DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *, DYNARRAY_ELEMENT);
+     DYNARRAY_ELEMENT *DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *);
+     bool DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *, size_t);
+     void DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *);
+     void DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *);
+
+   The following functions are provided are provided if the
+   prerequisites are met:
+
+     bool DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *,
+                                     DYNARRAY_FINAL_TYPE *);
+       (if DYNARRAY_FINAL_TYPE is defined)
+     DYNARRAY_ELEMENT *DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *,
+                                                  size_t *);
+       (if DYNARRAY_FINAL_TYPE is not defined)
+*/
+
+#include <malloc/dynarray.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifndef DYNARRAY_STRUCT
+# error "DYNARRAY_STRUCT must be defined"
+#endif
+
+#ifndef DYNARRAY_ELEMENT
+# error "DYNARRAY_ELEMENT must be defined"
+#endif
+
+#ifndef DYNARRAY_PREFIX
+# error "DYNARRAY_PREFIX must be defined"
+#endif
+
+#ifdef DYNARRAY_INITIAL_SIZE
+# if DYNARRAY_INITIAL_SIZE < 0
+#  error "DYNARRAY_INITIAL_SIZE must be non-negative"
+# endif
+# if DYNARRAY_INITIAL_SIZE > 0
+#  define DYNARRAY_HAVE_SCRATCH 1
+# else
+#  define DYNARRAY_HAVE_SCRATCH 0
+# endif
+#else
+/* Provide a reasonable default which limits the size of
+   DYNARRAY_STRUCT.  */
+# define DYNARRAY_INITIAL_SIZE \
+  (sizeof (DYNARRAY_ELEMENT) > 64 ? 2 : 128 / sizeof (DYNARRAY_ELEMENT))
+# define DYNARRAY_HAVE_SCRATCH 1
+#endif
+
+/* Public type definitions.  */
+
+/* All fields of this struct are private to the implementation.  */
+struct DYNARRAY_STRUCT
+{
+  union
+  {
+    struct dynarray_header dynarray_abstract;
+    struct
+    {
+      /* These fields must match struct dynarray_header.  */
+      size_t used;
+      size_t allocated;
+      DYNARRAY_ELEMENT *array;
+    } dynarray_header;
+  } u;
+
+#if DYNARRAY_HAVE_SCRATCH
+  /* Initial inline allocation.  */
+  DYNARRAY_ELEMENT scratch[DYNARRAY_INITIAL_SIZE];
+#endif
+};
+
+/* Internal use only: Helper macros.  */
+
+/* Ensure macro-expansion of DYNARRAY_PREFIX.  */
+#define DYNARRAY_CONCAT0(prefix, name) prefix##name
+#define DYNARRAY_CONCAT1(prefix, name) DYNARRAY_CONCAT0(prefix, name)
+#define DYNARRAY_NAME(name) DYNARRAY_CONCAT1(DYNARRAY_PREFIX, name)
+
+/* Use DYNARRAY_FREE instead of DYNARRAY_NAME (free),
+   so that Gnulib does not change 'free' to 'rpl_free'.  */
+#define DYNARRAY_FREE DYNARRAY_CONCAT1 (DYNARRAY_NAME (f), ree)
+
+/* Address of the scratch buffer if any.  */
+#if DYNARRAY_HAVE_SCRATCH
+# define DYNARRAY_SCRATCH(list) (list)->scratch
+#else
+# define DYNARRAY_SCRATCH(list) NULL
+#endif
+
+/* Internal use only: Helper functions.  */
+
+/* Internal function.  Call DYNARRAY_ELEMENT_FREE with the array
+   elements.  Name mangling needed due to the DYNARRAY_ELEMENT_FREE
+   macro expansion.  */
+static inline void
+DYNARRAY_NAME (free__elements__) (DYNARRAY_ELEMENT *__dynarray_array,
+                                  size_t __dynarray_used)
+{
+#ifdef DYNARRAY_ELEMENT_FREE
+  for (size_t __dynarray_i = 0; __dynarray_i < __dynarray_used; ++__dynarray_i)
+    DYNARRAY_ELEMENT_FREE (&__dynarray_array[__dynarray_i]);
+#endif /* DYNARRAY_ELEMENT_FREE */
+}
+
+/* Internal function.  Free the non-scratch array allocation.  */
+static inline void
+DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT *list)
+{
+#if DYNARRAY_HAVE_SCRATCH
+  if (list->u.dynarray_header.array != list->scratch)
+    free (list->u.dynarray_header.array);
+#else
+  free (list->u.dynarray_header.array);
+#endif
+}
+
+/* Public functions.  */
+
+/* Initialize a dynamic array object.  This must be called before any
+   use of the object.  */
+__attribute_nonnull__ ((1))
+static void
+DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list)
+{
+  list->u.dynarray_header.used = 0;
+  list->u.dynarray_header.allocated = DYNARRAY_INITIAL_SIZE;
+  list->u.dynarray_header.array = DYNARRAY_SCRATCH (list);
+}
+
+/* Deallocate the dynamic array and its elements.  */
+__attribute_maybe_unused__ __attribute_nonnull__ ((1))
+static void
+DYNARRAY_FREE (struct DYNARRAY_STRUCT *list)
+{
+  DYNARRAY_NAME (free__elements__)
+    (list->u.dynarray_header.array, list->u.dynarray_header.used);
+  DYNARRAY_NAME (free__array__) (list);
+  DYNARRAY_NAME (init) (list);
+}
+
+/* Return true if the dynamic array is in an error state.  */
+__attribute_nonnull__ ((1))
+static inline bool
+DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list)
+{
+  return list->u.dynarray_header.allocated == __dynarray_error_marker ();
+}
+
+/* Mark the dynamic array as failed.  All elements are deallocated as
+   a side effect.  */
+__attribute_nonnull__ ((1))
+static void
+DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list)
+{
+  DYNARRAY_NAME (free__elements__)
+    (list->u.dynarray_header.array, list->u.dynarray_header.used);
+  DYNARRAY_NAME (free__array__) (list);
+  list->u.dynarray_header.array = DYNARRAY_SCRATCH (list);
+  list->u.dynarray_header.used = 0;
+  list->u.dynarray_header.allocated = __dynarray_error_marker ();
+}
+
+/* Return the number of elements which have been added to the dynamic
+   array.  */
+__attribute_nonnull__ ((1))
+static inline size_t
+DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list)
+{
+  return list->u.dynarray_header.used;
+}
+
+/* Return a pointer to the array element at INDEX.  Terminate the
+   process if INDEX is out of bounds.  */
+__attribute_nonnull__ ((1))
+static inline DYNARRAY_ELEMENT *
+DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index)
+{
+  if (__glibc_unlikely (index >= DYNARRAY_NAME (size) (list)))
+    __libc_dynarray_at_failure (DYNARRAY_NAME (size) (list), index);
+  return list->u.dynarray_header.array + index;
+}
+
+/* Return a pointer to the first array element, if any.  For a
+   zero-length array, the pointer can be NULL even though the dynamic
+   array has not entered the failure state.  */
+__attribute_nonnull__ ((1))
+static inline DYNARRAY_ELEMENT *
+DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list)
+{
+  return list->u.dynarray_header.array;
+}
+
+/* Return a pointer one element past the last array element.  For a
+   zero-length array, the pointer can be NULL even though the dynamic
+   array has not entered the failure state.  */
+__attribute_nonnull__ ((1))
+static inline DYNARRAY_ELEMENT *
+DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list)
+{
+  return list->u.dynarray_header.array + list->u.dynarray_header.used;
+}
+
+/* Internal function.  Slow path for the add function below.  */
+static void
+DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item)
+{
+  if (__glibc_unlikely
+      (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract,
+                                         DYNARRAY_SCRATCH (list),
+                                         sizeof (DYNARRAY_ELEMENT))))
+    {
+      DYNARRAY_NAME (mark_failed) (list);
+      return;
+    }
+
+  /* Copy the new element and increase the array length.  */
+  list->u.dynarray_header.array[list->u.dynarray_header.used++] = item;
+}
+
+/* Add ITEM at the end of the array, enlarging it by one element.
+   Mark *LIST as failed if the dynamic array allocation size cannot be
+   increased.  */
+__attribute_nonnull__ ((1))
+static inline void
+DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item)
+{
+  /* Do nothing in case of previous error.  */
+  if (DYNARRAY_NAME (has_failed) (list))
+    return;
+
+  /* Enlarge the array if necessary.  */
+  if (__glibc_unlikely (list->u.dynarray_header.used
+                        == list->u.dynarray_header.allocated))
+    {
+      DYNARRAY_NAME (add__) (list, item);
+      return;
+    }
+
+  /* Copy the new element and increase the array length.  */
+  list->u.dynarray_header.array[list->u.dynarray_header.used++] = item;
+}
+
+/* Internal function.  Building block for the emplace functions below.
+   Assumes space for one more element in *LIST.  */
+static inline DYNARRAY_ELEMENT *
+DYNARRAY_NAME (emplace__tail__) (struct DYNARRAY_STRUCT *list)
+{
+  DYNARRAY_ELEMENT *result
+    = &list->u.dynarray_header.array[list->u.dynarray_header.used];
+  ++list->u.dynarray_header.used;
+#if defined (DYNARRAY_ELEMENT_INIT)
+  DYNARRAY_ELEMENT_INIT (result);
+#elif defined (DYNARRAY_ELEMENT_FREE)
+  memset (result, 0, sizeof (*result));
+#endif
+  return result;
+}
+
+/* Internal function.  Slow path for the emplace function below.  */
+static DYNARRAY_ELEMENT *
+DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *list)
+{
+  if (__glibc_unlikely
+      (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract,
+                                         DYNARRAY_SCRATCH (list),
+                                         sizeof (DYNARRAY_ELEMENT))))
+    {
+      DYNARRAY_NAME (mark_failed) (list);
+      return NULL;
+    }
+  return DYNARRAY_NAME (emplace__tail__) (list);
+}
+
+/* Allocate a place for a new element in *LIST and return a pointer to
+   it.  The pointer can be NULL if the dynamic array cannot be
+   enlarged due to a memory allocation failure.  */
+__attribute_maybe_unused__ __attribute_warn_unused_result__
+__attribute_nonnull__ ((1))
+static
+/* Avoid inlining with the larger initialization code.  */
+#if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE))
+inline
+#endif
+DYNARRAY_ELEMENT *
+DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list)
+{
+  /* Do nothing in case of previous error.  */
+  if (DYNARRAY_NAME (has_failed) (list))
+    return NULL;
+
+  /* Enlarge the array if necessary.  */
+  if (__glibc_unlikely (list->u.dynarray_header.used
+                        == list->u.dynarray_header.allocated))
+    return (DYNARRAY_NAME (emplace__) (list));
+  return DYNARRAY_NAME (emplace__tail__) (list);
+}
+
+/* Change the size of *LIST to SIZE.  If SIZE is larger than the
+   existing size, new elements are added (which can be initialized).
+   Otherwise, the list is truncated, and elements are freed.  Return
+   false on memory allocation failure (and mark *LIST as failed).  */
+__attribute_maybe_unused__ __attribute_nonnull__ ((1))
+static bool
+DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size)
+{
+  if (size > list->u.dynarray_header.used)
+    {
+      bool ok;
+#if defined (DYNARRAY_ELEMENT_INIT)
+      /* The new elements have to be initialized.  */
+      size_t old_size = list->u.dynarray_header.used;
+      ok = __libc_dynarray_resize (&list->u.dynarray_abstract,
+                                   size, DYNARRAY_SCRATCH (list),
+                                   sizeof (DYNARRAY_ELEMENT));
+      if (ok)
+        for (size_t i = old_size; i < size; ++i)
+          {
+            DYNARRAY_ELEMENT_INIT (&list->u.dynarray_header.array[i]);
+          }
+#elif defined (DYNARRAY_ELEMENT_FREE)
+      /* Zero initialization is needed so that the elements can be
+         safely freed.  */
+      ok = __libc_dynarray_resize_clear
+        (&list->u.dynarray_abstract, size,
+         DYNARRAY_SCRATCH (list), sizeof (DYNARRAY_ELEMENT));
+#else
+      ok =  __libc_dynarray_resize (&list->u.dynarray_abstract,
+                                    size, DYNARRAY_SCRATCH (list),
+                                    sizeof (DYNARRAY_ELEMENT));
+#endif
+      if (__glibc_unlikely (!ok))
+        DYNARRAY_NAME (mark_failed) (list);
+      return ok;
+    }
+  else
+    {
+      /* The list has shrunk in size.  Free the removed elements.  */
+      DYNARRAY_NAME (free__elements__)
+        (list->u.dynarray_header.array + size,
+         list->u.dynarray_header.used - size);
+      list->u.dynarray_header.used = size;
+      return true;
+    }
+}
+
+/* Remove the last element of LIST if it is present.  */
+__attribute_maybe_unused__ __attribute_nonnull__ ((1))
+static void
+DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list)
+{
+  /* used > 0 implies that the array is the non-failed state.  */
+  if (list->u.dynarray_header.used > 0)
+    {
+      size_t new_length = list->u.dynarray_header.used - 1;
+#ifdef DYNARRAY_ELEMENT_FREE
+      DYNARRAY_ELEMENT_FREE (&list->u.dynarray_header.array[new_length]);
+#endif
+      list->u.dynarray_header.used = new_length;
+    }
+}
+
+/* Remove all elements from the list.  The elements are freed, but the
+   list itself is not.  */
+__attribute_maybe_unused__ __attribute_nonnull__ ((1))
+static void
+DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list)
+{
+  /* free__elements__ does nothing if the list is in the failed
+     state.  */
+  DYNARRAY_NAME (free__elements__)
+    (list->u.dynarray_header.array, list->u.dynarray_header.used);
+  list->u.dynarray_header.used = 0;
+}
+
+#ifdef DYNARRAY_FINAL_TYPE
+/* Transfer the dynamic array to a permanent location at *RESULT.
+   Returns true on success on false on allocation failure.  In either
+   case, *LIST is re-initialized and can be reused.  A NULL pointer is
+   stored in *RESULT if LIST refers to an empty list.  On success, the
+   pointer in *RESULT is heap-allocated and must be deallocated using
+   free.  */
+__attribute_maybe_unused__ __attribute_warn_unused_result__
+__attribute_nonnull__ ((1, 2))
+static bool
+DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list,
+                          DYNARRAY_FINAL_TYPE *result)
+{
+  struct dynarray_finalize_result res;
+  if (__libc_dynarray_finalize (&list->u.dynarray_abstract,
+                                DYNARRAY_SCRATCH (list),
+                                sizeof (DYNARRAY_ELEMENT), &res))
+    {
+      /* On success, the result owns all the data.  */
+      DYNARRAY_NAME (init) (list);
+      *result = (DYNARRAY_FINAL_TYPE) { res.array, res.length };
+      return true;
+    }
+  else
+    {
+      /* On error, we need to free all data.  */
+      DYNARRAY_FREE (list);
+      errno = ENOMEM;
+      return false;
+    }
+}
+#else /* !DYNARRAY_FINAL_TYPE */
+/* Transfer the dynamic array to a heap-allocated array and return a
+   pointer to it.  The pointer is NULL if memory allocation fails, or
+   if the array is empty, so this function should be used only for
+   arrays which are known not be empty (usually because they always
+   have a sentinel at the end).  If LENGTHP is not NULL, the array
+   length is written to *LENGTHP.  *LIST is re-initialized and can be
+   reused.  */
+__attribute_maybe_unused__ __attribute_warn_unused_result__
+__attribute_nonnull__ ((1))
+static DYNARRAY_ELEMENT *
+DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp)
+{
+  struct dynarray_finalize_result res;
+  if (__libc_dynarray_finalize (&list->u.dynarray_abstract,
+                                DYNARRAY_SCRATCH (list),
+                                sizeof (DYNARRAY_ELEMENT), &res))
+    {
+      /* On success, the result owns all the data.  */
+      DYNARRAY_NAME (init) (list);
+      if (lengthp != NULL)
+        *lengthp = res.length;
+      return res.array;
+    }
+  else
+    {
+      /* On error, we need to free all data.  */
+      DYNARRAY_FREE (list);
+      errno = ENOMEM;
+      return NULL;
+    }
+}
+#endif /* !DYNARRAY_FINAL_TYPE */
+
+/* Undo macro definitions.  */
+
+#undef DYNARRAY_CONCAT0
+#undef DYNARRAY_CONCAT1
+#undef DYNARRAY_NAME
+#undef DYNARRAY_SCRATCH
+#undef DYNARRAY_HAVE_SCRATCH
+
+#undef DYNARRAY_STRUCT
+#undef DYNARRAY_ELEMENT
+#undef DYNARRAY_PREFIX
+#undef DYNARRAY_ELEMENT_FREE
+#undef DYNARRAY_ELEMENT_INIT
+#undef DYNARRAY_INITIAL_SIZE
+#undef DYNARRAY_FINAL_TYPE
diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h
new file mode 100644 (file)
index 0000000..638c33f
--- /dev/null
@@ -0,0 +1,178 @@
+/* Type-safe arrays which grow dynamically.  Shared definitions.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+/* To use the dynarray facility, you need to include
+   <malloc/dynarray-skeleton.c> and define the parameter macros
+   documented in that file.
+
+   A minimal example which provides a growing list of integers can be
+   defined like this:
+
+     struct int_array
+     {
+       // Pointer to result array followed by its length,
+       // as required by DYNARRAY_FINAL_TYPE.
+       int *array;
+       size_t length;
+     };
+
+     #define DYNARRAY_STRUCT dynarray_int
+     #define DYNARRAY_ELEMENT int
+     #define DYNARRAY_PREFIX dynarray_int_
+     #define DYNARRAY_FINAL_TYPE struct int_array
+     #include <malloc/dynarray-skeleton.c>
+
+   To create a three-element array with elements 1, 2, 3, use this
+   code:
+
+     struct dynarray_int dyn;
+     dynarray_int_init (&dyn);
+     for (int i = 1; i <= 3; ++i)
+       {
+         int *place = dynarray_int_emplace (&dyn);
+         assert (place != NULL);
+         *place = i;
+       }
+     struct int_array result;
+     bool ok = dynarray_int_finalize (&dyn, &result);
+     assert (ok);
+     assert (result.length == 3);
+     assert (result.array[0] == 1);
+     assert (result.array[1] == 2);
+     assert (result.array[2] == 3);
+     free (result.array);
+
+   If the elements contain resources which must be freed, define
+   DYNARRAY_ELEMENT_FREE appropriately, like this:
+
+     struct str_array
+     {
+       char **array;
+       size_t length;
+     };
+
+     #define DYNARRAY_STRUCT dynarray_str
+     #define DYNARRAY_ELEMENT char *
+     #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr)
+     #define DYNARRAY_PREFIX dynarray_str_
+     #define DYNARRAY_FINAL_TYPE struct str_array
+     #include <malloc/dynarray-skeleton.c>
+
+   Compared to scratch buffers, dynamic arrays have the following
+   features:
+
+   - They have an element type, and are not just an untyped buffer of
+     bytes.
+
+   - When growing, previously stored elements are preserved.  (It is
+     expected that scratch_buffer_grow_preserve and
+     scratch_buffer_set_array_size eventually go away because all
+     current users are moved to dynamic arrays.)
+
+   - Scratch buffers have a more aggressive growth policy because
+     growing them typically means a retry of an operation (across an
+     NSS service module boundary), which is expensive.
+
+   - For the same reason, scratch buffers have a much larger initial
+     stack allocation.  */
+
+#ifndef _DYNARRAY_H
+#define _DYNARRAY_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <string.h>
+
+struct dynarray_header
+{
+  size_t used;
+  size_t allocated;
+  void *array;
+};
+
+/* Marker used in the allocated member to indicate that an error was
+   encountered.  */
+static inline size_t
+__dynarray_error_marker (void)
+{
+  return -1;
+}
+
+/* Internal function.  See the has_failed function in
+   dynarray-skeleton.c.  */
+static inline bool
+__dynarray_error (struct dynarray_header *list)
+{
+  return list->allocated == __dynarray_error_marker ();
+}
+
+/* Internal function.  Enlarge the dynamically allocated area of the
+   array to make room for one more element.  SCRATCH is a pointer to
+   the scratch area (which is not heap-allocated and must not be
+   freed).  ELEMENT_SIZE is the size, in bytes, of one element.
+   Return false on failure, true on success.  */
+bool __libc_dynarray_emplace_enlarge (struct dynarray_header *,
+                                      void *scratch, size_t element_size);
+
+/* Internal function.  Enlarge the dynamically allocated area of the
+   array to make room for at least SIZE elements (which must be larger
+   than the existing used part of the dynamic array).  SCRATCH is a
+   pointer to the scratch area (which is not heap-allocated and must
+   not be freed).  ELEMENT_SIZE is the size, in bytes, of one element.
+   Return false on failure, true on success.  */
+bool __libc_dynarray_resize (struct dynarray_header *, size_t size,
+                             void *scratch, size_t element_size);
+
+/* Internal function.  Like __libc_dynarray_resize, but clear the new
+   part of the dynamic array.  */
+bool __libc_dynarray_resize_clear (struct dynarray_header *, size_t size,
+                                   void *scratch, size_t element_size);
+
+/* Internal type.  */
+struct dynarray_finalize_result
+{
+  void *array;
+  size_t length;
+};
+
+/* Internal function.  Copy the dynamically-allocated area to an
+   explicitly-sized heap allocation.  SCRATCH is a pointer to the
+   embedded scratch space.  ELEMENT_SIZE is the size, in bytes, of the
+   element type.  On success, true is returned, and pointer and length
+   are written to *RESULT.  On failure, false is returned.  The caller
+   has to take care of some of the memory management; this function is
+   expected to be called from dynarray-skeleton.c.  */
+bool __libc_dynarray_finalize (struct dynarray_header *list, void *scratch,
+                               size_t element_size,
+                               struct dynarray_finalize_result *result);
+
+
+/* Internal function.  Terminate the process after an index error.
+   SIZE is the number of elements of the dynamic array.  INDEX is the
+   lookup index which triggered the failure.  */
+_Noreturn void __libc_dynarray_at_failure (size_t size, size_t index);
+
+#ifndef _ISOMAC
+libc_hidden_proto (__libc_dynarray_emplace_enlarge)
+libc_hidden_proto (__libc_dynarray_resize)
+libc_hidden_proto (__libc_dynarray_resize_clear)
+libc_hidden_proto (__libc_dynarray_finalize)
+libc_hidden_proto (__libc_dynarray_at_failure)
+#endif
+
+#endif /* _DYNARRAY_H */
diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_failure.c
new file mode 100644 (file)
index 0000000..4f840db
--- /dev/null
@@ -0,0 +1,39 @@
+/* Report an dynamic array index out of bounds condition.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+__libc_dynarray_at_failure (size_t size, size_t index)
+{
+#ifdef _LIBC
+  char buf[200];
+  __snprintf (buf, sizeof (buf), "Fatal glibc error: "
+              "array index %zu not less than array length %zu\n",
+              index, size);
+#else
+ abort ();
+#endif
+}
+libc_hidden_def (__libc_dynarray_at_failure)
diff --git a/lib/malloc/dynarray_emplace_enlarge.c b/lib/malloc/dynarray_emplace_enlarge.c
new file mode 100644 (file)
index 0000000..0f8baf9
--- /dev/null
@@ -0,0 +1,77 @@
+/* Increase the size of a dynamic array in preparation of an emplace operation.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <errno.h>
+#include <intprops.h>
+#include <stdlib.h>
+#include <string.h>
+
+bool
+__libc_dynarray_emplace_enlarge (struct dynarray_header *list,
+                                 void *scratch, size_t element_size)
+{
+  size_t new_allocated;
+  if (list->allocated == 0)
+    {
+      /* No scratch buffer provided.  Choose a reasonable default
+         size.  */
+      if (element_size < 4)
+        new_allocated = 16;
+      else if (element_size < 8)
+        new_allocated = 8;
+      else
+        new_allocated = 4;
+    }
+  else
+    /* Increase the allocated size, using an exponential growth
+       policy.  */
+    {
+      new_allocated = list->allocated + list->allocated / 2 + 1;
+      if (new_allocated <= list->allocated)
+        {
+          /* Overflow.  */
+          __set_errno (ENOMEM);
+          return false;
+        }
+    }
+
+  size_t new_size;
+  if (INT_MULTIPLY_WRAPV (new_allocated, element_size, &new_size))
+    return false;
+  void *new_array;
+  if (list->array == scratch)
+    {
+      /* The previous array was not heap-allocated.  */
+      new_array = malloc (new_size);
+      if (new_array != NULL && list->array != NULL)
+        memcpy (new_array, list->array, list->used * element_size);
+    }
+  else
+    new_array = realloc (list->array, new_size);
+  if (new_array == NULL)
+    return false;
+  list->array = new_array;
+  list->allocated = new_allocated;
+  return true;
+}
+libc_hidden_def (__libc_dynarray_emplace_enlarge)
diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finalize.c
new file mode 100644 (file)
index 0000000..c33da41
--- /dev/null
@@ -0,0 +1,66 @@
+/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <stdlib.h>
+#include <string.h>
+
+bool
+__libc_dynarray_finalize (struct dynarray_header *list,
+                          void *scratch, size_t element_size,
+                          struct dynarray_finalize_result *result)
+{
+  if (__dynarray_error (list))
+    /* The caller will reported the deferred error.  */
+    return false;
+
+  size_t used = list->used;
+
+  /* Empty list.  */
+  if (used == 0)
+    {
+      /* An empty list could still be backed by a heap-allocated
+         array.  Free it if necessary.  */
+      if (list->array != scratch)
+        free (list->array);
+      *result = (struct dynarray_finalize_result) { NULL, 0 };
+      return true;
+    }
+
+  size_t allocation_size = used * element_size;
+  void *heap_array = malloc (allocation_size);
+  if (heap_array != NULL)
+    {
+      /* The new array takes ownership of the strings.  */
+      if (list->array != NULL)
+        memcpy (heap_array, list->array, allocation_size);
+      if (list->array != scratch)
+        free (list->array);
+      *result = (struct dynarray_finalize_result)
+        { .array = heap_array, .length = used };
+      return true;
+    }
+  else
+    /* The caller will perform the freeing operation.  */
+    return false;
+}
+libc_hidden_def (__libc_dynarray_finalize)
diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c
new file mode 100644 (file)
index 0000000..5a57166
--- /dev/null
@@ -0,0 +1,68 @@
+/* Increase the size of a dynamic array.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <errno.h>
+#include <intprops.h>
+#include <stdlib.h>
+#include <string.h>
+
+bool
+__libc_dynarray_resize (struct dynarray_header *list, size_t size,
+                        void *scratch, size_t element_size)
+{
+  /* The existing allocation provides sufficient room.  */
+  if (size <= list->allocated)
+    {
+      list->used = size;
+      return true;
+    }
+
+  /* Otherwise, use size as the new allocation size.  The caller is
+     expected to provide the final size of the array, so there is no
+     over-allocation here.  */
+
+  size_t new_size_bytes;
+  if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes))
+    {
+      /* Overflow.  */
+      __set_errno (ENOMEM);
+      return false;
+    }
+  void *new_array;
+  if (list->array == scratch)
+    {
+      /* The previous array was not heap-allocated.  */
+      new_array = malloc (new_size_bytes);
+      if (new_array != NULL && list->array != NULL)
+        memcpy (new_array, list->array, list->used * element_size);
+    }
+  else
+    new_array = realloc (list->array, new_size_bytes);
+  if (new_array == NULL)
+    return false;
+  list->array = new_array;
+  list->allocated = size;
+  list->used = size;
+  return true;
+}
+libc_hidden_def (__libc_dynarray_resize)
diff --git a/lib/malloc/dynarray_resize_clear.c b/lib/malloc/dynarray_resize_clear.c
new file mode 100644 (file)
index 0000000..9c43b00
--- /dev/null
@@ -0,0 +1,39 @@
+/* Increase the size of a dynamic array and clear the new part.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
+#include <dynarray.h>
+#include <string.h>
+
+bool
+__libc_dynarray_resize_clear (struct dynarray_header *list, size_t size,
+                              void *scratch, size_t element_size)
+{
+  size_t old_size = list->used;
+  if (!__libc_dynarray_resize (list, size, scratch, element_size))
+    return false;
+  /* __libc_dynarray_resize already checked for overflow.  */
+  char *array = list->array;
+  memset (array + (old_size * element_size), 0,
+          (size - old_size) * element_size);
+  return true;
+}
+libc_hidden_def (__libc_dynarray_resize_clear)
index c54e1e0..d7ad095 100644 (file)
@@ -1,19 +1,19 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #define _GL_USE_STDLIB_ALLOC 1
 #include <config.h>
@@ -21,6 +21,8 @@
 /* Specification.  */
 #include "malloca.h"
 
+#include "idx.h"
+#include "intprops.h"
 #include "verify.h"
 
 /* The speed critical point in this file is freea() applied to an alloca()
@@ -45,9 +47,9 @@ mmalloca (size_t n)
 #if HAVE_ALLOCA
   /* Allocate one more word, used to determine the address to pass to freea(),
      and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max.  */
-  size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1;
-
-  if (nplus >= n)
+  int plus = sizeof (small_t) + 2 * sa_alignment_max - 1;
+  idx_t nplus;
+  if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1))
     {
       char *mem = (char *) malloc (nplus);
 
index 1e47813..6fa1d8b 100644 (file)
@@ -1,19 +1,19 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _MALLOCA_H
 #define _MALLOCA_H
@@ -76,9 +76,10 @@ extern void freea (void *p);
 
 /* nmalloca(N,S) is an overflow-safe variant of malloca (N * S).
    It allocates an array of N objects, each with S bytes of memory,
-   on the stack.  S must be positive and N must be nonnegative.
+   on the stack.  N and S should be nonnegative and free of side effects.
    The array must be freed using freea() before the function returns.  */
-#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s)))
+#define nmalloca(n, s) \
+  (xalloc_oversized (n, s) ? NULL : malloca ((n) * (size_t) (s)))
 
 
 #ifdef __cplusplus
@@ -89,7 +90,7 @@ extern void freea (void *p);
 /* ------------------- Auxiliary, non-public definitions ------------------- */
 
 /* Determine the alignment of a type at compile time.  */
-#if defined __GNUC__ || defined __IBM__ALIGNOF__
+#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
 # define sa_alignof __alignof__
 #elif defined __cplusplus
   template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
@@ -112,14 +113,10 @@ enum
    among all elementary types.  */
   sa_alignment_long = sa_alignof (long),
   sa_alignment_double = sa_alignof (double),
-#if HAVE_LONG_LONG_INT
   sa_alignment_longlong = sa_alignof (long long),
-#endif
   sa_alignment_longdouble = sa_alignof (long double),
   sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
-#if HAVE_LONG_LONG_INT
                       | (sa_alignment_longlong - 1)
-#endif
                       | (sa_alignment_longdouble - 1)
                      ) + 1
 };
index 6d2a47e..a466257 100644 (file)
@@ -1,16 +1,16 @@
-/* Copyright (C) 2001, 2006, 2009-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
index 55c07e3..704814a 100644 (file)
@@ -1,17 +1,17 @@
 /* Multibyte character data type.
-   Copyright (C) 2001, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
 
 #include <stdbool.h>
 #include <string.h>
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 #include <wctype.h>
 
index 22a1ff8..8c49fd7 100644 (file)
@@ -1,3 +1,21 @@
+/* Iterating through multibyte strings: macros for multi-byte encodings.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define MBITER_INLINE _GL_EXTERN_INLINE
 #include "mbiter.h"
index 49e50a3..8337b33 100644 (file)
@@ -1,17 +1,17 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
 #include <stdbool.h>
 #include <stddef.h>
 #include <string.h>
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 
 #include "mbchar.h"
diff --git a/lib/mbrtowc-impl-utf8.h b/lib/mbrtowc-impl-utf8.h
new file mode 100644 (file)
index 0000000..330fb10
--- /dev/null
@@ -0,0 +1,138 @@
+/* Convert multibyte character to wide character.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008.  */
+
+/* This file contains the part of the body of the mbrtowc and mbrtoc32 functions
+   that handles the special case of the UTF-8 encoding.  */
+
+        /* Cf. unistr/u8-mbtouc.c.  */
+        unsigned char c = (unsigned char) p[0];
+
+        if (c < 0x80)
+          {
+            if (pwc != NULL)
+              *pwc = c;
+            res = (c == 0 ? 0 : 1);
+            goto success;
+          }
+        if (c >= 0xc2)
+          {
+            if (c < 0xe0)
+              {
+                if (m == 1)
+                  goto incomplete;
+                else /* m >= 2 */
+                  {
+                    unsigned char c2 = (unsigned char) p[1];
+
+                    if ((c2 ^ 0x80) < 0x40)
+                      {
+                        if (pwc != NULL)
+                          *pwc = ((unsigned int) (c & 0x1f) << 6)
+                                 | (unsigned int) (c2 ^ 0x80);
+                        res = 2;
+                        goto success;
+                      }
+                  }
+              }
+            else if (c < 0xf0)
+              {
+                if (m == 1)
+                  goto incomplete;
+                else
+                  {
+                    unsigned char c2 = (unsigned char) p[1];
+
+                    if ((c2 ^ 0x80) < 0x40
+                        && (c >= 0xe1 || c2 >= 0xa0)
+                        && (c != 0xed || c2 < 0xa0))
+                      {
+                        if (m == 2)
+                          goto incomplete;
+                        else /* m >= 3 */
+                          {
+                            unsigned char c3 = (unsigned char) p[2];
+
+                            if ((c3 ^ 0x80) < 0x40)
+                              {
+                                unsigned int wc =
+                                  (((unsigned int) (c & 0x0f) << 12)
+                                   | ((unsigned int) (c2 ^ 0x80) << 6)
+                                   | (unsigned int) (c3 ^ 0x80));
+
+                                if (FITS_IN_CHAR_TYPE (wc))
+                                  {
+                                    if (pwc != NULL)
+                                      *pwc = wc;
+                                    res = 3;
+                                    goto success;
+                                  }
+                              }
+                          }
+                      }
+                  }
+              }
+            else if (c <= 0xf4)
+              {
+                if (m == 1)
+                  goto incomplete;
+                else
+                  {
+                    unsigned char c2 = (unsigned char) p[1];
+
+                    if ((c2 ^ 0x80) < 0x40
+                        && (c >= 0xf1 || c2 >= 0x90)
+                        && (c < 0xf4 || (/* c == 0xf4 && */ c2 < 0x90)))
+                      {
+                        if (m == 2)
+                          goto incomplete;
+                        else
+                          {
+                            unsigned char c3 = (unsigned char) p[2];
+
+                            if ((c3 ^ 0x80) < 0x40)
+                              {
+                                if (m == 3)
+                                  goto incomplete;
+                                else /* m >= 4 */
+                                  {
+                                    unsigned char c4 = (unsigned char) p[3];
+
+                                    if ((c4 ^ 0x80) < 0x40)
+                                      {
+                                        unsigned int wc =
+                                          (((unsigned int) (c & 0x07) << 18)
+                                           | ((unsigned int) (c2 ^ 0x80) << 12)
+                                           | ((unsigned int) (c3 ^ 0x80) << 6)
+                                           | (unsigned int) (c4 ^ 0x80));
+
+                                        if (FITS_IN_CHAR_TYPE (wc))
+                                          {
+                                            if (pwc != NULL)
+                                              *pwc = wc;
+                                            res = 4;
+                                            goto success;
+                                          }
+                                      }
+                                  }
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+        goto invalid;
diff --git a/lib/mbrtowc-impl.h b/lib/mbrtowc-impl.h
new file mode 100644 (file)
index 0000000..bc3e688
--- /dev/null
@@ -0,0 +1,262 @@
+/* Convert multibyte character to wide character.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008.  */
+
+/* This file contains the body of the mbrtowc and mbrtoc32 functions,
+   when GNULIB_defined_mbstate_t is defined.  */
+
+  char *pstate = (char *)ps;
+
+  if (s == NULL)
+    {
+      pwc = NULL;
+      s = "";
+      n = 1;
+    }
+
+  if (n == 0)
+    return (size_t)(-2);
+
+  /* Here n > 0.  */
+
+  if (pstate == NULL)
+    pstate = internal_state;
+
+  {
+    size_t nstate = pstate[0];
+    char buf[4];
+    const char *p;
+    size_t m;
+    enc_t enc;
+    int res;
+
+    switch (nstate)
+      {
+      case 0:
+        p = s;
+        m = n;
+        break;
+      case 3:
+        buf[2] = pstate[3];
+        FALLTHROUGH;
+      case 2:
+        buf[1] = pstate[2];
+        FALLTHROUGH;
+      case 1:
+        buf[0] = pstate[1];
+        p = buf;
+        m = nstate;
+        buf[m++] = s[0];
+        if (n >= 2 && m < 4)
+          {
+            buf[m++] = s[1];
+            if (n >= 3 && m < 4)
+              buf[m++] = s[2];
+          }
+        break;
+      default:
+        errno = EINVAL;
+        return (size_t)(-1);
+      }
+
+    /* Here m > 0.  */
+
+    enc = locale_encoding_classification ();
+
+    if (enc == enc_utf8) /* UTF-8 */
+      {
+        /* Achieve
+             - multi-thread safety and
+             - the ability to produce wide character values > WCHAR_MAX
+           by not calling mbtowc() at all.  */
+#include "mbrtowc-impl-utf8.h"
+      }
+    else
+      {
+        /* The hidden internal state of mbtowc would make this function not
+           multi-thread safe.  Achieve multi-thread safety through a lock.  */
+        wchar_t wc;
+        res = mbtowc_with_lock (&wc, p, m);
+
+        if (res >= 0)
+          {
+            if ((wc == 0) != (res == 0))
+              abort ();
+            if (pwc != NULL)
+              *pwc = wc;
+            goto success;
+          }
+
+        /* mbtowc does not distinguish between invalid and incomplete multibyte
+           sequences.  But mbrtowc needs to make this distinction.
+           There are two possible approaches:
+             - Use iconv() and its return value.
+             - Use built-in knowledge about the possible encodings.
+           Given the low quality of implementation of iconv() on the systems
+           that lack mbrtowc(), we use the second approach.
+           The possible encodings are:
+             - 8-bit encodings,
+             - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+             - UTF-8 (already handled above).
+           Use specialized code for each.  */
+        if (m >= 4 || m >= MB_CUR_MAX)
+          goto invalid;
+        /* Here MB_CUR_MAX > 1 and 0 < m < 4.  */
+        switch (enc)
+          {
+          /* As a reference for this code, you can use the GNU libiconv
+             implementation.  Look for uses of the RET_TOOFEW macro.  */
+
+          case enc_eucjp: /* EUC-JP */
+            {
+              if (m == 1)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+                    goto incomplete;
+                }
+              if (m == 2)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if (c == 0x8f)
+                    {
+                      unsigned char c2 = (unsigned char) p[1];
+
+                      if (c2 >= 0xa1 && c2 < 0xff)
+                        goto incomplete;
+                    }
+                }
+              goto invalid;
+            }
+
+          case enc_94: /* EUC-KR, GB2312, BIG5 */
+            {
+              if (m == 1)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if (c >= 0xa1 && c < 0xff)
+                    goto incomplete;
+                }
+              goto invalid;
+            }
+
+          case enc_euctw: /* EUC-TW */
+            {
+              if (m == 1)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+                    goto incomplete;
+                }
+              else /* m == 2 || m == 3 */
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if (c == 0x8e)
+                    goto incomplete;
+                }
+              goto invalid;
+            }
+
+          case enc_gb18030: /* GB18030 */
+            {
+              if (m == 1)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+                    goto incomplete;
+                }
+              else /* m == 2 || m == 3 */
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if (c >= 0x90 && c <= 0xe3)
+                    {
+                      unsigned char c2 = (unsigned char) p[1];
+
+                      if (c2 >= 0x30 && c2 <= 0x39)
+                        {
+                          if (m == 2)
+                            goto incomplete;
+                          else /* m == 3 */
+                            {
+                              unsigned char c3 = (unsigned char) p[2];
+
+                              if (c3 >= 0x81 && c3 <= 0xfe)
+                                goto incomplete;
+                            }
+                        }
+                    }
+                }
+              goto invalid;
+            }
+
+          case enc_sjis: /* SJIS */
+            {
+              if (m == 1)
+                {
+                  unsigned char c = (unsigned char) p[0];
+
+                  if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+                      || (c >= 0xf0 && c <= 0xf9))
+                    goto incomplete;
+                }
+              goto invalid;
+            }
+
+          default:
+            /* An unknown multibyte encoding.  */
+            goto incomplete;
+          }
+      }
+
+   success:
+    /* res >= 0 is the corrected return value of
+       mbtowc_with_lock (&wc, p, m).  */
+    if (nstate >= (res > 0 ? res : 1))
+      abort ();
+    res -= nstate;
+    pstate[0] = 0;
+    return res;
+
+   incomplete:
+    {
+      size_t k = nstate;
+      /* Here 0 <= k < m < 4.  */
+      pstate[++k] = s[0];
+      if (k < m)
+        {
+          pstate[++k] = s[1];
+          if (k < m)
+            pstate[++k] = s[2];
+        }
+      if (k != m)
+        abort ();
+    }
+    pstate[0] = m;
+    return (size_t)(-2);
+
+   invalid:
+    errno = EILSEQ;
+    /* The conversion state is undefined, says POSIX.  */
+    return (size_t)(-1);
+  }
index 2f6df28..8832f6e 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 /* Specification.  */
 #include <wchar.h>
 
-#if C_LOCALE_MAYBE_EILSEQ
-# include "hard-locale.h"
-# include <locale.h>
-#endif
-
 #if GNULIB_defined_mbstate_t
-/* Implement mbrtowc() on top of mbtowc().  */
+/* Implement mbrtowc() on top of mbtowc() for the non-UTF-8 locales
+   and directly for the UTF-8 locales.  */
 
 # include <errno.h>
+# include <stdint.h>
 # include <stdlib.h>
 
-# include "localcharset.h"
-# include "streq.h"
-# include "verify.h"
+# if defined _WIN32 && !defined __CYGWIN__
 
-# ifndef FALLTHROUGH
-#  if __GNUC__ < 7
-#   define FALLTHROUGH ((void) 0)
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+#  if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
+#   include <threads.h>
+#   pragma weak thrd_exit
+#   define c11_threads_in_use() (thrd_exit != NULL)
 #  else
-#   define FALLTHROUGH __attribute__ ((__fallthrough__))
+#   define c11_threads_in_use() 0
 #  endif
-# endif
 
-/* Returns a classification of special values of the encoding of the current
-   locale.  */
-typedef enum {
-  enc_other,      /* other */
-  enc_utf8,       /* UTF-8 */
-  enc_eucjp,      /* EUC-JP */
-  enc_94,         /* EUC-KR, GB2312, BIG5 */
-  enc_euctw,      /* EUC-TW */
-  enc_gb18030,    /* GB18030 */
-  enc_sjis        /* SJIS */
-} enc_t;
-static inline enc_t
-locale_enc (void)
-{
-  const char *encoding = locale_charset ();
-  if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
-    return enc_utf8;
-  if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
-    return enc_eucjp;
-  if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
-      || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
-      || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
-    return enc_94;
-  if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
-    return enc_euctw;
-  if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
-    return enc_gb18030;
-  if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
-    return enc_sjis;
-  return enc_other;
-}
+# elif HAVE_THREADS_H
 
-#if GNULIB_WCHAR_SINGLE
-/* When we know that the locale does not change, provide a speedup by
-   caching the value of locale_enc.  */
-static int cached_locale_enc = -1;
-static inline enc_t
-locale_enc_cached (void)
-{
-  if (cached_locale_enc < 0)
-    cached_locale_enc = locale_enc ();
-  return cached_locale_enc;
-}
-#else
-/* By default, don't make assumptions, hence no caching.  */
-# define locale_enc_cached locale_enc
-#endif
+#  include <threads.h>
 
-verify (sizeof (mbstate_t) >= 4);
+# endif
+
+# include "attribute.h"
+# include "verify.h"
+# include "lc-charset-dispatch.h"
+# include "mbtowc-lock.h"
 
+verify (sizeof (mbstate_t) >= 4);
 static char internal_state[4];
 
 size_t
 mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 {
-  char *pstate = (char *)ps;
-
-  if (s == NULL)
-    {
-      pwc = NULL;
-      s = "";
-      n = 1;
-    }
-
-  if (n == 0)
-    return (size_t)(-2);
-
-  /* Here n > 0.  */
-
-  if (pstate == NULL)
-    pstate = internal_state;
-
-  {
-    size_t nstate = pstate[0];
-    char buf[4];
-    const char *p;
-    size_t m;
-
-    switch (nstate)
-      {
-      case 0:
-        p = s;
-        m = n;
-        break;
-      case 3:
-        buf[2] = pstate[3];
-        FALLTHROUGH;
-      case 2:
-        buf[1] = pstate[2];
-        FALLTHROUGH;
-      case 1:
-        buf[0] = pstate[1];
-        p = buf;
-        m = nstate;
-        buf[m++] = s[0];
-        if (n >= 2 && m < 4)
-          {
-            buf[m++] = s[1];
-            if (n >= 3 && m < 4)
-              buf[m++] = s[2];
-          }
-        break;
-      default:
-        errno = EINVAL;
-        return (size_t)(-1);
-      }
-
-    /* Here m > 0.  */
-
-# if __GLIBC__ || defined __UCLIBC__
-    /* Work around bug <https://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
-    mbtowc (NULL, NULL, 0);
-# endif
-    {
-      int res = mbtowc (pwc, p, m);
-
-      if (res >= 0)
-        {
-          if (pwc != NULL && ((*pwc == 0) != (res == 0)))
-            abort ();
-          if (nstate >= (res > 0 ? res : 1))
-            abort ();
-          res -= nstate;
-          pstate[0] = 0;
-          return res;
-        }
-
-      /* mbtowc does not distinguish between invalid and incomplete multibyte
-         sequences.  But mbrtowc needs to make this distinction.
-         There are two possible approaches:
-           - Use iconv() and its return value.
-           - Use built-in knowledge about the possible encodings.
-         Given the low quality of implementation of iconv() on the systems that
-         lack mbrtowc(), we use the second approach.
-         The possible encodings are:
-           - 8-bit encodings,
-           - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
-           - UTF-8.
-         Use specialized code for each.  */
-      if (m >= 4 || m >= MB_CUR_MAX)
-        goto invalid;
-      /* Here MB_CUR_MAX > 1 and 0 < m < 4.  */
-      switch (locale_enc_cached ())
-        {
-        case enc_utf8: /* UTF-8 */
-          {
-            /* Cf. unistr/u8-mblen.c.  */
-            unsigned char c = (unsigned char) p[0];
-
-            if (c >= 0xc2)
-              {
-                if (c < 0xe0)
-                  {
-                    if (m == 1)
-                      goto incomplete;
-                  }
-                else if (c < 0xf0)
-                  {
-                    if (m == 1)
-                      goto incomplete;
-                    if (m == 2)
-                      {
-                        unsigned char c2 = (unsigned char) p[1];
-
-                        if ((c2 ^ 0x80) < 0x40
-                            && (c >= 0xe1 || c2 >= 0xa0)
-                            && (c != 0xed || c2 < 0xa0))
-                          goto incomplete;
-                      }
-                  }
-                else if (c <= 0xf4)
-                  {
-                    if (m == 1)
-                      goto incomplete;
-                    else /* m == 2 || m == 3 */
-                      {
-                        unsigned char c2 = (unsigned char) p[1];
-
-                        if ((c2 ^ 0x80) < 0x40
-                            && (c >= 0xf1 || c2 >= 0x90)
-                            && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
-                          {
-                            if (m == 2)
-                              goto incomplete;
-                            else /* m == 3 */
-                              {
-                                unsigned char c3 = (unsigned char) p[2];
-
-                                if ((c3 ^ 0x80) < 0x40)
-                                  goto incomplete;
-                              }
-                          }
-                      }
-                  }
-              }
-            goto invalid;
-          }
-
-        /* As a reference for this code, you can use the GNU libiconv
-           implementation.  Look for uses of the RET_TOOFEW macro.  */
-
-        case enc_eucjp: /* EUC-JP */
-          {
-            if (m == 1)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
-                  goto incomplete;
-              }
-            if (m == 2)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if (c == 0x8f)
-                  {
-                    unsigned char c2 = (unsigned char) p[1];
-
-                    if (c2 >= 0xa1 && c2 < 0xff)
-                      goto incomplete;
-                  }
-              }
-            goto invalid;
-          }
-
-        case enc_94: /* EUC-KR, GB2312, BIG5 */
-          {
-            if (m == 1)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if (c >= 0xa1 && c < 0xff)
-                  goto incomplete;
-              }
-            goto invalid;
-          }
-
-        case enc_euctw: /* EUC-TW */
-          {
-            if (m == 1)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
-                  goto incomplete;
-              }
-            else /* m == 2 || m == 3 */
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if (c == 0x8e)
-                  goto incomplete;
-              }
-            goto invalid;
-          }
-
-        case enc_gb18030: /* GB18030 */
-          {
-            if (m == 1)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
-                  goto incomplete;
-              }
-            else /* m == 2 || m == 3 */
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if (c >= 0x90 && c <= 0xe3)
-                  {
-                    unsigned char c2 = (unsigned char) p[1];
-
-                    if (c2 >= 0x30 && c2 <= 0x39)
-                      {
-                        if (m == 2)
-                          goto incomplete;
-                        else /* m == 3 */
-                          {
-                            unsigned char c3 = (unsigned char) p[2];
-
-                            if (c3 >= 0x81 && c3 <= 0xfe)
-                              goto incomplete;
-                          }
-                      }
-                  }
-              }
-            goto invalid;
-          }
-
-        case enc_sjis: /* SJIS */
-          {
-            if (m == 1)
-              {
-                unsigned char c = (unsigned char) p[0];
-
-                if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
-                    || (c >= 0xf0 && c <= 0xf9))
-                  goto incomplete;
-              }
-            goto invalid;
-          }
-
-        default:
-          /* An unknown multibyte encoding.  */
-          goto incomplete;
-        }
-
-     incomplete:
-      {
-        size_t k = nstate;
-        /* Here 0 <= k < m < 4.  */
-        pstate[++k] = s[0];
-        if (k < m)
-          {
-            pstate[++k] = s[1];
-            if (k < m)
-              pstate[++k] = s[2];
-          }
-        if (k != m)
-          abort ();
-      }
-      pstate[0] = m;
-      return (size_t)(-2);
-
-     invalid:
-      errno = EILSEQ;
-      /* The conversion state is undefined, says POSIX.  */
-      return (size_t)(-1);
-    }
-  }
+# define FITS_IN_CHAR_TYPE(wc)  ((wc) <= WCHAR_MAX)
+# include "mbrtowc-impl.h"
 }
 
 #else
 /* Override the system's mbrtowc() function.  */
 
+# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ
+#  include "hard-locale.h"
+#  include <locale.h>
+# endif
+
 # undef mbrtowc
 
 size_t
@@ -436,14 +130,20 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   }
 # endif
 
+# if MBRTOWC_STORES_INCOMPLETE_BUG
+  ret = mbrtowc (&wc, s, n, ps);
+  if (ret < (size_t) -2 && pwc != NULL)
+    *pwc = wc;
+# else
   ret = mbrtowc (pwc, s, n, ps);
+# endif
 
 # if MBRTOWC_NUL_RETVAL_BUG
   if (ret < (size_t) -2 && !*pwc)
     return 0;
 # endif
 
-# if C_LOCALE_MAYBE_EILSEQ
+# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ
   if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
     {
       unsigned char uc = *s;
index 573a95a..cad1de5 100644 (file)
@@ -1,19 +1,19 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005,
    based on earlier glibc code.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -93,6 +93,6 @@ mbscasecmp (const char *s1, const char *s2)
         /* On machines where 'char' and 'int' are types of the same size, the
            difference of two 'unsigned char' values - including the sign bit -
            doesn't fit in an 'int'.  */
-        return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+        return _GL_CMP (c1, c2);
     }
 }
index e23a5ad..f440155 100644 (file)
@@ -1,18 +1,18 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -56,13 +56,10 @@ mbsinit (const mbstate_t *ps)
 {
 # if defined _WIN32 && !defined __CYGWIN__
   /* Native Windows.  */
-#  ifdef __MINGW32__
-  /* On mingw, 'mbstate_t' is defined as 'int'.  */
-  return ps == NULL || *ps == 0;
-#  else
-  /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter.  */
+  /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4 bytes matter.
+     On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined as
+     an 8-byte struct, of which the first 4 bytes matter.  */
   return ps == NULL || *(const unsigned int *)ps == 0;
-#  endif
 # else
   /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ...  */
   /* Maybe this definition works, maybe not...  */
index 53ffd76..8517f51 100644 (file)
@@ -1,18 +1,18 @@
 /* Counting the multibyte characters in a string.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 2588a88..ab3bab5 100644 (file)
@@ -1,31 +1,31 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 size_t
-mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+FUNC (DCHAR_T *dest, const char **srcp, size_t len, mbstate_t *ps)
 {
   if (ps == NULL)
-    ps = &_gl_mbsrtowcs_state;
+    ps = &INTERNAL_STATE;
   {
     const char *src = *srcp;
 
     if (dest != NULL)
       {
-        wchar_t *destptr = dest;
+        DCHAR_T *destptr = dest;
 
         for (; len > 0; destptr++, len--)
           {
@@ -46,7 +46,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
               src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
 
             /* Parse the next multibyte character.  */
-            ret = mbrtowc (destptr, src, src_avail, ps);
+            ret = MBRTOWC (destptr, src, src_avail, ps);
 
             if (ret == (size_t)(-2))
               /* Encountered a multibyte character that extends past a '\0' byte
@@ -93,7 +93,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
               src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
 
             /* Parse the next multibyte character.  */
-            ret = mbrtowc (NULL, src, src_avail, &state);
+            ret = MBRTOWC (NULL, src, src_avail, &state);
 
             if (ret == (size_t)(-2))
               /* Encountered a multibyte character that extends past a '\0' byte
index 2ab2618..83445fe 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 1da1ce5..64fb9ff 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert string to wide string.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -29,4 +29,8 @@
 
 extern mbstate_t _gl_mbsrtowcs_state;
 
+#define FUNC mbsrtowcs
+#define DCHAR_T wchar_t
+#define INTERNAL_STATE _gl_mbsrtowcs_state
+#define MBRTOWC mbrtowc
 #include "mbsrtowcs-impl.h"
index 2f46067..aafe931 100644 (file)
@@ -1,18 +1,18 @@
 /* Searching in a string.  -*- coding: utf-8 -*-
-   Copyright (C) 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -22,6 +22,7 @@
 
 #include <stdbool.h>
 #include <stddef.h>  /* for NULL, in case a nonstandard string.h lacks it */
+#include <stdlib.h>
 
 #include "malloca.h"
 #include "mbuiter.h"
index 633832f..30d715d 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* We don't need a static internal state, because the encoding is not state
diff --git a/lib/mbtowc-lock.c b/lib/mbtowc-lock.c
new file mode 100644 (file)
index 0000000..0f7ae6c
--- /dev/null
@@ -0,0 +1,150 @@
+/* Return the internal lock used by mbrtowc and mbrtoc32.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019-2020.  */
+
+#include <config.h>
+
+/* When it is known that the gl_get_mbtowc_lock function is defined
+   by a dependency library, it should not be defined here.  */
+#if OMIT_MBTOWC_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+
+#else
+
+/* This file defines the internal lock used by mbrtowc and mbrtoc32.
+   It is a separate compilation unit, so that only one copy of it is
+   present when linking statically.  */
+
+/* Prohibit renaming this symbol.  */
+# undef gl_get_mbtowc_lock
+
+/* Macro for exporting a symbol (function, not variable) defined in this file,
+   when compiled into a shared library.  */
+# ifndef DLL_EXPORTED
+#  if HAVE_VISIBILITY
+  /* Override the effect of the compiler option '-fvisibility=hidden'.  */
+#   define DLL_EXPORTED __attribute__((__visibility__("default")))
+#  elif defined _WIN32 || defined __CYGWIN__
+#   define DLL_EXPORTED __declspec(dllexport)
+#  else
+#   define DLL_EXPORTED
+#  endif
+# endif
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+#  include "windows-initguard.h"
+
+/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
+   because the latter is not guaranteed to be a stable ABI in the future.  */
+
+/* Make sure the function gets exported from DLLs.  */
+DLL_EXPORTED CRITICAL_SECTION *gl_get_mbtowc_lock (void);
+
+static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT;
+static CRITICAL_SECTION lock;
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32.  */
+CRITICAL_SECTION *
+gl_get_mbtowc_lock (void)
+{
+  if (!guard.done)
+    {
+      if (InterlockedIncrement (&guard.started) == 0)
+        {
+          /* This thread is the first one to need the lock.  Initialize it.  */
+          InitializeCriticalSection (&lock);
+          guard.done = 1;
+        }
+      else
+        {
+          /* Don't let guard.started grow and wrap around.  */
+          InterlockedDecrement (&guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this mutex.  */
+          while (!guard.done)
+            Sleep (0);
+        }
+    }
+  return &lock;
+}
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED pthread_mutex_t *gl_get_mbtowc_lock (void);
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32.  */
+pthread_mutex_t *
+gl_get_mbtowc_lock (void)
+{
+  return &mutex;
+}
+
+# elif HAVE_THREADS_H
+
+#  include <threads.h>
+#  include <stdlib.h>
+
+static int volatile init_needed = 1;
+static once_flag init_once = ONCE_FLAG_INIT;
+static mtx_t mutex;
+
+static void
+atomic_init (void)
+{
+  if (mtx_init (&mutex, mtx_plain) != thrd_success)
+    abort ();
+  init_needed = 0;
+}
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED mtx_t *gl_get_mbtowc_lock (void);
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32.  */
+mtx_t *
+gl_get_mbtowc_lock (void)
+{
+  if (init_needed)
+    call_once (&init_once, atomic_init);
+  return &mutex;
+}
+
+# endif
+
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
+/* Make sure the '__declspec(dllimport)' in mbrtowc.c and mbrtoc32.c does not
+   cause a link failure when no DLLs are involved.  */
+#  if defined _WIN64 || defined _LP64
+#   define IMP(x) __imp_##x
+#  else
+#   define IMP(x) _imp__##x
+#  endif
+void * IMP(gl_get_mbtowc_lock) = &gl_get_mbtowc_lock;
+# endif
+
+#endif
diff --git a/lib/mbtowc-lock.h b/lib/mbtowc-lock.h
new file mode 100644 (file)
index 0000000..d31b0b6
--- /dev/null
@@ -0,0 +1,125 @@
+/* Use the internal lock used by mbrtowc and mbrtoc32.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019-2020.  */
+
+/* Use a lock, so that no two threads can invoke mbtowc at the same time.  */
+
+static inline int
+mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m)
+{
+  /* Put the hidden internal state of mbtowc into its initial state.
+     This is needed at least with glibc, uClibc, and MSVC CRT.
+     See <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>.  */
+  mbtowc (NULL, NULL, 0);
+
+  return mbtowc (pwc, p, m);
+}
+
+/* Prohibit renaming this symbol.  */
+#undef gl_get_mbtowc_lock
+
+#if GNULIB_MBRTOWC_SINGLE_THREAD
+
+/* All uses of this function are in a single thread.  No locking needed.  */
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+  return mbtowc_unlocked (pwc, p, m);
+}
+
+#elif defined _WIN32 && !defined __CYGWIN__
+
+extern __declspec(dllimport) CRITICAL_SECTION *gl_get_mbtowc_lock (void);
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+  CRITICAL_SECTION *lock = gl_get_mbtowc_lock ();
+  int ret;
+
+  EnterCriticalSection (lock);
+  ret = mbtowc_unlocked (pwc, p, m);
+  LeaveCriticalSection (lock);
+
+  return ret;
+}
+
+#elif HAVE_PTHREAD_API /* AIX, IRIX, Cygwin */
+
+extern
+# if defined _WIN32 || defined __CYGWIN__
+  __declspec(dllimport)
+# endif
+  pthread_mutex_t *gl_get_mbtowc_lock (void);
+
+# if HAVE_WEAK_SYMBOLS /* IRIX */
+
+   /* Avoid the need to link with '-lpthread'.  */
+#  pragma weak pthread_mutex_lock
+#  pragma weak pthread_mutex_unlock
+
+   /* Determine whether libpthread is in use.  */
+#  pragma weak pthread_mutexattr_gettype
+   /* See the comments in lock.h.  */
+#  define pthread_in_use() \
+     (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+
+# else
+#  define pthread_in_use() 1
+# endif
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+  if (pthread_in_use())
+    {
+      pthread_mutex_t *lock = gl_get_mbtowc_lock ();
+      int ret;
+
+      if (pthread_mutex_lock (lock))
+        abort ();
+      ret = mbtowc_unlocked (pwc, p, m);
+      if (pthread_mutex_unlock (lock))
+        abort ();
+
+      return ret;
+    }
+  else
+    return mbtowc_unlocked (pwc, p, m);
+}
+
+#elif HAVE_THREADS_H
+
+extern mtx_t *gl_get_mbtowc_lock (void);
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+  mtx_t *lock = gl_get_mbtowc_lock ();
+  int ret;
+
+  if (mtx_lock (lock) != thrd_success)
+    abort ();
+  ret = mbtowc_unlocked (pwc, p, m);
+  if (mtx_unlock (lock) != thrd_success)
+    abort ();
+
+  return ret;
+}
+
+#endif
index a212b22..47b431a 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2011.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 9167580..d740bb0 100644 (file)
@@ -1,3 +1,20 @@
+/* Iterating through multibyte strings: macros for multi-byte encodings.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define MBUITER_INLINE _GL_EXTERN_INLINE
 #include "mbuiter.h"
index df8cd57..8e87c5c 100644 (file)
@@ -1,17 +1,17 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
-
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
-   <wchar.h>.  */
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 
 #include "mbchar.h"
index 0b47546..56fd59d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2018
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2021
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
@@ -7,21 +7,21 @@
    adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
    and implemented by Roland McGrath (roland@ai.mit.edu).
 
-NOTE: The canonical source of this file is maintained with the GNU C Library.
-Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3 of the License, or any
-later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
index 60f247e..4f16481 100644 (file)
@@ -1,4 +1,20 @@
 # Suppress a valgrind message about use of uninitialized memory in memchr().
+
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
 # POSIX states that when the character is found, memchr must not read extra
 # bytes in an overestimated length (for example, where memchr is used to
 # implement strnlen).  However, we use a safe word read to provide a speedup.
diff --git a/lib/mempcpy.c b/lib/mempcpy.c
new file mode 100644 (file)
index 0000000..cacacdb
--- /dev/null
@@ -0,0 +1,33 @@
+/* Copy memory area and return pointer after last written byte.
+   Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+/* A function definition is only needed if HAVE_MEMPCPY is not defined.  */
+#if !HAVE_MEMPCPY
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+   last written byte.  */
+void *
+mempcpy (void *dest, const void *src, size_t n)
+{
+  return (char *) memcpy (dest, src, n) + n;
+}
+
+#endif
index 33a5305..a03361b 100644 (file)
@@ -1,19 +1,19 @@
 /* MIN, MAX macros.
-   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2018 Free Software
+   Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _MINMAX_H
 #define _MINMAX_H
index 37d5a0f..2766cc7 100644 (file)
@@ -1,19 +1,19 @@
 /* On some systems, mkdir ("foo/", 0700) fails because of the trailing
    slash.  On those systems, this wrapper removes the trailing slash.
 
-   Copyright (C) 2001, 2003, 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2006, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
@@ -77,7 +77,7 @@ rpl_mkdir (char const *dir, mode_t mode maybe_unused)
                          || (last[1] == '.' && last[2] == '\0')))
       {
         struct stat st;
-        if (stat (tmp_dir, &st) == 0)
+        if (stat (tmp_dir, &st) == 0 || errno == EOVERFLOW)
           errno = EEXIST;
         return -1;
       }
index 02a7b65..6e605d8 100644 (file)
@@ -1,18 +1,18 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2018 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2021 Free Software
    Foundation, Inc.
    This file is derived from the one in the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if !_LIBC
index 31cf3a4..7386625 100644 (file)
@@ -1,40 +1,56 @@
-/* mktime variant that also uses an offset guess
+/* Internals of mktime and related functions
+   Copyright 2016-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Paul Eggert <eggert@cs.ucla.edu>.
 
-   Copyright 2016-2018 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, see
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <time.h>
+#ifndef _LIBC
+# include <time.h>
+#endif
 
 /* mktime_offset_t is a signed type wide enough to hold a UTC offset
    in seconds, and used as part of the type of the offset-guess
-   argument to mktime_internal.  Use time_t on platforms where time_t
+   argument to mktime_internal.  In Glibc, it is always long int.
+   When in Gnulib, use time_t on platforms where time_t
    is signed, to be compatible with platforms like BeOS that export
    this implementation detail of mktime.  On platforms where time_t is
    unsigned, GNU and POSIX code can assume 'int' is at least 32 bits
    which is wide enough for a UTC offset.  */
-
-#if TIME_T_IS_SIGNED
+#ifdef _LIBC
+typedef long int mktime_offset_t;
+#elif defined TIME_T_IS_SIGNED
 typedef time_t mktime_offset_t;
 #else
 typedef int mktime_offset_t;
 #endif
 
-time_t mktime_internal (struct tm *,
-                        struct tm * (*) (time_t const *, struct tm *),
-                        mktime_offset_t *);
+/* The source code uses identifiers like __time64_t for glibc
+   timestamps that can contain 64-bit values even when time_t is only
+   32 bits.  These are just macros for the ordinary identifiers unless
+   compiling within glibc when time_t is 32 bits.  */
+#if ! (defined _LIBC && __TIMESIZE != 64)
+# undef __time64_t
+# define __time64_t time_t
+# define __gmtime64_r __gmtime_r
+# define __localtime64_r __localtime_r
+# define __mktime64 mktime
+# define __timegm64 timegm
+#endif
+
+#ifndef _LIBC
 
 /* Although glibc source code uses leading underscores, Gnulib wants
    ordinary names.
@@ -45,9 +61,19 @@ time_t mktime_internal (struct tm *,
    Similarly for gmtime_r.  See the gnulib time_r module for one way
    to implement this.  */
 
-#undef __gmtime_r
-#undef __localtime_r
-#define __gmtime_r gmtime_r
-#define __localtime_r localtime_r
+# undef __gmtime_r
+# undef __localtime_r
+# define __gmtime_r gmtime_r
+# define __localtime_r localtime_r
+
+# define __mktime_internal mktime_internal
+
+#endif
 
-#define __mktime_internal mktime_internal
+/* Subroutine of mktime.  Return the time_t representation of TP and
+   normalize TP, given that a struct tm * maps to a time_t as performed
+   by FUNC.  Record next guess for localtime-gmtime offset in *OFFSET.  */
+extern __time64_t __mktime_internal (struct tm *tp,
+                                     struct tm *(*func) (__time64_t const *,
+                                                         struct tm *),
+                                     mktime_offset_t *offset) attribute_hidden;
index 9c3fb20..ae721c7 100644 (file)
@@ -1,19 +1,19 @@
 /* Convert a 'struct tm' to a time_t value.
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
+   Copyright (C) 1993-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Paul Eggert <eggert@twinsun.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -72,13 +72,13 @@ my_tzset (void)
   /* Rectify the value of the environment variable TZ.
      There are four possible kinds of such values:
        - Traditional US time zone names, e.g. "PST8PDT".  Syntax: see
-         <https://msdn.microsoft.com/en-us/library/90s5c885.aspx>
+         <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset>
        - Time zone names based on geography, that contain one or more
          slashes, e.g. "Europe/Moscow".
        - Time zone names based on geography, without slashes, e.g.
          "Singapore".
        - Time zone names that contain explicit DST rules.  Syntax: see
-         <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
+         <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
      The Microsoft CRT understands only the first kind.  It produces incorrect
      results if the value of TZ is of the other kinds.
      But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value
@@ -94,7 +94,7 @@ my_tzset (void)
   const char *tz = getenv ("TZ");
   if (tz != NULL && strchr (tz, '/') != NULL)
     _putenv ("TZ=");
-# elif HAVE_TZSET
+# else
   tzset ();
 # endif
 }
@@ -112,11 +112,11 @@ my_tzset (void)
    added to them, and then with another timestamp added, without
    worrying about overflow.
 
-   Much of the code uses long_int to represent time_t values, to
-   lessen the hassle of dealing with platforms where time_t is
+   Much of the code uses long_int to represent __time64_t values, to
+   lessen the hassle of dealing with platforms where __time64_t is
    unsigned, and because long_int should suffice to represent all
-   time_t values that mktime can generate even on platforms where
-   time_t is excessively wide.  */
+   __time64_t values that mktime can generate even on platforms where
+   __time64_t is wider than the int components of struct tm.  */
 
 #if INT_MAX <= LONG_MAX / 4 / 366 / 24 / 60 / 60
 typedef long int long_int;
@@ -141,19 +141,18 @@ shr (long_int a, int b)
   long_int one = 1;
   return (-one >> 1 == -1
          ? a >> b
-         : a / (one << b) - (a % (one << b) < 0));
+         : (a + (a < 0)) / (one << b) - (a < 0));
 }
 
-/* Bounds for the intersection of time_t and long_int.  */
+/* Bounds for the intersection of __time64_t and long_int.  */
 
 static long_int const mktime_min
-  = ((TYPE_SIGNED (time_t) && TYPE_MINIMUM (time_t) < TYPE_MINIMUM (long_int))
-     ? TYPE_MINIMUM (long_int) : TYPE_MINIMUM (time_t));
+  = ((TYPE_SIGNED (__time64_t)
+      && TYPE_MINIMUM (__time64_t) < TYPE_MINIMUM (long_int))
+     ? TYPE_MINIMUM (long_int) : TYPE_MINIMUM (__time64_t));
 static long_int const mktime_max
-  = (TYPE_MAXIMUM (long_int) < TYPE_MAXIMUM (time_t)
-     ? TYPE_MAXIMUM (long_int) : TYPE_MAXIMUM (time_t));
-
-verify (TYPE_IS_INTEGER (time_t));
+  = (TYPE_MAXIMUM (long_int) < TYPE_MAXIMUM (__time64_t)
+     ? TYPE_MAXIMUM (long_int) : TYPE_MAXIMUM (__time64_t));
 
 #define EPOCH_YEAR 1970
 #define TM_YEAR_BASE 1900
@@ -212,8 +211,8 @@ ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1,
      Take care to avoid integer overflow here.  */
   int a4 = shr (year1, 2) + shr (TM_YEAR_BASE, 2) - ! (year1 & 3);
   int b4 = shr (year0, 2) + shr (TM_YEAR_BASE, 2) - ! (year0 & 3);
-  int a100 = a4 / 25 - (a4 % 25 < 0);
-  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a100 = (a4 + (a4 < 0)) / 25 - (a4 < 0);
+  int b100 = (b4 + (b4 < 0)) / 25 - (b4 < 0);
   int a400 = shr (a100, 2);
   int b400 = shr (b100, 2);
   int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
@@ -252,23 +251,23 @@ tm_diff (long_int year, long_int yday, int hour, int min, int sec,
 }
 
 /* Use CONVERT to convert T to a struct tm value in *TM.  T must be in
-   range for time_t.  Return TM if successful, NULL (setting errno) on
+   range for __time64_t.  Return TM if successful, NULL (setting errno) on
    failure.  */
 static struct tm *
-convert_time (struct tm *(*convert) (const time_t *, struct tm *),
+convert_time (struct tm *(*convert) (const __time64_t *, struct tm *),
              long_int t, struct tm *tm)
 {
-  time_t x = t;
+  __time64_t x = t;
   return convert (&x, tm);
 }
 
 /* Use CONVERT to convert *T to a broken down time in *TP.
    If *T is out of range for conversion, adjust it so that
    it is the nearest in-range value and then convert that.
-   A value is in range if it fits in both time_t and long_int.
+   A value is in range if it fits in both __time64_t and long_int.
    Return TP on success, NULL (setting errno) on failure.  */
 static struct tm *
-ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
+ranged_convert (struct tm *(*convert) (const __time64_t *, struct tm *),
                long_int *t, struct tm *tp)
 {
   long_int t1 = (*t < mktime_min ? mktime_min
@@ -310,7 +309,7 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
 }
 
 
-/* Convert *TP to a time_t value, inverting
+/* Convert *TP to a __time64_t value, inverting
    the monotonic and mostly-unit-linear conversion function CONVERT.
    Use *OFFSET to keep track of a guess at the offset of the result,
    compared to what the result would be for UTC without leap seconds.
@@ -318,9 +317,9 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
    If successful, set *TP to the canonicalized struct tm;
    otherwise leave *TP alone, return ((time_t) -1) and set errno.
    This function is external because it is used also by timegm.c.  */
-time_t
+__time64_t
 __mktime_internal (struct tm *tp,
-                  struct tm *(*convert) (const time_t *, struct tm *),
+                  struct tm *(*convert) (const __time64_t *, struct tm *),
                   mktime_offset_t *offset)
 {
   struct tm tm;
@@ -520,9 +519,9 @@ __mktime_internal (struct tm *tp,
 
 #if defined _LIBC || NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS
 
-/* Convert *TP to a time_t value.  */
-time_t
-mktime (struct tm *tp)
+/* Convert *TP to a __time64_t value.  */
+__time64_t
+__mktime64 (struct tm *tp)
 {
   /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
      time zone names contained in the external variable 'tzname' shall
@@ -531,7 +530,7 @@ mktime (struct tm *tp)
 
 # if defined _LIBC || NEED_MKTIME_WORKING
   static mktime_offset_t localtime_offset;
-  return __mktime_internal (tp, __localtime_r, &localtime_offset);
+  return __mktime_internal (tp, __localtime64_r, &localtime_offset);
 # else
 #  undef mktime
   return mktime (tp);
@@ -539,11 +538,29 @@ mktime (struct tm *tp)
 }
 #endif /* _LIBC || NEED_MKTIME_WORKING || NEED_MKTIME_WINDOWS */
 
-#ifdef weak_alias
-weak_alias (mktime, timelocal)
+#if defined _LIBC && __TIMESIZE != 64
+
+libc_hidden_def (__mktime64)
+
+time_t
+mktime (struct tm *tp)
+{
+  struct tm tm = *tp;
+  __time64_t t = __mktime64 (&tm);
+  if (in_time_t_range (t))
+    {
+      *tp = tm;
+      return t;
+    }
+  else
+    {
+      __set_errno (EOVERFLOW);
+      return -1;
+    }
+}
+
 #endif
 
-#ifdef _LIBC
+weak_alias (mktime, timelocal)
 libc_hidden_def (mktime)
 libc_hidden_weak (timelocal)
-#endif
index 0f19a09..a23dac9 100644 (file)
@@ -1,18 +1,18 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 8e7ff30..e115a35 100644 (file)
@@ -1,18 +1,18 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _MSVC_INVAL_H
 #define _MSVC_INVAL_H
@@ -95,7 +95,7 @@ extern void gl_msvc_inval_ensure_handler (void);
 
 /* Gnulib can define its own status codes, as described in the page
    "Raising Software Exceptions" on microsoft.com
-   <https://msdn.microsoft.com/en-us/library/het71c37.aspx>.
+   <https://docs.microsoft.com/en-us/cpp/cpp/raising-software-exceptions>.
    Our status codes are composed of
      - 0xE0000000, mandatory for all user-defined status codes,
      - 0x474E550, a API identifier ("GNU"),
@@ -106,7 +106,7 @@ extern void gl_msvc_inval_ensure_handler (void);
 #  if defined _MSC_VER
 /* A compiler that supports __try/__except, as described in the page
    "try-except statement" on microsoft.com
-   <https://msdn.microsoft.com/en-us/library/s58ftw19.aspx>.
+   <https://docs.microsoft.com/en-us/cpp/cpp/try-except-statement>.
    With __try/__except, we can use the multithread-safe exception handling.  */
 
 #   ifdef __cplusplus
index 785733e..d3c1f54 100644 (file)
@@ -1,19 +1,19 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index a9671c3..057b5dd 100644 (file)
@@ -1,19 +1,19 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _MSVC_NOTHROW_H
 #define _MSVC_NOTHROW_H
diff --git a/lib/nl_langinfo-lock.c b/lib/nl_langinfo-lock.c
new file mode 100644 (file)
index 0000000..fcdf56d
--- /dev/null
@@ -0,0 +1,150 @@
+/* Return the internal lock used by nl_langinfo.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019-2020.  */
+
+#include <config.h>
+
+/* When it is known that the gl_get_nl_langinfo_lock function is defined
+   by a dependency library, it should not be defined here.  */
+#if OMIT_NL_LANGINFO_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+
+#else
+
+/* This file defines the internal lock used by nl_langinfo.
+   It is a separate compilation unit, so that only one copy of it is
+   present when linking statically.  */
+
+/* Prohibit renaming this symbol.  */
+# undef gl_get_nl_langinfo_lock
+
+/* Macro for exporting a symbol (function, not variable) defined in this file,
+   when compiled into a shared library.  */
+# ifndef DLL_EXPORTED
+#  if HAVE_VISIBILITY
+  /* Override the effect of the compiler option '-fvisibility=hidden'.  */
+#   define DLL_EXPORTED __attribute__((__visibility__("default")))
+#  elif defined _WIN32 || defined __CYGWIN__
+#   define DLL_EXPORTED __declspec(dllexport)
+#  else
+#   define DLL_EXPORTED
+#  endif
+# endif
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+#  include "windows-initguard.h"
+
+/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
+   because the latter is not guaranteed to be a stable ABI in the future.  */
+
+/* Make sure the function gets exported from DLLs.  */
+DLL_EXPORTED CRITICAL_SECTION *gl_get_nl_langinfo_lock (void);
+
+static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT;
+static CRITICAL_SECTION lock;
+
+/* Returns the internal lock used by nl_langinfo.  */
+CRITICAL_SECTION *
+gl_get_nl_langinfo_lock (void)
+{
+  if (!guard.done)
+    {
+      if (InterlockedIncrement (&guard.started) == 0)
+        {
+          /* This thread is the first one to need the lock.  Initialize it.  */
+          InitializeCriticalSection (&lock);
+          guard.done = 1;
+        }
+      else
+        {
+          /* Don't let guard.started grow and wrap around.  */
+          InterlockedDecrement (&guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this mutex.  */
+          while (!guard.done)
+            Sleep (0);
+        }
+    }
+  return &lock;
+}
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED pthread_mutex_t *gl_get_nl_langinfo_lock (void);
+
+/* Returns the internal lock used by nl_langinfo.  */
+pthread_mutex_t *
+gl_get_nl_langinfo_lock (void)
+{
+  return &mutex;
+}
+
+# elif HAVE_THREADS_H
+
+#  include <threads.h>
+#  include <stdlib.h>
+
+static int volatile init_needed = 1;
+static once_flag init_once = ONCE_FLAG_INIT;
+static mtx_t mutex;
+
+static void
+atomic_init (void)
+{
+  if (mtx_init (&mutex, mtx_plain) != thrd_success)
+    abort ();
+  init_needed = 0;
+}
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED mtx_t *gl_get_nl_langinfo_lock (void);
+
+/* Returns the internal lock used by nl_langinfo.  */
+mtx_t *
+gl_get_nl_langinfo_lock (void)
+{
+  if (init_needed)
+    call_once (&init_once, atomic_init);
+  return &mutex;
+}
+
+# endif
+
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
+/* Make sure the '__declspec(dllimport)' in nl_langinfo.c does not cause
+   a link failure when no DLLs are involved.  */
+#  if defined _WIN64 || defined _LP64
+#   define IMP(x) __imp_##x
+#  else
+#   define IMP(x) _imp__##x
+#  endif
+void * IMP(gl_get_nl_langinfo_lock) = &gl_get_nl_langinfo_lock;
+# endif
+
+#endif
index ea26730..b481f20 100644 (file)
@@ -1,18 +1,18 @@
 /* nl_langinfo() replacement: query locale dependent information.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -21,6 +21,7 @@
 #include <langinfo.h>
 
 #include <locale.h>
+#include <stdlib.h>
 #include <string.h>
 #if defined _WIN32 && ! defined __CYGWIN__
 # define WIN32_LEAN_AND_MEAN  /* avoid including junk */
 # include <stdio.h>
 #endif
 
+#if REPLACE_NL_LANGINFO && !NL_LANGINFO_MTSAFE
+# if defined _WIN32 && !defined __CYGWIN__
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+#  if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
+#   include <threads.h>
+#   pragma weak thrd_exit
+#   define c11_threads_in_use() (thrd_exit != NULL)
+#  else
+#   define c11_threads_in_use() 0
+#  endif
+
+# elif HAVE_THREADS_H
+
+#  include <threads.h>
+
+# endif
+#endif
+
+/* nl_langinfo() must be multithread-safe.  To achieve this without using
+   thread-local storage:
+     1. We use a specific static buffer for each possible argument.
+        So that different threads can call nl_langinfo with different arguments,
+        without interfering.
+     2. We use a simple strcpy or memcpy to fill this static buffer.  Filling it
+        through, for example, strcpy + strcat would not be guaranteed to leave
+        the buffer's contents intact if another thread is currently accessing
+        it.  If necessary, the contents is first assembled in a stack-allocated
+        buffer.  */
+
 #if !REPLACE_NL_LANGINFO || GNULIB_defined_CODESET
 /* Return the codeset of the current locale, if this is easily deducible.
    Otherwise, return "".  */
 static char *
 ctype_codeset (void)
 {
-  static char buf[2 + 10 + 1];
-  char const *locale = setlocale (LC_CTYPE, NULL);
-  char *codeset = buf;
+  static char result[2 + 10 + 1];
+  char buf[2 + 10 + 1];
+  char locale[SETLOCALE_NULL_MAX];
+  char *codeset;
   size_t codesetlen;
+
+  if (setlocale_null_r (LC_CTYPE, locale, sizeof (locale)))
+    locale[0] = '\0';
+
+  codeset = buf;
   codeset[0] = '\0';
 
-  if (locale && locale[0])
+  if (locale[0])
     {
       /* If the locale name contains an encoding after the dot, return it.  */
       char *dot = strchr (locale, '.');
@@ -76,9 +118,20 @@ ctype_codeset (void)
     memmove (buf + 2, codeset, codesetlen + 1);
   else
     sprintf (buf + 2, "%u", GetACP ());
-  codeset = memcpy (buf, "CP", 2);
-# endif
-  return codeset;
+  /* For a locale name such as "French_France.65001", in Windows 10,
+     setlocale now returns "French_France.utf8" instead.  */
+  if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0)
+    return (char *) "UTF-8";
+  else
+    {
+      memcpy (buf, "CP", 2);
+      strcpy (result, buf);
+      return result;
+    }
+# else
+  strcpy (result, codeset);
+  return result;
+#endif
 }
 #endif
 
@@ -89,6 +142,137 @@ ctype_codeset (void)
 
 # undef nl_langinfo
 
+/* Without locking, on Solaris 11.3, test-nl_langinfo-mt fails, with message
+   "thread5 disturbed by threadN!", even when threadN invokes only
+      nl_langinfo (CODESET);
+      nl_langinfo (CRNCYSTR);
+   Similarly on Solaris 10.  */
+
+# if !NL_LANGINFO_MTSAFE /* Solaris */
+
+#  define ITEMS (MAXSTRMSG + 1)
+#  define MAX_RESULT_LEN 80
+
+static char *
+nl_langinfo_unlocked (nl_item item)
+{
+  static char result[ITEMS][MAX_RESULT_LEN];
+
+  /* The result of nl_langinfo is in storage that can be overwritten by
+     other calls to nl_langinfo.  */
+  char *tmp = nl_langinfo (item);
+  if (item >= 0 && item < ITEMS && tmp != NULL)
+    {
+      size_t tmp_len = strlen (tmp);
+      if (tmp_len < MAX_RESULT_LEN)
+        strcpy (result[item], tmp);
+      else
+        {
+          /* Produce a truncated result.  Oh well...  */
+          result[item][MAX_RESULT_LEN - 1] = '\0';
+          memcpy (result[item], tmp, MAX_RESULT_LEN - 1);
+        }
+      return result[item];
+    }
+  else
+    return tmp;
+}
+
+/* Use a lock, so that no two threads can invoke nl_langinfo_unlocked
+   at the same time.  */
+
+/* Prohibit renaming this symbol.  */
+#  undef gl_get_nl_langinfo_lock
+
+#  if defined _WIN32 && !defined __CYGWIN__
+
+extern __declspec(dllimport) CRITICAL_SECTION *gl_get_nl_langinfo_lock (void);
+
+static char *
+nl_langinfo_with_lock (nl_item item)
+{
+  CRITICAL_SECTION *lock = gl_get_nl_langinfo_lock ();
+  char *ret;
+
+  EnterCriticalSection (lock);
+  ret = nl_langinfo_unlocked (item);
+  LeaveCriticalSection (lock);
+
+  return ret;
+}
+
+#  elif HAVE_PTHREAD_API
+
+extern
+#   if defined _WIN32 || defined __CYGWIN__
+  __declspec(dllimport)
+#   endif
+  pthread_mutex_t *gl_get_nl_langinfo_lock (void);
+
+#   if HAVE_WEAK_SYMBOLS /* musl libc, FreeBSD, NetBSD, OpenBSD, Haiku */
+
+     /* Avoid the need to link with '-lpthread'.  */
+#    pragma weak pthread_mutex_lock
+#    pragma weak pthread_mutex_unlock
+
+     /* Determine whether libpthread is in use.  */
+#    pragma weak pthread_mutexattr_gettype
+     /* See the comments in lock.h.  */
+#    define pthread_in_use() \
+       (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+
+#   else
+#    define pthread_in_use() 1
+#   endif
+
+static char *
+nl_langinfo_with_lock (nl_item item)
+{
+  if (pthread_in_use())
+    {
+      pthread_mutex_t *lock = gl_get_nl_langinfo_lock ();
+      char *ret;
+
+      if (pthread_mutex_lock (lock))
+        abort ();
+      ret = nl_langinfo_unlocked (item);
+      if (pthread_mutex_unlock (lock))
+        abort ();
+
+      return ret;
+    }
+  else
+    return nl_langinfo_unlocked (item);
+}
+
+#  elif HAVE_THREADS_H
+
+extern mtx_t *gl_get_nl_langinfo_lock (void);
+
+static char *
+nl_langinfo_with_lock (nl_item item)
+{
+  mtx_t *lock = gl_get_nl_langinfo_lock ();
+  char *ret;
+
+  if (mtx_lock (lock) != thrd_success)
+    abort ();
+  ret = nl_langinfo_unlocked (item);
+  if (mtx_unlock (lock) != thrd_success)
+    abort ();
+
+  return ret;
+}
+
+#  endif
+
+# else
+
+/* On other platforms, no lock is needed.  */
+#  define nl_langinfo_with_lock nl_langinfo
+
+# endif
+
 char *
 rpl_nl_langinfo (nl_item item)
 {
@@ -155,7 +339,7 @@ rpl_nl_langinfo (nl_item item)
     default:
       break;
     }
-  return nl_langinfo (item);
+  return nl_langinfo_with_lock (item);
 }
 
 #else
@@ -169,7 +353,7 @@ rpl_nl_langinfo (nl_item item)
 char *
 nl_langinfo (nl_item item)
 {
-  static char nlbuf[100];
+  char buf[100];
   struct tm tmm = { 0 };
 
   switch (item)
@@ -209,14 +393,22 @@ nl_langinfo (nl_item item)
     case T_FMT_AMPM:
       return (char *) "%I:%M:%S %p";
     case AM_STR:
-      if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
-        return (char *) "AM";
-      return nlbuf;
+      {
+        static char result[80];
+        if (!strftime (buf, sizeof result, "%p", &tmm))
+          return (char *) "AM";
+        strcpy (result, buf);
+        return result;
+      }
     case PM_STR:
-      tmm.tm_hour = 12;
-      if (!strftime (nlbuf, sizeof nlbuf, "%p", &tmm))
-        return (char *) "PM";
-      return nlbuf;
+      {
+        static char result[80];
+        tmm.tm_hour = 12;
+        if (!strftime (buf, sizeof result, "%p", &tmm))
+          return (char *) "PM";
+        strcpy (result, buf);
+        return result;
+      }
     case DAY_1:
     case DAY_2:
     case DAY_3:
@@ -225,14 +417,16 @@ nl_langinfo (nl_item item)
     case DAY_6:
     case DAY_7:
       {
+        static char result[7][50];
         static char const days[][sizeof "Wednesday"] = {
           "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
           "Friday", "Saturday"
         };
         tmm.tm_wday = item - DAY_1;
-        if (!strftime (nlbuf, sizeof nlbuf, "%A", &tmm))
+        if (!strftime (buf, sizeof result[0], "%A", &tmm))
           return (char *) days[item - DAY_1];
-        return nlbuf;
+        strcpy (result[item - DAY_1], buf);
+        return result[item - DAY_1];
       }
     case ABDAY_1:
     case ABDAY_2:
@@ -242,13 +436,15 @@ nl_langinfo (nl_item item)
     case ABDAY_6:
     case ABDAY_7:
       {
+        static char result[7][30];
         static char const abdays[][sizeof "Sun"] = {
           "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
         };
         tmm.tm_wday = item - ABDAY_1;
-        if (!strftime (nlbuf, sizeof nlbuf, "%a", &tmm))
+        if (!strftime (buf, sizeof result[0], "%a", &tmm))
           return (char *) abdays[item - ABDAY_1];
-        return nlbuf;
+        strcpy (result[item - ABDAY_1], buf);
+        return result[item - ABDAY_1];
       }
     {
       static char const months[][sizeof "September"] = {
@@ -267,10 +463,14 @@ nl_langinfo (nl_item item)
       case MON_10:
       case MON_11:
       case MON_12:
-        tmm.tm_mon = item - MON_1;
-        if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
-          return (char *) months[item - MON_1];
-        return nlbuf;
+        {
+          static char result[12][50];
+          tmm.tm_mon = item - MON_1;
+          if (!strftime (buf, sizeof result[0], "%B", &tmm))
+            return (char *) months[item - MON_1];
+          strcpy (result[item - MON_1], buf);
+          return result[item - MON_1];
+        }
       case ALTMON_1:
       case ALTMON_2:
       case ALTMON_3:
@@ -283,15 +483,19 @@ nl_langinfo (nl_item item)
       case ALTMON_10:
       case ALTMON_11:
       case ALTMON_12:
-        tmm.tm_mon = item - ALTMON_1;
-        /* The platforms without nl_langinfo() don't support strftime with %OB.
-           We don't even need to try.  */
-        #if 0
-        if (!strftime (nlbuf, sizeof nlbuf, "%OB", &tmm))
-        #endif
-          if (!strftime (nlbuf, sizeof nlbuf, "%B", &tmm))
-            return (char *) months[item - ALTMON_1];
-        return nlbuf;
+        {
+          static char result[12][50];
+          tmm.tm_mon = item - ALTMON_1;
+          /* The platforms without nl_langinfo() don't support strftime with
+             %OB.  We don't even need to try.  */
+          #if 0
+          if (!strftime (buf, sizeof result[0], "%OB", &tmm))
+          #endif
+            if (!strftime (buf, sizeof result[0], "%B", &tmm))
+              return (char *) months[item - ALTMON_1];
+          strcpy (result[item - ALTMON_1], buf);
+          return result[item - ALTMON_1];
+        }
     }
     case ABMON_1:
     case ABMON_2:
@@ -306,14 +510,16 @@ nl_langinfo (nl_item item)
     case ABMON_11:
     case ABMON_12:
       {
+        static char result[12][30];
         static char const abmonths[][sizeof "Jan"] = {
           "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
           "Sep", "Oct", "Nov", "Dec"
         };
         tmm.tm_mon = item - ABMON_1;
-        if (!strftime (nlbuf, sizeof nlbuf, "%b", &tmm))
+        if (!strftime (buf, sizeof result[0], "%b", &tmm))
           return (char *) abmonths[item - ABMON_1];
-        return nlbuf;
+        strcpy (result[item - ABMON_1], buf);
+        return result[item - ABMON_1];
       }
     case ERA:
       return (char *) "";
index 1dd49c0..7f258e8 100644 (file)
@@ -1,27 +1,25 @@
-/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   The GNU C Library is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifdef _LIBC
 # define USE_IN_EXTENDED_LOCALE_MODEL 1
 # define HAVE_STRUCT_ERA_ENTRY 1
 # define HAVE_TM_GMTOFF 1
-# define HAVE_TM_ZONE 1
+# define HAVE_STRUCT_TM_TM_ZONE 1
 # define HAVE_TZNAME 1
-# define HAVE_TZSET 1
 # include "../locale/localeinfo.h"
 #else
 # include <config.h>
@@ -34,6 +32,7 @@
 #endif
 
 #include <ctype.h>
+#include <errno.h>
 #include <time.h>
 
 #if HAVE_TZNAME && !HAVE_DECL_TZNAME
@@ -68,13 +67,8 @@ extern char *tzname[];
 #include <string.h>
 #include <stdbool.h>
 
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
-#endif
+#include "attribute.h"
+#include <intprops.h>
 
 #ifdef COMPILE_WIDE
 # include <endian.h>
@@ -111,14 +105,7 @@ extern char *tzname[];
 #define SHR(a, b)       \
   (-1 >> 1 == -1        \
    ? (a) >> (b)         \
-   : (a) / (1 << (b)) - ((a) % (1 << (b)) < 0))
-
-/* Bound on length of the string representing an integer type or expression T.
-   Subtract 1 for the sign bit if t is signed; log10 (2.0) < 146/485;
-   add 1 for integer division truncation; add 1 more for a minus sign
-   if needed.  */
-#define INT_STRLEN_BOUND(t) \
-  ((sizeof (t) * CHAR_BIT - 1) * 146 / 485 + 2)
+   : ((a) + ((a) < 0)) / (1 << (b)) - ((a) < 0))
 
 #define TM_YEAR_BASE 1900
 
@@ -167,20 +154,24 @@ extern char *tzname[];
 # define advance(P, N) ((P) += (N))
 #endif
 
-#define add(n, f)                                                             \
+#define add(n, f) width_add (width, n, f)
+#define width_add(width, n, f)                                                \
   do                                                                          \
     {                                                                         \
       size_t _n = (n);                                                        \
-      size_t _w = (width < 0 ? 0 : width);                                    \
+      size_t _w = pad == L_('-') || width < 0 ? 0 : width;                    \
       size_t _incr = _n < _w ? _w : _n;                                       \
       if (_incr >= maxsize - i)                                               \
-        return 0;                                                             \
+        {                                                                     \
+          errno = ERANGE;                                                     \
+          return 0;                                                           \
+        }                                                                     \
       if (p)                                                                  \
         {                                                                     \
-          if (digits == 0 && _n < _w)                                         \
+          if (_n < _w)                                                        \
             {                                                                 \
-              size_t _delta = width - _n;                                     \
-              if (pad == L_('0'))                                             \
+              size_t _delta = _w - _n;                                        \
+              if (pad == L_('0') || pad == L_('+'))                           \
                 memset_zero (p, _delta);                                      \
               else                                                            \
                 memset_space (p, _delta);                                     \
@@ -191,15 +182,17 @@ extern char *tzname[];
       i += _incr;                                                             \
     } while (0)
 
+#define add1(c) width_add1 (width, c)
 #if FPRINTFTIME
-# define add1(C) add (1, fputc (C, p))
+# define width_add1(width, c) width_add (width, 1, fputc (c, p))
 #else
-# define add1(C) add (1, *p = C)
+# define width_add1(width, c) width_add (width, 1, *p = c)
 #endif
 
+#define cpy(n, s) width_cpy (width, n, s)
 #if FPRINTFTIME
-# define cpy(n, s) \
-    add ((n),                                                                 \
+# define width_cpy(width, n, s)                                               \
+    width_add (width, n,                                                      \
      do                                                                       \
        {                                                                      \
          if (to_lowcase)                                                      \
@@ -219,8 +212,8 @@ extern char *tzname[];
      while (0)                                                                \
     )
 #else
-# define cpy(n, s)                                                            \
-    add ((n),                                                                 \
+# define width_cpy(width, n, s)                                               \
+    width_add (width, n,                                                      \
          if (to_lowcase)                                                      \
            memcpy_lowcase (p, (s), _n LOCALE_ARG);                            \
          else if (to_uppcase)                                                 \
@@ -350,8 +343,8 @@ tm_diff (const struct tm *a, const struct tm *b)
      but it's OK to assume that A and B are close to each other.  */
   int a4 = SHR (a->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (a->tm_year & 3);
   int b4 = SHR (b->tm_year, 2) + SHR (TM_YEAR_BASE, 2) - ! (b->tm_year & 3);
-  int a100 = a4 / 25 - (a4 % 25 < 0);
-  int b100 = b4 / 25 - (b4 % 25 < 0);
+  int a100 = (a4 + (a4 < 0)) / 25 - (a4 < 0);
+  int b100 = (b4 + (b4 < 0)) / 25 - (b4 < 0);
   int a400 = SHR (a100, 2);
   int b400 = SHR (b100, 2);
   int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
@@ -374,7 +367,7 @@ tm_diff (const struct tm *a, const struct tm *b)
 #define ISO_WEEK1_WDAY 4 /* Thursday */
 #define YDAY_MINIMUM (-366)
 static int iso_week_days (int, int);
-#ifdef __GNUC__
+#if defined __GNUC__ || defined __clang__
 __inline__
 #endif
 static int
@@ -398,7 +391,6 @@ iso_week_days (int yday, int wday)
 #endif
 
 #ifdef my_strftime
-# undef HAVE_TZSET
 # define extra_args , tz, ns
 # define extra_args_spec , timezone_t tz, int ns
 #else
@@ -418,7 +410,7 @@ iso_week_days (int yday, int wday)
 
 static size_t __strftime_internal (STREAM_OR_CHAR_T *, STRFTIME_ARG (size_t)
                                    const CHAR_T *, const struct tm *,
-                                   bool, bool *
+                                   bool, int, int, bool *
                                    extra_args_spec LOCALE_PARAM);
 
 /* Write information from TP into S according to the format
@@ -433,20 +425,22 @@ my_strftime (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
              const struct tm *tp extra_args_spec LOCALE_PARAM)
 {
   bool tzset_called = false;
-  return __strftime_internal (s, STRFTIME_ARG (maxsize) format, tp,
-                              false, &tzset_called extra_args LOCALE_ARG);
+  return __strftime_internal (s, STRFTIME_ARG (maxsize) format, tp, false,
+                              0, -1, &tzset_called extra_args LOCALE_ARG);
 }
 #if defined _LIBC && ! FPRINTFTIME
 libc_hidden_def (my_strftime)
 #endif
 
-/* Just like my_strftime, above, but with two more parameters.
-   UPCASE indicate that the result should be converted to upper case,
-   and *TZSET_CALLED indicates whether tzset has been called here.  */
+/* Just like my_strftime, above, but with more parameters.
+   UPCASE indicates that the result should be converted to upper case.
+   YR_SPEC and WIDTH specify the padding and width for the year.
+   *TZSET_CALLED indicates whether tzset has been called here.  */
 static size_t
 __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
                      const CHAR_T *format,
-                     const struct tm *tp, bool upcase, bool *tzset_called
+                     const struct tm *tp, bool upcase,
+                     int yr_spec, int width, bool *tzset_called
                      extra_args_spec LOCALE_PARAM)
 {
 #if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL
@@ -456,6 +450,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
   size_t maxsize = (size_t) -1;
 #endif
 
+  int saved_errno = errno;
   int hour12 = tp->tm_hour;
 #ifdef _NL_CURRENT
   /* We cannot make the following values variables since we must delay
@@ -502,17 +497,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
   const char *format_end = NULL;
 #endif
 
-#if ! defined _LIBC && ! HAVE_RUN_TZSET_TEST
-  /* Solaris 2.5.x and 2.6 tzset sometimes modify the storage returned
-     by localtime.  On such systems, we must either use the tzset and
-     localtime wrappers to work around the bug (which sets
-     HAVE_RUN_TZSET_TEST) or make a copy of the structure.  */
-  struct tm copy = *tp;
-  tp = &copy;
-#endif
-
   zone = NULL;
-#if HAVE_TM_ZONE
+#if HAVE_STRUCT_TM_TM_ZONE
   /* The POSIX test suite assumes that setting
      the environment variable TZ to a new value before calling strftime()
      will influence the result (the %Z format) even if the information in
@@ -529,7 +515,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
     }
   else
     {
-# if !HAVE_TM_ZONE
+# if !HAVE_STRUCT_TM_TM_ZONE
       /* Infer the zone name from *TZ instead of from TZNAME.  */
       tzname_vec = tz->tzname_copy;
 # endif
@@ -539,7 +525,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
     {
       /* POSIX.1 requires that local time zone information be used as
          though strftime called tzset.  */
-# if HAVE_TZSET
+# ifndef my_strftime
       if (!*tzset_called)
         {
           tzset ();
@@ -558,9 +544,9 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
     if (hour12 == 0)
       hour12 = 12;
 
-  for (f = format; *f != '\0'; ++f)
+  for (f = format; *f != '\0'; width = -1, f++)
     {
-      int pad = 0;              /* Padding for number ('-', '_', or 0).  */
+      int pad = 0;  /* Padding for number ('_', '-', '+', '0', or 0).  */
       int modifier;             /* Field modifier ('E', 'O', or 0).  */
       int digits = 0;           /* Max digits for numeric format.  */
       int number_value;         /* Numeric value to be printed.  */
@@ -569,19 +555,18 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
       bool always_output_a_sign; /* +/- should always be output.  */
       int tz_colon_mask;        /* Bitmask of where ':' should appear.  */
       const CHAR_T *subfmt;
-      CHAR_T sign_char;
       CHAR_T *bufp;
       CHAR_T buf[1
                  + 2 /* for the two colons in a %::z or %:::z time zone */
                  + (sizeof (int) < sizeof (time_t)
                     ? INT_STRLEN_BOUND (time_t)
                     : INT_STRLEN_BOUND (int))];
-      int width = -1;
       bool to_lowcase = false;
       bool to_uppcase = upcase;
       size_t colons;
       bool change_case = false;
       int format_char;
+      int subwidth;
 
 #if DO_MULTIBYTE && !defined COMPILE_WIDE
       switch (*f)
@@ -679,6 +664,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
               /* This influences the number formats.  */
             case L_('_'):
             case L_('-'):
+            case L_('+'):
             case L_('0'):
               pad = *f;
               continue;
@@ -697,21 +683,14 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           break;
         }
 
-      /* As a GNU extension we allow the field width to be specified.  */
       if (ISDIGIT (*f))
         {
           width = 0;
           do
             {
-              if (width > INT_MAX / 10
-                  || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10))
-                /* Avoid overflow.  */
+              if (INT_MULTIPLY_WRAPV (width, 10, &width)
+                  || INT_ADD_WRAPV (width, *f - L_('0'), &width))
                 width = INT_MAX;
-              else
-                {
-                  width *= 10;
-                  width += *f - L_('0');
-                }
               ++f;
             }
           while (ISDIGIT (*f));
@@ -743,12 +722,16 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
             }                                                                 \
           while (0)
 #define DO_SIGNED_NUMBER(d, negative, v) \
+          DO_MAYBE_SIGNED_NUMBER (d, negative, v, do_signed_number)
+#define DO_YEARISH(d, negative, v) \
+          DO_MAYBE_SIGNED_NUMBER (d, negative, v, do_yearish)
+#define DO_MAYBE_SIGNED_NUMBER(d, negative, v, label) \
           do                                                                  \
             {                                                                 \
               digits = d;                                                     \
               negative_number = negative;                                     \
               u_number_value = v;                                             \
-              goto do_signed_number;                                          \
+              goto label;                                                     \
             }                                                                 \
           while (0)
 
@@ -850,7 +833,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           if (modifier == L_('O'))
             goto bad_format;
 #ifdef _NL_CURRENT
-          if (! (modifier == 'E'
+          if (! (modifier == L_('E')
                  && (*(subfmt =
                        (const CHAR_T *) _NL_CURRENT (LC_TIME,
                                                      NLW(ERA_D_T_FMT)))
@@ -861,15 +844,17 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 #endif
 
         subformat:
+          subwidth = -1;
+        subformat_width:
           {
             size_t len = __strftime_internal (NULL, STRFTIME_ARG ((size_t) -1)
-                                              subfmt,
-                                              tp, to_uppcase, tzset_called
+                                              subfmt, tp, to_uppcase,
+                                              pad, subwidth, tzset_called
                                               extra_args LOCALE_ARG);
             add (len, __strftime_internal (p,
                                            STRFTIME_ARG (maxsize - i)
-                                           subfmt,
-                                           tp, to_uppcase, tzset_called
+                                           subfmt, tp, to_uppcase,
+                                           pad, subwidth, tzset_called
                                            extra_args LOCALE_ARG));
           }
           break;
@@ -928,9 +913,11 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
             }
 
           {
-            int century = tp->tm_year / 100 + TM_YEAR_BASE / 100;
-            century -= tp->tm_year % 100 < 0 && 0 < century;
-            DO_SIGNED_NUMBER (2, tp->tm_year < - TM_YEAR_BASE, century);
+            bool negative_year = tp->tm_year < - TM_YEAR_BASE;
+            bool zero_thru_1899 = !negative_year & (tp->tm_year < 0);
+            int century = ((tp->tm_year - 99 * zero_thru_1899) / 100
+                           + TM_YEAR_BASE / 100);
+            DO_YEARISH (2, negative_year, century);
           }
 
         case L_('x'):
@@ -939,7 +926,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 #ifdef _NL_CURRENT
           if (! (modifier == L_('E')
                  && (*(subfmt =
-                       (const CHAR_T *)_NL_CURRENT (LC_TIME, NLW(ERA_D_FMT)))
+                       (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ERA_D_FMT)))
                      != L_('\0'))))
             subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(D_FMT));
           goto subformat;
@@ -971,9 +958,17 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           always_output_a_sign = true;
           goto do_number_body;
 
+        do_yearish:
+          if (pad == 0)
+            pad = yr_spec;
+          always_output_a_sign
+            = (pad == L_('+')
+               && ((digits == 2 ? 99 : 9999) < u_number_value
+                   || digits < width));
+          goto do_maybe_signed_number;
+
         do_number_spacepad:
-          /* Force '_' flag unless overridden by '0' or '-' flag.  */
-          if (pad != L_('0') && pad != L_('-'))
+          if (pad == 0)
             pad = L_('_');
 
         do_number:
@@ -983,6 +978,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 
         do_signed_number:
           always_output_a_sign = false;
+
+        do_maybe_signed_number:
           tz_colon_mask = 0;
 
         do_number_body:
@@ -1029,66 +1026,52 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           while (u_number_value != 0 || tz_colon_mask != 0);
 
         do_number_sign_and_padding:
-          if (digits < width)
-            digits = width;
-
-          sign_char = (negative_number ? L_('-')
-                       : always_output_a_sign ? L_('+')
-                       : 0);
+          if (pad == 0)
+            pad = L_('0');
+          if (width < 0)
+            width = digits;
 
-          if (pad == L_('-'))
-            {
-              if (sign_char)
-                add1 (sign_char);
-            }
-          else
-            {
-              int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0]))
-                                      - bufp) - !!sign_char;
-
-              if (padding > 0)
-                {
-                  if (pad == L_('_'))
-                    {
-                      if ((size_t) padding >= maxsize - i)
-                        return 0;
-
-                      if (p)
-                        memset_space (p, padding);
-                      i += padding;
-                      width = width > padding ? width - padding : 0;
-                      if (sign_char)
-                        add1 (sign_char);
-                    }
-                  else
-                    {
-                      if ((size_t) digits >= maxsize - i)
-                        return 0;
-
-                      if (sign_char)
-                        add1 (sign_char);
-
-                      if (p)
-                        memset_zero (p, padding);
-                      i += padding;
-                      width = 0;
-                    }
-                }
-              else
-                {
-                  if (sign_char)
-                    add1 (sign_char);
-                }
-            }
+          {
+            CHAR_T sign_char = (negative_number ? L_('-')
+                                : always_output_a_sign ? L_('+')
+                                : 0);
+            int numlen = buf + sizeof buf / sizeof buf[0] - bufp;
+            int shortage = width - !!sign_char - numlen;
+            int padding = pad == L_('-') || shortage <= 0 ? 0 : shortage;
+
+            if (sign_char)
+              {
+                if (pad == L_('_'))
+                  {
+                    if (p)
+                      memset_space (p, padding);
+                    i += padding;
+                    width -= padding;
+                  }
+                width_add1 (0, sign_char);
+                width--;
+              }
 
-          cpy (buf + sizeof (buf) / sizeof (buf[0]) - bufp, bufp);
+            cpy (numlen, bufp);
+          }
           break;
 
         case L_('F'):
           if (modifier != 0)
             goto bad_format;
+          if (pad == 0 && width < 0)
+            {
+              pad = L_('+');
+              subwidth = 4;
+            }
+          else
+            {
+              subwidth = width - 6;
+              if (subwidth < 0)
+                subwidth = 0;
+            }
           subfmt = L_("%Y-%m-%d");
-          goto subformat;
+          goto subformat_width;
 
         case L_('H'):
           if (modifier == L_('E'))
@@ -1136,19 +1119,21 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
         case L_('N'):           /* GNU extension.  */
           if (modifier == L_('E'))
             goto bad_format;
-
-          number_value = ns;
-          if (width == -1)
-            width = 9;
-          else
-            {
-              /* Take an explicit width less than 9 as a precision.  */
-              int j;
-              for (j = width; j < 9; j++)
-                number_value /= 10;
-            }
-
-          DO_NUMBER (width, number_value);
+          {
+            int n = ns, ns_digits = 9;
+            if (width <= 0)
+              width = ns_digits;
+            int ndigs = ns_digits;
+            while (width < ndigs || (1 < ndigs && n % 10 == 0))
+              ndigs--, n /= 10;
+            for (int j = ndigs; 0 < j; j--)
+              buf[j - 1] = n % 10 + L_('0'), n /= 10;
+            if (!pad)
+              pad = L_('0');
+            width_cpy (0, ndigs, buf);
+            width_add (width - ndigs, 0, (void) 0);
+          }
+          break;
 #endif
 
         case L_('n'):
@@ -1205,7 +1190,13 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
             time_t t;
 
             ltm = *tp;
+            ltm.tm_yday = -1;
             t = mktime_z (tz, &ltm);
+            if (ltm.tm_yday < 0)
+              {
+                errno = EOVERFLOW;
+                return 0;
+              }
 
             /* Generate string value for T using time_t arithmetic;
                this works even if sizeof (long) < sizeof (time_t).  */
@@ -1297,17 +1288,18 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
               case L_('g'):
                 {
                   int yy = (tp->tm_year % 100 + year_adjust) % 100;
-                  DO_NUMBER (2, (0 <= yy
-                                 ? yy
-                                 : tp->tm_year < -TM_YEAR_BASE - year_adjust
-                                 ? -yy
-                                 : yy + 100));
+                  DO_YEARISH (2, false,
+                              (0 <= yy
+                               ? yy
+                               : tp->tm_year < -TM_YEAR_BASE - year_adjust
+                               ? -yy
+                               : yy + 100));
                 }
 
               case L_('G'):
-                DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE - year_adjust,
-                                  (tp->tm_year + (unsigned int) TM_YEAR_BASE
-                                   + year_adjust));
+                DO_YEARISH (4, tp->tm_year < -TM_YEAR_BASE - year_adjust,
+                            (tp->tm_year + (unsigned int) TM_YEAR_BASE
+                             + year_adjust));
 
               default:
                 DO_NUMBER (2, days / 7 + 1);
@@ -1327,7 +1319,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           DO_NUMBER (1, tp->tm_wday);
 
         case L_('Y'):
-          if (modifier == 'E')
+          if (modifier == L_('E'))
             {
 #if HAVE_STRUCT_ERA_ENTRY
               struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
@@ -1338,6 +1330,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 # else
                   subfmt = era->era_format;
 # endif
+                  if (pad == 0)
+                    pad = yr_spec;
                   goto subformat;
                 }
 #else
@@ -1347,8 +1341,8 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
           if (modifier == L_('O'))
             goto bad_format;
 
-          DO_SIGNED_NUMBER (4, tp->tm_year < -TM_YEAR_BASE,
-                            tp->tm_year + (unsigned int) TM_YEAR_BASE);
+          DO_YEARISH (4, tp->tm_year < -TM_YEAR_BASE,
+                      tp->tm_year + (unsigned int) TM_YEAR_BASE);
 
         case L_('y'):
           if (modifier == L_('E'))
@@ -1358,7 +1352,9 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
               if (era)
                 {
                   int delta = tp->tm_year - era->start_date[0];
-                  DO_NUMBER (1, (era->offset
+                  if (pad == 0)
+                    pad = yr_spec;
+                  DO_NUMBER (2, (era->offset
                                  + delta * era->absolute_direction));
                 }
 #else
@@ -1370,7 +1366,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
             int yy = tp->tm_year % 100;
             if (yy < 0)
               yy = tp->tm_year < - TM_YEAR_BASE ? -yy : yy + 100;
-            DO_NUMBER (2, yy);
+            DO_YEARISH (2, false, yy);
           }
 
         case L_('Z'):
@@ -1429,7 +1425,7 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
 
                 /* POSIX.1 requires that local time zone information be used as
                    though strftime called tzset.  */
-# if HAVE_TZSET
+# ifndef my_strftime
                 if (!*tzset_called)
                   {
                     tzset ();
@@ -1498,5 +1494,6 @@ __strftime_internal (STREAM_OR_CHAR_T *s, STRFTIME_ARG (size_t maxsize)
     *p = L_('\0');
 #endif
 
+  errno = saved_errno;
   return i;
 }
index 96082aa..b12ff2f 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert 'off_t' integer to printable string.
+
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define anytostr offtostr
 #define inttype off_t
 #include "anytostr.c"
index 792e258..372cda8 100644 (file)
@@ -1,17 +1,17 @@
 /* Open a descriptor to a file.
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
 static int
 orig_open (const char *filename, int flags, mode_t mode)
 {
+#if defined _WIN32 && !defined __CYGWIN__
+  return _open (filename, flags, mode);
+#else
   return open (filename, flags, mode);
+#endif
 }
 
 /* Specification.  */
@@ -92,28 +96,27 @@ open (const char *filename, int flags, ...)
 #endif
 
 #if OPEN_TRAILING_SLASH_BUG
-  /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
-     is specified, then fail.
-     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
-     says that
-       "A pathname that contains at least one non-slash character and that
-        ends with one or more trailing slashes shall be resolved as if a
-        single dot character ( '.' ) were appended to the pathname."
-     and
-       "The special filename dot shall refer to the directory specified by
-        its predecessor."
+  /* Fail if one of O_CREAT, O_WRONLY, O_RDWR is specified and the filename
+     ends in a slash, as POSIX says such a filename must name a directory
+     <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>:
+       "A pathname that contains at least one non-<slash> character and that
+        ends with one or more trailing <slash> characters shall not be resolved
+        successfully unless the last pathname component before the trailing
+        <slash> characters names an existing directory"
      If the named file already exists as a directory, then
        - if O_CREAT is specified, open() must fail because of the semantics
          of O_CREAT,
        - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
-         <http://www.opengroup.org/susv3/functions/open.html> says that it
-         fails with errno = EISDIR in this case.
+         <https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html>
+         says that it fails with errno = EISDIR in this case.
      If the named file does not exist or does not name a directory, then
        - if O_CREAT is specified, open() must fail since open() cannot create
          directories,
        - if O_WRONLY or O_RDWR is specified, open() must fail because the
          file does not contain a '.' directory.  */
-  if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+  if ((flags & O_CREAT)
+      || (flags & O_ACCMODE) == O_RDWR
+      || (flags & O_ACCMODE) == O_WRONLY)
     {
       size_t len = strlen (filename);
       if (len > 0 && filename[len - 1] == '/')
@@ -125,7 +128,7 @@ open (const char *filename, int flags, ...)
 #endif
 
   fd = orig_open (filename,
-                  flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode);
+                  flags & ~(have_cloexec < 0 ? O_CLOEXEC : 0), mode);
 
   if (flags & O_CLOEXEC)
     {
@@ -171,14 +174,12 @@ open (const char *filename, int flags, ...)
 #if OPEN_TRAILING_SLASH_BUG
   /* If the filename ends in a slash and fd does not refer to a directory,
      then fail.
-     Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
-     says that
-       "A pathname that contains at least one non-slash character and that
-        ends with one or more trailing slashes shall be resolved as if a
-        single dot character ( '.' ) were appended to the pathname."
-     and
-       "The special filename dot shall refer to the directory specified by
-        its predecessor."
+     Rationale: POSIX says such a filename must name a directory
+     <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>:
+       "A pathname that contains at least one non-<slash> character and that
+        ends with one or more trailing <slash> characters shall not be resolved
+        successfully unless the last pathname component before the trailing
+        <slash> characters names an existing directory"
      If the named file without the slash is not a directory, open() must fail
      with ENOTDIR.  */
   if (fd >= 0)
index 7052e6a..716f4a9 100644 (file)
@@ -1,26 +1,26 @@
 /* Define PATH_MAX somehow.  Requires sys/types.h.
-   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2018 Free Software
+   Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _PATHMAX_H
 # define _PATHMAX_H
 
 /* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
    including the terminating NUL byte.
-   <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
+   <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
    PATH_MAX is not defined on systems which have no limit on filename length,
    such as GNU/Hurd.
 
@@ -68,7 +68,7 @@
 # if defined _WIN32 && ! defined __CYGWIN__
 /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com,
    section "Maximum Path Length Limitation",
-   <https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath>
+   <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#maximum-path-length-limitation>
    explains that the maximum size of a filename, including the terminating
    NUL byte, is 260 = 3 + 256 + 1.
    This is the same value as
index e34607f..3751ae0 100644 (file)
@@ -1,6 +1,6 @@
 /* Parse arguments from a string and prepend them to an argv.
 
-   Copyright (C) 1999-2002, 2006, 2009-2013, 2015-2018 Free Software
+   Copyright (C) 1999-2002, 2006, 2009-2013, 2015-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -52,16 +52,16 @@ prepend_args (char const *options, char *buf, char **argv)
   for (;;)
     {
       while (ISSPACE ((unsigned char) *o))
-       o++;
+        o++;
       if (!*o)
-       return n;
+        return n;
       if (argv)
-       argv[n] = b;
+        argv[n] = b;
       n++;
 
       do
-       if ((*b++ = *o++) == '\\' && *o)
-         b[-1] = *o++;
+        if ((*b++ = *o++) == '\\' && *o)
+          b[-1] = *o++;
       while (*o && ! ISSPACE ((unsigned char) *o));
 
       *b++ = '\0';
@@ -86,6 +86,6 @@ prepend_default_options (char const *options, int *pargc, char ***pargv)
       *pp++ = *argv++;
       pp += prepend_args (options, buf, pp);
       while ((*pp++ = *argv++))
-       continue;
+        continue;
     }
 }
index 1079e0a..b822682 100644 (file)
@@ -1,19 +1,19 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2018 Free Software
+   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
@@ -65,14 +65,12 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
       case TYPE_ULONGINT:
         ap->a.a_ulongint = va_arg (args, unsigned long int);
         break;
-#if HAVE_LONG_LONG_INT
       case TYPE_LONGLONGINT:
         ap->a.a_longlongint = va_arg (args, long long int);
         break;
       case TYPE_ULONGLONGINT:
         ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
         break;
-#endif
       case TYPE_DOUBLE:
         ap->a.a_double = va_arg (args, double);
         break;
@@ -135,11 +133,9 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
       case TYPE_COUNT_LONGINT_POINTER:
         ap->a.a_count_longint_pointer = va_arg (args, long int *);
         break;
-#if HAVE_LONG_LONG_INT
       case TYPE_COUNT_LONGLONGINT_POINTER:
         ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
         break;
-#endif
 #if ENABLE_UNISTDIO
       /* The unistdio extensions.  */
       case TYPE_U8_STRING:
index 111e8a5..c8d9174 100644 (file)
@@ -1,19 +1,19 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2018 Free Software
+   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _PRINTF_ARGS_H
 #define _PRINTF_ARGS_H
@@ -57,10 +57,8 @@ typedef enum
   TYPE_UINT,
   TYPE_LONGINT,
   TYPE_ULONGINT,
-#if HAVE_LONG_LONG_INT
   TYPE_LONGLONGINT,
   TYPE_ULONGLONGINT,
-#endif
   TYPE_DOUBLE,
   TYPE_LONGDOUBLE,
   TYPE_CHAR,
@@ -75,10 +73,8 @@ typedef enum
   TYPE_COUNT_SCHAR_POINTER,
   TYPE_COUNT_SHORT_POINTER,
   TYPE_COUNT_INT_POINTER,
-  TYPE_COUNT_LONGINT_POINTER
-#if HAVE_LONG_LONG_INT
-, TYPE_COUNT_LONGLONGINT_POINTER
-#endif
+  TYPE_COUNT_LONGINT_POINTER,
+  TYPE_COUNT_LONGLONGINT_POINTER
 #if ENABLE_UNISTDIO
   /* The unistdio extensions.  */
 , TYPE_U8_STRING
@@ -101,10 +97,8 @@ typedef struct
     unsigned int                a_uint;
     long int                    a_longint;
     unsigned long int           a_ulongint;
-#if HAVE_LONG_LONG_INT
     long long int               a_longlongint;
     unsigned long long int      a_ulonglongint;
-#endif
     float                       a_float;
     double                      a_double;
     long double                 a_longdouble;
@@ -121,9 +115,7 @@ typedef struct
     short *                     a_count_short_pointer;
     int *                       a_count_int_pointer;
     long int *                  a_count_longint_pointer;
-#if HAVE_LONG_LONG_INT
     long long int *             a_count_longlongint_pointer;
-#endif
 #if ENABLE_UNISTDIO
     /* The unistdio extensions.  */
     const uint8_t *             a_u8_string;
index e625145..f21cc17 100644 (file)
@@ -1,18 +1,18 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002-2003, 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      CHAR_T             The element type of the format string.
 #include <stddef.h>
 
 /* Get intmax_t.  */
-#if defined IN_LIBINTL || defined IN_LIBASPRINTF
-# if HAVE_STDINT_H_WITH_UINTMAX
-#  include <stdint.h>
-# endif
-# if HAVE_INTTYPES_H_WITH_UINTMAX
-#  include <inttypes.h>
-# endif
-#else
-# include <stdint.h>
-#endif
+#include <stdint.h>
 
 /* malloc(), realloc(), free().  */
 #include <stdlib.h>
@@ -447,14 +438,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
               switch (c)
                 {
                 case 'd': case 'i':
-#if HAVE_LONG_LONG_INT
-                  /* If 'long long' exists and is larger than 'long':  */
+                  /* If 'long long' is larger than 'long':  */
                   if (flags >= 16 || (flags & 4))
                     type = TYPE_LONGLONGINT;
                   else
-#endif
-                  /* If 'long long' exists and is the same as 'long', we parse
-                     "lld" into TYPE_LONGINT.  */
+                  /* If 'long long' is the same as 'long', we parse "lld" into
+                     TYPE_LONGINT.  */
                   if (flags >= 8)
                     type = TYPE_LONGINT;
                   else if (flags & 2)
@@ -465,14 +454,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                     type = TYPE_INT;
                   break;
                 case 'o': case 'u': case 'x': case 'X':
-#if HAVE_LONG_LONG_INT
-                  /* If 'long long' exists and is larger than 'long':  */
+                  /* If 'unsigned long long' is larger than 'unsigned long':  */
                   if (flags >= 16 || (flags & 4))
                     type = TYPE_ULONGLONGINT;
                   else
-#endif
-                  /* If 'unsigned long long' exists and is the same as
-                     'unsigned long', we parse "llu" into TYPE_ULONGINT.  */
+                  /* If 'unsigned long long' is the same as 'unsigned long', we
+                     parse "llu" into TYPE_ULONGINT.  */
                   if (flags >= 8)
                     type = TYPE_ULONGINT;
                   else if (flags & 2)
@@ -525,14 +512,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                   type = TYPE_POINTER;
                   break;
                 case 'n':
-#if HAVE_LONG_LONG_INT
-                  /* If 'long long' exists and is larger than 'long':  */
+                  /* If 'long long' is larger than 'long':  */
                   if (flags >= 16 || (flags & 4))
                     type = TYPE_COUNT_LONGLONGINT_POINTER;
                   else
-#endif
-                  /* If 'long long' exists and is the same as 'long', we parse
-                     "lln" into TYPE_COUNT_LONGINT_POINTER.  */
+                  /* If 'long long' is the same as 'long', we parse "lln" into
+                     TYPE_COUNT_LONGINT_POINTER.  */
                   if (flags >= 8)
                     type = TYPE_COUNT_LONGINT_POINTER;
                   else if (flags & 2)
index 16d817e..77b7409 100644 (file)
@@ -1,19 +1,19 @@
 /* Parse printf format string.
-   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2018 Free Software
+   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2021 Free Software
    Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _PRINTF_PARSE_H
 #define _PRINTF_PARSE_H
index 382f503..fd7acae 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001-2003, 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
index adc6b01..bf3513d 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
index 85462aa..561566b 100644 (file)
@@ -1,5 +1,5 @@
 /* Localization of proper names.
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
index 9c8ec93..ee09d7c 100644 (file)
@@ -1,5 +1,5 @@
 /* Localization of proper names.  -*- coding: utf-8 -*-
-   Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -51,7 +51,7 @@
    output will look like this:
       <translated name> (<original name in English>)
 
-   To use the 'propername' module requires three simple steps:
+   To use the 'propername' module requires two simple steps:
 
      1) Add it to the list of gnulib modules to import,
 
 
         (Optionally, here you can also add / * TRANSLATORS: ... * / comments
         explaining how the name is written or pronounced.)
-
-     3) If you are using GNU gettext version 0.16.1 or older, in po/Makevars,
-        in the definition of the XGETTEXT_OPTIONS variable, add:
-
-           --keyword='proper_name:1,"This is a proper name. See the gettext manual, section Names."'
-           --keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."'
-
-        This specifies automatic comments for the translator. (Requires
-        xgettext >= 0.15. The double-quotes inside the quoted string are on
-        purpose: they are part of the --keyword argument syntax.)
  */
 
 #ifndef _PROPERNAME_H
index eedc283..3204997 100644 (file)
@@ -1,6 +1,6 @@
 /* quote.h - prototypes for quote.c
 
-   Copyright (C) 1998-2001, 2003, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2001, 2003, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index fe68dca..5704689 100644 (file)
@@ -1,6 +1,6 @@
 /* quotearg.c - quote arguments for output
 
-   Copyright (C) 1998-2002, 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002, 2004-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,7 @@
 #include "quotearg.h"
 #include "quote.h"
 
+#include "attribute.h"
 #include "minmax.h"
 #include "xalloc.h"
 #include "c-strcaseeq.h"
 
 #define INT_BITS (sizeof (int) * CHAR_BIT)
 
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
-#endif
-
 struct quoting_options
 {
   /* Basic quoting style.  */
@@ -871,7 +864,8 @@ quotearg_free (void)
    OPTIONS specifies the quoting options.
    The returned value points to static storage that can be
    reused by the next call to this function with the same value of N.
-   N must be nonnegative.  N is deliberately declared with type "int"
+   N must be nonnegative; it is typically small, and must be
+   less than MIN (INT_MAX, IDX_MAX).  The type of N is signed
    to allow for future extensions (using negative values).  */
 static char *
 quotearg_n_options (int n, char const *arg, size_t argsize,
@@ -881,22 +875,21 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
 
   struct slotvec *sv = slotvec;
 
-  if (n < 0)
+  int nslots_max = MIN (INT_MAX, IDX_MAX);
+  if (! (0 <= n && n < nslots_max))
     abort ();
 
   if (nslots <= n)
     {
       bool preallocated = (sv == &slotvec0);
-      int nmax = MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) - 1;
-
-      if (nmax < n)
-        xalloc_die ();
+      idx_t new_nslots = nslots;
 
-      slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
+      slotvec = sv = xpalloc (preallocated ? NULL : sv, &new_nslots,
+                              n - nslots + 1, nslots_max, sizeof *sv);
       if (preallocated)
         *sv = slotvec0;
-      memset (sv + nslots, 0, (n + 1 - nslots) * sizeof *sv);
-      nslots = n + 1;
+      memset (sv + nslots, 0, (new_nslots - nslots) * sizeof *sv);
+      nslots = new_nslots;
     }
 
   {
index 0584c56..ecef74f 100644 (file)
@@ -1,6 +1,6 @@
 /* quotearg.h - quote arguments for output
 
-   Copyright (C) 1998-2002, 2004, 2006, 2008-2018 Free Software Foundation,
+   Copyright (C) 1998-2002, 2004, 2006, 2008-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -22,6 +22,7 @@
 # define QUOTEARG_H_ 1
 
 # include <stddef.h>
+# include <stdlib.h>
 
 /* Basic quoting styles.  For each style, an example is given on the
    input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using
@@ -275,8 +276,9 @@ struct quoting_options;
 /* Allocate a new set of quoting options, with contents initially identical
    to O if O is not null, or to the default if O is null.
    It is the caller's responsibility to free the result.  */
-struct quoting_options *clone_quoting_options (struct quoting_options *o);
-
+struct quoting_options *clone_quoting_options (struct quoting_options *o)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
 /* Get the value of O's quoting style.  If O is null, use the default.  */
 enum quoting_style get_quoting_style (struct quoting_options const *o);
 
@@ -323,7 +325,7 @@ void set_custom_quoting (struct quoting_options *o,
    On output, BUFFER might contain embedded null bytes if ARGSIZE was
    not -1, the style of O does not use backslash escapes, and the
    flags of O do not request elision of null bytes.*/
-size_t quotearg_buffer (char *buffer, size_t buffersize,
+size_t quotearg_buffer (char *restrict buffer, size_t buffersize,
                         char const *arg, size_t argsize,
                         struct quoting_options const *o);
 
index 8a93bea..37c100d 100644 (file)
@@ -1,18 +1,18 @@
 /* Provide a non-threads replacement for the POSIX raise function.
 
-   Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering and Bruno Haible */
index 912bfeb..896d435 100644 (file)
@@ -1,17 +1,17 @@
 /* Searching in a string.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -19,6 +19,9 @@
 /* Specification.  */
 #include <string.h>
 
+/* A function definition is only needed if HAVE_RAWMEMCHR is not defined.  */
+#if !HAVE_RAWMEMCHR
+
 /* Find the first occurrence of C in S.  */
 void *
 rawmemchr (const void *s, int c_in)
@@ -134,3 +137,5 @@ rawmemchr (const void *s, int c_in)
     char_ptr++;
   return (void *) char_ptr;
 }
+
+#endif
index 6363923..d489c32 100644 (file)
@@ -1,4 +1,20 @@
 # Suppress a valgrind message about use of uninitialized memory in rawmemchr().
+
+# Copyright (C) 2008-2021 Free Software Foundation, Inc.
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
 # This use is OK because it provides only a speedup.
 {
     rawmemchr-value4
index 924e00d..d4f4b08 100644 (file)
@@ -1,17 +1,17 @@
-/* Stub for readlink().
-   Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc.
+/* Read the contents of a symbolic link.
+   Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -29,7 +29,7 @@
    such as DJGPP 2.03 and mingw32.  */
 
 ssize_t
-readlink (const char *name, char *buf _GL_UNUSED,
+readlink (char const *file, char *buf _GL_UNUSED,
           size_t bufsize _GL_UNUSED)
 {
   struct stat statbuf;
@@ -37,7 +37,7 @@ readlink (const char *name, char *buf _GL_UNUSED,
   /* In general we should use lstat() here, not stat().  But on platforms
      without symbolic links, lstat() - if it exists - would be equivalent to
      stat(), therefore we can use stat().  This saves us a configure check.  */
-  if (stat (name, &statbuf) >= 0)
+  if (stat (file, &statbuf) >= 0)
     errno = EINVAL;
   return -1;
 }
@@ -51,24 +51,54 @@ readlink (const char *name, char *buf _GL_UNUSED,
    for Solaris 9.  */
 
 ssize_t
-rpl_readlink (const char *name, char *buf, size_t bufsize)
+rpl_readlink (char const *file, char *buf, size_t bufsize)
 {
 # if READLINK_TRAILING_SLASH_BUG
-  size_t len = strlen (name);
-  if (len && name[len - 1] == '/')
+  size_t file_len = strlen (file);
+  if (file_len && file[file_len - 1] == '/')
     {
-      /* Even if name without the slash is a symlink to a directory,
+      /* Even if FILE without the slash is a symlink to a directory,
          both lstat() and stat() must resolve the trailing slash to
          the directory rather than the symlink.  We can therefore
          safely use stat() to distinguish between EINVAL and
          ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat().  */
       struct stat st;
-      if (stat (name, &st) == 0)
+      if (stat (file, &st) == 0 || errno == EOVERFLOW)
         errno = EINVAL;
       return -1;
     }
 # endif /* READLINK_TRAILING_SLASH_BUG */
-  return readlink (name, buf, bufsize);
+
+  ssize_t r = readlink (file, buf, bufsize);
+
+# if READLINK_TRUNCATE_BUG
+  if (r < 0 && errno == ERANGE)
+    {
+      /* Try again with a bigger buffer.  This is just for test cases;
+         real code invariably discards short reads.  */
+      char stackbuf[4032];
+      r = readlink (file, stackbuf, sizeof stackbuf);
+      if (r < 0)
+        {
+          if (errno == ERANGE)
+            {
+              /* Clear the buffer, which is good enough for real code.
+                 Thankfully, no test cases try short reads of enormous
+                 symlinks and what would be the point anyway?  */
+              r = bufsize;
+              memset (buf, 0, r);
+            }
+        }
+      else
+        {
+          if (bufsize < r)
+            r = bufsize;
+          memcpy (buf, stackbuf, r);
+        }
+    }
+# endif
+
+  return r;
 }
 
 #endif /* HAVE_READLINK */
diff --git a/lib/realloc.c b/lib/realloc.c
new file mode 100644 (file)
index 0000000..af03f0c
--- /dev/null
@@ -0,0 +1,63 @@
+/* realloc() function that is glibc compatible.
+
+   Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software
+   Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include <errno.h>
+
+#include "xalloc-oversized.h"
+
+/* Call the system's realloc below.  This file does not define
+   _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present.  */
+#undef realloc
+
+/* Change the size of an allocated block of memory P to N bytes,
+   with error checking.  If P is NULL, use malloc.  Otherwise if N is zero,
+   free P and return NULL.  */
+
+void *
+rpl_realloc (void *p, size_t n)
+{
+  if (p == NULL)
+    return malloc (n);
+
+  if (n == 0)
+    {
+      free (p);
+      return NULL;
+    }
+
+  if (xalloc_oversized (n, 1))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  void *result = realloc (p, n);
+
+#if !HAVE_MALLOC_POSIX
+  if (result == NULL)
+    errno = ENOMEM;
+#endif
+
+  return result;
+}
diff --git a/lib/reallocarray.c b/lib/reallocarray.c
new file mode 100644 (file)
index 0000000..1fb2f3c
--- /dev/null
@@ -0,0 +1,39 @@
+/* reallocarray function that is glibc compatible.
+
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* written by Darshit Shah */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <errno.h>
+
+#include "intprops.h"
+
+void *
+reallocarray (void *ptr, size_t nmemb, size_t size)
+{
+  size_t nbytes;
+  if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes))
+    {
+      errno = ENOMEM;
+      return NULL;
+    }
+
+  /* Rely on the semantics of GNU realloc.  */
+  return realloc (ptr, nbytes);
+}
index 0b05a63..887e5b5 100644 (file)
@@ -1,19 +1,19 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -233,9 +233,7 @@ re_compile_pattern (const char *pattern, size_t length,
     return NULL;
   return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
 }
-#ifdef _LIBC
 weak_alias (__re_compile_pattern, re_compile_pattern)
-#endif
 
 /* Set by 're_set_syntax' to the current regexp syntax to recognize.  Can
    also be assigned to arbitrarily: each pattern buffer stores its own
@@ -260,9 +258,7 @@ re_set_syntax (reg_syntax_t syntax)
   re_syntax_options = syntax;
   return ret;
 }
-#ifdef _LIBC
 weak_alias (__re_set_syntax, re_set_syntax)
-#endif
 
 int
 re_compile_fastmap (struct re_pattern_buffer *bufp)
@@ -281,9 +277,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp)
   bufp->fastmap_accurate = 1;
   return 0;
 }
-#ifdef _LIBC
 weak_alias (__re_compile_fastmap, re_compile_fastmap)
-#endif
 
 static inline void
 __attribute__ ((always_inline))
@@ -464,7 +458,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
    the return codes and their meanings.)  */
 
 int
-regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
+regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)
 {
   reg_errcode_t ret;
   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -515,16 +509,14 @@ regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
 
   return (int) ret;
 }
-#ifdef _LIBC
 libc_hidden_def (__regcomp)
 weak_alias (__regcomp, regcomp)
-#endif
 
 /* Returns a message corresponding to an error code, ERRCODE, returned
    from either regcomp or regexec.   We don't use PREG here.  */
 
 size_t
-regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
+regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
          size_t errbuf_size)
 {
   const char *msg;
@@ -555,9 +547,7 @@ regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
 
   return msg_size;
 }
-#ifdef _LIBC
 weak_alias (__regerror, regerror)
-#endif
 
 
 #ifdef RE_ENABLE_I18N
@@ -568,7 +558,7 @@ weak_alias (__regerror, regerror)
 static const bitset_t utf8_sb_map =
 {
   /* Set the first 128 bits.  */
-# if defined __GNUC__ && !defined __STRICT_ANSI__
+# if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__
   [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
 # else
 #  if 4 * BITSET_WORD_BITS < ASCII_CHARS
@@ -657,10 +647,8 @@ regfree (regex_t *preg)
   re_free (preg->translate);
   preg->translate = NULL;
 }
-#ifdef _LIBC
 libc_hidden_def (__regfree)
 weak_alias (__regfree, regfree)
-#endif
 \f
 /* Entry points compatible with 4.2 BSD regex library.  We don't define
    them unless specifically requested.  */
@@ -1448,7 +1436,7 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
       break;
 
     case END_OF_RE:
-      assert (node->next == NULL);
+      DEBUG_ASSERT (node->next == NULL);
       break;
 
     case OP_DUP_ASTERISK:
@@ -1464,8 +1452,8 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
          right = node->right->first->node_idx;
        else
          right = node->next->node_idx;
-       assert (left > -1);
-       assert (right > -1);
+       DEBUG_ASSERT (left > -1);
+       DEBUG_ASSERT (right > -1);
        err = re_node_set_init_2 (dfa->edests + idx, left, right);
       }
       break;
@@ -1483,7 +1471,7 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
       break;
 
     default:
-      assert (!IS_EPSILON_NODE (node->token.type));
+      DEBUG_ASSERT (!IS_EPSILON_NODE (node->token.type));
       dfa->nexts[idx] = node->next->node_idx;
       break;
     }
@@ -1665,9 +1653,7 @@ calc_eclosure (re_dfa_t *dfa)
 {
   Idx node_idx;
   bool incomplete;
-#ifdef DEBUG
-  assert (dfa->nodes_len > 0);
-#endif
+  DEBUG_ASSERT (dfa->nodes_len > 0);
   incomplete = false;
   /* For each nodes, calculate epsilon closure.  */
   for (node_idx = 0; ; ++node_idx)
@@ -1682,9 +1668,7 @@ calc_eclosure (re_dfa_t *dfa)
          node_idx = 0;
        }
 
-#ifdef DEBUG
-      assert (dfa->eclosures[node_idx].nelem != -1);
-#endif
+      DEBUG_ASSERT (dfa->eclosures[node_idx].nelem != -1);
 
       /* If we have already calculated, skip it.  */
       if (dfa->eclosures[node_idx].nelem != 0)
@@ -1711,12 +1695,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
   reg_errcode_t err;
   Idx i;
   re_node_set eclosure;
-  bool ok;
   bool incomplete = false;
   err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
   if (__glibc_unlikely (err != REG_NOERROR))
     return err;
 
+  /* An epsilon closure includes itself.  */
+  eclosure.elems[eclosure.nelem++] = node;
+
   /* This indicates that we are calculating this node now.
      We reference this value to avoid infinite loop.  */
   dfa->eclosures[node].nelem = -1;
@@ -1769,10 +1755,6 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
          }
       }
 
-  /* An epsilon closure includes itself.  */
-  ok = re_node_set_insert (&eclosure, node);
-  if (__glibc_unlikely (! ok))
-    return REG_ESPACE;
   if (incomplete && !root)
     dfa->eclosures[node].nelem = 0;
   else
@@ -1812,8 +1794,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
   token->word_char = 0;
 #ifdef RE_ENABLE_I18N
   token->mb_partial = 0;
-  if (input->mb_cur_max > 1 &&
-      !re_string_first_byte (input, re_string_cur_idx (input)))
+  if (input->mb_cur_max > 1
+      && !re_string_first_byte (input, re_string_cur_idx (input)))
     {
       token->type = CHARACTER;
       token->mb_partial = 1;
@@ -2000,8 +1982,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
       token->type = OP_PERIOD;
       break;
     case '^':
-      if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
-         re_string_cur_idx (input) != 0)
+      if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE))
+         && re_string_cur_idx (input) != 0)
        {
          char prev = re_string_peek_byte (input, -1);
          if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
@@ -2011,8 +1993,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
       token->opr.ctx_type = LINE_FIRST;
       break;
     case '$':
-      if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
-         re_string_cur_idx (input) + 1 != re_string_length (input))
+      if (!(syntax & RE_CONTEXT_INDEP_ANCHORS)
+         && re_string_cur_idx (input) + 1 != re_string_length (input))
        {
          re_token_t next;
          re_string_skip_bytes (input, 1);
@@ -2046,8 +2028,8 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
   token->opr.c = c;
 
 #ifdef RE_ENABLE_I18N
-  if (input->mb_cur_max > 1 &&
-      !re_string_first_byte (input, re_string_cur_idx (input)))
+  if (input->mb_cur_max > 1
+      && !re_string_first_byte (input, re_string_cur_idx (input)))
     {
       token->type = CHARACTER;
       return 1;
@@ -2345,8 +2327,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
        }
       FALLTHROUGH;
     case OP_CLOSE_SUBEXP:
-      if ((token->type == OP_CLOSE_SUBEXP) &&
-         !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+      if ((token->type == OP_CLOSE_SUBEXP)
+         && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
        {
          *err = REG_ERPAREN;
          return NULL;
@@ -2454,9 +2436,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
 
     default:
       /* Must not happen?  */
-#ifdef DEBUG
-      assert (0);
-#endif
+      DEBUG_ASSERT (false);
       return NULL;
     }
   fetch_token (token, regexp, syntax);
@@ -3318,7 +3298,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
               goto parse_bracket_exp_free_return;
              break;
            default:
-             assert (0);
+             DEBUG_ASSERT (false);
              break;
            }
        }
@@ -3674,7 +3654,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
   Idx alloc = 0;
 #endif /* not RE_ENABLE_I18N */
   reg_errcode_t ret;
-  re_token_t br_token;
   bin_tree_t *tree;
 
   sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
@@ -3725,11 +3704,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
 #endif
 
   /* Build a tree for simple bracket.  */
-#if defined GCC_LINT || defined lint
-  memset (&br_token, 0, sizeof br_token);
-#endif
-  br_token.type = SIMPLE_BRACKET;
-  br_token.opr.sbcset = sbcset;
+  re_token_t br_token = { .type = SIMPLE_BRACKET, .opr.sbcset = sbcset };
   tree = create_token_tree (dfa, NULL, NULL, &br_token);
   if (__glibc_unlikely (tree == NULL))
     goto build_word_op_espace;
@@ -3820,11 +3795,7 @@ static bin_tree_t *
 create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
             re_token_type_t type)
 {
-  re_token_t t;
-#if defined GCC_LINT || defined lint
-  memset (&t, 0, sizeof t);
-#endif
-  t.type = type;
+  re_token_t t = { .type = type };
   return create_token_tree (dfa, left, right, &t);
 }
 
index 2a86e10..7296be0 100644 (file)
@@ -1,29 +1,31 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#define __STDC_WANT_IEC_60559_BFP_EXT__
+
 #ifndef _LIBC
 # include <libc-config.h>
 
-# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 6)
 #  pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
 # endif
-# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 3)
 #  pragma GCC diagnostic ignored "-Wold-style-definition"
 #  pragma GCC diagnostic ignored "-Wtype-limits"
 # endif
index f2ac950..8e4ef45 100644 (file)
@@ -1,19 +1,19 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1989-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -600,11 +600,9 @@ extern void re_set_registers (struct re_pattern_buffer *__buffer,
 #endif /* Use GNU */
 
 #if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_MISC)
-# ifndef _CRAY
 /* 4.2 bsd compatibility.  */
 extern char *re_comp (const char *);
 extern int re_exec (const char *);
-# endif
 #endif
 
 /* For plain 'restrict', use glibc's __restrict if defined.
@@ -614,7 +612,9 @@ extern int re_exec (const char *);
    'configure' might #define 'restrict' to those words, so pick a
    different name.  */
 #ifndef _Restrict_
-# if defined __restrict || 2 < __GNUC__ + (95 <= __GNUC_MINOR__)
+# if defined __restrict \
+     || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+     || __clang_major__ >= 3
 #  define _Restrict_ __restrict
 # elif 199901L <= __STDC_VERSION__ || defined restrict
 #  define _Restrict_ restrict
@@ -622,13 +622,18 @@ extern int re_exec (const char *);
 #  define _Restrict_
 # endif
 #endif
-/* For [restrict], use glibc's __restrict_arr if available.
-   Otherwise, GCC 3.1 (not in C++ mode) and C99 support [restrict].  */
+/* For the ISO C99 syntax
+     array_name[restrict]
+   use glibc's __restrict_arr if available.
+   Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
+   Other ISO C99 compilers support it as well.  */
 #ifndef _Restrict_arr_
 # ifdef __restrict_arr
 #  define _Restrict_arr_ __restrict_arr
-# elif ((199901L <= __STDC_VERSION__ || 3 < __GNUC__ + (1 <= __GNUC_MINOR__)) \
-        && !defined __GNUG__)
+# elif ((199901L <= __STDC_VERSION__ \
+         || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+         || __clang_major__ >= 3) \
+        && !defined __cplusplus)
 #  define _Restrict_arr_ _Restrict_
 # else
 #  define _Restrict_arr_
index f13def3..aefcfa2 100644 (file)
@@ -1,19 +1,19 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -212,7 +212,7 @@ build_wcs_buffer (re_string_t *pstr)
 {
 #ifdef _LIBC
   unsigned char buf[MB_LEN_MAX];
-  assert (MB_LEN_MAX >= pstr->mb_cur_max);
+  DEBUG_ASSERT (MB_LEN_MAX >= pstr->mb_cur_max);
 #else
   unsigned char buf[64];
 #endif
@@ -285,7 +285,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
   size_t mbclen;
 #ifdef _LIBC
   char buf[MB_LEN_MAX];
-  assert (MB_LEN_MAX >= pstr->mb_cur_max);
+  DEBUG_ASSERT (pstr->mb_cur_max <= MB_LEN_MAX);
 #else
   char buf[64];
 #endif
@@ -300,18 +300,20 @@ build_wcs_upper_buffer (re_string_t *pstr)
       while (byte_idx < end_idx)
        {
          wchar_t wc;
+         unsigned char ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
 
-         if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])
-             && mbsinit (&pstr->cur_state))
+         if (isascii (ch) && mbsinit (&pstr->cur_state))
            {
-             /* In case of a singlebyte character.  */
-             pstr->mbs[byte_idx]
-               = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
              /* The next step uses the assumption that wchar_t is encoded
                 ASCII-safe: all ASCII values can be converted like this.  */
-             pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
-             ++byte_idx;
-             continue;
+             wchar_t wcu = __towupper (ch);
+             if (isascii (wcu))
+               {
+                 pstr->mbs[byte_idx] = wcu;
+                 pstr->wcs[byte_idx] = wcu;
+                 byte_idx++;
+                 continue;
+               }
            }
 
          remain_len = end_idx - byte_idx;
@@ -348,7 +350,6 @@ build_wcs_upper_buffer (re_string_t *pstr)
            {
              /* It is an invalid character, an incomplete character
                 at the end of the string, or '\0'.  Just use the byte.  */
-             int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
              pstr->mbs[byte_idx] = ch;
              /* And also cast it to wide char.  */
              pstr->wcs[byte_idx++] = (wchar_t) ch;
@@ -685,9 +686,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
                         pstr->valid_len - offset);
              pstr->valid_len -= offset;
              pstr->valid_raw_len -= offset;
-#if defined DEBUG && DEBUG
-             assert (pstr->valid_len > 0);
-#endif
+             DEBUG_ASSERT (pstr->valid_len > 0);
            }
        }
       else
@@ -941,10 +940,7 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
       Idx wc_idx = idx;
       while(input->wcs[wc_idx] == WEOF)
        {
-#if defined DEBUG && DEBUG
-         /* It must not happen.  */
-         assert (wc_idx >= 0);
-#endif
+         DEBUG_ASSERT (wc_idx >= 0);
          --wc_idx;
          if (wc_idx < 0)
            return input->tip_context;
@@ -1215,6 +1211,10 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
 
   if (__glibc_unlikely (dest->nelem == 0))
     {
+      /* Although we already guaranteed above that dest->alloc != 0 and
+         therefore dest->elems != NULL, add a debug assertion to pacify
+         GCC 11.2.1's -fanalyzer.  */
+      DEBUG_ASSERT (dest->elems);
       dest->nelem = src->nelem;
       memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
       return REG_NOERROR;
@@ -1290,7 +1290,10 @@ re_node_set_insert (re_node_set *set, Idx elem)
 
   if (__glibc_unlikely (set->nelem) == 0)
     {
-      /* We already guaranteed above that set->alloc != 0.  */
+      /* Although we already guaranteed above that set->alloc != 0 and
+         therefore set->elems != NULL, add a debug assertion to pacify
+         GCC 11.2 -fanalyzer.  */
+      DEBUG_ASSERT (set->elems);
       set->elems[0] = elem;
       ++set->nelem;
       return true;
@@ -1311,7 +1314,6 @@ re_node_set_insert (re_node_set *set, Idx elem)
      first element separately to skip a check in the inner loop.  */
   if (elem < set->elems[0])
     {
-      idx = 0;
       for (idx = set->nelem; idx > 0; idx--)
        set->elems[idx] = set->elems[idx - 1];
     }
@@ -1319,6 +1321,7 @@ re_node_set_insert (re_node_set *set, Idx elem)
     {
       for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
        set->elems[idx] = set->elems[idx - 1];
+      DEBUG_ASSERT (set->elems[idx - 1] < elem);
     }
 
   /* Insert the new element.  */
@@ -1716,15 +1719,19 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
        {
          if (newstate->entrance_nodes == &newstate->nodes)
            {
-             newstate->entrance_nodes = re_malloc (re_node_set, 1);
-             if (__glibc_unlikely (newstate->entrance_nodes == NULL))
+             re_node_set *entrance_nodes = re_malloc (re_node_set, 1);
+             if (__glibc_unlikely (entrance_nodes == NULL))
                {
                  free_state (newstate);
                  return NULL;
                }
+             newstate->entrance_nodes = entrance_nodes;
              if (re_node_set_init_copy (newstate->entrance_nodes, nodes)
                  != REG_NOERROR)
-               return NULL;
+               {
+                 free_state (newstate);
+                 return NULL;
+               }
              nctx_nodes = 0;
              newstate->has_constraint = 1;
            }
index b0e49cd..1245e78 100644 (file)
@@ -1,26 +1,25 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
 #ifndef _REGEX_INTERNAL_H
 #define _REGEX_INTERNAL_H 1
 
-#include <assert.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdbool.h>
 #include <stdint.h>
 
+#ifndef _LIBC
+# include <dynarray.h>
+#endif
+
 #include <intprops.h>
+#include <verify.h>
+
+#if defined DEBUG && DEBUG != 0
+# include <assert.h>
+# define DEBUG_ASSERT(x) assert (x)
+#else
+# define DEBUG_ASSERT(x) assume (x)
+#endif
 
 #ifdef _LIBC
 # include <libc-lock.h>
 # define lock_fini(lock) ((void) 0)
 # define lock_lock(lock) __libc_lock_lock (lock)
 # define lock_unlock(lock) __libc_lock_unlock (lock)
-#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO
+#elif defined GNULIB_LOCK && !defined GNULIB_REGEX_SINGLE_THREAD
 # include "glthread/lock.h"
-  /* Use gl_lock_define if empty macro arguments are known to work.
-     Otherwise, fall back on less-portable substitutes.  */
-# if ((defined __GNUC__ && !defined __STRICT_ANSI__) \
-      || (defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__))
-#  define lock_define(name) gl_lock_define (, name)
-# elif USE_POSIX_THREADS
-#  define lock_define(name) pthread_mutex_t name;
-# elif USE_PTH_THREADS
-#  define lock_define(name) pth_mutex_t name;
-# elif USE_SOLARIS_THREADS
-#  define lock_define(name) mutex_t name;
-# elif USE_WINDOWS_THREADS
-#  define lock_define(name) gl_lock_t name;
-# else
-#  define lock_define(name)
-# endif
+# define lock_define(name) gl_lock_define (, name)
 # define lock_init(lock) glthread_lock_init (&(lock))
 # define lock_fini(lock) glthread_lock_destroy (&(lock))
 # define lock_lock(lock) glthread_lock_lock (&(lock))
 # define lock_unlock(lock) glthread_lock_unlock (&(lock))
-#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO
+#elif defined GNULIB_PTHREAD && !defined GNULIB_REGEX_SINGLE_THREAD
 # include <pthread.h>
 # define lock_define(name) pthread_mutex_t name;
 # define lock_init(lock) pthread_mutex_init (&(lock), 0)
 # define isblank(ch) ((ch) == ' ' || (ch) == '\t')
 #endif
 
+/* regex code assumes isascii has its usual numeric meaning,
+   even if the portable character set uses EBCDIC encoding,
+   and even if wint_t is wider than int.  */
+#ifndef _LIBC
+# undef isascii
+# define isascii(c) (((c) & ~0x7f) == 0)
+#endif
+
 #ifdef _LIBC
 # ifndef _RE_DEFINE_LOCALE_FUNCTIONS
 #  define _RE_DEFINE_LOCALE_FUNCTIONS 1
 # define __mbrtowc mbrtowc
 # define __wcrtomb wcrtomb
 # define __regfree regfree
-# define attribute_hidden
 #endif /* not _LIBC */
 
-#if __GNUC__ < 3 + (__GNUC_MINOR__ < 1)
-# define __attribute__(arg)
-#endif
-
 #ifndef SSIZE_MAX
 # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
 #endif
+#ifndef ULONG_WIDTH
+# define ULONG_WIDTH REGEX_UINTEGER_WIDTH (ULONG_MAX)
+/* The number of usable bits in an unsigned integer type with maximum
+   value MAX, as an int expression suitable in #if.  Cover all known
+   practical hosts.  This implementation exploits the fact that MAX is
+   1 less than a power of 2, and merely counts the number of 1 bits in
+   MAX; "COBn" means "count the number of 1 bits in the low-order n bits".  */
+# define REGEX_UINTEGER_WIDTH(max) REGEX_COB128 (max)
+# define REGEX_COB128(n) (REGEX_COB64 ((n) >> 31 >> 31 >> 2) + REGEX_COB64 (n))
+# define REGEX_COB64(n) (REGEX_COB32 ((n) >> 31 >> 1) + REGEX_COB32 (n))
+# define REGEX_COB32(n) (REGEX_COB16 ((n) >> 16) + REGEX_COB16 (n))
+# define REGEX_COB16(n) (REGEX_COB8 ((n) >> 8) + REGEX_COB8 (n))
+# define REGEX_COB8(n) (REGEX_COB4 ((n) >> 4) + REGEX_COB4 (n))
+# define REGEX_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + ((n) & 1))
+# if ULONG_MAX / 2 + 1 != 1ul << (ULONG_WIDTH - 1)
+#  error "ULONG_MAX out of range"
+# endif
+#endif
 
 /* The type of indexes into strings.  This is signed, not size_t,
    since the API requires indexes to fit in regoff_t anyway, and using
@@ -177,36 +194,8 @@ typedef __re_size_t re_hashval_t;
 typedef unsigned long int bitset_word_t;
 /* All bits set in a bitset_word_t.  */
 #define BITSET_WORD_MAX ULONG_MAX
-
-/* Number of bits in a bitset_word_t.  For portability to hosts with
-   padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)';
-   instead, deduce it directly from BITSET_WORD_MAX.  Avoid
-   greater-than-32-bit integers and unconditional shifts by more than
-   31 bits, as they're not portable.  */
-#if BITSET_WORD_MAX == 0xffffffffUL
-# define BITSET_WORD_BITS 32
-#elif BITSET_WORD_MAX >> 31 >> 4 == 1
-# define BITSET_WORD_BITS 36
-#elif BITSET_WORD_MAX >> 31 >> 16 == 1
-# define BITSET_WORD_BITS 48
-#elif BITSET_WORD_MAX >> 31 >> 28 == 1
-# define BITSET_WORD_BITS 60
-#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1
-# define BITSET_WORD_BITS 64
-#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1
-# define BITSET_WORD_BITS 72
-#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1
-# define BITSET_WORD_BITS 128
-#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1
-# define BITSET_WORD_BITS 256
-#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1
-# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */
-# if BITSET_WORD_BITS <= SBC_MAX
-#  error "Invalid SBC_MAX"
-# endif
-#else
-# error "Add case for new bitset_word_t size"
-#endif
+/* Number of bits in a bitset_word_t.  */
+#define BITSET_WORD_BITS ULONG_WIDTH
 
 /* Number of bitset_word_t values in a bitset_t.  */
 #define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
@@ -358,7 +347,7 @@ typedef struct
     Idx idx;                   /* for BACK_REF */
     re_context_type ctx_type;  /* for ANCHOR */
   } opr;
-#if __GNUC__ >= 2 && !defined __STRICT_ANSI__
+#if (__GNUC__ >= 2 || defined __clang__) && !defined __STRICT_ANSI__
   re_token_type_t type : 8;
 #else
   re_token_type_t type;
@@ -459,25 +448,6 @@ typedef struct re_dfa_t re_dfa_t;
 #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
 #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
 
-#if defined _LIBC || HAVE_ALLOCA
-# include <alloca.h>
-#endif
-
-#ifndef _LIBC
-# if HAVE_ALLOCA
-/* The OS usually guarantees only one guard page at the bottom of the stack,
-   and a page size can be as small as 4096 bytes.  So we cannot safely
-   allocate anything larger than 4096 bytes.  Also care for the possibility
-   of a few compiler-allocated temporary stack slots.  */
-#  define __libc_use_alloca(n) ((n) < 4032)
-# else
-/* alloca is implemented with malloc, so just use malloc.  */
-#  define __libc_use_alloca(n) 0
-#  undef alloca
-#  define alloca(n) malloc (n)
-# endif
-#endif
-
 #ifdef _LIBC
 # define MALLOC_0_IS_NONNULL 1
 #elif !defined MALLOC_0_IS_NONNULL
@@ -614,20 +584,15 @@ struct re_backref_cache_entry
   Idx str_idx;
   Idx subexp_from;
   Idx subexp_to;
+  bitset_word_t eps_reachable_subexps_map;
   char more;
-  char unused;
-  unsigned short int eps_reachable_subexps_map;
 };
 
 typedef struct
 {
   /* The string object corresponding to the input string.  */
   re_string_t input;
-#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
   const re_dfa_t *const dfa;
-#else
-  const re_dfa_t *dfa;
-#endif
   /* EFLAGS of the argument of regexec.  */
   int eflags;
   /* Where the matching ends.  */
@@ -868,29 +833,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 #endif /* RE_ENABLE_I18N */
 
-#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_MINOR__
-#  define __GNUC_PREREQ(maj, min) \
-         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+#ifdef _LIBC
+# if __GNUC__ >= 7
+#  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
-#  define __GNUC_PREREQ(maj, min) 0
-# endif
-#endif
-
-#if __GNUC_PREREQ (3,4)
-# undef __attribute_warn_unused_result__
-# define __attribute_warn_unused_result__ \
-   __attribute__ ((__warn_unused_result__))
-#else
-# define __attribute_warn_unused_result__ /* empty */
-#endif
-
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
 #  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # endif
+#else
+# include "attribute.h"
 #endif
 
 #endif /*  _REGEX_INTERNAL_H */
index c7d099c..5e4eb49 100644 (file)
@@ -1,19 +1,19 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
@@ -59,7 +59,7 @@ static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
                         Idx cur_idx, Idx nmatch);
 static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
                                      Idx str_idx, Idx dest_node, Idx nregs,
-                                     regmatch_t *regs,
+                                     regmatch_t *regs, regmatch_t *prevregs,
                                      re_node_set *eps_via_nodes);
 static reg_errcode_t set_regs (const regex_t *preg,
                               const re_match_context_t *mctx,
@@ -186,10 +186,11 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len);
    REG_NOTBOL is set, then ^ does not match at the beginning of the
    string; if REG_NOTEOL is set, then $ does not match at the end.
 
-   We return 0 if we find a match and REG_NOMATCH if not.  */
+   Return 0 if a match is found, REG_NOMATCH if not, REG_BADPAT if
+   EFLAGS is invalid.  */
 
 int
-regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+regexec (const regex_t *__restrict preg, const char *__restrict string,
         size_t nmatch, regmatch_t pmatch[], int eflags)
 {
   reg_errcode_t err;
@@ -232,8 +233,8 @@ __typeof__ (__regexec) __compat_regexec;
 
 int
 attribute_compat_text_section
-__compat_regexec (const regex_t *_Restrict_ preg,
-                 const char *_Restrict_ string, size_t nmatch,
+__compat_regexec (const regex_t *__restrict preg,
+                 const char *__restrict string, size_t nmatch,
                  regmatch_t pmatch[], int eflags)
 {
   return regexec (preg, string, nmatch, pmatch,
@@ -269,8 +270,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
    strings.)
 
    On success, re_match* functions return the length of the match, re_search*
-   return the position of the start of the match.  Return value -1 means no
-   match was found and -2 indicates an internal error.  */
+   return the position of the start of the match.  They return -1 on
+   match failure, -2 on error.  */
 
 regoff_t
 re_match (struct re_pattern_buffer *bufp, const char *string, Idx length,
@@ -443,7 +444,7 @@ re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
     {
       if (ret_len)
        {
-         assert (pmatch[0].rm_so == start);
+         DEBUG_ASSERT (pmatch[0].rm_so == start);
          rval = pmatch[0].rm_eo - start;
        }
       else
@@ -502,9 +503,9 @@ re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
     }
   else
     {
-      assert (regs_allocated == REGS_FIXED);
+      DEBUG_ASSERT (regs_allocated == REGS_FIXED);
       /* This function may not be called with REGS_FIXED and nregs too big.  */
-      assert (regs->num_regs >= nregs);
+      DEBUG_ASSERT (nregs <= regs->num_regs);
       rval = REGS_FIXED;
     }
 
@@ -597,21 +598,12 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
   Idx extra_nmatch;
   bool sb;
   int ch;
-#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
   re_match_context_t mctx = { .dfa = dfa };
-#else
-  re_match_context_t mctx;
-#endif
   char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate
                    && start != last_start && !preg->can_be_null)
                   ? preg->fastmap : NULL);
   RE_TRANSLATE_TYPE t = preg->translate;
 
-#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
-  memset (&mctx, '\0', sizeof (re_match_context_t));
-  mctx.dfa = dfa;
-#endif
-
   extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0;
   nmatch -= extra_nmatch;
 
@@ -622,10 +614,8 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
                        || dfa->init_state_begbuf == NULL))
     return REG_NOMATCH;
 
-#ifdef DEBUG
   /* We assume front-end functions already check them.  */
-  assert (0 <= last_start && last_start <= length);
-#endif
+  DEBUG_ASSERT (0 <= last_start && last_start <= length);
 
   /* If initial states with non-begbuf contexts have no elements,
      the regex must be anchored.  If preg->newline_anchor is set,
@@ -677,8 +667,6 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
          goto free_return;
        }
     }
-  else
-    mctx.state_log = NULL;
 
   match_first = start;
   mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
@@ -838,10 +826,8 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
       match_ctx_clean (&mctx);
     }
 
-#ifdef DEBUG
-  assert (match_last != -1);
-  assert (err == REG_NOERROR);
-#endif
+  DEBUG_ASSERT (match_last != -1);
+  DEBUG_ASSERT (err == REG_NOERROR);
 
   /* Set pmatch[] if we need.  */
   if (nmatch > 0)
@@ -886,7 +872,7 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
                   : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
              }
 #else
-           assert (mctx.input.offsets_needed == 0);
+           DEBUG_ASSERT (mctx.input.offsets_needed == 0);
 #endif
            pmatch[reg_idx].rm_so += match_first;
            pmatch[reg_idx].rm_eo += match_first;
@@ -926,9 +912,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
   re_dfastate_t **sifted_states;
   re_dfastate_t **lim_states = NULL;
   re_sift_context_t sctx;
-#ifdef DEBUG
-  assert (mctx->state_log != NULL);
-#endif
+  DEBUG_ASSERT (mctx->state_log != NULL);
   match_last = mctx->match_last;
   halt_node = mctx->last_node;
 
@@ -1074,7 +1058,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
   /* An initial state must not be NULL (invalid).  */
   if (__glibc_unlikely (cur_state == NULL))
     {
-      assert (err == REG_ESPACE);
+      DEBUG_ASSERT (err == REG_ESPACE);
       return -2;
     }
 
@@ -1129,7 +1113,7 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match,
          err = extend_buffers (mctx, next_char_idx + 1);
          if (__glibc_unlikely (err != REG_NOERROR))
            {
-             assert (err == REG_ESPACE);
+             DEBUG_ASSERT (err == REG_ESPACE);
              return -2;
            }
        }
@@ -1212,9 +1196,7 @@ check_halt_state_context (const re_match_context_t *mctx,
 {
   Idx i;
   unsigned int context;
-#ifdef DEBUG
-  assert (state->halt);
-#endif
+  DEBUG_ASSERT (state->halt);
   context = re_string_context_at (&mctx->input, idx, mctx->eflags);
   for (i = 0; i < state->nodes.nelem; ++i)
     if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
@@ -1225,27 +1207,30 @@ check_halt_state_context (const re_match_context_t *mctx,
 /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
    corresponding to the DFA).
    Return the destination node, and update EPS_VIA_NODES;
-   return -1 in case of errors.  */
+   return -1 on match failure, -2 on error.  */
 
 static Idx
 proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
+                  regmatch_t *prevregs,
                   Idx *pidx, Idx node, re_node_set *eps_via_nodes,
                   struct re_fail_stack_t *fs)
 {
   const re_dfa_t *const dfa = mctx->dfa;
-  Idx i;
-  bool ok;
   if (IS_EPSILON_NODE (dfa->nodes[node].type))
     {
       re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
       re_node_set *edests = &dfa->edests[node];
-      Idx dest_node;
-      ok = re_node_set_insert (eps_via_nodes, node);
-      if (__glibc_unlikely (! ok))
-       return -2;
-      /* Pick up a valid destination, or return -1 if none
-        is found.  */
-      for (dest_node = -1, i = 0; i < edests->nelem; ++i)
+
+      if (! re_node_set_contains (eps_via_nodes, node))
+        {
+          bool ok = re_node_set_insert (eps_via_nodes, node);
+          if (__glibc_unlikely (! ok))
+            return -2;
+        }
+
+      /* Pick a valid destination, or return -1 if none is found.  */
+      Idx dest_node = -1;
+      for (Idx i = 0; i < edests->nelem; i++)
        {
          Idx candidate = edests->elems[i];
          if (!re_node_set_contains (cur_nodes, candidate))
@@ -1263,7 +1248,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
              /* Otherwise, push the second epsilon-transition on the fail stack.  */
              else if (fs != NULL
                       && push_fail_stack (fs, *pidx, candidate, nregs, regs,
-                                          eps_via_nodes))
+                                          prevregs, eps_via_nodes))
                return -2;
 
              /* We know we are going to exit.  */
@@ -1285,16 +1270,21 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
       if (type == OP_BACK_REF)
        {
          Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
-         naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
+         if (subexp_idx < nregs)
+           naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
          if (fs != NULL)
            {
-             if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
+             if (subexp_idx >= nregs
+                 || regs[subexp_idx].rm_so == -1
+                 || regs[subexp_idx].rm_eo == -1)
                return -1;
              else if (naccepted)
                {
                  char *buf = (char *) re_string_get_buffer (&mctx->input);
-                 if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
-                             naccepted) != 0)
+                 if (mctx->input.valid_len - *pidx < naccepted
+                     || (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+                                 naccepted)
+                         != 0))
                    return -1;
                }
            }
@@ -1302,7 +1292,7 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
          if (naccepted == 0)
            {
              Idx dest_node;
-             ok = re_node_set_insert (eps_via_nodes, node);
+             bool ok = re_node_set_insert (eps_via_nodes, node);
              if (__glibc_unlikely (! ok))
                return -2;
              dest_node = dfa->edests[node].elems[0];
@@ -1331,7 +1321,8 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
 static reg_errcode_t
 __attribute_warn_unused_result__
 push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
-                Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
+                Idx nregs, regmatch_t *regs, regmatch_t *prevregs,
+                re_node_set *eps_via_nodes)
 {
   reg_errcode_t err;
   Idx num = fs->num++;
@@ -1347,28 +1338,39 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
     }
   fs->stack[num].idx = str_idx;
   fs->stack[num].node = dest_node;
-  fs->stack[num].regs = re_malloc (regmatch_t, nregs);
+  fs->stack[num].regs = re_malloc (regmatch_t, 2 * nregs);
   if (fs->stack[num].regs == NULL)
     return REG_ESPACE;
   memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
+  memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * nregs);
   err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
   return err;
 }
 
 static Idx
 pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
-               regmatch_t *regs, re_node_set *eps_via_nodes)
+               regmatch_t *regs, regmatch_t *prevregs,
+               re_node_set *eps_via_nodes)
 {
+  if (fs == NULL || fs->num == 0)
+    return -1;
   Idx num = --fs->num;
-  assert (num >= 0);
   *pidx = fs->stack[num].idx;
   memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
+  memcpy (prevregs, fs->stack[num].regs + nregs, sizeof (regmatch_t) * nregs);
   re_node_set_free (eps_via_nodes);
   re_free (fs->stack[num].regs);
   *eps_via_nodes = fs->stack[num].eps_via_nodes;
+  DEBUG_ASSERT (0 <= fs->stack[num].node);
   return fs->stack[num].node;
 }
 
+
+#define DYNARRAY_STRUCT  regmatch_list
+#define DYNARRAY_ELEMENT regmatch_t
+#define DYNARRAY_PREFIX  regmatch_list_
+#include <malloc/dynarray-skeleton.c>
+
 /* Set the positions where the subexpressions are starts/ends to registers
    PMATCH.
    Note: We assume that pmatch[0] is already set, and
@@ -1384,13 +1386,11 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
   re_node_set eps_via_nodes;
   struct re_fail_stack_t *fs;
   struct re_fail_stack_t fs_body = { 0, 2, NULL };
-  regmatch_t *prev_idx_match;
-  bool prev_idx_match_malloced = false;
+  struct regmatch_list prev_match;
+  regmatch_list_init (&prev_match);
 
-#ifdef DEBUG
-  assert (nmatch > 1);
-  assert (mctx->state_log != NULL);
-#endif
+  DEBUG_ASSERT (nmatch > 1);
+  DEBUG_ASSERT (mctx->state_log != NULL);
   if (fl_backtrack)
     {
       fs = &fs_body;
@@ -1404,53 +1404,45 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
   cur_node = dfa->init_node;
   re_node_set_init_empty (&eps_via_nodes);
 
-  if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
-    prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
-  else
+  if (!regmatch_list_resize (&prev_match, nmatch))
     {
-      prev_idx_match = re_malloc (regmatch_t, nmatch);
-      if (prev_idx_match == NULL)
-       {
-         free_fail_stack_return (fs);
-         return REG_ESPACE;
-       }
-      prev_idx_match_malloced = true;
+      regmatch_list_free (&prev_match);
+      free_fail_stack_return (fs);
+      return REG_ESPACE;
     }
+  regmatch_t *prev_idx_match = regmatch_list_begin (&prev_match);
   memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
 
   for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
     {
       update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
 
-      if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
+      if ((idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
+         || (fs && re_node_set_contains (&eps_via_nodes, cur_node)))
        {
          Idx reg_idx;
+         cur_node = -1;
          if (fs)
            {
              for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
                if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1)
-                 break;
-             if (reg_idx == nmatch)
-               {
-                 re_node_set_free (&eps_via_nodes);
-                 if (prev_idx_match_malloced)
-                   re_free (prev_idx_match);
-                 return free_fail_stack_return (fs);
-               }
-             cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
-                                        &eps_via_nodes);
+                 {
+                   cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+                                              prev_idx_match, &eps_via_nodes);
+                   break;
+                 }
            }
-         else
+         if (cur_node < 0)
            {
              re_node_set_free (&eps_via_nodes);
-             if (prev_idx_match_malloced)
-               re_free (prev_idx_match);
-             return REG_NOERROR;
+             regmatch_list_free (&prev_match);
+             return free_fail_stack_return (fs);
            }
        }
 
       /* Proceed to next node.  */
-      cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
+      cur_node = proceed_next_node (mctx, nmatch, pmatch, prev_idx_match,
+                                   &idx, cur_node,
                                    &eps_via_nodes, fs);
 
       if (__glibc_unlikely (cur_node < 0))
@@ -1458,26 +1450,23 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
          if (__glibc_unlikely (cur_node == -2))
            {
              re_node_set_free (&eps_via_nodes);
-             if (prev_idx_match_malloced)
-               re_free (prev_idx_match);
+             regmatch_list_free (&prev_match);
              free_fail_stack_return (fs);
              return REG_ESPACE;
            }
-         if (fs)
-           cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
-                                      &eps_via_nodes);
-         else
+         cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+                                    prev_idx_match, &eps_via_nodes);
+         if (cur_node < 0)
            {
              re_node_set_free (&eps_via_nodes);
-             if (prev_idx_match_malloced)
-               re_free (prev_idx_match);
+             regmatch_list_free (&prev_match);
+             free_fail_stack_return (fs);
              return REG_NOMATCH;
            }
        }
     }
   re_node_set_free (&eps_via_nodes);
-  if (prev_idx_match_malloced)
-    re_free (prev_idx_match);
+  regmatch_list_free (&prev_match);
   return free_fail_stack_return (fs);
 }
 
@@ -1515,10 +1504,10 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
     }
   else if (type == OP_CLOSE_SUBEXP)
     {
+      /* We are at the last node of this sub expression.  */
       Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
       if (reg_num < nmatch)
        {
-         /* We are at the last node of this sub expression.  */
          if (pmatch[reg_num].rm_so < cur_idx)
            {
              pmatch[reg_num].rm_eo = cur_idx;
@@ -1576,9 +1565,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
   Idx str_idx = sctx->last_str_idx;
   re_node_set cur_dest;
 
-#ifdef DEBUG
-  assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
-#endif
+  DEBUG_ASSERT (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
 
   /* Build sifted state_log[str_idx].  It has the nodes which can epsilon
      transit to the last_node and the last_node itself.  */
@@ -1646,11 +1633,8 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
       Idx prev_node = cur_src->elems[i];
       int naccepted = 0;
       bool ok;
+      DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[prev_node].type));
 
-#ifdef DEBUG
-      re_token_type_t type = dfa->nodes[prev_node].type;
-      assert (!IS_EPSILON_NODE (type));
-#endif
 #ifdef RE_ENABLE_I18N
       /* If the node may accept "multi byte".  */
       if (dfa->nodes[prev_node].accept_mb)
@@ -2202,12 +2186,12 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
   int naccepted;
   /* Check the node can accept "multi byte".  */
   naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
-  if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
-      !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
-                           dfa->nexts[node_idx]))
+  if (naccepted > 0 && str_idx + naccepted <= max_str_idx
+      && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+                              dfa->nexts[node_idx]))
     /* The node can't accept the "multi byte", or the
        destination was already thrown away, then the node
-       could't accept the current input "multi byte".   */
+       couldn't accept the current input "multi byte".   */
     naccepted = 0;
   /* Otherwise, it is sure that the node could accept
      'naccepted' bytes input.  */
@@ -2220,6 +2204,7 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
 
 /* Return the next state to which the current state STATE will transit by
    accepting the current input byte, and update STATE_LOG if necessary.
+   Return NULL on failure.
    If STATE can accept a multibyte char/collating element/back reference
    update the destination of STATE_LOG.  */
 
@@ -2420,7 +2405,7 @@ check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
 
 #if 0
 /* Return the next state to which the current state STATE will transit by
-   accepting the current input byte.  */
+   accepting the current input byte.  Return NULL on failure.  */
 
 static re_dfastate_t *
 transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
@@ -2503,9 +2488,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
       err = clean_state_log_if_needed (mctx, dest_idx);
       if (__glibc_unlikely (err != REG_NOERROR))
        return err;
-#ifdef DEBUG
-      assert (dfa->nexts[cur_node_idx] != -1);
-#endif
+      DEBUG_ASSERT (dfa->nexts[cur_node_idx] != -1);
       new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
 
       dest_state = mctx->state_log[dest_idx];
@@ -2569,9 +2552,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
 
       /* And add the epsilon closures (which is 'new_dest_nodes') of
         the backreference to appropriate state_log.  */
-#ifdef DEBUG
-      assert (dfa->nexts[node_idx] != -1);
-#endif
+      DEBUG_ASSERT (dfa->nexts[node_idx] != -1);
       for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
        {
          Idx subexp_len;
@@ -2846,7 +2827,8 @@ find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
 /* Check whether the node TOP_NODE at TOP_STR can arrive to the node
    LAST_NODE at LAST_STR.  We record the path onto PATH since it will be
    heavily reused.
-   Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise.  */
+   Return REG_NOERROR if it can arrive, REG_NOMATCH if it cannot,
+   REG_ESPACE if memory is exhausted.  */
 
 static reg_errcode_t
 __attribute_warn_unused_result__
@@ -3030,10 +3012,8 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
     {
       int naccepted = 0;
       Idx cur_node = cur_nodes->elems[cur_idx];
-#ifdef DEBUG
-      re_token_type_t type = dfa->nodes[cur_node].type;
-      assert (!IS_EPSILON_NODE (type));
-#endif
+      DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[cur_node].type));
+
 #ifdef RE_ENABLE_I18N
       /* If the node may accept "multi byte".  */
       if (dfa->nodes[cur_node].accept_mb)
@@ -3101,9 +3081,7 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
   reg_errcode_t err;
   Idx idx, outside_node;
   re_node_set new_nodes;
-#ifdef DEBUG
-  assert (cur_nodes->nelem);
-#endif
+  DEBUG_ASSERT (cur_nodes->nelem);
   err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
   if (__glibc_unlikely (err != REG_NOERROR))
     return err;
@@ -3280,7 +3258,7 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
 /* Build transition table for the state.
    Return true if successful.  */
 
-static bool
+static bool __attribute_noinline__
 build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
 {
   reg_errcode_t err;
@@ -3288,36 +3266,20 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
   int ch;
   bool need_word_trtable = false;
   bitset_word_t elem, mask;
-  bool dests_node_malloced = false;
-  bool dest_states_malloced = false;
   Idx ndests; /* Number of the destination states from 'state'.  */
   re_dfastate_t **trtable;
-  re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
-  re_node_set follows, *dests_node;
-  bitset_t *dests_ch;
+  re_dfastate_t *dest_states[SBC_MAX];
+  re_dfastate_t *dest_states_word[SBC_MAX];
+  re_dfastate_t *dest_states_nl[SBC_MAX];
+  re_node_set follows;
   bitset_t acceptable;
 
-  struct dests_alloc
-  {
-    re_node_set dests_node[SBC_MAX];
-    bitset_t dests_ch[SBC_MAX];
-  } *dests_alloc;
-
   /* We build DFA states which corresponds to the destination nodes
      from 'state'.  'dests_node[i]' represents the nodes which i-th
      destination state contains, and 'dests_ch[i]' represents the
      characters which i-th destination state accepts.  */
-  if (__libc_use_alloca (sizeof (struct dests_alloc)))
-    dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
-  else
-    {
-      dests_alloc = re_malloc (struct dests_alloc, 1);
-      if (__glibc_unlikely (dests_alloc == NULL))
-       return false;
-      dests_node_malloced = true;
-    }
-  dests_node = dests_alloc->dests_node;
-  dests_ch = dests_alloc->dests_ch;
+  re_node_set dests_node[SBC_MAX];
+  bitset_t dests_ch[SBC_MAX];
 
   /* Initialize transition table.  */
   state->word_trtable = state->trtable = NULL;
@@ -3327,8 +3289,6 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
   ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
   if (__glibc_unlikely (ndests <= 0))
     {
-      if (dests_node_malloced)
-       re_free (dests_alloc);
       /* Return false in case of an error, true otherwise.  */
       if (ndests == 0)
        {
@@ -3343,38 +3303,14 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
 
   err = re_node_set_alloc (&follows, ndests + 1);
   if (__glibc_unlikely (err != REG_NOERROR))
-    goto out_free;
-
-  /* Avoid arithmetic overflow in size calculation.  */
-  size_t ndests_max
-    = ((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
-       / (3 * sizeof (re_dfastate_t *)));
-  if (__glibc_unlikely (ndests_max < ndests))
-    goto out_free;
-
-  if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
-                        + ndests * 3 * sizeof (re_dfastate_t *)))
-    dest_states = (re_dfastate_t **)
-      alloca (ndests * 3 * sizeof (re_dfastate_t *));
-  else
     {
-      dest_states = re_malloc (re_dfastate_t *, ndests * 3);
-      if (__glibc_unlikely (dest_states == NULL))
-       {
-out_free:
-         if (dest_states_malloced)
-           re_free (dest_states);
-         re_node_set_free (&follows);
-         for (i = 0; i < ndests; ++i)
-           re_node_set_free (dests_node + i);
-         if (dests_node_malloced)
-           re_free (dests_alloc);
-         return false;
-       }
-      dest_states_malloced = true;
+    out_free:
+      re_node_set_free (&follows);
+      for (i = 0; i < ndests; ++i)
+       re_node_set_free (dests_node + i);
+      return false;
     }
-  dest_states_word = dest_states + ndests;
-  dest_states_nl = dest_states_word + ndests;
+
   bitset_empty (acceptable);
 
   /* Then build the states for all destinations.  */
@@ -3499,23 +3435,17 @@ out_free:
          }
     }
 
-  if (dest_states_malloced)
-    re_free (dest_states);
-
   re_node_set_free (&follows);
   for (i = 0; i < ndests; ++i)
     re_node_set_free (dests_node + i);
-
-  if (dests_node_malloced)
-    re_free (dests_alloc);
-
   return true;
 }
 
 /* Group all nodes belonging to STATE into several destinations.
    Then for all destinations, set the nodes belonging to the destination
    to DESTS_NODE[i] and set the characters accepted by the destination
-   to DEST_CH[i].  This function return the number of destinations.  */
+   to DEST_CH[i].  Return the number of destinations if successful,
+   -1 on internal error.  */
 
 static Idx
 group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
@@ -3693,6 +3623,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
          bitset_empty (accepts);
        }
     }
+  assume (ndests <= SBC_MAX);
   return ndests;
  error_return:
   for (j = 0; j < ndests; ++j)
@@ -3780,10 +3711,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
       /* FIXME: I don't think this if is needed, as both '\n'
         and '\0' are char_len == 1.  */
       /* '.' accepts any one character except the following two cases.  */
-      if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
-          re_string_byte_at (input, str_idx) == '\n') ||
-         ((dfa->syntax & RE_DOT_NOT_NULL) &&
-          re_string_byte_at (input, str_idx) == '\0'))
+      if ((!(dfa->syntax & RE_DOT_NEWLINE)
+          && re_string_byte_at (input, str_idx) == '\n')
+         || ((dfa->syntax & RE_DOT_NOT_NULL)
+             && re_string_byte_at (input, str_idx) == '\0'))
        return 0;
       return char_len;
     }
@@ -4270,10 +4201,8 @@ static reg_errcode_t
 __attribute_warn_unused_result__
 match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
 {
-#ifdef DEBUG
-  assert (mctx->sub_tops != NULL);
-  assert (mctx->asub_tops > 0);
-#endif
+  DEBUG_ASSERT (mctx->sub_tops != NULL);
+  DEBUG_ASSERT (mctx->asub_tops > 0);
   if (__glibc_unlikely (mctx->nsub_tops == mctx->asub_tops))
     {
       Idx new_asub_tops = mctx->asub_tops * 2;
@@ -4294,7 +4223,8 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
 }
 
 /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches
-   at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP.  */
+   at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP.
+   Return the new entry if successful, NULL if memory is exhausted.  */
 
 static re_sub_match_last_t *
 match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
index 439e1ff..3ad3477 100644 (file)
@@ -1,17 +1,17 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if !_LIBC
@@ -72,7 +72,7 @@ __libc_lock_define_initialized (static, envlock)
    values are from a small set.  Outside glibc this will eat up all
    memory after a while.  */
 #if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
-                      && defined __GNUC__)
+                      && (defined __GNUC__ || defined __clang__))
 # define USE_TSEARCH    1
 # include <search.h>
 typedef int (*compar_fn_t) (const void *, const void *);
diff --git a/lib/setlocale-lock.c b/lib/setlocale-lock.c
new file mode 100644 (file)
index 0000000..53e231c
--- /dev/null
@@ -0,0 +1,150 @@
+/* Return the internal lock used by setlocale_null_r.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* When it is known that the gl_get_setlocale_null_lock function is defined
+   by a dependency library, it should not be defined here.  */
+#if OMIT_SETLOCALE_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+   this file is never empty.  */
+typedef int dummy;
+
+#else
+
+/* This file defines the internal lock used by setlocale_null_r.
+   It is a separate compilation unit, so that only one copy of it is
+   present when linking statically.  */
+
+/* Prohibit renaming this symbol.  */
+# undef gl_get_setlocale_null_lock
+
+/* Macro for exporting a symbol (function, not variable) defined in this file,
+   when compiled into a shared library.  */
+# ifndef DLL_EXPORTED
+#  if HAVE_VISIBILITY
+  /* Override the effect of the compiler option '-fvisibility=hidden'.  */
+#   define DLL_EXPORTED __attribute__((__visibility__("default")))
+#  elif defined _WIN32 || defined __CYGWIN__
+#   define DLL_EXPORTED __declspec(dllexport)
+#  else
+#   define DLL_EXPORTED
+#  endif
+# endif
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+#  include "windows-initguard.h"
+
+/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
+   because the latter is not guaranteed to be a stable ABI in the future.  */
+
+/* Make sure the function gets exported from DLLs.  */
+DLL_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void);
+
+static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT;
+static CRITICAL_SECTION lock;
+
+/* Returns the internal lock used by setlocale_null_r.  */
+CRITICAL_SECTION *
+gl_get_setlocale_null_lock (void)
+{
+  if (!guard.done)
+    {
+      if (InterlockedIncrement (&guard.started) == 0)
+        {
+          /* This thread is the first one to need the lock.  Initialize it.  */
+          InitializeCriticalSection (&lock);
+          guard.done = 1;
+        }
+      else
+        {
+          /* Don't let guard.started grow and wrap around.  */
+          InterlockedDecrement (&guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this mutex.  */
+          while (!guard.done)
+            Sleep (0);
+        }
+    }
+  return &lock;
+}
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void);
+
+/* Returns the internal lock used by setlocale_null_r.  */
+pthread_mutex_t *
+gl_get_setlocale_null_lock (void)
+{
+  return &mutex;
+}
+
+# elif HAVE_THREADS_H
+
+#  include <threads.h>
+#  include <stdlib.h>
+
+static int volatile init_needed = 1;
+static once_flag init_once = ONCE_FLAG_INIT;
+static mtx_t mutex;
+
+static void
+atomic_init (void)
+{
+  if (mtx_init (&mutex, mtx_plain) != thrd_success)
+    abort ();
+  init_needed = 0;
+}
+
+/* Make sure the function gets exported from shared libraries.  */
+DLL_EXPORTED mtx_t *gl_get_setlocale_null_lock (void);
+
+/* Returns the internal lock used by setlocale_null_r.  */
+mtx_t *
+gl_get_setlocale_null_lock (void)
+{
+  if (init_needed)
+    call_once (&init_once, atomic_init);
+  return &mutex;
+}
+
+# endif
+
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
+/* Make sure the '__declspec(dllimport)' in setlocale_null.c does not cause
+   a link failure when no DLLs are involved.  */
+#  if defined _WIN64 || defined _LP64
+#   define IMP(x) __imp_##x
+#  else
+#   define IMP(x) _imp__##x
+#  endif
+void * IMP(gl_get_setlocale_null_lock) = &gl_get_setlocale_null_lock;
+# endif
+
+#endif
diff --git a/lib/setlocale_null.c b/lib/setlocale_null.c
new file mode 100644 (file)
index 0000000..dbfda25
--- /dev/null
@@ -0,0 +1,411 @@
+/* Query the name of the current global locale.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "setlocale_null.h"
+
+#include <errno.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined _WIN32 && !defined __CYGWIN__
+# include <wchar.h>
+#endif
+
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE)
+# if defined _WIN32 && !defined __CYGWIN__
+
+#  define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#  include <windows.h>
+
+# elif HAVE_PTHREAD_API
+
+#  include <pthread.h>
+#  if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
+#   include <threads.h>
+#   pragma weak thrd_exit
+#   define c11_threads_in_use() (thrd_exit != NULL)
+#  else
+#   define c11_threads_in_use() 0
+#  endif
+
+# elif HAVE_THREADS_H
+
+#  include <threads.h>
+
+# endif
+#endif
+
+/* Use the system's setlocale() function, not the gnulib override, here.  */
+#undef setlocale
+
+static const char *
+setlocale_null_androidfix (int category)
+{
+  const char *result = setlocale (category, NULL);
+
+#ifdef __ANDROID__
+  if (result == NULL)
+    switch (category)
+      {
+      case LC_CTYPE:
+      case LC_NUMERIC:
+      case LC_TIME:
+      case LC_COLLATE:
+      case LC_MONETARY:
+      case LC_MESSAGES:
+      case LC_ALL:
+      case LC_PAPER:
+      case LC_NAME:
+      case LC_ADDRESS:
+      case LC_TELEPHONE:
+      case LC_MEASUREMENT:
+        result = "C";
+        break;
+      default:
+        break;
+      }
+#endif
+
+  return result;
+}
+
+static int
+setlocale_null_unlocked (int category, char *buf, size_t bufsize)
+{
+#if defined _WIN32 && !defined __CYGWIN__ && defined _MSC_VER
+  /* On native Windows, nowadays, the setlocale() implementation is based
+     on _wsetlocale() and uses malloc() for the result.  We are better off
+     using _wsetlocale() directly.  */
+  const wchar_t *result = _wsetlocale (category, NULL);
+
+  if (result == NULL)
+    {
+      /* CATEGORY is invalid.  */
+      if (bufsize > 0)
+        /* Return an empty string in BUF.
+           This is a convenience for callers that don't want to write explicit
+           code for handling EINVAL.  */
+        buf[0] = '\0';
+      return EINVAL;
+    }
+  else
+    {
+      size_t length = wcslen (result);
+      if (length < bufsize)
+        {
+          size_t i;
+
+          /* Convert wchar_t[] -> char[], assuming plain ASCII.  */
+          for (i = 0; i <= length; i++)
+            buf[i] = result[i];
+
+          return 0;
+        }
+      else
+        {
+          if (bufsize > 0)
+            {
+              /* Return a truncated result in BUF.
+                 This is a convenience for callers that don't want to write
+                 explicit code for handling ERANGE.  */
+              size_t i;
+
+              /* Convert wchar_t[] -> char[], assuming plain ASCII.  */
+              for (i = 0; i < bufsize; i++)
+                buf[i] = result[i];
+              buf[bufsize - 1] = '\0';
+            }
+          return ERANGE;
+        }
+    }
+#else
+  const char *result = setlocale_null_androidfix (category);
+
+  if (result == NULL)
+    {
+      /* CATEGORY is invalid.  */
+      if (bufsize > 0)
+        /* Return an empty string in BUF.
+           This is a convenience for callers that don't want to write explicit
+           code for handling EINVAL.  */
+        buf[0] = '\0';
+      return EINVAL;
+    }
+  else
+    {
+      size_t length = strlen (result);
+      if (length < bufsize)
+        {
+          memcpy (buf, result, length + 1);
+          return 0;
+        }
+      else
+        {
+          if (bufsize > 0)
+            {
+              /* Return a truncated result in BUF.
+                 This is a convenience for callers that don't want to write
+                 explicit code for handling ERANGE.  */
+              memcpy (buf, result, bufsize - 1);
+              buf[bufsize - 1] = '\0';
+            }
+          return ERANGE;
+        }
+    }
+#endif
+}
+
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+
+/* Use a lock, so that no two threads can invoke setlocale_null_unlocked
+   at the same time.  */
+
+/* Prohibit renaming this symbol.  */
+# undef gl_get_setlocale_null_lock
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+extern __declspec(dllimport) CRITICAL_SECTION *gl_get_setlocale_null_lock (void);
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+  CRITICAL_SECTION *lock = gl_get_setlocale_null_lock ();
+  int ret;
+
+  EnterCriticalSection (lock);
+  ret = setlocale_null_unlocked (category, buf, bufsize);
+  LeaveCriticalSection (lock);
+
+  return ret;
+}
+
+# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+
+extern
+#  if defined _WIN32 || defined __CYGWIN__
+  __declspec(dllimport)
+#  endif
+  pthread_mutex_t *gl_get_setlocale_null_lock (void);
+
+#  if HAVE_WEAK_SYMBOLS /* musl libc, FreeBSD, NetBSD, OpenBSD, Haiku */
+
+    /* Avoid the need to link with '-lpthread'.  */
+#   pragma weak pthread_mutex_lock
+#   pragma weak pthread_mutex_unlock
+
+    /* Determine whether libpthread is in use.  */
+#   pragma weak pthread_mutexattr_gettype
+    /* See the comments in lock.h.  */
+#   define pthread_in_use() \
+      (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+
+#  else
+#   define pthread_in_use() 1
+#  endif
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+  if (pthread_in_use())
+    {
+      pthread_mutex_t *lock = gl_get_setlocale_null_lock ();
+      int ret;
+
+      if (pthread_mutex_lock (lock))
+        abort ();
+      ret = setlocale_null_unlocked (category, buf, bufsize);
+      if (pthread_mutex_unlock (lock))
+        abort ();
+
+      return ret;
+    }
+  else
+    return setlocale_null_unlocked (category, buf, bufsize);
+}
+
+# elif HAVE_THREADS_H
+
+extern mtx_t *gl_get_setlocale_null_lock (void);
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+  mtx_t *lock = gl_get_setlocale_null_lock ();
+  int ret;
+
+  if (mtx_lock (lock) != thrd_success)
+    abort ();
+  ret = setlocale_null_unlocked (category, buf, bufsize);
+  if (mtx_unlock (lock) != thrd_success)
+    abort ();
+
+  return ret;
+}
+
+# endif
+
+#endif
+
+int
+setlocale_null_r (int category, char *buf, size_t bufsize)
+{
+#if SETLOCALE_NULL_ALL_MTSAFE
+# if SETLOCALE_NULL_ONE_MTSAFE
+
+  return setlocale_null_unlocked (category, buf, bufsize);
+
+# else
+
+  if (category == LC_ALL)
+    return setlocale_null_unlocked (category, buf, bufsize);
+  else
+    return setlocale_null_with_lock (category, buf, bufsize);
+
+# endif
+#else
+# if SETLOCALE_NULL_ONE_MTSAFE
+
+  if (category == LC_ALL)
+    return setlocale_null_with_lock (category, buf, bufsize);
+  else
+    return setlocale_null_unlocked (category, buf, bufsize);
+
+# else
+
+  return setlocale_null_with_lock (category, buf, bufsize);
+
+# endif
+#endif
+}
+
+const char *
+setlocale_null (int category)
+{
+#if SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE
+  return setlocale_null_androidfix (category);
+#else
+
+  /* This call must be multithread-safe.  To achieve this without using
+     thread-local storage:
+       1. We use a specific static buffer for each possible CATEGORY
+          argument.  So that different threads can call setlocale_mtsafe
+          with different CATEGORY arguments, without interfering.
+       2. We use a simple strcpy or memcpy to fill this static buffer.
+          Filling it through, for example, strcpy + strcat would not be
+          guaranteed to leave the buffer's contents intact if another thread
+          is currently accessing it.  If necessary, the contents is first
+          assembled in a stack-allocated buffer.  */
+  if (category == LC_ALL)
+    {
+# if SETLOCALE_NULL_ALL_MTSAFE
+      return setlocale_null_androidfix (LC_ALL);
+# else
+      char buf[SETLOCALE_NULL_ALL_MAX];
+      static char resultbuf[SETLOCALE_NULL_ALL_MAX];
+
+      if (setlocale_null_r (LC_ALL, buf, sizeof (buf)))
+        return "C";
+      strcpy (resultbuf, buf);
+      return resultbuf;
+# endif
+    }
+  else
+    {
+# if SETLOCALE_NULL_ONE_MTSAFE
+      return setlocale_null_androidfix (category);
+# else
+      enum
+        {
+          LC_CTYPE_INDEX,
+          LC_NUMERIC_INDEX,
+          LC_TIME_INDEX,
+          LC_COLLATE_INDEX,
+          LC_MONETARY_INDEX,
+          LC_MESSAGES_INDEX,
+#  ifdef LC_PAPER
+          LC_PAPER_INDEX,
+#  endif
+#  ifdef LC_NAME
+          LC_NAME_INDEX,
+#  endif
+#  ifdef LC_ADDRESS
+          LC_ADDRESS_INDEX,
+#  endif
+#  ifdef LC_TELEPHONE
+          LC_TELEPHONE_INDEX,
+#  endif
+#  ifdef LC_MEASUREMENT
+          LC_MEASUREMENT_INDEX,
+#  endif
+#  ifdef LC_IDENTIFICATION
+          LC_IDENTIFICATION_INDEX,
+#  endif
+          LC_INDICES_COUNT
+        }
+        i;
+      char buf[SETLOCALE_NULL_MAX];
+      static char resultbuf[LC_INDICES_COUNT][SETLOCALE_NULL_MAX];
+      int err;
+
+      err = setlocale_null_r (category, buf, sizeof (buf));
+      if (err == EINVAL)
+        return NULL;
+      if (err)
+        return "C";
+
+      switch (category)
+        {
+        case LC_CTYPE:          i = LC_CTYPE_INDEX;          break;
+        case LC_NUMERIC:        i = LC_NUMERIC_INDEX;        break;
+        case LC_TIME:           i = LC_TIME_INDEX;           break;
+        case LC_COLLATE:        i = LC_COLLATE_INDEX;        break;
+        case LC_MONETARY:       i = LC_MONETARY_INDEX;       break;
+        case LC_MESSAGES:       i = LC_MESSAGES_INDEX;       break;
+#  ifdef LC_PAPER
+        case LC_PAPER:          i = LC_PAPER_INDEX;          break;
+#  endif
+#  ifdef LC_NAME
+        case LC_NAME:           i = LC_NAME_INDEX;           break;
+#  endif
+#  ifdef LC_ADDRESS
+        case LC_ADDRESS:        i = LC_ADDRESS_INDEX;        break;
+#  endif
+#  ifdef LC_TELEPHONE
+        case LC_TELEPHONE:      i = LC_TELEPHONE_INDEX;      break;
+#  endif
+#  ifdef LC_MEASUREMENT
+        case LC_MEASUREMENT:    i = LC_MEASUREMENT_INDEX;    break;
+#  endif
+#  ifdef LC_IDENTIFICATION
+        case LC_IDENTIFICATION: i = LC_IDENTIFICATION_INDEX; break;
+#  endif
+        default:
+          /* If you get here, a #ifdef LC_xxx is missing.  */
+          abort ();
+        }
+
+      strcpy (resultbuf[i], buf);
+      return resultbuf[i];
+# endif
+    }
+#endif
+}
diff --git a/lib/setlocale_null.h b/lib/setlocale_null.h
new file mode 100644 (file)
index 0000000..00c42e2
--- /dev/null
@@ -0,0 +1,82 @@
+/* Query the name of the current global locale.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#ifndef _SETLOCALE_NULL_H
+#define _SETLOCALE_NULL_H
+
+#include <stddef.h>
+
+#include "arg-nonnull.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Recommended size of a buffer for a locale name for a single category.
+   On glibc systems, you can have locale names that are relative file names;
+   assume a maximum length 256.
+   In native Windows, in 2018 the longest locale name was of length 58
+   ("FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251").  */
+#define SETLOCALE_NULL_MAX (256+1)
+
+/* Recommended size of a buffer for a locale name with all categories.
+   On glibc systems, you can have locale names that are relative file names;
+   assume maximum length 256 for each.  There are 12 categories; so, the
+   maximum total length is 148+12*256.
+   In native Windows, there are 5 categories, and the maximum total length is
+   55+5*58.  */
+#define SETLOCALE_NULL_ALL_MAX (148+12*256+1)
+
+/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL),
+   except that
+     - it is guaranteed to be multithread-safe,
+     - it returns the resulting locale category name or locale name in the
+       user-supplied buffer BUF, which must be BUFSIZE bytes long.
+   The recommended minimum buffer size is
+     - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and
+     - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL.
+   The return value is an error code: 0 if the call is successful, EINVAL if
+   CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
+   size (including the trailing NUL byte).  In the latter case, a truncated
+   result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
+   For this call to be multithread-safe, *all* calls to
+   setlocale (CATEGORY, NULL) in all other threads must have been converted
+   to use setlocale_null_r or setlocale_null as well, and the other threads
+   must not make other setlocale invocations (since changing the global locale
+   has side effects on all threads).  */
+extern int setlocale_null_r (int category, char *buf, size_t bufsize)
+  _GL_ARG_NONNULL ((2));
+
+/* setlocale_null (CATEGORY) is like setlocale (CATEGORY, NULL), except that
+   it is guaranteed to be multithread-safe.
+   The return value is NULL if CATEGORY is invalid.
+   For this call to be multithread-safe, *all* calls to
+   setlocale (CATEGORY, NULL) in all other threads must have been converted
+   to use setlocale_null_r or setlocale_null as well, and the other threads
+   must not make other setlocale invocations (since changing the global locale
+   has side effects on all threads).  */
+extern const char *setlocale_null (int category);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SETLOCALE_NULL_H */
index 10fdd6d..a69ee02 100644 (file)
@@ -1,5 +1,5 @@
 /* Shell quoting.
-   Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -69,11 +69,11 @@ shell_quote (const char *string)
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
 char *
-shell_quote_argv (char * const *argv)
+shell_quote_argv (const char * const *argv)
 {
   if (*argv != NULL)
     {
-      char * const *argp;
+      const char * const *argp;
       size_t length;
       char *command;
       char *p;
index b20c465..e543e40 100644 (file)
@@ -1,5 +1,5 @@
 /* Shell quoting.
-   Copyright (C) 2001-2002, 2004, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2004, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -33,14 +33,14 @@ extern size_t shell_quote_length (const char *string);
 
 /* Copies the quoted string to p and returns the incremented p.
    There must be room for shell_quote_length (string) + 1 bytes at p.  */
-extern char * shell_quote_copy (char *p, const char *string);
+extern char * shell_quote_copy (char *restrict p, const char *string);
 
 /* Returns the freshly allocated quoted string.  */
 extern char * shell_quote (const char *string);
 
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
-extern char * shell_quote_argv (char * const *argv);
+extern char * shell_quote_argv (const char * const *argv);
 
 #ifdef __cplusplus
 }
diff --git a/lib/sig-handler.c b/lib/sig-handler.c
deleted file mode 100644 (file)
index 52c3621..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <config.h>
-#define SIG_HANDLER_INLINE _GL_EXTERN_INLINE
-#include "sig-handler.h"
index 7d4927b..275da8c 100644 (file)
@@ -1,18 +1,18 @@
 /* A GNU-like <signal.h>.
 
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 #ifndef _@GUARD_PREFIX@_SIGNAL_H
 #define _@GUARD_PREFIX@_SIGNAL_H
 
-/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android
-   declare pthread_sigmask in <pthread.h>, not in <signal.h>.
+/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android,
+   OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>.
    But avoid namespace pollution on glibc systems.*/
 #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
     && ((defined __APPLE__ && defined __MACH__) \
         || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
-        || defined __sun || defined __ANDROID__) \
+        || defined __sun || defined __ANDROID__ || defined __KLIBC__) \
     && ! defined __GLIBC__
 # include <pthread.h>
 #endif
@@ -133,18 +133,28 @@ typedef void (*sighandler_t) (int);
 #   define pthread_sigmask rpl_pthread_sigmask
 #  endif
 _GL_FUNCDECL_RPL (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 _GL_CXXALIAS_RPL (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 # else
 #  if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask)
 _GL_FUNCDECL_SYS (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 #  endif
 _GL_CXXALIAS_SYS (pthread_sigmask, int,
-                  (int how, const sigset_t *new_mask, sigset_t *old_mask));
+                  (int how,
+                   const sigset_t *restrict new_mask,
+                   sigset_t *restrict old_mask));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (pthread_sigmask);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef pthread_sigmask
 # if HAVE_RAW_DECL_PTHREAD_SIGMASK
@@ -168,7 +178,9 @@ _GL_FUNCDECL_SYS (raise, int, (int sig));
 #  endif
 _GL_CXXALIAS_SYS (raise, int, (int sig));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (raise);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef raise
 /* Assume raise is always declared.  */
@@ -291,10 +303,14 @@ _GL_CXXALIASWARN (sigpending);
 #  define SIG_SETMASK 1  /* blocked_set = *set; */
 #  define SIG_UNBLOCK 2  /* blocked_set = blocked_set & ~*set; */
 _GL_FUNCDECL_SYS (sigprocmask, int,
-                  (int operation, const sigset_t *set, sigset_t *old_set));
+                  (int operation,
+                   const sigset_t *restrict set,
+                   sigset_t *restrict old_set));
 # endif
 _GL_CXXALIAS_SYS (sigprocmask, int,
-                  (int operation, const sigset_t *set, sigset_t *old_set));
+                  (int operation,
+                   const sigset_t *restrict set,
+                   sigset_t *restrict old_set));
 _GL_CXXALIASWARN (sigprocmask);
 
 /* Install the handler FUNC for signal SIG, and return the previous
@@ -318,10 +334,18 @@ _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t,
 _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
                   (int sig, _gl_function_taking_int_returning_void_t func));
 # else
+/* On OpenBSD, the declaration of 'signal' may not be present at this point,
+   because it occurs in <sys/signal.h>, not <signal.h> directly.  */
+#  if defined __OpenBSD__
+_GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t,
+                  (int sig, _gl_function_taking_int_returning_void_t func));
+#  endif
 _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
                   (int sig, _gl_function_taking_int_returning_void_t func));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (signal);
+# endif
 
 # if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
 /* Raise signal SIGPIPE.  */
diff --git a/lib/sigsegv.c b/lib/sigsegv.c
new file mode 100644 (file)
index 0000000..998c827
--- /dev/null
@@ -0,0 +1,1374 @@
+/* Page fault handling library.
+   Copyright (C) 1993-2021 Free Software Foundation, Inc.
+   Copyright (C) 2018  Nylon Chen <nylon7@andestech.com>
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible and Nylon Chen.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "sigsegv.h"
+
+#include <errno.h>
+#include <stdio.h> /* declares perror */
+#include <stdint.h> /* defines uintptr_t */
+#include <stdlib.h>
+#include <signal.h>
+#if HAVE_GETRLIMIT
+# include <sys/resource.h> /* declares struct rlimit */
+#endif
+
+#ifdef __OpenBSD__
+# include <sys/param.h> /* defines macro OpenBSD */
+#endif
+
+
+/* Version number.  */
+int libsigsegv_version = LIBSIGSEGV_VERSION;
+
+
+/* ======================= Fault handler information ======================= */
+
+/* Define:
+
+     SIGSEGV_FAULT_HANDLER_ARGLIST
+          is the argument list for the actual fault handler.
+
+   and if available (optional):
+
+     SIGSEGV_FAULT_ADDRESS
+          is a macro for fetching the fault address.
+
+     SIGSEGV_FAULT_CONTEXT
+          is a macro giving a pointer to the entire fault context (i.e.
+          the register set etc.).
+
+     SIGSEGV_FAULT_STACKPOINTER
+          is a macro for fetching the stackpointer at the moment the fault
+          occurred.
+ */
+
+#if defined __linux__ || defined __ANDROID__ /* Linux */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __alpha__
+
+/* See glibc/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are actually the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.sc_regs[30]
+
+# elif defined __arm64__ /* 64-bit */
+
+/* See glibc/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are actually the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.sp
+
+# elif defined __arm__ || defined __armhf__ /* 32-bit */
+
+/* See glibc/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are actually the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.arm_sp
+
+# elif defined __cris__
+
+/* See glibc-ports/sysdeps/unix/sysv/linux/cris/sys/ucontext.h.
+   Note that the 'mcontext_t' defined in
+   glibc-ports/sysdeps/unix/sysv/linux/cris/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are actually the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.usp
+
+# elif defined __hppa__
+
+/* See glibc/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are actually the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.sc_gr[30]
+
+# elif defined __x86_64__ /* 64 bit registers */
+
+/* See glibc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/x86_64/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+   and the 'struct sigcontext' defined in
+   glibc/sysdeps/unix/sysv/linux/x86/bits/sigcontext.h
+   (see also <asm/sigcontext.h>)
+   are effectively the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_RSP]
+
+# elif defined __i386__ /* 32 bit registers */
+
+/* See glibc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/x86/sys/ucontext.h
+   and the 'struct sigcontext_ia32' defined in <asm/sigcontext32.h>
+   are effectively the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_ESP]
+                     /* same value as ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_UESP] */
+
+# elif defined __ia64__
+
+/* See glibc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
+   and the 'struct sigcontext' defined in
+   glibc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
+   (see also <asm/sigcontext.h>)
+   are actually the same.  */
+
+/* IA-64 has two stack pointers, one that grows down, called $r12, and one
+   that grows up, called $bsp/$bspstore.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.sc_gr[12]
+
+/* It would be better to access $bspstore instead of $bsp but I don't know
+   where to find it in 'struct sigcontext'.  Anyway, it doesn't matter
+   because $bsp and $bspstore never differ by more than ca. 1 KB.  */
+#  define SIGSEGV_FAULT_BSP_POINTER  ((ucontext_t *) ucp)->uc_mcontext.sc_ar_bsp
+
+# elif defined __m68k__
+
+/* See glibc/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are quite different types.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[R_SP]
+
+# elif defined __mips__ || defined __mipsn32__ || defined __mips64__
+
+/* See glibc/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/mips/sys/ucontext.h
+   and the 'struct sigcontext' defined in
+   glibc/sysdeps/unix/sysv/linux/mips/bits/sigcontext.h
+   (see also <asm/sigcontext.h>)
+   are effectively the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[29]
+
+# elif defined __nds32__
+
+/* See glibc/sysdeps/unix/sysv/linux/nds32/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/nds32/sigcontextinfo.h.
+   Both are found in <https://patches-gcc.linaro.org/cover/4409/> part 08/11
+   <https://sourceware.org/ml/libc-alpha/2018-05/msg00125.html>.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.nds32_sp
+
+# elif defined __powerpc__ || defined __powerpc64__ || defined __powerpc64_elfv2__
+
+/* See glibc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h,
+   the 'struct sigcontext' defined in <asm/sigcontext.h>,
+   and the 'struct pt_regs' defined in <asm/ptrace.h>
+   are quite different types.  */
+
+#  if defined __powerpc64__ || defined __powerpc64_elfv2__ /* 64-bit */
+#   define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1]
+#  else /* 32-bit */
+/* both should be equivalent */
+#   if 0
+#    define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
+#   else
+#    define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
+#   endif
+#  endif
+
+# elif defined __riscv32__ || __riscv64__
+
+/* See glibc/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
+   and the 'struct sigcontext' defined in
+   glibc/sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h
+   start with the same block of 32 general-purpose registers.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.__gregs[REG_SP]
+
+# elif defined __s390__ || defined __s390x__
+
+/* See glibc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/s390/sys/ucontext.h
+   and the '_sigregs' type, indirect part of 'struct sigcontext', defined
+   in <asm/sigcontext.h>, are effectively the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[15]
+
+# elif defined __sh__
+
+/* See glibc/sysdeps/unix/sysv/linux/sh/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/sh/sys/ucontext.h
+   and the 'struct sigcontext' defined in <asm/sigcontext.h>
+   are effectively the same.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[15]
+
+# elif defined __sparc__ || defined __sparc64__
+
+/* See glibc/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
+   and the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/sparc/{sparc32,sparc64}/sigcontextinfo.h.
+   Note that the 'mcontext_t' defined in
+   glibc/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
+   and the 'struct sigcontext' defined in
+   glibc/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h
+   (see also <asm/sigcontext.h>)
+   are quite different types.  */
+
+#  if defined __sparc64__/* 64-bit */
+/* From linux-4.8.1/arch/sparc/kernel/signal_64.c, function setup_rt_frame, we
+   see that ucp is not an 'ucontext_t *' but rather a 'struct sigcontext *'
+   that happens to have the same value as sip (which is possible because a
+   'struct sigcontext' starts with 128 bytes room for the siginfo_t).  */
+#   define SIGSEGV_FAULT_STACKPOINTER  (((struct sigcontext *) ucp)->sigc_regs.u_regs[14] + 2047)
+#  else /* 32-bit */
+/* From linux-4.8.1/arch/sparc/kernel/signal_32.c, function setup_rt_frame,
+   and linux-4.8.1/arch/sparc/kernel/signal32.c, function setup_rt_frame32, we
+   see that ucp is a 'struct pt_regs *' or 'struct pt_regs32 *', respectively.
+   In userland, this is a 'struct sigcontext *'.  */
+#   define SIGSEGV_FAULT_STACKPOINTER  ((struct sigcontext *) ucp)->si_regs.u_regs[14]
+#  endif
+
+/* The sip->si_addr field is correct for a normal fault, but unusable in case
+   of a stack overflow. What I observe (when running
+   tests/test-sigsegv-catch-stackoverflow1, with a printf right at the beginning
+   of sigsegv_handler) is that sip->si_addr is near 0:
+     - in 64-bit mode: sip->si_addr = 0x000000000000030F, and gdb shows me that
+       the fault occurs in an instruction 'stx %o3,[%fp+0x30f]' and %fp is 0.
+       In fact, all registers %l0..%l7 and %i0..%i7 are 0.
+     - in 32-bit mode: sip->si_addr = 0xFFFFFA64, and gdb shows me that
+       the fault occurs in an instruction 'st %g2,[%fp-1436]' and %fp is 0.
+       In fact, all registers %l0..%l7 and %i0..%i7 are 0.
+   Apparently when the stack overflow occurred, some trap has tried to move the
+   contents of the registers %l0..%l7 and %i0..%i7 (a "window" in SPARC
+   terminology) to the stack, did not succeed in doing this, replaced all these
+   register values with 0, and resumed execution at the fault location. This
+   time, due to %fp = 0, a different fault was triggered. Now it is impossible
+   to determine the real (previous) fault address because, even if know the
+   faulting instruction, the previous register values have been lost.  */
+#  define BOGUS_FAULT_ADDRESS_UPON_STACK_OVERFLOW
+
+# else
+
+/* When adding support for other CPUs here:  */
+
+/* For SIGSEGV_FAULT_HANDLER_ARGLIST, see the definition of SIGCONTEXT in
+   glibc/sysdeps/unix/sysv/linux/<cpu>/sigcontextinfo.h.  */
+
+/* For SIGSEGV_FAULT_STACKPOINTER, see the definition of GET_STACK in
+   glibc/sysdeps/unix/sysv/linux/<cpu>/sigcontextinfo.h.  */
+
+# endif
+
+#endif
+
+#if defined __GNU__ /* Hurd */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, int code, struct sigcontext *scp
+# define SIGSEGV_FAULT_ADDRESS  (unsigned long) code
+# define SIGSEGV_FAULT_CONTEXT  scp
+
+# if defined __i386__
+
+/* scp points to a 'struct sigcontext' (defined in
+   glibc/sysdeps/mach/hurd/i386/bits/sigcontext.h).
+   The registers of this struct get pushed on the stack through
+   gnumach/i386/i386/locore.S:trapall.  */
+/* Both sc_esp and sc_uesp appear to have the same value.
+   It appears more reliable to use sc_uesp because it is labelled as
+   "old esp, if trapped from user".  */
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_uesp
+
+# endif
+
+#endif
+
+#if defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ /* GNU/kFreeBSD, FreeBSD */
+
+# if defined __arm__ || defined __armhf__ || defined __arm64__
+
+#  define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+#  define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+#  define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+
+#  if defined __arm64__ /* 64-bit */
+
+/* See sys/arm64/include/ucontext.h.  */
+
+#   define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.mc_gpregs.gp_sp
+
+#  elif defined __arm__ || defined __armhf__ /* 32-bit */
+
+/* See sys/arm/include/ucontext.h.  */
+
+#   define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.__gregs[_REG_SP]
+
+#  endif
+
+# else
+
+/* On FreeBSD 12, both of these approaches work.  On FreeBSD derivatives, the
+   first one has more chances to work.  */
+#  if 1
+/* Use signal handlers without SA_SIGINFO.  */
+
+#   define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, int code, struct sigcontext *scp, void *addr
+#   define SIGSEGV_FAULT_ADDRESS  addr
+#   define SIGSEGV_FAULT_CONTEXT  scp
+
+/* See sys/x86/include/signal.h.  */
+
+#   if defined __x86_64__
+/* 64 bit registers */
+
+#    define SIGSEGV_FAULT_STACKPOINTER  scp->sc_rsp
+
+#   elif defined __i386__
+/* 32 bit registers */
+
+#    define SIGSEGV_FAULT_STACKPOINTER  scp->sc_esp
+
+#   endif
+
+#  else
+/* Use signal handlers with SA_SIGINFO.  */
+
+#   define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *scp
+#   define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+#   define SIGSEGV_FAULT_CONTEXT  ((struct sigcontext *) scp)
+#   define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+/* See sys/x86/include/signal.h.  */
+
+#   if defined __x86_64__
+/* 64 bit registers */
+
+#    define SIGSEGV_FAULT_STACKPOINTER  ((struct sigcontext *) scp)->sc_rsp
+
+#   elif defined __i386__
+/* 32 bit registers */
+
+#    define SIGSEGV_FAULT_STACKPOINTER  ((struct sigcontext *) scp)->sc_esp
+
+#   endif
+
+#  endif
+
+# endif
+
+#endif
+
+#if defined __NetBSD__ /* NetBSD */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+/* _UC_MACHINE_SP is a platform independent macro.
+   Defined in <machine/mcontext.h>, see
+     http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/$arch/include/mcontext.h
+   Supported on alpha, amd64, i386, ia64, m68k, mips, powerpc, sparc since
+   NetBSD 2.0.
+   On i386, _UC_MACHINE_SP is the same as ->uc_mcontext.__gregs[_REG_UESP],
+   and apparently the same value as       ->uc_mcontext.__gregs[_REG_ESP]. */
+# ifdef _UC_MACHINE_SP
+#  define SIGSEGV_FAULT_STACKPOINTER  _UC_MACHINE_SP ((ucontext_t *) ucp)
+# endif
+
+#endif
+
+#if defined __OpenBSD__ /* OpenBSD */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, struct sigcontext *scp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  scp
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __alpha__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/alpha/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[30]
+
+# elif defined __arm__ || defined __armhf__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/arm/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_usr_sp
+
+# elif defined __hppa__ || defined __hppa64__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/hppa/include/signal.h
+   and
+   openbsd-src/sys/arch/hppa64/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[30]
+
+# elif defined __x86_64__
+/* 64 bit registers */
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/amd64/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_rsp
+
+# elif defined __i386__
+/* 32 bit registers */
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/i386/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_esp
+
+# elif defined __m68k__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/m68k/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_sp
+
+# elif defined __m88k__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/m88k/include/signal.h
+   and the definition of 'struct reg' in
+   openbsd-src/sys/arch/m88k/include/reg.h.  */
+
+#  if OpenBSD >= 201211 /* OpenBSD version >= 5.2 */
+#   define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[31]
+#  else
+#   define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs.r[31]
+#  endif
+
+# elif defined __mips__ || defined __mipsn32__ || defined __mips64__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/mips64/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[29]
+
+# elif defined __powerpc__ || defined __powerpc64__
+
+/* See the definition of 'struct sigcontext' and 'struct trapframe' in
+   openbsd-src/sys/arch/powerpc/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_frame.fixreg[1]
+
+# elif defined __sh__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/sh/include/signal.h
+   and the definition of 'struct reg' in
+   openbsd-src/sys/arch/sh/include/reg.h.  */
+
+#  if OpenBSD >= 201211 /* OpenBSD version >= 5.2 */
+#   define SIGSEGV_FAULT_STACKPOINTER  scp->sc_reg[20-15]
+#  else
+#   define SIGSEGV_FAULT_STACKPOINTER  scp->sc_reg.r_r15
+#  endif
+
+# elif defined __sparc__ || defined __sparc64__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/sparc/include/signal.h
+   and
+   openbsd-src/sys/arch/sparc64/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_sp
+
+# elif defined __vax__
+
+/* See the definition of 'struct sigcontext' in
+   openbsd-src/sys/arch/vax/include/signal.h.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_sp
+
+# endif
+
+#endif
+
+#if (defined __APPLE__ && defined __MACH__) /* macOS */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __x86_64__
+
+/* See the definitions of
+     - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_types/_ucontext.h>,
+     - 'struct __darwin_mcontext64' in <i386/_mcontext.h>, and
+     - 'struct __darwin_x86_thread_state64' in <mach/i386/_structs.h>.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__rsp
+
+# elif defined __i386__
+
+/* See the definitions of
+     - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_types/_ucontext.h>,
+     - 'struct __darwin_mcontext32' in <i386/_mcontext.h>, and
+     - 'struct __darwin_i386_thread_state' in <mach/i386/_structs.h>.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__esp
+
+# elif defined __arm64__
+
+/* See the definitions of
+     - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_types/_ucontext.h>,
+     - 'struct __darwin_mcontext64' in <arm/_mcontext.h>, and
+     - 'struct __darwin_arm_thread_state64' in <mach/arm/_structs.h>.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__sp
+
+# elif defined __powerpc__
+
+/* See the definitions of
+     - 'ucontext_t' and 'struct __darwin_ucontext' in <sys/_structs.h>,
+     - 'struct __darwin_mcontext' in <ppc/_structs.h>, and
+     - 'struct __darwin_ppc_thread_state' in <mach/ppc/_structs.h>.  */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext->__ss.__r1
+
+# endif
+
+#endif
+
+#if defined _AIX /* AIX */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __powerpc__ || defined __powerpc64__
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.jmp_context.gpr[1]
+# endif
+
+#endif
+
+#if defined __sgi /* IRIX */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, int code, struct sigcontext *scp
+# define SIGSEGV_FAULT_ADDRESS  (unsigned long) scp->sc_badvaddr
+# define SIGSEGV_FAULT_CONTEXT  scp
+
+# if defined __mips__ || defined __mipsn32__ || defined __mips64__
+#  define SIGSEGV_FAULT_STACKPOINTER  scp->sc_regs[29]
+# endif
+
+#endif
+
+#if defined __sun /* Solaris */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __x86_64__
+/* 64 bit registers */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_RSP]
+
+# elif defined __i386__
+/* 32 bit registers */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[ESP]
+
+# elif defined __sparc__ || defined __sparc64__
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_O6]
+
+#  if SOLARIS11
+
+/* On Solaris 11.3/SPARC, both in 32-bit and 64-bit mode, when catching
+   stack overflow, the fault address is correct the first time, but is zero
+   or near zero the second time.
+   'truss tests/test-sigsegv-catch-stackoverflow1' shows it:
+
+   In 32-bit mode:
+
+    Incurred fault #6, FLTBOUNDS  %pc = 0x000116E8
+      siginfo: SIGSEGV SEGV_MAPERR addr=0xFFB00000
+    Received signal #11, SIGSEGV [caught]
+      siginfo: SIGSEGV SEGV_MAPERR addr=0xFFB00000
+   then
+    Incurred fault #6, FLTBOUNDS  %pc = 0x000116E8
+      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008
+    Received signal #11, SIGSEGV [caught]
+      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000008
+
+   In 64-bit mode:
+
+    Incurred fault #6, FLTBOUNDS  %pc = 0x100001C58
+      siginfo: SIGSEGV SEGV_MAPERR addr=0xFFFFFFFF7FF00000
+    Received signal #11, SIGSEGV [caught]
+      siginfo: SIGSEGV SEGV_MAPERR addr=0xFFFFFFFF7FF00000
+   then
+    Incurred fault #6, FLTBOUNDS  %pc = 0x100001C58
+      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
+    Received signal #11, SIGSEGV [caught]
+      siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
+ */
+#   define BOGUS_FAULT_ADDRESS_UPON_STACK_OVERFLOW
+
+#  endif
+
+# endif
+
+#endif
+
+#if defined __CYGWIN__ /* Cygwin */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+/* See the definition of 'ucontext_t' in <sys/ucontext.h> and
+   of 'struct __mcontext' in <cygwin/signal.h>.  */
+# if defined __x86_64__
+/* 64 bit registers */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.rsp
+# elif defined __i386__
+/* 32 bit registers */
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.esp
+# endif
+
+#endif
+
+#if defined __HAIKU__ /* Haiku */
+
+# define SIGSEGV_FAULT_HANDLER_ARGLIST  int sig, siginfo_t *sip, void *ucp
+# define SIGSEGV_FAULT_ADDRESS  sip->si_addr
+# define SIGSEGV_FAULT_CONTEXT  ((ucontext_t *) ucp)
+# define SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+
+# if defined __x86_64__
+/* 64 bit registers */
+
+/* See the definition of 'ucontext_t' in <signal.h> and
+   of 'struct vregs' in <arch/x86_64/signal.h>.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.rsp
+
+# elif defined __i386__
+/* 32 bit registers */
+
+/* See the definition of 'ucontext_t' in <signal.h> and
+   of 'struct vregs' in <arch/x86/signal.h>.  */
+
+#  define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.esp
+
+# endif
+
+#endif
+
+/* ========================================================================== */
+
+/* List of signals that are sent when an invalid virtual memory address
+   is accessed, or when the stack overflows.  */
+#if defined __GNU__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ || defined __OpenBSD__ \
+    || (defined __APPLE__ && defined __MACH__)
+# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
+    { int var; var = SIGSEGV; { body } var = SIGBUS; { body } }
+#else
+# define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
+    { int var; var = SIGSEGV; { body } }
+#endif
+
+/* ========================================================================== */
+
+/* Determine the virtual memory area of a given address.  */
+#include "stackvma.h"
+
+/* ========================================================================== */
+
+/* On the average Unix platform, we define
+
+   HAVE_SIGSEGV_RECOVERY
+       if there is a fault-*.h include file which defines
+       SIGSEGV_FAULT_HANDLER_ARGLIST and SIGSEGV_FAULT_ADDRESS.
+
+   HAVE_STACK_OVERFLOW_RECOVERY
+       if HAVE_SIGALTSTACK is set and
+       at least two of the following are true:
+       A) There is a fault-*.h include file which defines
+          SIGSEGV_FAULT_HANDLER_ARGLIST and SIGSEGV_FAULT_ADDRESS.
+       B) There is a fault-*.h include file which defines
+          SIGSEGV_FAULT_HANDLER_ARGLIST and SIGSEGV_FAULT_STACKPOINTER.
+       C) There is a stackvma-*.c, other than stackvma-none.c, which
+          defines sigsegv_get_vma.
+
+   Why? Obviously, to catch stack overflow, we need an alternate signal
+   stack; this requires kernel support. But we also need to distinguish
+   (with a reasonable confidence) a stack overflow from a regular SIGSEGV.
+   If we have A) and B), we use the
+     Heuristic AB: If the fault address is near the stack pointer, it's a
+     stack overflow.
+   If we have A) and C), we use the
+     Heuristic AC: If the fault address is near and beyond the bottom of
+     the stack's virtual memory area, it's a stack overflow.
+   If we have B) and C), we use the
+     Heuristic BC: If the stack pointer is near the bottom of the stack's
+     virtual memory area, it's a stack overflow.
+     This heuristic comes in two flavours: On OSes which let the stack's
+     VMA grow continuously, we determine the bottom by use of getrlimit().
+     On OSes which preallocate the stack's VMA with its maximum size
+     (like BeOS), we use the stack's VMA directly.
+ */
+
+#if HAVE_SIGSEGV_RECOVERY \
+     && !(defined SIGSEGV_FAULT_HANDLER_ARGLIST && defined SIGSEGV_FAULT_ADDRESS)
+# error "You need to define SIGSEGV_FAULT_HANDLER_ARGLIST and SIGSEGV_FAULT_ADDRESS before you can define HAVE_SIGSEGV_RECOVERY."
+#endif
+#if !HAVE_SIGSEGV_RECOVERY \
+    && (defined SIGSEGV_FAULT_HANDLER_ARGLIST && defined SIGSEGV_FAULT_ADDRESS) \
+    && !(defined __FreeBSD__ && (defined __sparc__ || defined __sparc64__))
+# if __GNUC__ || (__clang_major__ >= 4)
+#  warning "You can define HAVE_SIGSEGV_RECOVERY on this platform."
+# else
+#  error "You can define HAVE_SIGSEGV_RECOVERY on this platform."
+# endif
+#endif
+
+#if HAVE_STACK_OVERFLOW_RECOVERY \
+    && !(defined SIGSEGV_FAULT_ADDRESS + defined SIGSEGV_FAULT_STACKPOINTER + HAVE_STACKVMA >= 2)
+# error "You need to define two of SIGSEGV_FAULT_ADDRESS, SIGSEGV_FAULT_STACKPOINTER, HAVE_STACKVMA, before you can define HAVE_STACK_OVERFLOW_RECOVERY."
+#endif
+#if !HAVE_STACK_OVERFLOW_RECOVERY \
+    && (defined SIGSEGV_FAULT_ADDRESS + defined SIGSEGV_FAULT_STACKPOINTER + HAVE_STACKVMA >= 2) \
+    && !(defined __FreeBSD__ && (defined __sparc__ || defined __sparc64__)) \
+    && !(defined __NetBSD__ && (defined __sparc__ || defined __sparc64__))
+# if __GNUC__ || (__clang_major__ >= 4)
+#  warning "You can define HAVE_STACK_OVERFLOW_RECOVERY on this platform."
+# else
+#  error "You can define HAVE_STACK_OVERFLOW_RECOVERY on this platform."
+# endif
+#endif
+
+/* ========================================================================== */
+
+#if HAVE_STACK_OVERFLOW_RECOVERY
+
+/* ======= Leaving a signal handler executing on the alternate stack ======= */
+
+/* Platform dependent:
+   Leaving a signal handler executing on the alternate stack.  */
+static void sigsegv_reset_onstack_flag (void);
+
+/* -------------------------- leave-sigaltstack.c -------------------------- */
+
+# if defined __GNU__ \
+     || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+     || defined __NetBSD__ || defined __OpenBSD__
+
+static void
+sigsegv_reset_onstack_flag (void)
+{
+  stack_t ss;
+
+  if (sigaltstack (NULL, &ss) >= 0)
+    {
+      ss.ss_flags &= ~SS_ONSTACK;
+      sigaltstack (&ss, NULL);
+    }
+}
+
+/* --------------------------- leave-setcontext.c --------------------------- */
+
+# elif defined __sgi || defined __sun /* IRIX, Solaris */
+
+#  include <ucontext.h>
+
+static void
+sigsegv_reset_onstack_flag (void)
+{
+  ucontext_t uc;
+
+  if (getcontext (&uc) >= 0)
+    /* getcontext returns twice.  We are interested in the returned context
+       only the first time, i.e. when the SS_ONSTACK bit is set.  */
+    if (uc.uc_stack.ss_flags & SS_ONSTACK)
+      {
+        uc.uc_stack.ss_flags &= ~SS_ONSTACK;
+        /* Note that setcontext() does not refill uc.  Therefore if
+           setcontext() keeps SS_ONSTACK set in the kernel, either
+           setcontext() will return -1 or getcontext() will return a
+           second time, with the SS_ONSTACK bit being cleared.  */
+        setcontext (&uc);
+      }
+}
+
+/* ------------------------------ leave-nop.c ------------------------------ */
+
+# else
+
+static void
+sigsegv_reset_onstack_flag (void)
+{
+  /* Nothing to do. sigaltstack() simply looks at the stack pointer,
+     therefore SS_ONSTACK is not sticky.  */
+}
+
+# endif
+
+/* ========================================================================== */
+
+# if HAVE_STACKVMA
+
+/* Address of the last byte belonging to the stack vma.  */
+static uintptr_t stack_top = 0;
+
+/* Needs to be called once only.  */
+static void
+remember_stack_top (void *some_variable_on_stack)
+{
+  struct vma_struct vma;
+
+  if (sigsegv_get_vma ((uintptr_t) some_variable_on_stack, &vma) >= 0)
+    stack_top = vma.end - 1;
+}
+
+# endif /* HAVE_STACKVMA */
+
+static stackoverflow_handler_t stk_user_handler = (stackoverflow_handler_t)NULL;
+static uintptr_t stk_extra_stack;
+static size_t stk_extra_stack_size;
+
+#endif /* HAVE_STACK_OVERFLOW_RECOVERY */
+
+#if HAVE_SIGSEGV_RECOVERY
+
+/* User's SIGSEGV handler.  */
+static sigsegv_handler_t user_handler = (sigsegv_handler_t)NULL;
+
+#endif /* HAVE_SIGSEGV_RECOVERY */
+
+
+/* Our SIGSEGV handler, with OS dependent argument list.  */
+
+#if HAVE_SIGSEGV_RECOVERY
+
+static void
+sigsegv_handler (SIGSEGV_FAULT_HANDLER_ARGLIST)
+{
+  void *address = (void *) (SIGSEGV_FAULT_ADDRESS);
+
+# if HAVE_STACK_OVERFLOW_RECOVERY
+#  if !(HAVE_STACKVMA || defined SIGSEGV_FAULT_STACKPOINTER)
+#error "Insufficient heuristics for detecting a stack overflow.  Either define CFG_STACKVMA and HAVE_STACKVMA correctly, or define SIGSEGV_FAULT_STACKPOINTER correctly, or undefine HAVE_STACK_OVERFLOW_RECOVERY!"
+#  endif
+
+  /* Call user's handler.  */
+  if (user_handler && (*user_handler) (address, 0))
+    {
+      /* Handler successful.  */
+    }
+  else
+    {
+      /* Handler declined responsibility.  */
+
+      /* Did the user install a stack overflow handler?  */
+      if (stk_user_handler)
+        {
+          /* See whether it was a stack overflow. If so, longjump away.  */
+#  ifdef SIGSEGV_FAULT_STACKPOINTER
+          uintptr_t old_sp = (uintptr_t) (SIGSEGV_FAULT_STACKPOINTER);
+#   ifdef __ia64
+          uintptr_t old_bsp = (uintptr_t) (SIGSEGV_FAULT_BSP_POINTER);
+#   endif
+#  endif
+
+#  if HAVE_STACKVMA
+          /* Were we able to determine the stack top?  */
+          if (stack_top)
+            {
+              /* Determine stack bounds.  */
+              int saved_errno;
+              struct vma_struct vma;
+              int ret;
+
+              saved_errno = errno;
+              ret = sigsegv_get_vma (stack_top, &vma);
+              errno = saved_errno;
+              if (ret >= 0)
+                {
+#   ifndef BOGUS_FAULT_ADDRESS_UPON_STACK_OVERFLOW
+                  /* Heuristic AC: If the fault_address is nearer to the stack
+                     segment's [start,end] than to the previous segment, we
+                     consider it a stack overflow.
+                     In the case of IA-64, we know that the previous segment
+                     is the up-growing bsp segment, and either of the two
+                     stacks can overflow.  */
+                  uintptr_t addr = (uintptr_t) address;
+
+#    ifdef __ia64
+                  if (addr >= vma.prev_end && addr <= vma.end - 1)
+#    else
+#     if STACK_DIRECTION < 0
+                  if (addr >= vma.start
+                      ? (addr <= vma.end - 1)
+                      : vma.is_near_this (addr, &vma))
+#     else
+                  if (addr <= vma.end - 1
+                      ? (addr >= vma.start)
+                      : vma.is_near_this (addr, &vma))
+#     endif
+#    endif
+                    {
+#   else /* BOGUS_FAULT_ADDRESS_UPON_STACK_OVERFLOW */
+#    if HAVE_GETRLIMIT && defined RLIMIT_STACK
+                  /* Heuristic BC: If the stack size has reached its maximal size,
+                     and old_sp is near the low end, we consider it a stack
+                     overflow.  */
+                  struct rlimit rl;
+
+                  saved_errno = errno;
+                  ret = getrlimit (RLIMIT_STACK, &rl);
+                  errno = saved_errno;
+                  if (ret >= 0)
+                    {
+                      uintptr_t current_stack_size = vma.end - vma.start;
+                      uintptr_t max_stack_size = rl.rlim_cur;
+                      if (current_stack_size <= max_stack_size + 4096
+                          && max_stack_size <= current_stack_size + 4096
+#    else
+                    {
+                      if (1
+#    endif
+#    ifdef SIGSEGV_FAULT_STACKPOINTER
+                          /* Heuristic BC: If we know old_sp, and it is neither
+                             near the low end, nor in the alternate stack, then
+                             it's probably not a stack overflow.  */
+                          && ((old_sp >= stk_extra_stack
+                               && old_sp <= stk_extra_stack + stk_extra_stack_size)
+#     if STACK_DIRECTION < 0
+                              || (old_sp <= vma.start + 4096
+                                  && vma.start <= old_sp + 4096))
+#     else
+                              || (old_sp <= vma.end + 4096
+                                  && vma.end <= old_sp + 4096))
+#     endif
+#    endif
+                         )
+#   endif /* BOGUS_FAULT_ADDRESS_UPON_STACK_OVERFLOW */
+#  else /* !HAVE_STACKVMA */
+          /* Heuristic AB: If the fault address is near the stack pointer,
+             it's a stack overflow.  */
+          uintptr_t addr = (uintptr_t) address;
+
+          if ((addr <= old_sp + 4096 && old_sp <= addr + 4096)
+#   ifdef __ia64
+              || (addr <= old_bsp + 4096 && old_bsp <= addr + 4096)
+#   endif
+             )
+            {
+                {
+                    {
+#  endif /* !HAVE_STACKVMA */
+                        {
+#  ifdef SIGSEGV_FAULT_STACKPOINTER
+                          int emergency =
+                            (old_sp >= stk_extra_stack
+                             && old_sp <= stk_extra_stack + stk_extra_stack_size);
+                          stackoverflow_context_t context = (SIGSEGV_FAULT_CONTEXT);
+#  else
+                          int emergency = 0;
+                          stackoverflow_context_t context = (void *) 0;
+#  endif
+                          /* Call user's handler.  */
+                          (*stk_user_handler) (emergency, context);
+                        }
+                    }
+                }
+            }
+        }
+# endif /* HAVE_STACK_OVERFLOW_RECOVERY */
+
+      if (user_handler && (*user_handler) (address, 1))
+        {
+          /* Handler successful.  */
+        }
+      else
+        {
+          /* Handler declined responsibility for real.  */
+
+          /* Remove ourselves and dump core.  */
+          SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
+        }
+
+# if HAVE_STACK_OVERFLOW_RECOVERY
+    }
+# endif /* HAVE_STACK_OVERFLOW_RECOVERY */
+}
+
+#elif HAVE_STACK_OVERFLOW_RECOVERY
+
+static void
+# ifdef SIGSEGV_FAULT_STACKPOINTER
+sigsegv_handler (SIGSEGV_FAULT_HANDLER_ARGLIST)
+# else
+sigsegv_handler (int sig)
+# endif
+{
+# if !((HAVE_GETRLIMIT && defined RLIMIT_STACK) || defined SIGSEGV_FAULT_STACKPOINTER)
+#  error "Insufficient heuristics for detecting a stack overflow.  Either define SIGSEGV_FAULT_STACKPOINTER correctly, or undefine HAVE_STACK_OVERFLOW_RECOVERY!"
+# endif
+
+  /* Did the user install a handler?  */
+  if (stk_user_handler)
+    {
+      /* See whether it was a stack overflow.  If so, longjump away.  */
+# ifdef SIGSEGV_FAULT_STACKPOINTER
+      uintptr_t old_sp = (uintptr_t) (SIGSEGV_FAULT_STACKPOINTER);
+# endif
+
+      /* Were we able to determine the stack top?  */
+      if (stack_top)
+        {
+          /* Determine stack bounds.  */
+          int saved_errno;
+          struct vma_struct vma;
+          int ret;
+
+          saved_errno = errno;
+          ret = sigsegv_get_vma (stack_top, &vma);
+          errno = saved_errno;
+          if (ret >= 0)
+            {
+# if HAVE_GETRLIMIT && defined RLIMIT_STACK
+              /* Heuristic BC: If the stack size has reached its maximal size,
+                 and old_sp is near the low end, we consider it a stack
+                 overflow.  */
+              struct rlimit rl;
+
+              saved_errno = errno;
+              ret = getrlimit (RLIMIT_STACK, &rl);
+              errno = saved_errno;
+              if (ret >= 0)
+                {
+                  uintptr_t current_stack_size = vma.end - vma.start;
+                  uintptr_t max_stack_size = rl.rlim_cur;
+                  if (current_stack_size <= max_stack_size + 4096
+                      && max_stack_size <= current_stack_size + 4096
+# else
+                {
+                  if (1
+# endif
+# ifdef SIGSEGV_FAULT_STACKPOINTER
+                      /* Heuristic BC: If we know old_sp, and it is neither
+                         near the low end, nor in the alternate stack, then
+                         it's probably not a stack overflow.  */
+                      && ((old_sp >= stk_extra_stack
+                           && old_sp <= stk_extra_stack + stk_extra_stack_size)
+#  if STACK_DIRECTION < 0
+                          || (old_sp <= vma.start + 4096
+                              && vma.start <= old_sp + 4096))
+#  else
+                          || (old_sp <= vma.end + 4096
+                              && vma.end <= old_sp + 4096))
+#  endif
+# endif
+                     )
+                    {
+# ifdef SIGSEGV_FAULT_STACKPOINTER
+                      int emergency =
+                        (old_sp >= stk_extra_stack
+                         && old_sp <= stk_extra_stack + stk_extra_stack_size);
+                      stackoverflow_context_t context = (SIGSEGV_FAULT_CONTEXT);
+# else
+                      int emergency = 0;
+                      stackoverflow_context_t context = (void *) 0;
+# endif
+                      /* Call user's handler.  */
+                      (*stk_user_handler)(emergency,context);
+                    }
+                }
+            }
+        }
+    }
+
+  /* Remove ourselves and dump core.  */
+  SIGSEGV_FOR_ALL_SIGNALS (signo, signal (signo, SIG_DFL);)
+}
+
+#endif
+
+
+#if HAVE_SIGSEGV_RECOVERY || HAVE_STACK_OVERFLOW_RECOVERY
+
+static void
+install_for (int sig)
+{
+  struct sigaction action;
+
+# ifdef SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+  action.sa_sigaction = &sigsegv_handler;
+# else
+  action.sa_handler = (void (*) (int)) &sigsegv_handler;
+# endif
+  /* Block most signals while SIGSEGV is being handled.  */
+  /* Signals SIGKILL, SIGSTOP cannot be blocked.  */
+  /* Signals SIGCONT, SIGTSTP, SIGTTIN, SIGTTOU are not blocked because
+     dealing with these signals seems dangerous.  */
+  /* Signals SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTRAP, SIGIOT, SIGEMT, SIGBUS,
+     SIGSYS, SIGSTKFLT are not blocked because these are synchronous signals,
+     which may require immediate intervention, otherwise the process may
+     starve.  */
+  sigemptyset (&action.sa_mask);
+# ifdef SIGHUP
+  sigaddset (&action.sa_mask,SIGHUP);
+# endif
+# ifdef SIGINT
+  sigaddset (&action.sa_mask,SIGINT);
+# endif
+# ifdef SIGQUIT
+  sigaddset (&action.sa_mask,SIGQUIT);
+# endif
+# ifdef SIGPIPE
+  sigaddset (&action.sa_mask,SIGPIPE);
+# endif
+# ifdef SIGALRM
+  sigaddset (&action.sa_mask,SIGALRM);
+# endif
+# ifdef SIGTERM
+  sigaddset (&action.sa_mask,SIGTERM);
+# endif
+# ifdef SIGUSR1
+  sigaddset (&action.sa_mask,SIGUSR1);
+# endif
+# ifdef SIGUSR2
+  sigaddset (&action.sa_mask,SIGUSR2);
+# endif
+# ifdef SIGCHLD
+  sigaddset (&action.sa_mask,SIGCHLD);
+# endif
+# ifdef SIGCLD
+  sigaddset (&action.sa_mask,SIGCLD);
+# endif
+# ifdef SIGURG
+  sigaddset (&action.sa_mask,SIGURG);
+# endif
+# ifdef SIGIO
+  sigaddset (&action.sa_mask,SIGIO);
+# endif
+# ifdef SIGPOLL
+  sigaddset (&action.sa_mask,SIGPOLL);
+# endif
+# ifdef SIGXCPU
+  sigaddset (&action.sa_mask,SIGXCPU);
+# endif
+# ifdef SIGXFSZ
+  sigaddset (&action.sa_mask,SIGXFSZ);
+# endif
+# ifdef SIGVTALRM
+  sigaddset (&action.sa_mask,SIGVTALRM);
+# endif
+# ifdef SIGPROF
+  sigaddset (&action.sa_mask,SIGPROF);
+# endif
+# ifdef SIGPWR
+  sigaddset (&action.sa_mask,SIGPWR);
+# endif
+# ifdef SIGLOST
+  sigaddset (&action.sa_mask,SIGLOST);
+# endif
+# ifdef SIGWINCH
+  sigaddset (&action.sa_mask,SIGWINCH);
+# endif
+  /* Note that sigaction() implicitly adds sig itself to action.sa_mask.  */
+  /* Ask the OS to provide a structure siginfo_t to the handler.  */
+# ifdef SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO
+  action.sa_flags = SA_SIGINFO;
+# else
+  action.sa_flags = 0;
+# endif
+# if HAVE_STACK_OVERFLOW_RECOVERY && HAVE_SIGALTSTACK /* not BeOS */
+  /* Work around Linux 2.2.5 bug: If SA_ONSTACK is specified but sigaltstack()
+     has not been called, the kernel will busy loop, eating CPU time.  So
+     avoid setting SA_ONSTACK until the user has requested stack overflow
+     handling.  */
+  if (stk_user_handler)
+    action.sa_flags |= SA_ONSTACK;
+# endif
+  sigaction (sig, &action, (struct sigaction *) NULL);
+}
+
+#endif /* HAVE_SIGSEGV_RECOVERY || HAVE_STACK_OVERFLOW_RECOVERY */
+
+int
+sigsegv_install_handler (sigsegv_handler_t handler)
+{
+#if HAVE_SIGSEGV_RECOVERY
+  user_handler = handler;
+
+  SIGSEGV_FOR_ALL_SIGNALS (sig, install_for (sig);)
+
+  return 0;
+#else
+  return -1;
+#endif
+}
+
+void
+sigsegv_deinstall_handler (void)
+{
+#if HAVE_SIGSEGV_RECOVERY
+  user_handler = (sigsegv_handler_t)NULL;
+
+# if HAVE_STACK_OVERFLOW_RECOVERY
+  if (!stk_user_handler)
+# endif
+    {
+      SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
+    }
+#endif
+}
+
+int
+sigsegv_leave_handler (void (*continuation) (void*, void*, void*),
+                       void* cont_arg1, void* cont_arg2, void* cont_arg3)
+{
+#if HAVE_STACK_OVERFLOW_RECOVERY
+  /*
+   * Reset the system's knowledge that we are executing on the alternate
+   * stack. If we didn't do that, siglongjmp would be needed instead of
+   * longjmp to leave the signal handler.
+   */
+  sigsegv_reset_onstack_flag ();
+#endif
+  (*continuation) (cont_arg1, cont_arg2, cont_arg3);
+  return 1;
+}
+
+int
+stackoverflow_install_handler (stackoverflow_handler_t handler,
+                               void *extra_stack, size_t extra_stack_size)
+{
+#if HAVE_STACK_OVERFLOW_RECOVERY
+# if HAVE_STACKVMA
+  if (!stack_top)
+    {
+      int dummy;
+      remember_stack_top (&dummy);
+      if (!stack_top)
+        return -1;
+    }
+# endif
+
+  stk_user_handler = handler;
+  stk_extra_stack = (uintptr_t) extra_stack;
+  stk_extra_stack_size = extra_stack_size;
+  {
+    stack_t ss;
+# if SIGALTSTACK_SS_REVERSED
+    ss.ss_sp = (char *) extra_stack + extra_stack_size - sizeof (void *);
+    ss.ss_size = extra_stack_size - sizeof (void *);
+# else
+    ss.ss_sp = extra_stack;
+    ss.ss_size = extra_stack_size;
+# endif
+    ss.ss_flags = 0; /* no SS_DISABLE */
+    if (sigaltstack (&ss, (stack_t*)0) < 0)
+      return -1;
+  }
+
+  /* Install the signal handlers with SA_ONSTACK.  */
+  SIGSEGV_FOR_ALL_SIGNALS (sig, install_for (sig);)
+  return 0;
+#else
+  return -1;
+#endif
+}
+
+void
+stackoverflow_deinstall_handler (void)
+{
+#if HAVE_STACK_OVERFLOW_RECOVERY
+  stk_user_handler = (stackoverflow_handler_t) NULL;
+
+# if HAVE_SIGSEGV_RECOVERY
+  if (user_handler)
+    {
+      /* Reinstall the signal handlers without SA_ONSTACK, to avoid Linux
+         bug.  */
+      SIGSEGV_FOR_ALL_SIGNALS (sig, install_for (sig);)
+    }
+  else
+# endif
+    {
+      SIGSEGV_FOR_ALL_SIGNALS (sig, signal (sig, SIG_DFL);)
+    }
+
+  {
+    stack_t ss;
+    ss.ss_flags = SS_DISABLE;
+    if (sigaltstack (&ss, (stack_t *) 0) < 0)
+      perror ("gnulib sigsegv (stackoverflow_deinstall_handler)");
+  }
+#endif
+}
diff --git a/lib/sigsegv.in.h b/lib/sigsegv.in.h
new file mode 100644 (file)
index 0000000..17ad87e
--- /dev/null
@@ -0,0 +1,244 @@
+/* Page fault handling library.
+   Copyright (C) 1998-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible.  */
+
+#ifndef _SIGSEGV_H
+#define _SIGSEGV_H
+
+/* Get size_t.  */
+#include <stddef.h>
+
+/* Define the fault context structure.  */
+#if defined __linux__ || defined __ANDROID__ \
+    || (defined __FreeBSD__ && (defined __arm__ || defined __armhf__ || defined __arm64__)) \
+    || defined __NetBSD__ \
+    || defined _AIX || defined __sun \
+    || defined __CYGWIN__
+/* Linux, FreeBSD, NetBSD, AIX, Solaris, Cygwin */
+# include <ucontext.h>
+#elif (defined __APPLE__ && defined __MACH__)
+/* macOS */
+# include <sys/ucontext.h>
+#elif defined __HAIKU__
+/* Haiku */
+# include <signal.h>
+#endif
+
+/* Correct the value of SIGSTKSZ on some systems.
+   glibc >= 2.34: When _GNU_SOURCE is defined, SIGSTKSZ is no longer a
+   compile-time constant.  But most programs need a simple constant.
+   AIX 64-bit: original value 4096 is too small.
+   HP-UX: original value 8192 is too small.
+   Solaris 11/x86_64: original value 8192 is too small.  */
+#include <signal.h>
+#if __GLIBC__ >= 2
+# undef SIGSTKSZ
+# if defined __ia64__
+#  define SIGSTKSZ 262144
+# else
+#  define SIGSTKSZ 65536
+# endif
+#endif
+#if defined _AIX && defined _ARCH_PPC64
+# undef SIGSTKSZ
+# define SIGSTKSZ 8192
+#endif
+#if defined __hpux || (defined __sun && (defined __x86_64__ || defined __amd64__))
+# undef SIGSTKSZ
+# define SIGSTKSZ 16384
+#endif
+
+/* HAVE_SIGSEGV_RECOVERY
+   is defined if the system supports catching SIGSEGV.  */
+#if defined __linux__ || defined __ANDROID__ || defined __GNU__ \
+    || defined __FreeBSD_kernel__ || (defined __FreeBSD__ && !(defined __sparc__ || defined __sparc64__)) || defined __DragonFly__ \
+    || defined __NetBSD__ \
+    || defined __OpenBSD__ \
+    || (defined __APPLE__ && defined __MACH__) \
+    || defined _AIX || defined __sgi || defined __sun \
+    || defined __CYGWIN__ || defined __HAIKU__
+/* Linux, Hurd, GNU/kFreeBSD, FreeBSD, NetBSD, OpenBSD, macOS, AIX, IRIX, Solaris, Cygwin, Haiku */
+# define HAVE_SIGSEGV_RECOVERY 1
+#endif
+
+/* HAVE_STACK_OVERFLOW_RECOVERY
+   is defined if stack overflow can be caught.  */
+#if defined __linux__ || defined __ANDROID__ || defined __GNU__ \
+    || defined __FreeBSD_kernel__ || (defined __FreeBSD__ && !(defined __sparc__ || defined __sparc64__)) || defined __DragonFly__ \
+    || (defined __NetBSD__ && !(defined __sparc__ || defined __sparc64__)) \
+    || defined __OpenBSD__ \
+    || (defined __APPLE__ && defined __MACH__) \
+    || defined _AIX || defined __sgi || defined __sun \
+    || defined __CYGWIN__ || defined __HAIKU__
+/* Linux, Hurd, GNU/kFreeBSD, FreeBSD, NetBSD, OpenBSD, macOS, AIX, IRIX, Solaris, Cygwin, Haiku */
+# define HAVE_STACK_OVERFLOW_RECOVERY 1
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define LIBSIGSEGV_VERSION 0x020D    /* version number: (major<<8) + minor */
+extern int libsigsegv_version;       /* Likewise */
+
+/* -------------------------------------------------------------------------- */
+
+#if 1 /* really only HAVE_SIGSEGV_RECOVERY */
+
+/*
+ * The mask of bits that are set to zero in a fault address that gets passed
+ * to a global SIGSEGV handler.
+ * On some platforms, the precise fault address is not known, only the memory
+ * page into which the fault address falls. This is apparently allowed by POSIX:
+ * <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>
+ * says: "For some implementations, the value of si_addr may be inaccurate."
+ * In this case, the returned fault address is rounded down to a multiple of
+ * getpagesize() = sysconf(_SC_PAGESIZE).
+ * On such platforms, we define SIGSEGV_FAULT_ADDRESS_ALIGNMENT to be an upper
+ * bound for getpagesize() (and, like getpagesize(), also a power of 2).
+ * On the platforms where the returned fault address is the precise one, we
+ * define SIGSEGV_FAULT_ADDRESS_ALIGNMENT to 1.
+ */
+# if defined __NetBSD__ && (defined __sparc__ || defined __sparc64__)
+  /* getpagesize () is 0x1000 or 0x2000, depending on hardware.  */
+#  define SIGSEGV_FAULT_ADDRESS_ALIGNMENT 0x2000UL
+# elif defined __linux__ && (defined __s390__ || defined __s390x__)
+  /* getpagesize () is 0x1000.  */
+#  define SIGSEGV_FAULT_ADDRESS_ALIGNMENT 0x1000UL
+# else
+#  define SIGSEGV_FAULT_ADDRESS_ALIGNMENT 1UL
+# endif
+
+/*
+ * The type of a global SIGSEGV handler.
+ * The fault address, with the bits (SIGSEGV_FAULT_ADDRESS_ALIGNMENT - 1)
+ * cleared, is passed as argument.
+ * The access type (read access or write access) is not passed; your handler
+ * has to know itself how to distinguish these two cases.
+ * The second argument is 0, meaning it could also be a stack overflow, or 1,
+ * meaning the handler should seriously try to fix the fault.
+ * The return value should be nonzero if the handler has done its job
+ * and no other handler should be called, or 0 if the handler declines
+ * responsibility for the given address.
+ *
+ * The handler is run at a moment when nothing about the global state of the
+ * program is known. Therefore it cannot use facilities that manipulate global
+ * variables or locks. In particular, it cannot use malloc(); use mmap()
+ * instead. It cannot use fopen(); use open() instead. Etc. All global
+ * variables that are accessed by the handler should be marked 'volatile'.
+ */
+typedef int (*sigsegv_handler_t) (void* fault_address, int serious);
+
+/*
+ * Installs a global SIGSEGV handler.
+ * This should be called once only, and it ignores any previously installed
+ * SIGSEGV handler.
+ * Returns 0 on success, or -1 if the system doesn't support catching SIGSEGV.
+ */
+extern int sigsegv_install_handler (sigsegv_handler_t handler);
+
+/*
+ * Deinstalls the global SIGSEGV handler.
+ * This goes back to the state where no SIGSEGV handler is installed.
+ */
+extern void sigsegv_deinstall_handler (void);
+
+/*
+ * Prepares leaving a SIGSEGV handler (through longjmp or similar means).
+ * Control is transferred by calling CONTINUATION with CONT_ARG1, CONT_ARG2,
+ * CONT_ARG3 as arguments.
+ * CONTINUATION must not return.
+ * The sigsegv_leave_handler function may return if called from a SIGSEGV
+ * handler; its return value should be used as the handler's return value.
+ * The sigsegv_leave_handler function does not return if called from a
+ * stack overflow handler.
+ */
+extern int sigsegv_leave_handler (void (*continuation) (void*, void*, void*), void* cont_arg1, void* cont_arg2, void* cont_arg3);
+
+#endif /* HAVE_SIGSEGV_RECOVERY */
+
+#if 1 /* really only HAVE_STACK_OVERFLOW_RECOVERY */
+
+/*
+ * The type of a context passed to a stack overflow handler.
+ * This type is system dependent; on some platforms it is an 'ucontext_t *',
+ * on some platforms it is a 'struct sigcontext *', on others merely an
+ * opaque 'void *'.
+ */
+# if defined __linux__ || defined __ANDROID__ \
+     || (defined __FreeBSD__ && (defined __arm__ || defined __armhf__ || defined __arm64__)) \
+     || defined __NetBSD__ \
+     || (defined __APPLE__ && defined __MACH__) \
+     || defined _AIX || defined __sun \
+     || defined __CYGWIN__ || defined __HAIKU__
+typedef ucontext_t *stackoverflow_context_t;
+# elif defined __GNU__ \
+       || defined __FreeBSD_kernel__ || (defined __FreeBSD__ && !(defined __sparc__ || defined __sparc64__)) || defined __DragonFly__ \
+       || defined __OpenBSD__ || defined __sgi
+typedef struct sigcontext *stackoverflow_context_t;
+# else
+typedef void *stackoverflow_context_t;
+# endif
+
+/*
+ * The type of a stack overflow handler.
+ * Such a handler should perform a longjmp call in order to reduce the amount
+ * of stack needed. It must not return.
+ * The emergency argument is 0 when the stack could be repared, or 1 if the
+ * application should better save its state and exit now.
+ *
+ * The handler is run at a moment when nothing about the global state of the
+ * program is known. Therefore it cannot use facilities that manipulate global
+ * variables or locks. In particular, it cannot use malloc(); use mmap()
+ * instead. It cannot use fopen(); use open() instead. Etc. All global
+ * variables that are accessed by the handler should be marked 'volatile'.
+ */
+typedef void (*stackoverflow_handler_t) (int emergency, stackoverflow_context_t scp);
+
+/*
+ * Installs a stack overflow handler.
+ * The extra_stack argument is a pointer to a pre-allocated area used as a
+ * stack for executing the handler. It typically comes from a static variable
+ * or from heap-allocated memoty; placing it on the main stack may fail on
+ * some operating systems.
+ * Its size, passed in extra_stack_size, should be sufficiently large.  The
+ * following code determines an appropriate size:
+ *   #include <signal.h>
+ *   #ifndef SIGSTKSZ         / * glibc defines SIGSTKSZ for this purpose * /
+ *   # define SIGSTKSZ 16384  / * on most platforms, 16 KB are sufficient * /
+ *   #endif
+ * Returns 0 on success, or -1 if the system doesn't support catching stack
+ * overflow.
+ */
+extern int stackoverflow_install_handler (stackoverflow_handler_t handler,
+                                          void* extra_stack, size_t extra_stack_size);
+
+/*
+ * Deinstalls the stack overflow handler.
+ */
+extern void stackoverflow_deinstall_handler (void);
+
+#endif /* HAVE_STACK_OVERFLOW_RECOVERY */
+
+/* -------------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SIGSEGV_H */
index 00500b5..1186ba9 100644 (file)
@@ -1,19 +1,19 @@
 /* size_max.h -- declare SIZE_MAX through system headers
-   Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef GNULIB_SIZE_MAX_H
 #define GNULIB_SIZE_MAX_H
diff --git a/lib/stackvma.c b/lib/stackvma.c
new file mode 100644 (file)
index 0000000..a810afe
--- /dev/null
@@ -0,0 +1,2081 @@
+/* Determine the virtual memory area of a given address.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006  Paolo Bonzini <bonzini@gnu.org>
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible and Paolo Bonzini.  */
+
+#include <config.h>
+
+/* On Solaris in 32-bit mode, when gnulib module 'largefile' is in use,
+   prevent a compilation error
+     "Cannot use procfs in the large file compilation environment"
+   On Android, when targeting Android 4.4 or older with a GCC toolchain,
+   prevent a compilation error
+     "error: call to 'mmap' declared with attribute error: mmap is not
+      available with _FILE_OFFSET_BITS=64 when using GCC until android-21.
+      Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or
+      switch to Clang."
+   The files that we access in this compilation unit are less than 2 GB
+   large.  */
+#if defined __sun || defined __ANDROID__
+# undef _FILE_OFFSET_BITS
+#endif
+
+/* Specification.  */
+#include "stackvma.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* =========================== stackvma-simple.c =========================== */
+
+#if defined __linux__ || defined __ANDROID__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ \
+    || (defined __APPLE__ && defined __MACH__) \
+    || defined __sgi || defined __sun \
+    || defined __CYGWIN__ || defined __HAIKU__
+
+/* This file contains the proximity test function for the simple cases, where
+   the OS has an API for enumerating the mapped ranges of virtual memory.  */
+
+# if STACK_DIRECTION < 0
+
+/* Info about the gap between this VMA and the previous one.
+   addr must be < vma->start.  */
+static int
+simple_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  return (vma->start - addr <= (vma->start - vma->prev_end) / 2);
+}
+
+# endif
+# if STACK_DIRECTION > 0
+
+/* Info about the gap between this VMA and the next one.
+   addr must be > vma->end - 1.  */
+static int
+simple_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  return (addr - vma->end < (vma->next_start - vma->end) / 2);
+}
+
+# endif
+
+#endif
+
+/* =========================== stackvma-rofile.c =========================== */
+/* Buffered read-only streams.  */
+
+#if defined __linux__ || defined __ANDROID__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ \
+    || defined __CYGWIN__
+
+# include <errno.h> /* errno, EINTR */
+# include <fcntl.h> /* open, O_RDONLY */
+# include <stddef.h> /* size_t */
+# include <unistd.h> /* getpagesize, lseek, read, close */
+# include <sys/types.h>
+# include <sys/mman.h> /* mmap, munmap */
+
+# if defined __linux__ || defined __ANDROID__
+#  include <limits.h> /* PATH_MAX */
+# endif
+
+/* Buffered read-only streams.
+   We cannot use <stdio.h> here, because fopen() calls malloc(), and a malloc()
+   call may have been interrupted.
+   Also, we cannot use multiple read() calls, because if the buffer size is
+   smaller than the file's contents:
+     - On NetBSD, the second read() call would return 0, thus making the file
+       appear truncated.
+     - On DragonFly BSD, the first read() call would fail with errno = EFBIG.
+     - On all platforms, if some other thread is doing memory allocations or
+       deallocations between two read() calls, there is a high risk that the
+       result of these two read() calls don't fit together, and as a
+       consequence we will parse gargage and either omit some VMAs or return
+       VMAs with nonsensical addresses.
+   So use mmap(), and ignore the resulting VMA.
+   The stack-allocated buffer cannot be too large, because this can be called
+   when we are in the context of an alternate stack of just SIGSTKSZ bytes.  */
+
+# if defined __linux__ || defined __ANDROID__
+  /* On Linux, if the file does not entirely fit into the buffer, the read()
+     function stops before the line that would come out truncated.  The
+     maximum size of such a line is 73 + PATH_MAX bytes.  To be sure that we
+     have read everything, we must verify that at least that many bytes are
+     left when read() returned.  */
+#  define MIN_LEFTOVER (73 + PATH_MAX)
+# else
+#  define MIN_LEFTOVER 1
+# endif
+
+# if MIN_LEFTOVER < 1024
+#  define STACK_ALLOCATED_BUFFER_SIZE 1024
+# else
+  /* There is no point in using a stack-allocated buffer if it is too small
+     anyway.  */
+#  define STACK_ALLOCATED_BUFFER_SIZE 1
+# endif
+
+struct rofile
+  {
+    size_t position;
+    size_t filled;
+    int eof_seen;
+    /* These fields deal with allocation of the buffer.  */
+    char *buffer;
+    char *auxmap;
+    size_t auxmap_length;
+    uintptr_t auxmap_start;
+    uintptr_t auxmap_end;
+    char stack_allocated_buffer[STACK_ALLOCATED_BUFFER_SIZE];
+  };
+
+/* Open a read-only file stream.  */
+static int
+rof_open (struct rofile *rof, const char *filename)
+{
+  int fd;
+  uintptr_t pagesize;
+  size_t size;
+
+  fd = open (filename, O_RDONLY);
+  if (fd < 0)
+    return -1;
+  rof->position = 0;
+  rof->eof_seen = 0;
+  /* Try the static buffer first.  */
+  pagesize = 0;
+  rof->buffer = rof->stack_allocated_buffer;
+  size = sizeof (rof->stack_allocated_buffer);
+  rof->auxmap = NULL;
+  rof->auxmap_start = 0;
+  rof->auxmap_end = 0;
+  for (;;)
+    {
+      /* Attempt to read the contents in a single system call.  */
+      if (size > MIN_LEFTOVER)
+        {
+          int n = read (fd, rof->buffer, size);
+          if (n < 0 && errno == EINTR)
+            goto retry;
+# if defined __DragonFly__
+          if (!(n < 0 && errno == EFBIG))
+# endif
+            {
+              if (n <= 0)
+                /* Empty file.  */
+                goto fail1;
+              if (n + MIN_LEFTOVER <= size)
+                {
+                  /* The buffer was sufficiently large.  */
+                  rof->filled = n;
+# if defined __linux__ || defined __ANDROID__
+                  /* On Linux, the read() call may stop even if the buffer was
+                     large enough.  We need the equivalent of full_read().  */
+                  for (;;)
+                    {
+                      n = read (fd, rof->buffer + rof->filled, size - rof->filled);
+                      if (n < 0 && errno == EINTR)
+                        goto retry;
+                      if (n < 0)
+                        /* Some error.  */
+                        goto fail1;
+                      if (n + MIN_LEFTOVER > size - rof->filled)
+                        /* Allocate a larger buffer.  */
+                        break;
+                      if (n == 0)
+                        {
+                          /* Reached the end of file.  */
+                          close (fd);
+                          return 0;
+                        }
+                      rof->filled += n;
+                    }
+# else
+                  close (fd);
+                  return 0;
+# endif
+                }
+            }
+        }
+      /* Allocate a larger buffer.  */
+      if (pagesize == 0)
+        {
+          pagesize = getpagesize ();
+          size = pagesize;
+          while (size <= MIN_LEFTOVER)
+            size = 2 * size;
+        }
+      else
+        {
+          size = 2 * size;
+          if (size == 0)
+            /* Wraparound.  */
+            goto fail1;
+          if (rof->auxmap != NULL)
+            munmap (rof->auxmap, rof->auxmap_length);
+        }
+      rof->auxmap = (void *) mmap ((void *) 0, size, PROT_READ | PROT_WRITE,
+                                   MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+      if (rof->auxmap == (void *) -1)
+        {
+          close (fd);
+          return -1;
+        }
+      rof->auxmap_length = size;
+      rof->auxmap_start = (uintptr_t) rof->auxmap;
+      rof->auxmap_end = rof->auxmap_start + size;
+      rof->buffer = (char *) rof->auxmap;
+     retry:
+      /* Restart.  */
+      if (lseek (fd, 0, SEEK_SET) < 0)
+        {
+          close (fd);
+          fd = open (filename, O_RDONLY);
+          if (fd < 0)
+            goto fail2;
+        }
+    }
+ fail1:
+  close (fd);
+ fail2:
+  if (rof->auxmap != NULL)
+    munmap (rof->auxmap, rof->auxmap_length);
+  return -1;
+}
+
+/* Return the next byte from a read-only file stream without consuming it,
+   or -1 at EOF.  */
+static int
+rof_peekchar (struct rofile *rof)
+{
+  if (rof->position == rof->filled)
+    {
+      rof->eof_seen = 1;
+      return -1;
+    }
+  return (unsigned char) rof->buffer[rof->position];
+}
+
+/* Return the next byte from a read-only file stream, or -1 at EOF.  */
+static int
+rof_getchar (struct rofile *rof)
+{
+  int c = rof_peekchar (rof);
+  if (c >= 0)
+    rof->position++;
+  return c;
+}
+
+/* Parse an unsigned hexadecimal number from a read-only file stream.  */
+static int
+rof_scanf_lx (struct rofile *rof, uintptr_t *valuep)
+{
+  uintptr_t value = 0;
+  unsigned int numdigits = 0;
+  for (;;)
+    {
+      int c = rof_peekchar (rof);
+      if (c >= '0' && c <= '9')
+        value = (value << 4) + (c - '0');
+      else if (c >= 'A' && c <= 'F')
+        value = (value << 4) + (c - 'A' + 10);
+      else if (c >= 'a' && c <= 'f')
+        value = (value << 4) + (c - 'a' + 10);
+      else
+        break;
+      rof_getchar (rof);
+      numdigits++;
+    }
+  if (numdigits == 0)
+    return -1;
+  *valuep = value;
+  return 0;
+}
+
+/* Close a read-only file stream.  */
+static void
+rof_close (struct rofile *rof)
+{
+  if (rof->auxmap != NULL)
+    munmap (rof->auxmap, rof->auxmap_length);
+}
+
+#endif
+
+/* ========================== stackvma-vma-iter.c ========================== */
+/* Iterate through the virtual memory areas of the current process,
+   by reading from the /proc file system.  */
+
+/* This code is a simplified copy (no handling of protection flags) of the
+   code in gnulib's lib/vma-iter.c.  */
+
+#if defined __linux__ || defined __ANDROID__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ \
+    || defined __CYGWIN__
+
+/* Forward declarations.  */
+struct callback_locals;
+static int callback (struct callback_locals *locals, uintptr_t start, uintptr_t end);
+
+# if defined __linux__ || defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined __FreeBSD__) || defined __CYGWIN__
+/* GNU/kFreeBSD mounts /proc as linprocfs, which looks like a Linux /proc
+   file system.  */
+
+static int
+vma_iterate_proc (struct callback_locals *locals)
+{
+  struct rofile rof;
+
+  /* Open the current process' maps file.  It describes one VMA per line.  */
+  if (rof_open (&rof, "/proc/self/maps") >= 0)
+    {
+      uintptr_t auxmap_start = rof.auxmap_start;
+      uintptr_t auxmap_end = rof.auxmap_end;
+
+      for (;;)
+        {
+          uintptr_t start, end;
+          int c;
+
+          /* Parse one line.  First start and end.  */
+          if (!(rof_scanf_lx (&rof, &start) >= 0
+                && rof_getchar (&rof) == '-'
+                && rof_scanf_lx (&rof, &end) >= 0))
+            break;
+          while (c = rof_getchar (&rof), c != -1 && c != '\n')
+            ;
+
+          if (start <= auxmap_start && auxmap_end - 1 <= end - 1)
+            {
+              /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1]
+                 = [start,auxmap_start-1] u [auxmap_end,end-1].  */
+              if (start < auxmap_start)
+                if (callback (locals, start, auxmap_start))
+                  break;
+              if (auxmap_end - 1 < end - 1)
+                if (callback (locals, auxmap_end, end))
+                  break;
+            }
+          else
+            {
+              if (callback (locals, start, end))
+                break;
+            }
+        }
+      rof_close (&rof);
+      return 0;
+    }
+
+  return -1;
+}
+
+# elif defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__
+
+static int
+vma_iterate_proc (struct callback_locals *locals)
+{
+  struct rofile rof;
+
+  /* Open the current process' maps file.  It describes one VMA per line.
+     On FreeBSD:
+       Cf. <https://www.freebsd.org/cgi/cvsweb.cgi/src/sys/fs/procfs/procfs_map.c?annotate=HEAD>
+     On NetBSD, there are two such files:
+       - /proc/curproc/map in near-FreeBSD syntax,
+       - /proc/curproc/maps in Linux syntax.
+       Cf. <http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/miscfs/procfs/procfs_map.c?rev=HEAD> */
+  if (rof_open (&rof, "/proc/curproc/map") >= 0)
+    {
+      uintptr_t auxmap_start = rof.auxmap_start;
+      uintptr_t auxmap_end = rof.auxmap_end;
+
+      for (;;)
+        {
+          uintptr_t start, end;
+          int c;
+
+          /* Parse one line.  First start.  */
+          if (!(rof_getchar (&rof) == '0'
+                && rof_getchar (&rof) == 'x'
+                && rof_scanf_lx (&rof, &start) >= 0))
+            break;
+          while (c = rof_peekchar (&rof), c == ' ' || c == '\t')
+            rof_getchar (&rof);
+          /* Then end.  */
+          if (!(rof_getchar (&rof) == '0'
+                && rof_getchar (&rof) == 'x'
+                && rof_scanf_lx (&rof, &end) >= 0))
+            break;
+          while (c = rof_getchar (&rof), c != -1 && c != '\n')
+            ;
+
+          if (start <= auxmap_start && auxmap_end - 1 <= end - 1)
+            {
+              /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1]
+                 = [start,auxmap_start-1] u [auxmap_end,end-1].  */
+              if (start < auxmap_start)
+                if (callback (locals, start, auxmap_start))
+                  break;
+              if (auxmap_end - 1 < end - 1)
+                if (callback (locals, auxmap_end, end))
+                  break;
+            }
+          else
+            {
+              if (callback (locals, start, end))
+                break;
+            }
+        }
+      rof_close (&rof);
+      return 0;
+    }
+
+  return -1;
+}
+
+# endif
+
+# if (defined __FreeBSD_kernel__ || defined __FreeBSD__) && defined KERN_PROC_VMMAP /* FreeBSD >= 7.1 */
+
+#  include <sys/user.h> /* struct kinfo_vmentry */
+#  include <sys/sysctl.h> /* sysctl */
+
+static int
+vma_iterate_bsd (struct callback_locals *locals)
+{
+  /* Documentation: https://www.freebsd.org/cgi/man.cgi?sysctl(3)  */
+  int info_path[] = { CTL_KERN, KERN_PROC, KERN_PROC_VMMAP, getpid () };
+  size_t len;
+  size_t pagesize;
+  size_t memneed;
+  void *auxmap;
+  unsigned long auxmap_start;
+  unsigned long auxmap_end;
+  char *mem;
+  char *p;
+  char *p_end;
+
+  len = 0;
+  if (sysctl (info_path, 4, NULL, &len, NULL, 0) < 0)
+    return -1;
+  /* Allow for small variations over time.  In a multithreaded program
+     new VMAs can be allocated at any moment.  */
+  len = 2 * len + 200;
+  /* Allocate memneed bytes of memory.
+     We cannot use alloca here, because not much stack space is guaranteed.
+     We also cannot use malloc here, because a malloc() call may call mmap()
+     and thus pre-allocate available memory.
+     So use mmap(), and ignore the resulting VMA.  */
+  pagesize = getpagesize ();
+  memneed = len;
+  memneed = ((memneed - 1) / pagesize + 1) * pagesize;
+  auxmap = (void *) mmap ((void *) 0, memneed, PROT_READ | PROT_WRITE,
+                          MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+  if (auxmap == (void *) -1)
+    return -1;
+  auxmap_start = (unsigned long) auxmap;
+  auxmap_end = auxmap_start + memneed;
+  mem = (char *) auxmap;
+  if (sysctl (info_path, 4, mem, &len, NULL, 0) < 0)
+    {
+      munmap (auxmap, memneed);
+      return -1;
+    }
+  p = mem;
+  p_end = mem + len;
+  while (p < p_end)
+    {
+      struct kinfo_vmentry *kve = (struct kinfo_vmentry *) p;
+      unsigned long start = kve->kve_start;
+      unsigned long end = kve->kve_end;
+      if (start <= auxmap_start && auxmap_end - 1 <= end - 1)
+        {
+          /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1]
+             = [start,auxmap_start-1] u [auxmap_end,end-1].  */
+          if (start < auxmap_start)
+            if (callback (locals, start, auxmap_start))
+              break;
+          if (auxmap_end - 1 < end - 1)
+            if (callback (locals, auxmap_end, end))
+              break;
+        }
+      else
+        {
+          if (callback (locals, start, end))
+            break;
+        }
+      p += kve->kve_structsize;
+    }
+  munmap (auxmap, memneed);
+  return 0;
+}
+
+# else
+
+#  define vma_iterate_bsd(locals) (-1)
+
+# endif
+
+
+/* Iterate over the virtual memory areas of the current process.
+   If such iteration is supported, the callback is called once for every
+   virtual memory area, in ascending order, with the following arguments:
+     - LOCALS is the same argument as passed to vma_iterate.
+     - START is the address of the first byte in the area, page-aligned.
+     - END is the address of the last byte in the area plus 1, page-aligned.
+       Note that it may be 0 for the last area in the address space.
+   If the callback returns 0, the iteration continues.  If it returns 1,
+   the iteration terminates prematurely.
+   This function may open file descriptors, but does not call malloc().
+   Return 0 if all went well, or -1 in case of error.  */
+static int
+vma_iterate (struct callback_locals *locals)
+{
+# if defined __FreeBSD__
+  /* On FreeBSD with procfs (but not GNU/kFreeBSD, which uses linprocfs), the
+     function vma_iterate_proc does not return the virtual memory areas that
+     were created by anonymous mmap.  See
+     <https://svnweb.freebsd.org/base/head/sys/fs/procfs/procfs_map.c?view=markup>
+     So use vma_iterate_proc only as a fallback.  */
+  int retval = vma_iterate_bsd (locals);
+  if (retval == 0)
+      return 0;
+
+  return vma_iterate_proc (locals);
+# else
+  /* On the other platforms, try the /proc approach first, and the sysctl()
+     as a fallback.  */
+  int retval = vma_iterate_proc (locals);
+  if (retval == 0)
+      return 0;
+
+  return vma_iterate_bsd (locals);
+# endif
+}
+
+#endif
+
+/* =========================== stackvma-mincore.c =========================== */
+
+/* mincore() is a system call that allows to inquire the status of a
+   range of pages of virtual memory.  In particular, it allows to inquire
+   whether a page is mapped at all (except on Mac OS X, where mincore
+   returns 0 even for unmapped addresses).
+   As of 2006, mincore() is supported by:        possible bits:
+     - Linux,   since Linux 2.4 and glibc 2.2,   1
+     - Solaris, since Solaris 9,                 1
+     - MacOS X, since MacOS X 10.3 (at least),   1
+     - FreeBSD, since FreeBSD 6.0,               MINCORE_{INCORE,REFERENCED,MODIFIED}
+     - NetBSD,  since NetBSD 3.0 (at least),     1
+     - OpenBSD, since OpenBSD 2.6 (at least),    1
+     - AIX,     since AIX 5.3,                   1
+   As of 2019, also on
+     - Hurd.
+   However, while the API allows to easily determine the bounds of mapped
+   virtual memory, it does not make it easy to find the bounds of _unmapped_
+   virtual memory ranges.  We try to work around this, but it may still be
+   slow.  */
+
+#if defined __linux__ || defined __ANDROID__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ /* || defined __OpenBSD__ */ \
+    /* || (defined __APPLE__ && defined __MACH__) */ \
+    || defined _AIX || defined __sun
+
+# include <unistd.h> /* getpagesize, mincore */
+# include <sys/types.h>
+# include <sys/mman.h> /* mincore */
+
+/* The AIX declaration of mincore() uses 'caddr_t', whereas the other platforms
+   use 'void *'. */
+# ifdef _AIX
+typedef caddr_t MINCORE_ADDR_T;
+# else
+typedef void* MINCORE_ADDR_T;
+# endif
+
+/* The glibc and musl declaration of mincore() uses 'unsigned char *', whereas
+   the BSD declaration uses 'char *'.  */
+# if __GLIBC__ >= 2 || defined __linux__ || defined __ANDROID__
+typedef unsigned char pageinfo_t;
+# else
+typedef char pageinfo_t;
+# endif
+
+/* Cache for getpagesize().  */
+static uintptr_t pagesize;
+
+/* Initialize pagesize.  */
+static void
+init_pagesize (void)
+{
+  pagesize = getpagesize ();
+}
+
+/* Test whether the page starting at ADDR is among the address range.
+   ADDR must be a multiple of pagesize.  */
+static int
+is_mapped (uintptr_t addr)
+{
+  pageinfo_t vec[1];
+  return mincore ((MINCORE_ADDR_T) addr, pagesize, vec) >= 0;
+}
+
+/* Assuming that the page starting at ADDR is among the address range,
+   return the start of its virtual memory range.
+   ADDR must be a multiple of pagesize.  */
+static uintptr_t
+mapped_range_start (uintptr_t addr)
+{
+  /* Use a moderately sized VEC here, small enough that it fits on the stack
+     (without requiring malloc).  */
+  pageinfo_t vec[1024];
+  uintptr_t stepsize = sizeof (vec);
+
+  for (;;)
+    {
+      uintptr_t max_remaining;
+
+      if (addr == 0)
+        return addr;
+
+      max_remaining = addr / pagesize;
+      if (stepsize > max_remaining)
+        stepsize = max_remaining;
+      if (mincore ((MINCORE_ADDR_T) (addr - stepsize * pagesize),
+                   stepsize * pagesize, vec) < 0)
+        /* Time to search in smaller steps.  */
+        break;
+      /* The entire range exists.  Continue searching in large steps.  */
+      addr -= stepsize * pagesize;
+    }
+  for (;;)
+    {
+      uintptr_t halfstepsize1;
+      uintptr_t halfstepsize2;
+
+      if (stepsize == 1)
+        return addr;
+
+      /* Here we know that less than stepsize pages exist starting at addr.  */
+      halfstepsize1 = (stepsize + 1) / 2;
+      halfstepsize2 = stepsize / 2;
+      /* halfstepsize1 + halfstepsize2 = stepsize.  */
+
+      if (mincore ((MINCORE_ADDR_T) (addr - halfstepsize1 * pagesize),
+                   halfstepsize1 * pagesize, vec) < 0)
+        stepsize = halfstepsize1;
+      else
+        {
+          addr -= halfstepsize1 * pagesize;
+          stepsize = halfstepsize2;
+        }
+    }
+}
+
+/* Assuming that the page starting at ADDR is among the address range,
+   return the end of its virtual memory range + 1.
+   ADDR must be a multiple of pagesize.  */
+static uintptr_t
+mapped_range_end (uintptr_t addr)
+{
+  /* Use a moderately sized VEC here, small enough that it fits on the stack
+     (without requiring malloc).  */
+  pageinfo_t vec[1024];
+  uintptr_t stepsize = sizeof (vec);
+
+  addr += pagesize;
+  for (;;)
+    {
+      uintptr_t max_remaining;
+
+      if (addr == 0) /* wrapped around? */
+        return addr;
+
+      max_remaining = (- addr) / pagesize;
+      if (stepsize > max_remaining)
+        stepsize = max_remaining;
+      if (mincore ((MINCORE_ADDR_T) addr, stepsize * pagesize, vec) < 0)
+        /* Time to search in smaller steps.  */
+        break;
+      /* The entire range exists.  Continue searching in large steps.  */
+      addr += stepsize * pagesize;
+    }
+  for (;;)
+    {
+      uintptr_t halfstepsize1;
+      uintptr_t halfstepsize2;
+
+      if (stepsize == 1)
+        return addr;
+
+      /* Here we know that less than stepsize pages exist starting at addr.  */
+      halfstepsize1 = (stepsize + 1) / 2;
+      halfstepsize2 = stepsize / 2;
+      /* halfstepsize1 + halfstepsize2 = stepsize.  */
+
+      if (mincore ((MINCORE_ADDR_T) addr, halfstepsize1 * pagesize, vec) < 0)
+        stepsize = halfstepsize1;
+      else
+        {
+          addr += halfstepsize1 * pagesize;
+          stepsize = halfstepsize2;
+        }
+    }
+}
+
+/* Determine whether an address range [ADDR1..ADDR2] is completely unmapped.
+   ADDR1 must be <= ADDR2.  */
+static int
+is_unmapped (uintptr_t addr1, uintptr_t addr2)
+{
+  uintptr_t count;
+  uintptr_t stepsize;
+
+  /* Round addr1 down.  */
+  addr1 = (addr1 / pagesize) * pagesize;
+  /* Round addr2 up and turn it into an exclusive bound.  */
+  addr2 = ((addr2 / pagesize) + 1) * pagesize;
+
+  /* This is slow: mincore() does not provide a way to determine the bounds
+     of the gaps directly.  So we have to use mincore() on individual pages
+     over and over again.  Only after we've verified that all pages are
+     unmapped, we know that the range is completely unmapped.
+     If we were to traverse the pages from bottom to top or from top to bottom,
+     it would be slow even in the average case.  To speed up the search, we
+     exploit the fact that mapped memory ranges are larger than one page on
+     average, therefore we have good chances of hitting a mapped area if we
+     traverse only every second, or only fourth page, etc.  This doesn't
+     decrease the worst-case runtime, only the average runtime.  */
+  count = (addr2 - addr1) / pagesize;
+  /* We have to test is_mapped (addr1 + i * pagesize) for 0 <= i < count.  */
+  for (stepsize = 1; stepsize < count; )
+    stepsize = 2 * stepsize;
+  for (;;)
+    {
+      uintptr_t addr_stepsize;
+      uintptr_t i;
+      uintptr_t addr;
+
+      stepsize = stepsize / 2;
+      if (stepsize == 0)
+        break;
+      addr_stepsize = stepsize * pagesize;
+      for (i = stepsize, addr = addr1 + addr_stepsize;
+           i < count;
+           i += 2 * stepsize, addr += 2 * addr_stepsize)
+        /* Here addr = addr1 + i * pagesize.  */
+        if (is_mapped (addr))
+          return 0;
+    }
+  return 1;
+}
+
+# if STACK_DIRECTION < 0
+
+/* Info about the gap between this VMA and the previous one.
+   addr must be < vma->start.  */
+static int
+mincore_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  /*   vma->start - addr <= (vma->start - vma->prev_end) / 2
+     is mathematically equivalent to
+       vma->prev_end <= 2 * addr - vma->start
+     <==> is_unmapped (2 * addr - vma->start, vma->start - 1).
+     But be careful about overflow: if 2 * addr - vma->start is negative,
+     we consider a tiny "guard page" mapping [0, 0] to be present around
+     NULL; it intersects the range (2 * addr - vma->start, vma->start - 1),
+     therefore return false.  */
+  uintptr_t testaddr = addr - (vma->start - addr);
+  if (testaddr > addr) /* overflow? */
+    return 0;
+  /* Here testaddr <= addr < vma->start.  */
+  return is_unmapped (testaddr, vma->start - 1);
+}
+
+# endif
+# if STACK_DIRECTION > 0
+
+/* Info about the gap between this VMA and the next one.
+   addr must be > vma->end - 1.  */
+static int
+mincore_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  /*   addr - vma->end < (vma->next_start - vma->end) / 2
+     is mathematically equivalent to
+       vma->next_start > 2 * addr - vma->end
+     <==> is_unmapped (vma->end, 2 * addr - vma->end).
+     But be careful about overflow: if 2 * addr - vma->end is > ~0UL,
+     we consider a tiny "guard page" mapping [0, 0] to be present around
+     NULL; it intersects the range (vma->end, 2 * addr - vma->end),
+     therefore return false.  */
+  uintptr_t testaddr = addr + (addr - vma->end);
+  if (testaddr < addr) /* overflow? */
+    return 0;
+  /* Here vma->end - 1 < addr <= testaddr.  */
+  return is_unmapped (vma->end, testaddr);
+}
+
+# endif
+
+static int
+mincore_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  if (pagesize == 0)
+    init_pagesize ();
+  address = (address / pagesize) * pagesize;
+  vma->start = mapped_range_start (address);
+  vma->end = mapped_range_end (address);
+  vma->is_near_this = mincore_is_near_this;
+  return 0;
+}
+
+#endif
+
+/* ========================================================================== */
+
+/* ---------------------------- stackvma-linux.c ---------------------------- */
+
+#if defined __linux__ || defined __ANDROID__ /* Linux */
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+# if STACK_DIRECTION < 0
+  uintptr_t prev;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+# if STACK_DIRECTION < 0
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->vma->prev_end = locals->prev;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev = end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  return 0;
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+# if STACK_DIRECTION < 0
+  locals.prev = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+
+  return mincore_get_vma (address, vma);
+}
+
+/* --------------------------- stackvma-freebsd.c --------------------------- */
+
+#elif defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ /* GNU/kFreeBSD, FreeBSD */
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+  /* The stack appears as multiple adjacents segments, therefore we
+     merge adjacent segments.  */
+  uintptr_t curr_start, curr_end;
+# if STACK_DIRECTION < 0
+  uintptr_t prev_end;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+  if (start == locals->curr_end)
+    {
+      /* Merge adjacent segments.  */
+      locals->curr_end = end;
+      return 0;
+    }
+# if STACK_DIRECTION < 0
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->vma->prev_end = locals->prev_end;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev_end = locals->curr_end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = locals->curr_start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  locals->curr_start = start; locals->curr_end = end;
+  return 0;
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+  locals.curr_start = 0;
+  locals.curr_end = 0;
+# if STACK_DIRECTION < 0
+  locals.prev_end = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval < 0)
+    {
+      if (locals.curr_start < locals.curr_end
+          && address >= locals.curr_start && address <= locals.curr_end - 1)
+        {
+          vma->start = locals.curr_start;
+          vma->end = locals.curr_end;
+# if STACK_DIRECTION < 0
+          vma->prev_end = locals.prev_end;
+# else
+          vma->next_start = 0;
+# endif
+          locals.retval = 0;
+        }
+    }
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+
+  /* FreeBSD 6.[01] doesn't allow to distinguish unmapped pages from
+     mapped but swapped-out pages.  See whether it's fixed.  */
+  if (!is_mapped (0))
+    /* OK, mincore() appears to work as expected.  */
+    return mincore_get_vma (address, vma);
+  return -1;
+}
+
+/* --------------------------- stackvma-netbsd.c --------------------------- */
+
+#elif defined __NetBSD__ /* NetBSD */
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+  /* The stack appears as multiple adjacents segments, therefore we
+     merge adjacent segments.  */
+  uintptr_t curr_start, curr_end;
+# if STACK_DIRECTION < 0
+  uintptr_t prev_end;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+  if (start == locals->curr_end)
+    {
+      /* Merge adjacent segments.  */
+      locals->curr_end = end;
+      return 0;
+    }
+# if STACK_DIRECTION < 0
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->vma->prev_end = locals->prev_end;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev_end = locals->curr_end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = locals->curr_start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  locals->curr_start = start; locals->curr_end = end;
+  return 0;
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+  locals.curr_start = 0;
+  locals.curr_end = 0;
+# if STACK_DIRECTION < 0
+  locals.prev_end = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval < 0)
+    {
+      if (locals.curr_start < locals.curr_end
+          && address >= locals.curr_start && address <= locals.curr_end - 1)
+        {
+          vma->start = locals.curr_start;
+          vma->end = locals.curr_end;
+# if STACK_DIRECTION < 0
+          vma->prev_end = locals.prev_end;
+# else
+          vma->next_start = 0;
+# endif
+          locals.retval = 0;
+        }
+    }
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+
+  return mincore_get_vma (address, vma);
+}
+
+/* --------------------------- stackvma-mquery.c --------------------------- */
+
+/* mquery() is a system call that allows to inquire the status of a
+   range of pages of virtual memory.  In particular, it allows to inquire
+   whether a page is mapped at all, and where is the next unmapped page
+   after a given address.
+   As of 2021, mquery() is supported by:
+     - OpenBSD, since OpenBSD 3.4.
+   Note that this file can give different results.  For example, on
+   OpenBSD 4.4 / i386 the stack segment (which starts around 0xcdbfe000)
+   ends at 0xcfbfdfff according to mincore, but at 0xffffffff according to
+   mquery.  */
+
+#elif defined __OpenBSD__ /* OpenBSD */
+
+# include <unistd.h> /* getpagesize, mincore */
+# include <sys/types.h>
+# include <sys/mman.h> /* mincore */
+
+/* Cache for getpagesize().  */
+static uintptr_t pagesize;
+
+/* Initialize pagesize.  */
+static void
+init_pagesize (void)
+{
+  pagesize = getpagesize ();
+}
+
+/* Test whether the page starting at ADDR is among the address range.
+   ADDR must be a multiple of pagesize.  */
+static int
+is_mapped (uintptr_t addr)
+{
+  /* Avoid calling mquery with a NULL first argument, because this argument
+     value has a specific meaning.  We know the NULL page is unmapped.  */
+  if (addr == 0)
+    return 0;
+  return mquery ((void *) addr, pagesize, 0, MAP_FIXED, -1, 0) == (void *) -1;
+}
+
+/* Assuming that the page starting at ADDR is among the address range,
+   return the start of its virtual memory range.
+   ADDR must be a multiple of pagesize.  */
+static uintptr_t
+mapped_range_start (uintptr_t addr)
+{
+  uintptr_t stepsize;
+  uintptr_t known_unmapped_page;
+
+  /* Look at smaller addresses, in larger and larger steps, to minimize the
+     number of mquery() calls.  */
+  stepsize = pagesize;
+  for (;;)
+    {
+      uintptr_t hole;
+
+      if (addr == 0)
+        abort ();
+
+      if (addr <= stepsize)
+        {
+          known_unmapped_page = 0;
+          break;
+        }
+
+      hole = (uintptr_t) mquery ((void *) (addr - stepsize), pagesize,
+                                     0, 0, -1, 0);
+      if (!(hole == (uintptr_t) (void *) -1 || hole >= addr))
+        {
+          /* Some part of [addr - stepsize, addr - 1] is unmapped.  */
+          known_unmapped_page = hole;
+          break;
+        }
+
+      /* The entire range [addr - stepsize, addr - 1] is mapped.  */
+      addr -= stepsize;
+
+      if (2 * stepsize > stepsize && 2 * stepsize < addr)
+        stepsize = 2 * stepsize;
+    }
+
+  /* Now reduce the step size again.
+     We know that the page at known_unmapped_page is unmapped and that
+     0 < addr - known_unmapped_page <= stepsize.  */
+  while (stepsize > pagesize && stepsize / 2 >= addr - known_unmapped_page)
+    stepsize = stepsize / 2;
+  /* Still 0 < addr - known_unmapped_page <= stepsize.  */
+  while (stepsize > pagesize)
+    {
+      uintptr_t hole;
+
+      stepsize = stepsize / 2;
+      hole = (uintptr_t) mquery ((void *) (addr - stepsize), pagesize,
+                                     0, 0, -1, 0);
+      if (!(hole == (uintptr_t) (void *) -1 || hole >= addr))
+        /* Some part of [addr - stepsize, addr - 1] is unmapped.  */
+        known_unmapped_page = hole;
+      else
+        /* The entire range [addr - stepsize, addr - 1] is mapped.  */
+        addr -= stepsize;
+      /* Still 0 < addr - known_unmapped_page <= stepsize.  */
+    }
+
+  return addr;
+}
+
+/* Assuming that the page starting at ADDR is among the address range,
+   return the end of its virtual memory range + 1.
+   ADDR must be a multiple of pagesize.  */
+static uintptr_t
+mapped_range_end (uintptr_t addr)
+{
+  uintptr_t end;
+
+  if (addr == 0)
+    abort ();
+
+  end = (uintptr_t) mquery ((void *) addr, pagesize, 0, 0, -1, 0);
+  if (end == (uintptr_t) (void *) -1)
+    end = 0; /* wrap around */
+  return end;
+}
+
+/* Determine whether an address range [ADDR1..ADDR2] is completely unmapped.
+   ADDR1 must be <= ADDR2.  */
+static int
+is_unmapped (uintptr_t addr1, uintptr_t addr2)
+{
+  /* Round addr1 down.  */
+  addr1 = (addr1 / pagesize) * pagesize;
+  /* Round addr2 up and turn it into an exclusive bound.  */
+  addr2 = ((addr2 / pagesize) + 1) * pagesize;
+
+  /* Avoid calling mquery with a NULL first argument, because this argument
+     value has a specific meaning.  We know the NULL page is unmapped.  */
+  if (addr1 == 0)
+    addr1 = pagesize;
+
+  if (addr1 < addr2)
+    {
+      if (mquery ((void *) addr1, addr2 - addr1, 0, MAP_FIXED, -1, 0)
+          == (void *) -1)
+        /* Not all the interval [addr1 .. addr2 - 1] is unmapped.  */
+        return 0;
+      else
+        /* The interval [addr1 .. addr2 - 1] is unmapped.  */
+        return 1;
+    }
+  return 1;
+}
+
+# if STACK_DIRECTION < 0
+
+/* Info about the gap between this VMA and the previous one.
+   addr must be < vma->start.  */
+static int
+mquery_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  /*   vma->start - addr <= (vma->start - vma->prev_end) / 2
+     is mathematically equivalent to
+       vma->prev_end <= 2 * addr - vma->start
+     <==> is_unmapped (2 * addr - vma->start, vma->start - 1).
+     But be careful about overflow: if 2 * addr - vma->start is negative,
+     we consider a tiny "guard page" mapping [0, 0] to be present around
+     NULL; it intersects the range (2 * addr - vma->start, vma->start - 1),
+     therefore return false.  */
+  uintptr_t testaddr = addr - (vma->start - addr);
+  if (testaddr > addr) /* overflow? */
+    return 0;
+  /* Here testaddr <= addr < vma->start.  */
+  return is_unmapped (testaddr, vma->start - 1);
+}
+
+# endif
+# if STACK_DIRECTION > 0
+
+/* Info about the gap between this VMA and the next one.
+   addr must be > vma->end - 1.  */
+static int
+mquery_is_near_this (uintptr_t addr, struct vma_struct *vma)
+{
+  /*   addr - vma->end < (vma->next_start - vma->end) / 2
+     is mathematically equivalent to
+       vma->next_start > 2 * addr - vma->end
+     <==> is_unmapped (vma->end, 2 * addr - vma->end).
+     But be careful about overflow: if 2 * addr - vma->end is > ~0UL,
+     we consider a tiny "guard page" mapping [0, 0] to be present around
+     NULL; it intersects the range (vma->end, 2 * addr - vma->end),
+     therefore return false.  */
+  uintptr_t testaddr = addr + (addr - vma->end);
+  if (testaddr < addr) /* overflow? */
+    return 0;
+  /* Here vma->end - 1 < addr <= testaddr.  */
+  return is_unmapped (vma->end, testaddr);
+}
+
+# endif
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  if (pagesize == 0)
+    init_pagesize ();
+  address = (address / pagesize) * pagesize;
+  vma->start = mapped_range_start (address);
+  vma->end = mapped_range_end (address);
+  vma->is_near_this = mquery_is_near_this;
+  return 0;
+}
+
+/* ---------------------------- stackvma-mach.c ---------------------------- */
+
+#elif (defined __APPLE__ && defined __MACH__) /* macOS */
+
+#include <libc.h>
+#include <nlist.h>
+#include <mach/mach.h>
+#include <mach/machine/vm_param.h>
+
+int
+sigsegv_get_vma (uintptr_t req_address, struct vma_struct *vma)
+{
+  uintptr_t prev_address = 0, prev_size = 0;
+  uintptr_t join_address = 0, join_size = 0;
+  int more = 1;
+  vm_address_t address;
+  vm_size_t size;
+  task_t task = mach_task_self ();
+
+  for (address = VM_MIN_ADDRESS; more; address += size)
+    {
+      mach_port_t object_name;
+      /* In MacOS X 10.5, the types vm_address_t, vm_offset_t, vm_size_t have
+         32 bits in 32-bit processes and 64 bits in 64-bit processes. Whereas
+         mach_vm_address_t and mach_vm_size_t are always 64 bits large.
+         MacOS X 10.5 has three vm_region like methods:
+           - vm_region. It has arguments that depend on whether the current
+             process is 32-bit or 64-bit. When linking dynamically, this
+             function exists only in 32-bit processes. Therefore we use it only
+             in 32-bit processes.
+           - vm_region_64. It has arguments that depend on whether the current
+             process is 32-bit or 64-bit. It interprets a flavor
+             VM_REGION_BASIC_INFO as VM_REGION_BASIC_INFO_64, which is
+             dangerous since 'struct vm_region_basic_info_64' is larger than
+             'struct vm_region_basic_info'; therefore let's write
+             VM_REGION_BASIC_INFO_64 explicitly.
+           - mach_vm_region. It has arguments that are 64-bit always. This
+             function is useful when you want to access the VM of a process
+             other than the current process.
+         In 64-bit processes, we could use vm_region_64 or mach_vm_region.
+         I choose vm_region_64 because it uses the same types as vm_region,
+         resulting in less conditional code.  */
+# if defined __aarch64__ || defined __ppc64__ || defined __x86_64__
+      struct vm_region_basic_info_64 info;
+      mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT_64;
+
+      more = (vm_region_64 (task, &address, &size, VM_REGION_BASIC_INFO_64,
+                            (vm_region_info_t)&info, &info_count, &object_name)
+              == KERN_SUCCESS);
+# else
+      struct vm_region_basic_info info;
+      mach_msg_type_number_t info_count = VM_REGION_BASIC_INFO_COUNT;
+
+      more = (vm_region (task, &address, &size, VM_REGION_BASIC_INFO,
+                         (vm_region_info_t)&info, &info_count, &object_name)
+              == KERN_SUCCESS);
+# endif
+      if (!more)
+        {
+          address = join_address + join_size;
+          size = 0;
+        }
+
+      if ((uintptr_t) address == join_address + join_size)
+        join_size += size;
+      else
+        {
+          prev_address = join_address;
+          prev_size = join_size;
+          join_address = (uintptr_t) address;
+          join_size = size;
+        }
+
+      if (object_name != MACH_PORT_NULL)
+        mach_port_deallocate (mach_task_self (), object_name);
+
+# if STACK_DIRECTION < 0
+      if (join_address <= req_address && join_address + join_size > req_address)
+        {
+          vma->start = join_address;
+          vma->end = join_address + join_size;
+          vma->prev_end = prev_address + prev_size;
+          vma->is_near_this = simple_is_near_this;
+          return 0;
+        }
+# else
+      if (prev_address <= req_address && prev_address + prev_size > req_address)
+        {
+          vma->start = prev_address;
+          vma->end = prev_address + prev_size;
+          vma->next_start = join_address;
+          vma->is_near_this = simple_is_near_this;
+          return 0;
+        }
+# endif
+    }
+
+# if STACK_DIRECTION > 0
+  if (join_address <= req_address && join_address + size > req_address)
+    {
+      vma->start = prev_address;
+      vma->end = prev_address + prev_size;
+      vma->next_start = ~0UL;
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+# endif
+
+  return -1;
+}
+
+/* -------------------------------------------------------------------------- */
+
+#elif defined _AIX /* AIX */
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  return mincore_get_vma (address, vma);
+}
+
+/* --------------------------- stackvma-procfs.h --------------------------- */
+
+#elif defined __sgi || defined __sun /* IRIX, Solaris */
+
+# include <errno.h> /* errno, EINTR */
+# include <fcntl.h> /* open, O_RDONLY */
+# include <stddef.h> /* size_t */
+# include <unistd.h> /* getpagesize, getpid, read, close */
+# include <sys/types.h>
+# include <sys/mman.h> /* mmap, munmap */
+# include <sys/stat.h> /* fstat */
+# include <string.h> /* memcpy */
+
+/* Try to use the newer ("structured") /proc filesystem API, if supported.  */
+# define _STRUCTURED_PROC 1
+# include <sys/procfs.h> /* prmap_t, optionally PIOC* */
+
+# if !defined __sun
+
+/* Cache for getpagesize().  */
+static uintptr_t pagesize;
+
+/* Initialize pagesize.  */
+static void
+init_pagesize (void)
+{
+  pagesize = getpagesize ();
+}
+
+# endif
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+# if STACK_DIRECTION < 0
+  uintptr_t prev;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+# if STACK_DIRECTION < 0
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->vma->prev_end = locals->prev;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev = end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  return 0;
+}
+
+/* Iterate over the virtual memory areas of the current process.
+   If such iteration is supported, the callback is called once for every
+   virtual memory area, in ascending order, with the following arguments:
+     - LOCALS is the same argument as passed to vma_iterate.
+     - START is the address of the first byte in the area, page-aligned.
+     - END is the address of the last byte in the area plus 1, page-aligned.
+       Note that it may be 0 for the last area in the address space.
+   If the callback returns 0, the iteration continues.  If it returns 1,
+   the iteration terminates prematurely.
+   This function may open file descriptors, but does not call malloc().
+   Return 0 if all went well, or -1 in case of error.  */
+/* This code is a simplified copy (no handling of protection flags) of the
+   code in gnulib's lib/vma-iter.c.  */
+static int
+vma_iterate (struct callback_locals *locals)
+{
+  /* Note: Solaris <sys/procfs.h> defines a different type prmap_t with
+     _STRUCTURED_PROC than without! Here's a table of sizeof(prmap_t):
+                                  32-bit   64-bit
+         _STRUCTURED_PROC = 0       32       56
+         _STRUCTURED_PROC = 1       96      104
+     Therefore, if the include files provide the newer API, prmap_t has
+     the bigger size, and thus you MUST use the newer API.  And if the
+     include files provide the older API, prmap_t has the smaller size,
+     and thus you MUST use the older API.  */
+
+# if defined PIOCNMAP && defined PIOCMAP
+  /* We must use the older /proc interface.  */
+
+  char fnamebuf[6+10+1];
+  char *fname;
+  int fd;
+  int nmaps;
+  size_t memneed;
+#  if HAVE_MAP_ANONYMOUS
+#   define zero_fd -1
+#   define map_flags MAP_ANONYMOUS
+#  else /* !HAVE_MAP_ANONYMOUS */
+  int zero_fd;
+#   define map_flags 0
+#  endif
+  void *auxmap;
+  uintptr_t auxmap_start;
+  uintptr_t auxmap_end;
+  prmap_t* maps;
+  prmap_t* mp;
+
+  if (pagesize == 0)
+    init_pagesize ();
+
+  /* Construct fname = sprintf (fnamebuf+i, "/proc/%u", getpid ()).  */
+  fname = fnamebuf + sizeof (fnamebuf) - 1;
+  *fname = '\0';
+  {
+    unsigned int value = getpid ();
+    do
+      *--fname = (value % 10) + '0';
+    while ((value = value / 10) > 0);
+  }
+  fname -= 6;
+  memcpy (fname, "/proc/", 6);
+
+  fd = open (fname, O_RDONLY);
+  if (fd < 0)
+    return -1;
+
+  if (ioctl (fd, PIOCNMAP, &nmaps) < 0)
+    goto fail2;
+
+  memneed = (nmaps + 10) * sizeof (prmap_t);
+  /* Allocate memneed bytes of memory.
+     We cannot use alloca here, because not much stack space is guaranteed.
+     We also cannot use malloc here, because a malloc() call may call mmap()
+     and thus pre-allocate available memory.
+     So use mmap(), and ignore the resulting VMA.  */
+  memneed = ((memneed - 1) / pagesize + 1) * pagesize;
+#  if !HAVE_MAP_ANONYMOUS
+  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+  if (zero_fd < 0)
+    goto fail2;
+#  endif
+  auxmap = (void *) mmap ((void *) 0, memneed, PROT_READ | PROT_WRITE,
+                          map_flags | MAP_PRIVATE, zero_fd, 0);
+#  if !HAVE_MAP_ANONYMOUS
+  close (zero_fd);
+#  endif
+  if (auxmap == (void *) -1)
+    goto fail2;
+  auxmap_start = (uintptr_t) auxmap;
+  auxmap_end = auxmap_start + memneed;
+  maps = (prmap_t *) auxmap;
+
+  if (ioctl (fd, PIOCMAP, maps) < 0)
+    goto fail1;
+
+  for (mp = maps;;)
+    {
+      uintptr_t start, end;
+
+      start = (uintptr_t) mp->pr_vaddr;
+      end = start + mp->pr_size;
+      if (start == 0 && end == 0)
+        break;
+      mp++;
+      if (start <= auxmap_start && auxmap_end - 1 <= end - 1)
+        {
+          /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1]
+             = [start,auxmap_start-1] u [auxmap_end,end-1].  */
+          if (start < auxmap_start)
+            if (callback (locals, start, auxmap_start))
+              break;
+          if (auxmap_end - 1 < end - 1)
+            if (callback (locals, auxmap_end, end))
+              break;
+        }
+      else
+        {
+          if (callback (locals, start, end))
+            break;
+        }
+    }
+  munmap (auxmap, memneed);
+  close (fd);
+  return 0;
+
+ fail1:
+  munmap (auxmap, memneed);
+ fail2:
+  close (fd);
+  return -1;
+
+# else
+  /* We must use the newer /proc interface.
+     Documentation:
+     https://docs.oracle.com/cd/E23824_01/html/821-1473/proc-4.html
+     The contents of /proc/<pid>/map consists of records of type
+     prmap_t.  These are different in 32-bit and 64-bit processes,
+     but here we are fortunately accessing only the current process.  */
+
+  char fnamebuf[6+10+4+1];
+  char *fname;
+  int fd;
+  int nmaps;
+  size_t memneed;
+#  if HAVE_MAP_ANONYMOUS
+#   define zero_fd -1
+#   define map_flags MAP_ANONYMOUS
+#  else /* !HAVE_MAP_ANONYMOUS */
+  int zero_fd;
+#   define map_flags 0
+#  endif
+  void *auxmap;
+  uintptr_t auxmap_start;
+  uintptr_t auxmap_end;
+  prmap_t* maps;
+  prmap_t* maps_end;
+  prmap_t* mp;
+
+  if (pagesize == 0)
+    init_pagesize ();
+
+  /* Construct fname = sprintf (fnamebuf+i, "/proc/%u/map", getpid ()).  */
+  fname = fnamebuf + sizeof (fnamebuf) - 1 - 4;
+  memcpy (fname, "/map", 4 + 1);
+  {
+    unsigned int value = getpid ();
+    do
+      *--fname = (value % 10) + '0';
+    while ((value = value / 10) > 0);
+  }
+  fname -= 6;
+  memcpy (fname, "/proc/", 6);
+
+  fd = open (fname, O_RDONLY);
+  if (fd < 0)
+    return -1;
+
+  {
+    struct stat statbuf;
+    if (fstat (fd, &statbuf) < 0)
+      goto fail2;
+    nmaps = statbuf.st_size / sizeof (prmap_t);
+  }
+
+  memneed = (nmaps + 10) * sizeof (prmap_t);
+  /* Allocate memneed bytes of memory.
+     We cannot use alloca here, because not much stack space is guaranteed.
+     We also cannot use malloc here, because a malloc() call may call mmap()
+     and thus pre-allocate available memory.
+     So use mmap(), and ignore the resulting VMA.  */
+  memneed = ((memneed - 1) / pagesize + 1) * pagesize;
+#  if !HAVE_MAP_ANONYMOUS
+  zero_fd = open ("/dev/zero", O_RDONLY, 0644);
+  if (zero_fd < 0)
+    goto fail2;
+#  endif
+  auxmap = (void *) mmap ((void *) 0, memneed, PROT_READ | PROT_WRITE,
+                          map_flags | MAP_PRIVATE, zero_fd, 0);
+#  if !HAVE_MAP_ANONYMOUS
+  close (zero_fd);
+#  endif
+  if (auxmap == (void *) -1)
+    goto fail2;
+  auxmap_start = (uintptr_t) auxmap;
+  auxmap_end = auxmap_start + memneed;
+  maps = (prmap_t *) auxmap;
+
+  /* Read up to memneed bytes from fd into maps.  */
+  {
+    size_t remaining = memneed;
+    size_t total_read = 0;
+    char *ptr = (char *) maps;
+
+    do
+      {
+        size_t nread = read (fd, ptr, remaining);
+        if (nread == (size_t)-1)
+          {
+            if (errno == EINTR)
+              continue;
+            goto fail1;
+          }
+        if (nread == 0)
+          /* EOF */
+          break;
+        total_read += nread;
+        ptr += nread;
+        remaining -= nread;
+      }
+    while (remaining > 0);
+
+    nmaps = (memneed - remaining) / sizeof (prmap_t);
+    maps_end = maps + nmaps;
+  }
+
+  for (mp = maps; mp < maps_end; mp++)
+    {
+      uintptr_t start, end;
+
+      start = (uintptr_t) mp->pr_vaddr;
+      end = start + mp->pr_size;
+      if (start <= auxmap_start && auxmap_end - 1 <= end - 1)
+        {
+          /* Consider [start,end-1] \ [auxmap_start,auxmap_end-1]
+             = [start,auxmap_start-1] u [auxmap_end,end-1].  */
+          if (start < auxmap_start)
+            if (callback (locals, start, auxmap_start))
+              break;
+          if (auxmap_end - 1 < end - 1)
+            if (callback (locals, auxmap_end, end))
+              break;
+        }
+      else
+        {
+          if (callback (locals, start, end))
+            break;
+        }
+    }
+  munmap (auxmap, memneed);
+  close (fd);
+  return 0;
+
+ fail1:
+  munmap (auxmap, memneed);
+ fail2:
+  close (fd);
+  return -1;
+
+# endif
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+# if STACK_DIRECTION < 0
+  locals.prev = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+
+# if defined __sun
+  return mincore_get_vma (address, vma);
+# else
+  return -1;
+# endif
+}
+
+/* -------------------------------------------------------------------------- */
+
+#elif defined __CYGWIN__ /* Cygwin */
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+  /* The stack appears as three adjacents segments, therefore we
+     merge adjacent segments.  */
+  uintptr_t curr_start, curr_end;
+# if STACK_DIRECTION < 0
+  uintptr_t prev_end;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+  if (start == locals->curr_end)
+    {
+      /* Merge adjacent segments.  */
+      locals->curr_end = end;
+      return 0;
+    }
+# if STACK_DIRECTION < 0
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->vma->prev_end = locals->prev_end;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev_end = locals->curr_end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = locals->curr_start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->curr_start < locals->curr_end
+      && locals->address >= locals->curr_start
+      && locals->address <= locals->curr_end - 1)
+    {
+      locals->vma->start = locals->curr_start;
+      locals->vma->end = locals->curr_end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  locals->curr_start = start; locals->curr_end = end;
+  return 0;
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+  locals.curr_start = 0;
+  locals.curr_end = 0;
+# if STACK_DIRECTION < 0
+  locals.prev_end = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval < 0)
+    {
+      if (locals.curr_start < locals.curr_end
+          && address >= locals.curr_start && address <= locals.curr_end - 1)
+        {
+          vma->start = locals.curr_start;
+          vma->end = locals.curr_end;
+# if STACK_DIRECTION < 0
+          vma->prev_end = locals.prev_end;
+# else
+          vma->next_start = 0;
+# endif
+          locals.retval = 0;
+        }
+    }
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+
+  return -1;
+}
+
+/* ---------------------------- stackvma-beos.h ---------------------------- */
+
+#elif defined __HAIKU__ /* Haiku */
+
+# include <OS.h> /* get_next_area_info */
+
+struct callback_locals
+{
+  uintptr_t address;
+  struct vma_struct *vma;
+# if STACK_DIRECTION < 0
+  uintptr_t prev;
+# else
+  int stop_at_next_vma;
+# endif
+  int retval;
+};
+
+static int
+callback (struct callback_locals *locals, uintptr_t start, uintptr_t end)
+{
+# if STACK_DIRECTION < 0
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->vma->prev_end = locals->prev;
+      locals->retval = 0;
+      return 1;
+    }
+  locals->prev = end;
+# else
+  if (locals->stop_at_next_vma)
+    {
+      locals->vma->next_start = start;
+      locals->stop_at_next_vma = 0;
+      return 1;
+    }
+  if (locals->address >= start && locals->address <= end - 1)
+    {
+      locals->vma->start = start;
+      locals->vma->end = end;
+      locals->retval = 0;
+      locals->stop_at_next_vma = 1;
+      return 0;
+    }
+# endif
+  return 0;
+}
+
+/* Iterate over the virtual memory areas of the current process.
+   If such iteration is supported, the callback is called once for every
+   virtual memory area, in ascending order, with the following arguments:
+     - LOCALS is the same argument as passed to vma_iterate.
+     - START is the address of the first byte in the area, page-aligned.
+     - END is the address of the last byte in the area plus 1, page-aligned.
+       Note that it may be 0 for the last area in the address space.
+   If the callback returns 0, the iteration continues.  If it returns 1,
+   the iteration terminates prematurely.
+   This function may open file descriptors, but does not call malloc().
+   Return 0 if all went well, or -1 in case of error.  */
+/* This code is a simplified copy (no handling of protection flags) of the
+   code in gnulib's lib/vma-iter.c.  */
+static int
+vma_iterate (struct callback_locals *locals)
+{
+  area_info info;
+  ssize_t cookie;
+
+  cookie = 0;
+  while (get_next_area_info (0, &cookie, &info) == B_OK)
+    {
+      uintptr_t start, end;
+
+      start = (uintptr_t) info.address;
+      end = start + info.size;
+
+      if (callback (locals, start, end))
+        break;
+    }
+  return 0;
+}
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  struct callback_locals locals;
+  locals.address = address;
+  locals.vma = vma;
+# if STACK_DIRECTION < 0
+  locals.prev = 0;
+# else
+  locals.stop_at_next_vma = 0;
+# endif
+  locals.retval = -1;
+
+  vma_iterate (&locals);
+  if (locals.retval == 0)
+    {
+# if !(STACK_DIRECTION < 0)
+      if (locals.stop_at_next_vma)
+        vma->next_start = 0;
+# endif
+      vma->is_near_this = simple_is_near_this;
+      return 0;
+    }
+  return -1;
+}
+
+/* -------------------------------------------------------------------------- */
+
+#else /* Hurd, Minix, ... */
+
+int
+sigsegv_get_vma (uintptr_t address, struct vma_struct *vma)
+{
+  /* No way.  */
+  return -1;
+}
+
+#endif
diff --git a/lib/stackvma.h b/lib/stackvma.h
new file mode 100644 (file)
index 0000000..1f214a4
--- /dev/null
@@ -0,0 +1,62 @@
+/* Determine the virtual memory area of a given address.
+   Copyright (C) 2002-2021 Free Software Foundation, Inc.
+   Copyright (C) 2003-2006  Paolo Bonzini <bonzini@gnu.org>
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible and Paolo Bonzini.  */
+
+#ifndef _STACKVMA_H
+#define _STACKVMA_H
+
+#include <stdint.h>
+
+/* Describes a virtual memory area, with some info about the gap between
+   it and the next or previous virtual memory area.  */
+struct vma_struct
+{
+  uintptr_t start;
+  uintptr_t end;
+#if STACK_DIRECTION < 0
+  /* Info about the gap between this VMA and the previous one.
+     addr must be < vma->start.  */
+  int (*is_near_this) (uintptr_t addr, struct vma_struct *vma);
+  /* Private field, not provided by all sigsegv_get_vma implementations.  */
+  uintptr_t prev_end;
+#endif
+#if STACK_DIRECTION > 0
+  /* Info about the gap between this VMA and the next one.
+     addr must be > vma->end - 1.  */
+  int (*is_near_this) (uintptr_t addr, struct vma_struct *vma);
+  /* Private field, not provided by all sigsegv_get_vma implementations.  */
+  uintptr_t next_start;
+#endif
+};
+
+/* Determines the virtual memory area to which a given address belongs,
+   and returns 0.  Returns -1 if it cannot be determined.
+   This function is used to determine the stack extent when a fault occurs.  */
+extern int sigsegv_get_vma (uintptr_t address, struct vma_struct *vma);
+
+/* Defined if sigsegv_get_vma actually works (i.e. does not always fail).  */
+#if defined __linux__ || defined __ANDROID__ \
+    || defined __FreeBSD_kernel__ || defined __FreeBSD__ || defined __DragonFly__ \
+    || defined __NetBSD__ || defined __OpenBSD__ \
+    || (defined __APPLE__ && defined __MACH__) \
+    || defined _AIX || defined __sgi || defined __sun \
+    || defined __CYGWIN__ || defined __HAIKU__
+# define HAVE_STACKVMA 1
+#endif
+
+#endif /* _STACKVMA_H */
index 690216c..8c1f414 100644 (file)
@@ -1,3 +1,20 @@
+/* stat-related macros
+
+   Copyright (C) 1993-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 /* All the mode bits that can be affected by chmod.  */
 #define CHMOD_MODE_BITS \
   (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
index 81b83dd..7b92792 100644 (file)
@@ -1,3 +1,21 @@
+/* stat-related time functions.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE
 #include "stat-time.h"
index 69ebe85..fe3483d 100644 (file)
@@ -1,18 +1,18 @@
 /* stat-related time functions.
 
-   Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
@@ -171,7 +171,7 @@ get_stat_birthtime (struct stat const *st _GL_UNUSED)
 #elif defined _WIN32 && ! defined __CYGWIN__
   /* Native Windows platforms (but not Cygwin) put the "file creation
      time" in st_ctime (!).  See
-     <https://msdn.microsoft.com/en-us/library/14h5k7ff(VS.80).aspx>.  */
+     <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions>.  */
 # if _GL_WINDOWS_STAT_TIMESPEC
   t = st->st_ctim;
 # else
index c7a53f9..4164199 100644 (file)
@@ -1,17 +1,17 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible.  */
 
 #if defined _WIN32 && ! defined __CYGWIN__
 
-/* Ensure that <windows.h> defines FILE_ID_INFO.  */
-#undef _WIN32_WINNT
-#define _WIN32_WINNT _WIN32_WINNT_WIN8
+/* Attempt to make <windows.h> define FILE_ID_INFO.
+   But ensure that the redefinition of _WIN32_WINNT does not make us assume
+   Windows Vista or newer when building for an older version of Windows.  */
+#if HAVE_SDKDDKVER_H
+# include <sdkddkver.h>
+# if _WIN32_WINNT >= _WIN32_WINNT_VISTA
+#  define WIN32_ASSUME_VISTA 1
+# else
+#  define WIN32_ASSUME_VISTA 0
+# endif
+# if !defined _WIN32_WINNT || (_WIN32_WINNT < _WIN32_WINNT_WIN8)
+#  undef _WIN32_WINNT
+#  define _WIN32_WINNT _WIN32_WINNT_WIN8
+# endif
+#else
+# define WIN32_ASSUME_VISTA (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
+#endif
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "pathmax.h"
 #include "verify.h"
 
+/* Don't assume that UNICODE is not defined.  */
+#undef LoadLibrary
+#define LoadLibrary LoadLibraryA
+#undef GetFinalPathNameByHandle
+#define GetFinalPathNameByHandle GetFinalPathNameByHandleA
+
+/* Older mingw headers do not define VOLUME_NAME_NONE.  */
+#ifndef VOLUME_NAME_NONE
+# define VOLUME_NAME_NONE 4
+#endif
+
+#if !WIN32_ASSUME_VISTA
+
 /* Avoid warnings from gcc -Wcast-function-type.  */
-#define GetProcAddress \
-  (void *) GetProcAddress
+# define GetProcAddress \
+   (void *) GetProcAddress
 
-#if _GL_WINDOWS_STAT_INODES == 2
+# if _GL_WINDOWS_STAT_INODES == 2
 /* GetFileInformationByHandleEx was introduced only in Windows Vista.  */
 typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile,
                                                                FILE_INFO_BY_HANDLE_CLASS fiClass,
                                                                LPVOID lpBuffer,
                                                                DWORD dwBufferSize);
 static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = NULL;
-#endif
+# endif
 /* GetFinalPathNameByHandle was introduced only in Windows Vista.  */
 typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile,
-                                                           LPTSTR lpFilePath,
+                                                           LPSTR lpFilePath,
                                                            DWORD lenFilePath,
                                                            DWORD dwFlags);
 static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL;
@@ -64,23 +91,30 @@ initialize (void)
   HMODULE kernel32 = LoadLibrary ("kernel32.dll");
   if (kernel32 != NULL)
     {
-#if _GL_WINDOWS_STAT_INODES == 2
+# if _GL_WINDOWS_STAT_INODES == 2
       GetFileInformationByHandleExFunc =
         (GetFileInformationByHandleExFuncType) GetProcAddress (kernel32, "GetFileInformationByHandleEx");
-#endif
+# endif
       GetFinalPathNameByHandleFunc =
         (GetFinalPathNameByHandleFuncType) GetProcAddress (kernel32, "GetFinalPathNameByHandleA");
     }
   initialized = TRUE;
 }
 
+#else
+
+# define GetFileInformationByHandleExFunc GetFileInformationByHandleEx
+# define GetFinalPathNameByHandleFunc GetFinalPathNameByHandle
+
+#endif
+
 /* Converts a FILETIME to GMT time since 1970-01-01 00:00:00.  */
 #if _GL_WINDOWS_STAT_TIMESPEC
 struct timespec
 _gl_convert_FILETIME_to_timespec (const FILETIME *ft)
 {
   struct timespec result;
-  /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+  /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */
   unsigned long long since_1601 =
     ((unsigned long long) ft->dwHighDateTime << 32)
     | (unsigned long long) ft->dwLowDateTime;
@@ -104,7 +138,7 @@ _gl_convert_FILETIME_to_timespec (const FILETIME *ft)
 time_t
 _gl_convert_FILETIME_to_POSIX (const FILETIME *ft)
 {
-  /* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
+  /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */
   unsigned long long since_1601 =
     ((unsigned long long) ft->dwHighDateTime << 32)
     | (unsigned long long) ft->dwLowDateTime;
@@ -128,25 +162,27 @@ int
 _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
 {
   /* GetFileType
-     <https://msdn.microsoft.com/en-us/library/aa364960.aspx> */
+     <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfiletype> */
   DWORD type = GetFileType (h);
   if (type == FILE_TYPE_DISK)
     {
+#if !WIN32_ASSUME_VISTA
       if (!initialized)
         initialize ();
+#endif
 
       /* st_mode can be determined through
          GetFileAttributesEx
-         <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileattributesexa>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_win32_file_attribute_data>
          or through
          GetFileInformationByHandle
-         <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_by_handle_file_information>
          or through
          GetFileInformationByHandleEx with argument FileBasicInfo
-         <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa364217.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_basic_info>
          The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher.  */
       BY_HANDLE_FILE_INFORMATION info;
       if (! GetFileInformationByHandle (h, &info))
@@ -162,12 +198,12 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
 #if _GL_WINDOWS_STAT_INODES
       /* st_ino can be determined through
          GetFileInformationByHandle
-         <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_by_handle_file_information>
          as 64 bits, or through
          GetFileInformationByHandleEx with argument FileIdInfo
-         <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-         <https://msdn.microsoft.com/en-us/library/hh802691.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_id_info>
          as 128 bits.
          The latter requires -D_WIN32_WINNT=_WIN32_WINNT_WIN8 or higher.  */
       /* Experiments show that GetFileInformationByHandleEx does not provide
@@ -238,11 +274,11 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
              If the file name is already known, use it. Otherwise, for
              non-empty files, it can be determined through
              GetFinalPathNameByHandle
-             <https://msdn.microsoft.com/en-us/library/aa364962.aspx>
+             <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfinalpathnamebyhandlea>
              or through
              GetFileInformationByHandleEx with argument FileNameInfo
-             <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-             <https://msdn.microsoft.com/en-us/library/aa364388.aspx>
+             <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+             <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_name_info>
              Both require -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher.  */
           if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0)
             {
@@ -277,12 +313,12 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
 
       /* st_nlink can be determined through
          GetFileInformationByHandle
-         <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_by_handle_file_information>
          or through
          GetFileInformationByHandleEx with argument FileStandardInfo
-         <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa364401.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_standard_info>
          The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher.  */
       buf->st_nlink = (info.nNumberOfLinks > SHRT_MAX ? SHRT_MAX : info.nNumberOfLinks);
 
@@ -295,19 +331,19 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
 
       /* st_size can be determined through
          GetFileSizeEx
-         <https://msdn.microsoft.com/en-us/library/aa364957.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfilesizeex>
          or through
          GetFileAttributesEx
-         <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileattributesexa>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_win32_file_attribute_data>
          or through
          GetFileInformationByHandle
-         <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_by_handle_file_information>
          or through
          GetFileInformationByHandleEx with argument FileStandardInfo
-         <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa364401.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_standard_info>
          The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher.  */
       if (sizeof (buf->st_size) <= 4)
         /* Range check already done above.  */
@@ -317,19 +353,19 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
 
       /* st_atime, st_mtime, st_ctime can be determined through
          GetFileTime
-         <https://msdn.microsoft.com/en-us/library/ms724320.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfiletime>
          or through
          GetFileAttributesEx
-         <https://msdn.microsoft.com/en-us/library/aa364946.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa365739.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileattributesexa>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_win32_file_attribute_data>
          or through
          GetFileInformationByHandle
-         <https://msdn.microsoft.com/en-us/library/aa364952.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363788.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-getfileinformationbyhandle>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/ns-fileapi-_by_handle_file_information>
          or through
          GetFileInformationByHandleEx with argument FileBasicInfo
-         <https://msdn.microsoft.com/en-us/library/aa364953.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa364217.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/winbase/ns-winbase-_file_basic_info>
          The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher.  */
 #if _GL_WINDOWS_STAT_TIMESPEC
       buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime);
index 9a3ecc1..5b56c09 100644 (file)
@@ -1,17 +1,17 @@
 /* Core of implementation of fstat and stat for native Windows.
-   Copyright (C) 2017-2018 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _STAT_W32_H
index 18c0caa..bc9a767 100644 (file)
@@ -1,17 +1,17 @@
 /* Work around platform bugs in stat.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake and Bruno Haible.  */
@@ -42,10 +42,14 @@ orig_stat (const char *filename, struct stat *buf)
 #endif
 
 /* Specification.  */
+#ifdef __osf__
 /* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
    eliminates this include because of the preliminary #include <sys/stat.h>
    above.  */
-#include "sys/stat.h"
+# include "sys/stat.h"
+#else
+# include <sys/stat.h>
+#endif
 
 #include "stat-time.h"
 
@@ -61,6 +65,13 @@ orig_stat (const char *filename, struct stat *buf)
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
 # include "stat-w32.h"
+/* Don't assume that UNICODE is not defined.  */
+# undef WIN32_FIND_DATA
+# define WIN32_FIND_DATA WIN32_FIND_DATAA
+# undef CreateFile
+# define CreateFile CreateFileA
+# undef FindFirstFile
+# define FindFirstFile FindFirstFileA
 #endif
 
 #ifdef WINDOWS_NATIVE
@@ -107,9 +118,9 @@ rpl_stat (char const *name, struct stat *buf)
      <https://lists.gnu.org/r/bug-gnulib/2017-04/msg00134.html>  */
   /* XXX Should we convert to wchar_t* and prepend '\\?\', in order to work
      around length limitations
-     <https://msdn.microsoft.com/en-us/library/aa365247.aspx> ?  */
+     <https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file> ?  */
 
-  /* POSIX <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>
+  /* POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13>
      specifies: "More than two leading <slash> characters shall be treated as
      a single <slash> character."  */
   if (ISSLASH (name[0]) && ISSLASH (name[1]) && ISSLASH (name[2]))
@@ -190,8 +201,8 @@ rpl_stat (char const *name, struct stat *buf)
 
       /* Open a handle to the file.
          CreateFile
-         <https://msdn.microsoft.com/en-us/library/aa363858.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa363874.aspx>  */
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-createfilea>
+         <https://docs.microsoft.com/en-us/windows/desktop/FileIO/creating-and-opening-files>  */
       HANDLE h =
         CreateFile (rname,
                     FILE_READ_ATTRIBUTES,
@@ -232,13 +243,13 @@ rpl_stat (char const *name, struct stat *buf)
 
       /* Get the details about the directory entry.  This can be done through
          FindFirstFile
-         <https://msdn.microsoft.com/en-us/library/aa364418.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa365740.aspx>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfilea>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-_win32_find_dataa>
          or through
          FindFirstFileEx with argument FindExInfoBasic
-         <https://msdn.microsoft.com/en-us/library/aa364419.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa364415.aspx>
-         <https://msdn.microsoft.com/en-us/library/aa365740.aspx>  */
+         <https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfileexa>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ne-minwinbase-findex_info_levels>
+         <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-_win32_find_dataa>  */
       WIN32_FIND_DATA info;
       HANDLE h = FindFirstFile (rname, &info);
       if (h == INVALID_HANDLE_VALUE)
@@ -371,7 +382,7 @@ rpl_stat (char const *name, struct stat *buf)
 
       case ERROR_ACCESS_DENIED:  /* rname is such as 'C:\System Volume Information\foo'.  */
       case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only).  */
-                                    /* XXX map to EACCESS or EPERM? */
+                                    /* XXX map to EACCES or EPERM? */
         errno = EACCES;
         break;
 
@@ -394,7 +405,7 @@ rpl_stat (char const *name, struct stat *buf)
         errno = ENAMETOOLONG;
         break;
 
-      case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */
+      case ERROR_DELETE_PENDING: /* XXX map to EACCES or EPERM? */
         errno = EPERM;
         break;
 
similarity index 69%
rename from gnulib-tests/stdalign.in.h
rename to lib/stdalign.in.h
index bbfa9ac..592d58e 100644 (file)
@@ -1,19 +1,19 @@
 /* A substitute for ISO C11 <stdalign.h>.
 
-   Copyright 2011-2018 Free Software Foundation, Inc.
+   Copyright 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert and Bruno Haible.  */
 
    requirement of a structure member (i.e., slot or field) that is of
    type TYPE, as an integer constant expression.
 
-   This differs from GCC's __alignof__ operator, which can yield a
-   better-performing alignment for an object of that type.  For
-   example, on x86 with GCC, __alignof__ (double) and __alignof__
-   (long long) are 8, whereas alignof (double) and alignof (long long)
-   are 4 unless the option '-malign-double' is used.
+   This differs from GCC's and clang's __alignof__ operator, which can
+   yield a better-performing alignment for an object of that type.  For
+   example, on x86 with GCC and on Linux/x86 with clang,
+   __alignof__ (double) and __alignof__ (long long) are 8, whereas
+   alignof (double) and alignof (long long) are 4 unless the option
+   '-malign-double' is used.
 
    The result cannot be used as a value for an 'enum' constant, if you
    want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
 #undef _Alignof
 
 /* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
-   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
 #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
-     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9)))
+     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+         && !defined __clang__) \
+     || (defined __clang__ && __clang_major__ < 8))
 # ifdef __cplusplus
 #  if 201103 <= __cplusplus
 #   define _Alignof(type) alignof (type)
 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
 # if defined __cplusplus && 201103 <= __cplusplus
 #  define _Alignas(a) alignas (a)
-# elif ((defined __APPLE__ && defined __MACH__                  \
-         ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__)                 \
-         : __GNUC__)                                            \
-        || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-        || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__)
+# 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))
index 46af0c2..9269da2 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for and wrapper around <stdarg.h>.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_STDARG_H
 
index ebf1a2f..2a1992d 100644 (file)
@@ -1,18 +1,18 @@
-/* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_STDBOOL_H
 #define _GL_STDBOOL_H
index 8329a9b..42290d4 100644 (file)
@@ -1,25 +1,25 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
 /*
  * POSIX 2008 <stddef.h> for platforms that have issues.
- * <http://www.opengroup.org/susv3xbd/stddef.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
  */
 
 #if __GNUC__ >= 3
 #   define _GL_STDDEF_WINT_T
 #  endif
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+   /* On TinyCC, make sure that the macros that indicate the special invocation
+      convention get undefined.  */
+#  undef __need_wchar_t
+#  undef __need_size_t
+#  undef __need_ptrdiff_t
+#  undef __need_NULL
+#  undef __need_wint_t
 # endif
 
 #else
 
 # ifndef _@GUARD_PREFIX@_STDDEF_H
 
+/* On AIX 7.2, with xlc in 64-bit mode, <stddef.h> defines max_align_t to a
+   type with alignment 4, but 'long' has alignment 8.  */
+#  if defined _AIX && defined __LP64__
+#   if !GNULIB_defined_max_align_t
+#    ifdef _MAX_ALIGN_T
+/* /usr/include/stddef.h has already defined max_align_t.  Override it.  */
+typedef long rpl_max_align_t;
+#     define max_align_t rpl_max_align_t
+#    else
+/* Prevent /usr/include/stddef.h from defining max_align_t.  */
+typedef long max_align_t;
+#     define _MAX_ALIGN_T
+#    endif
+#    define GNULIB_defined_max_align_t 1
+#   endif
+#  endif
+
 /* The include_next requires a split double-inclusion guard.  */
 
 #  @INCLUDE_NEXT@ @NEXT_STDDEF_H@
 
 /* Some platforms lack max_align_t.  The check for _GCC_MAX_ALIGN_T is
    a hack in case the configure-time test was done with g++ even though
-   we are currently compiling with gcc.  */
-#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
-# if !GNULIB_defined_max_align_t
+   we are currently compiling with gcc.
+   On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was
+   included.  Its definition is good since it has an alignment of 8 (on x86
+   and x86_64).
+   Similarly on OS/2 kLIBC.  */
+#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \
+    && defined __cplusplus
+# include <cstddef>
+#else
+# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __clang__))
+#  if !GNULIB_defined_max_align_t
 /* On the x86, the maximum storage alignment of double, long, etc. is 4,
    but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
    and the C11 standard allows this.  Work around this problem by
    using __alignof__ (which returns 8 for double) rather than _Alignof
    (which returns 4), and align each union member accordingly.  */
-#  ifdef __GNUC__
-#   define _GL_STDDEF_ALIGNAS(type) \
-      __attribute__ ((__aligned__ (__alignof__ (type))))
-#  else
-#   define _GL_STDDEF_ALIGNAS(type) /* */
-#  endif
+#   if defined __GNUC__ || (__clang_major__ >= 4)
+#    define _GL_STDDEF_ALIGNAS(type) \
+       __attribute__ ((__aligned__ (__alignof__ (type))))
+#   else
+#    define _GL_STDDEF_ALIGNAS(type) /* */
+#   endif
 typedef union
 {
   char *__p _GL_STDDEF_ALIGNAS (char *);
@@ -104,8 +136,9 @@ typedef union
   long double __ld _GL_STDDEF_ALIGNAS (long double);
   long int __i _GL_STDDEF_ALIGNAS (long int);
 } rpl_max_align_t;
-#  define max_align_t rpl_max_align_t
-#  define GNULIB_defined_max_align_t 1
+#   define max_align_t rpl_max_align_t
+#   define GNULIB_defined_max_align_t 1
+#  endif
 # endif
 #endif
 
index 94e7c81..85c5418 100644 (file)
@@ -1,23 +1,23 @@
-/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /*
  * ISO C 99 <stdint.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>
  */
 
 #ifndef _@GUARD_PREFIX@_STDINT_H
@@ -85,7 +85,7 @@
 
 /* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
    wint_t.  */
-#if @GNULIB_OVERRIDES_WINT_T@
+#if @GNULIBHEADERS_OVERRIDE_WINT_T@
 # undef WINT_MIN
 # undef WINT_MAX
 # define WINT_MIN 0x0U
@@ -188,7 +188,7 @@ typedef long int gl_int64_t;
 typedef __int64 gl_int64_t;
 #   define int64_t gl_int64_t
 #   define GL_INT64_T
-#  elif @HAVE_LONG_LONG_INT@
+#  else
 #   undef int64_t
 typedef long long int gl_int64_t;
 #   define int64_t gl_int64_t
@@ -209,7 +209,7 @@ typedef unsigned long int gl_uint64_t;
 typedef unsigned __int64 gl_uint64_t;
 #   define uint64_t gl_uint64_t
 #   define GL_UINT64_T
-#  elif @HAVE_UNSIGNED_LONG_LONG_INT@
+#  else
 #   undef uint64_t
 typedef unsigned long long int gl_uint64_t;
 #   define uint64_t gl_uint64_t
@@ -299,16 +299,25 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
 
 /* 7.18.1.4. Integer types capable of holding object pointers */
 
-/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+/* kLIBC's <stdint.h> defines _INTPTR_T_DECLARED and needs its own
    definitions of intptr_t and uintptr_t (which use int and unsigned)
-   to avoid clashes with declarations of system functions like sbrk.  */
-# ifndef _INTPTR_T_DECLARED
-# undef intptr_t
-# undef uintptr_t
+   to avoid clashes with declarations of system functions like sbrk.
+   Similarly, MinGW WSL-5.4.1 <stdint.h> needs its own intptr_t and
+   uintptr_t to avoid conflicting declarations of system functions like
+   _findclose in <io.h>.  */
+# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
+       || defined __MINGW32__)
+#  undef intptr_t
+#  undef uintptr_t
+#  ifdef _WIN64
+typedef long long int gl_intptr_t;
+typedef unsigned long long int gl_uintptr_t;
+#  else
 typedef long int gl_intptr_t;
 typedef unsigned long int gl_uintptr_t;
-# define intptr_t gl_intptr_t
-# define uintptr_t gl_uintptr_t
+#  endif
+#  define intptr_t gl_intptr_t
+#  define uintptr_t gl_uintptr_t
 # endif
 
 /* 7.18.1.5. Greatest-width integer types */
@@ -323,7 +332,7 @@ typedef unsigned long int gl_uintptr_t;
 # ifndef INTMAX_MAX
 #  undef INTMAX_C
 #  undef intmax_t
-#  if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#  if LONG_MAX >> 30 == 1
 typedef long long int gl_intmax_t;
 #   define intmax_t gl_intmax_t
 #  elif defined GL_INT64_T
@@ -337,7 +346,7 @@ typedef long int gl_intmax_t;
 # ifndef UINTMAX_MAX
 #  undef UINTMAX_C
 #  undef uintmax_t
-#  if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#  if ULONG_MAX >> 31 == 1
 typedef unsigned long long int gl_uintmax_t;
 #   define uintmax_t gl_uintmax_t
 #  elif defined GL_UINT64_T
@@ -485,9 +494,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 # undef INTPTR_MIN
 # undef INTPTR_MAX
 # undef UINTPTR_MAX
-# define INTPTR_MIN  LONG_MIN
-# define INTPTR_MAX  LONG_MAX
-# define UINTPTR_MAX  ULONG_MAX
+# ifdef _WIN64
+#  define INTPTR_MIN  LLONG_MIN
+#  define INTPTR_MAX  LLONG_MAX
+#  define UINTPTR_MAX  ULLONG_MAX
+# else
+#  define INTPTR_MIN  LONG_MIN
+#  define INTPTR_MAX  LONG_MAX
+#  define UINTPTR_MAX  ULONG_MAX
+# endif
 
 /* 7.18.2.5. Limits of greatest-width integer types */
 
@@ -564,11 +579,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
    <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
 # if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
-#  include <stddef.h>
-#  include <stdio.h>
-#  include <time.h>
 #  define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 #  include <wchar.h>
 #  undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
@@ -586,17 +596,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
    _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
 
 /* wint_t limits */
-# undef WINT_MIN
-# undef WINT_MAX
-# if @HAVE_SIGNED_WINT_T@
-#  define WINT_MIN  \
-    _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-# else
-#  define WINT_MIN  \
-    _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+/* If gnulib's <wchar.h> or <wctype.h> overrides wint_t, @WINT_T_SUFFIX@ is not
+   accurate, therefore use the definitions from above.  */
+# if !@GNULIBHEADERS_OVERRIDE_WINT_T@
+#  undef WINT_MIN
+#  undef WINT_MAX
+#  if @HAVE_SIGNED_WINT_T@
+#   define WINT_MIN  \
+     _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#  else
+#   define WINT_MIN  \
+     _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#  endif
+#  define WINT_MAX  \
+    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
 # endif
-# define WINT_MAX  \
-   _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
 
 /* 7.18.4. Macros for integer constants */
 
@@ -627,21 +641,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 #  define INT64_C(x) x##L
 # elif defined _MSC_VER
 #  define INT64_C(x) x##i64
-# elif @HAVE_LONG_LONG_INT@
+# else
 #  define INT64_C(x) x##LL
 # endif
 # if ULONG_MAX >> 31 >> 31 >> 1 == 1
 #  define UINT64_C(x) x##UL
 # elif defined _MSC_VER
 #  define UINT64_C(x) x##ui64
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# else
 #  define UINT64_C(x) x##ULL
 # endif
 
 /* 7.18.4.2. Macros for greatest-width integer constants */
 
 # ifndef INTMAX_C
-#  if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+#  if LONG_MAX >> 30 == 1
 #   define INTMAX_C(x)   x##LL
 #  elif defined GL_INT64_T
 #   define INTMAX_C(x)   INT64_C(x)
@@ -651,7 +665,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
 # endif
 
 # ifndef UINTMAX_C
-#  if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+#  if ULONG_MAX >> 31 == 1
 #   define UINTMAX_C(x)  x##ULL
 #  elif defined GL_UINT64_T
 #   define UINTMAX_C(x)  UINT64_C(x)
index ff7c9c8..20ba488 100644 (file)
@@ -1,19 +1,19 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
    We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
    gnulib and libintl do '#define printf __printf__' when they override
    the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__
+#  define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+#  define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+# endif
+#endif
+
+/* An __attribute__ __format__ specifier for a function that takes a format
+   string and arguments, where the format string directives are the ones
+   standardized by ISO C99 and POSIX.
+   _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD  */
+/* __gnu_printf__ is supported in GCC >= 4.4.  */
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__
+#else
+# define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__
+#endif
+
+/* An __attribute__ __format__ specifier for a function that takes a format
+   string and arguments, where the format string directives are the ones of the
+   system printf(), rather than the ones standardized by ISO C99 and POSIX.
+   _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM  */
+/* On mingw, Gnulib sets __USE_MINGW_ANSI_STDIO in order to get closer to
+   the standards.  The macro GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU indicates
+   whether this change is effective.  On older mingw, it is not.  */
+#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD
 #else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+# define _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM __printf__
 #endif
 
-/* _GL_ATTRIBUTE_FORMAT_PRINTF
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
    indicates to GCC that the function takes a format string and arguments,
    where the format string directives are the ones standardized by ISO C99
    and POSIX.  */
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-   _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
-#else
-# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
-   _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
-#endif
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, formatstring_parameter, first_argument))
 
-/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
+/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD,
    except that it indicates to GCC that the supported format string directives
    are the ones of the system printf(), rather than the ones standardized by
    ISO C99 and POSIX.  */
-#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
-# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
-  _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
-#else
-# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
-  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
-#endif
+#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
+  _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, formatstring_parameter, first_argument))
 
 /* _GL_ATTRIBUTE_FORMAT_SCANF
    indicates to GCC that the function takes a format string and arguments,
 # include <unistd.h>
 #endif
 
+/* Android 4.3 declares renameat in <sys/stat.h>, not in <stdio.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
+    && ! defined __GLIBC__
+# include <sys/stat.h>
+#endif
+
 /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>.  We must include
    it before we  #define perror rpl_perror.  */
 /* But in any case avoid namespace pollution on glibc systems.  */
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define dprintf rpl_dprintf
 #  endif
-_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *restrict format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                                 _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
+_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *restrict format, ...));
 # else
 #  if !@HAVE_DPRINTF@
-_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                                 _GL_ARG_NONNULL ((2)));
 #  endif
-_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
+_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
 # endif
 _GL_CXXALIASWARN (dprintf);
 #elif defined GNULIB_POSIXCHECK
@@ -196,7 +219,9 @@ _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
 # else
 _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fclose);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fclose
 /* Assume fclose is always declared.  */
@@ -204,6 +229,31 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
                  "use gnulib module fclose for portable POSIX compliance");
 #endif
 
+#if @GNULIB_MDA_FCLOSEALL@
+/* On native Windows, map 'fcloseall' to '_fcloseall', so that -loldnames is
+   not required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fcloseall on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fcloseall
+#   define fcloseall _fcloseall
+#  endif
+_GL_CXXALIAS_MDA (fcloseall, int, (void));
+# else
+#  if @HAVE_DECL_FCLOSEALL@
+#   if defined __FreeBSD__ || defined __DragonFly__
+_GL_CXXALIAS_SYS (fcloseall, void, (void));
+#   else
+_GL_CXXALIAS_SYS (fcloseall, int, (void));
+#   endif
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCLOSEALL@
+_GL_CXXALIASWARN (fcloseall);
+# endif
+#endif
+
 #if @GNULIB_FDOPEN@
 # if @REPLACE_FDOPEN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -213,6 +263,12 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
 _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
                                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopen
+#   define fdopen _fdopen
+#  endif
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
 # else
 _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
 # endif
@@ -222,6 +278,20 @@ _GL_CXXALIASWARN (fdopen);
 /* Assume fdopen is always declared.  */
 _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
                  "use gnulib module fdopen for portability");
+#elif @GNULIB_MDA_FDOPEN@
+/* On native Windows, map 'fdopen' to '_fdopen', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fdopen always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopen
+#   define fdopen _fdopen
+#  endif
+_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
+# else
+_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
+# endif
+_GL_CXXALIASWARN (fdopen);
 #endif
 
 #if @GNULIB_FFLUSH@
@@ -240,7 +310,9 @@ _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
 # else
 _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fflush);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fflush
 /* Assume fflush is always declared.  */
@@ -259,7 +331,9 @@ _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
 # else
 _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fgetc);
+# endif
 #endif
 
 #if @GNULIB_FGETS@
@@ -268,13 +342,34 @@ _GL_CXXALIASWARN (fgetc);
 #   undef fgets
 #   define fgets rpl_fgets
 #  endif
-_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
-                                 _GL_ARG_NONNULL ((1, 3)));
-_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
+_GL_FUNCDECL_RPL (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream)
+                  _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
+_GL_CXXALIAS_SYS (fgets, char *,
+                  (char *restrict s, int n, FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fgets);
+# endif
+#endif
+
+#if @GNULIB_MDA_FILENO@
+/* On native Windows, map 'fileno' to '_fileno', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fileno always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fileno
+#   define fileno _fileno
+#  endif
+_GL_CXXALIAS_MDA (fileno, int, (FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (fileno, int, (FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (fileno);
 #endif
 
 #if @GNULIB_FOPEN@
@@ -283,13 +378,18 @@ _GL_CXXALIASWARN (fgets);
 #   undef fopen
 #   define fopen rpl_fopen
 #  endif
-_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
-                                 _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
+_GL_FUNCDECL_RPL (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode));
 # else
-_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
+_GL_CXXALIAS_SYS (fopen, FILE *,
+                  (const char *restrict filename, const char *restrict mode));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fopen);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef fopen
 /* Assume fopen is always declared.  */
@@ -305,19 +405,25 @@ _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX complian
 #  endif
 #  define GNULIB_overrides_fprintf 1
 #  if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  else
-_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  endif
-_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
+_GL_CXXALIAS_RPL (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
+_GL_CXXALIAS_SYS (fprintf, int,
+                  (FILE *restrict fp, const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fprintf);
+# endif
 #endif
 #if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
 # if !GNULIB_overrides_fprintf
@@ -368,7 +474,9 @@ _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
 # else
 _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fputc);
+# endif
 #endif
 
 #if @GNULIB_FPUTS@
@@ -377,13 +485,18 @@ _GL_CXXALIASWARN (fputc);
 #   undef fputs
 #   define fputs rpl_fputs
 #  endif
-_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
-                              _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
+_GL_FUNCDECL_RPL (fputs, int,
+                  (const char *restrict string, FILE *restrict stream)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fputs, int,
+                  (const char *restrict string, FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
+_GL_CXXALIAS_SYS (fputs, int,
+                  (const char *restrict string, FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fputs);
+# endif
 #endif
 
 #if @GNULIB_FREAD@
@@ -392,13 +505,21 @@ _GL_CXXALIASWARN (fputs);
 #   undef fread
 #   define fread rpl_fread
 #  endif
-_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
-                                 _GL_ARG_NONNULL ((4)));
-_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
+_GL_FUNCDECL_RPL (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream)
+                  _GL_ARG_NONNULL ((4)));
+_GL_CXXALIAS_RPL (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # else
-_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
+_GL_CXXALIAS_SYS (fread, size_t,
+                  (void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fread);
+# endif
 #endif
 
 #if @GNULIB_FREOPEN@
@@ -408,15 +529,20 @@ _GL_CXXALIASWARN (fread);
 #   define freopen rpl_freopen
 #  endif
 _GL_FUNCDECL_RPL (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream)
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream));
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream));
 # else
 _GL_CXXALIAS_SYS (freopen, FILE *,
-                  (const char *filename, const char *mode, FILE *stream));
+                  (const char *restrict filename, const char *restrict mode,
+                   FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (freopen);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef freopen
 /* Assume freopen is always declared.  */
@@ -431,14 +557,19 @@ _GL_WARN_ON_USE (freopen,
 #   undef fscanf
 #   define fscanf rpl_fscanf
 #  endif
-_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
-                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
-                               _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
+_GL_FUNCDECL_RPL (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
+_GL_CXXALIAS_SYS (fscanf, int,
+                  (FILE *restrict stream, const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fscanf);
+# endif
 #endif
 
 
@@ -489,7 +620,9 @@ _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
 # else
 _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fseek);
+# endif
 #endif
 
 #if @GNULIB_FSEEKO@
@@ -552,7 +685,9 @@ _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
 # else
 _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ftell);
+# endif
 #endif
 
 #if @GNULIB_FTELLO@
@@ -601,13 +736,16 @@ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
 #   define fwrite rpl_fwrite
 #  endif
 _GL_FUNCDECL_RPL (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream)
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 4)));
 _GL_CXXALIAS_RPL (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream));
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 # else
 _GL_CXXALIAS_SYS (fwrite, size_t,
-                  (const void *ptr, size_t s, size_t n, FILE *stream));
+                  (const void *restrict ptr, size_t s, size_t n,
+                   FILE *restrict stream));
 
 /* Work around bug 11959 when fortifying glibc 2.4 through 2.15
    <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>,
@@ -632,7 +770,9 @@ extern size_t __REDIRECT (rpl_fwrite_unlocked,
 #   define fwrite_unlocked rpl_fwrite_unlocked
 #  endif
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fwrite);
+# endif
 #endif
 
 #if @GNULIB_GETC@
@@ -646,7 +786,9 @@ _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
 # else
 _GL_CXXALIAS_SYS (getc, int, (FILE *stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getc);
+# endif
 #endif
 
 #if @GNULIB_GETCHAR@
@@ -660,7 +802,9 @@ _GL_CXXALIAS_RPL (getchar, int, (void));
 # else
 _GL_CXXALIAS_SYS (getchar, int, (void));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getchar);
+# endif
 #endif
 
 #if @GNULIB_GETDELIM@
@@ -676,22 +820,26 @@ _GL_CXXALIASWARN (getchar);
 #   define getdelim rpl_getdelim
 #  endif
 _GL_FUNCDECL_RPL (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 4)));
 _GL_CXXALIAS_RPL (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream));
 # else
 #  if !@HAVE_DECL_GETDELIM@
 _GL_FUNCDECL_SYS (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 4)));
 #  endif
 _GL_CXXALIAS_SYS (getdelim, ssize_t,
-                  (char **lineptr, size_t *linesize, int delimiter,
-                   FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   int delimiter,
+                   FILE *restrict stream));
 # endif
 _GL_CXXALIASWARN (getdelim);
 #elif defined GNULIB_POSIXCHECK
@@ -715,18 +863,22 @@ _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
 #   define getline rpl_getline
 #  endif
 _GL_FUNCDECL_RPL (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 3)));
 _GL_CXXALIAS_RPL (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream));
 # else
 #  if !@HAVE_DECL_GETLINE@
 _GL_FUNCDECL_SYS (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream)
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream)
                   _GL_ARG_NONNULL ((1, 2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (getline, ssize_t,
-                  (char **lineptr, size_t *linesize, FILE *stream));
+                  (char **restrict lineptr, size_t *restrict linesize,
+                   FILE *restrict stream));
 # endif
 # if @HAVE_DECL_GETLINE@
 _GL_CXXALIASWARN (getline);
@@ -747,6 +899,22 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
 
+#if @GNULIB_MDA_GETW@
+/* On native Windows, map 'getw' to '_getw', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getw always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getw
+#   define getw _getw
+#  endif
+_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (getw);
+#endif
+
 #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
 struct obstack;
 /* Grow an obstack with formatted output.  Return the number of
@@ -760,7 +928,7 @@ struct obstack;
 #  endif
 _GL_FUNCDECL_RPL (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...));
@@ -768,7 +936,7 @@ _GL_CXXALIAS_RPL (obstack_printf, int,
 #  if !@HAVE_DECL_OBSTACK_PRINTF@
 _GL_FUNCDECL_SYS (obstack_printf, int,
                   (struct obstack *obs, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (obstack_printf, int,
@@ -781,7 +949,7 @@ _GL_CXXALIASWARN (obstack_printf);
 #  endif
 _GL_FUNCDECL_RPL (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args));
@@ -789,7 +957,7 @@ _GL_CXXALIAS_RPL (obstack_vprintf, int,
 #  if !@HAVE_DECL_OBSTACK_PRINTF@
 _GL_FUNCDECL_SYS (obstack_vprintf, int,
                   (struct obstack *obs, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (obstack_vprintf, int,
@@ -825,7 +993,9 @@ _GL_CXXALIAS_RPL (perror, void, (const char *string));
 # else
 _GL_CXXALIAS_SYS (perror, void, (const char *string));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (perror);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef perror
 /* Assume perror is always declared.  */
@@ -861,21 +1031,21 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
 #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
 # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
      || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
-#  if defined __GNUC__
+#  if defined __GNUC__ || defined __clang__
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 /* Don't break __attribute__((format(printf,M,N))).  */
 #    define printf __printf__
 #   endif
 #   if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
 _GL_FUNCDECL_RPL_1 (__printf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
-                    _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                    _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2)
                     _GL_ARG_NONNULL ((1)));
 #   else
 _GL_FUNCDECL_RPL_1 (__printf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
                     _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2)
@@ -887,16 +1057,18 @@ _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
 #    define printf rpl_printf
 #   endif
 _GL_FUNCDECL_RPL (printf, int,
-                  (const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2)
+                  (const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 2)
                   _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
+_GL_CXXALIAS_RPL (printf, int, (const char *restrict format, ...));
 #  endif
 #  define GNULIB_overrides_printf 1
 # else
-_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
+_GL_CXXALIAS_SYS (printf, int, (const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (printf);
+# endif
 #endif
 #if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
 # if !GNULIB_overrides_printf
@@ -919,7 +1091,9 @@ _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
 # else
 _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (putc);
+# endif
 #endif
 
 #if @GNULIB_PUTCHAR@
@@ -933,7 +1107,9 @@ _GL_CXXALIAS_RPL (putchar, int, (int c));
 # else
 _GL_CXXALIAS_SYS (putchar, int, (int c));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (putchar);
+# endif
 #endif
 
 #if @GNULIB_PUTS@
@@ -947,7 +1123,25 @@ _GL_CXXALIAS_RPL (puts, int, (const char *string));
 # else
 _GL_CXXALIAS_SYS (puts, int, (const char *string));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (puts);
+# endif
+#endif
+
+#if @GNULIB_MDA_PUTW@
+/* On native Windows, map 'putw' to '_putw', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::putw always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putw
+#   define putw _putw
+#  endif
+_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
+# else
+_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
+_GL_CXXALIASWARN (putw);
 #endif
 
 #if @GNULIB_REMOVE@
@@ -961,7 +1155,9 @@ _GL_CXXALIAS_RPL (remove, int, (const char *name));
 # else
 _GL_CXXALIAS_SYS (remove, int, (const char *name));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (remove);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef remove
 /* Assume remove is always declared.  */
@@ -984,7 +1180,9 @@ _GL_CXXALIAS_RPL (rename, int,
 _GL_CXXALIAS_SYS (rename, int,
                   (const char *old_filename, const char *new_filename));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (rename);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef rename
 /* Assume rename is always declared.  */
@@ -1023,33 +1221,35 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
 
 #if @GNULIB_SCANF@
 # if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
-#  if defined __GNUC__
+#  if defined __GNUC__ || defined __clang__
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef scanf
 /* Don't break __attribute__((format(scanf,M,N))).  */
 #    define scanf __scanf__
 #   endif
 _GL_FUNCDECL_RPL_1 (__scanf__, int,
-                    (const char *format, ...)
+                    (const char *restrict format, ...)
                     __asm__ (@ASM_SYMBOL_PREFIX@
                              _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf))
                     _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
                     _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
+_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *restrict format, ...));
 #  else
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    undef scanf
 #    define scanf rpl_scanf
 #   endif
-_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
+_GL_FUNCDECL_RPL (scanf, int, (const char *restrict format, ...)
                               _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2)
                               _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
+_GL_CXXALIAS_RPL (scanf, int, (const char *restrict format, ...));
 #  endif
 # else
-_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
+_GL_CXXALIAS_SYS (scanf, int, (const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (scanf);
+# endif
 #endif
 
 #if @GNULIB_SNPRINTF@
@@ -1057,23 +1257,30 @@ _GL_CXXALIASWARN (scanf);
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define snprintf rpl_snprintf
 #  endif
+#  define GNULIB_overrides_snprintf 1
 _GL_FUNCDECL_RPL (snprintf, int,
-                  (char *str, size_t size, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (snprintf, int,
-                  (char *str, size_t size, const char *format, ...));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...));
 # else
 #  if !@HAVE_DECL_SNPRINTF@
 _GL_FUNCDECL_SYS (snprintf, int,
-                  (char *str, size_t size, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 4)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (snprintf, int,
-                  (char *str, size_t size, const char *format, ...));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (snprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef snprintf
 # if HAVE_RAW_DECL_SNPRINTF
@@ -1096,14 +1303,20 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define sprintf rpl_sprintf
 #  endif
-_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
-                                _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
+#  define GNULIB_overrides_sprintf 1
+_GL_FUNCDECL_RPL (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...));
 # else
-_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
+_GL_CXXALIAS_SYS (sprintf, int,
+                  (char *restrict str, const char *restrict format, ...));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (sprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef sprintf
 /* Assume sprintf is always declared.  */
@@ -1112,6 +1325,22 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
                  "POSIX compliance");
 #endif
 
+#if @GNULIB_MDA_TEMPNAM@
+/* On native Windows, map 'tempnam' to '_tempnam', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::tempnam always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef tempnam
+#   define tempnam _tempnam
+#  endif
+_GL_CXXALIAS_MDA (tempnam, char *, (const char *dir, const char *prefix));
+# else
+_GL_CXXALIAS_SYS (tempnam, char *, (const char *dir, const char *prefix));
+# endif
+_GL_CXXALIASWARN (tempnam);
+#endif
+
 #if @GNULIB_TMPFILE@
 # if @REPLACE_TMPFILE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1122,7 +1351,9 @@ _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
 # else
 _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (tmpfile);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef tmpfile
 # if HAVE_RAW_DECL_TMPFILE
@@ -1140,9 +1371,10 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define asprintf rpl_asprintf
 #  endif
+#  define GNULIB_overrides_asprintf
 _GL_FUNCDECL_RPL (asprintf, int,
                   (char **result, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (asprintf, int,
                   (char **result, const char *format, ...));
@@ -1150,7 +1382,7 @@ _GL_CXXALIAS_RPL (asprintf, int,
 #  if !@HAVE_VASPRINTF@
 _GL_FUNCDECL_SYS (asprintf, int,
                   (char **result, const char *format, ...)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (asprintf, int,
@@ -1161,9 +1393,10 @@ _GL_CXXALIASWARN (asprintf);
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define vasprintf rpl_vasprintf
 #  endif
+#  define GNULIB_overrides_vasprintf 1
 _GL_FUNCDECL_RPL (vasprintf, int,
                   (char **result, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vasprintf, int,
                   (char **result, const char *format, va_list args));
@@ -1171,7 +1404,7 @@ _GL_CXXALIAS_RPL (vasprintf, int,
 #  if !@HAVE_VASPRINTF@
 _GL_FUNCDECL_SYS (vasprintf, int,
                   (char **result, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (vasprintf, int,
@@ -1185,22 +1418,27 @@ _GL_CXXALIASWARN (vasprintf);
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define vdprintf rpl_vdprintf
 #  endif
-_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((2)));
-_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
+_GL_FUNCDECL_RPL (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args));
 # else
 #  if !@HAVE_VDPRINTF@
-_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((2)));
+_GL_FUNCDECL_SYS (vdprintf, int,
+                  (int fd, const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+                  _GL_ARG_NONNULL ((2)));
 #  endif
 /* Need to cast, because on Solaris, the third parameter will likely be
                                                     __va_list args.  */
 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
-                       (int fd, const char *format, va_list args));
+                       (int fd, const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vdprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef vdprintf
 # if HAVE_RAW_DECL_VDPRINTF
@@ -1217,23 +1455,32 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
 #  endif
 #  define GNULIB_overrides_vfprintf 1
 #  if @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
-                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  else
-_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
-                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
-                                 _GL_ARG_NONNULL ((1, 2)));
+_GL_FUNCDECL_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0)
+                  _GL_ARG_NONNULL ((1, 2)));
 #  endif
-_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
+_GL_CXXALIAS_RPL (vfprintf, int,
+                  (FILE *restrict fp,
+                   const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the third parameter is
                                                       __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
-                       (FILE *fp, const char *format, va_list args));
+                       (FILE *restrict fp,
+                        const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vfprintf);
+# endif
 #endif
 #if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
 # if !GNULIB_overrides_vfprintf
@@ -1252,16 +1499,21 @@ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
 #   define vfscanf rpl_vfscanf
 #  endif
 _GL_FUNCDECL_RPL (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args)
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args)
                   _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args));
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args));
 # else
 _GL_CXXALIAS_SYS (vfscanf, int,
-                  (FILE *stream, const char *format, va_list args));
+                  (FILE *restrict stream,
+                   const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vfscanf);
+# endif
 #endif
 
 #if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
@@ -1272,22 +1524,25 @@ _GL_CXXALIASWARN (vfscanf);
 #  endif
 #  define GNULIB_overrides_vprintf 1
 #  if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@
-_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
-                                _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0)
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
+                                _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (1, 0)
                                 _GL_ARG_NONNULL ((1)));
 #  else
-_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
+_GL_FUNCDECL_RPL (vprintf, int, (const char *restrict format, va_list args)
                                 _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0)
                                 _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
+_GL_CXXALIAS_RPL (vprintf, int, (const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the second parameter is
                                                           __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
-_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
+_GL_CXXALIAS_SYS_CAST (vprintf, int,
+                       (const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vprintf);
+# endif
 #endif
 #if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
 # if !GNULIB_overrides_vprintf
@@ -1305,14 +1560,16 @@ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
 #   undef vscanf
 #   define vscanf rpl_vscanf
 #  endif
-_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
+_GL_FUNCDECL_RPL (vscanf, int, (const char *restrict format, va_list args)
                                _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0)
                                _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
+_GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
 # else
-_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
+_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vscanf);
+# endif
 #endif
 
 #if @GNULIB_VSNPRINTF@
@@ -1320,23 +1577,30 @@ _GL_CXXALIASWARN (vscanf);
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define vsnprintf rpl_vsnprintf
 #  endif
+#  define GNULIB_overrides_vsnprintf 1
 _GL_FUNCDECL_RPL (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
                   _GL_ARG_NONNULL ((3)));
 _GL_CXXALIAS_RPL (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args));
 # else
 #  if !@HAVE_DECL_VSNPRINTF@
 _GL_FUNCDECL_SYS (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0)
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (3, 0)
                   _GL_ARG_NONNULL ((3)));
 #  endif
 _GL_CXXALIAS_SYS (vsnprintf, int,
-                  (char *str, size_t size, const char *format, va_list args));
+                  (char *restrict str, size_t size,
+                   const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vsnprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef vsnprintf
 # if HAVE_RAW_DECL_VSNPRINTF
@@ -1350,20 +1614,26 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define vsprintf rpl_vsprintf
 #  endif
+#  define GNULIB_overrides_vsprintf 1
 _GL_FUNCDECL_RPL (vsprintf, int,
-                  (char *str, const char *format, va_list args)
-                  _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0)
+                  (char *restrict str,
+                   const char *restrict format, va_list args)
+                  _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (vsprintf, int,
-                  (char *str, const char *format, va_list args));
+                  (char *restrict str,
+                   const char *restrict format, va_list args));
 # else
 /* Need to cast, because on Solaris, the third parameter is
                                                        __va_list args
    and GCC's fixincludes did not change this to __gnuc_va_list.  */
 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
-                       (char *str, const char *format, va_list args));
+                       (char *restrict str,
+                        const char *restrict format, va_list args));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (vsprintf);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef vsprintf
 /* Assume vsprintf is always declared.  */
index 441c018..652062d 100644 (file)
@@ -1,18 +1,18 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
@@ -53,8 +53,8 @@
 # include <sys/loadavg.h>
 #endif
 
-/* Native Windows platforms declare mktemp() in <io.h>.  */
-#if 0 && (defined _WIN32 && ! defined __CYGWIN__)
+/* Native Windows platforms declare _mktemp() in <io.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
 # include <io.h>
 #endif
 
@@ -101,10 +101,12 @@ struct random_data
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* The definition of _Noreturn is copied here.  */
@@ -147,6 +149,31 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
 #endif
 
 
+/* Allocate memory with indefinite extent and specified alignment.  */
+#if @GNULIB_ALIGNED_ALLOC@
+# if @REPLACE_ALIGNED_ALLOC@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef aligned_alloc
+#   define aligned_alloc rpl_aligned_alloc
+#  endif
+_GL_FUNCDECL_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
+_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
+# else
+#  if @HAVE_ALIGNED_ALLOC@
+_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
+#  endif
+# endif
+# if @HAVE_ALIGNED_ALLOC@
+_GL_CXXALIASWARN (aligned_alloc);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef aligned_alloc
+# if HAVE_RAW_DECL_ALIGNED_ALLOC
+_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
+                 "use gnulib module aligned_alloc for portability");
+# endif
+#endif
+
 #if @GNULIB_ATOLL@
 /* Parse a signed decimal integer.
    Returns the value of the integer.  Errors are not detected.  */
@@ -176,7 +203,9 @@ _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
 # else
 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (calloc);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef calloc
 /* Assume calloc is always declared.  */
@@ -199,6 +228,10 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
 #  endif
 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
 # endif
+# ifndef GNULIB_defined_canonicalize_file_name
+#  define GNULIB_defined_canonicalize_file_name \
+     (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
+# endif
 _GL_CXXALIASWARN (canonicalize_file_name);
 #elif defined GNULIB_POSIXCHECK
 # undef canonicalize_file_name
@@ -209,6 +242,94 @@ _GL_WARN_ON_USE (canonicalize_file_name,
 # endif
 #endif
 
+#if @GNULIB_MDA_ECVT@
+/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef ecvt
+#   define ecvt _ecvt
+#  endif
+_GL_CXXALIAS_MDA (ecvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+# else
+#  if @HAVE_DECL_ECVT@
+_GL_CXXALIAS_SYS (ecvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
+_GL_CXXALIASWARN (ecvt);
+# endif
+#endif
+
+#if @GNULIB_MDA_FCVT@
+/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fcvt
+#   define fcvt _fcvt
+#  endif
+_GL_CXXALIAS_MDA (fcvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+# else
+#  if @HAVE_DECL_FCVT@
+_GL_CXXALIAS_SYS (fcvt, char *,
+                  (double number, int ndigits, int *decptp, int *signp));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
+_GL_CXXALIASWARN (fcvt);
+# endif
+#endif
+
+#if @GNULIB_FREE_POSIX@
+# if @REPLACE_FREE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef free
+#   define free rpl_free
+#  endif
+_GL_FUNCDECL_RPL (free, void, (void *ptr));
+_GL_CXXALIAS_RPL (free, void, (void *ptr));
+# else
+_GL_CXXALIAS_SYS (free, void, (void *ptr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (free);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef free
+/* Assume free is always declared.  */
+_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
+                 "use gnulib module free for portability");
+#endif
+
+#if @GNULIB_MDA_GCVT@
+/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef gcvt
+#   define gcvt _gcvt
+#  endif
+_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
+# else
+#  if @HAVE_DECL_GCVT@
+_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
+_GL_CXXALIASWARN (gcvt);
+# endif
+#endif
+
 #if @GNULIB_GETLOADAVG@
 /* Store max(NELEM,3) load average numbers in LOADAVG[].
    The three numbers are the load average of the last 1 minute, the last 5
@@ -238,8 +359,8 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
        element (or NULL if it doesn't contain an "=" sign),
      - It returns the index of the "token" in the given array of tokens.
    Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
-   For more details see the POSIX:2001 specification.
-   http://www.opengroup.org/susv3xsh/getsubopt.html */
+   For more details see the POSIX specification.
+   https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
 # if !@HAVE_GETSUBOPT@
 _GL_FUNCDECL_SYS (getsubopt, int,
                   (char **optionp, char *const *tokens, char **valuep)
@@ -288,7 +409,9 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
 # else
 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (malloc);
+# endif
 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
 # undef malloc
 /* Assume malloc is always declared.  */
@@ -303,12 +426,27 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
 #   undef mbtowc
 #   define mbtowc rpl_mbtowc
 #  endif
-_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
-_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+_GL_FUNCDECL_RPL (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
+_GL_CXXALIAS_RPL (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
 # else
-_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
+#  if !@HAVE_MBTOWC@
+_GL_FUNCDECL_SYS (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
+#  endif
+_GL_CXXALIAS_SYS (mbtowc, int,
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbtowc);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbtowc
+# if HAVE_RAW_DECL_MBTOWC
+_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - "
+                 "use gnulib module mbtowc for portability");
+# endif
 #endif
 
 #if @GNULIB_MKDTEMP@
@@ -443,6 +581,51 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
 # endif
 #endif
 
+#if @GNULIB_MDA_MKTEMP@
+/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::mktemp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mktemp
+#   define mktemp _mktemp
+#  endif
+_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/));
+# else
+_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/));
+# endif
+_GL_CXXALIASWARN (mktemp);
+#endif
+
+/* Allocate memory with indefinite extent and specified alignment.  */
+#if @GNULIB_POSIX_MEMALIGN@
+# if @REPLACE_POSIX_MEMALIGN@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef posix_memalign
+#   define posix_memalign rpl_posix_memalign
+#  endif
+_GL_FUNCDECL_RPL (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size));
+# else
+#  if @HAVE_POSIX_MEMALIGN@
+_GL_CXXALIAS_SYS (posix_memalign, int,
+                  (void **memptr, size_t alignment, size_t size));
+#  endif
+# endif
+# if @HAVE_POSIX_MEMALIGN@
+_GL_CXXALIASWARN (posix_memalign);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_memalign
+# if HAVE_RAW_DECL_POSIX_MEMALIGN
+_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
+                 "use gnulib module posix_memalign for portability");
+# endif
+#endif
+
 #if @GNULIB_POSIX_OPENPT@
 /* Return an FD open to the master side of a pseudo-terminal.  Flags should
    include O_RDWR, and may also include O_NOCTTY.  */
@@ -501,6 +684,9 @@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
 #  endif
 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
 # endif
+# ifndef GNULIB_defined_ptsname_r
+#  define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
+# endif
 _GL_CXXALIASWARN (ptsname_r);
 #elif defined GNULIB_POSIXCHECK
 # undef ptsname_r
@@ -518,6 +704,28 @@ _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (putenv, int, (char *string));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putenv
+#   define putenv _putenv
+#  endif
+_GL_CXXALIAS_MDA (putenv, int, (char *string));
+# else
+_GL_CXXALIAS_SYS (putenv, int, (char *string));
+# endif
+_GL_CXXALIASWARN (putenv);
+#elif @GNULIB_MDA_PUTENV@
+/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::putenv always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef putenv
+#   define putenv _putenv
+#  endif
+/* Need to cast, because on mingw, the parameter is either
+   'const char *string' or 'char *string'.  */
+_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
 # else
 _GL_CXXALIAS_SYS (putenv, int, (char *string));
 # endif
@@ -573,10 +781,21 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
 
 
 #if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
+# if @REPLACE_RANDOM@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef random
+#   define random rpl_random
+#  endif
+_GL_FUNCDECL_RPL (random, long, (void));
+_GL_CXXALIAS_RPL (random, long, (void));
+# else
+#  if !@HAVE_RANDOM@
 _GL_FUNCDECL_SYS (random, long, (void));
+#  endif
+/* Need to cast, because on Haiku, the return type is
+                               int.  */
+_GL_CXXALIAS_SYS_CAST (random, long, (void));
 # endif
-_GL_CXXALIAS_SYS (random, long, (void));
 _GL_CXXALIASWARN (random);
 #elif defined GNULIB_POSIXCHECK
 # undef random
@@ -587,10 +806,21 @@ _GL_WARN_ON_USE (random, "random is unportable - "
 #endif
 
 #if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@
+# if @REPLACE_RANDOM@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef srandom
+#   define srandom rpl_srandom
+#  endif
+_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed));
+_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed));
+# else
+#  if !@HAVE_RANDOM@
 _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
+#  endif
+/* Need to cast, because on FreeBSD, the first parameter is
+                                       unsigned long seed.  */
+_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
 # endif
-_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
 _GL_CXXALIASWARN (srandom);
 #elif defined GNULIB_POSIXCHECK
 # undef srandom
@@ -601,31 +831,56 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - "
 #endif
 
 #if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@
+# if @REPLACE_INITSTATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef initstate
+#   define initstate rpl_initstate
+#  endif
+_GL_FUNCDECL_RPL (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (initstate, char *,
+                  (unsigned int seed, char *buf, size_t buf_size));
+# else
+#  if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@
 _GL_FUNCDECL_SYS (initstate, char *,
                   (unsigned int seed, char *buf, size_t buf_size)
                   _GL_ARG_NONNULL ((2)));
+#  endif
+/* Need to cast, because on FreeBSD, the first parameter is
+                        unsigned long seed.  */
+_GL_CXXALIAS_SYS_CAST (initstate, char *,
+                       (unsigned int seed, char *buf, size_t buf_size));
 # endif
-_GL_CXXALIAS_SYS (initstate, char *,
-                  (unsigned int seed, char *buf, size_t buf_size));
 _GL_CXXALIASWARN (initstate);
 #elif defined GNULIB_POSIXCHECK
 # undef initstate
-# if HAVE_RAW_DECL_INITSTATE_R
+# if HAVE_RAW_DECL_INITSTATE
 _GL_WARN_ON_USE (initstate, "initstate is unportable - "
                  "use gnulib module random for portability");
 # endif
 #endif
 
 #if @GNULIB_RANDOM@
-# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@
+# if @REPLACE_SETSTATE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef setstate
+#   define setstate rpl_setstate
+#  endif
+_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state));
+# else
+#  if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@
 _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter
+   is                                     const char *arg_state.  */
+_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
 # endif
-_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
 _GL_CXXALIASWARN (setstate);
 #elif defined GNULIB_POSIXCHECK
 # undef setstate
-# if HAVE_RAW_DECL_SETSTATE_R
+# if HAVE_RAW_DECL_SETSTATE
 _GL_WARN_ON_USE (setstate, "setstate is unportable - "
                  "use gnulib module random for portability");
 # endif
@@ -706,9 +961,11 @@ _GL_FUNCDECL_SYS (initstate_r, int,
                    struct random_data *rand_state)
                   _GL_ARG_NONNULL ((2, 4)));
 #  endif
-_GL_CXXALIAS_SYS (initstate_r, int,
-                  (unsigned int seed, char *buf, size_t buf_size,
-                   struct random_data *rand_state));
+/* Need to cast, because on Haiku, the third parameter is
+                                                     unsigned long buf_size.  */
+_GL_CXXALIAS_SYS_CAST (initstate_r, int,
+                       (unsigned int seed, char *buf, size_t buf_size,
+                        struct random_data *rand_state));
 # endif
 _GL_CXXALIASWARN (initstate_r);
 #elif defined GNULIB_POSIXCHECK
@@ -736,8 +993,10 @@ _GL_FUNCDECL_SYS (setstate_r, int,
                   (char *arg_state, struct random_data *rand_state)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
-_GL_CXXALIAS_SYS (setstate_r, int,
-                  (char *arg_state, struct random_data *rand_state));
+/* Need to cast, because on Haiku, the first parameter is
+                        void *arg_state.  */
+_GL_CXXALIAS_SYS_CAST (setstate_r, int,
+                       (char *arg_state, struct random_data *rand_state));
 # endif
 _GL_CXXALIASWARN (setstate_r);
 #elif defined GNULIB_POSIXCHECK
@@ -761,7 +1020,9 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
 # else
 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (realloc);
+# endif
 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
 # undef realloc
 /* Assume realloc is always declared.  */
@@ -771,12 +1032,23 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
 
 
 #if @GNULIB_REALLOCARRAY@
-# if ! @HAVE_REALLOCARRAY@
+# if @REPLACE_REALLOCARRAY@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef reallocarray
+#   define reallocarray rpl_reallocarray
+#  endif
+_GL_FUNCDECL_RPL (reallocarray, void *,
+                  (void *ptr, size_t nmemb, size_t size));
+_GL_CXXALIAS_RPL (reallocarray, void *,
+                  (void *ptr, size_t nmemb, size_t size));
+# else
+#  if ! @HAVE_REALLOCARRAY@
 _GL_FUNCDECL_SYS (reallocarray, void *,
                   (void *ptr, size_t nmemb, size_t size));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (reallocarray, void *,
                   (void *ptr, size_t nmemb, size_t size));
+# endif
 _GL_CXXALIASWARN (reallocarray);
 #elif defined GNULIB_POSIXCHECK
 # undef reallocarray
@@ -791,15 +1063,19 @@ _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define realpath rpl_realpath
 #  endif
-_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
-                                    _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
+_GL_FUNCDECL_RPL (realpath, char *,
+                  (const char *restrict name, char *restrict resolved)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (realpath, char *,
+                  (const char *restrict name, char *restrict resolved));
 # else
 #  if !@HAVE_REALPATH@
-_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
-                                    _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (realpath, char *,
+                  (const char *restrict name, char *restrict resolved)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
+_GL_CXXALIAS_SYS (realpath, char *,
+                  (const char *restrict name, char *restrict resolved));
 # endif
 _GL_CXXALIASWARN (realpath);
 #elif defined GNULIB_POSIXCHECK
@@ -881,17 +1157,24 @@ _GL_WARN_ON_USE (setenv, "setenv is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define strtod rpl_strtod
 #  endif
-_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
-                                  _GL_ARG_NONNULL ((1)));
-_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
+#  define GNULIB_defined_strtod_function 1
+_GL_FUNCDECL_RPL (strtod, double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtod, double,
+                  (const char *restrict str, char **restrict endp));
 # else
 #  if !@HAVE_STRTOD@
-_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
-                                  _GL_ARG_NONNULL ((1)));
+_GL_FUNCDECL_SYS (strtod, double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
 #  endif
-_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
+_GL_CXXALIAS_SYS (strtod, double,
+                  (const char *restrict str, char **restrict endp));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strtod);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strtod
 # if HAVE_RAW_DECL_STRTOD
@@ -900,6 +1183,77 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
 # endif
 #endif
 
+#if @GNULIB_STRTOLD@
+ /* Parse a 'long double' from STRING, updating ENDP if appropriate.  */
+# if @REPLACE_STRTOLD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtold rpl_strtold
+#  endif
+#  define GNULIB_defined_strtold_function 1
+_GL_FUNCDECL_RPL (strtold, long double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtold, long double,
+                  (const char *restrict str, char **restrict endp));
+# else
+#  if !@HAVE_STRTOLD@
+_GL_FUNCDECL_SYS (strtold, long double,
+                  (const char *restrict str, char **restrict endp)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtold, long double,
+                  (const char *restrict str, char **restrict endp));
+# endif
+_GL_CXXALIASWARN (strtold);
+#elif defined GNULIB_POSIXCHECK
+# undef strtold
+# if HAVE_RAW_DECL_STRTOLD
+_GL_WARN_ON_USE (strtold, "strtold is unportable - "
+                 "use gnulib module strtold for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOL@
+/* Parse a signed integer whose textual representation starts at STRING.
+   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+   "0x").
+   If ENDPTR is not NULL, the address of the first byte after the integer is
+   stored in *ENDPTR.
+   Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set
+   to ERANGE.  */
+# if @REPLACE_STRTOL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtol rpl_strtol
+#  endif
+#  define GNULIB_defined_strtol_function 1
+_GL_FUNCDECL_RPL (strtol, long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtol, long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# else
+#  if !@HAVE_STRTOL@
+_GL_FUNCDECL_SYS (strtol, long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtol, long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# endif
+_GL_CXXALIASWARN (strtol);
+#elif defined GNULIB_POSIXCHECK
+# undef strtol
+# if HAVE_RAW_DECL_STRTOL
+_GL_WARN_ON_USE (strtol, "strtol is unportable - "
+                 "use gnulib module strtol for portability");
+# endif
+#endif
+
 #if @GNULIB_STRTOLL@
 /* Parse a signed integer whose textual representation starts at STRING.
    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
@@ -909,13 +1263,29 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
    stored in *ENDPTR.
    Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
    to ERANGE.  */
-# if !@HAVE_STRTOLL@
+# if @REPLACE_STRTOLL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtoll rpl_strtoll
+#  endif
+#  define GNULIB_defined_strtoll_function 1
+_GL_FUNCDECL_RPL (strtoll, long long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoll, long long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# else
+#  if !@HAVE_STRTOLL@
 _GL_FUNCDECL_SYS (strtoll, long long,
-                  (const char *string, char **endptr, int base)
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
                   _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (strtoll, long long,
-                  (const char *string, char **endptr, int base));
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# endif
 _GL_CXXALIASWARN (strtoll);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoll
@@ -925,6 +1295,46 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
 # endif
 #endif
 
+#if @GNULIB_STRTOUL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+   "0x").
+   If ENDPTR is not NULL, the address of the first byte after the integer is
+   stored in *ENDPTR.
+   Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE.  */
+# if @REPLACE_STRTOUL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtoul rpl_strtoul
+#  endif
+#  define GNULIB_defined_strtoul_function 1
+_GL_FUNCDECL_RPL (strtoul, unsigned long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoul, unsigned long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# else
+#  if !@HAVE_STRTOUL@
+_GL_FUNCDECL_SYS (strtoul, unsigned long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (strtoul, unsigned long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# endif
+_GL_CXXALIASWARN (strtoul);
+#elif defined GNULIB_POSIXCHECK
+# undef strtoul
+# if HAVE_RAW_DECL_STRTOUL
+_GL_WARN_ON_USE (strtoul, "strtoul is unportable - "
+                 "use gnulib module strtoul for portability");
+# endif
+#endif
+
 #if @GNULIB_STRTOULL@
 /* Parse an unsigned integer whose textual representation starts at STRING.
    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
@@ -934,13 +1344,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
    stored in *ENDPTR.
    Upon overflow, the return value is ULLONG_MAX, and errno is set to
    ERANGE.  */
-# if !@HAVE_STRTOULL@
+# if @REPLACE_STRTOULL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define strtoull rpl_strtoull
+#  endif
+#  define GNULIB_defined_strtoull_function 1
+_GL_FUNCDECL_RPL (strtoull, unsigned long long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtoull, unsigned long long,
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# else
+#  if !@HAVE_STRTOULL@
 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
-                  (const char *string, char **endptr, int base)
+                  (const char *restrict string, char **restrict endptr,
+                   int base)
                   _GL_ARG_NONNULL ((1)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
-                  (const char *string, char **endptr, int base));
+                  (const char *restrict string, char **restrict endptr,
+                   int base));
+# endif
 _GL_CXXALIASWARN (strtoull);
 #elif defined GNULIB_POSIXCHECK
 # undef strtoull
@@ -1004,7 +1430,9 @@ _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
 # else
 _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wctomb);
+# endif
 #endif
 
 
diff --git a/lib/stdopen.c b/lib/stdopen.c
new file mode 100644 (file)
index 0000000..e1db32f
--- /dev/null
@@ -0,0 +1,66 @@
+/* stdopen.c - ensure that the three standard file descriptors are in use
+
+   Copyright (C) 2005-2006, 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert and Jim Meyering.  */
+
+#include <config.h>
+
+#include "stdopen.h"
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+/* Try to ensure that all of the standard file numbers (0, 1, 2)
+   are in use.  Without this, each application would have to guard
+   every call to open, dup, fopen, etc. with tests to ensure they
+   don't use one of the special file numbers when opening a file.
+   Return zero if successful, an errno value if at least one of
+   the file descriptors is initially closed and could not be opened.  */
+
+int
+stdopen (void)
+{
+  int fd;
+  for (fd = STDIN_FILENO; fd <= STDERR_FILENO; fd++)
+    {
+      if (fcntl (fd, F_GETFD) < 0)
+        {
+          /* Open /dev/null with the contrary mode so that the typical
+             read (stdin) or write (stdout, stderr) operation will fail.
+             With descriptor 0, we can do even better on systems that
+             have /dev/full, by opening that write-only instead of
+             /dev/null.  The only drawback is that a write-provoked
+             failure comes with a misleading errno value, ENOSPC.  */
+          int mode = fd == STDIN_FILENO ? O_WRONLY : O_RDONLY;
+          int full_fd = fd == STDIN_FILENO ? open ("/dev/full", mode) : -1;
+          int new_fd = full_fd < 0 ? open ("/dev/null", mode) : full_fd;
+          if (new_fd < 0)
+            return errno;
+          if (STDERR_FILENO < new_fd)
+            {
+              /* 0, 1, and 2 are already open somehow.
+                 Our is not to reason why.  */
+              close (new_fd);
+              return 0;
+            }
+        }
+    }
+
+  return 0;
+}
similarity index 57%
rename from lib/stdio--.h
rename to lib/stdopen.h
index d5cdb03..aa69c34 100644 (file)
@@ -1,6 +1,5 @@
-/* Like stdio.h, but redefine some names to avoid glitches.
-
-   Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+/* Arrange for stdin/stdout/stderr to be open.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* Written by Paul Eggert.  */
+/* Written by Jim Meyering, 2005.  */
 
-#include <stdio.h>
-#include "stdio-safer.h"
+#ifndef STDOPEN_H
+# define STDOPEN_H 1
 
-#if GNULIB_FOPEN_SAFER
-# undef fopen
-# define fopen fopen_safer
-#endif
+# ifdef __cplusplus
+extern "C" {
+# endif
 
-#if GNULIB_FREOPEN_SAFER
-# undef freopen
-# define freopen freopen_safer
-#endif
+int stdopen (void);
 
-#if GNULIB_TMPFILE_SAFER
-# undef tmpfile
-# define tmpfile tmpfile_safer
-#endif
+# ifdef __cplusplus
+}
+# endif
 
-#if GNULIB_POPEN_SAFER
-# undef popen
-# define popen popen_safer
 #endif
index 53bc253..22c5701 100644 (file)
@@ -1,20 +1,28 @@
 /* Substring search in a NUL terminated string of UNIT elements,
    using the Knuth-Morris-Pratt algorithm.
-   Copyright (C) 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2005.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software.
+   It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
+   You can redistribute it and/or modify it under either
+     - the terms of the GNU Lesser General Public License as published
+       by the Free Software Foundation; either version 3, or (at your
+       option) any later version, or
+     - the terms of the GNU General Public License as published by the
+       Free Software Foundation; either version 2, or (at your option)
+       any later version, or
+     - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License and the GNU General Public License
+   for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public
+   License and of the GNU General Public License along with this
+   program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Before including this file, you need to define:
      UNIT                    The element type of the needle and haystack.
index 49f22c5..c714270 100644 (file)
@@ -1,18 +1,18 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -58,5 +58,5 @@ strcasecmp (const char *s1, const char *s2)
     /* On machines where 'char' and 'int' are types of the same size, the
        difference of two 'unsigned char' values - including the sign bit -
        doesn't fit in an 'int'.  */
-    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+    return _GL_CMP (c1, c2);
 }
index bde1b95..adabd15 100644 (file)
@@ -1,17 +1,17 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>.  */
@@ -29,7 +29,7 @@
 
 /* Help GCC to generate good code for string comparisons with
    immediate strings. */
-#if defined (__GNUC__) && defined (__OPTIMIZE__)
+#if (defined __GNUC__ || defined __clang__) && defined __OPTIMIZE__
 
 static inline int
 streq9 (const char *s1, const char *s2)
index d3ad21e..e76d55d 100644 (file)
@@ -1,18 +1,18 @@
 /* strerror-override.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
@@ -29,6 +29,8 @@
 # endif
 #endif
 
+#if !GNULIB_defined_strerror_override_macro
+
 /* If ERRNUM maps to an errno value defined by gnulib, return a string
    describing the error.  Otherwise return NULL.  */
 const char *
@@ -37,12 +39,12 @@ strerror_override (int errnum)
   /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
   switch (errnum)
     {
-#if REPLACE_STRERROR_0
+# if REPLACE_STRERROR_0
     case 0:
       return "Success";
-#endif
+# endif
 
-#if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
+# if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
     case EINPROGRESS:
       return "Operation now in progress";
     case EALREADY:
@@ -89,8 +91,8 @@ strerror_override (int errnum)
       return "No route to host";
     case EWOULDBLOCK:
       return "Operation would block";
-#endif
-#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
+# endif
+# if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
     case ETXTBSY:
       return "Text file busy";
     case ENODATA:
@@ -103,8 +105,8 @@ strerror_override (int errnum)
       return "Timer expired";
     case EOTHER:
       return "Other error";
-#endif
-#if GNULIB_defined_EWINSOCK /* native Windows platforms */
+# endif
+# if GNULIB_defined_EWINSOCK /* native Windows platforms */
     case ESOCKTNOSUPPORT:
       return "Socket type not supported";
     case EPFNOSUPPORT:
@@ -125,7 +127,7 @@ strerror_override (int errnum)
       return "Stale NFS file handle";
     case EREMOTE:
       return "Object is remote";
-# if HAVE_WINSOCK2_H
+#  if HAVE_WINSOCK2_H
       /* WSA_INVALID_HANDLE maps to EBADF */
       /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
       /* WSA_INVALID_PARAMETER maps to EINVAL */
@@ -213,90 +215,92 @@ strerror_override (int errnum)
     case WSANO_DATA:
       return "Valid name, no data record of requested type";
       /* WSA_QOS_* omitted */
+#  endif
 # endif
-#endif
 
-#if GNULIB_defined_ENOMSG
+# if GNULIB_defined_ENOMSG
     case ENOMSG:
       return "No message of desired type";
-#endif
+# endif
 
-#if GNULIB_defined_EIDRM
+# if GNULIB_defined_EIDRM
     case EIDRM:
       return "Identifier removed";
-#endif
+# endif
 
-#if GNULIB_defined_ENOLINK
+# if GNULIB_defined_ENOLINK
     case ENOLINK:
       return "Link has been severed";
-#endif
+# endif
 
-#if GNULIB_defined_EPROTO
+# if GNULIB_defined_EPROTO
     case EPROTO:
       return "Protocol error";
-#endif
+# endif
 
-#if GNULIB_defined_EMULTIHOP
+# if GNULIB_defined_EMULTIHOP
     case EMULTIHOP:
       return "Multihop attempted";
-#endif
+# endif
 
-#if GNULIB_defined_EBADMSG
+# if GNULIB_defined_EBADMSG
     case EBADMSG:
       return "Bad message";
-#endif
+# endif
 
-#if GNULIB_defined_EOVERFLOW
+# if GNULIB_defined_EOVERFLOW
     case EOVERFLOW:
       return "Value too large for defined data type";
-#endif
+# endif
 
-#if GNULIB_defined_ENOTSUP
+# if GNULIB_defined_ENOTSUP
     case ENOTSUP:
       return "Not supported";
-#endif
+# endif
 
-#if GNULIB_defined_ENETRESET
+# if GNULIB_defined_ENETRESET
     case ENETRESET:
       return "Network dropped connection on reset";
-#endif
+# endif
 
-#if GNULIB_defined_ECONNABORTED
+# if GNULIB_defined_ECONNABORTED
     case ECONNABORTED:
       return "Software caused connection abort";
-#endif
+# endif
 
-#if GNULIB_defined_ESTALE
+# if GNULIB_defined_ESTALE
     case ESTALE:
       return "Stale NFS file handle";
-#endif
+# endif
 
-#if GNULIB_defined_EDQUOT
+# if GNULIB_defined_EDQUOT
     case EDQUOT:
       return "Disk quota exceeded";
-#endif
+# endif
 
-#if GNULIB_defined_ECANCELED
+# if GNULIB_defined_ECANCELED
     case ECANCELED:
       return "Operation canceled";
-#endif
+# endif
 
-#if GNULIB_defined_EOWNERDEAD
+# if GNULIB_defined_EOWNERDEAD
     case EOWNERDEAD:
       return "Owner died";
-#endif
+# endif
 
-#if GNULIB_defined_ENOTRECOVERABLE
+# if GNULIB_defined_ENOTRECOVERABLE
     case ENOTRECOVERABLE:
       return "State not recoverable";
-#endif
+# endif
 
-#if GNULIB_defined_EILSEQ
+# if GNULIB_defined_EILSEQ
     case EILSEQ:
       return "Invalid or incomplete multibyte or wide character";
-#endif
+# endif
 
     default:
       return NULL;
     }
 }
+
+#endif
index a96fd08..9cfc5ad 100644 (file)
@@ -1,18 +1,18 @@
 /* strerror-override.h --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _GL_STRERROR_OVERRIDE_H
@@ -51,6 +51,7 @@
 extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
 # else
 #  define strerror_override(ignored) NULL
+#  define GNULIB_defined_strerror_override_macro 1
 # endif
 
 #endif /* _GL_STRERROR_OVERRIDE_H */
index 36397bb..83926df 100644 (file)
@@ -1,18 +1,18 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index af73767..790a80e 100644 (file)
@@ -1,18 +1,18 @@
 /* declarations for strftime.c
 
-   Copyright (C) 2002, 2004, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <time.h>
@@ -24,8 +24,13 @@ extern "C" {
 /* Just like strftime, but with two more arguments:
    POSIX requires that strftime use the local timezone information.
    Use the timezone __TZ instead.  Use __NS as the number of
-   nanoseconds in the %N directive.  */
-size_t nstrftime (char *, size_t, char const *, struct tm const *,
+   nanoseconds in the %N directive.
+
+   On error, set errno and return 0.  Otherwise, return the number of
+   bytes generated (not counting the trailing NUL), preserving errno
+   if the number is 0.  This errno behavior is in draft POSIX 202x
+   plus some requested changes to POSIX.  */
+size_t nstrftime (char *restrict, size_t, char const *, struct tm const *,
                   timezone_t __tz, int __ns);
 
 #ifdef __cplusplus
index 53ae378..b92bdc9 100644 (file)
@@ -1,19 +1,19 @@
 /* Charset conversion.
-   Copyright (C) 2001-2007, 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2007, 2010-2021 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -193,11 +193,7 @@ mem_cd_iconv (const char *src, size_t srclen, iconv_t cd,
  fail:
   {
     if (result != *resultp)
-      {
-        int saved_errno = errno;
-        free (result);
-        errno = saved_errno;
-      }
+      free (result);
     return -1;
   }
 # undef tmpbufsize
@@ -385,12 +381,8 @@ str_cd_iconv (const char *src, iconv_t cd)
   return result;
 
  failed:
-  {
-    int saved_errno = errno;
-    free (result);
-    errno = saved_errno;
-    return NULL;
-  }
+  free (result);
+  return NULL;
 
 # endif
 }
@@ -441,11 +433,7 @@ str_iconv (const char *src, const char *from_codeset, const char *to_codeset)
         {
           if (iconv_close (cd) < 0)
             {
-              /* Return NULL, but free the allocated memory, and while doing
-                 that, preserve the errno from iconv_close.  */
-              int saved_errno = errno;
               free (result);
-              errno = saved_errno;
               return NULL;
             }
         }
index 7a4e495..69da35d 100644 (file)
@@ -1,19 +1,19 @@
 /* Charset conversion.
-   Copyright (C) 2001-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _STRICONV_H
 #define _STRICONV_H
index 29f4ba6..cb964bc 100644 (file)
@@ -1,19 +1,19 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
 # include <unistd.h>
 #endif
 
+/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>.  */
+/* But in any case avoid namespace pollution on glibc systems.  */
+#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
+     && defined _AIX) \
+    && ! defined __GLIBC__
+# include <strings.h>
+#endif
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
@@ -108,10 +118,18 @@ _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
 
 /* Find the index of the least-significant set bit.  */
 #if @GNULIB_FFSLL@
-# if !@HAVE_FFSLL@
+# if @REPLACE_FFSLL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define ffsll rpl_ffsll
+#  endif
+_GL_FUNCDECL_RPL (ffsll, int, (long long int i));
+_GL_CXXALIAS_RPL (ffsll, int, (long long int i));
+# else
+#  if !@HAVE_FFSLL@
 _GL_FUNCDECL_SYS (ffsll, int, (long long int i));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (ffsll, int, (long long int i));
+# endif
 _GL_CXXALIASWARN (ffsll);
 #elif defined GNULIB_POSIXCHECK
 # undef ffsll
@@ -121,10 +139,30 @@ _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
 #endif
 
 
+#if @GNULIB_MDA_MEMCCPY@
+/* On native Windows, map 'memccpy' to '_memccpy', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::memccpy always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef memccpy
+#   define memccpy _memccpy
+#  endif
+_GL_CXXALIAS_MDA (memccpy, void *,
+                  (void *dest, const void *src, int c, size_t n));
+# else
+_GL_CXXALIAS_SYS (memccpy, void *,
+                  (void *dest, const void *src, int c, size_t n));
+# endif
+_GL_CXXALIASWARN (memccpy);
+#endif
+
+
 /* Return the first instance of C within N bytes of S, or NULL.  */
 #if @GNULIB_MEMCHR@
 # if @REPLACE_MEMCHR@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef memchr
 #   define memchr rpl_memchr
 #  endif
 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
@@ -132,11 +170,6 @@ _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
                                   _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
 # else
-#  if ! @HAVE_MEMCHR@
-_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
-                                  _GL_ATTRIBUTE_PURE
-                                  _GL_ARG_NONNULL ((1)));
-#  endif
   /* On some systems, this function is defined as an overloaded function:
        extern "C" { const void * std::memchr (const void *, int, size_t); }
        extern "C++" { void * std::memchr (void *, int, size_t); }  */
@@ -149,7 +182,7 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
 _GL_CXXALIASWARN1 (memchr, void const *,
                    (void const *__s, int __c, size_t __n));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (memchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -332,9 +365,11 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
    GB18030 and the character to be searched is a digit.  */
 # undef strchr
 /* Assume strchr is always declared.  */
-_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
-                 "in some multibyte locales - "
-                 "use mbschr if you care about internationalization");
+_GL_WARN_ON_USE_CXX (strchr,
+                     const char *, char *, (const char *, int),
+                     "strchr cannot work correctly on character strings "
+                     "in some multibyte locales - "
+                     "use mbschr if you care about internationalization");
 #endif
 
 /* Find the first occurrence of C in S or the final NUL byte.  */
@@ -385,6 +420,12 @@ _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strdup
+#   define strdup _strdup
+#  endif
+_GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
 # else
 #  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
     /* strdup exists as a function and as a macro.  Get rid of the macro.  */
@@ -402,6 +443,23 @@ _GL_CXXALIASWARN (strdup);
 _GL_WARN_ON_USE (strdup, "strdup is unportable - "
                  "use gnulib module strdup for portability");
 # endif
+#elif @GNULIB_MDA_STRDUP@
+/* On native Windows, map 'creat' to '_creat', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::strdup always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strdup
+#   define strdup _strdup
+#  endif
+_GL_CXXALIAS_MDA (strdup, char *, (char const *__s));
+# else
+#  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
+#   undef strdup
+#  endif
+_GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
+# endif
+_GL_CXXALIASWARN (strdup);
 #endif
 
 /* Append no more than N characters from SRC onto DEST.  */
@@ -411,13 +469,18 @@ _GL_WARN_ON_USE (strdup, "strdup is unportable - "
 #   undef strncat
 #   define strncat rpl_strncat
 #  endif
-_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
-                                   _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
+_GL_FUNCDECL_RPL (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n));
 # else
-_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
+_GL_CXXALIAS_SYS (strncat, char *,
+                  (char *restrict dest, const char *restrict src, size_t n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strncat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strncat
 # if HAVE_RAW_DECL_STRNCAT
@@ -512,7 +575,7 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk,
 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
 _GL_CXXALIASWARN1 (strpbrk, char const *,
                    (char const *__s, char const *__accept));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strpbrk);
 # endif
 # if defined GNULIB_POSIXCHECK
@@ -521,15 +584,19 @@ _GL_CXXALIASWARN (strpbrk);
    locale encoding is GB18030 and one of the characters to be searched is a
    digit.  */
 #  undef strpbrk
-_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
-                 "in multibyte locales - "
-                 "use mbspbrk if you care about internationalization");
+_GL_WARN_ON_USE_CXX (strpbrk,
+                     const char *, char *, (const char *, const char *),
+                     "strpbrk cannot work correctly on character strings "
+                     "in multibyte locales - "
+                     "use mbspbrk if you care about internationalization");
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef strpbrk
 # if HAVE_RAW_DECL_STRPBRK
-_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
-                 "use gnulib module strpbrk for portability");
+_GL_WARN_ON_USE_CXX (strpbrk,
+                     const char *, char *, (const char *, const char *),
+                     "strpbrk is unportable - "
+                     "use gnulib module strpbrk for portability");
 # endif
 #endif
 
@@ -548,9 +615,11 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
    GB18030 and the character to be searched is a digit.  */
 # undef strrchr
 /* Assume strrchr is always declared.  */
-_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
-                 "in some multibyte locales - "
-                 "use mbsrchr if you care about internationalization");
+_GL_WARN_ON_USE_CXX (strrchr,
+                     const char *, char *, (const char *, int),
+                     "strrchr cannot work correctly on character strings "
+                     "in some multibyte locales - "
+                     "use mbsrchr if you care about internationalization");
 #endif
 
 /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
@@ -614,7 +683,7 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
 _GL_CXXALIASWARN1 (strstr, const char *,
                    (const char *haystack, const char *needle));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (strstr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -693,7 +762,7 @@ _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
    This is a variant of strtok() that is multithread-safe.
 
    For the POSIX documentation for this function, see:
-   http://www.opengroup.org/susv3xsh/strtok.html
+   https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtok.html
 
    Caveat: It modifies the original string.
    Caveat: These functions cannot be used on constant strings.
@@ -964,7 +1033,8 @@ _GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
    Caveat: The identity of the delimiting character is lost.
 
    See also mbssep().  */
-_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
+_GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim,
+                              char **save_ptr)
      _GL_ARG_NONNULL ((2, 3));
 #endif
 
@@ -980,7 +1050,9 @@ _GL_CXXALIAS_RPL (strerror, char *, (int));
 # else
 _GL_CXXALIAS_SYS (strerror, char *, (int));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strerror);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef strerror
 /* Assume strerror is always declared.  */
@@ -1017,6 +1089,60 @@ _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
 # endif
 #endif
 
+/* Return the name of the system error code ERRNUM.  */
+#if @GNULIB_STRERRORNAME_NP@
+# if @REPLACE_STRERRORNAME_NP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef strerrorname_np
+#   define strerrorname_np rpl_strerrorname_np
+#  endif
+_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum));
+_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum));
+# else
+#  if !@HAVE_STRERRORNAME_NP@
+_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum));
+#  endif
+_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum));
+# endif
+_GL_CXXALIASWARN (strerrorname_np);
+#elif defined GNULIB_POSIXCHECK
+# undef strerrorname_np
+# if HAVE_RAW_DECL_STRERRORNAME_NP
+_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - "
+                 "use gnulib module strerrorname_np for portability");
+# endif
+#endif
+
+/* Return an abbreviation string for the signal number SIG.  */
+#if @GNULIB_SIGABBREV_NP@
+# if ! @HAVE_SIGABBREV_NP@
+_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig));
+# endif
+_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig));
+_GL_CXXALIASWARN (sigabbrev_np);
+#elif defined GNULIB_POSIXCHECK
+# undef sigabbrev_np
+# if HAVE_RAW_DECL_SIGABBREV_NP
+_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - "
+                 "use gnulib module sigabbrev_np for portability");
+# endif
+#endif
+
+/* Return an English description string for the signal number SIG.  */
+#if @GNULIB_SIGDESCR_NP@
+# if ! @HAVE_SIGDESCR_NP@
+_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig));
+# endif
+_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig));
+_GL_CXXALIASWARN (sigdescr_np);
+#elif defined GNULIB_POSIXCHECK
+# undef sigdescr_np
+# if HAVE_RAW_DECL_SIGDESCR_NP
+_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - "
+                 "use gnulib module sigdescr_np for portability");
+# endif
+#endif
+
 #if @GNULIB_STRSIGNAL@
 # if @REPLACE_STRSIGNAL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
index b9d0a67..07aed18 100644 (file)
@@ -1,19 +1,19 @@
 /* A substitute <strings.h>.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_STRINGS_H
 
index 60c6781..99bfbe6 100644 (file)
@@ -1,19 +1,19 @@
 /* stripslash.c -- remove redundant trailing slashes from a file name
 
-   Copyright (C) 1990, 2001, 2003-2006, 2009-2018 Free Software Foundation,
+   Copyright (C) 1990, 2001, 2003-2006, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index f750679..ccc0170 100644 (file)
@@ -1,18 +1,18 @@
 /* strncasecmp.c -- case insensitive string comparator
-   Copyright (C) 1998-1999, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
@@ -58,5 +58,5 @@ strncasecmp (const char *s1, const char *s2, size_t n)
     /* On machines where 'char' and 'int' are types of the same size, the
        difference of two 'unsigned char' values - including the sign bit -
        doesn't fit in an 'int'.  */
-    return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+    return _GL_CMP (c1, c2);
 }
diff --git a/lib/strndup.c b/lib/strndup.c
deleted file mode 100644 (file)
index b5c18dd..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* A replacement function, for systems that lack strndup.
-
-   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2018 Free Software
-   Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 3, or (at your option) any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <stdlib.h>
-
-char *
-strndup (char const *s, size_t n)
-{
-  size_t len = strnlen (s, n);
-  char *new = malloc (len + 1);
-
-  if (new == NULL)
-    return NULL;
-
-  new[len] = '\0';
-  return memcpy (new, s, len);
-}
index f0b1b8b..ded06ce 100644 (file)
@@ -1,19 +1,19 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 4459f6b..ac12576 100644 (file)
@@ -1,17 +1,17 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index 896a180..2d69299 100644 (file)
@@ -1,17 +1,17 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _STRNLEN1_H
index 6994ec4..7745f10 100644 (file)
@@ -1,19 +1,19 @@
-/* Copyright (C) 2002, 2004-2005, 2007, 2009-2018 Free Software Foundation,
+/* Copyright (C) 2002, 2004-2005, 2007, 2009-2021 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
 # include <config.h>
@@ -28,6 +28,7 @@
 #endif
 #include <limits.h>
 #include <string.h>
+#include <strings.h>
 #include <stdbool.h>
 
 #ifdef _LIBC
@@ -202,11 +203,12 @@ day_of_the_week (struct tm *tm)
      difference between this data in the one on TM and so determine
      the weekday.  */
   int corr_year = 1900 + tm->tm_year - (tm->tm_mon < 2);
+  int corr_quad = corr_year / 4;
   int wday = (-473
               + (365 * (tm->tm_year - 70))
-              + (corr_year / 4)
-              - ((corr_year / 4) / 25) + ((corr_year / 4) % 25 < 0)
-              + (((corr_year / 4) / 25) / 4)
+              + corr_quad
+              - ((corr_quad + (corr_quad < 0)) / 25 - (corr_quad < 0))
+              + ((corr_quad / 25) / 4)
               + __mon_yday[0][tm->tm_mon]
               + tm->tm_mday - 1);
   tm->tm_wday = ((wday % 7) + 7) % 7;
@@ -277,7 +279,7 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt LOCALE_PARAM)
         }
 
       /* Any character but '%' must be matched by the same character
-         in the iput string.  */
+         in the input string.  */
       if (*fmt != '%')
         {
           match_char (*fmt++, *rp++);
index 69e3a99..bf8534a 100644 (file)
@@ -1,19 +1,19 @@
 /* Convert string representation of a number into an intmax_t value.
 
-   Copyright (C) 1999, 2001-2004, 2006, 2009-2018 Free Software Foundation,
+   Copyright (C) 1999, 2001-2004, 2006, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert. */
 #include "verify.h"
 
 #ifdef UNSIGNED
-# if HAVE_UNSIGNED_LONG_LONG_INT
-#  ifndef HAVE_DECL_STRTOULL
+# ifndef HAVE_DECL_STRTOULL
 "this configure-time declaration test was not run"
-#  endif
-#  if !HAVE_DECL_STRTOULL
+# endif
+# if !HAVE_DECL_STRTOULL
 unsigned long long int strtoull (char const *, char **, int);
-#  endif
 # endif
 
 #else
 
-# if HAVE_LONG_LONG_INT
-#  ifndef HAVE_DECL_STRTOLL
+# ifndef HAVE_DECL_STRTOLL
 "this configure-time declaration test was not run"
-#  endif
-#  if !HAVE_DECL_STRTOLL
+# endif
+# if !HAVE_DECL_STRTOLL
 long long int strtoll (char const *, char **, int);
-#  endif
 # endif
 #endif
 
 #ifdef UNSIGNED
-# define Have_long_long HAVE_UNSIGNED_LONG_LONG_INT
 # define Int uintmax_t
 # define Strtoimax strtoumax
 # define Strtol strtoul
 # define Strtoll strtoull
 # define Unsigned unsigned
 #else
-# define Have_long_long HAVE_LONG_LONG_INT
 # define Int intmax_t
 # define Strtoimax strtoimax
 # define Strtol strtol
@@ -68,15 +62,11 @@ long long int strtoll (char const *, char **, int);
 Int
 Strtoimax (char const *ptr, char **endptr, int base)
 {
-#if Have_long_long
   verify (sizeof (Int) == sizeof (Unsigned long int)
           || sizeof (Int) == sizeof (Unsigned long long int));
 
   if (sizeof (Int) != sizeof (Unsigned long int))
     return Strtoll (ptr, endptr, base);
-#else
-  verify (sizeof (Int) == sizeof (Unsigned long int));
-#endif
 
   return Strtol (ptr, endptr, base);
 }
index f6f5c32..c49321b 100644 (file)
@@ -1,22 +1,22 @@
 /* Convert string representation of a number into an integer value.
 
-   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2018 Free Software
+   Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@gnu.org.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 3 of the License, or any
-   later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifdef _LIBC
@@ -51,6 +51,7 @@
 
 /* Determine the name.  */
 #ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef strtol
 # if UNSIGNED
 #  ifdef USE_WIDE_CHAR
 #   ifdef QUAD
@@ -82,6 +83,7 @@
 # endif
 #else
 # if UNSIGNED
+#  undef strtol
 #  ifdef USE_WIDE_CHAR
 #   ifdef QUAD
 #    define strtol wcstoull
@@ -97,6 +99,7 @@
 #  endif
 # else
 #  ifdef USE_WIDE_CHAR
+#   undef strtol
 #   ifdef QUAD
 #    define strtol wcstoll
 #   else
 #   endif
 #  else
 #   ifdef QUAD
+#    undef strtol
 #    define strtol strtoll
 #   endif
 #  endif
 #endif
 
 
+#ifdef USE_NUMBER_GROUPING
+# define GROUP_PARAM_PROTO , int group
+#else
+# define GROUP_PARAM_PROTO
+#endif
+
 /* We use this code also for the extended locale handling where the
    function gets as an additional argument the locale which has to be
    used.  To access the values we have to redefine the _NL_CURRENT
 # define UCHAR_TYPE unsigned char
 # define STRING_TYPE char
 # ifdef USE_IN_EXTENDED_LOCALE_MODEL
-#  define ISSPACE(Ch) __isspace_l ((Ch), loc)
-#  define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-#  define TOUPPER(Ch) __toupper_l ((Ch), loc)
+#  define ISSPACE(Ch) __isspace_l ((unsigned char) (Ch), loc)
+#  define ISALPHA(Ch) __isalpha_l ((unsigned char) (Ch), loc)
+#  define TOUPPER(Ch) __toupper_l ((unsigned char) (Ch), loc)
 # else
-#  define ISSPACE(Ch) isspace (Ch)
-#  define ISALPHA(Ch) isalpha (Ch)
-#  define TOUPPER(Ch) toupper (Ch)
+#  define ISSPACE(Ch) isspace ((unsigned char) (Ch))
+#  define ISALPHA(Ch) isalpha ((unsigned char) (Ch))
+#  define TOUPPER(Ch) toupper ((unsigned char) (Ch))
 # endif
 #endif
 
-#define INTERNAL(X) INTERNAL1(X)
-#define INTERNAL1(X) __##X##_internal
-#define WEAKNAME(X) WEAKNAME1(X)
+#ifdef USE_NUMBER_GROUPING
+# define INTERNAL(X) INTERNAL1(X)
+# define INTERNAL1(X) __##X##_internal
+# define WEAKNAME(X) WEAKNAME1(X)
+#else
+# define INTERNAL(X) X
+#endif
 
 #ifdef USE_NUMBER_GROUPING
 /* This file defines a function to check for correct grouping.  */
 
 INT
 INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
-                   int base, int group LOCALE_PARAM_PROTO)
+                   int base GROUP_PARAM_PROTO LOCALE_PARAM_PROTO)
 {
   int negative;
   register unsigned LONG int cutoff;
@@ -379,15 +393,16 @@ noconv:
   return 0L;
 }
 \f
+#ifdef USE_NUMBER_GROUPING
 /* External user entry point.  */
 
-
 INT
-#ifdef weak_function
+# ifdef weak_function
 weak_function
-#endif
+# endif
 strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
         int base LOCALE_PARAM_PROTO)
 {
   return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
 }
+#endif
diff --git a/lib/strtoll.c b/lib/strtoll.c
new file mode 100644 (file)
index 0000000..8e6f93f
--- /dev/null
@@ -0,0 +1,33 @@
+/* Function to parse a 'long long int' from text.
+   Copyright (C) 1995-1997, 1999, 2001, 2009-2021 Free Software Foundation,
+   Inc.
+   This file is part of the GNU C Library.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define QUAD    1
+
+#include <strtol.c>
+
+#ifdef _LIBC
+# ifdef SHARED
+#  include <shlib-compat.h>
+
+#  if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0);
+#  endif
+
+# endif
+weak_alias (strtoll, strtoq)
+#endif
diff --git a/lib/strtoull.c b/lib/strtoull.c
deleted file mode 100644 (file)
index abe5bb8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Function to parse an 'unsigned long long int' from text.
-   Copyright (C) 1995-1997, 1999, 2009-2018 Free Software Foundation, Inc.
-   NOTE: The canonical source of this file is maintained with the GNU C
-   Library.  Bugs can be reported to bug-glibc@gnu.org.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 3 of the License, or any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-#define QUAD 1
-
-#include "strtoul.c"
-
-#ifdef _LIBC
-strong_alias (__strtoull_internal, __strtouq_internal)
-weak_alias (strtoull, strtouq)
-#endif
diff --git a/lib/strtoumax.c b/lib/strtoumax.c
deleted file mode 100644 (file)
index dc395d6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#define UNSIGNED 1
-#include "strtoimax.c"
diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h
new file mode 100644 (file)
index 0000000..1abd6c5
--- /dev/null
@@ -0,0 +1,96 @@
+/* Substitute for <sys/random.h>.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+@PRAGMA_COLUMNS@
+
+#ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
+
+#if @HAVE_SYS_RANDOM_H@
+
+/* On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>.  */
+# if defined __UCLIBC__
+#  include <stddef.h>
+# endif
+/* On Mac OS X 10.5, <sys/random.h> assumes prior inclusion of <sys/types.h>.
+   On Max OS X 10.13, <sys/random.h> assumes prior inclusion of a file that
+   includes <Availability.h>, such as <stdlib.h> or <unistd.h>.  */
+# if defined __APPLE__ && defined __MACH__                  /* Mac OS X */
+#  include <sys/types.h>
+#  include <stdlib.h>
+# endif
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_SYS_RANDOM_H@
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
+#define _@GUARD_PREFIX@_SYS_RANDOM_H
+
+#include <sys/types.h>
+
+/* Define the GRND_* constants.  */
+#ifndef GRND_NONBLOCK
+# define GRND_NONBLOCK 1
+# define GRND_RANDOM 2
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+
+#if @GNULIB_GETRANDOM@
+/* Fill a buffer with random bytes.  */
+# if @REPLACE_GETRANDOM@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getrandom
+#   define getrandom rpl_getrandom
+#  endif
+_GL_FUNCDECL_RPL (getrandom, ssize_t,
+                  (void *buffer, size_t length, unsigned int flags)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getrandom, ssize_t,
+                  (void *buffer, size_t length, unsigned int flags));
+# else
+#  if !@HAVE_GETRANDOM@
+_GL_FUNCDECL_SYS (getrandom, ssize_t,
+                  (void *buffer, size_t length, unsigned int flags)
+                  _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (getrandom, ssize_t,
+                  (void *buffer, size_t length, unsigned int flags));
+# endif
+_GL_CXXALIASWARN (getrandom);
+#elif defined GNULIB_POSIXCHECK
+# undef getrandom
+# if HAVE_RAW_DECL_GETRANDOM
+_GL_WARN_ON_USE (getrandom, "getrandom is unportable - "
+                 "use gnulib module getrandom for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SYS_RANDOM_H */
+#endif /* _@GUARD_PREFIX@_SYS_RANDOM_H */
index 6ae6ac5..babe3db 100644 (file)
@@ -1,18 +1,18 @@
 /* Provide a more complete sys/stat.h header file.
-   Copyright (C) 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
 
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+/* Before doing "#define mknod rpl_mknod" below, we need to include all
+   headers that may declare mknod().  OS/2 kLIBC declares mknod() in
+   <unistd.h>, not in <sys/stat.h>.  */
+#ifdef __KLIBC__
+# include <unistd.h>
+#endif
+
 /* Before doing "#define mkdir rpl_mkdir" below, we need to include all
    headers that may declare mkdir().  Native Windows platforms declare mkdir
-   in <io.h> and/or <direct.h>, not in <unistd.h>.  */
+   in <io.h> and/or <direct.h>, not in <sys/stat.h>.  */
 #if defined _WIN32 && ! defined __CYGWIN__
 # include <io.h>     /* mingw32, mingw64 */
 # include <direct.h> /* mingw64, MSVC 9 */
@@ -368,11 +375,11 @@ struct stat
 # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
 #endif
 
-/* S_IXUGO is a common extension to POSIX.  */
+/* Although S_IXUGO and S_IRWXUGO are not specified by POSIX and are
+   not implemented in GNU/Linux, some Gnulib-using apps use the macros.  */
 #if !S_IXUGO
 # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
 #endif
-
 #ifndef S_IRWXUGO
 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
@@ -384,14 +391,44 @@ struct stat
 #endif
 
 
+#if @GNULIB_MDA_CHMOD@
+/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::chmod always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chmod
+#   define chmod _chmod
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode));
+# endif
+_GL_CXXALIASWARN (chmod);
+#endif
+
+
 #if @GNULIB_FCHMODAT@
-# if !@HAVE_FCHMODAT@
+# if @REPLACE_FCHMODAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fchmodat
+#   define fchmodat rpl_fchmodat
+#  endif
+_GL_FUNCDECL_RPL (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag));
+# else
+#  if !@HAVE_FCHMODAT@
 _GL_FUNCDECL_SYS (fchmodat, int,
                   (int fd, char const *file, mode_t mode, int flag)
                   _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (fchmodat, int,
                   (int fd, char const *file, mode_t mode, int flag));
+# endif
 _GL_CXXALIASWARN (fchmodat);
 #elif defined GNULIB_POSIXCHECK
 # undef fchmodat
@@ -413,7 +450,9 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
 # else
 _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (fstat);
+# endif
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
 # undef fstat
 # define fstat fstat_used_without_requesting_gnulib_module_fstat
@@ -436,18 +475,22 @@ _GL_WARN_ON_USE (fstat, "fstat has portability problems - "
 #   define fstatat rpl_fstatat
 #  endif
 _GL_FUNCDECL_RPL (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags)
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags));
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags));
 # else
 #  if !@HAVE_FSTATAT@
 _GL_FUNCDECL_SYS (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags)
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags)
                   _GL_ARG_NONNULL ((2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (fstatat, int,
-                  (int fd, char const *name, struct stat *st, int flags));
+                  (int fd, char const *restrict name, struct stat *restrict st,
+                   int flags));
 # endif
 _GL_CXXALIASWARN (fstatat);
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
@@ -492,34 +535,32 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
 #endif
 
 
+#if @GNULIB_GETUMASK@
+# if !@HAVE_GETUMASK@
+_GL_FUNCDECL_SYS (getumask, mode_t, (void));
+# endif
+_GL_CXXALIAS_SYS (getumask, mode_t, (void));
+# if @HAVE_GETUMASK@
+_GL_CXXALIASWARN (getumask);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getumask
+# if HAVE_RAW_DECL_GETUMASK
+_GL_WARN_ON_USE (getumask, "getumask is not portable - "
+                 "use gnulib module getumask for portability");
+# endif
+#endif
+
+
 #if @GNULIB_LCHMOD@
 /* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
    denotes a symbolic link.  */
-# if !@HAVE_LCHMOD@
-/* The lchmod replacement follows symbolic links.  Callers should take
-   this into account; lchmod should be applied only to arguments that
-   are known to not be symbolic links.  On hosts that lack lchmod,
-   this can lead to race conditions between the check and the
-   invocation of lchmod, but we know of no workarounds that are
-   reliable in general.  You might try requesting support for lchmod
-   from your operating system supplier.  */
-#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#   define lchmod chmod
-#  endif
-/* Need to cast, because on mingw, the second parameter of chmod is
-                                                int mode.  */
-_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
-                         (const char *filename, mode_t mode));
-# else
-#  if 0 /* assume already declared */
+# if !@HAVE_LCHMOD@ || defined __hpux
 _GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
                                _GL_ARG_NONNULL ((1)));
-#  endif
-_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 # endif
-# if @HAVE_LCHMOD@
+_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 _GL_CXXALIASWARN (lchmod);
-# endif
 #elif defined GNULIB_POSIXCHECK
 # undef lchmod
 # if HAVE_RAW_DECL_LCHMOD
@@ -536,17 +577,21 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define lstat stat
 #  endif
-_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
+_GL_CXXALIAS_RPL_1 (lstat, stat, int,
+                    (const char *restrict name, struct stat *restrict buf));
 # elif @REPLACE_LSTAT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef lstat
 #   define lstat rpl_lstat
 #  endif
-_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
-                              _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
+_GL_FUNCDECL_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
 # else
-_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
+_GL_CXXALIAS_SYS (lstat, int,
+                  (const char *restrict name, struct stat *restrict buf));
 # endif
 # if @HAVE_LSTAT@
 _GL_CXXALIASWARN (lstat);
@@ -563,21 +608,20 @@ _GL_WARN_ON_USE (lstat, "lstat is unportable - "
 #endif
 
 
-#if @REPLACE_MKDIR@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#  undef mkdir
-#  define mkdir rpl_mkdir
-# endif
+#if @GNULIB_MKDIR@
+# if @REPLACE_MKDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
+#   define mkdir rpl_mkdir
+#  endif
 _GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
-                              _GL_ARG_NONNULL ((1)));
+                               _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
-#else
+# elif defined _WIN32 && !defined __CYGWIN__
 /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
    Additionally, it declares _mkdir (and depending on compile flags, an
    alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
    which are included above.  */
-# if defined _WIN32 && ! defined __CYGWIN__
-
 #  if !GNULIB_defined_rpl_mkdir
 static int
 rpl_mkdir (char const *name, mode_t mode)
@@ -586,16 +630,44 @@ rpl_mkdir (char const *name, mode_t mode)
 }
 #   define GNULIB_defined_rpl_mkdir 1
 #  endif
-
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
 #   define mkdir rpl_mkdir
 #  endif
 _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 # else
 _GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
 # endif
-#endif
 _GL_CXXALIASWARN (mkdir);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdir
+# if HAVE_RAW_DECL_MKDIR
+_GL_WARN_ON_USE (mkdir, "mkdir does not always support two parameters - "
+                 "use gnulib module mkdir for portability");
+# endif
+#elif @GNULIB_MDA_MKDIR@
+/* On native Windows, map 'mkdir' to '_mkdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::mkdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !GNULIB_defined_rpl_mkdir
+static int
+rpl_mkdir (char const *name, mode_t mode)
+{
+  return _mkdir (name);
+}
+#   define GNULIB_defined_rpl_mkdir 1
+#  endif
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkdir
+#   define mkdir rpl_mkdir
+#  endif
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
+# endif
+_GL_CXXALIASWARN (mkdir);
+#endif
 
 
 #if @GNULIB_MKDIRAT@
@@ -641,11 +713,21 @@ _GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
 
 
 #if @GNULIB_MKFIFOAT@
-# if !@HAVE_MKFIFOAT@
+# if @REPLACE_MKFIFOAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkfifoat
+#   define mkfifoat rpl_mkfifoat
+#  endif
+_GL_FUNCDECL_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode)
+                                 _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mkfifoat, int, (int fd, char const *file, mode_t mode));
+# else
+#  if !@HAVE_MKFIFOAT@
 _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
                                  _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
+# endif
 _GL_CXXALIASWARN (mkfifoat);
 #elif defined GNULIB_POSIXCHECK
 # undef mkfifoat
@@ -684,13 +766,25 @@ _GL_WARN_ON_USE (mknod, "mknod is not portable - "
 
 
 #if @GNULIB_MKNODAT@
-# if !@HAVE_MKNODAT@
+# if @REPLACE_MKNODAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mknodat
+#   define mknodat rpl_mknodat
+#  endif
+_GL_FUNCDECL_RPL (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev)
+                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev));
+# else
+#  if !@HAVE_MKNODAT@
 _GL_FUNCDECL_SYS (mknodat, int,
                   (int fd, char const *file, mode_t mode, dev_t dev)
                   _GL_ARG_NONNULL ((2)));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (mknodat, int,
                   (int fd, char const *file, mode_t mode, dev_t dev));
+# endif
 _GL_CXXALIASWARN (mknodat);
 #elif defined GNULIB_POSIXCHECK
 # undef mknodat
@@ -759,7 +853,7 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
 #    define stat(name, st) rpl_stat (name, st)
 #   endif /* !_LARGE_FILES */
 #  endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */
-_GL_EXTERN_C int stat (const char *name, struct stat *buf)
+_GL_EXTERN_C int stat (const char *restrict name, struct stat *restrict buf)
                       _GL_ARG_NONNULL ((1, 2));
 # endif
 #elif @GNULIB_OVERRIDES_STRUCT_STAT@
@@ -775,6 +869,24 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_UMASK@
+/* On native Windows, map 'umask' to '_umask', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::umask always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef umask
+#   define umask _umask
+#  endif
+/* Need to cast, because in mingw the last argument is 'int mode'.  */
+_GL_CXXALIAS_MDA_CAST (umask, mode_t, (mode_t mask));
+# else
+_GL_CXXALIAS_SYS (umask, mode_t, (mode_t mask));
+# endif
+_GL_CXXALIASWARN (umask);
+#endif
+
+
 #if @GNULIB_UTIMENSAT@
 /* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
    implementation relies on futimesat, which on Solaris 10 makes an invocation
index b4a0e49..8035fbe 100644 (file)
@@ -1,19 +1,19 @@
 /* Provide a more complete sys/time.h.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
@@ -112,8 +112,12 @@ _GL_CXXALIASWARN (gettimeofday);
 # if defined __cplusplus && defined GNULIB_NAMESPACE
 namespace GNULIB_NAMESPACE {
   typedef ::timeval
-#undef timeval
+#  undef timeval
     timeval;
+#  if @REPLACE_STRUCT_TIMEVAL@
+#   define timeval rpl_timeval
+  typedef ::timeval timeval;
+#  endif
 }
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -131,7 +135,7 @@ _GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef close
 #   define close close_used_without_including_unistd_h
-#  else
+#  elif !defined __clang__
      _GL_WARN_ON_USE (close,
                       "close() used without including <unistd.h>");
 #  endif
index 7f8c1c4..2079d72 100644 (file)
@@ -1,19 +1,19 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
index 4612930..446c66b 100644 (file)
@@ -1,18 +1,18 @@
 /* A POSIX-like <sys/wait.h>.
-   Copyright (C) 2001-2003, 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 
 #ifndef _@GUARD_PREFIX@_SYS_WAIT_H
 # if defined _WIN32 && ! defined __CYGWIN__
 _GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options));
 # endif
-_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options));
+/* Need to cast, because on Cygwin, the second parameter is
+                                                __wait_status_ptr_t statusp.  */
+_GL_CXXALIAS_SYS_CAST (waitpid, pid_t, (pid_t pid, int *statusp, int options));
 _GL_CXXALIASWARN (waitpid);
 #elif defined GNULIB_POSIXCHECK
 # undef waitpid
index 17d7024..89c2303 100644 (file)
@@ -1,5 +1,5 @@
 /* Quoting for a system command.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2012.
 
    This program is free software: you can redistribute it and/or modify
index 564e486..f378950 100644 (file)
@@ -1,5 +1,5 @@
 /* Quoting for a system command.
-   Copyright (C) 2001-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2012.
 
    This program is free software: you can redistribute it and/or modify
@@ -77,7 +77,7 @@ extern size_t
 /* Copies the quoted string to p and returns the incremented p.
    There must be room for system_quote_length (string) + 1 bytes at p.  */
 extern char *
-       system_quote_copy (char *p,
+       system_quote_copy (char *restrict p,
                           enum system_command_interpreter interpreter,
                           const char *string);
 
index da81263..5f804b3 100644 (file)
@@ -1,34 +1,30 @@
-/* tempname.c - generate the name of a temporary file.
+/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-   Copyright (C) 1991-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
+   The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-/* Extracted from glibc sysdeps/posix/tempname.c.  See also tmpdir.c.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #if !_LIBC
-# include <config.h>
+# include <libc-config.h>
 # include "tempname.h"
 #endif
 
 #include <sys/types.h>
 #include <assert.h>
+#include <stdbool.h>
 
 #include <errno.h>
-#ifndef __set_errno
-# define __set_errno(Val) errno = (Val)
-#endif
 
 #include <stdio.h>
 #ifndef P_tmpdir
 #include <string.h>
 
 #include <fcntl.h>
-#include <sys/time.h>
+#include <stdalign.h>
 #include <stdint.h>
-#include <unistd.h>
-
+#include <sys/random.h>
 #include <sys/stat.h>
+#include <time.h>
 
 #if _LIBC
 # define struct_stat64 struct stat64
+# define __secure_getenv __libc_secure_getenv
 #else
 # define struct_stat64 struct stat
-# define __try_tempname try_tempname
 # define __gen_tempname gen_tempname
-# define __getpid getpid
-# define __gettimeofday gettimeofday
 # define __mkdir mkdir
 # define __open open
-# define __lxstat64(version, file, buf) lstat (file, buf)
+# define __lstat64(file, buf) lstat (file, buf)
+# define __stat64(file, buf) stat (file, buf)
+# define __getrandom getrandom
+# define __clock_gettime64 clock_gettime
+# define __timespec64 timespec
 #endif
 
-#ifdef _LIBC
-# include <hp-timing.h>
-# if HP_TIMING_AVAIL
-#  define RANDOM_BITS(Var) \
-  if (__builtin_expect (value == UINT64_C (0), 0))                            \
-    {                                                                         \
-      /* If this is the first time this function is used initialize           \
-         the variable we accumulate the value in to some somewhat             \
-         random value.  If we'd not do this programs at startup time          \
-         might have a reduced set of possible names, at least on slow         \
-         machines.  */                                                        \
-      struct timeval tv;                                                      \
-      __gettimeofday (&tv, NULL);                                             \
-      value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;                      \
-    }                                                                         \
-  HP_TIMING_NOW (Var)
-# endif
-#endif
+/* Use getrandom if it works, falling back on a 64-bit linear
+   congruential generator that starts with Var's value
+   mixed in with a clock's low-order bits if available.  */
+typedef uint_fast64_t random_value;
+#define RANDOM_VALUE_MAX UINT_FAST64_MAX
+#define BASE_62_DIGITS 10 /* 62**10 < UINT_FAST64_MAX */
+#define BASE_62_POWER (62LL * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62)
 
-/* Use the widest available unsigned type if uint64_t is not
-   available.  The algorithm below extracts a number less than 62**6
-   (approximately 2**35.725) from uint64_t, so ancient hosts where
-   uintmax_t is only 32 bits lose about 3.725 bits of randomness,
-   which is better than not having mkstemp at all.  */
-#if !defined UINT64_MAX && !defined uint64_t
-# define uint64_t uintmax_t
+static random_value
+random_bits (random_value var, bool use_getrandom)
+{
+  random_value r;
+  /* Without GRND_NONBLOCK it can be blocked for minutes on some systems.  */
+  if (use_getrandom && __getrandom (&r, sizeof r, GRND_NONBLOCK) == sizeof r)
+    return r;
+#if _LIBC || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
+  /* Add entropy if getrandom did not work.  */
+  struct __timespec64 tv;
+  __clock_gettime64 (CLOCK_MONOTONIC, &tv);
+  var ^= tv.tv_nsec;
 #endif
+  return 2862933555777941757 * var + 3037000493;
+}
 
 #if _LIBC
 /* Return nonzero if DIR is an existent directory.  */
@@ -105,7 +99,7 @@ static int
 direxists (const char *dir)
 {
   struct_stat64 buf;
-  return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+  return __stat64 (dir, &buf) == 0 && S_ISDIR (buf.st_mode);
 }
 
 /* Path search algorithm, for tmpnam, tmpfile, etc.  If DIR is
@@ -172,18 +166,80 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
 }
 #endif /* _LIBC */
 
+#if _LIBC
+static int try_tempname_len (char *, int, void *, int (*) (char *, void *),
+                             size_t);
+#endif
+
+static int
+try_file (char *tmpl, void *flags)
+{
+  int *openflags = flags;
+  return __open (tmpl,
+                 (*openflags & ~O_ACCMODE)
+                 | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+}
+
+static int
+try_dir (char *tmpl, void *flags _GL_UNUSED)
+{
+  return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+}
+
+static int
+try_nocreate (char *tmpl, void *flags _GL_UNUSED)
+{
+  struct_stat64 st;
+
+  if (__lstat64 (tmpl, &st) == 0 || errno == EOVERFLOW)
+    __set_errno (EEXIST);
+  return errno == ENOENT ? 0 : -1;
+}
+
 /* These are the characters used in temporary file names.  */
 static const char letters[] =
 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 
+/* Generate a temporary file name based on TMPL.  TMPL must match the
+   rules for mk[s]temp (i.e., end in at least X_SUFFIX_LEN "X"s,
+   possibly with a suffix).
+   The name constructed does not exist at the time of the call to
+   this function.  TMPL is overwritten with the result.
+
+   KIND may be one of:
+   __GT_NOCREATE:       simply verify that the name does not exist
+                        at the time of the call.
+   __GT_FILE:           create the file using open(O_CREAT|O_EXCL)
+                        and return a read-write fd.  The file is mode 0600.
+   __GT_DIR:            create a directory, which will be mode 0700.
+
+   We use a clever algorithm to get hard-to-predict names. */
+#ifdef _LIBC
+static
+#endif
 int
-__try_tempname (char *tmpl, int suffixlen, void *args,
-                int (*tryfunc) (char *, void *))
+gen_tempname_len (char *tmpl, int suffixlen, int flags, int kind,
+                  size_t x_suffix_len)
 {
-  int len;
+  static int (*const tryfunc[]) (char *, void *) =
+    {
+      [__GT_FILE] = try_file,
+      [__GT_DIR] = try_dir,
+      [__GT_NOCREATE] = try_nocreate
+    };
+  return try_tempname_len (tmpl, suffixlen, &flags, tryfunc[kind],
+                           x_suffix_len);
+}
+
+#ifdef _LIBC
+static
+#endif
+int
+try_tempname_len (char *tmpl, int suffixlen, void *args,
+                  int (*tryfunc) (char *, void *), size_t x_suffix_len)
+{
+  size_t len;
   char *XXXXXX;
-  static uint64_t value;
-  uint64_t random_time_bits;
   unsigned int count;
   int fd = -1;
   int save_errno = errno;
@@ -193,7 +249,8 @@ __try_tempname (char *tmpl, int suffixlen, void *args,
      can exist for a given template is 62**6.  It should never be
      necessary to try all of these combinations.  Instead if a reasonable
      number of names is tried (we define reasonable as 62**3) fail to
-     give the system administrator the chance to remove the problems.  */
+     give the system administrator the chance to remove the problems.
+     This value requires that X_SUFFIX_LEN be at least 3.  */
 #define ATTEMPTS_MIN (62 * 62 * 62)
 
   /* The number of times to attempt to generate a temporary file.  To
@@ -204,44 +261,58 @@ __try_tempname (char *tmpl, int suffixlen, void *args,
   unsigned int attempts = ATTEMPTS_MIN;
 #endif
 
+  /* A random variable.  The initial value is used only the for fallback path
+     on 'random_bits' on 'getrandom' failure.  Its initial value tries to use
+     some entropy from the ASLR and ignore possible bits from the stack
+     alignment.  */
+  random_value v = ((uintptr_t) &v) / alignof (max_align_t);
+
+  /* How many random base-62 digits can currently be extracted from V.  */
+  int vdigits = 0;
+
+  /* Whether to consume entropy when acquiring random bits.  On the
+     first try it's worth the entropy cost with __GT_NOCREATE, which
+     is inherently insecure and can use the entropy to make it a bit
+     less secure.  On the (rare) second and later attempts it might
+     help against DoS attacks.  */
+  bool use_getrandom = tryfunc == try_nocreate;
+
+  /* Least unfair value for V.  If V is less than this, V can generate
+     BASE_62_DIGITS digits fairly.  Otherwise it might be biased.  */
+  random_value const unfair_min
+    = RANDOM_VALUE_MAX - RANDOM_VALUE_MAX % BASE_62_POWER;
+
   len = strlen (tmpl);
-  if (len < 6 + suffixlen || memcmp (&tmpl[len - 6 - suffixlen], "XXXXXX", 6))
+  if (len < x_suffix_len + suffixlen
+      || strspn (&tmpl[len - x_suffix_len - suffixlen], "X") < x_suffix_len)
     {
       __set_errno (EINVAL);
       return -1;
     }
 
   /* This is where the Xs start.  */
-  XXXXXX = &tmpl[len - 6 - suffixlen];
-
-  /* Get some more or less random data.  */
-#ifdef RANDOM_BITS
-  RANDOM_BITS (random_time_bits);
-#else
-  {
-    struct timeval tv;
-    __gettimeofday (&tv, NULL);
-    random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
-  }
-#endif
-  value += random_time_bits ^ __getpid ();
+  XXXXXX = &tmpl[len - x_suffix_len - suffixlen];
 
-  for (count = 0; count < attempts; value += 7777, ++count)
+  for (count = 0; count < attempts; ++count)
     {
-      uint64_t v = value;
-
-      /* Fill in the random bits.  */
-      XXXXXX[0] = letters[v % 62];
-      v /= 62;
-      XXXXXX[1] = letters[v % 62];
-      v /= 62;
-      XXXXXX[2] = letters[v % 62];
-      v /= 62;
-      XXXXXX[3] = letters[v % 62];
-      v /= 62;
-      XXXXXX[4] = letters[v % 62];
-      v /= 62;
-      XXXXXX[5] = letters[v % 62];
+      for (size_t i = 0; i < x_suffix_len; i++)
+        {
+          if (vdigits == 0)
+            {
+              do
+                {
+                  v = random_bits (v, use_getrandom);
+                  use_getrandom = true;
+                }
+              while (unfair_min <= v);
+
+              vdigits = BASE_62_DIGITS;
+            }
+
+          XXXXXX[i] = letters[v % 62];
+          v /= 62;
+          vdigits--;
+        }
 
       fd = tryfunc (tmpl, args);
       if (fd >= 0)
@@ -258,66 +329,17 @@ __try_tempname (char *tmpl, int suffixlen, void *args,
   return -1;
 }
 
-static int
-try_file (char *tmpl, void *flags)
-{
-  int *openflags = flags;
-  return __open (tmpl,
-                 (*openflags & ~O_ACCMODE)
-                 | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
-}
-
-static int
-try_dir (char *tmpl, void *flags _GL_UNUSED)
-{
-  return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
-}
-
-static int
-try_nocreate (char *tmpl, void *flags _GL_UNUSED)
+int
+__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
 {
-  struct_stat64 st;
-
-  if (__lxstat64 (_STAT_VER, tmpl, &st) == 0 || errno == EOVERFLOW)
-    __set_errno (EEXIST);
-  return errno == ENOENT ? 0 : -1;
+  return gen_tempname_len (tmpl, suffixlen, flags, kind, 6);
 }
 
-/* Generate a temporary file name based on TMPL.  TMPL must match the
-   rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
-   The name constructed does not exist at the time of the call to
-   __gen_tempname.  TMPL is overwritten with the result.
-
-   KIND may be one of:
-   __GT_NOCREATE:       simply verify that the name does not exist
-                        at the time of the call.
-   __GT_FILE:           create the file using open(O_CREAT|O_EXCL)
-                        and return a read-write fd.  The file is mode 0600.
-   __GT_DIR:            create a directory, which will be mode 0700.
-
-   We use a clever algorithm to get hard-to-predict names. */
+#if !_LIBC
 int
-__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+try_tempname (char *tmpl, int suffixlen, void *args,
+              int (*tryfunc) (char *, void *))
 {
-  int (*tryfunc) (char *, void *);
-
-  switch (kind)
-    {
-    case __GT_FILE:
-      tryfunc = try_file;
-      break;
-
-    case __GT_DIR:
-      tryfunc = try_dir;
-      break;
-
-    case __GT_NOCREATE:
-      tryfunc = try_nocreate;
-      break;
-
-    default:
-      assert (! "invalid KIND in __gen_tempname");
-      abort ();
-    }
-  return __try_tempname (tmpl, suffixlen, &flags, tryfunc);
+  return try_tempname_len (tmpl, suffixlen, args, tryfunc, 6);
 }
+#endif
index 4020c73..795bb49 100644 (file)
@@ -1,18 +1,18 @@
 /* Create a temporary file or directory.
 
-   Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* header written by Eric Blake */
@@ -50,6 +50,9 @@ extern "C" {
 
    We use a clever algorithm to get hard-to-predict names. */
 extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
+/* Similar, except X_SUFFIX_LEN gives the number of Xs.  */
+extern int gen_tempname_len (char *tmpl, int suffixlen, int flags, int kind,
+                             size_t x_suffix_len);
 
 /* Similar to gen_tempname, but TRYFUNC is called for each temporary
    name to try.  If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME
@@ -57,6 +60,10 @@ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
    name is tried, or else TRY_GEN_TEMPNAME returns -1. */
 extern int try_tempname (char *tmpl, int suffixlen, void *args,
                          int (*tryfunc) (char *, void *));
+/* Similar, except X_SUFFIX_LEN gives the number of Xs.  */
+extern int try_tempname_len (char *tmpl, int suffixlen, void *args,
+                             int (*tryfunc) (char *, void *),
+                             size_t x_suffix_len);
 
 #ifdef __cplusplus
 }
index 3a83623..6bbd0a7 100644 (file)
@@ -1,19 +1,19 @@
 /* Time internal interface
 
-   Copyright 2015-2018 Free Software Foundation, Inc.
+   Copyright 2015-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
@@ -24,7 +24,7 @@ struct tm_zone
      members are zero.  */
   struct tm_zone *next;
 
-#if HAVE_TZNAME && !HAVE_TM_ZONE
+#if HAVE_TZNAME && !HAVE_STRUCT_TM_TM_ZONE
   /* Copies of recent strings taken from tzname[0] and tzname[1].
      The copies are in ABBRS, so that they survive tzset.  Null if unknown.  */
   char *tzname_copy[2];
index 3128f44..a73fe59 100644 (file)
@@ -1,19 +1,19 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 
 # define _@GUARD_PREFIX@_TIME_H
 
+/* mingw's <time.h> provides the functions asctime_r, ctime_r, gmtime_r,
+   localtime_r only if <unistd.h> or <pthread.h> has been included before.  */
+# if defined __MINGW32__
+#  include <unistd.h>
+# endif
+
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
 /* NetBSD 5.0 mis-defines NULL.  */
@@ -84,8 +90,8 @@ struct timespec
 # endif
 
 # if !GNULIB_defined_struct_time_t_must_be_integral
-/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
-   time_t to be an integer type, even though C99 permits floating
+/* https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
+   requires time_t to be an integer type, even though C99 permits floating
    point.  We don't know of any implementation that uses floating
    point, and it is much easier to write code that doesn't have to
    worry about that corner case, so we force the issue.  */
@@ -95,9 +101,28 @@ struct __time_t_must_be_integral {
 #  define GNULIB_defined_struct_time_t_must_be_integral 1
 # endif
 
+/* Define TIME_UTC, a positive integer constant used for timespec_get().  */
+# if ! @TIME_H_DEFINES_TIME_UTC@
+#  if !GNULIB_defined_TIME_UTC
+#   define TIME_UTC 1
+#   define GNULIB_defined_TIME_UTC 1
+#  endif
+# endif
+
+/* Set *TS to the current time, and return BASE.
+   Upon failure, return 0.  */
+# if @GNULIB_TIMESPEC_GET@
+#  if ! @HAVE_TIMESPEC_GET@
+_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base)
+                                     _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
+_GL_CXXALIASWARN (timespec_get);
+# endif
+
 /* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
    return -1 and store the remaining time into RMTP.  See
-   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>.  */
 # if @GNULIB_NANOSLEEP@
 #  if @REPLACE_NANOSLEEP@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -129,10 +154,27 @@ _GL_CXXALIASWARN (nanosleep);
 #   endif
 _GL_FUNCDECL_RPL (tzset, void, (void));
 _GL_CXXALIAS_RPL (tzset, void, (void));
+#  elif defined _WIN32 && !defined __CYGWIN__
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef tzset
+#    define tzset _tzset
+#   endif
+_GL_CXXALIAS_MDA (tzset, void, (void));
 #  else
-#   if ! @HAVE_TZSET@
-_GL_FUNCDECL_SYS (tzset, void, (void));
+_GL_CXXALIAS_SYS (tzset, void, (void));
+#  endif
+_GL_CXXALIASWARN (tzset);
+# elif @GNULIB_MDA_TZSET@
+/* On native Windows, map 'tzset' to '_tzset', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::tzset always.  */
+#  if defined _WIN32 && !defined __CYGWIN__
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef tzset
+#    define tzset _tzset
 #   endif
+_GL_CXXALIAS_MDA (tzset, void, (void));
+#  else
 _GL_CXXALIAS_SYS (tzset, void, (void));
 #  endif
 _GL_CXXALIASWARN (tzset);
@@ -149,12 +191,14 @@ _GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
 #  else
 _GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
 #  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mktime);
+#  endif
 # endif
 
 /* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
-   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
-   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime_r.html> and
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime_r.html>.  */
 # if @GNULIB_TIME_R@
 #  if @REPLACE_LOCALTIME_R@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -203,8 +247,8 @@ _GL_CXXALIASWARN (gmtime_r);
 # endif
 
 /* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
-   <http://www.opengroup.org/susv3xsh/localtime.html> and
-   <http://www.opengroup.org/susv3xsh/gmtime.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/localtime.html> and
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime.html>.  */
 # if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@
 #  if @REPLACE_LOCALTIME@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -217,7 +261,9 @@ _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer));
 #  else
 _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer));
 #  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (localtime);
+#  endif
 # endif
 
 # if 0 || @REPLACE_GMTIME@
@@ -237,7 +283,7 @@ _GL_CXXALIASWARN (gmtime);
 
 /* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
    the resulting broken-down time into TM.  See
-   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html>.  */
 # if @GNULIB_STRPTIME@
 #  if ! @HAVE_STRPTIME@
 _GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
@@ -252,7 +298,7 @@ _GL_CXXALIASWARN (strptime);
 # endif
 
 /* Convert *TP to a date and time string.  See
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ctime.html>.  */
 # if @GNULIB_CTIME@
 #  if @REPLACE_CTIME@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -264,45 +310,90 @@ _GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
 #  else
 _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
 #  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ctime);
+#  endif
 # endif
 
 /* Convert *TP to a date and time string.  See
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html>.  */
 # if @GNULIB_STRFTIME@
 #  if @REPLACE_STRFTIME@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    define strftime rpl_strftime
 #   endif
-_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm *__tp)
-                                    _GL_ARG_NONNULL ((1, 3, 4)));
-_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm *__tp));
+_GL_FUNCDECL_RPL (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict __tp)
+                  _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_CXXALIAS_RPL (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict __tp));
 #  else
-_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize,
-                                     const char *__fmt, const struct tm *__tp));
+_GL_CXXALIAS_SYS (strftime, size_t,
+                  (char *restrict __buf, size_t __bufsize,
+                   const char *restrict __fmt, const struct tm *restrict __tp));
 #  endif
+#  if __GLIBC__ >= 2
 _GL_CXXALIASWARN (strftime);
+#  endif
 # endif
 
 # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@
+/* Functions that use a first-class time zone data type, instead of
+   relying on an implicit global time zone.
+   Inspired by NetBSD.  */
+
+/* Represents a time zone.
+   (timezone_t) NULL stands for UTC.  */
 typedef struct tm_zone *timezone_t;
+
+/* tzalloc (name)
+   Returns a time zone object for the given time zone NAME.  This object
+   represents the time zone that other functions would use it the TZ
+   environment variable was set to NAME.
+   If NAME is NULL, the result represents the time zone that other functions
+   would use it the TZ environment variable was unset.
+   May return NULL if NAME is invalid (this is platform dependent) or
+   upon memory allocation failure.  */
 _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name));
 _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name));
+
+/* tzfree (tz)
+   Frees a time zone object.
+   The argument must have been returned by tzalloc().  */
 _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz));
 _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz));
+
+/* localtime_rz (tz, &t, &result)
+   Converts an absolute time T to a broken-down time RESULT, assuming the
+   time zone TZ.
+   This function is like 'localtime_r', but relies on the argument TZ instead
+   of an implicit global time zone.  */
 _GL_FUNCDECL_SYS (localtime_rz, struct tm *,
                   (timezone_t __tz, time_t const *restrict __timer,
                    struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_SYS (localtime_rz, struct tm *,
                   (timezone_t __tz, time_t const *restrict __timer,
                    struct tm *restrict __result));
+
+/* mktime_z (tz, &tm)
+   Normalizes the broken-down time TM and converts it to an absolute time,
+   assuming the time zone TZ.  Returns the absolute time.
+   This function is like 'mktime', but relies on the argument TZ instead
+   of an implicit global time zone.  */
 _GL_FUNCDECL_SYS (mktime_z, time_t,
-                  (timezone_t __tz, struct tm *restrict __result)
+                  (timezone_t __tz, struct tm *restrict __tm)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_SYS (mktime_z, time_t,
-                  (timezone_t __tz, struct tm *restrict __result));
+                  (timezone_t __tz, struct tm *restrict __tm));
+
+/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime_z'
+   in the 'tm_zone' member of 'struct tm') are valid as long as
+     - the 'struct tm' argument is not destroyed or overwritten,
+   and
+     - the 'timezone_t' argument is not freed through tzfree().  */
+
 # endif
 
 /* Convert TM to a time_t value, assuming UTC.  */
@@ -333,17 +424,17 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef asctime_r
-_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime
-_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+_GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 # if defined GNULIB_POSIXCHECK
 #  undef ctime_r
-_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
                  "better use strftime (or even sprintf) instead");
 # endif
 
index 3029780..88d3c1c 100644 (file)
@@ -1,19 +1,19 @@
 /* Reentrant time functions like localtime_r.
 
-   Copyright (C) 2003, 2006-2007, 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
index 5293c7c..e772244 100644 (file)
@@ -1,19 +1,19 @@
 /* Time zone functions such as tzalloc and localtime_rz
 
-   Copyright 2015-2018 Free Software Foundation, Inc.
+   Copyright 2015-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert.  */
 
 #include <time.h>
 
 #include <errno.h>
-#include <limits.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
 #include "flexmember.h"
+#include "idx.h"
 #include "time-internal.h"
 
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
 /* The approximate size to use for small allocation requests.  This is
    the largest "small" request for the GNU C library malloc.  */
 enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
@@ -54,31 +50,6 @@ enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) };
    matters; the pointer is never dereferenced.  */
 static timezone_t const local_tz = (timezone_t) 1;
 
-#if HAVE_TM_ZONE || HAVE_TZNAME
-
-/* Return true if the values A and B differ according to the rules for
-   tm_isdst: A and B differ if one is zero and the other positive.  */
-static bool
-isdst_differ (int a, int b)
-{
-  return !a != !b && 0 <= a && 0 <= b;
-}
-
-/* Return true if A and B are equal.  */
-static int
-equal_tm (const struct tm *a, const struct tm *b)
-{
-  return ! ((a->tm_sec ^ b->tm_sec)
-            | (a->tm_min ^ b->tm_min)
-            | (a->tm_hour ^ b->tm_hour)
-            | (a->tm_mday ^ b->tm_mday)
-            | (a->tm_mon ^ b->tm_mon)
-            | (a->tm_year ^ b->tm_year)
-            | isdst_differ (a->tm_isdst, b->tm_isdst));
-}
-
-#endif
-
 /* Copy to ABBRS the abbreviation at ABBR with size ABBR_SIZE (this
    includes its trailing null byte).  Append an extra null byte to
    mark the end of ABBRS.  */
@@ -100,7 +71,7 @@ tzalloc (char const *name)
   if (tz)
     {
       tz->next = NULL;
-#if HAVE_TZNAME && !HAVE_TM_ZONE
+#if HAVE_TZNAME && !HAVE_STRUCT_TM_TM_ZONE
       tz->tzname_copy[0] = tz->tzname_copy[1] = NULL;
 #endif
       tz->tz_is_set = !!name;
@@ -112,13 +83,13 @@ tzalloc (char const *name)
 }
 
 /* Save into TZ any nontrivial time zone abbreviation used by TM, and
-   update *TM (if HAVE_TM_ZONE) or *TZ (if !HAVE_TM_ZONE &&
-   HAVE_TZNAME) if they use the abbreviation.  Return true if
-   successful, false (setting errno) otherwise.  */
+   update *TM (if HAVE_STRUCT_TM_TM_ZONE) or *TZ (if
+   !HAVE_STRUCT_TM_TM_ZONE && HAVE_TZNAME) if they use the abbreviation.
+   Return true if successful, false (setting errno) otherwise.  */
 static bool
 save_abbr (timezone_t tz, struct tm *tm)
 {
-#if HAVE_TM_ZONE || HAVE_TZNAME
+#if HAVE_STRUCT_TM_TM_ZONE || HAVE_TZNAME
   char const *zone = NULL;
   char *zone_copy = (char *) "";
 
@@ -126,7 +97,7 @@ save_abbr (timezone_t tz, struct tm *tm)
   int tzname_index = -1;
 # endif
 
-# if HAVE_TM_ZONE
+# if HAVE_STRUCT_TM_TM_ZONE
   zone = tm->tm_zone;
 # endif
 
@@ -150,14 +121,8 @@ save_abbr (timezone_t tz, struct tm *tm)
         {
           if (! (*zone_copy || (zone_copy == tz->abbrs && tz->tz_is_set)))
             {
-              size_t zone_size = strlen (zone) + 1;
-              size_t zone_used = zone_copy - tz->abbrs;
-              if (SIZE_MAX - zone_used < zone_size)
-                {
-                  errno = ENOMEM;
-                  return false;
-                }
-              if (zone_used + zone_size < ABBR_SIZE_MIN)
+              idx_t zone_size = strlen (zone) + 1;
+              if (zone_size < tz->abbrs + ABBR_SIZE_MIN - zone_copy)
                 extend_abbrs (zone_copy, zone, zone_size);
               else
                 {
@@ -180,7 +145,7 @@ save_abbr (timezone_t tz, struct tm *tm)
     }
 
   /* Replace the zone name so that its lifetime matches that of TZ.  */
-# if HAVE_TM_ZONE
+# if HAVE_STRUCT_TM_TM_ZONE
   tm->tm_zone = zone_copy;
 # else
   if (0 <= tzname_index)
@@ -327,17 +292,25 @@ mktime_z (timezone_t tz, struct tm *tm)
       timezone_t old_tz = set_tz (tz);
       if (old_tz)
         {
-          time_t t = mktime (tm);
-#if HAVE_TM_ZONE || HAVE_TZNAME
-          time_t badtime = -1;
           struct tm tm_1;
-          if ((t != badtime
-               || (localtime_r (&t, &tm_1) && equal_tm (tm, &tm_1)))
-              && !save_abbr (tz, tm))
-            t = badtime;
+          tm_1.tm_sec = tm->tm_sec;
+          tm_1.tm_min = tm->tm_min;
+          tm_1.tm_hour = tm->tm_hour;
+          tm_1.tm_mday = tm->tm_mday;
+          tm_1.tm_mon = tm->tm_mon;
+          tm_1.tm_year = tm->tm_year;
+          tm_1.tm_yday = -1;
+          tm_1.tm_isdst = tm->tm_isdst;
+          time_t t = mktime (&tm_1);
+          bool ok = 0 <= tm_1.tm_yday;
+#if HAVE_STRUCT_TM_TM_ZONE || HAVE_TZNAME
+          ok = ok && save_abbr (tz, &tm_1);
 #endif
-          if (revert_tz (old_tz))
-            return t;
+          if (revert_tz (old_tz) && ok)
+            {
+              *tm = tm_1;
+              return t;
+            }
         }
       return -1;
     }
index 9d9ab11..7e723e1 100644 (file)
@@ -1,34 +1,58 @@
 /* Convert UTC calendar time to simple time.  Like mktime but assumes UTC.
 
-   Copyright (C) 1994-2018 Free Software Foundation, Inc.
+   Copyright (C) 1994-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public
+   modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public
+   You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #ifndef _LIBC
-# include <config.h>
+# include <libc-config.h>
 #endif
 
 #include <time.h>
+#include <errno.h>
 
 #include "mktime-internal.h"
 
-time_t
-timegm (struct tm *tmp)
+__time64_t
+__timegm64 (struct tm *tmp)
 {
   static mktime_offset_t gmtime_offset;
   tmp->tm_isdst = 0;
-  return __mktime_internal (tmp, __gmtime_r, &gmtime_offset);
+  return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset);
 }
+
+#if defined _LIBC && __TIMESIZE != 64
+
+libc_hidden_def (__timegm64)
+
+time_t
+timegm (struct tm *tmp)
+{
+  struct tm tm = *tmp;
+  __time64_t t = __timegm64 (&tm);
+  if (in_time_t_range (t))
+    {
+      *tmp = tm;
+      return t;
+    }
+  else
+    {
+      __set_errno (EOVERFLOW);
+      return -1;
+    }
+}
+
+#endif
index 2b6098e..957b5fb 100644 (file)
@@ -1,3 +1,21 @@
+/* Inline functions for <timespec.h>.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE
 #include "timespec.h"
index cc49668..94a5db7 100644 (file)
@@ -1,19 +1,19 @@
 /* timespec -- System time interface
 
-   Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2018 Free Software
+   Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2021 Free Software
    Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #if ! defined TIMESPEC_H
@@ -34,7 +34,6 @@ extern "C" {
 #endif
 
 #include "arg-nonnull.h"
-#include "verify.h"
 
 /* Inverse resolution of timespec timestamps (in units per second),
    and log base 10 of the inverse resolution.  */
@@ -59,46 +58,12 @@ make_timespec (time_t s, long int ns)
   return r;
 }
 
-/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
-
-   For each timestamp T, this code assumes that either:
-
-     * T.tv_nsec is in the range 0..999999999; or
-     * T.tv_sec corresponds to a valid leap second on a host that supports
-       leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or
-     * T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
-       T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
-       This allows for special struct timespec values that are less or
-       greater than all possible valid timestamps.
-
-   In all these cases, it is safe to subtract two tv_nsec values and
-   convert the result to integer without worrying about overflow on
-   any platform of interest to the GNU project, since all such
-   platforms have 32-bit int or wider.
-
-   Replacing "a.tv_nsec - b.tv_nsec" with something like
-   "a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause
-   this function to work in some cases where the above assumption is
-   violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2,
-   b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
-   extra instructions.  Using a subtraction has the advantage of
-   detecting some invalid cases on platforms that detect integer
-   overflow.  */
+/* Return negative, zero, positive if A < B, A == B, A > B, respectively.  */
 
 _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
 timespec_cmp (struct timespec a, struct timespec b)
 {
-  if (a.tv_sec < b.tv_sec)
-    return -1;
-  if (a.tv_sec > b.tv_sec)
-    return 1;
-
-  /* Pacify gcc -Wstrict-overflow (bleeding-edge circa 2017-10-02).  See:
-     https://lists.gnu.org/r/bug-gnulib/2017-10/msg00006.html  */
-  assume (-1 <= a.tv_nsec && a.tv_nsec <= 2 * TIMESPEC_HZ);
-  assume (-1 <= b.tv_nsec && b.tv_nsec <= 2 * TIMESPEC_HZ);
-
-  return a.tv_nsec - b.tv_nsec;
+  return 2 * _GL_CMP (a.tv_sec, b.tv_sec) + _GL_CMP (a.tv_nsec, b.tv_nsec);
 }
 
 /* Return -1, 0, 1, depending on the sign of A.  A.tv_nsec must be
@@ -106,7 +71,7 @@ timespec_cmp (struct timespec a, struct timespec b)
 _GL_TIMESPEC_INLINE int _GL_ATTRIBUTE_PURE
 timespec_sign (struct timespec a)
 {
-  return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
+  return _GL_CMP (a.tv_sec, 0) + (!a.tv_sec & !!a.tv_nsec);
 }
 
 struct timespec timespec_add (struct timespec, struct timespec)
index 256b81e..30e7d5b 100644 (file)
@@ -1,5 +1,5 @@
 /* Removes leading and/or trailing whitespaces
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 789451f..dc886e5 100644 (file)
@@ -1,5 +1,5 @@
 /* Removes leading and/or trailing whitespaces
-   Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index b9f3616..7fd4936 100644 (file)
@@ -1,19 +1,19 @@
 /* Provide tzset for systems that don't have it or for which it's broken.
 
-   Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* written by Jim Meyering */
 
 /* Specification.  */
 #include <time.h>
 
-#include "localtime-buffer.h"
-
-/* This is a wrapper for tzset, for systems on which tzset may clobber
-   the static buffer used for localtime's result.
-   Work around the bug in some systems whereby tzset clobbers the
-   static buffer that localtime uses for its return value.  The
-   tzset function from Solaris 2.5, 2.5.1, and 2.6 has this problem.  */
+#include <stdlib.h>
+#include <string.h>
 
 void
-tzset (void)
+rpl_tzset (void)
 #undef tzset
 {
-#if TZSET_CLOBBERS_LOCALTIME
-  /* Save and restore the contents of the buffer used for localtime's
-     result around the call to tzset.  */
-  struct tm save = *localtime_buffer_addr;
-#endif
-
 #if defined _WIN32 && ! defined __CYGWIN__
   /* Rectify the value of the environment variable TZ.
      There are four possible kinds of such values:
        - Traditional US time zone names, e.g. "PST8PDT".  Syntax: see
-         <https://msdn.microsoft.com/en-us/library/90s5c885.aspx>
+         <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset>
        - Time zone names based on geography, that contain one or more
          slashes, e.g. "Europe/Moscow".
        - Time zone names based on geography, without slashes, e.g.
          "Singapore".
        - Time zone names that contain explicit DST rules.  Syntax: see
-         <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
+         <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03>
      The Microsoft CRT understands only the first kind.  It produces incorrect
      results if the value of TZ is of the other kinds.
      But in a Cygwin environment, /etc/profile.d/tzset.sh sets TZ to a value
@@ -68,16 +57,10 @@ tzset (void)
     _putenv ("TZ=");
 
   /* On native Windows, tzset() is deprecated.  Use _tzset() instead.  See
-     https://msdn.microsoft.com/en-us/library/ms235451.aspx
-     https://msdn.microsoft.com/en-us/library/90s5c885.aspx  */
+     <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/posix-tzset>
+     <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset>  */
   _tzset ();
-#elif HAVE_TZSET
-  tzset ();
 #else
-  /* Do nothing.  Avoid infinite recursion.  */
-#endif
-
-#if TZSET_CLOBBERS_LOCALTIME
-  *localtime_buffer_addr = save;
+  tzset ();
 #endif
 }
index 48fd98f..46537eb 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert 'unsigned int' integer to printable string.
+
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define anytostr uinttostr
 #define inttype unsigned int
 #include "anytostr.c"
index f95bfc3..f8a7abc 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert 'uintmax_t' integer to printable string.
+
+   Copyright (C) 2004-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define anytostr umaxtostr
 #define inttype uintmax_t
 #include "anytostr.c"
index 72bad1c..0763456 100644 (file)
@@ -1,4 +1,22 @@
+/* Inline functions for <unistd.h>.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
 #include "unistd.h"
 typedef int dummy;
index 66f254d..73c882f 100644 (file)
@@ -1,18 +1,18 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _@GUARD_PREFIX@_UNISTD_H
 
@@ -21,7 +21,7 @@
 #endif
 @PRAGMA_COLUMNS@
 
-#ifdef _GL_INCLUDING_UNISTD_H
+#if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H
 /* Special invocation convention:
    - On Mac OS X 10.3.9 we have a sequence of nested includes
      <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
 #define _@GUARD_PREFIX@_UNISTD_H
 
 /* NetBSD 5.0 mis-defines NULL.  Also get size_t.  */
-#include <stddef.h>
+/* But avoid namespace pollution on glibc systems.  */
+#ifndef __GLIBC__
+# include <stddef.h>
+#endif
 
 /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>.  */
 /* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>.  We must include
 # include <stdio.h>
 #endif
 
-/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>.  */
+/* Cygwin 1.7.1 and Android 4.3 declare unlinkat in <fcntl.h>, not in
+   <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
-#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \
+    && (defined __CYGWIN__ || defined __ANDROID__) \
     && ! defined __GLIBC__
 # include <fcntl.h>
 #endif
 # undef __need_system_stdlib_h
 #endif
 
-/* Native Windows platforms declare chdir, getcwd, rmdir in
+/* Native Windows platforms declare _chdir, _getcwd, _rmdir in
    <io.h> and/or <direct.h>, not in <unistd.h>.
-   They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
-   lseek(), read(), unlink(), write() in <io.h>.  */
-#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \
-      || defined GNULIB_POSIXCHECK) \
-     && (defined _WIN32 && ! defined __CYGWIN__))
-# include <io.h>     /* mingw32, mingw64 */
-# include <direct.h> /* mingw64, MSVC 9 */
-#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \
-       || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \
-       || defined GNULIB_POSIXCHECK) \
-      && (defined _WIN32 && ! defined __CYGWIN__)
+   They also declare _access(), _chmod(), _close(), _dup(), _dup2(), _isatty(),
+   _lseek(), _read(), _unlink(), _write() in <io.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
 # include <io.h>
+# include <direct.h>
+#endif
+
+/* Native Windows platforms declare _execl*, _execv* in <process.h>.  */
+#if defined _WIN32 && !defined __CYGWIN__
+# include <process.h>
 #endif
 
 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
 # include <netdb.h>
 #endif
 
-/* MSVC defines off_t in <sys/types.h>.
-   May also define off_t to a 64-bit type on native Windows.  */
-#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@
-/* Get off_t.  */
-# include <sys/types.h>
+/* Mac OS X 10.13, Solaris 11.4, and Android 9.0 declare getentropy in
+   <sys/random.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_GETENTROPY@ || defined GNULIB_POSIXCHECK) \
+    && ((defined __APPLE__ && defined __MACH__) || defined __sun \
+        || defined __ANDROID__) \
+    && @UNISTD_H_HAVE_SYS_RANDOM_H@ \
+    && !defined __GLIBC__
+# include <sys/random.h>
 #endif
 
-#if (@GNULIB_READ@ || @GNULIB_WRITE@ \
-     || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
-     || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
-/* Get ssize_t.  */
-# include <sys/types.h>
+/* Android 4.3 declares fchownat in <sys/stat.h>, not in <unistd.h>.  */
+/* But avoid namespace pollution on glibc systems.  */
+#if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
+    && !defined __GLIBC__
+# include <sys/stat.h>
 #endif
 
+/* MSVC defines off_t in <sys/types.h>.
+   May also define off_t to a 64-bit type on native Windows.  */
+/* Get off_t, ssize_t, mode_t.  */
+#include <sys/types.h>
+
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
 
 
 /* Get getopt(), optarg, optind, opterr, optopt.  */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
 # include <getopt-cdefs.h>
 # include <getopt-pfx-core.h>
 #endif
@@ -247,15 +259,61 @@ _GL_INLINE_HEADER_BEGIN
 /* Declare overridden functions.  */
 
 
-#if defined GNULIB_POSIXCHECK
+#if @GNULIB_ACCESS@
+# if @REPLACE_ACCESS@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef access
+#   define access rpl_access
+#  endif
+_GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef access
+#   define access _access
+#  endif
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
+# else
+_GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
+# endif
+_GL_CXXALIASWARN (access);
+#elif defined GNULIB_POSIXCHECK
+# undef access
+# if HAVE_RAW_DECL_ACCESS
 /* The access() function is a security risk.  */
-_GL_WARN_ON_USE (access, "the access function is a security risk - "
+_GL_WARN_ON_USE (access, "access does not always support X_OK - "
+                 "use gnulib module access for portability; "
+                 "also, this function is a security risk - "
                  "use the gnulib module faccessat instead");
+# endif
+#elif @GNULIB_MDA_ACCESS@
+/* On native Windows, map 'access' to '_access', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::access always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef access
+#   define access _access
+#  endif
+_GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
+# else
+_GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
+# endif
+_GL_CXXALIASWARN (access);
 #endif
 
 
 #if @GNULIB_CHDIR@
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chdir
+#   define chdir _chdir
+#  endif
+_GL_CXXALIAS_MDA (chdir, int, (const char *file));
+# else
 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+# endif
 _GL_CXXALIASWARN (chdir);
 #elif defined GNULIB_POSIXCHECK
 # undef chdir
@@ -263,6 +321,20 @@ _GL_CXXALIASWARN (chdir);
 _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
                  "use gnulib module chdir for portability");
 # endif
+#elif @GNULIB_MDA_CHDIR@
+/* On native Windows, map 'chdir' to '_chdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::chdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef chdir
+#   define chdir _chdir
+#  endif
+_GL_CXXALIAS_MDA (chdir, int, (const char *file));
+# else
+_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIASWARN (chdir);
 #endif
 
 
@@ -271,7 +343,7 @@ _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
    to GID (if GID is not -1).  Follow symbolic links.
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html.  */
 # if @REPLACE_CHOWN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef chown
@@ -307,6 +379,12 @@ _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
 #  endif
 _GL_FUNCDECL_RPL (close, int, (int fd));
 _GL_CXXALIAS_RPL (close, int, (int fd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close _close
+#  endif
+_GL_CXXALIAS_MDA (close, int, (int fd));
 # else
 _GL_CXXALIAS_SYS (close, int, (int fd));
 # endif
@@ -319,6 +397,39 @@ _GL_CXXALIASWARN (close);
 /* Assume close is always declared.  */
 _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
                  "use gnulib module close for portability");
+#elif @GNULIB_MDA_CLOSE@
+/* On native Windows, map 'close' to '_close', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::close always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef close
+#   define close _close
+#  endif
+_GL_CXXALIAS_MDA (close, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (close, int, (int fd));
+# endif
+_GL_CXXALIASWARN (close);
+#endif
+
+
+#if @GNULIB_COPY_FILE_RANGE@
+# if !@HAVE_COPY_FILE_RANGE@
+_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
+                                             int ofd, off_t *opos,
+                                             size_t len, unsigned flags));
+_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
+                                             int ofd, off_t *opos,
+                                             size_t len, unsigned flags));
+# endif
+_GL_CXXALIASWARN (copy_file_range);
+#elif defined GNULIB_POSIXCHECK
+# if HAVE_RAW_DECL_COPY_FILE_RANGE
+_GL_WARN_ON_USE (copy_file_range,
+                 "copy_file_range is unportable - "
+                 "use gnulib module copy_file_range for portability");
+# endif
 #endif
 
 
@@ -329,6 +440,12 @@ _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
 #  endif
 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup
+#   define dup _dup
+#  endif
+_GL_CXXALIAS_MDA (dup, int, (int oldfd));
 # else
 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
 # endif
@@ -339,6 +456,20 @@ _GL_CXXALIASWARN (dup);
 _GL_WARN_ON_USE (dup, "dup is unportable - "
                  "use gnulib module dup for portability");
 # endif
+#elif @GNULIB_MDA_DUP@
+/* On native Windows, map 'dup' to '_dup', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::dup always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup
+#   define dup _dup
+#  endif
+_GL_CXXALIAS_MDA (dup, int, (int oldfd));
+# else
+_GL_CXXALIAS_SYS (dup, int, (int oldfd));
+# endif
+_GL_CXXALIASWARN (dup);
 #endif
 
 
@@ -347,17 +478,20 @@ _GL_WARN_ON_USE (dup, "dup is unportable - "
    NEWFD = OLDFD, otherwise close NEWFD first if it is open.
    Return newfd if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>.  */
 # if @REPLACE_DUP2@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define dup2 rpl_dup2
 #  endif
 _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
 _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
-# else
-#  if !@HAVE_DUP2@
-_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup2
+#   define dup2 _dup2
 #  endif
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
+# else
 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
 # endif
 _GL_CXXALIASWARN (dup2);
@@ -367,6 +501,20 @@ _GL_CXXALIASWARN (dup2);
 _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
                  "use gnulib module dup2 for portability");
 # endif
+#elif @GNULIB_MDA_DUP2@
+/* On native Windows, map 'dup2' to '_dup2', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::dup2 always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dup2
+#   define dup2 _dup2
+#  endif
+_GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
+# else
+_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
+# endif
+_GL_CXXALIASWARN (dup2);
 #endif
 
 
@@ -467,6 +615,282 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
 #endif
 
 
+#if @GNULIB_EXECL@
+# if @REPLACE_EXECL@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execl
+#   define execl rpl_execl
+#  endif
+_GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execl);
+#elif defined GNULIB_POSIXCHECK
+# undef execl
+# if HAVE_RAW_DECL_EXECL
+_GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - "
+                 "use gnulib module execl for portability");
+# endif
+#elif @GNULIB_MDA_EXECL@
+/* On native Windows, map 'execl' to '_execl', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execl always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execl
+#   define execl _execl
+#  endif
+_GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execl);
+#endif
+
+#if @GNULIB_EXECLE@
+# if @REPLACE_EXECLE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execle
+#   define execle rpl_execle
+#  endif
+_GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execle);
+#elif defined GNULIB_POSIXCHECK
+# undef execle
+# if HAVE_RAW_DECL_EXECLE
+_GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - "
+                 "use gnulib module execle for portability");
+# endif
+#elif @GNULIB_MDA_EXECLE@
+/* On native Windows, map 'execle' to '_execle', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execle always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execle
+#   define execle _execle
+#  endif
+_GL_CXXALIAS_MDA (execle, intptr_t,
+                  (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execle);
+#endif
+
+#if @GNULIB_EXECLP@
+# if @REPLACE_EXECLP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execlp
+#   define execlp rpl_execlp
+#  endif
+_GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execlp);
+#elif defined GNULIB_POSIXCHECK
+# undef execlp
+# if HAVE_RAW_DECL_EXECLP
+_GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - "
+                 "use gnulib module execlp for portability");
+# endif
+#elif @GNULIB_MDA_EXECLP@
+/* On native Windows, map 'execlp' to '_execlp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execlp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execlp
+#   define execlp _execlp
+#  endif
+_GL_CXXALIAS_MDA (execlp, intptr_t,
+                  (const char *program, const char *arg, ...));
+# else
+_GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
+# endif
+_GL_CXXALIASWARN (execlp);
+#endif
+
+
+#if @GNULIB_EXECV@
+# if @REPLACE_EXECV@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execv
+#   define execv rpl_execv
+#  endif
+_GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv)
+                              _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execv);
+#elif defined GNULIB_POSIXCHECK
+# undef execv
+# if HAVE_RAW_DECL_EXECV
+_GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - "
+                 "use gnulib module execv for portability");
+# endif
+#elif @GNULIB_MDA_EXECV@
+/* On native Windows, map 'execv' to '_execv', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execv always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execv
+#   define execv _execv
+#  endif
+_GL_CXXALIAS_MDA_CAST (execv, intptr_t,
+                       (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execv);
+#endif
+
+#if @GNULIB_EXECVE@
+# if @REPLACE_EXECVE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execve
+#   define execve rpl_execve
+#  endif
+_GL_FUNCDECL_RPL (execve, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# else
+_GL_CXXALIAS_SYS (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execve);
+#elif defined GNULIB_POSIXCHECK
+# undef execve
+# if HAVE_RAW_DECL_EXECVE
+_GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - "
+                 "use gnulib module execve for portability");
+# endif
+#elif @GNULIB_MDA_EXECVE@
+/* On native Windows, map 'execve' to '_execve', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execve always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execve
+#   define execve _execve
+#  endif
+_GL_CXXALIAS_MDA_CAST (execve, intptr_t,
+                       (const char *program, char * const *argv,
+                        char * const *env));
+# else
+_GL_CXXALIAS_SYS (execve, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execve);
+#endif
+
+#if @GNULIB_EXECVP@
+# if @REPLACE_EXECVP@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvp
+#   define execvp rpl_execvp
+#  endif
+_GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv)
+                               _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execvp);
+#elif defined GNULIB_POSIXCHECK
+# undef execvp
+# if HAVE_RAW_DECL_EXECVP
+_GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - "
+                 "use gnulib module execvp for portability");
+# endif
+#elif @GNULIB_MDA_EXECVP@
+/* On native Windows, map 'execvp' to '_execvp', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execvp always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvp
+#   define execvp _execvp
+#  endif
+_GL_CXXALIAS_MDA_CAST (execvp, intptr_t,
+                       (const char *program, char * const *argv));
+# else
+_GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
+# endif
+_GL_CXXALIASWARN (execvp);
+#endif
+
+#if @GNULIB_EXECVPE@
+# if @REPLACE_EXECVPE@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvpe
+#   define execvpe rpl_execvpe
+#  endif
+_GL_FUNCDECL_RPL (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# else
+#  if !@HAVE_DECL_EXECVPE@
+_GL_FUNCDECL_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+_GL_CXXALIASWARN (execvpe);
+#elif defined GNULIB_POSIXCHECK
+# undef execvpe
+# if HAVE_RAW_DECL_EXECVPE
+_GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - "
+                 "use gnulib module execvpe for portability");
+# endif
+#elif @GNULIB_MDA_EXECVPE@
+/* On native Windows, map 'execvpe' to '_execvpe', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::execvpe on all platforms that have
+   it.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef execvpe
+#   define execvpe _execvpe
+#  endif
+_GL_CXXALIAS_MDA_CAST (execvpe, intptr_t,
+                       (const char *program, char * const *argv,
+                        char * const *env));
+# elif @HAVE_EXECVPE@
+#  if !@HAVE_DECL_EXECVPE@
+_GL_FUNCDECL_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env)
+                  _GL_ARG_NONNULL ((1, 2)));
+#  endif
+_GL_CXXALIAS_SYS (execvpe, int,
+                  (const char *program, char * const *argv, char * const *env));
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_EXECVPE@
+_GL_CXXALIASWARN (execvpe);
+# endif
+#endif
+
+
 #if @GNULIB_FACCESSAT@
 # if @REPLACE_FACCESSAT@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -502,7 +926,7 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
    the given file descriptor is open.
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>.  */
 # if ! @HAVE_FCHDIR@
 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
 
@@ -554,7 +978,7 @@ _GL_CXXALIASWARN (fchownat);
 # undef fchownat
 # if HAVE_RAW_DECL_FCHOWNAT
 _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
-                 "use gnulib module openat for portability");
+                 "use gnulib module fchownat for portability");
 # endif
 #endif
 
@@ -563,7 +987,7 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
 /* Synchronize changes to a file.
    Return 0 if successful, otherwise -1 and errno set.
    See POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>.  */
 # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
 # endif
@@ -582,7 +1006,7 @@ _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
 /* Synchronize changes, including metadata, to a file.
    Return 0 if successful, otherwise -1 and errno set.
    See POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>.  */
 # if !@HAVE_FSYNC@
 _GL_FUNCDECL_SYS (fsync, int, (int fd));
 # endif
@@ -601,7 +1025,7 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - "
 /* Change the size of the file to which FD is opened to become equal to LENGTH.
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>.  */
 # if @REPLACE_FTRUNCATE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef ftruncate
@@ -631,7 +1055,7 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
    Return BUF if successful, or NULL if the directory couldn't be determined
    or SIZE was too small.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
    Additionally, the gnulib module 'getcwd' guarantees the following GNU
    extension: If BUF is NULL, an array is allocated with 'malloc'; the array
    is SIZE bytes long, unless SIZE == 0, in which case it is as big as
@@ -642,6 +1066,12 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
 #  endif
 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getcwd
+#   define getcwd _getcwd
+#  endif
+_GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size));
 # else
 /* Need to cast, because on mingw, the second parameter is
                                                    int size.  */
@@ -654,6 +1084,22 @@ _GL_CXXALIASWARN (getcwd);
 _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
                  "use gnulib module getcwd for portability");
 # endif
+#elif @GNULIB_MDA_GETCWD@
+/* On native Windows, map 'getcwd' to '_getcwd', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getcwd always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getcwd
+#   define getcwd _getcwd
+#  endif
+/* Need to cast, because on mingw, the second parameter is either
+   'int size' or 'size_t size'.  */
+_GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size));
+# else
+_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
+# endif
+_GL_CXXALIASWARN (getcwd);
 #endif
 
 
@@ -707,7 +1153,9 @@ _GL_CXXALIAS_RPL (getdtablesize, int, (void));
 #  if !@HAVE_GETDTABLESIZE@
 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
 #  endif
-_GL_CXXALIAS_SYS (getdtablesize, int, (void));
+/* Need to cast, because on AIX, the parameter list is
+                                           (...).  */
+_GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void));
 # endif
 _GL_CXXALIASWARN (getdtablesize);
 #elif defined GNULIB_POSIXCHECK
@@ -719,6 +1167,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
 #endif
 
 
+#if @GNULIB_GETENTROPY@
+/* Fill a buffer with random bytes.  */
+# if !@HAVE_GETENTROPY@
+_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length));
+# endif
+_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length));
+_GL_CXXALIASWARN (getentropy);
+#elif defined GNULIB_POSIXCHECK
+# undef getentropy
+# if HAVE_RAW_DECL_GETENTROPY
+_GL_WARN_ON_USE (getentropy, "getentropy is unportable - "
+                 "use gnulib module getentropy for portability");
+# endif
+#endif
+
+
 #if @GNULIB_GETGROUPS@
 /* Return the supplemental groups that the current process belongs to.
    It is unspecified whether the effective group id is in the list.
@@ -791,7 +1255,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
 /* Returns the user's login name, or NULL if it cannot be found.  Upon error,
    returns NULL with errno set.
 
-   See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+   See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
 
    Most programs don't need to use this function, because the information is
    available through environment variables:
@@ -820,7 +1284,7 @@ _GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
    the case that the login name cannot be found but no specific error is
    provided (this case is hopefully rare but is left open by the POSIX spec).
 
-   See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+   See <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getlogin.html>.
 
    Most programs don't need to use this function, because the information is
    available through environment variables:
@@ -861,6 +1325,11 @@ _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
 _GL_FUNCDECL_RPL (getpagesize, int, (void));
 _GL_CXXALIAS_RPL (getpagesize, int, (void));
 # else
+/* On HP-UX, getpagesize exists, but it is not declared in <unistd.h> even if
+   the compiler options -D_HPUX_SOURCE -D_XOPEN_SOURCE=600 are used.  */
+#  if defined __hpux
+_GL_FUNCDECL_SYS (getpagesize, int, (void));
+#  endif
 #  if !@HAVE_GETPAGESIZE@
 #   if !defined getpagesize
 /* This is for POSIX systems.  */
@@ -965,6 +1434,23 @@ _GL_WARN_ON_USE (getpass, "getpass is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_GETPID@
+/* On native Windows, map 'getpid' to '_getpid', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::getpid always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef getpid
+#   define getpid _getpid
+#  endif
+_GL_CXXALIAS_MDA (getpid, int, (void));
+# else
+_GL_CXXALIAS_SYS (getpid, pid_t, (void));
+# endif
+_GL_CXXALIASWARN (getpid);
+#endif
+
+
 #if @GNULIB_GETUSERSHELL@
 /* Return the next valid login shell on the system, or NULL when the end of
    the list has been reached.  */
@@ -1035,8 +1521,15 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - "
 #   undef isatty
 #   define isatty rpl_isatty
 #  endif
+#  define GNULIB_defined_isatty 1
 _GL_FUNCDECL_RPL (isatty, int, (int fd));
 _GL_CXXALIAS_RPL (isatty, int, (int fd));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty _isatty
+#  endif
+_GL_CXXALIAS_MDA (isatty, int, (int fd));
 # else
 _GL_CXXALIAS_SYS (isatty, int, (int fd));
 # endif
@@ -1047,6 +1540,20 @@ _GL_CXXALIASWARN (isatty);
 _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
                  "use gnulib module isatty for portability");
 # endif
+#elif @GNULIB_MDA_ISATTY@
+/* On native Windows, map 'isatty' to '_isatty', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::isatty always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef isatty
+#   define isatty _isatty
+#  endif
+_GL_CXXALIAS_MDA (isatty, int, (int fd));
+# else
+_GL_CXXALIAS_SYS (isatty, int, (int fd));
+# endif
+_GL_CXXALIASWARN (isatty);
 #endif
 
 
@@ -1055,7 +1562,7 @@ _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
    to GID (if GID is not -1).  Do not follow symbolic links.
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>.  */
 # if @REPLACE_LCHOWN@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef lchown
@@ -1085,7 +1592,7 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
 /* Create a new hard link for an existing file.
    Return 0 if successful, otherwise -1 and errno set.
    See POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>.  */
 # if @REPLACE_LINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define link rpl_link
@@ -1151,13 +1658,19 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - "
 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
    Return the new offset if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>.  */
 # if @REPLACE_LSEEK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define lseek rpl_lseek
 #  endif
 _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
 _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lseek
+#   define lseek _lseek
+#  endif
+_GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence));
 # else
 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
 # endif
@@ -1168,6 +1681,20 @@ _GL_CXXALIASWARN (lseek);
 _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
                  "systems - use gnulib module lseek for portability");
 # endif
+#elif @GNULIB_MDA_LSEEK@
+/* On native Windows, map 'lseek' to '_lseek', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::lseek always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lseek
+#   define lseek _lseek
+#  endif
+_GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence));
+# else
+_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
+# endif
+_GL_CXXALIASWARN (lseek);
 #endif
 
 
@@ -1223,7 +1750,7 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
    Return the number of bytes placed into BUF if successful, otherwise
    set errno and return -1.  0 indicates EOF.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>.  */
 # if @REPLACE_PREAD@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef pread
@@ -1258,7 +1785,7 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
    Return the number of bytes written if successful, otherwise
    set errno and return -1.  0 indicates nothing written.  See the
    POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>.  */
 # if @REPLACE_PWRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef pwrite
@@ -1291,7 +1818,7 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
 #if @GNULIB_READ@
 /* Read up to COUNT bytes from file descriptor FD into the buffer starting
    at BUF.  See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>.  */
 # if @REPLACE_READ@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef read
@@ -1300,11 +1827,32 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
 _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
                                  _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef read
+#   define read _read
+#  endif
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count));
 # else
-/* Need to cast, because on mingw, the third parameter is
-                                                          unsigned int count
-   and the return type is 'int'.  */
-_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (read);
+#elif @GNULIB_MDA_READ@
+/* On native Windows, map 'read' to '_read', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::read always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef read
+#   define read _read
+#  endif
+#  ifdef __MINGW32__
+_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count));
+#  else
+_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count));
+#  endif
+# else
+_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
 # endif
 _GL_CXXALIASWARN (read);
 #endif
@@ -1315,24 +1863,28 @@ _GL_CXXALIASWARN (read);
    bytes of it into BUF.  Return the number of bytes placed into BUF if
    successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>.  */
 # if @REPLACE_READLINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define readlink rpl_readlink
 #  endif
 _GL_FUNCDECL_RPL (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize)
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize)
                   _GL_ARG_NONNULL ((1, 2)));
 _GL_CXXALIAS_RPL (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize));
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize));
 # else
 #  if !@HAVE_READLINK@
 _GL_FUNCDECL_SYS (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize)
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize)
                   _GL_ARG_NONNULL ((1, 2)));
 #  endif
 _GL_CXXALIAS_SYS (readlink, ssize_t,
-                  (const char *file, char *buf, size_t bufsize));
+                  (const char *restrict file,
+                   char *restrict buf, size_t bufsize));
 # endif
 _GL_CXXALIASWARN (readlink);
 #elif defined GNULIB_POSIXCHECK
@@ -1350,18 +1902,22 @@ _GL_WARN_ON_USE (readlink, "readlink is unportable - "
 #   define readlinkat rpl_readlinkat
 #  endif
 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len)
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len)
                   _GL_ARG_NONNULL ((2, 3)));
 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len));
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len));
 # else
 #  if !@HAVE_READLINKAT@
 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len)
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len)
                   _GL_ARG_NONNULL ((2, 3)));
 #  endif
 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
-                  (int fd, char const *file, char *buf, size_t len));
+                  (int fd, char const *restrict file,
+                   char *restrict buf, size_t len));
 # endif
 _GL_CXXALIASWARN (readlinkat);
 #elif defined GNULIB_POSIXCHECK
@@ -1381,6 +1937,12 @@ _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (rmdir, int, (char const *name));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rmdir
+#   define rmdir _rmdir
+#  endif
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name));
 # else
 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
 # endif
@@ -1391,6 +1953,20 @@ _GL_CXXALIASWARN (rmdir);
 _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
                  "use gnulib module rmdir for portability");
 # endif
+#elif @GNULIB_MDA_RMDIR@
+/* On native Windows, map 'rmdir' to '_rmdir', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::rmdir always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef rmdir
+#   define rmdir _rmdir
+#  endif
+_GL_CXXALIAS_MDA (rmdir, int, (char const *name));
+# else
+_GL_CXXALIAS_SYS (rmdir, int, (char const *name));
+# endif
+_GL_CXXALIASWARN (rmdir);
 #endif
 
 
@@ -1425,7 +2001,7 @@ _GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
 /* Pause the execution of the current thread for N seconds.
    Returns the number of seconds left to sleep.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>.  */
 # if @REPLACE_SLEEP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef sleep
@@ -1449,6 +2025,31 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - "
 #endif
 
 
+#if @GNULIB_MDA_SWAB@
+/* On native Windows, map 'swab' to '_swab', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::swab always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef swab
+#   define swab _swab
+#  endif
+/* Need to cast, because in old mingw the arguments are
+                             (const char *from, char *to, size_t n).  */
+_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n));
+# else
+#  if defined __hpux /* HP-UX */
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n));
+#  elif defined __sun && !defined _XPG4 /* Solaris */
+_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n));
+#  else
+_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
+#  endif
+# endif
+_GL_CXXALIASWARN (swab);
+#endif
+
+
 #if @GNULIB_SYMLINK@
 # if @REPLACE_SYMLINK@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1509,7 +2110,7 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
 /* Change the size of the file designated by FILENAME to become equal to LENGTH.
    Return 0 if successful, otherwise -1 and errno set.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>.  */
 # if @REPLACE_TRUNCATE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef truncate
@@ -1573,6 +2174,12 @@ _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
 #  endif
 _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
 _GL_CXXALIAS_RPL (unlink, int, (char const *file));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlink
+#   define unlink _unlink
+#  endif
+_GL_CXXALIAS_MDA (unlink, int, (char const *file));
 # else
 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
 # endif
@@ -1583,6 +2190,20 @@ _GL_CXXALIASWARN (unlink);
 _GL_WARN_ON_USE (unlink, "unlink is not portable - "
                  "use gnulib module unlink for portability");
 # endif
+#elif @GNULIB_MDA_UNLINK@
+/* On native Windows, map 'unlink' to '_unlink', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::unlink always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef unlink
+#   define unlink _unlink
+#  endif
+_GL_CXXALIAS_MDA (unlink, int, (char const *file));
+# else
+_GL_CXXALIAS_SYS (unlink, int, (char const *file));
+# endif
+_GL_CXXALIASWARN (unlink);
 #endif
 
 
@@ -1607,7 +2228,7 @@ _GL_CXXALIASWARN (unlinkat);
 # undef unlinkat
 # if HAVE_RAW_DECL_UNLINKAT
 _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
-                 "use gnulib module openat for portability");
+                 "use gnulib module unlinkat for portability");
 # endif
 #endif
 
@@ -1616,7 +2237,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
 /* Pause the execution of the current thread for N microseconds.
    Returns 0 on completion, or -1 on range error.
    See the POSIX:2001 specification
-   <http://www.opengroup.org/susv3xsh/usleep.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html>.  */
 # if @REPLACE_USLEEP@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef usleep
@@ -1628,7 +2249,9 @@ _GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
 #  if !@HAVE_USLEEP@
 _GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
 #  endif
-_GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
+/* Need to cast, because on Haiku, the first parameter is
+                                     unsigned int n.  */
+_GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n));
 # endif
 _GL_CXXALIASWARN (usleep);
 #elif defined GNULIB_POSIXCHECK
@@ -1643,7 +2266,7 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
 #if @GNULIB_WRITE@
 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
    See the POSIX:2008 specification
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>.  */
 # if @REPLACE_WRITE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef write
@@ -1652,11 +2275,32 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - "
 _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
                                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
+# elif defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef write
+#   define write _write
+#  endif
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count));
+# else
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
+# endif
+_GL_CXXALIASWARN (write);
+#elif @GNULIB_MDA_WRITE@
+/* On native Windows, map 'write' to '_write', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::write always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef write
+#   define write _write
+#  endif
+#  ifdef __MINGW32__
+_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count));
+#  else
+_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count));
+#  endif
 # else
-/* Need to cast, because on mingw, the third parameter is
-                                                             unsigned int count
-   and the return type is 'int'.  */
-_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
+_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
 # endif
 _GL_CXXALIASWARN (write);
 #endif
index b0fbce8..ed65777 100644 (file)
@@ -1,17 +1,17 @@
 /* Elementary Unicode string functions.
-   Copyright (C) 2001-2002, 2005-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2005-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _UNISTR_H
 
 #include "unitypes.h"
 
-/* Get common macros for C.  */
-#include "unused-parameter.h"
-
 /* Get bool.  */
 #include <stdbool.h>
 
-/* Get size_t.  */
+/* Get size_t, ptrdiff_t.  */
 #include <stddef.h>
 
 #ifdef __cplusplus
@@ -193,7 +190,7 @@ extern int
 # else
 static inline int
 u32_mbtouc_unsafe (ucs4_t *puc,
-                   const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+                   const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
 {
   uint32_t c = *s;
 
@@ -259,7 +256,8 @@ extern int
        u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n);
 # else
 static inline int
-u32_mbtouc (ucs4_t *puc, const uint32_t *s, size_t n _GL_UNUSED_PARAMETER)
+u32_mbtouc (ucs4_t *puc, const uint32_t *s,
+            _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
 {
   uint32_t c = *s;
 
@@ -305,13 +303,13 @@ extern int
 #if GNULIB_UNISTR_U8_UCTOMB || HAVE_LIBUNISTRING
 /* Auxiliary function, also used by u8_chr, u8_strchr, u8_strrchr.  */
 extern int
-       u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n);
+       u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n);
 # if !HAVE_INLINE
 extern int
-       u8_uctomb (uint8_t *s, ucs4_t uc, int n);
+       u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n);
 # else
 static inline int
-u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n)
 {
   if (uc < 0x80 && n > 0)
     {
@@ -327,13 +325,13 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n)
 #if GNULIB_UNISTR_U16_UCTOMB || HAVE_LIBUNISTRING
 /* Auxiliary function, also used by u16_chr, u16_strchr, u16_strrchr.  */
 extern int
-       u16_uctomb_aux (uint16_t *s, ucs4_t uc, int n);
+       u16_uctomb_aux (uint16_t *s, ucs4_t uc, ptrdiff_t n);
 # if !HAVE_INLINE
 extern int
-       u16_uctomb (uint16_t *s, ucs4_t uc, int n);
+       u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n);
 # else
 static inline int
-u16_uctomb (uint16_t *s, ucs4_t uc, int n)
+u16_uctomb (uint16_t *s, ucs4_t uc, ptrdiff_t n)
 {
   if (uc < 0xd800 && n > 0)
     {
@@ -349,10 +347,10 @@ u16_uctomb (uint16_t *s, ucs4_t uc, int n)
 #if GNULIB_UNISTR_U32_UCTOMB || HAVE_LIBUNISTRING
 # if !HAVE_INLINE
 extern int
-       u32_uctomb (uint32_t *s, ucs4_t uc, int n);
+       u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n);
 # else
 static inline int
-u32_uctomb (uint32_t *s, ucs4_t uc, int n)
+u32_uctomb (uint32_t *s, ucs4_t uc, ptrdiff_t n)
 {
   if (uc < 0xd800 || (uc >= 0xe000 && uc < 0x110000))
     {
@@ -373,11 +371,11 @@ u32_uctomb (uint32_t *s, ucs4_t uc, int n)
 /* Copy N units from SRC to DEST.  */
 /* Similar to memcpy().  */
 extern uint8_t *
-       u8_cpy (uint8_t *dest, const uint8_t *src, size_t n);
+       u8_cpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n);
 extern uint16_t *
-       u16_cpy (uint16_t *dest, const uint16_t *src, size_t n);
+       u16_cpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n);
 extern uint32_t *
-       u32_cpy (uint32_t *dest, const uint32_t *src, size_t n);
+       u32_cpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
 
 /* Copy N units from SRC to DEST, guaranteeing correct behavior for
    overlapping memory areas.  */
@@ -528,57 +526,57 @@ extern size_t
 /* Copy SRC to DEST.  */
 /* Similar to strcpy(), wcscpy().  */
 extern uint8_t *
-       u8_strcpy (uint8_t *dest, const uint8_t *src);
+       u8_strcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src);
 extern uint16_t *
-       u16_strcpy (uint16_t *dest, const uint16_t *src);
+       u16_strcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src);
 extern uint32_t *
-       u32_strcpy (uint32_t *dest, const uint32_t *src);
+       u32_strcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src);
 
 /* Copy SRC to DEST, returning the address of the terminating NUL in DEST.  */
 /* Similar to stpcpy().  */
 extern uint8_t *
-       u8_stpcpy (uint8_t *dest, const uint8_t *src);
+       u8_stpcpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src);
 extern uint16_t *
-       u16_stpcpy (uint16_t *dest, const uint16_t *src);
+       u16_stpcpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src);
 extern uint32_t *
-       u32_stpcpy (uint32_t *dest, const uint32_t *src);
+       u32_stpcpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src);
 
 /* Copy no more than N units of SRC to DEST.  */
 /* Similar to strncpy(), wcsncpy().  */
 extern uint8_t *
-       u8_strncpy (uint8_t *dest, const uint8_t *src, size_t n);
+       u8_strncpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n);
 extern uint16_t *
-       u16_strncpy (uint16_t *dest, const uint16_t *src, size_t n);
+       u16_strncpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n);
 extern uint32_t *
-       u32_strncpy (uint32_t *dest, const uint32_t *src, size_t n);
+       u32_strncpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
 
 /* Copy no more than N units of SRC to DEST.  Return a pointer past the last
    non-NUL unit written into DEST.  */
 /* Similar to stpncpy().  */
 extern uint8_t *
-       u8_stpncpy (uint8_t *dest, const uint8_t *src, size_t n);
+       u8_stpncpy (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n);
 extern uint16_t *
-       u16_stpncpy (uint16_t *dest, const uint16_t *src, size_t n);
+       u16_stpncpy (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n);
 extern uint32_t *
-       u32_stpncpy (uint32_t *dest, const uint32_t *src, size_t n);
+       u32_stpncpy (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
 
 /* Append SRC onto DEST.  */
 /* Similar to strcat(), wcscat().  */
 extern uint8_t *
-       u8_strcat (uint8_t *dest, const uint8_t *src);
+       u8_strcat (uint8_t *_UC_RESTRICT dest, const uint8_t *src);
 extern uint16_t *
-       u16_strcat (uint16_t *dest, const uint16_t *src);
+       u16_strcat (uint16_t *_UC_RESTRICT dest, const uint16_t *src);
 extern uint32_t *
-       u32_strcat (uint32_t *dest, const uint32_t *src);
+       u32_strcat (uint32_t *_UC_RESTRICT dest, const uint32_t *src);
 
 /* Append no more than N units of SRC onto DEST.  */
 /* Similar to strncat(), wcsncat().  */
 extern uint8_t *
-       u8_strncat (uint8_t *dest, const uint8_t *src, size_t n);
+       u8_strncat (uint8_t *_UC_RESTRICT dest, const uint8_t *src, size_t n);
 extern uint16_t *
-       u16_strncat (uint16_t *dest, const uint16_t *src, size_t n);
+       u16_strncat (uint16_t *_UC_RESTRICT dest, const uint16_t *src, size_t n);
 extern uint32_t *
-       u32_strncat (uint32_t *dest, const uint32_t *src, size_t n);
+       u32_strncat (uint32_t *_UC_RESTRICT dest, const uint32_t *src, size_t n);
 
 /* Compare S1 and S2.  */
 /* Similar to strcmp(), wcscmp().  */
@@ -732,11 +730,14 @@ extern bool
    This interface is actually more similar to wcstok than to strtok.  */
 /* Similar to strtok_r(), wcstok().  */
 extern uint8_t *
-       u8_strtok (uint8_t *str, const uint8_t *delim, uint8_t **ptr);
+       u8_strtok (uint8_t *_UC_RESTRICT str, const uint8_t *delim,
+                  uint8_t **ptr);
 extern uint16_t *
-       u16_strtok (uint16_t *str, const uint16_t *delim, uint16_t **ptr);
+       u16_strtok (uint16_t *_UC_RESTRICT str, const uint16_t *delim,
+                   uint16_t **ptr);
 extern uint32_t *
-       u32_strtok (uint32_t *str, const uint32_t *delim, uint32_t **ptr);
+       u32_strtok (uint32_t *_UC_RESTRICT str, const uint32_t *delim,
+                   uint32_t **ptr);
 
 
 #ifdef __cplusplus
index 1e58410..77a6cac 100644 (file)
@@ -1,18 +1,18 @@
 /* Look at first character in UTF-8 string, returning an error code.
-   Copyright (C) 1999-2002, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2001.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index dcaa4e8..2be1cfb 100644 (file)
@@ -1,18 +1,18 @@
 /* Conversion UCS-4 to UTF-8.
-   Copyright (C) 2002, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 /* Specification.  */
 #include "unistr.h"
 
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
-#endif
+#include "attribute.h"
 
 int
-u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n)
+u8_uctomb_aux (uint8_t *s, ucs4_t uc, ptrdiff_t n)
 {
   int count;
 
index ec4e904..e2577c6 100644 (file)
@@ -1,18 +1,18 @@
 /* Store a character in UTF-8 string.
-   Copyright (C) 2002, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005-2006, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 /* Specification.  */
 #include "unistr.h"
 
+#include "attribute.h"
+
 #if !HAVE_INLINE
 
 int
-u8_uctomb (uint8_t *s, ucs4_t uc, int n)
+u8_uctomb (uint8_t *s, ucs4_t uc, ptrdiff_t n)
 {
   if (uc < 0x80)
     {
@@ -62,7 +64,9 @@ u8_uctomb (uint8_t *s, ucs4_t uc, int n)
           switch (count) /* note: code falls through cases! */
             {
             case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000;
+              FALLTHROUGH;
             case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800;
+              FALLTHROUGH;
             case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0;
           /*case 1:*/ s[0] = uc;
             }
index 13ed4cb..82ee0de 100644 (file)
@@ -1,17 +1,17 @@
 /* Elementary types and macros for the GNU UniString library.
-   Copyright (C) 2002, 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _UNITYPES_H
@@ -26,7 +26,7 @@ typedef uint32_t ucs4_t;
 /* Attribute of a function whose result depends only on the arguments
    (not pointers!) and which has no side effects.  */
 #ifndef _UC_ATTRIBUTE_CONST
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) || defined __clang__
 #  define _UC_ATTRIBUTE_CONST __attribute__ ((__const__))
 # else
 #  define _UC_ATTRIBUTE_CONST
@@ -36,11 +36,26 @@ typedef uint32_t ucs4_t;
 /* Attribute of a function whose result depends only on the arguments
    (possibly pointers) and global memory, and which has no side effects.  */
 #ifndef _UC_ATTRIBUTE_PURE
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
 #  define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__))
 # else
 #  define _UC_ATTRIBUTE_PURE
 # endif
 #endif
 
+/* Qualifier in a function declaration, that asserts that the caller must
+   pass a pointer to a different object in the specified pointer argument
+   than in the other pointer arguments.  */
+#ifndef _UC_RESTRICT
+# if defined __restrict \
+     || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+     || __clang_major__ >= 3
+#  define _UC_RESTRICT __restrict
+# elif 199901L <= __STDC_VERSION__ || defined restrict
+#  define _UC_RESTRICT restrict
+# else
+#  define _UC_RESTRICT
+# endif
+#endif
+
 #endif /* _UNITYPES_H */
index 0cacc29..0859254 100644 (file)
@@ -1,18 +1,18 @@
 /* Display width functions.
-   Copyright (C) 2001-2002, 2005, 2007, 2009-2018 Free Software Foundation,
+   Copyright (C) 2001-2002, 2005, 2007, 2009-2021 Free Software Foundation,
    Inc.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _UNIWIDTH_H
index f7f822c..1853ceb 100644 (file)
@@ -1,18 +1,18 @@
 /* Test for CJK encoding.
-   Copyright (C) 2001-2002, 2005-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2005-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include "streq.h"
index cd27d61..9ba07d3 100644 (file)
@@ -1,18 +1,18 @@
 /* Determine display width of Unicode character.
-   Copyright (C) 2001-2002, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2006-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2002.
 
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
index e3f0fcf..ca184b3 100644 (file)
@@ -1,6 +1,6 @@
 /* Prefer faster, non-thread-safe stdio functions if available.
 
-   Copyright (C) 2001-2004, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 # include <stdio.h>
 
-# if HAVE_DECL_CLEARERR_UNLOCKED
+# if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
 #  undef clearerr
 #  define clearerr(x) clearerr_unlocked (x)
 # else
 #  define clearerr_unlocked(x) clearerr (x)
 # endif
 
-# if HAVE_DECL_FEOF_UNLOCKED
+# if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked
 #  undef feof
 #  define feof(x) feof_unlocked (x)
 # else
 #  define feof_unlocked(x) feof (x)
 # endif
 
-# if HAVE_DECL_FERROR_UNLOCKED
+# if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked
 #  undef ferror
 #  define ferror(x) ferror_unlocked (x)
 # else
 #  define ferror_unlocked(x) ferror (x)
 # endif
 
-# if HAVE_DECL_FFLUSH_UNLOCKED
+# if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked
 #  undef fflush
 #  define fflush(x) fflush_unlocked (x)
 # else
 #  define fflush_unlocked(x) fflush (x)
 # endif
 
-# if HAVE_DECL_FGETS_UNLOCKED
+# if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked
 #  undef fgets
 #  define fgets(x,y,z) fgets_unlocked (x,y,z)
 # else
 #  define fgets_unlocked(x,y,z) fgets (x,y,z)
 # endif
 
-# if HAVE_DECL_FPUTC_UNLOCKED
+# if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked
 #  undef fputc
 #  define fputc(x,y) fputc_unlocked (x,y)
 # else
 #  define fputc_unlocked(x,y) fputc (x,y)
 # endif
 
-# if HAVE_DECL_FPUTS_UNLOCKED
+# if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked
 #  undef fputs
 #  define fputs(x,y) fputs_unlocked (x,y)
 # else
 #  define fputs_unlocked(x,y) fputs (x,y)
 # endif
 
-# if HAVE_DECL_FREAD_UNLOCKED
+# if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked
 #  undef fread
 #  define fread(w,x,y,z) fread_unlocked (w,x,y,z)
 # else
 #  define fread_unlocked(w,x,y,z) fread (w,x,y,z)
 # endif
 
-# if HAVE_DECL_FWRITE_UNLOCKED
+# if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked
 #  undef fwrite
 #  define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
 # else
 #  define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
 # endif
 
-# if HAVE_DECL_GETC_UNLOCKED
+# if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked
 #  undef getc
 #  define getc(x) getc_unlocked (x)
 # else
 #  define getc_unlocked(x) getc (x)
 # endif
 
-# if HAVE_DECL_GETCHAR_UNLOCKED
+# if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked
 #  undef getchar
 #  define getchar() getchar_unlocked ()
 # else
 #  define getchar_unlocked() getchar ()
 # endif
 
-# if HAVE_DECL_PUTC_UNLOCKED
+# if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked
 #  undef putc
 #  define putc(x,y) putc_unlocked (x,y)
 # else
 #  define putc_unlocked(x,y) putc (x,y)
 # endif
 
-# if HAVE_DECL_PUTCHAR_UNLOCKED
+# if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked
 #  undef putchar
 #  define putchar(x) putchar_unlocked (x)
 # else
index 82c6c06..b2e910e 100644 (file)
@@ -1,17 +1,17 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2018 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2021 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Don't use __attribute__ __nonnull__ in this compilation unit.  Otherwise gcc
diff --git a/lib/unused-parameter.h b/lib/unused-parameter.h
deleted file mode 100644 (file)
index 40a0ff8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* A C macro for declaring that specific function parameters are not used.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter
-   declarations for parameters that are not used.  This helps to reduce
-   warnings, such as from GCC -Wunused-parameter.  The syntax is as follows:
-       type param _GL_UNUSED_PARAMETER
-   or more generally
-       param_decl _GL_UNUSED_PARAMETER
-   For example:
-       int param _GL_UNUSED_PARAMETER
-       int *(*param)(void) _GL_UNUSED_PARAMETER
-   Other possible, but obscure and discouraged syntaxes:
-       int _GL_UNUSED_PARAMETER *(*param)(void)
-       _GL_UNUSED_PARAMETER int *(*param)(void)
- */
-#ifndef _GL_UNUSED_PARAMETER
-# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-#  define _GL_UNUSED_PARAMETER __attribute__ ((__unused__))
-# else
-#  define _GL_UNUSED_PARAMETER
-# endif
-#endif
index 5757175..12c532e 100644 (file)
@@ -1,18 +1,18 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 1999, 2002-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* This file can be parametrized with the following macros:
      VASNPRINTF         The name of the function being defined.
      DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[].
      DCHAR_IS_UINT8_T   Set to 1 if DCHAR_T is uint8_t.
      DCHAR_IS_UINT16_T  Set to 1 if DCHAR_T is uint16_t.
-     DCHAR_IS_UINT32_T  Set to 1 if DCHAR_T is uint32_t.  */
+     DCHAR_IS_UINT32_T  Set to 1 if DCHAR_T is uint32_t.
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
+     ENABLE_WCHAR_FALLBACK  Set to 1 to avoid EILSEQ during conversion of wide
+                        characters (wchar_t) and wide character strings
+                        (wchar_t[]) to multibyte sequences.  The fallback is the
+                        hexadecimal escape syntax (\unnnn or \Unnnnnnnn) or,
+                        if wchar_t is not Unicode encoded, \wnnnn or \Wnnnnnnnn.
+ */
 
 /* Tell glibc's <stdio.h> to provide a prototype for snprintf().
    This must come before <config.h> because <config.h> may include
@@ -53,9 +60,7 @@
 #ifndef VASNPRINTF
 # include <config.h>
 #endif
-#ifndef IN_LIBINTL
-# include <alloca.h>
-#endif
+#include <alloca.h>
 
 /* Specification.  */
 #ifndef VASNPRINTF
@@ -87,6 +92,7 @@
 /* Checked size_t computations.  */
 #include "xsize.h"
 
+#include "attribute.h"
 #include "verify.h"
 
 #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
 # include "fpucw.h"
 #endif
 
-#ifndef FALLTHROUGH
-# if __GNUC__ < 7
-#  define FALLTHROUGH ((void) 0)
-# else
-#  define FALLTHROUGH __attribute__ ((__fallthrough__))
-# endif
-#endif
-
 /* Default parameters.  */
 #ifndef VASNPRINTF
 # if WIDE_CHAR_VERSION
@@ -277,6 +275,74 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
 # endif
 #endif
 
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || (ENABLE_WCHAR_FALLBACK && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
+# if ENABLE_WCHAR_FALLBACK
+static size_t
+wctomb_fallback (char *s, wchar_t wc)
+{
+  static char hex[16] = "0123456789ABCDEF";
+
+  s[0] = '\\';
+  if (sizeof (wchar_t) > 2 && wc > 0xffff)
+    {
+#  if __STDC_ISO_10646__ || (__GLIBC__ >= 2) || (defined _WIN32 || defined __CYGWIN__)
+      s[1] = 'U';
+#  else
+      s[1] = 'W';
+#  endif
+      s[2] = hex[(wc & 0xf0000000U) >> 28];
+      s[3] = hex[(wc & 0xf000000U) >> 24];
+      s[4] = hex[(wc & 0xf00000U) >> 20];
+      s[5] = hex[(wc & 0xf0000U) >> 16];
+      s[6] = hex[(wc & 0xf000U) >> 12];
+      s[7] = hex[(wc & 0xf00U) >> 8];
+      s[8] = hex[(wc & 0xf0U) >> 4];
+      s[9] = hex[wc & 0xfU];
+      return 10;
+    }
+  else
+    {
+#  if __STDC_ISO_10646__ || (__GLIBC__ >= 2) || (defined _WIN32 || defined __CYGWIN__)
+      s[1] = 'u';
+#  else
+      s[1] = 'w';
+#  endif
+      s[2] = hex[(wc & 0xf000U) >> 12];
+      s[3] = hex[(wc & 0xf00U) >> 8];
+      s[4] = hex[(wc & 0xf0U) >> 4];
+      s[5] = hex[wc & 0xfU];
+      return 6;
+    }
+}
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+static size_t
+local_wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+{
+  size_t count = wcrtomb (s, wc, ps);
+  if (count == (size_t)(-1))
+    count = wctomb_fallback (s, wc);
+  return count;
+}
+#  else
+static int
+local_wctomb (char *s, wchar_t wc)
+{
+  int count = wctomb (s, wc);
+  if (count < 0)
+    count = wctomb_fallback (s, wc);
+  return count;
+}
+#   define local_wcrtomb(S, WC, PS)  local_wctomb ((S), (WC))
+#  endif
+# else
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+#   define local_wcrtomb(S, WC, PS)  wcrtomb ((S), (WC), (PS))
+#  else
+#   define local_wcrtomb(S, WC, PS)  wctomb ((S), (WC))
+#  endif
+# endif
+#endif
+
 #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
 /* Determine the decimal-point character according to the current locale.  */
 # ifndef decimal_point_char_defined
@@ -565,7 +631,8 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
         mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
         /* Determine s = GMP_LIMB_BITS - integer_length (msd).
            Code copied from gnulib's integer_length.c.  */
-# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) \
+     || (__clang_major__ >= 4)
         s = __builtin_clz (msd);
 # else
 #  if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
@@ -1553,16 +1620,13 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
   switch (conversion)
     {
     case 'd': case 'i': case 'u':
-# if HAVE_LONG_LONG_INT
       if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
                           * 0.30103 /* binary -> decimal */
                          )
           + 1; /* turn floor into ceil */
-      else
-# endif
-      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long) * CHAR_BIT
                           * 0.30103 /* binary -> decimal */
@@ -1583,16 +1647,13 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
       break;
 
     case 'o':
-# if HAVE_LONG_LONG_INT
       if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
                           * 0.333334 /* binary -> octal */
                          )
           + 1; /* turn floor into ceil */
-      else
-# endif
-      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long) * CHAR_BIT
                           * 0.333334 /* binary -> octal */
@@ -1611,16 +1672,13 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
       break;
 
     case 'x': case 'X':
-# if HAVE_LONG_LONG_INT
       if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
                           * 0.25 /* binary -> hexadecimal */
                          )
           + 1; /* turn floor into ceil */
-      else
-# endif
-      if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+      else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
         tmp_length =
           (unsigned int) (sizeof (unsigned long) * CHAR_BIT
                           * 0.25 /* binary -> hexadecimal */
@@ -1686,7 +1744,13 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
     case 'c':
 # if HAVE_WINT_T && !WIDE_CHAR_VERSION
       if (type == TYPE_WIDE_CHAR)
-        tmp_length = MB_CUR_MAX;
+        {
+          tmp_length = MB_CUR_MAX;
+#  if ENABLE_WCHAR_FALLBACK
+          if (tmp_length < (sizeof (wchar_t) > 2 ? 10 : 6))
+            tmp_length = (sizeof (wchar_t) > 2 ? 10 : 6);
+#  endif
+        }
       else
 # endif
         tmp_length = 1;
@@ -1793,6 +1857,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
     /* errno is already set.  */
     return NULL;
 
+  /* Frees the memory allocated by this function.  Preserves errno.  */
 #define CLEANUP() \
   if (d.dir != d.direct_alloc_dir)                                      \
     free (d.dir);                                                       \
@@ -1857,7 +1922,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
     /* Ensures that allocated >= needed.  Aborts through a jump to
        out_of_memory if needed is SIZE_MAX or otherwise too big.  */
-#define ENSURE_ALLOCATION(needed) \
+#define ENSURE_ALLOCATION_ELSE(needed, oom_statement) \
     if ((needed) > allocated)                                                \
       {                                                                      \
         size_t memory_size;                                                  \
@@ -1868,17 +1933,19 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
           allocated = (needed);                                              \
         memory_size = xtimes (allocated, sizeof (DCHAR_T));                  \
         if (size_overflow_p (memory_size))                                   \
-          goto out_of_memory;                                                \
+          oom_statement                                                      \
         if (result == resultbuf || result == NULL)                           \
           memory = (DCHAR_T *) malloc (memory_size);                         \
         else                                                                 \
           memory = (DCHAR_T *) realloc (result, memory_size);                \
         if (memory == NULL)                                                  \
-          goto out_of_memory;                                                \
+          oom_statement                                                      \
         if (result == resultbuf && length > 0)                               \
           DCHAR_CPY (memory, result, length);                                \
         result = memory;                                                     \
       }
+#define ENSURE_ALLOCATION(needed) \
+  ENSURE_ALLOCATION_ELSE((needed), goto out_of_memory; )
 
     for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
       {
@@ -1939,11 +2006,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   case TYPE_COUNT_LONGINT_POINTER:
                     *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
                     break;
-#if HAVE_LONG_LONG_INT
                   case TYPE_COUNT_LONGLONGINT_POINTER:
                     *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
                     break;
-#endif
                   default:
                     abort ();
                   }
@@ -2119,18 +2184,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #  endif
                         if (converted == NULL)
                           {
-                            int saved_errno = errno;
                             if (!(result == resultbuf || result == NULL))
                               free (result);
                             if (buf_malloced != NULL)
                               free (buf_malloced);
                             CLEANUP ();
-                            errno = saved_errno;
                             return NULL;
                           }
                         if (converted != result + length)
                           {
-                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
+                                                    { free (converted); goto out_of_memory; });
                             DCHAR_CPY (result + length, converted, converted_len);
                             free (converted);
                           }
@@ -2245,18 +2309,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #  endif
                         if (converted == NULL)
                           {
-                            int saved_errno = errno;
                             if (!(result == resultbuf || result == NULL))
                               free (result);
                             if (buf_malloced != NULL)
                               free (buf_malloced);
                             CLEANUP ();
-                            errno = saved_errno;
                             return NULL;
                           }
                         if (converted != result + length)
                           {
-                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
+                                                    { free (converted); goto out_of_memory; });
                             DCHAR_CPY (result + length, converted, converted_len);
                             free (converted);
                           }
@@ -2371,18 +2434,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #  endif
                         if (converted == NULL)
                           {
-                            int saved_errno = errno;
                             if (!(result == resultbuf || result == NULL))
                               free (result);
                             if (buf_malloced != NULL)
                               free (buf_malloced);
                             CLEANUP ();
-                            errno = saved_errno;
                             return NULL;
                           }
                         if (converted != result + length)
                           {
-                            ENSURE_ALLOCATION (xsum (length, converted_len));
+                            ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
+                                                    { free (converted); goto out_of_memory; });
                             DCHAR_CPY (result + length, converted, converted_len);
                             free (converted);
                           }
@@ -2405,7 +2467,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                   }
               }
 #endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
             else if (dp->conversion == 's'
 # if WIDE_CHAR_VERSION
                      && a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -2680,11 +2742,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           if (*arg_end == 0)
                             /* Found the terminating null wide character.  */
                             break;
-#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
-                          count = wcrtomb (cbuf, *arg_end, &state);
-#  else
-                          count = wctomb (cbuf, *arg_end);
-#  endif
+                          count = local_wcrtomb (cbuf, *arg_end, &state);
                           if (count < 0)
                             {
                               /* Cannot convert.  */
@@ -2725,11 +2783,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           if (*arg_end == 0)
                             /* Found the terminating null wide character.  */
                             break;
-#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
-                          count = wcrtomb (cbuf, *arg_end, &state);
-#  else
-                          count = wctomb (cbuf, *arg_end);
-#  endif
+                          count = local_wcrtomb (cbuf, *arg_end, &state);
                           if (count < 0)
                             {
                               /* Cannot convert.  */
@@ -2774,11 +2828,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
                         if (*arg == 0)
                           abort ();
-#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
-                        count = wcrtomb (cbuf, *arg, &state);
-#   else
-                        count = wctomb (cbuf, *arg);
-#   endif
+                        count = local_wcrtomb (cbuf, *arg, &state);
                         if (count <= 0)
                           /* Inconsistency.  */
                           abort ();
@@ -2800,14 +2850,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                               NULL, &tmpdst_len);
                   if (tmpdst == NULL)
                     {
-                      int saved_errno = errno;
                       free (tmpsrc);
                       if (!(result == resultbuf || result == NULL))
                         free (result);
                       if (buf_malloced != NULL)
                         free (buf_malloced);
                       CLEANUP ();
-                      errno = saved_errno;
                       return NULL;
                     }
                   free (tmpsrc);
@@ -2855,11 +2903,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
                           if (*arg == 0)
                             abort ();
-#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
-                          count = wcrtomb (cbuf, *arg, &state);
-#   else
-                          count = wctomb (cbuf, *arg);
-#   endif
+                          count = local_wcrtomb (cbuf, *arg, &state);
                           if (count <= 0)
                             /* Inconsistency.  */
                             abort ();
@@ -2884,11 +2928,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
                           if (*arg == 0)
                             abort ();
-#   if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
-                          count = wcrtomb (cbuf, *arg, &state);
-#   else
-                          count = wctomb (cbuf, *arg);
-#   endif
+                          count = local_wcrtomb (cbuf, *arg, &state);
                           if (count <= 0)
                             {
                               /* Cannot convert.  */
@@ -2907,7 +2947,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                         }
                     }
 #  else
-                  ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+                  ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
+                                          { free (tmpdst); goto out_of_memory; });
                   DCHAR_CPY (result + length, tmpdst, tmpdst_len);
                   free (tmpdst);
                   length += tmpdst_len;
@@ -2924,6 +2965,209 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 # endif
               }
 #endif
+#if ENABLE_WCHAR_FALLBACK && HAVE_WINT_T && !WIDE_CHAR_VERSION
+            else if (dp->conversion == 'c'
+                     && a.arg[dp->arg_index].type == TYPE_WIDE_CHAR)
+              {
+                /* Implement the 'lc' directive ourselves, in order to provide
+                   the fallback that avoids EILSEQ.  */
+                int flags = dp->flags;
+                int has_width;
+                size_t width;
+
+                has_width = 0;
+                width = 0;
+                if (dp->width_start != dp->width_end)
+                  {
+                    if (dp->width_arg_index != ARG_NONE)
+                      {
+                        int arg;
+
+                        if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+                          abort ();
+                        arg = a.arg[dp->width_arg_index].a.a_int;
+                        width = arg;
+                        if (arg < 0)
+                          {
+                            /* "A negative field width is taken as a '-' flag
+                                followed by a positive field width."  */
+                            flags |= FLAG_LEFT;
+                            width = -width;
+                          }
+                      }
+                    else
+                      {
+                        const FCHAR_T *digitp = dp->width_start;
+
+                        do
+                          width = xsum (xtimes (width, 10), *digitp++ - '0');
+                        while (digitp != dp->width_end);
+                      }
+                    has_width = 1;
+                  }
+
+                /* %lc in vasnprintf.  See the specification of fprintf.  */
+                {
+                  wchar_t arg = (wchar_t) a.arg[dp->arg_index].a.a_wide_char;
+                  size_t characters;
+# if !DCHAR_IS_TCHAR
+                  /* This code assumes that TCHAR_T is 'char'.  */
+                  verify (sizeof (TCHAR_T) == 1);
+                  TCHAR_T tmpsrc[64]; /* Assume MB_CUR_MAX <= 64.  */
+                  DCHAR_T *tmpdst;
+                  size_t tmpdst_len;
+# endif
+                  size_t w;
+
+# if DCHAR_IS_TCHAR
+                  if (has_width)
+# endif
+                    {
+                      /* Count the number of bytes.  */
+                      characters = 0;
+                      if (arg != 0)
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          mbstate_t state;
+                          memset (&state, '\0', sizeof (mbstate_t));
+# endif
+
+                          count = local_wcrtomb (cbuf, arg, &state);
+                          if (count < 0)
+                            /* Inconsistency.  */
+                            abort ();
+                          characters = count;
+                        }
+                    }
+# if DCHAR_IS_TCHAR
+                  else
+                    {
+                      /* The number of bytes doesn't matter.  */
+                      characters = 0;
+                    }
+# endif
+
+# if !DCHAR_IS_TCHAR
+                  /* Convert the string into a piece of temporary memory.  */
+                  if (characters > 0) /* implies arg != 0 */
+                    {
+                      char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                      int count;
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                      mbstate_t state;
+                      memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+
+                      count = local_wcrtomb (cbuf, arg, &state);
+                      if (count <= 0)
+                        /* Inconsistency.  */
+                        abort ();
+                      memcpy (tmpsrc, cbuf, count);
+                    }
+
+                  /* Convert from TCHAR_T[] to DCHAR_T[].  */
+                  tmpdst =
+                    DCHAR_CONV_FROM_ENCODING (locale_charset (),
+                                              iconveh_question_mark,
+                                              tmpsrc, characters,
+                                              NULL,
+                                              NULL, &tmpdst_len);
+                  if (tmpdst == NULL)
+                    {
+                      if (!(result == resultbuf || result == NULL))
+                        free (result);
+                      if (buf_malloced != NULL)
+                        free (buf_malloced);
+                      CLEANUP ();
+                      return NULL;
+                    }
+# endif
+
+                  if (has_width)
+                    {
+# if ENABLE_UNISTDIO
+                      /* Outside POSIX, it's preferable to compare the width
+                         against the number of _characters_ of the converted
+                         value.  */
+                      w = DCHAR_MBSNLEN (result + length, characters);
+# else
+                      /* The width is compared against the number of _bytes_
+                         of the converted value, says POSIX.  */
+                      w = characters;
+# endif
+                    }
+                  else
+                    /* w doesn't matter.  */
+                    w = 0;
+
+                  if (w < width && !(dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - w;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+
+# if DCHAR_IS_TCHAR
+                  if (has_width)
+                    {
+                      /* We know the number of bytes in advance.  */
+                      ENSURE_ALLOCATION (xsum (length, characters));
+                      if (characters > 0) /* implies arg != 0 */
+                        {
+                          int count;
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          mbstate_t state;
+                          memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+
+                          count = local_wcrtomb (result + length, arg, &state);
+                          if (count <= 0)
+                            /* Inconsistency.  */
+                            abort ();
+                          length += count;
+                        }
+                    }
+                  else
+                    {
+                      if (arg != 0)
+                        {
+                          char cbuf[64]; /* Assume MB_CUR_MAX <= 64.  */
+                          int count;
+#  if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+                          mbstate_t state;
+                          memset (&state, '\0', sizeof (mbstate_t));
+#  endif
+
+                          count = local_wcrtomb (cbuf, arg, &state);
+                          if (count <= 0)
+                            /* Inconsistency.  */
+                            abort ();
+                          ENSURE_ALLOCATION (xsum (length, count));
+                          memcpy (result + length, cbuf, count);
+                          length += count;
+                        }
+                    }
+# else
+                  ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
+                                          { free (tmpdst); goto out_of_memory; });
+                  DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+                  free (tmpdst);
+                  length += tmpdst_len;
+# endif
+
+                  if (w < width && (dp->flags & FLAG_LEFT))
+                    {
+                      size_t n = width - w;
+                      ENSURE_ALLOCATION (xsum (length, n));
+                      DCHAR_SET (result + length, ' ', n);
+                      length += n;
+                    }
+                }
+              }
+#endif
 #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
             else if ((dp->conversion == 'a' || dp->conversion == 'A')
 # if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
@@ -4835,17 +5079,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 
                 switch (type)
                   {
-#if HAVE_LONG_LONG_INT
                   case TYPE_LONGLONGINT:
                   case TYPE_ULONGLONGINT:
-# if defined _WIN32 && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
                     *fbp++ = 'I';
                     *fbp++ = '6';
                     *fbp++ = '4';
                     break;
-# else
+#else
                     *fbp++ = 'l';
-# endif
 #endif
                     FALLTHROUGH;
                   case TYPE_LONGINT:
@@ -4871,30 +5113,32 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
 #endif
                   *fbp = dp->conversion;
 #if USE_SNPRINTF
-# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))        \
-         && !defined __UCLIBC__)                                            \
-        || (defined __APPLE__ && defined __MACH__)                          \
-        || (defined _WIN32 && ! defined __CYGWIN__))
-                fbp[1] = '%';
-                fbp[2] = 'n';
-                fbp[3] = '\0';
-# else
-                /* On glibc2 systems from glibc >= 2.3 - probably also older
-                   ones - we know that snprintf's return value conforms to
-                   ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
-                   gl_SNPRINTF_TRUNCATION_C99 pass.
-                   Therefore we can avoid using %n in this situation.
-                   On glibc2 systems from 2004-10-18 or newer, the use of %n
-                   in format strings in writable memory may crash the program
-                   (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
-                   in this situation.  */
-                /* On Mac OS X 10.3 or newer, we know that snprintf's return
-                   value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99
-                   and gl_SNPRINTF_TRUNCATION_C99 pass.
-                   Therefore we can avoid using %n in this situation.
-                   On Mac OS X 10.13 or newer, the use of %n in format strings
-                   in writable memory by default crashes the program, so we
-                   should avoid it in this situation.  */
+# if ((HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99)            \
+      || ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))       \
+          && !defined __UCLIBC__)                                           \
+      || (defined __APPLE__ && defined __MACH__)                            \
+      || defined __ANDROID__                                                \
+      || (defined _WIN32 && ! defined __CYGWIN__))
+                /* On systems where we know that snprintf's return value
+                   conforms to ISO C 99 (HAVE_SNPRINTF_RETVAL_C99) and that
+                   snprintf always produces NUL-terminated strings
+                   (HAVE_SNPRINTF_TRUNCATION_C99), it is possible to avoid
+                   using %n.  And it is desirable to do so, because more and
+                   more platforms no longer support %n, for "security reasons".
+                   In particular, the following platforms:
+                     - On glibc2 systems from 2004-10-18 or newer, the use of
+                       %n in format strings in writable memory may crash the
+                       program (if compiled with _FORTIFY_SOURCE=2).
+                     - On Mac OS X 10.13 or newer, the use of %n in format
+                       strings in writable memory by default crashes the
+                       program.
+                     - On Android, starting on 2018-03-07, the use of %n in
+                       format strings produces a fatal error (see
+                       <https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>).
+                   On these platforms, HAVE_SNPRINTF_RETVAL_C99 and
+                   HAVE_SNPRINTF_TRUNCATION_C99 are 1. We have listed them
+                   explicitly in the condition above, in case of cross-
+                   compilation (just to be sure).  */
                 /* On native Windows systems (such as mingw), we can avoid using
                    %n because:
                      - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
@@ -4908,9 +5152,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                    Windows Vista, the use of %n in format strings by default
                    crashes the program. See
                      <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
-                     <https://msdn.microsoft.com/en-us/library/ms175782.aspx>
+                     <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
                    So we should avoid %n in this situation.  */
                 fbp[1] = '\0';
+# else           /* AIX <= 5.1, HP-UX, IRIX, OSF/1, Solaris <= 9, BeOS */
+                fbp[1] = '%';
+                fbp[2] = 'n';
+                fbp[3] = '\0';
 # endif
 #else
                 fbp[1] = '\0';
@@ -5054,7 +5302,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           SNPRINTF_BUF (arg);
                         }
                         break;
-#if HAVE_LONG_LONG_INT
                       case TYPE_LONGLONGINT:
                         {
                           long long int arg = a.arg[dp->arg_index].a.a_longlongint;
@@ -5067,7 +5314,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           SNPRINTF_BUF (arg);
                         }
                         break;
-#endif
                       case TYPE_DOUBLE:
                         {
                           double arg = a.arg[dp->arg_index].a.a_double;
@@ -5199,15 +5445,14 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                     /* Attempt to handle failure.  */
                     if (count < 0)
                       {
-                        /* SNPRINTF or sprintf failed.  Save and use the errno
-                           that it has set, if any.  */
-                        int saved_errno = errno;
-                        if (saved_errno == 0)
+                        /* SNPRINTF or sprintf failed.  Use the errno that it
+                           has set, if any.  */
+                        if (errno == 0)
                           {
                             if (dp->conversion == 'c' || dp->conversion == 's')
-                              saved_errno = EILSEQ;
+                              errno = EILSEQ;
                             else
-                              saved_errno = EINVAL;
+                              errno = EINVAL;
                           }
 
                         if (!(result == resultbuf || result == NULL))
@@ -5216,7 +5461,6 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                           free (buf_malloced);
                         CLEANUP ();
 
-                        errno = saved_errno;
                         return NULL;
                       }
 
@@ -5352,16 +5596,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                                                     NULL, &tmpdst_len);
                         if (tmpdst == NULL)
                           {
-                            int saved_errno = errno;
                             if (!(result == resultbuf || result == NULL))
                               free (result);
                             if (buf_malloced != NULL)
                               free (buf_malloced);
                             CLEANUP ();
-                            errno = saved_errno;
                             return NULL;
                           }
-                        ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+                        ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
+                                                { free (tmpdst); goto out_of_memory; });
                         DCHAR_CPY (result + length, tmpdst, tmpdst_len);
                         free (tmpdst);
                         count = tmpdst_len;
index 3eaaa7e..9b02cdf 100644 (file)
@@ -1,18 +1,18 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002-2004, 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _VASNPRINTF_H
 #define _VASNPRINTF_H
 /* Get size_t.  */
 #include <stddef.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.  */
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -67,10 +58,12 @@ extern "C" {
 # define asnprintf rpl_asnprintf
 # define vasnprintf rpl_vasnprintf
 #endif
-extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
-       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4));
-extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
-       _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0));
+extern char * asnprintf (char *restrict resultbuf, size_t *lengthp,
+                         const char *format, ...)
+       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4));
+extern char * vasnprintf (char *restrict resultbuf, size_t *lengthp,
+                          const char *format, va_list args)
+       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 0));
 
 #ifdef __cplusplus
 }
index aacb306..fe8b14f 100644 (file)
@@ -1,18 +1,18 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
index 3b57dde..a8ca59b 100644 (file)
@@ -1,18 +1,18 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering.  */
 #define _GL_VERIFY_H
 
 
-/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11.
-   This is supported by GCC 4.6.0 and later, in C mode, and its use
-   here generates easier-to-read diagnostics when verify (R) fails.
+/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert (R, DIAGNOSTIC)
+   works as per C11.  This is supported by GCC 4.6.0+ and by clang 4+.
 
-   Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
-   This will likely be supported by future GCC versions, in C++ mode.
+   Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
+   per C2x.  This is supported by GCC 9.1+.
 
-   Use this only with GCC.  If we were willing to slow 'configure'
-   down we could also use it with other compilers, but since this
-   affects only the quality of diagnostics, why bother?  */
-#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \
-     && (201112L <= __STDC_VERSION__  || !defined __STRICT_ANSI__) \
-     && !defined __cplusplus)
-# define _GL_HAVE__STATIC_ASSERT 1
-#endif
-/* The condition (99 < __GNUC__) is temporary, until we know about the
-   first G++ release that supports static_assert.  */
-#if (99 < __GNUC__) && defined __cplusplus
-# define _GL_HAVE_STATIC_ASSERT 1
+   Support compilers claiming conformance to the relevant standard,
+   and also support GCC when not pedantic.  If we were willing to slow
+   'configure' down we could also use it with other compilers, but
+   since this affects only the quality of diagnostics, why bother?  */
+#ifndef __cplusplus
+# if (201112L <= __STDC_VERSION__ \
+      || (!defined __STRICT_ANSI__ \
+          && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__)))
+#  define _GL_HAVE__STATIC_ASSERT 1
+# endif
+# if (202000L <= __STDC_VERSION__ \
+      || (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
+#  define _GL_HAVE__STATIC_ASSERT1 1
+# endif
 #endif
 
 /* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
    system headers, defines a conflicting _Static_assert that is no
    better than ours; override it.  */
-#ifndef _GL_HAVE_STATIC_ASSERT
+#ifndef _GL_HAVE__STATIC_ASSERT
 # include <stddef.h>
 # undef _Static_assert
 #endif
      which do not support _Static_assert, also do not warn about the
      last declaration mentioned above.
 
-   * GCC warns if -Wnested-externs is enabled and verify() is used
+   * GCC warns if -Wnested-externs is enabled and 'verify' is used
      within a function body; but inside a function, you can always
-     arrange to use verify_expr() instead.
+     arrange to use verify_expr instead.
 
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
@@ -197,48 +198,63 @@ template <int w>
 #endif
 
 /* Verify requirement R at compile-time, as a declaration without a
-   trailing ';'.  If R is false, fail at compile-time, preferably
-   with a diagnostic that includes the string-literal DIAGNOSTIC.
+   trailing ';'.  If R is false, fail at compile-time.
+
+   This macro requires three or more arguments but uses at most the first
+   two, so that the _Static_assert macro optionally defined below supports
+   both the C11 two-argument syntax and the C2x one-argument syntax.
 
    Unfortunately, unlike C11, this implementation must appear as an
    ordinary declaration, and cannot appear inside struct { ... }.  */
 
-#ifdef _GL_HAVE__STATIC_ASSERT
-# define _GL_VERIFY _Static_assert
+#if 200410 <= __cpp_static_assert
+# define _GL_VERIFY(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC)
+#elif defined _GL_HAVE__STATIC_ASSERT
+# define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
 #else
-# define _GL_VERIFY(R, DIAGNOSTIC)                                    \
+# define _GL_VERIFY(R, DIAGNOSTIC, ...)                                \
     extern int (*_GL_GENSYM (_gl_verify_function) (void))             \
       [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
 #endif
 
 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h.  */
 #ifdef _GL_STATIC_ASSERT_H
-# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert
-#  define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC)
+# if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
+#  define _Static_assert(...) \
+     _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
 # endif
-# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert
+# if __cpp_static_assert < 201411 && !defined static_assert
 #  define static_assert _Static_assert /* C11 requires this #define.  */
 # endif
 #endif
 
 /* @assert.h omit start@  */
 
+#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
+# define _GL_HAS_BUILTIN_TRAP 1
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_TRAP __has_builtin (__builtin_trap)
+#else
+# define _GL_HAS_BUILTIN_TRAP 0
+#endif
+
+#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+# define _GL_HAS_BUILTIN_UNREACHABLE 1
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+#else
+# define _GL_HAS_BUILTIN_UNREACHABLE 0
+#endif
+
 /* Each of these macros verifies that its argument R is nonzero.  To
    be portable, R should be an integer constant expression.  Unlike
    assert (R), there is no run-time overhead.
 
    There are two macros, since no single macro can be used in all
-   contexts in C.  verify_true (R) is for scalar contexts, including
+   contexts in C.  verify_expr (R, E) is for scalar contexts, including
    integer constant expression contexts.  verify (R) is for declaration
    contexts, e.g., the top level.  */
 
-/* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  This is equivalent to verify_expr (R, 1).
-
-   verify_true is obsolescent; please use verify_expr instead.  */
-
-#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
-
 /* Verify requirement R at compile-time.  Return the value of the
    expression E.  */
 
@@ -246,31 +262,45 @@ template <int w>
    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
 
 /* Verify requirement R at compile-time, as a declaration without a
-   trailing ';'.  */
+   trailing ';'.  verify (R) acts like static_assert (R) except that
+   it is portable to C11/C++14 and earlier, it can issue better
+   diagnostics, and its name is shorter and may be more convenient.  */
 
-#ifdef __GNUC__
-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+#ifdef __PGI
+/* PGI barfs if R is long.  */
+# define verify(R) _GL_VERIFY (R, "verify (...)", -)
 #else
-/* PGI barfs if R is long.  Play it safe.  */
-# define verify(R) _GL_VERIFY (R, "verify (...)")
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")", -)
 #endif
 
-#ifndef __has_builtin
-# define __has_builtin(x) 0
-#endif
+/* Assume that R always holds.  Behavior is undefined if R is false,
+   fails to evaluate, or has side effects.
+
+   'assume (R)' is a directive from the programmer telling the
+   compiler that R is true so the compiler needn't generate code to
+   test R.  This is why 'assume' is in verify.h: it's related to
+   static checking (in this case, static checking done by the
+   programmer), not dynamic checking.
+
+   'assume (R)' can affect compilation of all the code, not just code
+   that happens to be executed after the assume (R) is "executed".
+   For example, if the code mistakenly does 'assert (R); assume (R);'
+   the compiler is entitled to optimize away the 'assert (R)'.
+
+   Although assuming R can help a compiler generate better code or
+   diagnostics, performance can suffer if R uses hard-to-optimize
+   features such as function calls not inlined by the compiler.
 
-/* Assume that R always holds.  This lets the compiler optimize
-   accordingly.  R should not have side-effects; it may or may not be
-   evaluated.  Behavior is undefined if R is false.  */
+   Avoid Clang's __builtin_assume, as it breaks GNU Emacs master
+   as of 2020-08-23T21:09:49Z!eggert@cs.ucla.edu; see
+   <https://bugs.gnu.org/43152#71>.  It's not known whether this breakage
+   is a Clang bug or an Emacs bug; play it safe for now.  */
 
-#if (__has_builtin (__builtin_unreachable) \
-     || 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
+#if _GL_HAS_BUILTIN_UNREACHABLE
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
 #elif 1200 <= _MSC_VER
 # define assume(R) __assume (R)
-#elif ((defined GCC_LINT || defined lint) \
-       && (__has_builtin (__builtin_trap) \
-           || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
+#elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP
   /* Doing it this way helps various packages when configured with
      --enable-gcc-warnings, which compiles with -Dlint.  It's nicer
      when 'assume' silences warnings even with older GCCs.  */
index 098a634..e27ab14 100644 (file)
@@ -1,17 +1,17 @@
 /* Variable with FSF copyright information, for version-etc.
-   Copyright (C) 1999-2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2006, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering. */
index dfec8ad..ce4ef45 100644 (file)
@@ -1,17 +1,17 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering. */
@@ -37,7 +37,7 @@
 # define PACKAGE PACKAGE_TARNAME
 #endif
 
-enum { COPYRIGHT_YEAR = 2018 };
+enum { COPYRIGHT_YEAR = 2021 };
 
 /* The three functions below display the --version information the
    standard way.
@@ -82,14 +82,17 @@ version_etc_arn (FILE *stream,
      locale.  Otherwise, do not translate "(C)"; leave it as-is.  */
   fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
 
-  fputs (_("\
-\n\
-License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\n\
+  fputs ("\n", stream);
+
+  /* TRANSLATORS: The %s placeholder is the web address of the GPL license.  */
+  fprintf (stream, _("\
+License GPLv3+: GNU GPL version 3 or later <%s>.\n\
 This is free software: you are free to change and redistribute it.\n\
 There is NO WARRANTY, to the extent permitted by law.\n\
-\n\
 "),
-         stream);
+           "https://gnu.org/licenses/gpl.html");
+
+  fputs ("\n", stream);
 
   switch (n_authors)
     {
@@ -238,11 +241,12 @@ version_etc (FILE *stream,
 void
 emit_bug_reporting_address (void)
 {
+  fputs ("\n", stdout);
   /* TRANSLATORS: The placeholder indicates the bug-reporting address
      for this package.  Please add _another line_ saying
      "Report translation bugs to <...>\n" with the address for translation
      bugs (typically your translation team's web or email address).  */
-  printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
+  printf (_("Report bugs to: %s\n"), PACKAGE_BUGREPORT);
 #ifdef PACKAGE_PACKAGER_BUG_REPORTS
   printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
           PACKAGE_PACKAGER_BUG_REPORTS);
@@ -250,9 +254,9 @@ emit_bug_reporting_address (void)
 #ifdef PACKAGE_URL
   printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
 #else
-  printf (_("%s home page: <https://www.gnu.org/software/%s/>\n"),
-          PACKAGE_NAME, PACKAGE);
+  printf (_("%s home page: <%s>\n"),
+          PACKAGE_NAME, "https://www.gnu.org/software/" PACKAGE "/");
 #endif
-  fputs (_("General help using GNU software: <https://www.gnu.org/gethelp/>\n"),
-         stdout);
+  printf (_("General help using GNU software: <%s>\n"),
+          "https://www.gnu.org/gethelp/");
 }
index 3b06bf9..3f04732 100644 (file)
@@ -1,17 +1,17 @@
 /* Print --version and bug-reporting information in a consistent format.
-   Copyright (C) 1999, 2003, 2005, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2003, 2005, 2009-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 3 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Jim Meyering. */
 # include <stdarg.h>
 # include <stdio.h>
 
-/* The 'sentinel' attribute was added in gcc 4.0.  */
-#ifndef _GL_ATTRIBUTE_SENTINEL
-# if 4 <= __GNUC__
-#  define _GL_ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
-# else
-#  define _GL_ATTRIBUTE_SENTINEL /* empty */
-# endif
-#endif
-
 extern const char version_etc_copyright[];
 
 /* The three functions below display the --version information in the
@@ -70,7 +61,7 @@ extern void version_etc (FILE *stream,
                          const char *command_name, const char *package,
                          const char *version,
                          /* const char *author1, ..., NULL */ ...)
-  _GL_ATTRIBUTE_SENTINEL;
+  _GL_ATTRIBUTE_SENTINEL ((0));
 
 /* Display the usual "Report bugs to" stanza.  */
 extern void emit_bug_reporting_address (void);
index 72d67cc..612937a 100644 (file)
@@ -1,17 +1,17 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published
-   by the Free Software Foundation; either version 3 of the License, or
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
   __attribute__ ((__warning__ (message)))
+# elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
+#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
+  __attribute__ ((__diagnose_if__ (1, message, "warning")))
 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
 #  define _GL_WARN_ON_USE(function, message) \
@@ -99,24 +106,35 @@ _GL_WARN_EXTERN_C int _gl_warn_on_use
 # endif
 #endif
 
-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
-   is like _GL_WARN_ON_USE (function, "string"), except that the function is
-   declared with the given prototype, consisting of return type, parameters,
-   and attributes.
+/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
+   is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
+   function is declared with the given prototype, consisting of return type,
+   parameters, and attributes.
    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
    not work in this case.  */
 #ifndef _GL_WARN_ON_USE_CXX
-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes \
-     __attribute__ ((__warning__ (msg)))
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# if !defined __cplusplus
+#  define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+     _GL_WARN_ON_USE (function, msg)
+# else
+#  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes \
+  __attribute__ ((__warning__ (msg)))
+#  elif __clang_major__ >= 4
+/* Another compiler attribute is available in clang.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_clang function parameters_and_attributes \
+  __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+#  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
 /* Verify the existence of the function.  */
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
-extern rettype function parameters_and_attributes
-# else /* Unsupported.  */
-#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
+extern rettype_gcc function parameters_and_attributes
+#  else /* Unsupported.  */
+#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
 _GL_WARN_EXTERN_C int _gl_warn_on_use
+#  endif
 # endif
 #endif
 
index 51a5dda..919a5a3 100644 (file)
@@ -1,25 +1,25 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+   Copyright (C) 2007-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Eric Blake.  */
 
 /*
  * ISO C 99 <wchar.h> for platforms that have issues.
- * <http://www.opengroup.org/susv3xbd/wchar.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html>
  *
  * For now, this just ensures proper prerequisite inclusion order and
  * the declaration of wcwidth().
@@ -33,7 +33,8 @@
 #if (((defined __need_mbstate_t || defined __need_wint_t)               \
       && !defined __MINGW32__)                                          \
      || (defined __hpux                                                 \
-         && ((defined _INTTYPES_INCLUDED && !defined strtoimax)         \
+         && ((defined _INTTYPES_INCLUDED                                \
+              && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H)     \
              || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
      || (defined __MINGW32__ && defined __STRING_H_SOURCED__)           \
      || defined _GL_ALREADY_INCLUDING_WCHAR_H)
 # include <features.h> /* for __GLIBC__ */
 #endif
 
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.
-   In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
+/* In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
    by <stddef.h>.
    But avoid namespace pollution on glibc systems.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
 # include <stddef.h>
 #endif
-#ifndef __GLIBC__
-# include <stdio.h>
-# include <time.h>
-#endif
 
 /* Include the original <wchar.h> if it exists.
    Some builds of uClibc lack it.  */
 
 /* The __attribute__ feature is available in gcc versions 2.5 and later.
    The attribute __pure__ was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE /* empty */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
+#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+#  define _GL_ATTRIBUTE_PURE /* empty */
+# endif
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 /* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
    <stddef.h>.  This is too small: ISO C 99 section 7.24.1.(2) says that
    wint_t must be "unchanged by default argument promotions".  Override it.  */
-# if @GNULIB_OVERRIDES_WINT_T@
+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
 #  if !GNULIB_defined_wint_t
 #   if @HAVE_CRTDEFS_H@
 #    include <crtdefs.h>
@@ -137,12 +132,16 @@ typedef unsigned int rpl_wint_t;
 
 /* Override mbstate_t if it is too small.
    On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
-   implementing mbrtowc for encodings like UTF-8.  */
-#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+   implementing mbrtowc for encodings like UTF-8.
+   On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is
+   large enough and overriding it would cause problems in C++ mode.  */
+#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
 # if !GNULIB_defined_mbstate_t
+#  if !(defined _AIX || defined _MSC_VER)
 typedef int rpl_mbstate_t;
-#  undef mbstate_t
-#  define mbstate_t rpl_mbstate_t
+#   undef mbstate_t
+#   define mbstate_t rpl_mbstate_t
+#  endif
 #  define GNULIB_defined_mbstate_t 1
 # endif
 #endif
@@ -161,9 +160,12 @@ _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
 #  if !@HAVE_BTOWC@
 _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
 #  endif
-_GL_CXXALIAS_SYS (btowc, wint_t, (int c));
+/* Need to cast, because on mingw, the return type is 'unsigned short'.  */
+_GL_CXXALIAS_SYS_CAST (btowc, wint_t, (int c));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (btowc);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef btowc
 # if HAVE_RAW_DECL_BTOWC
@@ -189,7 +191,9 @@ _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wctob);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wctob
 # if HAVE_RAW_DECL_WCTOB
@@ -214,7 +218,9 @@ _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
 #  endif
 _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbsinit);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mbsinit
 # if HAVE_RAW_DECL_MBSINIT
@@ -232,18 +238,24 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
 #   define mbrtowc rpl_mbrtowc
 #  endif
 _GL_FUNCDECL_RPL (mbrtowc, size_t,
-                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
+                   mbstate_t *restrict ps));
 _GL_CXXALIAS_RPL (mbrtowc, size_t,
-                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
+                   mbstate_t *restrict ps));
 # else
 #  if !@HAVE_MBRTOWC@
 _GL_FUNCDECL_SYS (mbrtowc, size_t,
-                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
+                   mbstate_t *restrict ps));
 #  endif
 _GL_CXXALIAS_SYS (mbrtowc, size_t,
-                  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
+                  (wchar_t *restrict pwc, const char *restrict s, size_t n,
+                   mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbrtowc);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mbrtowc
 # if HAVE_RAW_DECL_MBRTOWC
@@ -260,15 +272,21 @@ _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
 #   undef mbrlen
 #   define mbrlen rpl_mbrlen
 #  endif
-_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
-_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+_GL_FUNCDECL_RPL (mbrlen, size_t,
+                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
+_GL_CXXALIAS_RPL (mbrlen, size_t,
+                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
 # else
 #  if !@HAVE_MBRLEN@
-_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+_GL_FUNCDECL_SYS (mbrlen, size_t,
+                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
 #  endif
-_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
+_GL_CXXALIAS_SYS (mbrlen, size_t,
+                  (const char *restrict s, size_t n, mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbrlen);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mbrlen
 # if HAVE_RAW_DECL_MBRLEN
@@ -286,22 +304,30 @@ _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
 #   define mbsrtowcs rpl_mbsrtowcs
 #  endif
 _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (mbsrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t len,
-                   mbstate_t *ps));
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t len,
+                   mbstate_t *restrict ps));
 # else
 #  if !@HAVE_MBSRTOWCS@
 _GL_FUNCDECL_SYS (mbsrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t len,
-                   mbstate_t *ps));
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t len,
+                   mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (mbsrtowcs);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef mbsrtowcs
 # if HAVE_RAW_DECL_MBSRTOWCS
@@ -319,22 +345,26 @@ _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
 #   define mbsnrtowcs rpl_mbsnrtowcs
 #  endif
 _GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps)
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t srclen, size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps));
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t srclen, size_t len,
+                   mbstate_t *restrict ps));
 # else
 #  if !@HAVE_MBSNRTOWCS@
 _GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps)
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t srclen, size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
-                  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps));
+                  (wchar_t *restrict dest,
+                   const char **restrict srcp, size_t srclen, size_t len,
+                   mbstate_t *restrict ps));
 # endif
 _GL_CXXALIASWARN (mbsnrtowcs);
 #elif defined GNULIB_POSIXCHECK
@@ -353,15 +383,21 @@ _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
 #   undef wcrtomb
 #   define wcrtomb rpl_wcrtomb
 #  endif
-_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
-_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+_GL_FUNCDECL_RPL (wcrtomb, size_t,
+                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
+_GL_CXXALIAS_RPL (wcrtomb, size_t,
+                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
 # else
 #  if !@HAVE_WCRTOMB@
-_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+_GL_FUNCDECL_SYS (wcrtomb, size_t,
+                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
 #  endif
-_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
+_GL_CXXALIAS_SYS (wcrtomb, size_t,
+                  (char *restrict s, wchar_t wc, mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcrtomb);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcrtomb
 # if HAVE_RAW_DECL_WCRTOMB
@@ -379,22 +415,30 @@ _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
 #   define wcsrtombs rpl_wcsrtombs
 #  endif
 _GL_FUNCDECL_RPL (wcsrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+                  (char *restrict dest, const wchar_t **restrict srcp,
+                   size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (wcsrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t len,
-                   mbstate_t *ps));
+                  (char *restrict dest, const wchar_t **restrict srcp,
+                   size_t len,
+                   mbstate_t *restrict ps));
 # else
 #  if !@HAVE_WCSRTOMBS@
 _GL_FUNCDECL_SYS (wcsrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+                  (char *restrict dest, const wchar_t **restrict srcp,
+                   size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (wcsrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t len,
-                   mbstate_t *ps));
+                  (char *restrict dest, const wchar_t **restrict srcp,
+                   size_t len,
+                   mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsrtombs);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsrtombs
 # if HAVE_RAW_DECL_WCSRTOMBS
@@ -412,24 +456,34 @@ _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
 #   define wcsnrtombs rpl_wcsnrtombs
 #  endif
 _GL_FUNCDECL_RPL (wcsnrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps)
+                  (char *restrict dest,
+                   const wchar_t **restrict srcp, size_t srclen,
+                   size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps));
+                  (char *restrict dest,
+                   const wchar_t **restrict srcp, size_t srclen,
+                   size_t len,
+                   mbstate_t *restrict ps));
 # else
-#  if !@HAVE_WCSNRTOMBS@
+#  if !@HAVE_WCSNRTOMBS@ || (defined __cplusplus && defined __sun)
 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps)
+                  (char *restrict dest,
+                   const wchar_t **restrict srcp, size_t srclen,
+                   size_t len,
+                   mbstate_t *restrict ps)
                   _GL_ARG_NONNULL ((2)));
 #  endif
 _GL_CXXALIAS_SYS (wcsnrtombs, size_t,
-                  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
-                   mbstate_t *ps));
+                  (char *restrict dest,
+                   const wchar_t **restrict srcp, size_t srclen,
+                   size_t len,
+                   mbstate_t *restrict ps));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsnrtombs);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsnrtombs
 # if HAVE_RAW_DECL_WCSNRTOMBS
@@ -455,7 +509,9 @@ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcwidth);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcwidth
 # if HAVE_RAW_DECL_WCWIDTH
@@ -484,7 +540,7 @@ _GL_CXXALIAS_SYS_CAST2 (wmemchr,
 _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
 _GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
                    (const wchar_t *s, wchar_t c, size_t n));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -505,7 +561,9 @@ _GL_FUNCDECL_SYS (wmemcmp, int,
 # endif
 _GL_CXXALIAS_SYS (wmemcmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemcmp);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wmemcmp
 # if HAVE_RAW_DECL_WMEMCMP
@@ -519,11 +577,15 @@ _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
 #if @GNULIB_WMEMCPY@
 # if !@HAVE_WMEMCPY@
 _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
 # endif
 _GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemcpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wmemcpy
 # if HAVE_RAW_DECL_WMEMCPY
@@ -542,7 +604,9 @@ _GL_FUNCDECL_SYS (wmemmove, wchar_t *,
 # endif
 _GL_CXXALIAS_SYS (wmemmove, wchar_t *,
                   (wchar_t *dest, const wchar_t *src, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemmove);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wmemmove
 # if HAVE_RAW_DECL_WMEMMOVE
@@ -552,13 +616,38 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
 #endif
 
 
+/* Copy N wide characters of SRC to DEST.
+   Return pointer to wide characters after the last written wide character.  */
+#if @GNULIB_WMEMPCPY@
+# if !@HAVE_WMEMPCPY@
+_GL_FUNCDECL_SYS (wmempcpy, wchar_t *,
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+# endif
+_GL_CXXALIAS_SYS (wmempcpy, wchar_t *,
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (wmempcpy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wmempcpy
+# if HAVE_RAW_DECL_WMEMPCPY
+_GL_WARN_ON_USE (wmempcpy, "wmempcpy is unportable - "
+                 "use gnulib module wmempcpy for portability");
+# endif
+#endif
+
+
 /* Set N wide characters of S to C.  */
 #if @GNULIB_WMEMSET@
 # if !@HAVE_WMEMSET@
 _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
 # endif
 _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wmemset);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wmemset
 # if HAVE_RAW_DECL_WMEMSET
@@ -574,7 +663,9 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
 _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcslen);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcslen
 # if HAVE_RAW_DECL_WCSLEN
@@ -604,10 +695,14 @@ _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
 /* Copy SRC to DEST.  */
 #if @GNULIB_WCSCPY@
 # if !@HAVE_WCSCPY@
-_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_FUNCDECL_SYS (wcscpy, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
 # endif
-_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIAS_SYS (wcscpy, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcscpy
 # if HAVE_RAW_DECL_WCSCPY
@@ -620,9 +715,11 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
 #if @GNULIB_WCPCPY@
 # if !@HAVE_WCPCPY@
-_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_FUNCDECL_SYS (wcpcpy, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
 # endif
-_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIAS_SYS (wcpcpy, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
 _GL_CXXALIASWARN (wcpcpy);
 #elif defined GNULIB_POSIXCHECK
 # undef wcpcpy
@@ -637,11 +734,15 @@ _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
 #if @GNULIB_WCSNCPY@
 # if !@HAVE_WCSNCPY@
 _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
 # endif
 _GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsncpy);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsncpy
 # if HAVE_RAW_DECL_WCSNCPY
@@ -656,10 +757,12 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
 #if @GNULIB_WCPNCPY@
 # if !@HAVE_WCPNCPY@
 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
 # endif
 _GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest,
+                   const wchar_t *restrict src, size_t n));
 _GL_CXXALIASWARN (wcpncpy);
 #elif defined GNULIB_POSIXCHECK
 # undef wcpncpy
@@ -673,10 +776,14 @@ _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
 /* Append SRC onto DEST.  */
 #if @GNULIB_WCSCAT@
 # if !@HAVE_WCSCAT@
-_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_FUNCDECL_SYS (wcscat, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
 # endif
-_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
+_GL_CXXALIAS_SYS (wcscat, wchar_t *,
+                  (wchar_t *restrict dest, const wchar_t *restrict src));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcscat
 # if HAVE_RAW_DECL_WCSCAT
@@ -690,11 +797,15 @@ _GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
 #if @GNULIB_WCSNCAT@
 # if !@HAVE_WCSNCAT@
 _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest, const wchar_t *restrict src,
+                   size_t n));
 # endif
 _GL_CXXALIAS_SYS (wcsncat, wchar_t *,
-                  (wchar_t *dest, const wchar_t *src, size_t n));
+                  (wchar_t *restrict dest, const wchar_t *restrict src,
+                   size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsncat);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsncat
 # if HAVE_RAW_DECL_WCSNCAT
@@ -711,7 +822,9 @@ _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
                                _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscmp);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcscmp
 # if HAVE_RAW_DECL_WCSCMP
@@ -730,7 +843,9 @@ _GL_FUNCDECL_SYS (wcsncmp, int,
 # endif
 _GL_CXXALIAS_SYS (wcsncmp, int,
                   (const wchar_t *s1, const wchar_t *s2, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsncmp);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsncmp
 # if HAVE_RAW_DECL_WCSNCMP
@@ -783,7 +898,9 @@ _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
 _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
 # endif
 _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscoll);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcscoll
 # if HAVE_RAW_DECL_WCSCOLL
@@ -798,10 +915,14 @@ _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
    original strings.  */
 #if @GNULIB_WCSXFRM@
 # if !@HAVE_WCSXFRM@
-_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_FUNCDECL_SYS (wcsxfrm, size_t,
+                  (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
 # endif
-_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
+_GL_CXXALIAS_SYS (wcsxfrm, size_t,
+                  (wchar_t *restrict s1, const wchar_t *restrict s2, size_t n));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsxfrm);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsxfrm
 # if HAVE_RAW_DECL_WCSXFRM
@@ -813,10 +934,18 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
 
 /* Duplicate S, returning an identical malloc'd string.  */
 #if @GNULIB_WCSDUP@
-# if !@HAVE_WCSDUP@
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsdup
+#   define wcsdup _wcsdup
+#  endif
+_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
+# else
+#  if !@HAVE_WCSDUP@
 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+# endif
 _GL_CXXALIASWARN (wcsdup);
 #elif defined GNULIB_POSIXCHECK
 # undef wcsdup
@@ -824,6 +953,25 @@ _GL_CXXALIASWARN (wcsdup);
 _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
                  "use gnulib module wcsdup for portability");
 # endif
+#elif @GNULIB_MDA_WCSDUP@
+/* On native Windows, map 'wcsdup' to '_wcsdup', so that -loldnames is not
+   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
+   platforms by defining GNULIB_NAMESPACE::wcsdup always.  */
+# if defined _WIN32 && !defined __CYGWIN__
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcsdup
+#   define wcsdup _wcsdup
+#  endif
+_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
+# else
+_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+#  if @HAVE_DECL_WCSDUP@
+_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
+#  endif
+# endif
+# if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_WCSDUP@
+_GL_CXXALIASWARN (wcsdup);
+# endif
 #endif
 
 
@@ -845,7 +993,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcschr,
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
 _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcschr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -875,7 +1023,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
 _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsrchr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -895,7 +1043,9 @@ _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
                                    _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcscspn);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcscspn
 # if HAVE_RAW_DECL_WCSCSPN
@@ -913,7 +1063,9 @@ _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
                                   _GL_ATTRIBUTE_PURE);
 # endif
 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsspn);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsspn
 # if HAVE_RAW_DECL_WCSSPN
@@ -944,7 +1096,7 @@ _GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
                    (wchar_t *wcs, const wchar_t *accept));
 _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
                    (const wchar_t *wcs, const wchar_t *accept));
-# else
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcspbrk);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -960,7 +1112,8 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
 #if @GNULIB_WCSSTR@
 # if !@HAVE_WCSSTR@
 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
-                  (const wchar_t *haystack, const wchar_t *needle)
+                  (const wchar_t *restrict haystack,
+                   const wchar_t *restrict needle)
                   _GL_ATTRIBUTE_PURE);
 # endif
   /* On some systems, this function is defined as an overloaded function:
@@ -969,15 +1122,19 @@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
          wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
        }  */
 _GL_CXXALIAS_SYS_CAST2 (wcsstr,
-                        wchar_t *, (const wchar_t *, const wchar_t *),
-                        const wchar_t *, (const wchar_t *, const wchar_t *));
+                        wchar_t *,
+                        (const wchar_t *restrict, const wchar_t *restrict),
+                        const wchar_t *,
+                        (const wchar_t *restrict, const wchar_t *restrict));
 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
-                   (wchar_t *haystack, const wchar_t *needle));
+                   (wchar_t *restrict haystack,
+                    const wchar_t *restrict needle));
 _GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
-                   (const wchar_t *haystack, const wchar_t *needle));
-# else
+                   (const wchar_t *restrict haystack,
+                    const wchar_t *restrict needle));
+# elif __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsstr);
 # endif
 #elif defined GNULIB_POSIXCHECK
@@ -991,13 +1148,30 @@ _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
 
 /* Divide WCS into tokens separated by characters in DELIM.  */
 #if @GNULIB_WCSTOK@
-# if !@HAVE_WCSTOK@
+# if @REPLACE_WCSTOK@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef wcstok
+#   define wcstok rpl_wcstok
+#  endif
+_GL_FUNCDECL_RPL (wcstok, wchar_t *,
+                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
+                   wchar_t **restrict ptr));
+_GL_CXXALIAS_RPL (wcstok, wchar_t *,
+                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
+                   wchar_t **restrict ptr));
+# else
+#  if !@HAVE_WCSTOK@
 _GL_FUNCDECL_SYS (wcstok, wchar_t *,
-                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
-# endif
+                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
+                   wchar_t **restrict ptr));
+#  endif
 _GL_CXXALIAS_SYS (wcstok, wchar_t *,
-                  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
+                  (wchar_t *restrict wcs, const wchar_t *restrict delim,
+                   wchar_t **restrict ptr));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcstok);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcstok
 # if HAVE_RAW_DECL_WCSTOK
@@ -1025,7 +1199,9 @@ _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
 #  endif
 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcswidth);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcswidth
 # if HAVE_RAW_DECL_WCSWIDTH
@@ -1036,28 +1212,38 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
 
 
 /* Convert *TP to a date and time wide string.  See
-   <http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>.  */
+   <https://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>.  */
 #if @GNULIB_WCSFTIME@
 # if @REPLACE_WCSFTIME@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef wcsftime
 #   define wcsftime rpl_wcsftime
 #  endif
-_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
-                                     const wchar_t *__fmt, const struct tm *__tp)
-                                    _GL_ARG_NONNULL ((1, 3, 4)));
-_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
-                                     const wchar_t *__fmt, const struct tm *__tp));
+_GL_FUNCDECL_RPL (wcsftime, size_t,
+                  (wchar_t *restrict __buf, size_t __bufsize,
+                   const wchar_t *restrict __fmt,
+                   const struct tm *restrict __tp)
+                  _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_CXXALIAS_RPL (wcsftime, size_t,
+                  (wchar_t *restrict __buf, size_t __bufsize,
+                   const wchar_t *restrict __fmt,
+                   const struct tm *restrict __tp));
 # else
 #  if !@HAVE_WCSFTIME@
-_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
-                                     const wchar_t *__fmt, const struct tm *__tp)
-                                    _GL_ARG_NONNULL ((1, 3, 4)));
+_GL_FUNCDECL_SYS (wcsftime, size_t,
+                  (wchar_t *restrict __buf, size_t __bufsize,
+                   const wchar_t *restrict __fmt,
+                   const struct tm *restrict __tp)
+                  _GL_ARG_NONNULL ((1, 3, 4)));
 #  endif
-_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
-                                     const wchar_t *__fmt, const struct tm *__tp));
+_GL_CXXALIAS_SYS (wcsftime, size_t,
+                  (wchar_t *restrict __buf, size_t __bufsize,
+                   const wchar_t *restrict __fmt,
+                   const struct tm *restrict __tp));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wcsftime);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wcsftime
 # if HAVE_RAW_DECL_WCSFTIME
index 8f01972..5c9fd79 100644 (file)
@@ -1,18 +1,18 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
 
 size_t
 wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+#undef wcrtomb
 {
-  /* This implementation of wcrtomb on top of wctomb() supports only
-     stateless encodings.  ps must be in the initial state.  */
+  /* This implementation of wcrtomb supports only stateless encodings.
+     ps must be in the initial state.  */
   if (ps != NULL && !mbsinit (ps))
     {
       errno = EINVAL;
       return (size_t)(-1);
     }
 
+#if !HAVE_WCRTOMB                       /* IRIX 6.5 */ \
+    || WCRTOMB_RETVAL_BUG               /* Solaris 11.3, MSVC */ \
+    || WCRTOMB_C_LOCALE_BUG             /* Android */
   if (s == NULL)
     /* We know the NUL wide character corresponds to the NUL character.  */
     return 1;
   else
+#endif
     {
+#if HAVE_WCRTOMB
+# if WCRTOMB_C_LOCALE_BUG               /* Android */
+      /* Implement consistently with mbrtowc(): through a 1:1 correspondence,
+         as in ISO-8859-1.  */
+      if (wc >= 0 && wc <= 0xff)
+        {
+          *s = (unsigned char) wc;
+          return 1;
+        }
+      else
+        {
+          errno = EILSEQ;
+          return (size_t)(-1);
+        }
+# else
+      return wcrtomb (s, wc, ps);
+# endif
+#else                                   /* IRIX 6.5 */
+      /* Fallback for platforms that don't have wcrtomb().
+         Implement on top of wctomb().
+         This code is not multithread-safe.  */
       int ret = wctomb (s, wc);
 
       if (ret >= 0)
@@ -49,5 +75,6 @@ wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
           errno = EILSEQ;
           return (size_t)(-1);
         }
+#endif
     }
 }
index bb5f847..150221d 100644 (file)
@@ -1,4 +1,23 @@
+/* Inline functions for <wctype.h>.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 /* Normally this would be wctype.c, but that name's already taken.  */
+
 #include <config.h>
+
 #define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE
 #include "wctype.h"
index 3c6e5f2..652d811 100644 (file)
@@ -1,25 +1,25 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 /* Written by Bruno Haible and Paul Eggert.  */
 
 /*
  * ISO C 99 <wctype.h> for platforms that lack it.
- * <http://www.opengroup.org/susv3xbd/wctype.h.html>
+ * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html>
  *
  * iswctype, towctrans, towlower, towupper, wctrans, wctype,
  * wctrans_t, and wctype_t are not yet implemented.
 #ifndef _@GUARD_PREFIX@_WCTYPE_H
 
 #if @HAVE_WINT_T@
-/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
-   Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
 # include <wchar.h>
 #endif
 
@@ -110,7 +103,7 @@ _GL_INLINE_HEADER_BEGIN
 /* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
    <stddef.h>.  This is too small: ISO C 99 section 7.24.1.(2) says that
    wint_t must be "unchanged by default argument promotions".  Override it.  */
-# if @GNULIB_OVERRIDES_WINT_T@
+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
 #  if !GNULIB_defined_wint_t
 #   if @HAVE_CRTDEFS_H@
 #    include <crtdefs.h>
@@ -133,33 +126,116 @@ typedef unsigned int rpl_wint_t;
 
 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
    Linux libc5 has <wctype.h> and the functions but they are broken.
+   mingw and MSVC have <wctype.h> and the functions but they take a wchar_t
+   as argument, not an rpl_wint_t.
    Assume all 11 functions (all isw* except iswblank) are implemented the
    same way, or not at all.  */
 # if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
 
-/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
-   undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
-   refer to system functions like _iswctype that are not in the
-   standard C library.  Rather than try to get ancient buggy
-   implementations like this to work, just disable them.  */
-#  undef iswalnum
-#  undef iswalpha
-#  undef iswblank
-#  undef iswcntrl
-#  undef iswdigit
-#  undef iswgraph
-#  undef iswlower
-#  undef iswprint
-#  undef iswpunct
-#  undef iswspace
-#  undef iswupper
-#  undef iswxdigit
-#  undef towlower
-#  undef towupper
+#  if @GNULIBHEADERS_OVERRIDE_WINT_T@ /* implies @REPLACE_ISWCNTRL@ */
+
+_GL_WCTYPE_INLINE int
+rpl_iswalnum (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswalnum ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswalpha (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswalpha ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswblank (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswblank ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswcntrl (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswcntrl ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswdigit (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? wc >= '0' && wc <= '9' : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswgraph (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswgraph ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswlower (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswlower ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswprint (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswpunct (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswpunct ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswspace (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswspace ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswupper (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? iswupper ((wchar_t) wc) : 0);
+}
+
+_GL_WCTYPE_INLINE int
+rpl_iswxdigit (wint_t wc)
+{
+  return ((wchar_t) wc == wc
+          ? (wc >= '0' && wc <= '9')
+            || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')
+          : 0);
+}
+
+_GL_WCTYPE_INLINE wint_t
+rpl_towlower (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? (wchar_t) towlower ((wchar_t) wc) : wc);
+}
+
+_GL_WCTYPE_INLINE wint_t
+rpl_towupper (wint_t wc)
+{
+  return ((wchar_t) wc == wc ? (wchar_t) towupper ((wchar_t) wc) : wc);
+}
 
-/* Linux libc5 has <wctype.h> and the functions but they are broken.  */
-#  if @REPLACE_ISWCNTRL@
 #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef iswalnum
+#    undef iswalpha
+#    undef iswblank
+#    undef iswcntrl
+#    undef iswdigit
+#    undef iswgraph
+#    undef iswlower
+#    undef iswprint
+#    undef iswpunct
+#    undef iswspace
+#    undef iswupper
+#    undef iswxdigit
+#    undef towlower
+#    undef towupper
 #    define iswalnum rpl_iswalnum
 #    define iswalpha rpl_iswalpha
 #    define iswblank rpl_iswblank
@@ -172,21 +248,62 @@ typedef unsigned int rpl_wint_t;
 #    define iswspace rpl_iswspace
 #    define iswupper rpl_iswupper
 #    define iswxdigit rpl_iswxdigit
-#   endif
-#  endif
-#  if @REPLACE_TOWLOWER@
-#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #    define towlower rpl_towlower
 #    define towupper rpl_towupper
 #   endif
-#  endif
+
+#  else
+
+/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
+   undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
+   refer to system functions like _iswctype that are not in the
+   standard C library.  Rather than try to get ancient buggy
+   implementations like this to work, just disable them.  */
+#   undef iswalnum
+#   undef iswalpha
+#   undef iswblank
+#   undef iswcntrl
+#   undef iswdigit
+#   undef iswgraph
+#   undef iswlower
+#   undef iswprint
+#   undef iswpunct
+#   undef iswspace
+#   undef iswupper
+#   undef iswxdigit
+#   undef towlower
+#   undef towupper
+
+/* Linux libc5 has <wctype.h> and the functions but they are broken.  */
+#   if @REPLACE_ISWCNTRL@
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     define iswalnum rpl_iswalnum
+#     define iswalpha rpl_iswalpha
+#     define iswblank rpl_iswblank
+#     define iswcntrl rpl_iswcntrl
+#     define iswdigit rpl_iswdigit
+#     define iswgraph rpl_iswgraph
+#     define iswlower rpl_iswlower
+#     define iswprint rpl_iswprint
+#     define iswpunct rpl_iswpunct
+#     define iswspace rpl_iswspace
+#     define iswupper rpl_iswupper
+#     define iswxdigit rpl_iswxdigit
+#    endif
+#   endif
+#   if @REPLACE_TOWLOWER@
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     define towlower rpl_towlower
+#     define towupper rpl_towupper
+#    endif
+#   endif
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswalnum
-#  else
+#   else
 iswalnum
-#  endif
+#   endif
          (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
@@ -194,88 +311,88 @@ iswalnum
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswalpha
-#  else
+#   else
 iswalpha
-#  endif
+#   endif
          (wint_t wc)
 {
   return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswblank
-#  else
+#   else
 iswblank
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc == ' ' || wc == '\t';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswcntrl
-#  else
+#   else
 iswcntrl
-#  endif
+#   endif
         (wint_t wc)
 {
   return (wc & ~0x1f) == 0 || wc == 0x7f;
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWDIGIT@
 rpl_iswdigit
-#  else
+#   else
 iswdigit
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc >= '0' && wc <= '9';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswgraph
-#  else
+#   else
 iswgraph
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc >= '!' && wc <= '~';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswlower
-#  else
+#   else
 iswlower
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc >= 'a' && wc <= 'z';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswprint
-#  else
+#   else
 iswprint
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc >= ' ' && wc <= '~';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswpunct
-#  else
+#   else
 iswpunct
-#  endif
+#   endif
          (wint_t wc)
 {
   return (wc >= '!' && wc <= '~'
@@ -284,11 +401,11 @@ iswpunct
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswspace
-#  else
+#   else
 iswspace
-#  endif
+#   endif
          (wint_t wc)
 {
   return (wc == ' ' || wc == '\t'
@@ -296,22 +413,22 @@ iswspace
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWCNTRL@
 rpl_iswupper
-#  else
+#   else
 iswupper
-#  endif
+#   endif
          (wint_t wc)
 {
   return wc >= 'A' && wc <= 'Z';
 }
 
 _GL_WCTYPE_INLINE int
-#  if @REPLACE_ISWCNTRL@
+#   if @REPLACE_ISWXDIGIT@
 rpl_iswxdigit
-#  else
+#   else
 iswxdigit
-#  endif
+#   endif
           (wint_t wc)
 {
   return ((wc >= '0' && wc <= '9')
@@ -319,42 +436,67 @@ iswxdigit
 }
 
 _GL_WCTYPE_INLINE wint_t
-#  if @REPLACE_TOWLOWER@
+#   if @REPLACE_TOWLOWER@
 rpl_towlower
-#  else
+#   else
 towlower
-#  endif
+#   endif
          (wint_t wc)
 {
   return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
 }
 
 _GL_WCTYPE_INLINE wint_t
-#  if @REPLACE_TOWLOWER@
+#   if @REPLACE_TOWLOWER@
 rpl_towupper
-#  else
+#   else
 towupper
-#  endif
+#   endif
          (wint_t wc)
 {
   return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
 }
 
-# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
-/* Only the iswblank function is missing.  */
+#  endif
 
-#  if @REPLACE_ISWBLANK@
-#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-#    define iswblank rpl_iswblank
-#   endif
+# else
+/* Only some of the functions are missing or broken.  */
+
+#  if @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
+/* Only the iswblank function is missing.  */
+#   if @REPLACE_ISWBLANK@
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     define iswblank rpl_iswblank
+#    endif
 _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
-#  else
+#   else
 _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
+#   endif
+#  endif
+
+#  if @GNULIB_ISWDIGIT@
+#   if @REPLACE_ISWDIGIT@
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     undef iswdigit
+#     define iswdigit rpl_iswdigit
+#    endif
+_GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc));
+#   endif
+#  endif
+
+#  if @GNULIB_ISWXDIGIT@
+#   if @REPLACE_ISWXDIGIT@
+#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#     undef iswxdigit
+#     define iswxdigit rpl_iswxdigit
+#    endif
+_GL_FUNCDECL_RPL (iswxdigit, int, (wint_t wc));
+#   endif
 #  endif
 
 # endif
 
-# if defined __MINGW32__
+# if defined __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@
 
 /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
    The functions towlower and towupper are implemented in the MSVCRT library
@@ -387,36 +529,71 @@ rpl_towupper (wint_t wc)
 #   define towupper rpl_towupper
 #  endif
 
-# endif /* __MINGW32__ */
+# endif /* __MINGW32__ && !@GNULIBHEADERS_OVERRIDE_WINT_T@ */
 
 # define GNULIB_defined_wctype_functions 1
 #endif
 
 #if @REPLACE_ISWCNTRL@
 _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
 #else
 _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
+#endif
+#if @GNULIB_ISWDIGIT@
+# if @REPLACE_ISWDIGIT@
+_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
+# else
 _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
+# endif
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
+#else
 _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
+#endif
+#if @GNULIB_ISWXDIGIT@
+# if @REPLACE_ISWXDIGIT@
+_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
+# else
 _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
+# endif
 #endif
+#if __GLIBC__ >= 2
 _GL_CXXALIASWARN (iswalnum);
 _GL_CXXALIASWARN (iswalpha);
 _GL_CXXALIASWARN (iswcntrl);
@@ -428,6 +605,7 @@ _GL_CXXALIASWARN (iswpunct);
 _GL_CXXALIASWARN (iswspace);
 _GL_CXXALIASWARN (iswupper);
 _GL_CXXALIASWARN (iswxdigit);
+#endif
 
 #if @GNULIB_ISWBLANK@
 # if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@
@@ -435,7 +613,9 @@ _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
 # else
 _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (iswblank);
+# endif
 #endif
 
 #if !@HAVE_WCTYPE_T@
@@ -451,7 +631,9 @@ typedef void * wctype_t;
 _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
 # endif
 _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wctype);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wctype
 # if HAVE_RAW_DECL_WCTYPE
@@ -464,11 +646,22 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - "
    The argument WC must be either a wchar_t value or WEOF.
    The argument DESC must have been returned by the wctype() function.  */
 #if @GNULIB_ISWCTYPE@
-# if !@HAVE_WCTYPE_T@
+# if @GNULIBHEADERS_OVERRIDE_WINT_T@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef iswctype
+#   define iswctype rpl_iswctype
+#  endif
+_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc));
+_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc));
+# else
+#  if !@HAVE_WCTYPE_T@
 _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
-# endif
+#  endif
 _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+# endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (iswctype);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef iswctype
 # if HAVE_RAW_DECL_ISWCTYPE
@@ -484,8 +677,10 @@ _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
 _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
 _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
 #endif
+#if __GLIBC__ >= 2
 _GL_CXXALIASWARN (towlower);
 _GL_CXXALIASWARN (towupper);
+#endif
 
 #if !@HAVE_WCTRANS_T@
 # if !GNULIB_defined_wctrans_t
@@ -500,7 +695,9 @@ typedef void * wctrans_t;
 _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
 # endif
 _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (wctrans);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef wctrans
 # if HAVE_RAW_DECL_WCTRANS
@@ -517,7 +714,9 @@ _GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
 _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
 # endif
 _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (towctrans);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef towctrans
 # if HAVE_RAW_DECL_TOWCTRANS
index d33b6a9..7f11211 100644 (file)
@@ -1,17 +1,17 @@
 /* Determine the number of screen columns needed for a character.
-   Copyright (C) 2006-2007, 2010-2018 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2010-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <config.h>
@@ -34,7 +34,7 @@ is_locale_utf8 (void)
   return STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0);
 }
 
-#if GNULIB_WCHAR_SINGLE
+#if GNULIB_WCHAR_SINGLE_LOCALE
 /* When we know that the locale does not change, provide a speedup by
    caching the value of is_locale_utf8.  */
 static int cached_is_locale_utf8 = -1;
diff --git a/lib/windows-initguard.h b/lib/windows-initguard.h
new file mode 100644 (file)
index 0000000..7999b23
--- /dev/null
@@ -0,0 +1,35 @@
+/* Init guards, somewhat like spinlocks (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_INITGUARD_H
+#define _WINDOWS_INITGUARD_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+typedef struct
+        {
+          volatile int done;
+          volatile LONG started;
+        }
+        glwthread_initguard_t;
+
+#define GLWTHREAD_INITGUARD_INIT { 0, -1 }
+
+#endif /* _WINDOWS_INITGUARD_H */
diff --git a/lib/windows-mutex.c b/lib/windows-mutex.c
new file mode 100644 (file)
index 0000000..2edfeaa
--- /dev/null
@@ -0,0 +1,95 @@
+/* Plain mutexes (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-mutex.h"
+
+#include <errno.h>
+
+void
+glwthread_mutex_init (glwthread_mutex_t *mutex)
+{
+  InitializeCriticalSection (&mutex->lock);
+  mutex->guard.done = 1;
+}
+
+int
+glwthread_mutex_lock (glwthread_mutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    {
+      if (InterlockedIncrement (&mutex->guard.started) == 0)
+        /* This thread is the first one to need this mutex.  Initialize it.  */
+        glwthread_mutex_init (mutex);
+      else
+        {
+          /* Don't let mutex->guard.started grow and wrap around.  */
+          InterlockedDecrement (&mutex->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this mutex.  */
+          while (!mutex->guard.done)
+            Sleep (0);
+        }
+    }
+  EnterCriticalSection (&mutex->lock);
+  return 0;
+}
+
+int
+glwthread_mutex_trylock (glwthread_mutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    {
+      if (InterlockedIncrement (&mutex->guard.started) == 0)
+        /* This thread is the first one to need this mutex.  Initialize it.  */
+        glwthread_mutex_init (mutex);
+      else
+        {
+          /* Don't let mutex->guard.started grow and wrap around.  */
+          InterlockedDecrement (&mutex->guard.started);
+          /* Let another thread finish initializing this mutex, and let it also
+             lock this mutex.  */
+          return EBUSY;
+        }
+    }
+  if (!TryEnterCriticalSection (&mutex->lock))
+    return EBUSY;
+  return 0;
+}
+
+int
+glwthread_mutex_unlock (glwthread_mutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    return EINVAL;
+  LeaveCriticalSection (&mutex->lock);
+  return 0;
+}
+
+int
+glwthread_mutex_destroy (glwthread_mutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    return EINVAL;
+  DeleteCriticalSection (&mutex->lock);
+  mutex->guard.done = 0;
+  return 0;
+}
diff --git a/lib/windows-mutex.h b/lib/windows-mutex.h
new file mode 100644 (file)
index 0000000..5ecf9f8
--- /dev/null
@@ -0,0 +1,51 @@
+/* Plain mutexes (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_MUTEX_H
+#define _WINDOWS_MUTEX_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+#include "windows-initguard.h"
+
+typedef struct
+        {
+          glwthread_initguard_t guard; /* protects the initialization */
+          CRITICAL_SECTION lock;
+        }
+        glwthread_mutex_t;
+
+#define GLWTHREAD_MUTEX_INIT { GLWTHREAD_INITGUARD_INIT }
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void glwthread_mutex_init (glwthread_mutex_t *mutex);
+extern int glwthread_mutex_lock (glwthread_mutex_t *mutex);
+extern int glwthread_mutex_trylock (glwthread_mutex_t *mutex);
+extern int glwthread_mutex_unlock (glwthread_mutex_t *mutex);
+extern int glwthread_mutex_destroy (glwthread_mutex_t *mutex);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_MUTEX_H */
diff --git a/lib/windows-once.c b/lib/windows-once.c
new file mode 100644 (file)
index 0000000..8dcd37c
--- /dev/null
@@ -0,0 +1,62 @@
+/* Once-only control (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-once.h"
+
+#include <stdlib.h>
+
+void
+glwthread_once (glwthread_once_t *once_control, void (*initfunction) (void))
+{
+  if (once_control->inited <= 0)
+    {
+      if (InterlockedIncrement (&once_control->started) == 0)
+        {
+          /* This thread is the first one to come to this once_control.  */
+          InitializeCriticalSection (&once_control->lock);
+          EnterCriticalSection (&once_control->lock);
+          once_control->inited = 0;
+          initfunction ();
+          once_control->inited = 1;
+          LeaveCriticalSection (&once_control->lock);
+        }
+      else
+        {
+          /* Don't let once_control->started grow and wrap around.  */
+          InterlockedDecrement (&once_control->started);
+          /* Some other thread has already started the initialization.
+             Yield the CPU while waiting for the other thread to finish
+             initializing and taking the lock.  */
+          while (once_control->inited < 0)
+            Sleep (0);
+          if (once_control->inited <= 0)
+            {
+              /* Take the lock.  This blocks until the other thread has
+                 finished calling the initfunction.  */
+              EnterCriticalSection (&once_control->lock);
+              LeaveCriticalSection (&once_control->lock);
+              if (!(once_control->inited > 0))
+                abort ();
+            }
+        }
+    }
+}
diff --git a/lib/windows-once.h b/lib/windows-once.h
new file mode 100644 (file)
index 0000000..58632f9
--- /dev/null
@@ -0,0 +1,47 @@
+/* Once-only control (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_ONCE_H
+#define _WINDOWS_ONCE_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+typedef struct
+        {
+          volatile int inited;
+          volatile LONG started;
+          CRITICAL_SECTION lock;
+        }
+        glwthread_once_t;
+
+#define GLWTHREAD_ONCE_INIT { -1, -1 }
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void glwthread_once (glwthread_once_t *once_control,
+                            void (*initfunction) (void));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_ONCE_H */
diff --git a/lib/windows-recmutex.c b/lib/windows-recmutex.c
new file mode 100644 (file)
index 0000000..cfc94b4
--- /dev/null
@@ -0,0 +1,127 @@
+/* Plain recursive mutexes (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-recmutex.h"
+
+#include <errno.h>
+
+void
+glwthread_recmutex_init (glwthread_recmutex_t *mutex)
+{
+  mutex->owner = 0;
+  mutex->depth = 0;
+  InitializeCriticalSection (&mutex->lock);
+  mutex->guard.done = 1;
+}
+
+int
+glwthread_recmutex_lock (glwthread_recmutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    {
+      if (InterlockedIncrement (&mutex->guard.started) == 0)
+        /* This thread is the first one to need this mutex.  Initialize it.  */
+        glwthread_recmutex_init (mutex);
+      else
+        {
+          /* Don't let mutex->guard.started grow and wrap around.  */
+          InterlockedDecrement (&mutex->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this mutex.  */
+          while (!mutex->guard.done)
+            Sleep (0);
+        }
+    }
+  {
+    DWORD self = GetCurrentThreadId ();
+    if (mutex->owner != self)
+      {
+        EnterCriticalSection (&mutex->lock);
+        mutex->owner = self;
+      }
+    if (++(mutex->depth) == 0) /* wraparound? */
+      {
+        mutex->depth--;
+        return EAGAIN;
+      }
+  }
+  return 0;
+}
+
+int
+glwthread_recmutex_trylock (glwthread_recmutex_t *mutex)
+{
+  if (!mutex->guard.done)
+    {
+      if (InterlockedIncrement (&mutex->guard.started) == 0)
+        /* This thread is the first one to need this mutex.  Initialize it.  */
+        glwthread_recmutex_init (mutex);
+      else
+        {
+          /* Don't let mutex->guard.started grow and wrap around.  */
+          InterlockedDecrement (&mutex->guard.started);
+          /* Let another thread finish initializing this mutex, and let it also
+             lock this mutex.  */
+          return EBUSY;
+        }
+    }
+  {
+    DWORD self = GetCurrentThreadId ();
+    if (mutex->owner != self)
+      {
+        if (!TryEnterCriticalSection (&mutex->lock))
+          return EBUSY;
+        mutex->owner = self;
+      }
+    if (++(mutex->depth) == 0) /* wraparound? */
+      {
+        mutex->depth--;
+        return EAGAIN;
+      }
+  }
+  return 0;
+}
+
+int
+glwthread_recmutex_unlock (glwthread_recmutex_t *mutex)
+{
+  if (mutex->owner != GetCurrentThreadId ())
+    return EPERM;
+  if (mutex->depth == 0)
+    return EINVAL;
+  if (--(mutex->depth) == 0)
+    {
+      mutex->owner = 0;
+      LeaveCriticalSection (&mutex->lock);
+    }
+  return 0;
+}
+
+int
+glwthread_recmutex_destroy (glwthread_recmutex_t *mutex)
+{
+  if (mutex->owner != 0)
+    return EBUSY;
+  DeleteCriticalSection (&mutex->lock);
+  mutex->guard.done = 0;
+  return 0;
+}
diff --git a/lib/windows-recmutex.h b/lib/windows-recmutex.h
new file mode 100644 (file)
index 0000000..174fe73
--- /dev/null
@@ -0,0 +1,57 @@
+/* Plain recursive mutexes (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_RECMUTEX_H
+#define _WINDOWS_RECMUTEX_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+#include "windows-initguard.h"
+
+/* The native Windows documentation says that CRITICAL_SECTION already
+   implements a recursive lock.  But we need not rely on it: It's easy to
+   implement a recursive lock without this assumption.  */
+
+typedef struct
+        {
+          glwthread_initguard_t guard; /* protects the initialization */
+          DWORD owner;
+          unsigned long depth;
+          CRITICAL_SECTION lock;
+        }
+        glwthread_recmutex_t;
+
+#define GLWTHREAD_RECMUTEX_INIT { GLWTHREAD_INITGUARD_INIT, 0, 0 }
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void glwthread_recmutex_init (glwthread_recmutex_t *mutex);
+extern int glwthread_recmutex_lock (glwthread_recmutex_t *mutex);
+extern int glwthread_recmutex_trylock (glwthread_recmutex_t *mutex);
+extern int glwthread_recmutex_unlock (glwthread_recmutex_t *mutex);
+extern int glwthread_recmutex_destroy (glwthread_recmutex_t *mutex);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_RECMUTEX_H */
diff --git a/lib/windows-rwlock.c b/lib/windows-rwlock.c
new file mode 100644 (file)
index 0000000..d63936c
--- /dev/null
@@ -0,0 +1,377 @@
+/* Read-write locks (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "windows-rwlock.h"
+
+#include <errno.h>
+#include <stdlib.h>
+
+/* Don't assume that UNICODE is not defined.  */
+#undef CreateEvent
+#define CreateEvent CreateEventA
+
+/* In this file, the waitqueues are implemented as circular arrays.  */
+#define glwthread_waitqueue_t glwthread_carray_waitqueue_t
+
+static void
+glwthread_waitqueue_init (glwthread_waitqueue_t *wq)
+{
+  wq->array = NULL;
+  wq->count = 0;
+  wq->alloc = 0;
+  wq->offset = 0;
+}
+
+/* Enqueues the current thread, represented by an event, in a wait queue.
+   Returns INVALID_HANDLE_VALUE if an allocation failure occurs.  */
+static HANDLE
+glwthread_waitqueue_add (glwthread_waitqueue_t *wq)
+{
+  HANDLE event;
+  unsigned int index;
+
+  if (wq->count == wq->alloc)
+    {
+      unsigned int new_alloc = 2 * wq->alloc + 1;
+      HANDLE *new_array =
+        (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE));
+      if (new_array == NULL)
+        /* No more memory.  */
+        return INVALID_HANDLE_VALUE;
+      /* Now is a good opportunity to rotate the array so that its contents
+         starts at offset 0.  */
+      if (wq->offset > 0)
+        {
+          unsigned int old_count = wq->count;
+          unsigned int old_alloc = wq->alloc;
+          unsigned int old_offset = wq->offset;
+          unsigned int i;
+          if (old_offset + old_count > old_alloc)
+            {
+              unsigned int limit = old_offset + old_count - old_alloc;
+              for (i = 0; i < limit; i++)
+                new_array[old_alloc + i] = new_array[i];
+            }
+          for (i = 0; i < old_count; i++)
+            new_array[i] = new_array[old_offset + i];
+          wq->offset = 0;
+        }
+      wq->array = new_array;
+      wq->alloc = new_alloc;
+    }
+  /* Whether the created event is a manual-reset one or an auto-reset one,
+     does not matter, since we will wait on it only once.  */
+  event = CreateEvent (NULL, TRUE, FALSE, NULL);
+  if (event == INVALID_HANDLE_VALUE)
+    /* No way to allocate an event.  */
+    return INVALID_HANDLE_VALUE;
+  index = wq->offset + wq->count;
+  if (index >= wq->alloc)
+    index -= wq->alloc;
+  wq->array[index] = event;
+  wq->count++;
+  return event;
+}
+
+/* Notifies the first thread from a wait queue and dequeues it.  */
+static void
+glwthread_waitqueue_notify_first (glwthread_waitqueue_t *wq)
+{
+  SetEvent (wq->array[wq->offset + 0]);
+  wq->offset++;
+  wq->count--;
+  if (wq->count == 0 || wq->offset == wq->alloc)
+    wq->offset = 0;
+}
+
+/* Notifies all threads from a wait queue and dequeues them all.  */
+static void
+glwthread_waitqueue_notify_all (glwthread_waitqueue_t *wq)
+{
+  unsigned int i;
+
+  for (i = 0; i < wq->count; i++)
+    {
+      unsigned int index = wq->offset + i;
+      if (index >= wq->alloc)
+        index -= wq->alloc;
+      SetEvent (wq->array[index]);
+    }
+  wq->count = 0;
+  wq->offset = 0;
+}
+
+void
+glwthread_rwlock_init (glwthread_rwlock_t *lock)
+{
+  InitializeCriticalSection (&lock->lock);
+  glwthread_waitqueue_init (&lock->waiting_readers);
+  glwthread_waitqueue_init (&lock->waiting_writers);
+  lock->runcount = 0;
+  lock->guard.done = 1;
+}
+
+int
+glwthread_rwlock_rdlock (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glwthread_rwlock_init (lock);
+      else
+        {
+          /* Don't let lock->guard.started grow and wrap around.  */
+          InterlockedDecrement (&lock->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this lock.  */
+          while (!lock->guard.done)
+            Sleep (0);
+        }
+    }
+  EnterCriticalSection (&lock->lock);
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow, and whether no writer is waiting.  The latter
+     condition is because POSIX recommends that "write locks shall take
+     precedence over read locks", to avoid "writer starvation".  */
+  if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_readers.  */
+      HANDLE event = glwthread_waitqueue_add (&lock->waiting_readers);
+      if (event != INVALID_HANDLE_VALUE)
+        {
+          DWORD result;
+          LeaveCriticalSection (&lock->lock);
+          /* Wait until another thread signals this event.  */
+          result = WaitForSingleObject (event, INFINITE);
+          if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+            abort ();
+          CloseHandle (event);
+          /* The thread which signalled the event already did the bookkeeping:
+             removed us from the waiting_readers, incremented lock->runcount.  */
+          if (!(lock->runcount > 0))
+            abort ();
+          return 0;
+        }
+      else
+        {
+          /* Allocation failure.  Weird.  */
+          do
+            {
+              LeaveCriticalSection (&lock->lock);
+              Sleep (1);
+              EnterCriticalSection (&lock->lock);
+            }
+          while (!(lock->runcount + 1 > 0));
+        }
+    }
+  lock->runcount++;
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glwthread_rwlock_wrlock (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glwthread_rwlock_init (lock);
+      else
+        {
+          /* Don't let lock->guard.started grow and wrap around.  */
+          InterlockedDecrement (&lock->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this lock.  */
+          while (!lock->guard.done)
+            Sleep (0);
+        }
+    }
+  EnterCriticalSection (&lock->lock);
+  /* Test whether no readers or writers are currently running.  */
+  if (!(lock->runcount == 0))
+    {
+      /* This thread has to wait for a while.  Enqueue it among the
+         waiting_writers.  */
+      HANDLE event = glwthread_waitqueue_add (&lock->waiting_writers);
+      if (event != INVALID_HANDLE_VALUE)
+        {
+          DWORD result;
+          LeaveCriticalSection (&lock->lock);
+          /* Wait until another thread signals this event.  */
+          result = WaitForSingleObject (event, INFINITE);
+          if (result == WAIT_FAILED || result == WAIT_TIMEOUT)
+            abort ();
+          CloseHandle (event);
+          /* The thread which signalled the event already did the bookkeeping:
+             removed us from the waiting_writers, set lock->runcount = -1.  */
+          if (!(lock->runcount == -1))
+            abort ();
+          return 0;
+        }
+      else
+        {
+          /* Allocation failure.  Weird.  */
+          do
+            {
+              LeaveCriticalSection (&lock->lock);
+              Sleep (1);
+              EnterCriticalSection (&lock->lock);
+            }
+          while (!(lock->runcount == 0));
+        }
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glwthread_rwlock_tryrdlock (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glwthread_rwlock_init (lock);
+      else
+        {
+          /* Don't let lock->guard.started grow and wrap around.  */
+          InterlockedDecrement (&lock->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this lock.  */
+          while (!lock->guard.done)
+            Sleep (0);
+        }
+    }
+  /* It's OK to wait for this critical section, because it is never taken for a
+     long time.  */
+  EnterCriticalSection (&lock->lock);
+  /* Test whether only readers are currently running, and whether the runcount
+     field will not overflow, and whether no writer is waiting.  The latter
+     condition is because POSIX recommends that "write locks shall take
+     precedence over read locks", to avoid "writer starvation".  */
+  if (!(lock->runcount + 1 > 0 && lock->waiting_writers.count == 0))
+    {
+      /* This thread would have to wait for a while.  Return instead.  */
+      LeaveCriticalSection (&lock->lock);
+      return EBUSY;
+    }
+  lock->runcount++;
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glwthread_rwlock_trywrlock (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    {
+      if (InterlockedIncrement (&lock->guard.started) == 0)
+        /* This thread is the first one to need this lock.  Initialize it.  */
+        glwthread_rwlock_init (lock);
+      else
+        {
+          /* Don't let lock->guard.started grow and wrap around.  */
+          InterlockedDecrement (&lock->guard.started);
+          /* Yield the CPU while waiting for another thread to finish
+             initializing this lock.  */
+          while (!lock->guard.done)
+            Sleep (0);
+        }
+    }
+  /* It's OK to wait for this critical section, because it is never taken for a
+     long time.  */
+  EnterCriticalSection (&lock->lock);
+  /* Test whether no readers or writers are currently running.  */
+  if (!(lock->runcount == 0))
+    {
+      /* This thread would have to wait for a while.  Return instead.  */
+      LeaveCriticalSection (&lock->lock);
+      return EBUSY;
+    }
+  lock->runcount--; /* runcount becomes -1 */
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glwthread_rwlock_unlock (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  EnterCriticalSection (&lock->lock);
+  if (lock->runcount < 0)
+    {
+      /* Drop a writer lock.  */
+      if (!(lock->runcount == -1))
+        abort ();
+      lock->runcount = 0;
+    }
+  else
+    {
+      /* Drop a reader lock.  */
+      if (!(lock->runcount > 0))
+        {
+          LeaveCriticalSection (&lock->lock);
+          return EPERM;
+        }
+      lock->runcount--;
+    }
+  if (lock->runcount == 0)
+    {
+      /* POSIX recommends that "write locks shall take precedence over read
+         locks", to avoid "writer starvation".  */
+      if (lock->waiting_writers.count > 0)
+        {
+          /* Wake up one of the waiting writers.  */
+          lock->runcount--;
+          glwthread_waitqueue_notify_first (&lock->waiting_writers);
+        }
+      else
+        {
+          /* Wake up all waiting readers.  */
+          lock->runcount += lock->waiting_readers.count;
+          glwthread_waitqueue_notify_all (&lock->waiting_readers);
+        }
+    }
+  LeaveCriticalSection (&lock->lock);
+  return 0;
+}
+
+int
+glwthread_rwlock_destroy (glwthread_rwlock_t *lock)
+{
+  if (!lock->guard.done)
+    return EINVAL;
+  if (lock->runcount != 0)
+    return EBUSY;
+  DeleteCriticalSection (&lock->lock);
+  if (lock->waiting_readers.array != NULL)
+    free (lock->waiting_readers.array);
+  if (lock->waiting_writers.array != NULL)
+    free (lock->waiting_writers.array);
+  lock->guard.done = 0;
+  return 0;
+}
diff --git a/lib/windows-rwlock.h b/lib/windows-rwlock.h
new file mode 100644 (file)
index 0000000..280c9f2
--- /dev/null
@@ -0,0 +1,68 @@
+/* Read-write locks (native Windows implementation).
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005.
+   Based on GCC's gthr-win32.h.  */
+
+#ifndef _WINDOWS_RWLOCK_H
+#define _WINDOWS_RWLOCK_H
+
+#define WIN32_LEAN_AND_MEAN  /* avoid including junk */
+#include <windows.h>
+
+#include "windows-initguard.h"
+
+/* It is impossible to implement read-write locks using plain locks, without
+   introducing an extra thread dedicated to managing read-write locks.
+   Therefore here we need to use the low-level Event type.  */
+
+typedef struct
+        {
+          HANDLE *array; /* array of waiting threads, each represented by an event */
+          unsigned int count; /* number of waiting threads */
+          unsigned int alloc; /* length of allocated array */
+          unsigned int offset; /* index of first waiting thread in array */
+        }
+        glwthread_carray_waitqueue_t;
+typedef struct
+        {
+          glwthread_initguard_t guard; /* protects the initialization */
+          CRITICAL_SECTION lock; /* protects the remaining fields */
+          glwthread_carray_waitqueue_t waiting_readers; /* waiting readers */
+          glwthread_carray_waitqueue_t waiting_writers; /* waiting writers */
+          int runcount; /* number of readers running, or -1 when a writer runs */
+        }
+        glwthread_rwlock_t;
+
+#define GLWTHREAD_RWLOCK_INIT { GLWTHREAD_INITGUARD_INIT }
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void glwthread_rwlock_init (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_rdlock (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_wrlock (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_tryrdlock (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_trywrlock (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_unlock (glwthread_rwlock_t *lock);
+extern int glwthread_rwlock_destroy (glwthread_rwlock_t *lock);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WINDOWS_RWLOCK_H */
diff --git a/lib/wmemchr-impl.h b/lib/wmemchr-impl.h
new file mode 100644 (file)
index 0000000..9cb4b20
--- /dev/null
@@ -0,0 +1,27 @@
+/* Search wide character array for a wide character.
+   Copyright (C) 1999, 2011-2021 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 1999.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+wchar_t *
+wmemchr (const wchar_t *s, wchar_t c, size_t n)
+{
+  for (; n > 0; s++, n--)
+    {
+      if (*s == c)
+        return (wchar_t *) s;
+    }
+  return NULL;
+}
diff --git a/lib/wmemchr.c b/lib/wmemchr.c
new file mode 100644 (file)
index 0000000..78742e2
--- /dev/null
@@ -0,0 +1,23 @@
+/* Search wide character array for a wide character.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+#include "wmemchr-impl.h"
diff --git a/lib/wmempcpy.c b/lib/wmempcpy.c
new file mode 100644 (file)
index 0000000..1d7588a
--- /dev/null
@@ -0,0 +1,28 @@
+/* Copy wide character array, return pointer after last written wide character.
+   Copyright (C) 2020-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <wchar.h>
+
+/* Copy N wide characters of SRC to DEST.
+   Return pointer to wide characters after the last written wide character.  */
+wchar_t *
+wmempcpy (wchar_t *dest, const wchar_t *src, size_t n)
+{
+  return wmemcpy (dest, src, n) + n;
+}
index bfe6109..1bf0a9e 100644 (file)
@@ -1,6 +1,6 @@
 /* Report a memory allocation failure and exit.
 
-   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2018 Free Software
+   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 3426e10..4184f33 100644 (file)
@@ -1,18 +1,18 @@
 /* xalloc-oversized.h -- memory allocation size checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef XALLOC_OVERSIZED_H_
 #include <stddef.h>
 #include <stdint.h>
 
-/* True if N * S would overflow in a size_t calculation,
-   or would generate a value larger than PTRDIFF_MAX.
+/* True if N * S does not fit into both ptrdiff_t and size_t.
+   N and S should be nonnegative and free of side effects.
    This expands to a constant expression if N and S are both constants.
-   By gnulib convention, SIZE_MAX represents overflow in size
+   By gnulib convention, SIZE_MAX represents overflow in size_t
    calculations, so the conservative size_t-based dividend to use here
    is SIZE_MAX - 1.  */
 #define __xalloc_oversized(n, s) \
-  ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
+  ((s) != 0 \
+   && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) \
+       < (n)))
 
-#if PTRDIFF_MAX < SIZE_MAX
-typedef ptrdiff_t __xalloc_count_type;
-#else
-typedef size_t __xalloc_count_type;
-#endif
+/* Return 1 if and only if an array of N objects, each of size S,
+   cannot exist reliably because its total size in bytes would exceed
+   MIN (PTRDIFF_MAX, SIZE_MAX - 1).
+
+   N and S should be nonnegative and free of side effects.
 
-/* Return 1 if an array of N objects, each of size S, cannot exist
-   reliably due to size or ptrdiff_t arithmetic overflow.  S must be
-   positive and N must be nonnegative.  This is a macro, not a
-   function, so that it works correctly even when SIZE_MAX < N.  */
+   Warning: (xalloc_oversized (N, S) ? NULL : malloc (N * S)) can
+   misbehave if N and S are both narrower than ptrdiff_t and size_t,
+   and can be rewritten as (xalloc_oversized (N, S) ?  NULL
+   : malloc (N * (size_t) S)).
 
-#if 7 <= __GNUC__
+   This is a macro, not a function, so that it works even if an
+   argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX).  */
+#if 7 <= __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX
 # define xalloc_oversized(n, s) \
-   __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1)
-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__
+   __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1)
+#elif (5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \
+       && PTRDIFF_MAX < SIZE_MAX)
 # define xalloc_oversized(n, s) \
    (__builtin_constant_p (n) && __builtin_constant_p (s) \
     ? __xalloc_oversized (n, s) \
-    : ({ __xalloc_count_type __xalloc_count; \
+    : ({ ptrdiff_t __xalloc_count; \
          __builtin_mul_overflow (n, s, &__xalloc_count); }))
 
 /* Other compilers use integer division; this may be slower but is
index c419a2d..05e2daa 100644 (file)
@@ -1,6 +1,6 @@
 /* xalloc.h -- malloc with out-of-memory checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define XALLOC_H_
 
 #include <stddef.h>
+#include <stdlib.h>
 #include <stdint.h>
 
-#include "xalloc-oversized.h"
+#if GNULIB_XALLOC
+# include "idx.h"
+# include "intprops.h"
+#endif
 
 #ifndef _GL_INLINE_HEADER_BEGIN
  #error "Please include config.h first."
@@ -31,38 +35,69 @@ _GL_INLINE_HEADER_BEGIN
 # define XALLOC_INLINE _GL_INLINE
 #endif
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 
-#if ! defined __clang__ && \
-    (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-#else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
-#endif
+#if GNULIB_XALLOC_DIE
 
 /* This function is always triggered when memory is exhausted.
    It must be defined by the application, either explicitly
    or by using gnulib's xalloc-die module.  This is the
    function to call when one wants the program to die because of a
    memory allocation failure.  */
-extern _Noreturn void xalloc_die (void);
+/*extern*/ _Noreturn void xalloc_die (void);
+
+#endif /* GNULIB_XALLOC_DIE */
+
+#if GNULIB_XALLOC
 
 void *xmalloc (size_t s)
-      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *ximalloc (idx_t s)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
 void *xzalloc (size_t s)
-      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *xizalloc (idx_t s)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
 void *xcalloc (size_t n, size_t s)
-      _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *xicalloc (idx_t n, idx_t s)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
 void *xrealloc (void *p, size_t s)
-      _GL_ATTRIBUTE_ALLOC_SIZE ((2));
-void *x2realloc (void *p, size_t *pn);
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+void *xirealloc (void *p, idx_t s)
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *xreallocarray (void *p, size_t n, size_t s)
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
+void *xireallocarray (void *p, idx_t n, idx_t s)
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *x2realloc (void *p, size_t *ps) /* superseded by xpalloc */
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *x2nrealloc (void *p, size_t *pn, size_t s) /* superseded by xpalloc */
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
 void *xmemdup (void const *p, size_t s)
-      _GL_ATTRIBUTE_ALLOC_SIZE ((2));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+void *ximemdup (void const *p, idx_t s)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+char *ximemdup0 (void const *p, idx_t s)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
 char *xstrdup (char const *str)
-      _GL_ATTRIBUTE_MALLOC;
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_RETURNS_NONNULL;
 
 /* In the following macros, T must be an elementary or structure/union or
    typedef'ed type, or a pointer to such a type.  To apply one of the
@@ -71,155 +106,70 @@ char *xstrdup (char const *str)
 
 /* Allocate an object of type T dynamically, with error checking.  */
 /* extern t *XMALLOC (typename t); */
-#define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
 
 /* Allocate memory for N elements of type T, with error checking.  */
 /* extern t *XNMALLOC (size_t n, typename t); */
-#define XNMALLOC(n, t) \
-   ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+# define XNMALLOC(n, t) \
+    ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
 
 /* Allocate an object of type T dynamically, with error checking,
    and zero it.  */
 /* extern t *XZALLOC (typename t); */
-#define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
 
 /* Allocate memory for N elements of type T, with error checking,
    and zero it.  */
 /* extern t *XCALLOC (size_t n, typename t); */
-#define XCALLOC(n, t) \
-   ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+# define XCALLOC(n, t) \
+    ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
 
 
 /* Allocate an array of N objects, each with S bytes of memory,
    dynamically, with error checking.  S must be nonzero.  */
 
 XALLOC_INLINE void *xnmalloc (size_t n, size_t s)
-                    _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1, 2)) _GL_ATTRIBUTE_RETURNS_NONNULL;
 XALLOC_INLINE void *
 xnmalloc (size_t n, size_t s)
 {
-  if (xalloc_oversized (n, s))
-    xalloc_die ();
-  return xmalloc (n * s);
+  return xreallocarray (NULL, n, s);
 }
 
+/* FIXME: Deprecate this in favor of xreallocarray?  */
 /* Change the size of an allocated block of memory P to an array of N
    objects each of S bytes, with error checking.  S must be nonzero.  */
 
 XALLOC_INLINE void *xnrealloc (void *p, size_t n, size_t s)
-                    _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
+  _GL_ATTRIBUTE_ALLOC_SIZE ((2, 3));
 XALLOC_INLINE void *
 xnrealloc (void *p, size_t n, size_t s)
 {
-  if (xalloc_oversized (n, s))
-    xalloc_die ();
-  return xrealloc (p, n * s);
-}
-
-/* If P is null, allocate a block of at least *PN such objects;
-   otherwise, reallocate P so that it contains more than *PN objects
-   each of S bytes.  S must be nonzero.  Set *PN to the new number of
-   objects, and return the pointer to the new block.  *PN is never set
-   to zero, and the returned pointer is never null.
-
-   Repeated reallocations are guaranteed to make progress, either by
-   allocating an initial block with a nonzero size, or by allocating a
-   larger block.
-
-   In the following implementation, nonzero sizes are increased by a
-   factor of approximately 1.5 so that repeated reallocations have
-   O(N) overall cost rather than O(N**2) cost, but the
-   specification for this function does not guarantee that rate.
-
-   Here is an example of use:
-
-     int *p = NULL;
-     size_t used = 0;
-     size_t allocated = 0;
-
-     void
-     append_int (int value)
-       {
-         if (used == allocated)
-           p = x2nrealloc (p, &allocated, sizeof *p);
-         p[used++] = value;
-       }
-
-   This causes x2nrealloc to allocate a block of some nonzero size the
-   first time it is called.
-
-   To have finer-grained control over the initial size, set *PN to a
-   nonzero value before calling this function with P == NULL.  For
-   example:
-
-     int *p = NULL;
-     size_t used = 0;
-     size_t allocated = 0;
-     size_t allocated1 = 1000;
-
-     void
-     append_int (int value)
-       {
-         if (used == allocated)
-           {
-             p = x2nrealloc (p, &allocated1, sizeof *p);
-             allocated = allocated1;
-           }
-         p[used++] = value;
-       }
-
-   */
-
-XALLOC_INLINE void *
-x2nrealloc (void *p, size_t *pn, size_t s)
-{
-  size_t n = *pn;
-
-  if (! p)
-    {
-      if (! n)
-        {
-          /* The approximate size to use for initial small allocation
-             requests, when the invoking code specifies an old size of
-             zero.  This is the largest "small" request for the GNU C
-             library malloc.  */
-          enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
-
-          n = DEFAULT_MXFAST / s;
-          n += !n;
-        }
-      if (xalloc_oversized (n, s))
-        xalloc_die ();
-    }
-  else
-    {
-      /* Set N = floor (1.5 * N) + 1 so that progress is made even if N == 0.
-         Check for overflow, so that N * S stays in both ptrdiff_t and
-         size_t range.  The check may be slightly conservative, but an
-         exact check isn't worth the trouble.  */
-      if ((PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX) / 3 * 2 / s
-          <= n)
-        xalloc_die ();
-      n += n / 2 + 1;
-    }
-
-  *pn = n;
-  return xrealloc (p, n * s);
+  return xreallocarray (p, n, s);
 }
 
 /* Return a pointer to a new buffer of N bytes.  This is like xmalloc,
    except it returns char *.  */
 
 XALLOC_INLINE char *xcharalloc (size_t n)
-                    _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_ALLOC_SIZE ((1));
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+  _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
 XALLOC_INLINE char *
 xcharalloc (size_t n)
 {
   return XNMALLOC (n, char);
 }
 
+#endif /* GNULIB_XALLOC */
+
+
 #ifdef __cplusplus
 }
+#endif
+
+
+#if GNULIB_XALLOC && defined __cplusplus
 
 /* C++ does not allow conversions from void * to other pointer types
    without a cast.  Use templates to work around the problem when
@@ -232,9 +182,16 @@ xrealloc (T *p, size_t s)
 }
 
 template <typename T> inline T *
+xreallocarray (T *p, size_t n, size_t s)
+{
+  return (T *) xreallocarray ((void *) p, n, s);
+}
+
+/* FIXME: Deprecate this in favor of xreallocarray?  */
+template <typename T> inline T *
 xnrealloc (T *p, size_t n, size_t s)
 {
-  return (T *) xnrealloc ((void *) p, n, s);
+  return xreallocarray (p, n, s);
 }
 
 template <typename T> inline T *
@@ -255,7 +212,8 @@ xmemdup (T const *p, size_t s)
   return (T *) xmemdup ((void const *) p, s);
 }
 
-#endif
+#endif /* GNULIB_XALLOC && C++ */
+
 
 _GL_INLINE_HEADER_END
 
index 23ce55f..3a893d2 100644 (file)
@@ -1,5 +1,5 @@
 /* vasprintf and asprintf with out-of-memory checking.
-   Copyright (C) 1999, 2002-2004, 2006, 2009-2018 Free Software Foundation,
+   Copyright (C) 1999, 2002-2004, 2006, 2009-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
index ccdbc8d..b9e3883 100644 (file)
@@ -1,5 +1,5 @@
-/* a wrapper for freopen
-   Copyright (C) 2008-2018 Free Software Foundation, Inc.
+/* Open a file, reusing a given stream, with error checking.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,7 +21,6 @@
 #include "error.h"
 #include "exitfail.h"
 #include "quote.h"
-#include "stdio--.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
index 2ce49b5..adfb9b9 100644 (file)
@@ -1,2 +1,29 @@
+/* Open a file, reusing a given stream, with error checking.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Opens the file FILENAME with mode MODE, reusing the given stream FP.
+   Upon failure, emits an error message and exits the program.  */
 void xfreopen (char const *filename, char const *mode, FILE *fp);
+
+#ifdef __cplusplus
+}
+#endif
index 9a30d67..81bb427 100644 (file)
@@ -1,6 +1,6 @@
 /* xmalloc.c -- malloc with out of memory checking
 
-   Copyright (C) 1990-2000, 2002-2006, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2002-2006, 2008-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include "xalloc.h"
 
+#include "ialloc.h"
+#include "intprops.h"
+#include "minmax.h"
+
 #include <stdlib.h>
 #include <string.h>
 
-/* 1 if calloc is known to be compatible with GNU calloc.  This
-   matters if we are not also using the calloc module, which defines
-   HAVE_CALLOC_GNU and supports the GNU API even on non-GNU platforms.  */
-#if defined HAVE_CALLOC_GNU || (defined __GLIBC__ && !defined __UCLIBC__)
-enum { HAVE_GNU_CALLOC = 1 };
-#else
-enum { HAVE_GNU_CALLOC = 0 };
-#endif
+static void * _GL_ATTRIBUTE_PURE
+nonnull (void *p)
+{
+  if (!p)
+    xalloc_die ();
+  return p;
+}
 
-/* Allocate N bytes of memory dynamically, with error checking.  */
+/* Allocate S bytes of memory dynamically, with error checking.  */
 
 void *
-xmalloc (size_t n)
+xmalloc (size_t s)
 {
-  void *p = malloc (n);
-  if (!p && n != 0)
-    xalloc_die ();
-  return p;
+  return nonnull (malloc (s));
+}
+
+void *
+ximalloc (idx_t s)
+{
+  return nonnull (imalloc (s));
 }
 
-/* Change the size of an allocated block of memory P to N bytes,
+/* Change the size of an allocated block of memory P to S bytes,
    with error checking.  */
 
 void *
-xrealloc (void *p, size_t n)
+xrealloc (void *p, size_t s)
+{
+  void *r = realloc (p, s);
+  if (!r && (!p || s))
+    xalloc_die ();
+  return r;
+}
+
+void *
+xirealloc (void *p, idx_t s)
+{
+  return nonnull (irealloc (p, s));
+}
+
+/* Change the size of an allocated block of memory P to an array of N
+   objects each of S bytes, with error checking.  */
+
+void *
+xreallocarray (void *p, size_t n, size_t s)
+{
+  void *r = reallocarray (p, n, s);
+  if (!r && (!p || (n && s)))
+    xalloc_die ();
+  return r;
+}
+
+void *
+xireallocarray (void *p, idx_t n, idx_t s)
+{
+  return nonnull (ireallocarray (p, n, s));
+}
+
+/* If P is null, allocate a block of at least *PS bytes; otherwise,
+   reallocate P so that it contains more than *PS bytes.  *PS must be
+   nonzero unless P is null.  Set *PS to the new block's size, and
+   return the pointer to the new block.  *PS is never set to zero, and
+   the returned pointer is never null.  */
+
+void *
+x2realloc (void *p, size_t *ps)
 {
-  if (!n && p)
+  return x2nrealloc (p, ps, 1);
+}
+
+/* If P is null, allocate a block of at least *PN such objects;
+   otherwise, reallocate P so that it contains more than *PN objects
+   each of S bytes.  S must be nonzero.  Set *PN to the new number of
+   objects, and return the pointer to the new block.  *PN is never set
+   to zero, and the returned pointer is never null.
+
+   Repeated reallocations are guaranteed to make progress, either by
+   allocating an initial block with a nonzero size, or by allocating a
+   larger block.
+
+   In the following implementation, nonzero sizes are increased by a
+   factor of approximately 1.5 so that repeated reallocations have
+   O(N) overall cost rather than O(N**2) cost, but the
+   specification for this function does not guarantee that rate.
+
+   Here is an example of use:
+
+     int *p = NULL;
+     size_t used = 0;
+     size_t allocated = 0;
+
+     void
+     append_int (int value)
+       {
+         if (used == allocated)
+           p = x2nrealloc (p, &allocated, sizeof *p);
+         p[used++] = value;
+       }
+
+   This causes x2nrealloc to allocate a block of some nonzero size the
+   first time it is called.
+
+   To have finer-grained control over the initial size, set *PN to a
+   nonzero value before calling this function with P == NULL.  For
+   example:
+
+     int *p = NULL;
+     size_t used = 0;
+     size_t allocated = 0;
+     size_t allocated1 = 1000;
+
+     void
+     append_int (int value)
+       {
+         if (used == allocated)
+           {
+             p = x2nrealloc (p, &allocated1, sizeof *p);
+             allocated = allocated1;
+           }
+         p[used++] = value;
+       }
+
+   */
+
+void *
+x2nrealloc (void *p, size_t *pn, size_t s)
+{
+  size_t n = *pn;
+
+  if (! p)
     {
-      /* The GNU and C99 realloc behaviors disagree here.  Act like
-         GNU, even if the underlying realloc is C99.  */
-      free (p);
-      return NULL;
+      if (! n)
+        {
+          /* The approximate size to use for initial small allocation
+             requests, when the invoking code specifies an old size of
+             zero.  This is the largest "small" request for the GNU C
+             library malloc.  */
+          enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
+
+          n = DEFAULT_MXFAST / s;
+          n += !n;
+        }
+    }
+  else
+    {
+      /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0.  */
+      if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n))
+        xalloc_die ();
     }
 
-  p = realloc (p, n);
-  if (!p && n)
-    xalloc_die ();
+  p = xreallocarray (p, n, s);
+  *pn = n;
   return p;
 }
 
-/* If P is null, allocate a block of at least *PN bytes; otherwise,
-   reallocate P so that it contains more than *PN bytes.  *PN must be
-   nonzero unless P is null.  Set *PN to the new block's size, and
-   return the pointer to the new block.  *PN is never set to zero, and
-   the returned pointer is never null.  */
+/* Grow PA, which points to an array of *PN items, and return the
+   location of the reallocated array, updating *PN to reflect its
+   new size.  The new array will contain at least N_INCR_MIN more
+   items, but will not contain more than N_MAX items total.
+   S is the size of each item, in bytes.
+
+   S and N_INCR_MIN must be positive.  *PN must be
+   nonnegative.  If N_MAX is -1, it is treated as if it were
+   infinity.
+
+   If PA is null, then allocate a new array instead of reallocating
+   the old one.
+
+   Thus, to grow an array A without saving its old contents, do
+   { free (A); A = xpalloc (NULL, &AITEMS, ...); }.  */
 
 void *
-x2realloc (void *p, size_t *pn)
+xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
 {
-  return x2nrealloc (p, pn, 1);
+  idx_t n0 = *pn;
+
+  /* The approximate size to use for initial small allocation
+     requests.  This is the largest "small" request for the GNU C
+     library malloc.  */
+  enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 };
+
+  /* If the array is tiny, grow it to about (but no greater than)
+     DEFAULT_MXFAST bytes.  Otherwise, grow it by about 50%.
+     Adjust the growth according to three constraints: N_INCR_MIN,
+     N_MAX, and what the C language can represent safely.  */
+
+  idx_t n;
+  if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
+    n = IDX_MAX;
+  if (0 <= n_max && n_max < n)
+    n = n_max;
+
+  /* NBYTES is of a type suitable for holding the count of bytes in an object.
+     This is typically idx_t, but it should be size_t on (theoretical?)
+     platforms where SIZE_MAX < IDX_MAX so xpalloc does not pass
+     values greater than SIZE_MAX to xrealloc.  */
+#if IDX_MAX <= SIZE_MAX
+  idx_t nbytes;
+#else
+  size_t nbytes;
+#endif
+  idx_t adjusted_nbytes
+    = (INT_MULTIPLY_WRAPV (n, s, &nbytes)
+       ? MIN (IDX_MAX, SIZE_MAX)
+       : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
+  if (adjusted_nbytes)
+    {
+      n = adjusted_nbytes / s;
+      nbytes = adjusted_nbytes - adjusted_nbytes % s;
+    }
+
+  if (! pa)
+    *pn = 0;
+  if (n - n0 < n_incr_min
+      && (INT_ADD_WRAPV (n0, n_incr_min, &n)
+          || (0 <= n_max && n_max < n)
+          || INT_MULTIPLY_WRAPV (n, s, &nbytes)))
+    xalloc_die ();
+  pa = xrealloc (pa, nbytes);
+  *pn = n;
+  return pa;
 }
 
 /* Allocate S bytes of zeroed memory dynamically, with error checking.
@@ -83,7 +258,13 @@ x2realloc (void *p, size_t *pn)
 void *
 xzalloc (size_t s)
 {
-  return memset (xmalloc (s), 0, s);
+  return xcalloc (s, 1);
+}
+
+void *
+xizalloc (idx_t s)
+{
+  return xicalloc (s, 1);
 }
 
 /* Allocate zeroed memory for N elements of S bytes, with error
@@ -92,15 +273,13 @@ xzalloc (size_t s)
 void *
 xcalloc (size_t n, size_t s)
 {
-  void *p;
-  /* Test for overflow, since objects with size greater than
-     PTRDIFF_MAX cause pointer subtraction to go awry.  Omit size-zero
-     tests if HAVE_GNU_CALLOC, since GNU calloc never returns NULL if
-     successful.  */
-  if (xalloc_oversized (n, s)
-      || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
-    xalloc_die ();
-  return p;
+  return nonnull (calloc (n, s));
+}
+
+void *
+xicalloc (idx_t n, idx_t s)
+{
+  return nonnull (icalloc (n, s));
 }
 
 /* Clone an object P of size S, with error checking.  There's no need
@@ -113,6 +292,23 @@ xmemdup (void const *p, size_t s)
   return memcpy (xmalloc (s), p, s);
 }
 
+void *
+ximemdup (void const *p, idx_t s)
+{
+  return memcpy (ximalloc (s), p, s);
+}
+
+/* Clone an object P of size S, with error checking.  Append
+   a terminating NUL byte.  */
+
+char *
+ximemdup0 (void const *p, idx_t s)
+{
+  char *result = ximalloc (s + 1);
+  result[s] = 0;
+  return memcpy (result, p, s);
+}
+
 /* Clone STRING.  */
 
 char *
similarity index 62%
rename from lib/xstrndup.c
rename to lib/xmalloca.c
index 3b1700a..82db671 100644 (file)
@@ -1,6 +1,6 @@
-/* Duplicate a bounded initial segment of a string, with out-of-memory
-   checking.
-   Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+/* Safe automatic memory allocation with out of memory checking.
+   Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <config.h>
 
 /* Specification.  */
-#include "xstrndup.h"
+#include "xmalloca.h"
 
-#include <string.h>
 #include "xalloc.h"
 
-/* Return a newly allocated copy of at most N bytes of STRING.
-   In other words, return a copy of the initial segment of length N of
-   STRING.  */
-char *
-xstrndup (const char *string, size_t n)
+#if HAVE_ALLOCA
+
+void *
+xmmalloca (size_t n)
 {
-  char *s = strndup (string, n);
-  if (! s)
+  void *p;
+
+  p = mmalloca (n);
+  if (p == NULL)
     xalloc_die ();
-  return s;
+  return p;
 }
+
+#endif
diff --git a/lib/xmalloca.h b/lib/xmalloca.h
new file mode 100644 (file)
index 0000000..dbc6486
--- /dev/null
@@ -0,0 +1,69 @@
+/* Safe automatic memory allocation with out of memory checking.
+   Copyright (C) 2003, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _XMALLOCA_H
+#define _XMALLOCA_H
+
+#include "malloca.h"
+#include "xalloc.h"
+#include "xalloc-oversized.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* xmalloca(N) is a checking safe variant of alloca(N).  It allocates N bytes
+   of memory allocated on the stack, that must be freed using freea() before
+   the function returns.  N should not have side effects.
+   Upon failure, it exits with an error message.  */
+#if HAVE_ALLOCA
+# define xmalloca(N) \
+  ((N) < 4032 - (2 * sa_alignment_max - 1)                                   \
+   ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
+                + (2 * sa_alignment_max - 1))                                \
+               & ~(uintptr_t)(2 * sa_alignment_max - 1))                     \
+   : xmmalloca (N))
+extern void * xmmalloca (size_t n);
+#else
+# define xmalloca(N) \
+  xmalloc (N)
+#endif
+
+/* xnmalloca(N,S) is an overflow-safe variant of xmalloca (N * S).
+   It allocates an array of N objects, each with S bytes of memory,
+   on the stack.  S must be positive and N must be nonnegative,
+   and S and N should not have side effects.
+   The array must be freed using freea() before the function returns.
+   Upon failure, it exits with an error message.  */
+#if HAVE_ALLOCA
+/* Rely on xmalloca (SIZE_MAX) calling xalloc_die ().  */
+# define xnmalloca(n, s) \
+    xmalloca (xalloc_oversized (n, s) ? (size_t) (-1) : (n) * (size_t) (s))
+#else
+# define xnmalloca(n, s) \
+    xnmalloc (n, s)
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _XMALLOCA_H */
index f44f27a..d9348b5 100644 (file)
@@ -1,6 +1,6 @@
 /* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage
 
-   Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index ff04236..ef749ba 100644 (file)
@@ -1,6 +1,6 @@
 /* Reading symbolic links without size limitation.
 
-   Copyright (C) 2001, 2003-2004, 2007, 2009-2018 Free Software Foundation,
+   Copyright (C) 2001, 2003-2004, 2007, 2009-2021 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify
index 4b4914c..b3d73a2 100644 (file)
@@ -1,3 +1,21 @@
+/* Checked size_t computations.
+
+   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #include <config.h>
+
 #define XSIZE_INLINE _GL_EXTERN_INLINE
 #include "xsize.h"
index 8aeb3b7..91fa877 100644 (file)
@@ -1,19 +1,19 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008-2018 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #ifndef _XSIZE_H
 #define _XSIZE_H
@@ -27,6 +27,9 @@
 # include <stdint.h>
 #endif
 
+/* Get ATTRIBUTE_PURE.  */
+#include "attribute.h"
+
 #ifndef _GL_INLINE_HEADER_BEGIN
  #error "Please include config.h first."
 #endif
@@ -56,10 +59,7 @@ _GL_INLINE_HEADER_BEGIN
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-XSIZE_INLINE size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
+XSIZE_INLINE size_t ATTRIBUTE_PURE
 xsum (size_t size1, size_t size2)
 {
   size_t sum = size1 + size2;
@@ -67,30 +67,21 @@ xsum (size_t size1, size_t size2)
 }
 
 /* Sum of three sizes, with overflow check.  */
-XSIZE_INLINE size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
+XSIZE_INLINE size_t ATTRIBUTE_PURE
 xsum3 (size_t size1, size_t size2, size_t size3)
 {
   return xsum (xsum (size1, size2), size3);
 }
 
 /* Sum of four sizes, with overflow check.  */
-XSIZE_INLINE size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
+XSIZE_INLINE size_t ATTRIBUTE_PURE
 xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
 {
   return xsum (xsum (xsum (size1, size2), size3), size4);
 }
 
 /* Maximum of two sizes, with overflow check.  */
-XSIZE_INLINE size_t
-#if __GNUC__ >= 3
-__attribute__ ((__pure__))
-#endif
+XSIZE_INLINE size_t ATTRIBUTE_PURE
 xmax (size_t size1, size_t size2)
 {
   /* No explicit check is needed here, because for any n:
diff --git a/lib/xstdopen.c b/lib/xstdopen.c
new file mode 100644 (file)
index 0000000..7473f1d
--- /dev/null
@@ -0,0 +1,35 @@
+/* Ensure that stdin, stdout, stderr are open.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "xstdopen.h"
+
+#include "stdopen.h"
+#include "error.h"
+#include "exitfail.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xstdopen (void)
+{
+  int stdopen_errno = stdopen ();
+  if (stdopen_errno != 0)
+    error (exit_failure, stdopen_errno, _("standard file descriptors"));
+}
similarity index 58%
rename from lib/stdio-safer.h
rename to lib/xstdopen.h
index 17d4dd2..9531052 100644 (file)
@@ -1,6 +1,5 @@
-/* Invoke stdio functions, but avoid some glitches.
-
-   Copyright (C) 2001, 2003, 2006, 2009-2018 Free Software Foundation, Inc.
+/* Ensure that stdin, stdout, stderr are open.
+   Copyright (C) 2019-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* Written by Paul Eggert.  */
-
-#include <stdio.h>
-
-#if GNULIB_FOPEN_SAFER
-FILE *fopen_safer (char const *, char const *);
+#ifdef __cplusplus
+extern "C" {
 #endif
 
-#if GNULIB_FREOPEN_SAFER
-FILE *freopen_safer (char const *, char const *, FILE *);
-#endif
-
-#if GNULIB_POPEN_SAFER
-FILE *popen_safer (char const *, char const *);
-#endif
+/* Ensures that the file descriptors of stdin, stdout, stderr (0, 1, 2) are
+   open.  Exits the program with an error message upon failure; the error
+   message may not appear if stderr is closed.  */
+extern void xstdopen (void);
 
-#if GNULIB_TMPFILE_SAFER
-FILE *tmpfile_safer (void);
+#ifdef __cplusplus
+}
 #endif
index 3ef1312..687a00b 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset conversion with out-of-memory checking.
-   Copyright (C) 2001-2004, 2006, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible.
 
    This program is free software: you can redistribute it and/or modify
index c3cd283..1f69fa3 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset conversion with out-of-memory checking.
-   Copyright (C) 2001-2004, 2006-2007, 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2001-2004, 2006-2007, 2009-2021 Free Software Foundation, Inc.
    Written by Bruno Haible and Simon Josefsson.
 
    This program is free software: you can redistribute it and/or modify
diff --git a/lib/xstrtoimax.c b/lib/xstrtoimax.c
new file mode 100644 (file)
index 0000000..17bd54c
--- /dev/null
@@ -0,0 +1,23 @@
+/* A more useful interface to strtoimax.
+
+   Copyright (C) 2001-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define __strtol strtoimax
+#define __strtol_t intmax_t
+#define __xstrtol xstrtoimax
+#define STRTOL_T_MINIMUM INTMAX_MIN
+#define STRTOL_T_MAXIMUM INTMAX_MAX
+#include "xstrtol.c"
index e5bfd7e..2eab22a 100644 (file)
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2018 Free Software
+   Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
index 43d2c79..b873033 100644 (file)
@@ -1,6 +1,6 @@
 /* A more useful interface to strtol.
 
-   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2018 Free Software
+   Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2021 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@
 #ifndef XSTRTOL_H_
 # define XSTRTOL_H_ 1
 
-# include <getopt.h>
 # include <inttypes.h>
 
 # ifndef _STRTOL_ERROR
@@ -43,31 +42,9 @@ typedef enum strtol_error strtol_error;
   strtol_error name (const char *, char **, int, type *, const char *);
 _DECLARE_XSTRTOL (xstrtol, long int)
 _DECLARE_XSTRTOL (xstrtoul, unsigned long int)
-_DECLARE_XSTRTOL (xstrtoimax, intmax_t)
-_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
-
-#if HAVE_LONG_LONG_INT
 _DECLARE_XSTRTOL (xstrtoll, long long int)
 _DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
-#endif
-
-/* Report an error for an invalid integer in an option argument.
-
-   ERR is the error code returned by one of the xstrto* functions.
-
-   Use OPT_IDX to decide whether to print the short option string "C"
-   or "-C" or a long option string derived from LONG_OPTION.  OPT_IDX
-   is -2 if the short option "C" was used, without any leading "-"; it
-   is -1 if the short option "-C" was used; otherwise it is an index
-   into LONG_OPTIONS, which should have a name preceded by two '-'
-   characters.
-
-   ARG is the option-argument containing the integer.
-
-   After reporting an error, exit with a failure status.  */
-
-_Noreturn void xstrtol_fatal (enum strtol_error,
-                              int, char, struct option const *,
-                              char const *);
+_DECLARE_XSTRTOL (xstrtoimax, intmax_t)
+_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
 
 #endif /* not XSTRTOL_H_ */
index 285f7b9..c705a4c 100644 (file)
@@ -1,3 +1,20 @@
+/* Convert string to 'unsigned long', with error checking.
+
+   Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 3 of the License,
+   or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
 #define __strtol strtoul
 #define __strtol_t unsigned long int
 #define __xstrtol xstrtoul
diff --git a/lib/xstrtoumax.c b/lib/xstrtoumax.c
deleted file mode 100644 (file)
index 9a2349f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#define __strtol strtoumax
-#define __strtol_t uintmax_t
-#define __xstrtol xstrtoumax
-#define STRTOL_T_MINIMUM 0
-#define STRTOL_T_MAXIMUM UINTMAX_MAX
-#include "xstrtol.c"
index 42a5ea8..7bf9c09 100644 (file)
@@ -1,5 +1,5 @@
 /* vasprintf and asprintf with out-of-memory checking.
-   Copyright (C) 1999, 2002-2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2004, 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index cabc356..4da42c6 100644 (file)
@@ -1,5 +1,5 @@
 /* vasprintf and asprintf with out-of-memory checking.
-   Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+   Copyright (C) 2002-2004, 2006-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Get va_list.  */
 #include <stdarg.h>
 
-/* The __attribute__ feature is available in gcc versions 2.5 and later.
-   The __-protected variants of the attributes 'format' and 'printf' are
-   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
-   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
-   gnulib and libintl do '#define printf __printf__' when they override
-   the 'printf' function.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
-#endif
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD.  */
+#include <stdio.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -44,9 +35,9 @@ extern "C" {
      - [EILSEQ] error during conversion between wide and multibyte characters,
    return NULL.  */
 extern char *xasprintf (const char *format, ...)
-       _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 2));
+       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 1, 2));
 extern char *xvasprintf (const char *format, va_list args)
-       _GL_ATTRIBUTE_FORMAT ((__printf__, 1, 0));
+       _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 1, 0));
 
 #ifdef __cplusplus
 }
index bd24796..9ba1743 100644 (file)
@@ -1,43 +1,82 @@
-# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 8
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl This file must be named something that sorts before all other
-dnl gnulib-provided .m4 files.  It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
-dnl m4_divert semantics.
+dnl gnulib-provided .m4 files.  It is needed until the clang fix has
+dnl been included in Autoconf.
 
-# Until autoconf 2.63, handling of the diversion stack required m4_init
-# to be called first; but this does not happen with aclocal.  Wrapping
-# the entire execution in another layer of the diversion stack fixes this.
-# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4
-# for whether it was FIFO or LIFO; in order to properly balance with
-# m4_init, we need to undo our push just before anything wrapped within
-# the m4_init body.  The way to ensure this is to wrap both sides of
-# m4_init with a one-shot macro that does the pop at the right time.
-m4_ifndef([_m4_divert_diversion],
-[m4_divert_push([KILL])
-m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])])
-m4_define([m4_init],
-  [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])])
-
-
-# AC_DEFUN_ONCE([NAME], VALUE)
-# ----------------------------
-# Define NAME to expand to VALUE on the first use (whether by direct
-# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
-# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier.  This
-# definition is slower than the version in Autoconf 2.64, because it
-# can only use interfaces that existed since 2.59; but it achieves the
-# same effect.  Quoting is necessary to avoid confusing Automake.
-m4_version_prereq([2.63.263], [],
-[m4_define([AC][_DEFUN_ONCE],
-  [AC][_DEFUN([$1],
-    [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
-      [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
-[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+# The following definitions arrange to use a compiler option
+# -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
+# compiler is clang.  Without it, clang implicitly declares "known"
+# library functions in C mode, but not in C++ mode, which would cause
+# Gnulib to omit a declaration and thus later produce an error in C++
+# mode.  As of clang 9.0, these "known" functions are identified through
+# LIBBUILTIN invocations in the LLVM source file
+# llvm/tools/clang/include/clang/Basic/Builtins.def.
+# It's not possible to AC_REQUIRE the extra tests from AC_CHECK_DECL,
+# because AC_CHECK_DECL, like other Autoconf built-ins, is not supposed
+# to AC_REQUIRE anything: some configure.ac files have their first
+# AC_CHECK_DECL executed conditionally.  Therefore append the extra tests
+# to AC_PROG_CC.
+AC_DEFUN([gl_COMPILER_CLANG],
+[
+dnl AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([whether the compiler is clang],
+    [gl_cv_compiler_clang],
+    [dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error
+     dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has
+     dnl not yet been invoked.
+     _AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[
+           #ifdef __clang__
+           barfbarf
+           #endif
+           ]],[[]])
+        ],
+        [gl_cv_compiler_clang=no],
+        [gl_cv_compiler_clang=yes])
+    ])
+])
+AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],
+[
+dnl AC_REQUIRE([AC_PROG_CC])
+dnl AC_REQUIRE([gl_COMPILER_CLANG])
+  AC_CACHE_CHECK([for compiler option needed when checking for declarations],
+    [gl_cv_compiler_check_decl_option],
+    [if test $gl_cv_compiler_clang = yes; then
+       dnl Test whether the compiler supports the option
+       dnl '-Werror=implicit-function-declaration'.
+       save_ac_compile="$ac_compile"
+       ac_compile="$ac_compile -Werror=implicit-function-declaration"
+       dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
+       dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+       _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+         [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
+         [gl_cv_compiler_check_decl_option=none])
+       ac_compile="$save_ac_compile"
+     else
+       gl_cv_compiler_check_decl_option=none
+     fi
+    ])
+  if test "x$gl_cv_compiler_check_decl_option" != xnone; then
+    ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
+  else
+    ac_compile_for_check_decl="$ac_compile"
+  fi
+])
+dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
+dnl instead of ac_compile.  If, for whatever reason, the override of AC_PROG_CC
+dnl in zzgnulib.m4 is inactive, use the original ac_compile.
+m4_define([_AC_CHECK_DECL_BODY],
+[  ac_save_ac_compile="$ac_compile"
+  if test -n "$ac_compile_for_check_decl"; then
+    ac_compile="$ac_compile_for_check_decl"
+  fi]
+m4_defn([_AC_CHECK_DECL_BODY])[  ac_compile="$ac_save_ac_compile"
+])
 
 # gl_00GNULIB
 # -----------
index 3d0c479..b28cc6a 100644 (file)
@@ -1,5 +1,5 @@
 # Test for __inline keyword
-dnl Copyright 2017-2018 Free Software Foundation, Inc.
+dnl Copyright 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 4e67e5f..52d80d0 100644 (file)
@@ -1,5 +1,5 @@
-# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# absolute-header.m4 serial 17
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,23 +22,21 @@ dnl From Derek Price.
 AC_DEFUN([gl_ABSOLUTE_HEADER],
 [AC_REQUIRE([AC_CANONICAL_HOST])
 AC_LANG_PREPROC_REQUIRE()dnl
-dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
 m4_foreach_w([gl_HEADER_NAME], [$1],
   [AS_VAR_PUSHDEF([gl_absolute_header],
                   [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl
   AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>],
-    m4_defn([gl_absolute_header]),
+    [gl_absolute_header],
     [AS_VAR_PUSHDEF([ac_header_exists],
                     [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl
     AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl
-    if test AS_VAR_GET(ac_header_exists) = yes; then
+    if test AS_VAR_GET([ac_header_exists]) = yes; then
       gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME]))
     fi
     AS_VAR_POPDEF([ac_header_exists])dnl
     ])dnl
   AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])),
-                     ["AS_VAR_GET(gl_absolute_header)"],
+                     ["AS_VAR_GET([gl_absolute_header])"],
                      [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.])
   AS_VAR_POPDEF([gl_absolute_header])dnl
 ])dnl
index b9d94e8..ba2f679 100644 (file)
@@ -1,5 +1,5 @@
-# alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2018 Free Software Foundation,
+# alloca.m4 serial 20
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -37,19 +37,26 @@ AC_DEFUN([gl_FUNC_ALLOCA],
   fi
   AC_SUBST([ALLOCA_H])
   AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
+
+  if test $ac_cv_working_alloca_h = yes; then
+    HAVE_ALLOCA_H=1
+  else
+    HAVE_ALLOCA_H=0
+  fi
+  AC_SUBST([HAVE_ALLOCA_H])
 ])
 
 # Prerequisites of lib/alloca.c.
 # STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
 AC_DEFUN([gl_PREREQ_ALLOCA], [:])
 
-# This works around a bug in autoconf <= 2.68.
-# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
+m4_version_prereq([2.70], [], [
 
-m4_version_prereq([2.69], [] ,[
-
-# This is taken from the following Autoconf patch:
-# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# This works around a bug in autoconf <= 2.68 and has simplifications
+# from 2.70.  See:
+# https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
+# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=15edf7fd8094fd14a89d9891dd72a9624762597a
 
 # _AC_LIBOBJ_ALLOCA
 # -----------------
@@ -65,26 +72,6 @@ AC_LIBSOURCES(alloca.c)
 AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl
 AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.])
 
-AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray,
-[AC_EGREP_CPP(webecray,
-[#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
-], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    AC_CHECK_FUNC($ac_func,
-                  [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
-                                      [Define to one of '_getb67', 'GETB67',
-                                       'getb67' for Cray-2 and Cray-YMP
-                                       systems. This function is required for
-                                       'alloca.c' support on those systems.])
-    break])
-  done
-fi
-
 AC_CACHE_CHECK([stack direction for C alloca],
                [ac_cv_c_stack_direction],
 [AC_RUN_IFELSE([AC_LANG_SOURCE(
@@ -115,7 +102,7 @@ AH_VERBATIM([STACK_DIRECTION],
         STACK_DIRECTION > 0 => grows toward higher addresses
         STACK_DIRECTION < 0 => grows toward lower addresses
         STACK_DIRECTION = 0 => direction of growth unknown */
-@%:@undef STACK_DIRECTION])dnl
+#undef STACK_DIRECTION])dnl
 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
 ])# _AC_LIBOBJ_ALLOCA
 ])
index e73dc69..a3ba256 100644 (file)
@@ -1,15 +1,15 @@
-# arpa_inet_h.m4 serial 13
-dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+# arpa_inet_h.m4 serial 17
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Simon Josefsson and Bruno Haible
 
-AC_DEFUN([gl_HEADER_ARPA_INET],
+AC_DEFUN_ONCE([gl_ARPA_INET_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
   AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
 
   AC_CHECK_HEADERS_ONCE([arpa/inet.h])
@@ -24,6 +24,8 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
 
   AC_REQUIRE([gl_FEATURES_H])
 
+  gl_PREREQ_SYS_H_WS2TCPIP
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
@@ -38,17 +40,32 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
     ]], [inet_ntop inet_pton])
 ])
 
+# gl_ARPA_INET_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_ARPA_INET_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_ARPA_INET_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_NTOP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_INET_PTON])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_ARPA_INET_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
 [
-  GNULIB_INET_NTOP=0;     AC_SUBST([GNULIB_INET_NTOP])
-  GNULIB_INET_PTON=0;     AC_SUBST([GNULIB_INET_PTON])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_INET_NTOP=1;  AC_SUBST([HAVE_DECL_INET_NTOP])
   HAVE_DECL_INET_PTON=1;  AC_SUBST([HAVE_DECL_INET_PTON])
diff --git a/m4/asm-underscore.m4 b/m4/asm-underscore.m4
new file mode 100644 (file)
index 0000000..93b98be
--- /dev/null
@@ -0,0 +1,83 @@
+# asm-underscore.m4 serial 5
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible. Based on as-underscore.m4 in GNU clisp.
+
+# gl_ASM_SYMBOL_PREFIX
+# Tests for the prefix of C symbols at the assembly language level and the
+# linker level. This prefix is either an underscore or empty. Defines the
+# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
+# a stringified variant of this prefix.
+
+AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
+[
+  AC_REQUIRE([AC_PROG_EGREP])
+  dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
+  dnl 1. It works only for GCC.
+  dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
+  AC_REQUIRE([gl_C_ASM])
+  AC_CACHE_CHECK(
+    [whether C symbols are prefixed with underscore at the linker level],
+    [gl_cv_prog_as_underscore],
+    [cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" int foo (void);
+#endif
+int foo(void) { return 0; }
+EOF
+     # Look for the assembly language name in the .s file.
+     AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+     if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
+       gl_cv_prog_as_underscore=yes
+     else
+       gl_cv_prog_as_underscore=no
+     fi
+     rm -f conftest*
+    ])
+  if test $gl_cv_prog_as_underscore = yes; then
+    USER_LABEL_PREFIX=_
+  else
+    USER_LABEL_PREFIX=
+  fi
+  AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
+    [Define to the prefix of C symbols at the assembler and linker level,
+     either an underscore or empty.])
+  ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
+  AC_SUBST([ASM_SYMBOL_PREFIX])
+])
+
+# gl_C_ASM
+# Determines how to produce an assembly language file from C source code.
+# Sets the variables:
+#   gl_asmext - the extension of assembly language output,
+#   gl_c_asm_opt - the C compiler option that produces assembly language output.
+
+AC_DEFUN([gl_C_ASM],
+[
+  AC_EGREP_CPP([MicrosoftCompiler],
+    [
+#ifdef _MSC_VER
+MicrosoftCompiler
+#endif
+    ],
+    [dnl Microsoft's 'cl' and 'clang-cl' produce an .asm file, whereas 'clang'
+     dnl produces a .s file. Need to distinguish 'clang' and 'clang-cl'.
+     rm -f conftest*
+     echo 'int dummy;' > conftest.c
+     AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c) >/dev/null 2>&1
+     if test -f conftest.o; then
+       gl_asmext='s'
+       gl_c_asm_opt='-S'
+     else
+       gl_asmext='asm'
+       gl_c_asm_opt='-c -Fa'
+     fi
+     rm -f conftest*
+    ],
+    [gl_asmext='s'
+     gl_c_asm_opt='-S'
+    ])
+])
diff --git a/m4/atoll.m4 b/m4/atoll.m4
new file mode 100644 (file)
index 0000000..8b46626
--- /dev/null
@@ -0,0 +1,19 @@
+# atoll.m4 serial 3
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ATOLL],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_CHECK_FUNCS([atoll])
+  if test $ac_cv_func_atoll = no; then
+    HAVE_ATOLL=0
+  fi
+])
+
+# Prerequisites of lib/atoll.c.
+AC_DEFUN([gl_PREREQ_ATOLL], [
+  :
+])
index 8acdffc..d2b2fe8 100644 (file)
@@ -1,5 +1,5 @@
-# btowc.m4 serial 11
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# btowc.m4 serial 12
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -28,14 +28,6 @@ AC_DEFUN([gl_FUNC_BTOWC],
       [
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -79,14 +71,7 @@ changequote([,])dnl
           AC_RUN_IFELSE(
             [AC_LANG_SOURCE([[
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
 #include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
index a1eaf96..c584116 100644 (file)
@@ -1,6 +1,6 @@
 dnl Check for __builtin_expect.
 
-dnl Copyright 2016-2018 Free Software Foundation, Inc.
+dnl Copyright 2016-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index f210842..7cccb06 100644 (file)
 # Check prerequisites for compiling lib/c-stack.c.
 
-# Copyright (C) 2002-2004, 2008-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004, 2008-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
 
-# serial 17
-
-AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
-  [
-   AC_REQUIRE([AC_CANONICAL_HOST])
-   AC_CHECK_FUNCS_ONCE([setrlimit])
-   AC_CHECK_HEADERS_ONCE([ucontext.h])
-
-   dnl List of signals that are sent when an invalid virtual memory address
-   dnl is accessed, or when the stack overflows.
-   dnl Either { SIGSEGV } or { SIGSEGV, SIGBUS }.
-   case "$host_os" in
-     sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
-       FAULT_YIELDS_SIGBUS=1 ;;
-     hpux*) # HP-UX
-       FAULT_YIELDS_SIGBUS=1 ;;
-     macos* | darwin*) # Mac OS X
-       FAULT_YIELDS_SIGBUS=1 ;;
-     gnu*) # Hurd
-       FAULT_YIELDS_SIGBUS=1 ;;
-     *)
-       FAULT_YIELDS_SIGBUS=0 ;;
-   esac
-   AC_DEFINE_UNQUOTED([FAULT_YIELDS_SIGBUS], [$FAULT_YIELDS_SIGBUS],
-     [Define to 1 if an invalid memory address access may yield a SIGBUS.])
-
-   AC_CACHE_CHECK([for working C stack overflow detection],
-     [ac_cv_sys_stack_overflow_works],
-     [AC_RUN_IFELSE([AC_LANG_SOURCE(
-           [[
-            #include <unistd.h>
-            #include <signal.h>
-            #if HAVE_SETRLIMIT
-            # include <sys/types.h>
-            # include <sys/time.h>
-            # include <sys/resource.h>
-            #endif
-            #ifndef SIGSTKSZ
-            # define SIGSTKSZ 16384
-            #endif
-
-            static union
-            {
-              char buffer[2 * SIGSTKSZ];
-              long double ld;
-              long u;
-              void *p;
-            } alternate_signal_stack;
-
-            static void
-            segv_handler (int signo)
-            {
-              _exit (0);
-            }
-
-            static int
-            c_stack_action ()
-            {
-              stack_t st;
-              struct sigaction act;
-              int r;
-
-              st.ss_flags = 0;
-              /* Use the midpoint to avoid Irix sigaltstack bug.  */
-              st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
-              st.ss_size = SIGSTKSZ;
-              r = sigaltstack (&st, 0);
-              if (r != 0)
-                return 1;
-
-              sigemptyset (&act.sa_mask);
-              act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
-              act.sa_handler = segv_handler;
-              #if FAULT_YIELDS_SIGBUS
-              if (sigaction (SIGBUS, &act, 0) < 0)
-                return 2;
-              #endif
-              if (sigaction (SIGSEGV, &act, 0) < 0)
-                return 3;
-              return 0;
-            }
-            static volatile int *
-            recurse_1 (volatile int n, volatile int *p)
-            {
-              if (n >= 0)
-                *recurse_1 (n + 1, p) += n;
-              return p;
-            }
-            static int
-            recurse (volatile int n)
-            {
-              int sum = 0;
-              return *recurse_1 (n, &sum);
-            }
-            int
-            main ()
-            {
-              int result;
-              #if HAVE_SETRLIMIT && defined RLIMIT_STACK
-              /* Before starting the endless recursion, try to be friendly
-                 to the user's machine.  On some Linux 2.2.x systems, there
-                 is no stack limit for user processes at all.  We don't want
-                 to kill such systems.  */
-              struct rlimit rl;
-              rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
-              setrlimit (RLIMIT_STACK, &rl);
-              #endif
-
-              result = c_stack_action ();
-              if (result != 0)
-                return result;
-              return recurse (0);
-            }
-           ]])],
-        [ac_cv_sys_stack_overflow_works=yes],
-        [ac_cv_sys_stack_overflow_works=no],
-        [case "$host_os" in
-                   # Guess no on native Windows.
-           mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
-           *)      ac_cv_sys_stack_overflow_works=cross-compiling ;;
-         esac
-        ])
-     ])
-
-  if test "$ac_cv_sys_stack_overflow_works" = yes; then
-   AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], [1],
-     [Define to 1 if extending the stack slightly past the limit causes
-      a SIGSEGV which can be handled on an alternate stack established
-      with sigaltstack.])
-
-    dnl The ss_sp field of a stack_t is, according to POSIX, the lowest address
-    dnl of the memory block designated as an alternate stack. But IRIX 5.3
-    dnl interprets it as the highest address!
-    AC_CACHE_CHECK([for correct stack_t interpretation],
-      [gl_cv_sigaltstack_low_base], [
-      AC_RUN_IFELSE([
-        AC_LANG_SOURCE([[
-#include <stdlib.h>
-#include <signal.h>
-#if HAVE_SYS_SIGNAL_H
-# include <sys/signal.h>
-#endif
-#ifndef SIGSTKSZ
-# define SIGSTKSZ 16384
-#endif
-volatile char *stack_lower_bound;
-volatile char *stack_upper_bound;
-static void check_stack_location (volatile char *addr)
-{
-  if (addr >= stack_lower_bound && addr <= stack_upper_bound)
-    exit (0);
-  else
-    exit (1);
-}
-static void stackoverflow_handler (int sig)
-{
-  char dummy;
-  check_stack_location (&dummy);
-}
-int main ()
-{
-  char mystack[2 * SIGSTKSZ];
-  stack_t altstack;
-  struct sigaction action;
-  /* Install the alternate stack.  */
-  altstack.ss_sp = mystack + SIGSTKSZ;
-  altstack.ss_size = SIGSTKSZ;
-  stack_lower_bound = (char *) altstack.ss_sp;
-  stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
-  altstack.ss_flags = 0; /* no SS_DISABLE */
-  if (sigaltstack (&altstack, NULL) < 0)
-    exit (2);
-  /* Install the SIGSEGV handler.  */
-  sigemptyset (&action.sa_mask);
-  action.sa_handler = &stackoverflow_handler;
-  action.sa_flags = SA_ONSTACK;
-  if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
-    exit(3);
-  /* Provoke a SIGSEGV.  */
-  raise (SIGSEGV);
-  exit (4);
-}]])],
-      [gl_cv_sigaltstack_low_base=yes],
-      [gl_cv_sigaltstack_low_base=no],
-      [gl_cv_sigaltstack_low_base=cross-compiling])])
-   if test "$gl_cv_sigaltstack_low_base" = no; then
-      AC_DEFINE([SIGALTSTACK_SS_REVERSED], [1],
-        [Define if sigaltstack() interprets the stack_t.ss_sp field
-         incorrectly, as the highest address of the alternate stack range
-         rather than as the lowest address.])
-    fi
-
-   AC_CACHE_CHECK([for precise C stack overflow detection],
-     [ac_cv_sys_xsi_stack_overflow_heuristic],
-     [dnl On Linux/sparc64 (both in 32-bit and 64-bit mode), it would be wrong
-      dnl to set HAVE_XSI_STACK_OVERFLOW_HEURISTIC to 1, because the third
-      dnl argument passed to the segv_handler is a 'struct sigcontext *', not
-      dnl an 'ucontext_t *'.  It would lead to a failure of test-c-stack2.sh.
-      case "${host_os}--${host_cpu}" in
-        linux*--sparc*)
-          ac_cv_sys_xsi_stack_overflow_heuristic=no
-          ;;
-        *)
-          AC_RUN_IFELSE(
-            [AC_LANG_SOURCE(
-               [[
-                #include <unistd.h>
-                #include <signal.h>
-                #if HAVE_UCONTEXT_H
-                # include <ucontext.h>
-                #endif
-                #if HAVE_SETRLIMIT
-                # include <sys/types.h>
-                # include <sys/time.h>
-                # include <sys/resource.h>
-                #endif
-                #ifndef SIGSTKSZ
-                # define SIGSTKSZ 16384
-                #endif
-
-                static union
-                {
-                  char buffer[2 * SIGSTKSZ];
-                  long double ld;
-                  long u;
-                  void *p;
-                } alternate_signal_stack;
-
-                #if STACK_DIRECTION
-                # define find_stack_direction(ptr) STACK_DIRECTION
-                #else
-                static int
-                find_stack_direction (char const *addr)
-                {
-                  char dummy;
-                  return (! addr ? find_stack_direction (&dummy)
-                          : addr < &dummy ? 1 : -1);
-                }
-                #endif
-
-                static void
-                segv_handler (int signo, siginfo_t *info, void *context)
-                {
-                  if (0 < info->si_code)
-                    {
-                      /* For XSI heuristics to work, we need uc_stack to
-                         describe the interrupted stack (as on Solaris), and
-                         not the currently executing stack (as on Linux).  */
-                      ucontext_t const *user_context = context;
-                      char const *stack_min = user_context->uc_stack.ss_sp;
-                      size_t stack_size = user_context->uc_stack.ss_size;
-                      char const *faulting_address = info->si_addr;
-                      size_t s = faulting_address - stack_min;
-                      size_t page_size = sysconf (_SC_PAGESIZE);
-                      if (find_stack_direction (0) < 0)
-                        s += page_size;
-                      if (s < stack_size + page_size)
-                        _exit (0);
-                      _exit (4);
-                    }
-                  _exit (5);
-                }
-
-                static int
-                c_stack_action ()
-                {
-                  stack_t st;
-                  struct sigaction act;
-                  int r;
-
-                  st.ss_flags = 0;
-                  /* Use the midpoint to avoid Irix sigaltstack bug.  */
-                  st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
-                  st.ss_size = SIGSTKSZ;
-                  r = sigaltstack (&st, 0);
-                  if (r != 0)
-                    return 1;
-
-                  sigemptyset (&act.sa_mask);
-                  act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
-                  act.sa_sigaction = segv_handler;
-                  #if FAULT_YIELDS_SIGBUS
-                  if (sigaction (SIGBUS, &act, 0) < 0)
-                    return 2;
-                  #endif
-                  if (sigaction (SIGSEGV, &act, 0) < 0)
-                    return 3;
-                  return 0;
-                }
-                static volatile int *
-                recurse_1 (volatile int n, volatile int *p)
-                {
-                  if (n >= 0)
-                    *recurse_1 (n + 1, p) += n;
-                  return p;
-                }
-                static int
-                recurse (volatile int n)
-                {
-                  int sum = 0;
-                  return *recurse_1 (n, &sum);
-                }
-                int
-                main ()
-                {
-                  int result;
-                  #if HAVE_SETRLIMIT && defined RLIMIT_STACK
-                  /* Before starting the endless recursion, try to be friendly
-                     to the user's machine.  On some Linux 2.2.x systems, there
-                     is no stack limit for user processes at all.  We don't want
-                     to kill such systems.  */
-                  struct rlimit rl;
-                  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
-                  setrlimit (RLIMIT_STACK, &rl);
-                  #endif
-
-                  result = c_stack_action ();
-                  if (result != 0)
-                    return result;
-                  return recurse (0);
-                }
-               ]])],
-            [ac_cv_sys_xsi_stack_overflow_heuristic=yes],
-            [ac_cv_sys_xsi_stack_overflow_heuristic=no],
-            [ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling])
-          ;;
-      esac
-     ])
-
-   if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
-     AC_DEFINE([HAVE_XSI_STACK_OVERFLOW_HEURISTIC], [1],
-       [Define to 1 if extending the stack slightly past the limit causes
-        a SIGSEGV, and an alternate stack can be established with sigaltstack,
-        and the signal handler is passed a context that specifies the
-        run time stack.  This behavior is defined by POSIX 1003.1-2001
-        with the X/Open System Interface (XSI) option
-        and is a standardized way to implement a SEGV-based stack
-        overflow detection heuristic.])
-   fi
-  fi])
-
-
-AC_DEFUN([gl_PREREQ_C_STACK],
-  [AC_REQUIRE([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC])
-   AC_REQUIRE([gl_LIBSIGSEGV])
-
-   # for STACK_DIRECTION
-   AC_REQUIRE([AC_FUNC_ALLOCA])
-
-   AC_CHECK_FUNCS_ONCE([sigaltstack])
-   AC_CHECK_DECLS([sigaltstack], , , [[#include <signal.h>]])
-
-   AC_CHECK_HEADERS_ONCE([unistd.h ucontext.h])
-
-   AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])
-
-   dnl c-stack does not need -lsigsegv if the system has XSI heuristics.
-   if test "$gl_cv_lib_sigsegv" = yes \
-       && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
-     AC_SUBST([LIBCSTACK], [$LIBSIGSEGV])
-     AC_SUBST([LTLIBCSTACK], [$LTLIBSIGSEGV])
-   fi
-])
+# serial 23
 
 AC_DEFUN([gl_C_STACK],
 [
-  dnl Prerequisites of lib/c-stack.c.
-  gl_PREREQ_C_STACK
+  dnl 'c-stack' needs -lsigsegv if and only if the 'sigsegv' module needs it.
+  if test "$with_libsigsegv" = yes; then
+    if test "$gl_cv_lib_sigsegv" = yes; then
+      AC_SUBST([LIBCSTACK], [$LIBSIGSEGV])
+      AC_SUBST([LTLIBCSTACK], [$LTLIBSIGSEGV])
+    fi
+  fi
 ])
diff --git a/m4/calloc.m4 b/m4/calloc.m4
new file mode 100644 (file)
index 0000000..fe12b15
--- /dev/null
@@ -0,0 +1,82 @@
+# calloc.m4 serial 27
+
+# Copyright (C) 2004-2021 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Jim Meyering.
+
+# Determine whether calloc (N, S) returns non-NULL when N*S is zero,
+# and returns NULL when N*S overflows.
+# If so, define HAVE_CALLOC.  Otherwise, define calloc to rpl_calloc
+# and arrange to use a calloc wrapper function that does work in that case.
+
+# _AC_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT])
+# -------------------------------------
+# If calloc is compatible with GNU calloc, run IF-WORKS, otherwise, IF-NOT.
+AC_DEFUN([_AC_FUNC_CALLOC_IF],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether calloc (0, n) and calloc (n, 0) return nonnull],
+    [ac_cv_func_calloc_0_nonnull],
+    [if test $cross_compiling != yes; then
+       ac_cv_func_calloc_0_nonnull=yes
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [AC_INCLUDES_DEFAULT],
+            [[int result = 0;
+              char * volatile p = calloc (0, 0);
+              if (!p)
+                result |= 1;
+              free (p);
+              return result;
+            ]])],
+         [],
+         [ac_cv_func_calloc_0_nonnull=no])
+     else
+       case "$host_os" in
+                        # Guess yes on glibc systems.
+         *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                        # Guess yes on musl systems.
+         *-musl*)       ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                        # Guess yes on native Windows.
+         mingw*)        ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+                        # If we don't know, obey --enable-cross-guesses.
+         *)             ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
+       esac
+     fi
+    ])
+  AS_CASE([$ac_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
+])
+
+
+# gl_FUNC_CALLOC_GNU
+# ------------------
+# Replace calloc if it is not compatible with GNU libc.
+AC_DEFUN([gl_FUNC_CALLOC_GNU],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_CALLOC_POSIX])
+  if test $REPLACE_CALLOC = 0; then
+    _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1])
+  fi
+])# gl_FUNC_CALLOC_GNU
+
+# gl_FUNC_CALLOC_POSIX
+# --------------------
+# Test whether 'calloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails, and doesn't mess up with ptrdiff_t or size_t overflow),
+# and replace calloc if it is not.
+AC_DEFUN([gl_FUNC_CALLOC_POSIX],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_CALLOC=1
+  fi
+  dnl Although in theory we should also test for size_t overflow,
+  dnl in practice testing for ptrdiff_t overflow suffices
+  dnl since PTRDIFF_MAX <= SIZE_MAX on all known Gnulib porting targets.
+  dnl A separate size_t test would slow down 'configure'.
+])
index 47791f9..c3b9e7e 100644 (file)
@@ -1,5 +1,5 @@
 # clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index f11b17e..77a5047 100644 (file)
@@ -1,5 +1,5 @@
 # close.m4 serial 9
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index bc98201..629f4ee 100644 (file)
@@ -1,6 +1,6 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2021 Free Software
+dnl Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 75eefdf..b3be47b 100644 (file)
@@ -1,6 +1,6 @@
 # Say that -DHAVE_CONFIG_H is not needed.
 
-dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/ctype.m4 b/m4/ctype.m4
deleted file mode 100644 (file)
index 85a7e3e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# ctype_h.m4 serial 6
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_CTYPE_H],
-[
-  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
-
-  dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
-  gl_NEXT_HEADERS([ctype.h])
-
-  dnl Check for declarations of anything we want to poison if the
-  dnl corresponding gnulib module is not in use.
-  gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
-    ]], [isblank])
-])
-
-AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
-[
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
-  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
-])
-
-AC_DEFUN([gl_CTYPE_H_DEFAULTS],
-[
-  GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK])
-  dnl Assume proper GNU behavior unless another module says otherwise.
-  HAVE_ISBLANK=1;   AC_SUBST([HAVE_ISBLANK])
-])
diff --git a/m4/ctype_h.m4 b/m4/ctype_h.m4
new file mode 100644 (file)
index 0000000..efdae45
--- /dev/null
@@ -0,0 +1,47 @@
+# ctype_h.m4 serial 9
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_CTYPE_H],
+[
+  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+
+  dnl <ctype.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_NEXT_HEADERS([ctype.h])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
+    ]], [isblank])
+])
+
+# gl_CTYPE_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
+[
+  dnl Ensure to expand the default settings once only.
+  gl_CTYPE_H_REQUIRE_DEFAULTS
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_CTYPE_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISBLANK])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_CTYPE_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_ISBLANK=1;   AC_SUBST([HAVE_ISBLANK])
+])
diff --git a/m4/dirname.m4 b/m4/dirname.m4
deleted file mode 100644 (file)
index 820b047..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#serial 10   -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_DIRNAME],
-[
-  AC_REQUIRE([gl_DIRNAME_LGPL])
-])
-
-AC_DEFUN([gl_DIRNAME_LGPL],
-[
-  dnl Prerequisites of lib/dirname.h.
-  AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
-
-  dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
-  dnl lib/stripslash.c.
-])
index e99d4a3..c9bbcef 100644 (file)
@@ -1,5 +1,5 @@
 # double-slash-root.m4 serial 4   -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index c785d37..0753a32 100644 (file)
@@ -1,5 +1,5 @@
-#serial 25
-dnl Copyright (C) 2002, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+#serial 27
+dnl Copyright (C) 2002, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,107 +8,95 @@ AC_DEFUN([gl_FUNC_DUP2],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [
-    AC_CHECK_FUNCS_ONCE([dup2])
-    if test $ac_cv_func_dup2 = no; then
-      HAVE_DUP2=0
-    fi
-  ], [
-    AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.])
-  ])
-  if test $HAVE_DUP2 = 1; then
-    AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
-      [AC_RUN_IFELSE([
-         AC_LANG_PROGRAM(
-           [[#include <errno.h>
-             #include <fcntl.h>
-             #include <limits.h>
-             #include <sys/resource.h>
-             #include <unistd.h>
-             #ifndef RLIM_SAVED_CUR
-             # define RLIM_SAVED_CUR RLIM_INFINITY
-             #endif
-             #ifndef RLIM_SAVED_MAX
-             # define RLIM_SAVED_MAX RLIM_INFINITY
-             #endif
-           ]],
-           [[int result = 0;
-             int bad_fd = INT_MAX;
-             struct rlimit rlim;
-             if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
-                 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
-                 && rlim.rlim_cur != RLIM_INFINITY
-                 && rlim.rlim_cur != RLIM_SAVED_MAX
-                 && rlim.rlim_cur != RLIM_SAVED_CUR)
-               bad_fd = rlim.rlim_cur;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
-                 result |= 1;
-             #endif
-             if (dup2 (1, 1) != 1)
-               result |= 2;
-             #ifdef FD_CLOEXEC
-               if (fcntl (1, F_GETFD) != FD_CLOEXEC)
-                 result |= 4;
-             #endif
-             close (0);
-             if (dup2 (0, 0) != -1)
-               result |= 8;
-             /* Many gnulib modules require POSIX conformance of EBADF.  */
-             if (dup2 (2, bad_fd) == -1 && errno != EBADF)
-               result |= 16;
-             /* Flush out some cygwin core dumps.  */
-             if (dup2 (2, -1) != -1 || errno != EBADF)
-               result |= 32;
-             dup2 (2, 255);
-             dup2 (2, 256);
-             /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
-             {
-               int fd = open (".", O_RDONLY);
-               if (fd == -1)
-                 result |= 64;
-               else if (dup2 (fd, fd + 1) == -1)
-                 result |= 128;
-
-               close (fd);
-             }
-             return result;]])
-        ],
-        [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
-        [case "$host_os" in
-           mingw*) # on this platform, dup2 always returns 0 for success
-             gl_cv_func_dup2_works="guessing no" ;;
-           cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
-             gl_cv_func_dup2_works="guessing no" ;;
-           aix* | freebsd*)
-                   # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
-                   # not EBADF.
-             gl_cv_func_dup2_works="guessing no" ;;
-           haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *-android*) # implemented using dup3(), which fails if oldfd == newfd
-             gl_cv_func_dup2_works="guessing no" ;;
-           os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
-             gl_cv_func_dup2_works="guessing no" ;;
-           *) gl_cv_func_dup2_works="guessing yes" ;;
-         esac])
-      ])
-    case "$gl_cv_func_dup2_works" in
-      *yes) ;;
-      *)
-        REPLACE_DUP2=1
-        AC_CHECK_FUNCS([setdtablesize])
-        ;;
-    esac
-  fi
+  AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
+    [AC_RUN_IFELSE([
+       AC_LANG_PROGRAM(
+         [[#include <errno.h>
+           #include <fcntl.h>
+           #include <limits.h>
+           #include <sys/resource.h>
+           #include <unistd.h>
+           ]GL_MDA_DEFINES[
+           #ifndef RLIM_SAVED_CUR
+           # define RLIM_SAVED_CUR RLIM_INFINITY
+           #endif
+           #ifndef RLIM_SAVED_MAX
+           # define RLIM_SAVED_MAX RLIM_INFINITY
+           #endif
+         ]],
+         [[int result = 0;
+           int bad_fd = INT_MAX;
+           struct rlimit rlim;
+           if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
+               && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
+               && rlim.rlim_cur != RLIM_INFINITY
+               && rlim.rlim_cur != RLIM_SAVED_MAX
+               && rlim.rlim_cur != RLIM_SAVED_CUR)
+             bad_fd = rlim.rlim_cur;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
+               result |= 1;
+           #endif
+           if (dup2 (1, 1) != 1)
+             result |= 2;
+           #ifdef FD_CLOEXEC
+             if (fcntl (1, F_GETFD) != FD_CLOEXEC)
+               result |= 4;
+           #endif
+           close (0);
+           if (dup2 (0, 0) != -1)
+             result |= 8;
+           /* Many gnulib modules require POSIX conformance of EBADF.  */
+           if (dup2 (2, bad_fd) == -1 && errno != EBADF)
+             result |= 16;
+           /* Flush out some cygwin core dumps.  */
+           if (dup2 (2, -1) != -1 || errno != EBADF)
+             result |= 32;
+           dup2 (2, 255);
+           dup2 (2, 256);
+           /* On OS/2 kLIBC, dup2() does not work on a directory fd.  */
+           {
+             int fd = open (".", O_RDONLY);
+             if (fd == -1)
+               result |= 64;
+             else if (dup2 (fd, fd + 1) == -1)
+               result |= 128;
+             close (fd);
+           }
+           return result;]])
+      ],
+      [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+      [case "$host_os" in
+         mingw*) # on this platform, dup2 always returns 0 for success
+           gl_cv_func_dup2_works="guessing no" ;;
+         cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+           gl_cv_func_dup2_works="guessing no" ;;
+         aix* | freebsd*)
+                 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
+                 # not EBADF.
+           gl_cv_func_dup2_works="guessing no" ;;
+         haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *-android*) # implemented using dup3(), which fails if oldfd == newfd
+           gl_cv_func_dup2_works="guessing no" ;;
+         os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
+           gl_cv_func_dup2_works="guessing no" ;;
+         *) gl_cv_func_dup2_works="guessing yes" ;;
+       esac])
+    ])
+  case "$gl_cv_func_dup2_works" in
+    *yes) ;;
+    *)
+      REPLACE_DUP2=1
+      AC_CHECK_FUNCS([setdtablesize])
+      ;;
+  esac
   dnl Replace dup2() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
   m4_ifdef([gl_FUNC_FCHDIR], [
     gl_TEST_FCHDIR
     if test $HAVE_FCHDIR = 0; then
-      if test $HAVE_DUP2 = 1; then
-        REPLACE_DUP2=1
-      fi
+      REPLACE_DUP2=1
     fi
   ])
 ])
index a5a4e26..002f0c8 100644 (file)
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index acee536..ae53291 100644 (file)
@@ -1,5 +1,5 @@
-# environ.m4 serial 7
-dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc.
+# environ.m4 serial 8
+dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -33,7 +33,8 @@ AC_DEFUN([gt_CHECK_VAR_DECL],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
           [[$1
-            extern struct { int foo; } $2;]],
+            typedef struct { int foo; } foo_t;
+            extern foo_t $2;]],
           [[$2.foo = 1;]])],
        [gt_cv_var=no],
        [gt_cv_var=yes])])
index e1ae295..51dfe92 100644 (file)
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 13
-dnl Copyright (C) 2004, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 280fdce..77f67f7 100644 (file)
@@ -1,6 +1,6 @@
 #serial 14
 
-# Copyright (C) 1996-1998, 2001-2004, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 7b02a4c..fb136f4 100644 (file)
@@ -1,5 +1,5 @@
 # exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 71a854f..5792a95 100644 (file)
@@ -1,14 +1,19 @@
-# serial 18  -*- Autoconf -*-
+# serial 22  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+dnl Define to empty for the benefit of Autoconf 2.69 and earlier, so that
+dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+.
+m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
+  [AC_DEFUN([AC_CHECK_INCLUDES_DEFAULT], [])])
+
 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
 # Autoconf.  Perhaps we can remove this once we can assume Autoconf
-# 2.70 or later everywhere, but since Autoconf mutates rapidly
+# is recent-enough everywhere, but since Autoconf mutates rapidly
 # enough in this area it's likely we'll need to redefine
 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
 
 #      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
 #      invocation occurs in gl_EARLY, not in gl_INIT.
 
+m4_version_prereq([2.70.1], [], [
+
 # AC_USE_SYSTEM_EXTENSIONS
 # ------------------------
 # Enable extensions on systems that normally disable them,
 # typically due to standards-conformance issues.
-#
-# Remember that #undef in AH_VERBATIM gets replaced with #define by
-# AC_DEFINE.  The goal here is to define all known feature-enabling
-# macros, then, if reports of conflicts are made, disable macros that
-# cause problems on some platforms (such as __EXTENSIONS__).
+# We unconditionally define as many of the known feature-enabling
+# as possible, reserving conditional behavior for macros that are
+# known to cause problems on some platforms (such as __EXTENSIONS__).
 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
-[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+[AC_BEFORE([$0], [AC_PREPROC_IFELSE])dnl
+AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_LINK_IFELSE])dnl
 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
-
-  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
-  if test "$MINIX" = yes; then
-    AC_DEFINE([_POSIX_SOURCE], [1],
-      [Define to 1 if you need to in order for 'stat' and other
-       things to work.])
-    AC_DEFINE([_POSIX_1_SOURCE], [2],
-      [Define to 2 if the system does not provide POSIX.1 features
-       except with this defined.])
-    AC_DEFINE([_MINIX], [1],
-      [Define to 1 if on MINIX.])
-    AC_DEFINE([_NETBSD_SOURCE], [1],
-      [Define to 1 to make NetBSD features available.  MINIX 3 needs this.])
-  fi
-
+AC_BEFORE([$0], [AC_CHECK_INCLUDES_DEFAULT])dnl
+dnl #undef in AH_VERBATIM gets replaced with #define by AC_DEFINE.
 dnl Use a different key than __EXTENSIONS__, as that name broke existing
 dnl configure.ac when using autoheader 2.62.
-  AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
+dnl The macros below are in alphabetical order ignoring leading _ or __
+dnl prefixes.
+AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
 [/* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
@@ -64,19 +60,44 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _DARWIN_C_SOURCE
 # undef _DARWIN_C_SOURCE
 #endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
 /* Enable GNU extensions on systems that have them.  */
 #ifndef _GNU_SOURCE
 # undef _GNU_SOURCE
 #endif
-/* Enable NetBSD extensions on NetBSD.  */
+/* Enable X/Open compliant socket functions that do not require linking
+   with -lxnet on HP-UX 11.11.  */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+   This macro does not affect the system headers' behavior.
+   A future release of Autoconf may stop defining this macro.  */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+   Enable NetBSD compatibility extensions on Minix.  */
 #ifndef _NETBSD_SOURCE
 # undef _NETBSD_SOURCE
 #endif
-/* Enable OpenBSD extensions on NetBSD.  */
+/* Enable OpenBSD compatibility extensions on NetBSD.
+   Oddly enough, this does nothing on OpenBSD.  */
 #ifndef _OPENBSD_SOURCE
 # undef _OPENBSD_SOURCE
 #endif
-/* Enable threading extensions on Solaris.  */
+/* Define to 1 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior.  */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris.  */
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
@@ -112,22 +133,19 @@ dnl configure.ac when using autoheader 2.62.
 #ifndef _TANDEM_SOURCE
 # undef _TANDEM_SOURCE
 #endif
-/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
-   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
-   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
+/* Enable X/Open extensions.  Define to 500 only if necessary
+   to make mbstate_t available.  */
 #ifndef _XOPEN_SOURCE
 # undef _XOPEN_SOURCE
 #endif
-/* Enable X/Open compliant socket functions that do not require linking
-   with -lxnet on HP-UX 11.11.  */
-#ifndef _HPUX_ALT_XOPEN_SOCKET_API
-# undef _HPUX_ALT_XOPEN_SOCKET_API
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-])
+])dnl
+
+  AC_REQUIRE([AC_CHECK_INCLUDES_DEFAULT])dnl
+  _AC_CHECK_HEADER_ONCE([wchar.h])
+  _AC_CHECK_HEADER_ONCE([minix/config.h])
+
+dnl Defining __EXTENSIONS__ may break the system headers on some systems.
+dnl (FIXME: Which ones?)
   AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
     [ac_cv_safe_to_define___extensions__],
     [AC_COMPILE_IFELSE(
@@ -136,11 +154,33 @@ dnl configure.ac when using autoheader 2.62.
           ]AC_INCLUDES_DEFAULT])],
        [ac_cv_safe_to_define___extensions__=yes],
        [ac_cv_safe_to_define___extensions__=no])])
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    AC_DEFINE([__EXTENSIONS__])
+
+dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to
+dnl 500, regardless of whether compiling with -Ae or -D_HPUX_SOURCE=1.
+dnl But defining _XOPEN_SOURCE may turn *off* extensions on platforms
+dnl not covered by turn-on-extensions macros (notably Dragonfly, Free,
+dnl and OpenBSD, which don't have any equivalent of _NETBSD_SOURCE) so
+dnl it should only be defined when necessary.
+  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
+    [ac_cv_should_define__xopen_source],
+    [ac_cv_should_define__xopen_source=no
+    AS_IF([test $ac_cv_header_wchar_h = yes],
+      [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM([[
+          #include <wchar.h>
+          mbstate_t x;]])],
+        [],
+        [AC_COMPILE_IFELSE(
+          [AC_LANG_PROGRAM([[
+            #define _XOPEN_SOURCE 500
+            #include <wchar.h>
+            mbstate_t x;]])],
+          [ac_cv_should_define__xopen_source=yes])])])])
+
   AC_DEFINE([_ALL_SOURCE])
   AC_DEFINE([_DARWIN_C_SOURCE])
   AC_DEFINE([_GNU_SOURCE])
+  AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
   AC_DEFINE([_NETBSD_SOURCE])
   AC_DEFINE([_OPENBSD_SOURCE])
   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
@@ -152,24 +192,18 @@ dnl configure.ac when using autoheader 2.62.
   AC_DEFINE([__STDC_WANT_LIB_EXT2__])
   AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
   AC_DEFINE([_TANDEM_SOURCE])
-  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
-    [ac_cv_should_define__xopen_source],
-    [ac_cv_should_define__xopen_source=no
-     AC_COMPILE_IFELSE(
-       [AC_LANG_PROGRAM([[
-          #include <wchar.h>
-          mbstate_t x;]])],
-       [],
-       [AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM([[
-             #define _XOPEN_SOURCE 500
-             #include <wchar.h>
-             mbstate_t x;]])],
-          [ac_cv_should_define__xopen_source=yes])])])
-  test $ac_cv_should_define__xopen_source = yes &&
-    AC_DEFINE([_XOPEN_SOURCE], [500])
-  AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API])
+  AS_IF([test $ac_cv_header_minix_config_h = yes],
+    [MINIX=yes
+    AC_DEFINE([_MINIX])
+    AC_DEFINE([_POSIX_SOURCE])
+    AC_DEFINE([_POSIX_1_SOURCE], [2])],
+    [MINIX=])
+  AS_IF([test $ac_cv_safe_to_define___extensions__ = yes],
+    [AC_DEFINE([__EXTENSIONS__])])
+  AS_IF([test $ac_cv_should_define__xopen_source = yes],
+    [AC_DEFINE([_XOPEN_SOURCE], [500])])
 ])# AC_USE_SYSTEM_EXTENSIONS
+])
 
 # gl_USE_SYSTEM_EXTENSIONS
 # ------------------------
@@ -177,13 +211,17 @@ dnl configure.ac when using autoheader 2.62.
 # typically due to standards-conformance issues.
 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
 [
-  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
-  dnl gnulib does not need it. But if it gets required by third-party macros
-  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
-  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
-  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
-  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
-  AC_REQUIRE([AC_GNU_SOURCE])
-
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl On OpenBSD 6.8 with GCC, the include files contain a couple of
+  dnl definitions that are only activated with an explicit -D_ISOC11_SOURCE.
+  dnl That's because this version of GCC (4.2.1) supports the option
+  dnl '-std=gnu99' but not the option '-std=gnu11'.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    openbsd*)
+      AC_DEFINE([_ISOC11_SOURCE], [1],
+        [Define to enable the declarations of ISO C 11 types and functions.])
+      ;;
+  esac
 ])
index 3661cbd..a2acf12 100644 (file)
@@ -1,6 +1,6 @@
 dnl 'extern inline' a la ISO C99.
 
-dnl Copyright 2012-2018 Free Software Foundation, Inc.
+dnl Copyright 2012-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,7 +32,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
      https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
 
      DragonFly; see
-     http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+     http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
 
      FreeBSD; see:
      https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
index cffb9de..7c459ad 100644 (file)
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 6
-dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 7
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
            # defined sleep(n) _sleep ((n) * 1000)
            #endif
            #include <fcntl.h>
+           ]GL_MDA_DEFINES[
            #ifndef O_NOATIME
             #define O_NOATIME 0
            #endif
index 46b2445..f626434 100644 (file)
@@ -1,5 +1,5 @@
-# fcntl.m4 serial 9
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# fcntl.m4 serial 11
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,6 +34,7 @@ AC_DEFUN([gl_FUNC_FCNTL],
               #include <limits.h>
               #include <sys/resource.h>
               #include <unistd.h>
+              ]GL_MDA_DEFINES[
               #ifndef RLIM_SAVED_CUR
               # define RLIM_SAVED_CUR RLIM_INFINITY
               #endif
@@ -80,15 +81,29 @@ AC_DEFUN([gl_FUNC_FCNTL],
           behavior does not match POSIX]) ;;
     esac
 
-    dnl Many systems lack F_DUPFD_CLOEXEC
+    dnl Many systems lack F_DUPFD_CLOEXEC.
+    dnl NetBSD 9.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
     AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
       [gl_cv_func_fcntl_f_dupfd_cloexec],
-      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <fcntl.h>
-#ifndef F_DUPFD_CLOEXEC
-choke me
-#endif
-         ]])],
+      [AC_RUN_IFELSE(
+         [AC_LANG_SOURCE(
+            [[#include <fcntl.h>
+              #include <unistd.h>
+              int main (int argc, char *argv[])
+              {
+                if (argc == 1)
+                  /* parent process */
+                  {
+                    if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
+                      return 1;
+                    return execl ("./conftest", "./conftest", "child", NULL);
+                  }
+                else
+                  /* child process */
+                  return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
+              }
+            ]])
+         ],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #ifdef __linux__
 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
@@ -97,12 +112,22 @@ choke me
 #endif
            ]])],
            [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
-           [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
-         [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
-    if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
-      gl_REPLACE_FCNTL
-      dnl No witness macro needed for this bug.
-    fi
+           [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])
+         ],
+         [gl_cv_func_fcntl_f_dupfd_cloexec=no],
+         [case "$host_os" in
+                     # Guess no on NetBSD.
+            netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
+            *)       gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      ])
+    case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
+      *yes) ;;
+      *)    gl_REPLACE_FCNTL
+            dnl No witness macro needed for this bug.
+            ;;
+    esac
   fi
   dnl Replace fcntl() for supporting the gnulib-defined fchdir() function,
   dnl to keep fchdir's bookkeeping up-to-date.
index 9fd3ab1..aba4473 100644 (file)
@@ -1,13 +1,13 @@
-# serial 15
+# serial 20
 # Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Paul Eggert.
 
-AC_DEFUN([gl_FCNTL_H],
+AC_DEFUN_ONCE([gl_FCNTL_H],
 [
   AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
   AC_REQUIRE([gl_FCNTL_O_FLAGS])
@@ -26,24 +26,44 @@ AC_DEFUN([gl_FCNTL_H],
     ]], [fcntl openat])
 ])
 
+# gl_FCNTL_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_FCNTL_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_FCNTL_H_DEFAULTS],
 [
-  GNULIB_FCNTL=0;        AC_SUBST([GNULIB_FCNTL])
-  GNULIB_NONBLOCKING=0;  AC_SUBST([GNULIB_NONBLOCKING])
-  GNULIB_OPEN=0;         AC_SUBST([GNULIB_OPEN])
-  GNULIB_OPENAT=0;       AC_SUBST([GNULIB_OPENAT])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_FCNTL=1;          AC_SUBST([HAVE_FCNTL])
   HAVE_OPENAT=1;         AC_SUBST([HAVE_OPENAT])
+  REPLACE_CREAT=0;       AC_SUBST([REPLACE_CREAT])
   REPLACE_FCNTL=0;       AC_SUBST([REPLACE_FCNTL])
   REPLACE_OPEN=0;        AC_SUBST([REPLACE_OPEN])
   REPLACE_OPENAT=0;      AC_SUBST([REPLACE_OPENAT])
index bff80ab..e41ed63 100644 (file)
@@ -1,5 +1,5 @@
-# fdopen.m4 serial 4
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# fdopen.m4 serial 5
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_FDOPEN],
           [AC_LANG_SOURCE([[
 #include <stdio.h>
 #include <errno.h>
+]GL_MDA_DEFINES[
 int
 main (void)
 {
index 1387aeb..e6eac12 100644 (file)
@@ -1,5 +1,5 @@
 # filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index db93cf3..49b1c75 100644 (file)
@@ -1,7 +1,7 @@
 # serial 5
 # Check for flexible array member support.
 
-# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -34,12 +34,10 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
     AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
       [Define to nothing if C supports flexible array members, and to
        1 if it does not.  That way, with a declaration like 'struct s
-       { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+       { int n; short d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
        can be used with pre-C99 compilers.
-       When computing the size of such an object, don't use 'sizeof (struct s)'
-       as it overestimates the size.  Use 'offsetof (struct s, d)' instead.
-       Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
-       MSVC and with C++ compilers.])
+       Use 'FLEXSIZEOF (struct s, d, N * sizeof (short))' to calculate
+       the size in bytes of such a struct containing an N-element array.])
   else
     AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
   fi
index 02beb85..ba38a28 100644 (file)
@@ -1,5 +1,5 @@
 # float_h.m4 serial 12
-dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index a61545a..81589ca 100644 (file)
@@ -1,6 +1,6 @@
-# Check for fnmatch - serial 13.  -*- coding: utf-8 -*-
+# Check for fnmatch - serial 15.  -*- coding: utf-8 -*-
 
-# Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
   m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX])
 
   AC_REQUIRE([gl_FNMATCH_H])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   gl_fnmatch_required_lowercase=`
     echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]'
   `
@@ -117,12 +118,19 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
             ]])],
          [eval "$gl_fnmatch_cache_var=yes"],
          [eval "$gl_fnmatch_cache_var=no"],
-         [eval "$gl_fnmatch_cache_var=\"guessing no\""])
+         [case "$host_os" in
+                     # Guess yes on musl systems.
+            *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
+                     # Guess no otherwise, even on glibc systems.
+            *)       eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
+          esac
+         ])
       ])
     eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
-    if test "$gl_fnmatch_result" != yes; then
-      REPLACE_FNMATCH=1
-    fi
+    case "$gl_fnmatch_result" in
+      *yes) ;;
+      *) REPLACE_FNMATCH=1 ;;
+    esac
   fi
   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
     gl_REPLACE_FNMATCH_H
@@ -141,7 +149,5 @@ AC_DEFUN([gl_PREREQ_FNMATCH],
 [
   dnl Prerequisites of lib/fnmatch.c.
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
-  AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
-  AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
-  AC_CHECK_HEADERS_ONCE([wctype.h])
+  AC_CHECK_FUNCS_ONCE([mbsrtowcs])
 ])
index 077dfef..e9bcb66 100644 (file)
@@ -1,5 +1,5 @@
-# fnmatch_h.m4 serial 4
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# fnmatch_h.m4 serial 7
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -52,23 +52,38 @@ AC_DEFUN_ONCE([gl_FNMATCH_H],
 dnl Unconditionally enables the replacement of <fnmatch.h>.
 AC_DEFUN([gl_REPLACE_FNMATCH_H],
 [
-  AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
+  gl_FNMATCH_H_REQUIRE_DEFAULTS
   FNMATCH_H='fnmatch.h'
   AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
 ])
 
+# gl_FNMATCH_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_FNMATCH_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_FNMATCH_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_FNMATCH_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_FNMATCH_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FNMATCH])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_FNMATCH_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_FNMATCH_H_DEFAULTS],
 [
-  GNULIB_FNMATCH=0;          AC_SUBST([GNULIB_FNMATCH])
   dnl Assume POSIX behavior unless another module says otherwise.
   HAVE_FNMATCH=1;            AC_SUBST([HAVE_FNMATCH])
   REPLACE_FNMATCH=0;         AC_SUBST([REPLACE_FNMATCH])
diff --git a/m4/fopen.m4 b/m4/fopen.m4
new file mode 100644 (file)
index 0000000..4ed7dce
--- /dev/null
@@ -0,0 +1,148 @@
+# fopen.m4 serial 12
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FOPEN],
+[
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw* | pw*)
+      dnl Replace fopen, for handling of "/dev/null".
+      REPLACE_FOPEN=1
+      dnl fopen on mingw also has the trailing slash bug.
+      gl_cv_func_fopen_slash="guessing no"
+      ;;
+    *)
+      dnl fopen("foo/", "w") should not create a file when the file name has a
+      dnl trailing slash.
+      AC_CACHE_CHECK([whether fopen recognizes a trailing slash],
+        [gl_cv_func_fopen_slash],
+        [
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#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;
+}]])],
+            [gl_cv_func_fopen_slash=yes],
+            [gl_cv_func_fopen_slash=no],
+            [
+changequote(,)dnl
+             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
+changequote([,])dnl
+            ])
+          rm -f conftest.sl
+        ])
+      ;;
+  esac
+  case "$gl_cv_func_fopen_slash" in
+    *no)
+      AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1],
+        [Define to 1 if fopen() fails to recognize a trailing slash.])
+      REPLACE_FOPEN=1
+      ;;
+  esac
+])
+
+AC_DEFUN([gl_FUNC_FOPEN_GNU],
+[
+  AC_REQUIRE([gl_FUNC_FOPEN])
+  AC_CACHE_CHECK([whether fopen supports the mode character 'x'],
+    [gl_cv_func_fopen_mode_x],
+    [rm -f conftest.x
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <errno.h>
+int main ()
+{
+  FILE *fp;
+  fp = fopen ("conftest.x", "w");
+  fclose (fp);
+  fp = fopen ("conftest.x", "wx");
+  if (fp != NULL)
+    /* 'x' ignored */
+    return 1;
+  else if (errno == EEXIST)
+    return 0;
+  else
+    /* 'x' rejected */
+    return 2;
+}]])],
+       [gl_cv_func_fopen_mode_x=yes],
+       [gl_cv_func_fopen_mode_x=no],
+       [case "$host_os" in
+          # Guess yes on glibc and musl systems.
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+            gl_cv_func_fopen_mode_x="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *)
+            gl_cv_func_fopen_mode_x="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -f conftest.x
+    ])
+  AC_CACHE_CHECK([whether fopen supports the mode character 'e'],
+    [gl_cv_func_fopen_mode_e],
+    [echo foo > conftest.x
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+]GL_MDA_DEFINES[
+int main ()
+{
+  FILE *fp = fopen ("conftest.x", "re");
+  if (fp != NULL)
+    {
+      if (fcntl (fileno (fp), F_GETFD) & FD_CLOEXEC)
+        return 0;
+      else
+        /* 'e' ignored */
+        return 1;
+    }
+  else
+    /* 'e' rejected */
+    return 2;
+}]])],
+       [gl_cv_func_fopen_mode_e=yes],
+       [gl_cv_func_fopen_mode_e=no],
+       [case "$host_os" in
+          # Guess yes on glibc and musl systems.
+          linux*-gnu* | gnu* | kfreebsd*-gnu | *-musl*)
+            gl_cv_func_fopen_mode_e="guessing yes" ;;
+          # Guess no on native Windows.
+          mingw*)
+            gl_cv_func_fopen_mode_e="guessing no" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *)
+            gl_cv_func_fopen_mode_e="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -f conftest.x
+    ])
+  case "$gl_cv_func_fopen_mode_x" in
+    *no) REPLACE_FOPEN=1 ;;
+  esac
+  case "$gl_cv_func_fopen_mode_e" in
+    *no) REPLACE_FOPEN=1 ;;
+  esac
+])
+
+# Prerequisites of lib/fopen.c.
+AC_DEFUN([gl_PREREQ_FOPEN], [:])
index b58840f..3f16957 100644 (file)
@@ -1,5 +1,5 @@
 # fpieee.m4 serial 2  -*- coding: utf-8 -*-
-dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/free.m4 b/m4/free.m4
new file mode 100644 (file)
index 0000000..a7923b9
--- /dev/null
@@ -0,0 +1,52 @@
+# free.m4 serial 6
+# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Bruno Haible.
+
+AC_DEFUN([gl_FUNC_FREE],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+  dnl In the next release of POSIX, free must preserve errno.
+  dnl https://www.austingroupbugs.net/view.php?id=385
+  dnl https://sourceware.org/bugzilla/show_bug.cgi?id=17924
+  dnl So far, we know of three platforms that do this:
+  dnl * glibc >= 2.33, thanks to the fix for this bug:
+  dnl   <https://sourceware.org/bugzilla/show_bug.cgi?id=17924>
+  dnl * OpenBSD >= 4.5, thanks to this commit:
+  dnl   <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h>
+  dnl * Solaris, because its malloc() implementation is based on brk(),
+  dnl   not mmap(); hence its free() implementation makes no system calls.
+  dnl For other platforms, you can only be sure if they state it in their
+  dnl documentation, or by code inspection of the free() implementation in libc.
+  AC_CACHE_CHECK([whether free is known to preserve errno],
+    [gl_cv_func_free_preserves_errno],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+          ]],
+          [[#if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
+            #elif defined __OpenBSD__
+            #elif defined __sun
+            #else
+              #error "'free' is not known to preserve errno"
+            #endif
+          ]])],
+       [gl_cv_func_free_preserves_errno=yes],
+       [gl_cv_func_free_preserves_errno=no])
+    ])
+
+  case $gl_cv_func_free_preserves_errno in
+   *yes)
+    AC_DEFINE([HAVE_FREE_POSIX], [1],
+      [Define if the 'free' function is guaranteed to preserve errno.])
+    ;;
+   *) REPLACE_FREE=1 ;;
+  esac
+])
+
+# Prerequisites of lib/free.c.
+AC_DEFUN([gl_PREREQ_FREE], [:])
index 5038a98..d5a3512 100644 (file)
@@ -1,5 +1,5 @@
-# freopen.m4 serial 6
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# freopen.m4 serial 7
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_FREOPEN],
            [AC_LANG_PROGRAM(
               [[#include <stdio.h>
                 #include <unistd.h>
-              ]],
+              ]GL_MDA_DEFINES],
               [[close (0);
                 return !(freopen ("/dev/null", "r", stdin)
                          && getchar () == EOF
index f7fc383..cdaca80 100644 (file)
@@ -1,5 +1,5 @@
-# fstat.m4 serial 6
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# fstat.m4 serial 8
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -34,6 +34,7 @@ AC_DEFUN([gl_FUNC_FSTAT],
 
 # Prerequisites of lib/fstat.c and lib/stat-w32.c.
 AC_DEFUN([gl_PREREQ_FSTAT], [
-  AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  AC_REQUIRE([gl_SYS_STAT_H])
+  AC_REQUIRE([gl_PREREQ_STAT_W32])
   :
 ])
index ffeb4e6..4a3eca6 100644 (file)
@@ -1,8 +1,8 @@
-# serial 20
+# serial 21
 
-# See if we need to emulate a missing ftruncate function using chsize.
+# See if we need to emulate a missing ftruncate function using _chsize.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -20,7 +20,7 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
           dnl The MSVCRT _chsize() function only accepts a 32-bit file size,
           dnl and the mingw64 ftruncate64() function is unreliable (it may
           dnl delete the file, see
-          dnl <http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html>).
+          dnl <https://web.archive.org/web/20160425005423/http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html>).
           dnl Use gnulib's ftruncate() implementation instead.
           REPLACE_FTRUNCATE=1
           ;;
@@ -36,5 +36,5 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
 # Prerequisites of lib/ftruncate.c.
 AC_DEFUN([gl_PREREQ_FTRUNCATE],
 [
-  AC_CHECK_FUNCS([chsize])
+  AC_CHECK_FUNCS([_chsize])
 ])
index 019934d..6ec7a94 100644 (file)
@@ -1,12 +1,12 @@
 # getcwd.m4 - check for working getcwd that is compatible with glibc
 
-# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert.
-# serial 16
+# serial 19
 
 AC_DEFUN([gl_FUNC_GETCWD_NULL],
   [
@@ -21,12 +21,13 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
 #        else /* on Windows with MSVC */
 #         include <direct.h>
 #        endif
+         ]GL_MDA_DEFINES[
 #        ifndef getcwd
          char *getcwd ();
 #        endif
 ]], [[
 #if defined _WIN32 && ! defined __CYGWIN__
-/* mingw cwd does not start with '/', but getcwd does allocate.
+/* mingw cwd does not start with '/', but _getcwd does allocate.
    However, mingw fails to honor non-zero size.  */
 #else
            if (chdir ("/") != 0)
@@ -50,10 +51,12 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
         [[case "$host_os" in
                            # Guess yes on glibc systems.
             *-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 Cygwin.
             cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
-                           # If we don't know, assume the worst.
-            *)             gl_cv_func_getcwd_null="guessing no";;
+                           # If we don't know, obey --enable-cross-guesses.
+            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
           esac
         ]])])
 ])
@@ -64,7 +67,8 @@ AC_DEFUN([gl_FUNC_GETCWD_SIGNATURE],
     [gl_cv_func_getcwd_posix_signature],
     [AC_COMPILE_IFELSE(
       [AC_LANG_PROGRAM(
-         [[#include <unistd.h>]],
+         [[#include <unistd.h>
+         ]GL_MDA_DEFINES],
          [[extern
            #ifdef __cplusplus
            "C"
@@ -125,7 +129,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
   dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
   dnl if appropriate.
   case "$gl_cv_func_getcwd_path_max" in
-    "no"|"no, it has the AIX bug") ;;
+    *"no" | *"no, it has the AIX bug") ;;
     *)
       AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
         [Define to 1 if getcwd minimally works, that is, its result can be
@@ -133,12 +137,12 @@ AC_DEFUN([gl_FUNC_GETCWD],
       ;;
   esac
   case "$gl_cv_func_getcwd_path_max" in
-    "no, but it is partly working")
+    *"no, but it is partly working")
       AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
         [Define to 1 if getcwd works, except it sometimes fails when it
          shouldn't, setting errno to ERANGE, ENAMETOOLONG, or ENOENT.])
       ;;
-    "yes, but with shorter paths")
+    *"yes, but with shorter paths")
       AC_DEFINE([HAVE_GETCWD_SHORTER], [1],
         [Define to 1 if getcwd works, but with shorter paths
          than is generally tested with the replacement.])
index 4cc1a8f..8fbc941 100644 (file)
@@ -1,5 +1,5 @@
-# getdtablesize.m4 serial 7
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# getdtablesize.m4 serial 8
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -29,13 +29,16 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
            dnl correctly require setrlimit before getdtablesize() can report
            dnl a larger value.
            AC_RUN_IFELSE([
-             AC_LANG_PROGRAM([[#include <unistd.h>]],
-               [int size = getdtablesize();
-                if (dup2 (0, getdtablesize()) != -1)
-                  return 1;
-                if (size != getdtablesize())
-                  return 2;
-               ])],
+             AC_LANG_PROGRAM(
+               [[#include <unistd.h>]
+                GL_MDA_DEFINES
+               ],
+               [[int size = getdtablesize();
+                 if (dup2 (0, getdtablesize()) != -1)
+                   return 1;
+                 if (size != getdtablesize())
+                   return 2;
+               ]])],
              [gl_cv_func_getdtablesize_works=yes],
              [gl_cv_func_getdtablesize_works=no],
              [case "$host_os" in
index 0496250..bb95c5e 100644 (file)
@@ -1,5 +1,5 @@
-# getopt.m4 serial 46
-dnl Copyright (C) 2002-2006, 2008-2018 Free Software Foundation, Inc.
+# getopt.m4 serial 47
+dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -302,8 +302,10 @@ dnl is ambiguous with environment values that contain newlines.
            ]])],
         [gl_cv_func_getopt_gnu=yes],
         [gl_cv_func_getopt_gnu=no],
-        [dnl Cross compiling. Assume the worst, even on glibc platforms.
-         gl_cv_func_getopt_gnu="guessing no"
+        [dnl Cross compiling.
+         dnl Assume the worst, even on glibc platforms.
+         dnl But obey --enable-cross-guesses.
+         gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
         ])
        case $gl_had_POSIXLY_CORRECT in
          exported) ;;
index eb17d60..7e61801 100644 (file)
@@ -1,5 +1,5 @@
 # getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2018 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 3a9ba8b..65917d6 100644 (file)
@@ -1,6 +1,6 @@
 # getprogname.m4 - check for getprogname or replacements for it
 
-# Copyright (C) 2016-2018 Free Software Foundation, Inc.
+# Copyright (C) 2016-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4
new file mode 100644 (file)
index 0000000..5f174dc
--- /dev/null
@@ -0,0 +1,68 @@
+# getrandom.m4 serial 8
+dnl Copyright 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_FUNC_GETRANDOM],
+[
+  AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+  AC_CHECK_FUNCS_ONCE([getrandom])
+  if test "$ac_cv_func_getrandom" != yes; then
+    HAVE_GETRANDOM=0
+  else
+    dnl On Solaris 11.4 the return type is 'int', not 'ssize_t'.
+    AC_CACHE_CHECK([whether getrandom is compatible with its GNU+BSD signature],
+      [gl_cv_func_getrandom_ok],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* Additional includes are needed before <sys/random.h> on uClibc
+                 and Mac OS X.  */
+              #include <sys/types.h>
+              #include <stdlib.h>
+              #include <sys/random.h>
+              ssize_t getrandom (void *, size_t, unsigned int);
+            ]],
+            [[]])
+         ],
+         [gl_cv_func_getrandom_ok=yes],
+         [gl_cv_func_getrandom_ok=no])
+      ])
+    if test $gl_cv_func_getrandom_ok = no; then
+      REPLACE_GETRANDOM=1
+    fi
+  fi
+
+  case "$host_os" in
+    mingw*)
+      AC_CHECK_HEADERS([bcrypt.h], [], [],
+        [[#include <windows.h>
+        ]])
+      AC_CACHE_CHECK([whether the bcrypt library is guaranteed to be present],
+        [gl_cv_lib_assume_bcrypt],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <windows.h>]],
+              [[#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
+                  cannot assume it
+                #endif
+              ]])
+           ],
+           [gl_cv_lib_assume_bcrypt=yes],
+           [gl_cv_lib_assume_bcrypt=no])
+        ])
+      if test $gl_cv_lib_assume_bcrypt = yes; then
+        AC_DEFINE([HAVE_LIB_BCRYPT], [1],
+          [Define to 1 if the bcrypt library is guaranteed to be present.])
+        LIB_GETRANDOM='-lbcrypt'
+      else
+        LIB_GETRANDOM='-ladvapi32'
+      fi
+      ;;
+    *)
+      LIB_GETRANDOM= ;;
+  esac
+  AC_SUBST([LIB_GETRANDOM])
+])
index 671b70d..de7c330 100644 (file)
@@ -1,5 +1,5 @@
 # gettime.m4 serial 9
-dnl Copyright (C) 2002, 2004-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 198695e..37c5440 100644 (file)
@@ -1,6 +1,6 @@
-# serial 25
+# serial 29
 
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -9,17 +9,16 @@ dnl From Jim Meyering.
 
 AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
 [
-  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+  AC_REQUIRE([gl_SYS_TIME_H])
   AC_CHECK_FUNCS_ONCE([gettimeofday])
 
   gl_gettimeofday_timezone=void
   if test $ac_cv_func_gettimeofday != yes; then
     HAVE_GETTIMEOFDAY=0
   else
-    gl_FUNC_GETTIMEOFDAY_CLOBBER
     AC_CACHE_CHECK([for gettimeofday with POSIX signature],
       [gl_cv_func_gettimeofday_posix_signature],
       [AC_COMPILE_IFELSE(
@@ -66,61 +65,5 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
      declaration of the second argument to gettimeofday.])
 ])
 
-
-dnl See if gettimeofday clobbers the static buffer that localtime uses
-dnl for its return value.  The gettimeofday function from Mac OS X 10.0.4
-dnl (i.e., Darwin 1.3.7) has this problem.
-dnl
-dnl If it does, then arrange to use gettimeofday and localtime only via
-dnl the wrapper functions that work around the problem.
-
-AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
-[
- AC_REQUIRE([gl_HEADER_SYS_TIME_H])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-
- AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
-  [gl_cv_func_gettimeofday_clobber],
-  [AC_RUN_IFELSE(
-     [AC_LANG_PROGRAM(
-        [[#include <string.h>
-          #include <sys/time.h>
-          #include <time.h>
-          #include <stdlib.h>
-        ]],
-        [[
-          time_t t = 0;
-          struct tm *lt;
-          struct tm saved_lt;
-          struct timeval tv;
-          lt = localtime (&t);
-          saved_lt = *lt;
-          gettimeofday (&tv, NULL);
-          return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
-        ]])],
-     [gl_cv_func_gettimeofday_clobber=no],
-     [gl_cv_func_gettimeofday_clobber=yes],
-     [# When cross-compiling:
-      case "$host_os" in
-                       # Guess all is fine on glibc systems.
-        *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # Guess no on native Windows.
-        mingw*)        gl_cv_func_gettimeofday_clobber="guessing no" ;;
-                       # If we don't know, assume the worst.
-        *)             gl_cv_func_gettimeofday_clobber="guessing yes" ;;
-      esac
-     ])])
-
- case "$gl_cv_func_gettimeofday_clobber" in
-   *yes)
-     REPLACE_GETTIMEOFDAY=1
-     AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
-       [Define if gettimeofday clobbers the localtime buffer.])
-     gl_LOCALTIME_BUFFER_NEEDED
-     ;;
- esac
-])
-
 # Prerequisites of lib/gettimeofday.c.
 AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
deleted file mode 100644 (file)
index 126aa1a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-# glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2018 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-# Test for the GNU C Library, version 2.1 or newer, or uClibc.
-# From Bruno Haible.
-
-AC_DEFUN([gl_GLIBC21],
-  [
-    AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
-      [ac_cv_gnu_library_2_1],
-      [AC_EGREP_CPP([Lucky],
-        [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
-  Lucky GNU user
- #endif
-#endif
-#ifdef __UCLIBC__
- Lucky user
-#endif
-        ],
-        [ac_cv_gnu_library_2_1=yes],
-        [ac_cv_gnu_library_2_1=no])
-      ]
-    )
-    AC_SUBST([GLIBC21])
-    GLIBC21="$ac_cv_gnu_library_2_1"
-  ]
-)
index 507dad6..9a5b676 100644 (file)
@@ -1,6 +1,6 @@
 # Determine whether recent-enough GNU Make is being used.
 
-# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 2b253da..2872ecd 100644 (file)
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 41
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 66
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,17 +12,41 @@ AC_DEFUN([gl_COMMON], [
   dnl Use AC_REQUIRE here, so that the code is expanded once only.
   AC_REQUIRE([gl_00GNULIB])
   AC_REQUIRE([gl_COMMON_BODY])
+  AC_REQUIRE([gl_ZZGNULIB])
 ])
 AC_DEFUN([gl_COMMON_BODY], [
+  AH_VERBATIM([_GL_GNUC_PREREQ],
+[/* True if the compiler says it groks GNU C version MAJOR.MINOR.  */
+#if defined __GNUC__ && defined __GNUC_MINOR__
+# define _GL_GNUC_PREREQ(major, minor) \
+    ((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#else
+# define _GL_GNUC_PREREQ(major, minor) 0
+#endif
+])
   AH_VERBATIM([_Noreturn],
 [/* The _Noreturn keyword of C11.  */
 #ifndef _Noreturn
-# if 201103 <= (defined __cplusplus ? __cplusplus : 0)
+# if (defined __cplusplus \
+      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
+          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
+      && 0)
+    /* [[noreturn]] is not practically usable, because with it the syntax
+         extern _Noreturn void func (...);
+       would not be valid; such a declaration would only be valid with 'extern'
+       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
+       AIX system header files and several gnulib header files use precisely
+       this syntax with 'extern'.  */
 #  define _Noreturn [[noreturn]]
-# elif (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
-        || 4 < __GNUC__ + (7 <= __GNUC_MINOR__))
+# elif ((!defined __cplusplus || defined __clang__) \
+        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
+            || (!defined __STRICT_ANSI__ \
+                && (_GL_GNUC_PREREQ (4, 7) \
+                    || (defined __apple_build_version__ \
+                        ? 6000000 <= __apple_build_version__ \
+                        : 3 < __clang_major__ + (5 <= __clang_minor__))))))
    /* _Noreturn works as-is.  */
-# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
+# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
 #  define _Noreturn __attribute__ ((__noreturn__))
 # elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
 #  define _Noreturn __declspec (noreturn)
@@ -41,50 +65,313 @@ AC_DEFUN([gl_COMMON_BODY], [
 #if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
 # define __GNUC_STDC_INLINE__ 1
 #endif])
-  AH_VERBATIM([unused_parameter],
-[/* Define as a marker that can be attached to declarations that might not
-    be used.  This helps to reduce warnings, such as from
-    GCC -Wunused-parameter.  */
-#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-# define _GL_UNUSED __attribute__ ((__unused__))
+  AH_VERBATIM([attribute],
+[/* Attributes.  */
+#if (defined __has_attribute \
+     && (!defined __clang_minor__ \
+         || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
+#else
+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
+# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
+# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
+# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
+# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
+# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
+# ifdef _ICC
+#  define _GL_ATTR_may_alias 0
+# else
+#  define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# endif
+# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
+# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
+# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
+# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
+# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
+# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
+#endif
+
+#ifdef __has_c_attribute
+# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
 #else
-# define _GL_UNUSED
-#endif
-/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
-   is a misnomer outside of parameter lists.  */
-#define _UNUSED_PARAMETER_ _GL_UNUSED
-
-/* gcc supports the "unused" attribute on possibly unused labels, and
-   g++ has since version 4.5.  Note to support C++ as well as C,
-   _GL_UNUSED_LABEL should be used with a trailing ;  */
-#if !defined __cplusplus || __GNUC__ > 4 \
-    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
-# define _GL_UNUSED_LABEL _GL_UNUSED
+# define _GL_HAS_C_ATTRIBUTE(attr) 0
+#endif
+
+]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
+[
+#if _GL_HAS_ATTRIBUTE (alloc_size)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
 #else
-# define _GL_UNUSED_LABEL
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
 #endif
 
-/* The __pure__ attribute was added in gcc 2.96.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#if _GL_HAS_ATTRIBUTE (always_inline)
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+#else
+# define _GL_ATTRIBUTE_ALWAYS_INLINE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (artificial)
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+#else
+# define _GL_ATTRIBUTE_ARTIFICIAL
+#endif
+
+/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
+   <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
+   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__))
+# else
+#  define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
 #else
-# define _GL_ATTRIBUTE_PURE /* empty */
+# define _GL_ATTRIBUTE_COLD
 #endif
 
-/* The __const__ attribute was added in gcc 2.95.  */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+#if _GL_HAS_ATTRIBUTE (const)
 # define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
 #else
-# define _GL_ATTRIBUTE_CONST /* empty */
+# define _GL_ATTRIBUTE_CONST
+#endif
+
+/* _GL_ATTRIBUTE_DEALLOC (F, I) is for functions returning pointers
+   that can be freed by passing them as the Ith argument to the
+   function F.  _GL_ATTRIBUTE_DEALLOC_FREE is for functions that
+   return pointers that can be freed via 'free'; it can be used
+   only after including stdlib.h.  */
+#if _GL_GNUC_PREREQ (11, 0)
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+#else
+# define _GL_ATTRIBUTE_DEALLOC(f, i)
+#endif
+#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+
+#if _GL_HAS_C_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+#elif _GL_HAS_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+#else
+# define _GL_ATTRIBUTE_DEPRECATED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (error)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+#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
+
+#if _GL_HAS_ATTRIBUTE (externally_visible)
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+#else
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#endif
+
+/* FALLTHROUGH is special, because it always expands to something.  */
+#if _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)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (format)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+#else
+# define _GL_ATTRIBUTE_FORMAT(spec)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (leaf)
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+#else
+# define _GL_ATTRIBUTE_LEAF
 #endif
 
-/* The __malloc__ attribute was added in gcc 3.  */
-#if 3 <= __GNUC__
+/* 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
+#endif
+
+#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+#else
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+#endif
+/* Earlier spellings of this macro.  */
+#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
+
+#if _GL_HAS_ATTRIBUTE (malloc)
 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
 #else
-# define _GL_ATTRIBUTE_MALLOC /* empty */
+# define _GL_ATTRIBUTE_MALLOC
+#endif
+
+#if _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
+#endif
+
+#if _GL_HAS_ATTRIBUTE (noinline)
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+#else
+# define _GL_ATTRIBUTE_NOINLINE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonnull)
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+#else
+# define _GL_ATTRIBUTE_NONNULL(args)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (nonstring)
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+#else
+# define _GL_ATTRIBUTE_NONSTRING
+#endif
+
+/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead.  */
+
+#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+#else
+# define _GL_ATTRIBUTE_NOTHROW
+#endif
+
+#if _GL_HAS_ATTRIBUTE (packed)
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+#else
+# define _GL_ATTRIBUTE_PACKED
+#endif
+
+#if _GL_HAS_ATTRIBUTE (pure)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE
+#endif
+
+#if _GL_HAS_ATTRIBUTE (returns_nonnull)
+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+#else
+# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#endif
+
+#if _GL_HAS_ATTRIBUTE (sentinel)
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+#else
+# define _GL_ATTRIBUTE_SENTINEL(pos)
+#endif
+
+#if _GL_HAS_ATTRIBUTE (unused)
+# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_ATTRIBUTE_UNUSED
+#endif
+/* Earlier spellings of this macro.  */
+#define _GL_UNUSED _GL_ATTRIBUTE_UNUSED
+
+]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
+[
+/* To support C++ as well as C, use _GL_UNUSED_LABEL with trailing ';'.  */
+#if !defined __cplusplus || _GL_GNUC_PREREQ (4, 5)
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#else
+# define _GL_UNUSED_LABEL
 #endif
 ])
+  AH_VERBATIM([async_safe],
+[/* The _GL_ASYNC_SAFE marker should be attached to functions that are
+   signal handlers (for signals other than SIGABRT, SIGPIPE) or can be
+   invoked from such signal handlers.  Such functions have some restrictions:
+     * All functions that it calls should be marked _GL_ASYNC_SAFE as well,
+       or should be listed as async-signal-safe in POSIX
+       <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04>
+       section 2.4.3.  Note that malloc(), sprintf(), and fwrite(), in
+       particular, are NOT async-signal-safe.
+     * All memory locations (variables and struct fields) that these functions
+       access must be marked 'volatile'.  This holds for both read and write
+       accesses.  Otherwise the compiler might optimize away stores to and
+       reads from such locations that occur in the program, depending on its
+       data flow analysis.  For example, when the program contains a loop
+       that is intended to inspect a variable set from within a signal handler
+           while (!signal_occurred)
+             ;
+       the compiler is allowed to transform this into an endless loop if the
+       variable 'signal_occurred' is not declared 'volatile'.
+   Additionally, recall that:
+     * A signal handler should not modify errno (except if it is a handler
+       for a fatal signal and ends by raising the same signal again, thus
+       provoking the termination of the process).  If it invokes a function
+       that may clobber errno, it needs to save and restore the value of
+       errno.  */
+#define _GL_ASYNC_SAFE
+])
+  AH_VERBATIM([micro_optimizations],
+[/* _GL_CMP (n1, n2) performs a three-valued comparison on n1 vs. n2, where
+   n1 and n2 are expressions without side effects, that evaluate to real
+   numbers (excluding NaN).
+   It returns
+     1  if n1 > n2
+     0  if n1 == n2
+     -1 if n1 < n2
+   The naïve code   (n1 > n2 ? 1 : n1 < n2 ? -1 : 0)  produces a conditional
+   jump with nearly all GCC versions up to GCC 10.
+   This variant     (n1 < n2 ? -1 : n1 > n2)  produces a conditional with many
+   GCC versions up to GCC 9.
+   The better code  (n1 > n2) - (n1 < n2)  from Hacker's Delight § 2-9
+   avoids conditional jumps in all GCC versions >= 3.4.  */
+#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
+])
+  dnl Hint which direction to take regarding cross-compilation guesses:
+  dnl When a user installs a program on a platform they are not intimately
+  dnl familiar with, --enable-cross-guesses=conservative is the appropriate
+  dnl choice.  It implements the "If we don't know, assume the worst" principle.
+  dnl However, when an operating system developer (on a platform which is not
+  dnl yet known to gnulib) builds packages for their platform, they want to
+  dnl expose, not hide, possible platform bugs; in this case,
+  dnl --enable-cross-guesses=risky is the appropriate choice.
+  dnl Sets the variables
+  dnl gl_cross_guess_normal    (to be used when 'yes' is good and 'no' is bad),
+  dnl gl_cross_guess_inverted  (to be used when 'no' is good and 'yes' is bad).
+  AC_ARG_ENABLE([cross-guesses],
+    [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+       [specify policy for cross-compilation guesses])],
+    [if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
+       AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
+       enableval=conservative
+     fi
+     gl_cross_guesses="$enableval"],
+    [gl_cross_guesses=conservative])
+  if test $gl_cross_guesses = risky; then
+    gl_cross_guess_normal="guessing yes"
+    gl_cross_guess_inverted="guessing no"
+  else
+    gl_cross_guess_normal="guessing no"
+    gl_cross_guess_inverted="guessing yes"
+  fi
   dnl Preparation for running test programs:
   dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
   dnl to /dev/tty, so they can be redirected to log files.  Such diagnostics
@@ -93,6 +380,16 @@ AC_DEFUN([gl_COMMON_BODY], [
   export LIBC_FATAL_STDERR_
 ])
 
+# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename])
+# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename], [initialvalue])
+# initializes the shell variable that indicates the presence of the given module
+# as a C preprocessor expression.
+AC_DEFUN([gl_MODULE_INDICATOR_INIT_VARIABLE],
+[
+  GL_MODULE_INDICATOR_PREFIX[]_[$1]=m4_if([$2], , [0], [$2])
+  AC_SUBST(GL_MODULE_INDICATOR_PREFIX[]_[$1])
+])
+
 # gl_MODULE_INDICATOR_CONDITION
 # expands to a C preprocessor expression that evaluates to 1 or 0, depending
 # whether a gnulib module that has been requested shall be considered present
@@ -105,9 +402,9 @@ m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
 AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
 [
   gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
-    [GNULIB_[]m4_translit([[$1]],
-                          [abcdefghijklmnopqrstuvwxyz./-],
-                          [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+    [GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]m4_translit([[$1]],
+                                                       [abcdefghijklmnopqrstuvwxyz./-],
+                                                       [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
     [gl_MODULE_INDICATOR_CONDITION])
 ])
 
@@ -219,34 +516,20 @@ AC_DEFUN([gl_FEATURES_H],
   AC_SUBST([HAVE_FEATURES_H])
 ])
 
-# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
-# ----------------------------------------------------
-# Backport of autoconf-2.63b's macro.
-# Remove this macro when we can assume autoconf >= 2.64.
-m4_ifndef([AS_VAR_IF],
-[m4_define([AS_VAR_IF],
-[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
-
 # gl_PROG_CC_C99
 # Modifies the value of the shell variable CC in an attempt to make $CC
 # understand ISO C99 source code.
-# This is like AC_PROG_CC_C99, except that
-# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00367.html>,
-#   but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00441.html>.
-# Remaining problems:
-# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options
-#   to CC twice
-#   <https://lists.gnu.org/r/bug-gnulib/2011-09/msg00431.html>.
-# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard.
 AC_DEFUN([gl_PROG_CC_C99],
 [
-  dnl Change that version number to the minimum Autoconf version that supports
-  dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls.
-  m4_version_prereq([9.0],
-    [AC_REQUIRE([AC_PROG_CC_C99])],
-    [AC_REQUIRE([AC_PROG_CC_STDC])])
+  dnl Just use AC_PROG_CC_C99.
+  dnl When AC_PROG_CC_C99 and AC_PROG_CC_STDC are used together, the substituted
+  dnl value of CC will contain the C99 enabling options twice. But this is only
+  dnl a cosmetic problem.
+  dnl With Autoconf >= 2.70, use AC_PROG_CC since it implies AC_PROG_CC_C99;
+  dnl this avoids a "warning: The macro `AC_PROG_CC_C99' is obsolete."
+  m4_version_prereq([2.70],
+    [AC_REQUIRE([AC_PROG_CC])],
+    [AC_REQUIRE([AC_PROG_CC_C99])])
 ])
 
 # gl_PROG_AR_RANLIB
@@ -320,16 +603,16 @@ Amsterdam
 ])
 
 # AC_C_RESTRICT
-# This definition is copied from post-2.69 Autoconf and overrides the
-# AC_C_RESTRICT macro from autoconf 2.60..2.69.  It can be removed
-# once autoconf >= 2.70 can be assumed.  It's painful to check version
-# numbers, and in practice this macro is more up-to-date than Autoconf
-# is, so override Autoconf unconditionally.
+# This definition is copied from post-2.70 Autoconf and overrides the
+# AC_C_RESTRICT macro from autoconf 2.60..2.70.
+m4_version_prereq([2.70.1], [], [
 AC_DEFUN([AC_C_RESTRICT],
 [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+   # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
+   # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
+   # Put 'restrict' last, because C++ lacks it.
+   for ac_kw in __restrict__ __restrict _Restrict restrict; do
      AC_COMPILE_IFELSE(
       [AC_LANG_PROGRAM(
          [[typedef int *int_ptr;
@@ -349,14 +632,15 @@ AC_DEFUN([AC_C_RESTRICT],
  AH_VERBATIM([restrict],
 [/* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
+   supported only directly.  */
 #undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
-   __restrict__, even though the corresponding Sun C compiler ends up with
-   "#define restrict _Restrict" or "#define restrict __restrict__" in the
-   previous line.  Perhaps some future version of Sun C++ will work with
-   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
-#if defined __SUNPRO_CC && !defined __RESTRICT
+/* Work around a bug in older versions of Sun C++, which did not
+   #define __restrict__ or support _Restrict or __restrict__
+   even though the corresponding Sun C compiler ended up with
+   "#define restrict _Restrict" or "#define restrict __restrict__"
+   in the previous line.  This workaround can be removed once
+   we assume Oracle Developer Studio 12.5 (2016) or later.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
 # define _Restrict
 # define __restrict__
 #endif])
@@ -366,6 +650,7 @@ AC_DEFUN([AC_C_RESTRICT],
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
 ])# AC_C_RESTRICT
+])
 
 # gl_BIGENDIAN
 # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
@@ -376,6 +661,22 @@ AC_DEFUN([gl_BIGENDIAN],
   AC_C_BIGENDIAN
 ])
 
+# A temporary file descriptor.
+# Must be less than 10, because dash 0.5.8 does not support redirections
+# with multi-digit file descriptors.
+m4_define([GL_TMP_FD], 9)
+
+# gl_SILENT(command)
+# executes command, but without the normal configure output.
+# This is useful when you want to invoke AC_CACHE_CHECK (or AC_CHECK_FUNC etc.)
+# inside another AC_CACHE_CHECK.
+AC_DEFUN([gl_SILENT],
+[
+  exec GL_TMP_FD>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null
+  $1
+  exec AS_MESSAGE_FD>&GL_TMP_FD GL_TMP_FD>&-
+])
+
 # gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
 # is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
 # output a spurious "(cached)" mark in the midst of other configure output.
@@ -383,12 +684,143 @@ AC_DEFUN([gl_BIGENDIAN],
 # by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
 AC_DEFUN([gl_CACHE_VAL_SILENT],
 [
-  saved_as_echo_n="$as_echo_n"
-  as_echo_n=':'
-  AC_CACHE_VAL([$1], [$2])
-  as_echo_n="$saved_as_echo_n"
+  gl_SILENT([
+    AC_CACHE_VAL([$1], [$2])
+  ])
+])
+
+# gl_CC_ALLOW_WARNINGS
+# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option
+# that reverts a preceding '-Werror' option, if available.
+# This is expected to be '-Wno-error' on gcc, clang (except clang/MSVC), xlclang
+# and empty otherwise.
+AC_DEFUN([gl_CC_ALLOW_WARNINGS],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([for C compiler option to allow warnings],
+    [gl_cv_cc_wallow],
+    [rm -f conftest*
+     echo 'int dummy;' > conftest.c
+     AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err]) >/dev/null
+     AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err]) >/dev/null
+     dnl Test the number of error output lines, because AIX xlc accepts the
+     dnl option '-Wno-error', just to produce a warning
+     dnl "Option -Wno-error was incorrectly specified. The option will be ignored."
+     dnl afterwards.
+     if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+       gl_cv_cc_wallow='-Wno-error'
+     else
+       gl_cv_cc_wallow=none
+     fi
+     rm -f conftest*
+    ])
+  case "$gl_cv_cc_wallow" in
+    none) GL_CFLAG_ALLOW_WARNINGS='' ;;
+    *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
+  esac
+  AC_SUBST([GL_CFLAG_ALLOW_WARNINGS])
+])
+
+# gl_CXX_ALLOW_WARNINGS
+# sets and substitutes a variable GL_CXXFLAG_ALLOW_WARNINGS, to a $(CC) option
+# that reverts a preceding '-Werror' option, if available.
+AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
+[
+  dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX.
+  if test -n "$CXX" && test "$CXX" != no; then
+    AC_CACHE_CHECK([for C++ compiler option to allow warnings],
+      [gl_cv_cxx_wallow],
+      [rm -f conftest*
+       echo 'int dummy;' > conftest.cc
+       AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err]) >/dev/null
+       AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err]) >/dev/null
+       dnl Test the number of error output lines, because AIX xlC accepts the
+       dnl option '-Wno-error', just to produce a warning
+       dnl "Option -Wno-error was incorrectly specified. The option will be ignored."
+       dnl afterwards.
+       if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+         gl_cv_cxx_wallow='-Wno-error'
+       else
+         gl_cv_cxx_wallow=none
+       fi
+       rm -f conftest*
+      ])
+    case "$gl_cv_cxx_wallow" in
+      none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
+      *)    GL_CXXFLAG_ALLOW_WARNINGS="$gl_cv_cxx_wallow" ;;
+    esac
+  else
+    GL_CXXFLAG_ALLOW_WARNINGS=''
+  fi
+  AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS])
 ])
 
-# AS_VAR_COPY was added in autoconf 2.63b
-m4_define_default([AS_VAR_COPY],
-[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
+dnl Expands to some code for use in .c programs that, on native Windows, defines
+dnl the Microsoft deprecated alias function names to the underscore-prefixed
+dnl actual function names. With this macro, these function names are available
+dnl without linking with '-loldnames' and without generating warnings.
+dnl Usage: Use it after all system header files are included.
+dnl          #include <...>
+dnl          #include <...>
+dnl          ]GL_MDA_DEFINES[
+dnl          ...
+AC_DEFUN([GL_MDA_DEFINES],[
+AC_REQUIRE([_GL_MDA_DEFINES])
+[$gl_mda_defines]
+])
+AC_DEFUN([_GL_MDA_DEFINES],
+[gl_mda_defines='
+#if defined _WIN32 && !defined __CYGWIN__
+#define access    _access
+#define chdir     _chdir
+#define chmod     _chmod
+#define close     _close
+#define creat     _creat
+#define dup       _dup
+#define dup2      _dup2
+#define ecvt      _ecvt
+#define execl     _execl
+#define execle    _execle
+#define execlp    _execlp
+#define execv     _execv
+#define execve    _execve
+#define execvp    _execvp
+#define execvpe   _execvpe
+#define fcloseall _fcloseall
+#define fcvt      _fcvt
+#define fdopen    _fdopen
+#define fileno    _fileno
+#define gcvt      _gcvt
+#define getcwd    _getcwd
+#define getpid    _getpid
+#define getw      _getw
+#define isatty    _isatty
+#define j0        _j0
+#define j1        _j1
+#define jn        _jn
+#define lfind     _lfind
+#define lsearch   _lsearch
+#define lseek     _lseek
+#define memccpy   _memccpy
+#define mkdir     _mkdir
+#define mktemp    _mktemp
+#define open      _open
+#define putenv    _putenv
+#define putw      _putw
+#define read      _read
+#define rmdir     _rmdir
+#define strdup    _strdup
+#define swab      _swab
+#define tempnam   _tempnam
+#define tzset     _tzset
+#define umask     _umask
+#define unlink    _unlink
+#define utime     _utime
+#define wcsdup    _wcsdup
+#define write     _write
+#define y0        _y0
+#define y1        _y1
+#define yn        _yn
+#endif
+'
+])
index 77762b0..211d39f 100644 (file)
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,6 +58,9 @@ AC_DEFUN([gl_EARLY],
   # Code from module arpa_inet:
   # Code from module arpa_inet-tests:
   # Code from module assure:
+  # Code from module atoll:
+  # Code from module attribute:
+  # Code from module basename-lgpl:
   # Code from module binary-io:
   # Code from module binary-io-tests:
   # Code from module bind:
@@ -74,6 +77,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module c-strcase:
   # Code from module c-strcase-tests:
   # Code from module c-strcaseeq:
+  # Code from module c99:
+  # Code from module calloc-gnu:
+  # Code from module calloc-gnu-tests:
+  # Code from module calloc-posix:
   # Code from module careadlinkat:
   # Code from module clock-time:
   # Code from module cloexec:
@@ -90,11 +97,12 @@ AC_DEFUN([gl_EARLY],
   # Code from module dirname-lgpl:
   # Code from module dirname-tests:
   # Code from module do-release-commit-and-tag:
-  # Code from module dosname:
   # Code from module double-slash-root:
   # Code from module dtotimespec:
   # 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:
@@ -127,14 +135,18 @@ AC_DEFUN([gl_EARLY],
   # Code from module fnmatch-h:
   # Code from module fnmatch-h-tests:
   # Code from module fnmatch-tests:
+  # Code from module fopen:
+  # Code from module fopen-gnu:
+  # Code from module fopen-gnu-tests:
+  # Code from module fopen-tests:
   # Code from module fpieee:
   AC_REQUIRE([gl_FP_IEEE])
   # Code from module fpucw:
   # Code from module fputc-tests:
   # Code from module fread-tests:
+  # Code from module free-posix:
+  # Code from module free-posix-tests:
   # Code from module freopen:
-  # Code from module freopen-safer:
-  # Code from module freopen-safer-tests:
   # Code from module freopen-tests:
   # Code from module fstat:
   # Code from module fstat-tests:
@@ -146,7 +158,6 @@ AC_DEFUN([gl_EARLY],
   # Code from module getcwd-lgpl-tests:
   # Code from module getdtablesize:
   # Code from module getdtablesize-tests:
-  # Code from module getopt:
   # Code from module getopt-gnu:
   # Code from module getopt-gnu-tests:
   # Code from module getopt-posix:
@@ -154,6 +165,8 @@ AC_DEFUN([gl_EARLY],
   # Code from module getpagesize:
   # Code from module getprogname:
   # Code from module getprogname-tests:
+  # Code from module getrandom:
+  # Code from module getrandom-tests:
   # Code from module gettext-h:
   # Code from module gettime:
   # Code from module gettimeofday:
@@ -166,15 +179,19 @@ AC_DEFUN([gl_EARLY],
   # Code from module gnupload:
   # Code from module gperf:
   # Code from module hard-locale:
+  # Code from module hard-locale-tests:
   # Code from module hash:
   # Code from module hash-pjw:
   # Code from module hash-tests:
   # Code from module havelib:
+  # Code from module host-cpu-c-abi:
+  # Code from module ialloc:
   # Code from module iconv:
   # Code from module iconv-h:
   # Code from module iconv-h-tests:
   # Code from module iconv-tests:
   # Code from module iconv_open:
+  # Code from module idx:
   # Code from module ignore-value:
   # Code from module ignore-value-tests:
   # Code from module include_next:
@@ -194,12 +211,16 @@ AC_DEFUN([gl_EARLY],
   # Code from module isblank-tests:
   # Code from module iswblank:
   # Code from module iswblank-tests:
+  # Code from module iswdigit:
+  # Code from module iswdigit-tests:
+  # Code from module iswxdigit:
+  # Code from module iswxdigit-tests:
   # Code from module langinfo:
   # Code from module langinfo-tests:
   # Code from module largefile:
   AC_REQUIRE([AC_SYS_LARGEFILE])
+  AC_REQUIRE([gl_YEAR2038_EARLY])
   # Code from module libc-config:
-  # Code from module libsigsegv:
   # Code from module limits-h:
   # Code from module limits-h-tests:
   # Code from module listen:
@@ -210,10 +231,12 @@ AC_DEFUN([gl_EARLY],
   # Code from module locale-tests:
   # Code from module localeconv:
   # Code from module localeconv-tests:
-  # Code from module localtime-buffer:
+  # Code from module lock:
   # Code from module lstat:
   # Code from module lstat-tests:
   # Code from module maintainer-makefile:
+  # Code from module malloc-gnu:
+  # Code from module malloc-gnu-tests:
   # Code from module malloc-posix:
   # Code from module malloca:
   # Code from module malloca-tests:
@@ -235,6 +258,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module mbuiter:
   # Code from module memchr:
   # Code from module memchr-tests:
+  # Code from module mempcpy:
   # Code from module minmax:
   # Code from module mkdir:
   # Code from module mkdir-tests:
@@ -263,6 +287,13 @@ AC_DEFUN([gl_EARLY],
   # Code from module pipe-posix-tests:
   # Code from module progname:
   # Code from module propername:
+  # Code from module pthread-h:
+  gl_ANYTHREADLIB_EARLY
+  # Code from module pthread-h-tests:
+  # Code from module pthread-thread:
+  # Code from module pthread-thread-tests:
+  # Code from module pthread_sigmask:
+  # Code from module pthread_sigmask-tests:
   # Code from module putenv:
   # Code from module quote:
   # Code from module quotearg:
@@ -275,15 +306,22 @@ AC_DEFUN([gl_EARLY],
   # Code from module readlink:
   # Code from module readlink-tests:
   # Code from module readme-release:
+  # Code from module realloc-gnu:
+  # Code from module realloc-gnu-tests:
+  # Code from module realloc-posix:
+  # Code from module reallocarray:
+  # Code from module reallocarray-tests:
   # Code from module regex:
   # Code from module regex-tests:
   # Code from module same-inode:
+  # Code from module sched:
+  # Code from module sched-tests:
   # Code from module select:
   # Code from module select-tests:
   # Code from module setenv:
   # Code from module setenv-tests:
-  # Code from module setlocale:
-  # Code from module setlocale-tests:
+  # Code from module setlocale-null:
+  # Code from module setlocale-null-tests:
   # Code from module setsockopt:
   # Code from module setsockopt-tests:
   # Code from module sh-quote:
@@ -295,13 +333,14 @@ AC_DEFUN([gl_EARLY],
   # Code from module signal-h-tests:
   # Code from module sigprocmask:
   # Code from module sigprocmask-tests:
+  # Code from module sigsegv:
+  # Code from module sigsegv-tests:
   # Code from module size_max:
   # Code from module sleep:
   # Code from module sleep-tests:
   # Code from module snippet/_Noreturn:
   # Code from module snippet/arg-nonnull:
   # Code from module snippet/c++defs:
-  # Code from module snippet/unused-parameter:
   # Code from module snippet/warn-on-use:
   # Code from module snprintf:
   # Code from module snprintf-tests:
@@ -316,12 +355,14 @@ AC_DEFUN([gl_EARLY],
   # Code from module stat-tests:
   # Code from module stat-time:
   # Code from module stat-time-tests:
+  # Code from module std-gnu11:
   # Code from module stdalign:
   # Code from module stdalign-tests:
   # Code from module stdarg:
   dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
   dnl for the builtin va_copy to work.  gl_PROG_CC_C99 arranges for this.
   gl_PROG_CC_C99
+  # Code from module stdarg-tests:
   # Code from module stdbool:
   # Code from module stdbool-tests:
   # Code from module stddef:
@@ -332,6 +373,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module stdio-tests:
   # Code from module stdlib:
   # Code from module stdlib-tests:
+  # Code from module stdopen:
   # Code from module strcase:
   # Code from module streq:
   # Code from module strerror:
@@ -339,26 +381,26 @@ AC_DEFUN([gl_EARLY],
   # Code from module strerror-tests:
   # Code from module strerror_r-posix:
   # Code from module strerror_r-posix-tests:
-  # Code from module strftime:
   # Code from module striconv:
   # Code from module striconv-tests:
   # Code from module string:
   # Code from module string-tests:
   # Code from module strings:
   # Code from module strings-tests:
-  # Code from module strndup:
   # Code from module strnlen:
   # Code from module strnlen-tests:
   # Code from module strnlen1:
   # Code from module strptime:
-  # Code from module strtoull:
-  # Code from module strtoull-tests:
-  # Code from module strtoumax:
-  # Code from module strtoumax-tests:
+  # Code from module strtoimax:
+  # Code from module strtoimax-tests:
+  # Code from module strtoll:
+  # Code from module strtoll-tests:
   # Code from module symlink:
   # Code from module symlink-tests:
   # Code from module sys_ioctl:
   # Code from module sys_ioctl-tests:
+  # Code from module sys_random:
+  # Code from module sys_random-tests:
   # Code from module sys_select:
   # Code from module sys_select-tests:
   # Code from module sys_socket:
@@ -377,6 +419,10 @@ AC_DEFUN([gl_EARLY],
   # Code from module tempname:
   # Code from module test-framework-sh:
   # Code from module test-framework-sh-tests:
+  # Code from module thread:
+  # Code from module thread-tests:
+  # Code from module threadlib:
+  gl_THREADLIB_EARLY
   # Code from module time:
   # Code from module time-tests:
   # Code from module time_r:
@@ -400,12 +446,12 @@ AC_DEFUN([gl_EARLY],
   # Code from module uniwidth/width:
   # Code from module uniwidth/width-tests:
   # Code from module unlocked-io:
+  # Code from module unlocked-io-internal:
   # Code from module unsetenv:
   # Code from module unsetenv-tests:
   # Code from module update-copyright:
   # Code from module update-copyright-tests:
   # Code from module useless-if-before-free:
-  # Code from module vararrays:
   # Code from module vasnprintf:
   # Code from module vasnprintf-tests:
   # Code from module vasprintf:
@@ -428,19 +474,30 @@ AC_DEFUN([gl_EARLY],
   # Code from module wctype-h-tests:
   # Code from module wcwidth:
   # Code from module wcwidth-tests:
+  # Code from module windows-mutex:
+  # Code from module windows-once:
+  # Code from module windows-recmutex:
+  # Code from module windows-rwlock:
+  # Code from module windows-thread:
+  # Code from module windows-tls:
+  # Code from module wmemchr:
+  # Code from module wmempcpy:
   # Code from module xalloc:
   # Code from module xalloc-die:
   # Code from module xalloc-die-tests:
   # Code from module xalloc-oversized:
   # Code from module xfreopen:
+  # Code from module xmalloca:
   # Code from module xreadlink:
   # Code from module xsize:
+  # Code from module xstdopen:
+  # Code from module xstdopen-tests:
   # Code from module xstriconv:
-  # Code from module xstrndup:
+  # Code from module xstrtoimax:
+  # Code from module xstrtoimax-tests:
   # Code from module xstrtol:
+  # Code from module xstrtol-error:
   # Code from module xstrtol-tests:
-  # Code from module xstrtoumax:
-  # Code from module xstrtoumax-tests:
   # Code from module xvasprintf:
   # Code from module xvasprintf-tests:
 ])
@@ -459,6 +516,8 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
   m4_pushdef([gl_LIBSOURCES_LIST], [])
   m4_pushdef([gl_LIBSOURCES_DIR], [])
+  m4_pushdef([GL_MACRO_PREFIX], [gl])
+  m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
   gl_COMMON
   gl_source_base='lib'
   gl_FUNC_ALLOCA
@@ -470,6 +529,16 @@ AC_DEFUN([gl_INIT],
   gl_WCHAR_MODULE_INDICATOR([btowc])
   gl___BUILTIN_EXPECT
   gl_C_STACK
+  gl_FUNC_CALLOC_GNU
+  if test $REPLACE_CALLOC = 1; then
+    AC_LIBOBJ([calloc])
+  fi
+  gl_FUNC_CALLOC_POSIX
+  if test $REPLACE_CALLOC = 1; then
+    AC_LIBOBJ([calloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([calloc-posix])
+  AC_REQUIRE([AC_C_RESTRICT])
   AC_CHECK_FUNCS_ONCE([readlinkat])
   gl_CLOCK_TIME
   gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
@@ -480,16 +549,16 @@ AC_DEFUN([gl_INIT],
   gl_UNISTD_MODULE_INDICATOR([close])
   gl_CONFIG_H
   gl_CTYPE_H
-  gl_DIRNAME
+  gl_CTYPE_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR([dirname])
-  gl_DIRNAME_LGPL
   gl_DOUBLE_SLASH_ROOT
   gl_FUNC_DUP2
-  if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
+  if test $REPLACE_DUP2 = 1; then
     AC_LIBOBJ([dup2])
     gl_PREREQ_DUP2
   fi
   gl_UNISTD_MODULE_INDICATOR([dup2])
+  AC_PROG_MKDIR_P
   gl_ENVIRON
   gl_UNISTD_MODULE_INDICATOR([environ])
   gl_HEADER_ERRNO_H
@@ -508,6 +577,7 @@ AC_DEFUN([gl_INIT],
   fi
   gl_FCNTL_MODULE_INDICATOR([fcntl])
   gl_FCNTL_H
+  gl_FCNTL_H_REQUIRE_DEFAULTS
   gl_FILE_NAME_CONCAT
   gl_MODULE_INDICATOR([filenamecat])
   gl_FILE_NAME_CONCAT_LGPL
@@ -532,13 +602,31 @@ AC_DEFUN([gl_INIT],
   fi
   gl_MODULE_INDICATOR([fnmatch-gnu])
   gl_FNMATCH_H
+  gl_FNMATCH_H_REQUIRE_DEFAULTS
+  gl_FUNC_FOPEN
+  if test $REPLACE_FOPEN = 1; then
+    AC_LIBOBJ([fopen])
+    gl_PREREQ_FOPEN
+  fi
+  gl_STDIO_MODULE_INDICATOR([fopen])
+  gl_FUNC_FOPEN_GNU
+  if test $REPLACE_FOPEN = 1; then
+    AC_LIBOBJ([fopen])
+    gl_PREREQ_FOPEN
+  fi
+  gl_MODULE_INDICATOR([fopen-gnu])
+  gl_FUNC_FREE
+  if test $REPLACE_FREE = 1; then
+    AC_LIBOBJ([free])
+    gl_PREREQ_FREE
+  fi
+  gl_STDLIB_MODULE_INDICATOR([free-posix])
   gl_FUNC_FREOPEN
   if test $REPLACE_FREOPEN = 1; then
     AC_LIBOBJ([freopen])
     gl_PREREQ_FREOPEN
   fi
   gl_STDIO_MODULE_INDICATOR([freopen])
-  gl_MODULE_INDICATOR([freopen-safer])
   gl_FUNC_FSTAT
   if test $REPLACE_FSTAT = 1; then
     AC_LIBOBJ([fstat])
@@ -564,11 +652,23 @@ AC_DEFUN([gl_INIT],
   if test $REPLACE_GETOPT = 1; then
     AC_LIBOBJ([getopt])
     AC_LIBOBJ([getopt1])
-    dnl Arrange for unistd.h to include getopt.h.
-    GNULIB_GL_UNISTD_H_GETOPT=1
+    dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
+    gl_UNISTD_H_REQUIRE_DEFAULTS
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([getopt-posix])
+  gl_FUNC_GETPAGESIZE
+  if test $REPLACE_GETPAGESIZE = 1; then
+    AC_LIBOBJ([getpagesize])
   fi
-  AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
+  gl_UNISTD_MODULE_INDICATOR([getpagesize])
   gl_FUNC_GETPROGNAME
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  gl_FUNC_GETRANDOM
+  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
+    AC_LIBOBJ([getrandom])
+  fi
+  gl_SYS_RANDOM_MODULE_INDICATOR([getrandom])
   AC_SUBST([LIBINTL])
   AC_SUBST([LTLIBINTL])
   gl_GETTIME
@@ -589,10 +689,16 @@ AC_DEFUN([gl_INIT],
           m4_defn([m4_PACKAGE_VERSION])), [1], [],
         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
           [GNUmakefile=$GNUmakefile])])
+  AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
+  LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+  AC_SUBST([LIB_HARD_LOCALE])
+  AC_DEFUN([gl_HAVE_MODULE_HAVELIB])
+  AC_REQUIRE([gl_HOST_CPU_C_ABI])
   AM_ICONV
   m4_ifdef([gl_ICONV_MODULE_INDICATOR],
     [gl_ICONV_MODULE_INDICATOR([iconv])])
   gl_ICONV_H
+  gl_ICONV_H_REQUIRE_DEFAULTS
   gl_FUNC_ICONV_OPEN
   if test $REPLACE_ICONV_OPEN = 1; then
     AC_LIBOBJ([iconv_open])
@@ -605,10 +711,12 @@ AC_DEFUN([gl_INIT],
   gl_INTTOSTR
   gl_INTTYPES_H
   gl_INTTYPES_INCOMPLETE
+  gl_INTTYPES_H_REQUIRE_DEFAULTS
   gl_FUNC_ISBLANK
   if test $HAVE_ISBLANK = 0; then
     AC_LIBOBJ([isblank])
   fi
+  gl_MODULE_INDICATOR([isblank])
   gl_CTYPE_MODULE_INDICATOR([isblank])
   gl_FUNC_ISWBLANK
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
@@ -619,24 +727,43 @@ AC_DEFUN([gl_INIT],
     fi
   fi
   gl_WCTYPE_MODULE_INDICATOR([iswblank])
+  gl_FUNC_ISWDIGIT
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    :
+  else
+    if test $REPLACE_ISWDIGIT = 1; then
+      AC_LIBOBJ([iswdigit])
+    fi
+  fi
+  gl_WCTYPE_MODULE_INDICATOR([iswdigit])
+  gl_FUNC_ISWXDIGIT
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    :
+  else
+    if test $REPLACE_ISWXDIGIT = 1; then
+      AC_LIBOBJ([iswxdigit])
+    fi
+  fi
+  gl_WCTYPE_MODULE_INDICATOR([iswxdigit])
   gl_LANGINFO_H
+  gl_LANGINFO_H_REQUIRE_DEFAULTS
   AC_REQUIRE([gl_LARGEFILE])
   gl___INLINE
-  gl_LIBSIGSEGV
   gl_LIMITS_H
   gl_LOCALCHARSET
   dnl For backward compatibility. Some packages still use this.
   LOCALCHARSET_TESTS_ENVIRONMENT=
   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
   gl_LOCALE_H
+  gl_LOCALE_H_REQUIRE_DEFAULTS
   gl_FUNC_LOCALECONV
   if test $REPLACE_LOCALECONV = 1; then
     AC_LIBOBJ([localeconv])
     gl_PREREQ_LOCALECONV
   fi
   gl_LOCALE_MODULE_INDICATOR([localeconv])
-  AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-  AC_LIBOBJ([localtime-buffer])
+  gl_LOCK
+  gl_MODULE_INDICATOR([lock])
   gl_FUNC_LSTAT
   if test $REPLACE_LSTAT = 1; then
     AC_LIBOBJ([lstat])
@@ -646,7 +773,12 @@ AC_DEFUN([gl_INIT],
   AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
     [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
   AC_REQUIRE([AC_PROG_SED])
-  gl_FUNC_MALLOC_POSIX
+  AC_REQUIRE([AC_PROG_GREP])
+  gl_FUNC_MALLOC_GNU
+  if test $REPLACE_MALLOC = 1; then
+    AC_LIBOBJ([malloc])
+  fi
+  AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
   if test $REPLACE_MALLOC = 1; then
     AC_LIBOBJ([malloc])
   fi
@@ -657,6 +789,11 @@ AC_DEFUN([gl_INIT],
   gl_FUNC_MBRTOWC
   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
     AC_LIBOBJ([mbrtowc])
+    if test $REPLACE_MBSTATE_T = 1; then
+      AC_LIBOBJ([lc-charset-dispatch])
+      AC_LIBOBJ([mbtowc-lock])
+      gl_PREREQ_MBTOWC_LOCK
+    fi
     gl_PREREQ_MBRTOWC
   fi
   gl_WCHAR_MODULE_INDICATOR([mbrtowc])
@@ -678,23 +815,30 @@ AC_DEFUN([gl_INIT],
   gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
   gl_STRING_MODULE_INDICATOR([mbsstr])
   gl_FUNC_MBTOWC
-  if test $REPLACE_MBTOWC = 1; then
+  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
     AC_LIBOBJ([mbtowc])
     gl_PREREQ_MBTOWC
   fi
   gl_STDLIB_MODULE_INDICATOR([mbtowc])
   gl_MBITER
   gl_FUNC_MEMCHR
-  if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+  if test $REPLACE_MEMCHR = 1; then
     AC_LIBOBJ([memchr])
     gl_PREREQ_MEMCHR
   fi
   gl_STRING_MODULE_INDICATOR([memchr])
+  gl_FUNC_MEMPCPY
+  if test $HAVE_MEMPCPY = 0; then
+    AC_LIBOBJ([mempcpy])
+    gl_PREREQ_MEMPCPY
+  fi
+  gl_STRING_MODULE_INDICATOR([mempcpy])
   gl_MINMAX
   gl_FUNC_MKDIR
   if test $REPLACE_MKDIR = 1; then
     AC_LIBOBJ([mkdir])
   fi
+  gl_SYS_STAT_MODULE_INDICATOR([mkdir])
   gl_FUNC_MKSTEMP
   if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
     AC_LIBOBJ([mkstemp])
@@ -726,6 +870,10 @@ AC_DEFUN([gl_INIT],
   if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
     AC_LIBOBJ([nl_langinfo])
   fi
+  if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
+    AC_LIBOBJ([nl_langinfo-lock])
+    gl_PREREQ_NL_LANGINFO_LOCK
+  fi
   gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
   gl_FUNC_GNU_STRFTIME
   gl_FUNC_OPEN
@@ -760,6 +908,22 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_READLINK
   fi
   gl_UNISTD_MODULE_INDICATOR([readlink])
+  gl_FUNC_REALLOC_GNU
+  if test $REPLACE_REALLOC = 1; then
+    AC_LIBOBJ([realloc])
+  fi
+  gl_FUNC_REALLOC_POSIX
+  if test $REPLACE_REALLOC = 1; then
+    AC_LIBOBJ([realloc])
+  fi
+  gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+  gl_FUNC_REALLOCARRAY
+  if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
+    AC_LIBOBJ([reallocarray])
+    gl_PREREQ_REALLOCARRAY
+  fi
+  gl_MODULE_INDICATOR([reallocarray])
+  gl_STDLIB_MODULE_INDICATOR([reallocarray])
   gl_REGEX
   if test $ac_use_included_regex = yes; then
     AC_LIBOBJ([regex])
@@ -770,19 +934,49 @@ AC_DEFUN([gl_INIT],
     AC_LIBOBJ([setenv])
   fi
   gl_STDLIB_MODULE_INDICATOR([setenv])
-  gl_SIGACTION
-  if test $HAVE_SIGACTION = 0; then
-    AC_LIBOBJ([sigaction])
-    gl_PREREQ_SIGACTION
+  gl_FUNC_SETLOCALE_NULL
+  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    AC_LIBOBJ([setlocale-lock])
+    gl_PREREQ_SETLOCALE_LOCK
   fi
-  gl_SIGNAL_MODULE_INDICATOR([sigaction])
+  gl_LOCALE_MODULE_INDICATOR([setlocale_null])
+  AC_REQUIRE([AC_C_RESTRICT])
   gl_SIGNAL_H
-  gl_SIGNALBLOCKING
-  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
-    AC_LIBOBJ([sigprocmask])
-    gl_PREREQ_SIGPROCMASK
+  gl_SIGNAL_H_REQUIRE_DEFAULTS
+  AC_ARG_WITH([libsigsegv],
+    [AS_HELP_STRING([--with-libsigsegv],
+       [use the GNU libsigsegv library, when present, instead of the gnulib module 'sigsegv'])])
+  SIGSEGV_H=sigsegv.h
+  if test "$with_libsigsegv" = yes; then
+    gl_LIBSIGSEGV
+    if test "$gl_cv_lib_sigsegv" = yes; then
+      SIGSEGV_H=
+    fi
+  fi
+  AC_SUBST([SIGSEGV_H])
+  AM_CONDITIONAL([GL_GENERATE_SIGSEGV_H], [test -n "$SIGSEGV_H"])
+  if test -n "$SIGSEGV_H"; then
+    dnl Persuade glibc <sys/ucontext.h> to declare macros designating register
+    dnl indices: REG_RSP on x86_64, REG_ESP on i386.
+    dnl Persuade Solaris OpenIndiana <ucontext.h> to include <sys/regset.h>,
+    dnl which declares macros designating register indices, such as ESP on i386.
+    dnl Persuade Solaris OpenIndiana <unistd.h> to declare mincore().
+    AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+    AC_REQUIRE([AC_CANONICAL_HOST])
+    case "$host_os" in
+      solaris2.11)
+        AC_DEFINE([SOLARIS11], [1], [Define on Solaris 11 and its derivates.])
+        ;;
+    esac
+    gl_FUNC_MMAP_ANON
+    dnl Stack direction.
+    SV_STACK_DIRECTION
+    dnl Catching stack overflow requires an alternate signal stack.
+    dnl The old "install a guard page" trick would be unreliable, because
+    dnl we don't know where exactly to place the guard page.
+    SV_SIGALTSTACK
+    AC_CHECK_FUNCS_ONCE([getrlimit])
   fi
-  gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
   gl_SIZE_MAX
   gt_TYPE_SSIZE_T
   gl_FUNC_STAT
@@ -798,12 +992,39 @@ AC_DEFUN([gl_INIT],
   gl_SYS_STAT_MODULE_INDICATOR([stat])
   gl_STAT_TIME
   gl_STAT_BIRTHTIME
+  gl_STDALIGN_H
   gl_STDARG_H
   AM_STDBOOL_H
   gl_STDDEF_H
+  gl_STDDEF_H_REQUIRE_DEFAULTS
   gl_STDINT_H
   gl_STDIO_H
+  gl_STDIO_H_REQUIRE_DEFAULTS
+  dnl No need to create extra modules for these functions. Everyone who uses
+  dnl <stdio.h> likely needs them.
+  gl_STDIO_MODULE_INDICATOR([fscanf])
+  gl_MODULE_INDICATOR([fscanf])
+  gl_STDIO_MODULE_INDICATOR([scanf])
+  gl_MODULE_INDICATOR([scanf])
+  gl_STDIO_MODULE_INDICATOR([fgetc])
+  gl_STDIO_MODULE_INDICATOR([getc])
+  gl_STDIO_MODULE_INDICATOR([getchar])
+  gl_STDIO_MODULE_INDICATOR([fgets])
+  gl_STDIO_MODULE_INDICATOR([fread])
+  dnl No need to create extra modules for these functions. Everyone who uses
+  dnl <stdio.h> likely needs them.
+  gl_STDIO_MODULE_INDICATOR([fprintf])
+  gl_STDIO_MODULE_INDICATOR([printf])
+  gl_STDIO_MODULE_INDICATOR([vfprintf])
+  gl_STDIO_MODULE_INDICATOR([vprintf])
+  gl_STDIO_MODULE_INDICATOR([fputc])
+  gl_STDIO_MODULE_INDICATOR([putc])
+  gl_STDIO_MODULE_INDICATOR([putchar])
+  gl_STDIO_MODULE_INDICATOR([fputs])
+  gl_STDIO_MODULE_INDICATOR([puts])
+  gl_STDIO_MODULE_INDICATOR([fwrite])
   gl_STDLIB_H
+  gl_STDLIB_H_REQUIRE_DEFAULTS
   gl_STRCASE
   if test $HAVE_STRCASECMP = 0; then
     AC_LIBOBJ([strcasecmp])
@@ -829,13 +1050,10 @@ AC_DEFUN([gl_INIT],
     gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
     gl_libdeps="$gl_libdeps $LIBICONV"
   fi
-  gl_HEADER_STRING_H
-  gl_HEADER_STRINGS_H
-  gl_FUNC_STRNDUP
-  if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
-    AC_LIBOBJ([strndup])
-  fi
-  gl_STRING_MODULE_INDICATOR([strndup])
+  gl_STRING_H
+  gl_STRING_H_REQUIRE_DEFAULTS
+  gl_STRINGS_H
+  gl_STRINGS_H_REQUIRE_DEFAULTS
   gl_FUNC_STRNLEN
   if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
     AC_LIBOBJ([strnlen])
@@ -848,28 +1066,39 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_STRPTIME
   fi
   gl_TIME_MODULE_INDICATOR([strptime])
-  gl_FUNC_STRTOULL
-  if test $HAVE_STRTOULL = 0; then
-    AC_LIBOBJ([strtoull])
-    gl_PREREQ_STRTOULL
-  fi
-  gl_STDLIB_MODULE_INDICATOR([strtoull])
-  gl_FUNC_STRTOUMAX
-  if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
-    AC_LIBOBJ([strtoumax])
-    gl_PREREQ_STRTOUMAX
-  fi
-  gl_INTTYPES_MODULE_INDICATOR([strtoumax])
-  gl_HEADER_SYS_STAT_H
+  gl_FUNC_STRTOIMAX
+  if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
+    AC_LIBOBJ([strtoimax])
+    gl_PREREQ_STRTOIMAX
+  fi
+  gl_INTTYPES_MODULE_INDICATOR([strtoimax])
+  gl_FUNC_STRTOLL
+  if test $HAVE_STRTOLL = 0 || test $REPLACE_STRTOLL = 1; then
+    AC_LIBOBJ([strtoll])
+    gl_PREREQ_STRTOLL
+  fi
+  gl_STDLIB_MODULE_INDICATOR([strtoll])
+  gl_SYS_RANDOM_H
+  gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
-  gl_HEADER_SYS_TIME_H
+  gl_SYS_STAT_H
+  gl_SYS_STAT_H_REQUIRE_DEFAULTS
+  AC_PROG_MKDIR_P
+  gl_SYS_TIME_H
+  gl_SYS_TIME_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
   gl_SYS_TYPES_H
+  gl_SYS_TYPES_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
   gl_SYS_WAIT_H
+  gl_SYS_WAIT_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
+  AC_REQUIRE([AC_C_RESTRICT])
   gl_FUNC_GEN_TEMPNAME
-  gl_HEADER_TIME_H
+  gl_MODULE_INDICATOR([tempname])
+  AC_REQUIRE([gl_THREADLIB])
+  gl_TIME_H
+  gl_TIME_H_REQUIRE_DEFAULTS
   gl_TIME_R
   if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
     AC_LIBOBJ([time_r])
@@ -889,19 +1118,45 @@ AC_DEFUN([gl_INIT],
   gl_TIME_MODULE_INDICATOR([timegm])
   gl_TIMESPEC
   gl_FUNC_TZSET
-  if test $HAVE_TZSET = 0 || test $REPLACE_TZSET = 1; then
+  if test $REPLACE_TZSET = 1; then
     AC_LIBOBJ([tzset])
   fi
   gl_TIME_MODULE_INDICATOR([tzset])
   gl_UNISTD_H
-  gl_LIBUNISTRING_LIBHEADER([0.9.4], [unistr.h])
+  gl_UNISTD_H_REQUIRE_DEFAULTS
+  gl_LIBUNISTRING_LIBHEADER([0.9.11], [unistr.h])
   gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
   gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr])
   gl_MODULE_INDICATOR([unistr/u8-uctomb])
   gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb])
-  gl_LIBUNISTRING_LIBHEADER([0.9.4], [unitypes.h])
-  gl_LIBUNISTRING_LIBHEADER([0.9.4], [uniwidth.h])
+  gl_LIBUNISTRING_LIBHEADER([0.9.11], [unitypes.h])
+  AH_VERBATIM([unitypes_restrict], [
+  /* This definition is a duplicate of the one in unitypes.h.
+     It is here so that we can cope with an older version of unitypes.h
+     that does not contain this definition and that is pre-installed among
+     the public header files.  */
+  # if defined __restrict \
+       || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+       || __clang_major__ >= 3
+  #  define _UC_RESTRICT __restrict
+  # elif 199901L <= __STDC_VERSION__ || defined restrict
+  #  define _UC_RESTRICT restrict
+  # else
+  #  define _UC_RESTRICT
+  # endif
+  ])
+  gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
   gl_LIBUNISTRING_MODULE([0.9.8], [uniwidth/width])
+  AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1],
+    [Define to 1 if you want the FILE stream functions getc, putc, etc.
+     to use unlocked I/O if available, throughout the package.
+     Unlocked I/O can improve performance, sometimes dramatically.
+     But unlocked I/O is safe only in single-threaded programs,
+     as well as in multithreaded programs for which you can guarantee that
+     every FILE stream, including stdin, stdout, stderr, is used only
+     in a single thread.])
+  AC_DEFINE([USE_UNLOCKED_IO], [GNULIB_STDIO_SINGLE_THREAD],
+    [An alias of GNULIB_STDIO_SINGLE_THREAD.])
   gl_FUNC_GLIBC_UNLOCKED_IO
   gl_FUNC_UNSETENV
   if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
@@ -909,7 +1164,7 @@ AC_DEFUN([gl_INIT],
     gl_PREREQ_UNSETENV
   fi
   gl_STDLIB_MODULE_INDICATOR([unsetenv])
-  AC_C_VARARRAYS
+  AC_REQUIRE([AC_C_RESTRICT])
   gl_FUNC_VASNPRINTF
   gl_FUNC_VASPRINTF
   gl_STDIO_MODULE_INDICATOR([vasprintf])
@@ -918,6 +1173,7 @@ AC_DEFUN([gl_INIT],
      AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
   gl_VERSION_ETC
   gl_WCHAR_H
+  gl_WCHAR_H_REQUIRE_DEFAULTS
   gl_FUNC_WCRTOMB
   if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
     AC_LIBOBJ([wcrtomb])
@@ -925,15 +1181,51 @@ AC_DEFUN([gl_INIT],
   fi
   gl_WCHAR_MODULE_INDICATOR([wcrtomb])
   gl_WCTYPE_H
+  gl_WCTYPE_H_REQUIRE_DEFAULTS
   gl_FUNC_WCWIDTH
   if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
     AC_LIBOBJ([wcwidth])
     gl_PREREQ_WCWIDTH
   fi
   gl_WCHAR_MODULE_INDICATOR([wcwidth])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-mutex])
+      ;;
+  esac
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-once])
+      ;;
+  esac
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-recmutex])
+      ;;
+  esac
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-rwlock])
+      ;;
+  esac
+  gl_FUNC_WMEMCHR
+  if test $HAVE_WMEMCHR = 0; then
+    AC_LIBOBJ([wmemchr])
+  fi
+  gl_WCHAR_MODULE_INDICATOR([wmemchr])
+  gl_FUNC_WMEMPCPY
+  if test $HAVE_WMEMPCPY = 0; then
+    AC_LIBOBJ([wmempcpy])
+  fi
+  gl_WCHAR_MODULE_INDICATOR([wmempcpy])
   gl_XALLOC
+  gl_MODULE_INDICATOR([xalloc])
+  gl_MODULE_INDICATOR([xalloc-die])
   gl_XSIZE
-  gl_XSTRNDUP
   gl_XSTRTOL
   gl_XVASPRINTF
   m4_ifdef([AM_XGETTEXT_OPTION],
@@ -950,6 +1242,8 @@ AC_DEFUN([gl_INIT],
       m4_if(m4_sysval, [0], [],
         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
   ])
+  m4_popdef([GL_MODULE_INDICATOR_PREFIX])
+  m4_popdef([GL_MACRO_PREFIX])
   m4_popdef([gl_LIBSOURCES_DIR])
   m4_popdef([gl_LIBSOURCES_LIST])
   m4_popdef([AC_LIBSOURCES])
@@ -976,7 +1270,11 @@ AC_DEFUN([gl_INIT],
   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
   m4_pushdef([gltests_LIBSOURCES_LIST], [])
   m4_pushdef([gltests_LIBSOURCES_DIR], [])
+  m4_pushdef([GL_MACRO_PREFIX], [gltests])
+  m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
   gl_COMMON
+  AC_REQUIRE([gl_CC_ALLOW_WARNINGS])
+  AC_REQUIRE([gl_CXX_ALLOW_WARNINGS])
   gl_source_base='gnulib-tests'
 changequote(,)dnl
   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
@@ -984,14 +1282,21 @@ changequote([, ])dnl
   AC_SUBST([gltests_WITNESS])
   gl_module_indicator_condition=$gltests_WITNESS
   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([accept])
   fi
   gl_SYS_SOCKET_MODULE_INDICATOR([accept])
-  gl_HEADER_ARPA_INET
+  gl_ARPA_INET_H
+  gl_ARPA_INET_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  gl_FUNC_ATOLL
+  if test $HAVE_ATOLL = 0; then
+    AC_LIBOBJ([atoll])
+    gl_PREREQ_ATOLL
+  fi
+  gl_STDLIB_MODULE_INDICATOR([atoll])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([bind])
   fi
@@ -1000,7 +1305,7 @@ changequote([, ])dnl
   gt_LOCALE_FR_UTF8
   gt_LOCALE_FR
   gt_LOCALE_TR_UTF8
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([connect])
   fi
@@ -1022,13 +1327,11 @@ changequote([, ])dnl
     AC_LIBOBJ([getcwd-lgpl])
   fi
   gl_UNISTD_MODULE_INDICATOR([getcwd])
-  gl_FUNC_GETPAGESIZE
-  if test $REPLACE_GETPAGESIZE = 1; then
-    AC_LIBOBJ([getpagesize])
-  fi
-  gl_UNISTD_MODULE_INDICATOR([getpagesize])
+  gl_MUSL_LIBC
+  dnl Distinguish OpenBSD >= 6.2 from OpenBSD < 6.2.
+  AC_CHECK_FUNCS_ONCE([duplocale])
   gl_FUNC_INET_PTON
-  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
+  if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1; then
     AC_LIBOBJ([inet_pton])
     gl_PREREQ_INET_PTON
   fi
@@ -1039,7 +1342,15 @@ changequote([, ])dnl
     AC_LIBOBJ([ioctl])
   fi
   gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  gt_LOCALE_FR
+  gt_LOCALE_FR_UTF8
+  gt_LOCALE_JA
+  gt_LOCALE_ZH_CN
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([listen])
   fi
@@ -1082,6 +1393,19 @@ changequote([, ])dnl
     AC_LIBOBJ([pipe])
   fi
   gl_UNISTD_MODULE_INDICATOR([pipe])
+  gl_PTHREAD_H
+  gl_PTHREAD_H_REQUIRE_DEFAULTS
+  gl_PTHREAD_THREAD
+  if test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1; then
+    AC_LIBOBJ([pthread-thread])
+  fi
+  gl_PTHREAD_MODULE_INDICATOR([pthread-thread])
+  gl_FUNC_PTHREAD_SIGMASK
+  if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+    AC_LIBOBJ([pthread_sigmask])
+    gl_PREREQ_PTHREAD_SIGMASK
+  fi
+  gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
   gl_FUNC_PUTENV
   if test $REPLACE_PUTENV = 1; then
     AC_LIBOBJ([putenv])
@@ -1097,27 +1421,33 @@ changequote([, ])dnl
   gl_FUNC_MMAP_ANON
   AC_CHECK_HEADERS_ONCE([sys/mman.h])
   AC_CHECK_FUNCS_ONCE([mprotect])
+  gl_SCHED_H
+  gl_SCHED_H_REQUIRE_DEFAULTS
   gl_FUNC_SELECT
   if test $REPLACE_SELECT = 1; then
     AC_LIBOBJ([select])
   fi
   gl_SYS_SELECT_MODULE_INDICATOR([select])
   AC_CHECK_HEADERS_ONCE([sys/wait.h])
-  gl_FUNC_SETLOCALE
-  if test $REPLACE_SETLOCALE = 1; then
-    AC_LIBOBJ([setlocale])
-    gl_PREREQ_SETLOCALE
-  fi
-  gl_LOCALE_MODULE_INDICATOR([setlocale])
-  gt_LOCALE_FR
-  gt_LOCALE_FR_UTF8
-  gt_LOCALE_JA
-  gt_LOCALE_ZH_CN
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([setsockopt])
   fi
   gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+  gl_SIGACTION
+  if test $HAVE_SIGACTION = 0; then
+    AC_LIBOBJ([sigaction])
+    gl_PREREQ_SIGACTION
+  fi
+  gl_SIGNAL_MODULE_INDICATOR([sigaction])
+  gl_SIGNALBLOCKING
+  if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+    AC_LIBOBJ([sigprocmask])
+    gl_PREREQ_SIGPROCMASK
+  fi
+  gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+  AC_CHECK_FUNCS_ONCE([setrlimit])
+  gl_FUNC_MMAP_ANON
   gl_FUNC_SLEEP
   if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
     AC_LIBOBJ([sleep])
@@ -1127,14 +1457,14 @@ changequote([, ])dnl
   gl_FUNC_SNPRINTF
   gl_STDIO_MODULE_INDICATOR([snprintf])
   gl_MODULE_INDICATOR([snprintf])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([socket])
   fi
   # When this module is used, sockets may actually occur as file descriptors,
   # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
-  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
-  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+  m4_ifdef([gl_UNISTD_H_DEFAULTS], [gl_UNISTD_H_REQUIRE_DEFAULTS])
+  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [gl_SYS_IOCTL_H_REQUIRE_DEFAULTS])
   AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
   if test "$ac_cv_header_winsock2_h" = yes; then
     UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
@@ -1144,7 +1474,6 @@ changequote([, ])dnl
   AC_REQUIRE([gl_SOCKETLIB])
   AC_REQUIRE([gl_SOCKETS])
   gl_TYPE_SOCKLEN_T
-  gl_STDALIGN_H
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
   gl_FUNC_STRERROR_R
@@ -1165,14 +1494,19 @@ changequote([, ])dnl
   fi
   gl_UNISTD_MODULE_INDICATOR([symlink])
   gl_SYS_IOCTL_H
+  gl_SYS_IOCTL_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
-  AC_REQUIRE([gl_HEADER_SYS_SELECT])
+  gl_SYS_SELECT_H
+  gl_SYS_SELECT_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  gl_SYS_SOCKET_H
+  gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
   AC_CHECK_FUNCS_ONCE([shutdown])
-  gl_HEADER_SYS_UIO
+  gl_SYS_UIO_H
+  gl_SYS_UIO_H_REQUIRE_DEFAULTS
   AC_PROG_MKDIR_P
+  gl_THREAD
   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
   AC_SUBST([abs_aux_dir])
   abs_aux_dir=`cd "$ac_aux_dir"; pwd`
@@ -1193,6 +1527,18 @@ changequote([, ])dnl
     gl_PREREQ_WCTOMB
   fi
   gl_STDLIB_MODULE_INDICATOR([wctomb])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-thread])
+      ;;
+  esac
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_LIBOBJ([windows-tls])
+      ;;
+  esac
   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
   m4_ifval(gltests_LIBSOURCES_LIST, [
     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
@@ -1205,6 +1551,8 @@ changequote([, ])dnl
       m4_if(m4_sysval, [0], [],
         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
   ])
+  m4_popdef([GL_MODULE_INDICATOR_PREFIX])
+  m4_popdef([GL_MACRO_PREFIX])
   m4_popdef([gltests_LIBSOURCES_DIR])
   m4_popdef([gltests_LIBSOURCES_LIST])
   m4_popdef([AC_LIBSOURCES])
@@ -1304,7 +1652,6 @@ AC_DEFUN([gl_FILE_LIST], [
   doc/gendocs_template
   doc/gendocs_template_min
   lib/_Noreturn.h
-  lib/alloca.c
   lib/alloca.in.h
   lib/allocator.c
   lib/allocator.h
@@ -1317,7 +1664,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/asnprintf.c
   lib/asprintf.c
   lib/assure.h
+  lib/attribute.h
   lib/basename-lgpl.c
+  lib/basename-lgpl.h
   lib/basename.c
   lib/binary-io.c
   lib/binary-io.h
@@ -1333,6 +1682,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/c-strcasecmp.c
   lib/c-strcaseeq.h
   lib/c-strncasecmp.c
+  lib/calloc.c
   lib/careadlinkat.c
   lib/careadlinkat.h
   lib/cdefs.h
@@ -1344,8 +1694,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/dirname-lgpl.c
   lib/dirname.c
   lib/dirname.h
-  lib/dosname.h
   lib/dup2.c
+  lib/dynarray.h
   lib/errno.in.h
   lib/error.c
   lib/error.h
@@ -1370,7 +1720,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fnmatch.c
   lib/fnmatch.in.h
   lib/fnmatch_loop.c
-  lib/freopen-safer.c
+  lib/fopen.c
+  lib/free.c
   lib/freopen.c
   lib/fstat.c
   lib/getdtablesize.c
@@ -1383,15 +1734,22 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/getopt.in.h
   lib/getopt1.c
   lib/getopt_int.h
+  lib/getpagesize.c
   lib/getprogname.c
   lib/getprogname.h
+  lib/getrandom.c
   lib/gettext.h
   lib/gettime.c
   lib/gettimeofday.c
+  lib/glthread/lock.c
+  lib/glthread/lock.h
+  lib/glthread/threadlib.c
   lib/hard-locale.c
   lib/hard-locale.h
   lib/hash.c
   lib/hash.h
+  lib/ialloc.c
+  lib/ialloc.h
   lib/iconv.c
   lib/iconv.in.h
   lib/iconv_close.c
@@ -1400,7 +1758,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/iconv_open-irix.gperf
   lib/iconv_open-osf.gperf
   lib/iconv_open-solaris.gperf
+  lib/iconv_open-zos.gperf
   lib/iconv_open.c
+  lib/idx.h
   lib/ignore-value.h
   lib/imaxtostr.c
   lib/intprops.h
@@ -1409,24 +1769,35 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/inttypes.in.h
   lib/isblank.c
   lib/iswblank.c
+  lib/iswdigit.c
+  lib/iswxdigit.c
   lib/itold.c
   lib/langinfo.in.h
+  lib/lc-charset-dispatch.c
+  lib/lc-charset-dispatch.h
   lib/libc-config.h
   lib/limits.in.h
   lib/localcharset.c
   lib/localcharset.h
   lib/locale.in.h
   lib/localeconv.c
-  lib/localtime-buffer.c
-  lib/localtime-buffer.h
   lib/lstat.c
   lib/malloc.c
+  lib/malloc/dynarray-skeleton.c
+  lib/malloc/dynarray.h
+  lib/malloc/dynarray_at_failure.c
+  lib/malloc/dynarray_emplace_enlarge.c
+  lib/malloc/dynarray_finalize.c
+  lib/malloc/dynarray_resize.c
+  lib/malloc/dynarray_resize_clear.c
   lib/malloca.c
   lib/malloca.h
   lib/mbchar.c
   lib/mbchar.h
   lib/mbiter.c
   lib/mbiter.h
+  lib/mbrtowc-impl-utf8.h
+  lib/mbrtowc-impl.h
   lib/mbrtowc.c
   lib/mbscasecmp.c
   lib/mbsinit.c
@@ -1436,11 +1807,14 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/mbsrtowcs.c
   lib/mbsstr.c
   lib/mbtowc-impl.h
+  lib/mbtowc-lock.c
+  lib/mbtowc-lock.h
   lib/mbtowc.c
   lib/mbuiter.c
   lib/mbuiter.h
   lib/memchr.c
   lib/memchr.valgrind
+  lib/mempcpy.c
   lib/minmax.h
   lib/mkdir.c
   lib/mkstemp.c
@@ -1450,6 +1824,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/msvc-inval.h
   lib/msvc-nothrow.c
   lib/msvc-nothrow.h
+  lib/nl_langinfo-lock.c
   lib/nl_langinfo.c
   lib/nstrftime.c
   lib/offtostr.c
@@ -1470,6 +1845,8 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/rawmemchr.c
   lib/rawmemchr.valgrind
   lib/readlink.c
+  lib/realloc.c
+  lib/reallocarray.c
   lib/regcomp.c
   lib/regex.c
   lib/regex.h
@@ -1477,28 +1854,32 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/regex_internal.h
   lib/regexec.c
   lib/setenv.c
+  lib/setlocale-lock.c
+  lib/setlocale_null.c
+  lib/setlocale_null.h
   lib/sh-quote.c
   lib/sh-quote.h
-  lib/sig-handler.c
-  lib/sig-handler.h
-  lib/sigaction.c
   lib/signal.in.h
-  lib/sigprocmask.c
+  lib/sigsegv.c
+  lib/sigsegv.in.h
   lib/size_max.h
+  lib/stackvma.c
+  lib/stackvma.h
   lib/stat-macros.h
   lib/stat-time.c
   lib/stat-time.h
   lib/stat-w32.c
   lib/stat-w32.h
   lib/stat.c
+  lib/stdalign.in.h
   lib/stdarg.in.h
   lib/stdbool.in.h
   lib/stddef.in.h
   lib/stdint.in.h
-  lib/stdio--.h
-  lib/stdio-safer.h
   lib/stdio.in.h
   lib/stdlib.in.h
+  lib/stdopen.c
+  lib/stdopen.h
   lib/str-kmp.h
   lib/strcasecmp.c
   lib/streq.h
@@ -1512,16 +1893,14 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/strings.in.h
   lib/stripslash.c
   lib/strncasecmp.c
-  lib/strndup.c
   lib/strnlen.c
   lib/strnlen1.c
   lib/strnlen1.h
   lib/strptime.c
   lib/strtoimax.c
   lib/strtol.c
-  lib/strtoul.c
-  lib/strtoull.c
-  lib/strtoumax.c
+  lib/strtoll.c
+  lib/sys_random.in.h
   lib/sys_stat.in.h
   lib/sys_time.in.h
   lib/sys_types.in.h
@@ -1554,7 +1933,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/uniwidth/width.c
   lib/unlocked-io.h
   lib/unsetenv.c
-  lib/unused-parameter.h
   lib/vasnprintf.c
   lib/vasnprintf.h
   lib/vasprintf.c
@@ -1568,6 +1946,18 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/wctype-h.c
   lib/wctype.in.h
   lib/wcwidth.c
+  lib/windows-initguard.h
+  lib/windows-mutex.c
+  lib/windows-mutex.h
+  lib/windows-once.c
+  lib/windows-once.h
+  lib/windows-recmutex.c
+  lib/windows-recmutex.h
+  lib/windows-rwlock.c
+  lib/windows-rwlock.h
+  lib/wmemchr-impl.h
+  lib/wmemchr.c
+  lib/wmempcpy.c
   lib/xalloc-die.c
   lib/xalloc-oversized.h
   lib/xalloc.h
@@ -1575,19 +1965,20 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/xfreopen.c
   lib/xfreopen.h
   lib/xmalloc.c
+  lib/xmalloca.c
+  lib/xmalloca.h
   lib/xreadlink.c
   lib/xreadlink.h
   lib/xsize.c
   lib/xsize.h
+  lib/xstdopen.c
+  lib/xstdopen.h
   lib/xstriconv.c
   lib/xstriconv.h
-  lib/xstrndup.c
-  lib/xstrndup.h
-  lib/xstrtol-error.c
+  lib/xstrtoimax.c
   lib/xstrtol.c
   lib/xstrtol.h
   lib/xstrtoul.c
-  lib/xstrtoumax.c
   lib/xvasprintf.c
   lib/xvasprintf.h
   m4/00gnulib.m4
@@ -1595,15 +1986,17 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/absolute-header.m4
   m4/alloca.m4
   m4/arpa_inet_h.m4
+  m4/asm-underscore.m4
+  m4/atoll.m4
   m4/btowc.m4
   m4/builtin-expect.m4
   m4/c-stack.m4
+  m4/calloc.m4
   m4/clock_time.m4
   m4/close.m4
   m4/codeset.m4
   m4/config-h.m4
-  m4/ctype.m4
-  m4/dirname.m4
+  m4/ctype_h.m4
   m4/double-slash-root.m4
   m4/dup2.m4
   m4/eealloc.m4
@@ -1622,7 +2015,9 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/float_h.m4
   m4/fnmatch.m4
   m4/fnmatch_h.m4
+  m4/fopen.m4
   m4/fpieee.m4
+  m4/free.m4
   m4/freopen.m4
   m4/fstat.m4
   m4/ftruncate.m4
@@ -1631,9 +2026,9 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/getopt.m4
   m4/getpagesize.m4
   m4/getprogname.m4
+  m4/getrandom.m4
   m4/gettime.m4
   m4/gettimeofday.m4
-  m4/glibc21.m4
   m4/gnu-make.m4
   m4/gnulib-common.m4
   m4/host-cpu-c-abi.m4
@@ -1645,12 +2040,13 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/inline.m4
   m4/intmax_t.m4
   m4/inttostr.m4
-  m4/inttypes-pri.m4
   m4/inttypes.m4
   m4/inttypes_h.m4
   m4/ioctl.m4
   m4/isblank.m4
   m4/iswblank.m4
+  m4/iswdigit.m4
+  m4/iswxdigit.m4
   m4/langinfo_h.m4
   m4/largefile.m4
   m4/lib-ld.m4
@@ -1666,8 +2062,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/locale-zh.m4
   m4/locale_h.m4
   m4/localeconv.m4
-  m4/localtime-buffer.m4
-  m4/longlong.m4
+  m4/lock.m4
   m4/lstat.m4
   m4/malloc.m4
   m4/malloca.m4
@@ -1683,6 +2078,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/mbstate_t.m4
   m4/mbtowc.m4
   m4/memchr.m4
+  m4/mempcpy.m4
   m4/minmax.m4
   m4/mkdir.m4
   m4/mkstemp.m4
@@ -1692,6 +2088,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/msvc-inval.m4
   m4/msvc-nothrow.m4
   m4/multiarch.m4
+  m4/musl.m4
   m4/nanosleep.m4
   m4/netinet_in_h.m4
   m4/nl_langinfo.m4
@@ -1699,22 +2096,32 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/nstrftime.m4
   m4/off_t.m4
   m4/open-cloexec.m4
+  m4/open-slash.m4
   m4/open.m4
   m4/pathmax.m4
   m4/perror.m4
+  m4/pid_t.m4
   m4/pipe.m4
   m4/printf.m4
+  m4/pthread-thread.m4
+  m4/pthread_h.m4
+  m4/pthread_rwlock_rdlock.m4
+  m4/pthread_sigmask.m4
   m4/putenv.m4
   m4/quote.m4
   m4/quotearg.m4
   m4/raise.m4
   m4/rawmemchr.m4
   m4/readlink.m4
+  m4/realloc.m4
+  m4/reallocarray.m4
   m4/regex.m4
+  m4/sched_h.m4
   m4/select.m4
   m4/setenv.m4
-  m4/setlocale.m4
+  m4/setlocale_null.m4
   m4/sigaction.m4
+  m4/sigaltstack.m4
   m4/signal_h.m4
   m4/signalblocking.m4
   m4/size_max.m4
@@ -1725,8 +2132,10 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/socklen.m4
   m4/sockpfaf.m4
   m4/ssize_t.m4
+  m4/stack-direction.m4
   m4/stat-time.m4
   m4/stat.m4
+  m4/std-gnu11.m4
   m4/stdalign.m4
   m4/stdarg.m4
   m4/stdbool.m4
@@ -1740,13 +2149,13 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/strerror_r.m4
   m4/string_h.m4
   m4/strings_h.m4
-  m4/strndup.m4
   m4/strnlen.m4
   m4/strptime.m4
-  m4/strtoull.m4
-  m4/strtoumax.m4
+  m4/strtoimax.m4
+  m4/strtoll.m4
   m4/symlink.m4
   m4/sys_ioctl_h.m4
+  m4/sys_random_h.m4
   m4/sys_select_h.m4
   m4/sys_socket_h.m4
   m4/sys_stat_h.m4
@@ -1755,6 +2164,8 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/sys_uio_h.m4
   m4/sys_wait_h.m4
   m4/tempname.m4
+  m4/thread.m4
+  m4/threadlib.m4
   m4/time_h.m4
   m4/time_r.m4
   m4/time_rz.m4
@@ -1764,10 +2175,10 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/tzset.m4
   m4/unistd_h.m4
   m4/unlocked-io.m4
-  m4/vararrays.m4
   m4/vasnprintf.m4
   m4/vasprintf.m4
   m4/version-etc.m4
+  m4/visibility.m4
   m4/warn-on-use.m4
   m4/warnings.m4
   m4/wchar_h.m4
@@ -1778,13 +2189,19 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/wctype_h.m4
   m4/wcwidth.m4
   m4/wint_t.m4
+  m4/wmemchr.m4
+  m4/wmempcpy.m4
   m4/xalloc.m4
   m4/xsize.m4
-  m4/xstrndup.m4
   m4/xstrtol.m4
   m4/xvasprintf.m4
+  m4/year2038.m4
+  m4/zzgnulib.m4
+  tests/altstack-util.h
   tests/init.sh
+  tests/locale.c
   tests/macros.h
+  tests/mmap-anon-util.h
   tests/nap.h
   tests/signature.h
   tests/test-accept.c
@@ -1807,12 +2224,14 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-c-strcase.sh
   tests/test-c-strcasecmp.c
   tests/test-c-strncasecmp.c
+  tests/test-calloc-gnu.c
   tests/test-cloexec.c
   tests/test-close.c
   tests/test-connect.c
   tests/test-ctype.c
   tests/test-dirname.c
   tests/test-dup2.c
+  tests/test-dynarray.c
   tests/test-environ.c
   tests/test-errno.c
   tests/test-exclude.c
@@ -1832,9 +2251,12 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-float.c
   tests/test-fnmatch-h.c
   tests/test-fnmatch.c
+  tests/test-fopen-gnu.c
+  tests/test-fopen.c
+  tests/test-fopen.h
   tests/test-fputc.c
   tests/test-fread.c
-  tests/test-freopen-safer.c
+  tests/test-free.c
   tests/test-freopen.c
   tests/test-fstat.c
   tests/test-ftruncate.c
@@ -1848,7 +2270,9 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-getopt.h
   tests/test-getopt_long.h
   tests/test-getprogname.c
+  tests/test-getrandom.c
   tests/test-gettimeofday.c
+  tests/test-hard-locale.c
   tests/test-hash.c
   tests/test-iconv-h.c
   tests/test-iconv.c
@@ -1861,6 +2285,10 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-ioctl.c
   tests/test-isblank.c
   tests/test-iswblank.c
+  tests/test-iswdigit.c
+  tests/test-iswdigit.sh
+  tests/test-iswxdigit.c
+  tests/test-iswxdigit.sh
   tests/test-langinfo.c
   tests/test-limits-h.c
   tests/test-listen.c
@@ -1869,12 +2297,15 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-localeconv.c
   tests/test-lstat.c
   tests/test-lstat.h
+  tests/test-malloc-gnu.c
   tests/test-malloca.c
   tests/test-mbrtowc-w32-1.sh
   tests/test-mbrtowc-w32-2.sh
   tests/test-mbrtowc-w32-3.sh
   tests/test-mbrtowc-w32-4.sh
   tests/test-mbrtowc-w32-5.sh
+  tests/test-mbrtowc-w32-6.sh
+  tests/test-mbrtowc-w32-7.sh
   tests/test-mbrtowc-w32.c
   tests/test-mbrtowc.c
   tests/test-mbrtowc1.sh
@@ -1901,6 +2332,7 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-mkdir.h
   tests/test-nanosleep.c
   tests/test-netinet_in.c
+  tests/test-nl_langinfo-mt.c
   tests/test-nl_langinfo.c
   tests/test-nl_langinfo.sh
   tests/test-nstrftime.c
@@ -1911,13 +2343,20 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-perror.sh
   tests/test-perror2.c
   tests/test-pipe.c
+  tests/test-pthread-thread.c
+  tests/test-pthread.c
+  tests/test-pthread_sigmask1.c
+  tests/test-pthread_sigmask2.c
   tests/test-quotearg-simple.c
   tests/test-quotearg.h
   tests/test-raise.c
   tests/test-rawmemchr.c
   tests/test-readlink.c
   tests/test-readlink.h
+  tests/test-realloc-gnu.c
+  tests/test-reallocarray.c
   tests/test-regex.c
+  tests/test-sched.c
   tests/test-select-fd.c
   tests/test-select-in.sh
   tests/test-select-out.sh
@@ -1925,15 +2364,18 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-select.c
   tests/test-select.h
   tests/test-setenv.c
-  tests/test-setlocale1.c
-  tests/test-setlocale1.sh
-  tests/test-setlocale2.c
-  tests/test-setlocale2.sh
+  tests/test-setlocale_null-mt-all.c
+  tests/test-setlocale_null-mt-one.c
+  tests/test-setlocale_null.c
   tests/test-setsockopt.c
   tests/test-sh-quote.c
   tests/test-sigaction.c
   tests/test-signal-h.c
   tests/test-sigprocmask.c
+  tests/test-sigsegv-catch-segv1.c
+  tests/test-sigsegv-catch-segv2.c
+  tests/test-sigsegv-catch-stackoverflow1.c
+  tests/test-sigsegv-catch-stackoverflow2.c
   tests/test-sleep.c
   tests/test-snprintf.c
   tests/test-sockets.c
@@ -1952,11 +2394,12 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-string.c
   tests/test-strings.c
   tests/test-strnlen.c
-  tests/test-strtoull.c
-  tests/test-strtoumax.c
+  tests/test-strtoimax.c
+  tests/test-strtoll.c
   tests/test-symlink.c
   tests/test-symlink.h
   tests/test-sys_ioctl.c
+  tests/test-sys_random.c
   tests/test-sys_select.c
   tests/test-sys_socket.c
   tests/test-sys_stat.c
@@ -1965,6 +2408,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-sys_uio.c
   tests/test-sys_wait.c
   tests/test-sys_wait.h
+  tests/test-thread_create.c
+  tests/test-thread_self.c
   tests/test-time.c
   tests/test-timespec.c
   tests/test-unistd.c
@@ -1985,6 +2430,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-wcrtomb-w32-3.sh
   tests/test-wcrtomb-w32-4.sh
   tests/test-wcrtomb-w32-5.sh
+  tests/test-wcrtomb-w32-6.sh
+  tests/test-wcrtomb-w32-7.sh
   tests/test-wcrtomb-w32.c
   tests/test-wcrtomb.c
   tests/test-wcrtomb.sh
@@ -1992,11 +2439,13 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-wcwidth.c
   tests/test-xalloc-die.c
   tests/test-xalloc-die.sh
+  tests/test-xstdopen.c
+  tests/test-xstdopen.sh
+  tests/test-xstrtoimax.c
+  tests/test-xstrtoimax.sh
   tests/test-xstrtol.c
   tests/test-xstrtol.sh
   tests/test-xstrtoul.c
-  tests/test-xstrtoumax.c
-  tests/test-xstrtoumax.sh
   tests/test-xvasprintf.c
   tests/unistr/test-u8-mbtoucr.c
   tests/unistr/test-u8-uctomb.c
@@ -2006,8 +2455,10 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/zerosize-ptr.h
   tests=lib/_Noreturn.h
   tests=lib/accept.c
+  tests=lib/alloca.c
   tests=lib/arg-nonnull.h
   tests=lib/arpa_inet.in.h
+  tests=lib/atoll.c
   tests=lib/bind.c
   tests=lib/c++defs.h
   tests=lib/connect.c
@@ -2016,7 +2467,8 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/fpucw.h
   tests=lib/ftruncate.c
   tests=lib/getcwd-lgpl.c
-  tests=lib/getpagesize.c
+  tests=lib/glthread/thread.c
+  tests=lib/glthread/thread.h
   tests=lib/hash-pjw.c
   tests=lib/hash-pjw.h
   tests=lib/inet_pton.c
@@ -2026,17 +2478,23 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/netinet_in.in.h
   tests=lib/perror.c
   tests=lib/pipe.c
+  tests=lib/pthread-thread.c
+  tests=lib/pthread.in.h
+  tests=lib/pthread_sigmask.c
   tests=lib/putenv.c
   tests=lib/same-inode.h
+  tests=lib/sched.in.h
   tests=lib/select.c
-  tests=lib/setlocale.c
   tests=lib/setsockopt.c
+  tests=lib/sig-handler.c
+  tests=lib/sig-handler.h
+  tests=lib/sigaction.c
+  tests=lib/sigprocmask.c
   tests=lib/sleep.c
   tests=lib/snprintf.c
   tests=lib/socket.c
   tests=lib/sockets.c
   tests=lib/sockets.h
-  tests=lib/stdalign.in.h
   tests=lib/strerror_r.c
   tests=lib/symlink.c
   tests=lib/sys_ioctl.in.h
@@ -2046,12 +2504,17 @@ AC_DEFUN([gl_FILE_LIST], [
   tests=lib/sys_uio.in.h
   tests=lib/timespec-add.c
   tests=lib/timespec-sub.c
-  tests=lib/unused-parameter.h
   tests=lib/w32sock.h
   tests=lib/warn-on-use.h
   tests=lib/wctob.c
   tests=lib/wctomb-impl.h
   tests=lib/wctomb.c
+  tests=lib/windows-thread.c
+  tests=lib/windows-thread.h
+  tests=lib/windows-tls.c
+  tests=lib/windows-tls.h
+  tests=lib/xstrtol-error.c
+  tests=lib/xstrtol-error.h
   top/GNUmakefile
   top/README-release
   top/maint.mk
index cd88070..64e28b1 100644 (file)
@@ -1,5 +1,5 @@
-# host-cpu-c-abi.m4 serial 11
-dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# host-cpu-c-abi.m4 serial 14
+dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -55,7 +55,7 @@ AC_DEFUN([gl_HOST_CPU_C_ABI],
     [case "$host_cpu" in
 
 changequote(,)dnl
-       i[4567]86 )
+       i[34567]86 )
 changequote([,])dnl
          gl_cv_host_cpu_c_abi=i386
          ;;
@@ -211,7 +211,7 @@ changequote([,])dnl
          # be generating 64-bit code.
          AC_COMPILE_IFELSE(
            [AC_LANG_SOURCE(
-              [[#if defined __powerpc64__ || defined _ARCH_PPC64
+              [[#if defined __powerpc64__ || defined __LP64__
                  int ok;
                 #else
                  error fail
@@ -457,7 +457,8 @@ EOF
 
 
 dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
-dnl (application binary interface) is a 32-bit one, or to 'no' otherwise.
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
 dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
 AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
 [
@@ -467,14 +468,44 @@ AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
        case "$gl_cv_host_cpu_c_abi" in
          i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
            gl_cv_host_cpu_c_abi_32bit=yes ;;
-         *)
+         x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
            gl_cv_host_cpu_c_abi_32bit=no ;;
+         *)
+           gl_cv_host_cpu_c_abi_32bit=unknown ;;
        esac
      else
        case "$host_cpu" in
 
+         # CPUs that only support a 32-bit ABI.
+         arc \
+         | bfin \
+         | cris* \
+         | csky \
+         | epiphany \
+         | ft32 \
+         | h8300 \
+         | m68k \
+         | microblaze | microblazeel \
+         | nds32 | nds32le | nds32be \
+         | nios2 | nios2eb | nios2el \
+         | or1k* \
+         | or32 \
+         | sh | sh[1234] | sh[1234]e[lb] \
+         | tic6x \
+         | xtensa* )
+           gl_cv_host_cpu_c_abi_32bit=yes
+           ;;
+
+         # CPUs that only support a 64-bit ABI.
 changequote(,)dnl
-         i[4567]86 )
+         alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+         | mmix )
+changequote([,])dnl
+           gl_cv_host_cpu_c_abi_32bit=no
+           ;;
+
+changequote(,)dnl
+         i[34567]86 )
 changequote([,])dnl
            gl_cv_host_cpu_c_abi_32bit=yes
            ;;
@@ -574,7 +605,7 @@ changequote([,])dnl
            # be generating 64-bit code.
            AC_COMPILE_IFELSE(
              [AC_LANG_SOURCE(
-                [[#if defined __powerpc64__ || defined _ARCH_PPC64
+                [[#if defined __powerpc64__ || defined __LP64__
                    int ok;
                   #else
                    error fail
@@ -634,7 +665,7 @@ changequote([,])dnl
            ;;
 
          *)
-           gl_cv_host_cpu_c_abi_32bit=no
+           gl_cv_host_cpu_c_abi_32bit=unknown
            ;;
        esac
      fi
index 877d882..d0e61de 100644 (file)
@@ -1,5 +1,5 @@
-# iconv.m4 serial 21
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2018 Free Software Foundation,
+# iconv.m4 serial 24
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
+AC_PREREQ([2.64])
+
+dnl Note: AM_ICONV is documented in the GNU gettext manual
+dnl <https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html>.
+dnl Don't make changes that are incompatible with that documentation!
+
 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
 [
   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
@@ -86,8 +92,9 @@ AC_DEFUN([AM_ICONV_LINK],
 #endif
              ]],
              [[int result = 0;
-  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
-     returns.  */
+  /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+     successful returns.  This is even documented in
+     <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
   {
     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
     if (cd_utf8_to_88591 != (iconv_t)(-1))
@@ -225,8 +232,7 @@ AC_DEFUN([AM_ICONV_LINK],
   AC_SUBST([LTLIBICONV])
 ])
 
-dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
-dnl avoid warnings like
+dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like
 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
 dnl This is tricky because of the way 'aclocal' is implemented:
 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
@@ -234,54 +240,43 @@ dnl   Otherwise aclocal's initial scan pass would miss the macro definition.
 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
 dnl   Otherwise aclocal would emit many "Use of uninitialized value $1"
 dnl   warnings.
-m4_define([gl_iconv_AC_DEFUN],
-  m4_version_prereq([2.64],
-    [[AC_DEFUN_ONCE(
-        [$1], [$2])]],
-    [m4_ifdef([gl_00GNULIB],
-       [[AC_DEFUN_ONCE(
-           [$1], [$2])]],
-       [[AC_DEFUN(
-           [$1], [$2])]])]))
-gl_iconv_AC_DEFUN([AM_ICONV],
+AC_DEFUN_ONCE([AM_ICONV],
 [
   AM_ICONV_LINK
   if test "$am_cv_func_iconv" = yes; then
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL([am_cv_proto_iconv], [
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[
+    AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature],
+      [gl_cv_iconv_nonconst],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[
 #include <stdlib.h>
 #include <iconv.h>
 extern
 #ifdef __cplusplus
 "C"
 #endif
-#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-           ]],
-           [[]])],
-        [am_cv_proto_iconv_arg1=""],
-        [am_cv_proto_iconv_arg1="const"])
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([
-         $am_cv_proto_iconv])
+            ]],
+            [[]])],
+         [gl_cv_iconv_nonconst=yes],
+         [gl_cv_iconv_nonconst=no])
+      ])
   else
     dnl When compiling GNU libiconv on a system that does not have iconv yet,
     dnl pick the POSIX compliant declaration without 'const'.
-    am_cv_proto_iconv_arg1=""
+    gl_cv_iconv_nonconst=yes
+  fi
+  if test $gl_cv_iconv_nonconst = yes; then
+    iconv_arg1=""
+  else
+    iconv_arg1="const"
   fi
-  AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+  AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1],
     [Define as const if the declaration of iconv() needs const.])
   dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
   m4_ifdef([gl_ICONV_H_DEFAULTS],
     [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
-     if test -n "$am_cv_proto_iconv_arg1"; then
+     if test $gl_cv_iconv_nonconst != yes; then
        ICONV_CONST="const"
      fi
     ])
index 253c008..2940988 100644 (file)
@@ -1,10 +1,10 @@
-# iconv_h.m4 serial 11
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# iconv_h.m4 serial 15
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_ICONV_H],
+AC_DEFUN_ONCE([gl_ICONV_H],
 [
   AC_REQUIRE([gl_ICONV_H_DEFAULTS])
 
@@ -17,27 +17,44 @@ AC_DEFUN([gl_ICONV_H],
   dnl guaranteed by C89.
   gl_WARN_ON_USE_PREPARE([[#include <iconv.h>
     ]], [iconv iconv_open])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 dnl Unconditionally enables the replacement of <iconv.h>.
 AC_DEFUN([gl_REPLACE_ICONV_H],
 [
-  AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+  gl_ICONV_H_REQUIRE_DEFAULTS
   ICONV_H='iconv.h'
   AM_CONDITIONAL([GL_GENERATE_ICONV_H], [test -n "$ICONV_H"])
 ])
 
+# gl_ICONV_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_ICONV_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_ICONV_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_ICONV_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_ICONV_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ICONV])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_ICONV_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_ICONV_H_DEFAULTS],
 [
   m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
-  GNULIB_ICONV=0;       AC_SUBST([GNULIB_ICONV])
   dnl Assume proper GNU behavior unless another module says otherwise.
   ICONV_CONST=;         AC_SUBST([ICONV_CONST])
   REPLACE_ICONV=0;      AC_SUBST([REPLACE_ICONV])
index 818a0c4..61b6af4 100644 (file)
@@ -1,5 +1,5 @@
-# iconv_open.m4 serial 14
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# iconv_open.m4 serial 16
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,11 +23,12 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
     if test $gl_func_iconv_gnu = no; then
       iconv_flavor=
       case "$host_os" in
-        aix*)     iconv_flavor=ICONV_FLAVOR_AIX ;;
-        irix*)    iconv_flavor=ICONV_FLAVOR_IRIX ;;
-        hpux*)    iconv_flavor=ICONV_FLAVOR_HPUX ;;
-        osf*)     iconv_flavor=ICONV_FLAVOR_OSF ;;
-        solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+        aix*)         iconv_flavor=ICONV_FLAVOR_AIX ;;
+        irix*)        iconv_flavor=ICONV_FLAVOR_IRIX ;;
+        hpux*)        iconv_flavor=ICONV_FLAVOR_HPUX ;;
+        osf*)         iconv_flavor=ICONV_FLAVOR_OSF ;;
+        solaris*)     iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+        openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
       esac
       if test -n "$iconv_flavor"; then
         AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
@@ -38,13 +39,16 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
     fi
     m4_ifdef([gl_FUNC_ICONV_OPEN_UTF_SUPPORT], [
       gl_FUNC_ICONV_OPEN_UTF_SUPPORT
-      if test $gl_cv_func_iconv_supports_utf = no; then
-        REPLACE_ICONV_UTF=1
-        AC_DEFINE([REPLACE_ICONV_UTF], [1],
-          [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.])
-        REPLACE_ICONV=1
-        gl_REPLACE_ICONV_OPEN
-      fi
+      case "$gl_cv_func_iconv_supports_utf" in
+        *yes) ;;
+        *)
+          REPLACE_ICONV_UTF=1
+          AC_DEFINE([REPLACE_ICONV_UTF], [1],
+            [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.])
+          REPLACE_ICONV=1
+          gl_REPLACE_ICONV_OPEN
+          ;;
+      esac
     ])
   fi
 ])
index a363cb0..bdd542b 100644 (file)
@@ -1,5 +1,5 @@
-# include_next.m4 serial 24
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# include_next.m4 serial 26
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -106,19 +106,21 @@ dnl We intentionally avoid using AC_LANG_SOURCE here.
   AC_SUBST([INCLUDE_NEXT])
   AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
   AC_SUBST([PRAGMA_SYSTEM_HEADER])
-  AC_CACHE_CHECK([whether system header files limit the line length],
-    [gl_cv_pragma_columns],
-    [dnl HP NonStop systems, which define __TANDEM, have this misfeature.
-     AC_EGREP_CPP([choke me],
+
+  dnl HP NonStop systems, which define __TANDEM, limit the line length
+  dnl after including some system header files.
+  AC_CACHE_CHECK([whether source code line length is unlimited],
+    [gl_cv_source_line_length_unlimited],
+    [AC_EGREP_CPP([choke me],
        [
 #ifdef __TANDEM
 choke me
 #endif
        ],
-       [gl_cv_pragma_columns=yes],
-       [gl_cv_pragma_columns=no])
+       [gl_cv_source_line_length_unlimited=no],
+       [gl_cv_source_line_length_unlimited=yes])
     ])
-  if test $gl_cv_pragma_columns = yes; then
+  if test $gl_cv_source_line_length_unlimited = no; then
     PRAGMA_COLUMNS="#pragma COLUMNS 10000"
   else
     PRAGMA_COLUMNS=
@@ -176,42 +178,40 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
     [AC_CHECK_HEADERS_ONCE([$1])
     ])
 
-dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
-dnl until we can assume autoconf 2.64 or newer.
   m4_foreach_w([gl_HEADER_NAME], [$1],
     [AS_VAR_PUSHDEF([gl_next_header],
                     [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
      if test $gl_cv_have_include_next = yes; then
-       AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
+       AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
      else
        AC_CACHE_CHECK(
          [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
-         m4_defn([gl_next_header]),
+         [gl_next_header],
          [m4_if([$2], [check],
             [AS_VAR_PUSHDEF([gl_header_exists],
                             [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
-             if test AS_VAR_GET(gl_header_exists) = yes; then
+             if test AS_VAR_GET([gl_header_exists]) = yes; then
              AS_VAR_POPDEF([gl_header_exists])
             ])
            gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
            AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
-           AS_VAR_SET(gl_next_header, ['"'$gl_header'"'])
+           AS_VAR_SET([gl_next_header], ['"'$gl_header'"'])
           m4_if([$2], [check],
             [else
-               AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
+               AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
              fi
             ])
          ])
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
-       [AS_VAR_GET(gl_next_header)])
+       [AS_VAR_GET([gl_next_header])])
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
        gl_next_as_first_directive='<'gl_HEADER_NAME'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
+       gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
      fi
      AC_SUBST(
        AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
index 1aaa2e6..1979179 100644 (file)
@@ -1,5 +1,5 @@
-# inet_pton.m4 serial 18
-dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+# inet_pton.m4 serial 19
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -24,15 +24,16 @@ AC_DEFUN([gl_FUNC_INET_PTON],
   INET_PTON_LIB=
   gl_PREREQ_SYS_H_WINSOCK2
   if test $HAVE_WINSOCK2_H = 1; then
+    dnl It needs to be overridden, because the stdcall calling convention
+    dnl is not compliant with POSIX.  Set REPLACE_INET_PTON in order to avoid
+    dnl a name conflict at the linker level, even though the header file
+    dnl <ws2tcpip.h> declares inet_pton only if _WIN32_WINNT >= 0x0600.
+    REPLACE_INET_PTON=1
     AC_CHECK_DECLS([inet_pton],,, [[#include <ws2tcpip.h>]])
     if test $ac_cv_have_decl_inet_pton = yes; then
-      dnl It needs to be overridden, because the stdcall calling convention
-      dnl is not compliant with POSIX.
-      REPLACE_INET_PTON=1
       INET_PTON_LIB="-lws2_32"
     else
       HAVE_DECL_INET_PTON=0
-      HAVE_INET_PTON=0
     fi
   else
     gl_save_LIBS=$LIBS
index 52f2b7b..04fc774 100644 (file)
@@ -1,5 +1,5 @@
 # inline.m4 serial 4
-dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 7ab676e..63c4b41 100644 (file)
@@ -1,5 +1,5 @@
-# intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2018 Free Software Foundation,
+# intmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -19,11 +19,7 @@ AC_DEFUN([gl_AC_TYPE_INTMAX_T],
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
   if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
-    AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
-    test $ac_cv_type_long_long_int = yes \
-      && ac_type='long long' \
-      || ac_type='long'
-    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+    AC_DEFINE_UNQUOTED([intmax_t], [long long],
      [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
   else
     AC_DEFINE([HAVE_INTMAX_T], [1],
@@ -57,11 +53,7 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
     AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   else
-    AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
-    test $ac_cv_type_long_long_int = yes \
-      && ac_type='long long' \
-      || ac_type='long'
-    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+    AC_DEFINE_UNQUOTED([intmax_t], [long long],
      [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
   fi
 ])
index 2b5aa89..8a50d50 100644 (file)
@@ -1,5 +1,5 @@
 #serial 8
-dnl Copyright (C) 2004-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
deleted file mode 100644 (file)
index c844262..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ([2.53])
-
-# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
-# macros to non-string values.  This is the case on AIX 4.3.3.
-
-AC_DEFUN([gt_INTTYPES_PRI],
-[
-  AC_CHECK_HEADERS([inttypes.h])
-  if test $ac_cv_header_inttypes_h = yes; then
-    AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
-      [gt_cv_inttypes_pri_broken],
-      [
-        AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[
-#include <inttypes.h>
-#ifdef PRId32
-char *p = PRId32;
-#endif
-             ]],
-             [[]])],
-          [gt_cv_inttypes_pri_broken=no],
-          [gt_cv_inttypes_pri_broken=yes])
-      ])
-  fi
-  if test "$gt_cv_inttypes_pri_broken" = yes; then
-    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
-      [Define if <inttypes.h> exists and defines unusable PRI* macros.])
-    PRI_MACROS_BROKEN=1
-  else
-    PRI_MACROS_BROKEN=0
-  fi
-  AC_SUBST([PRI_MACROS_BROKEN])
-])
index d756f01..64b1de5 100644 (file)
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 27
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# inttypes.m4 serial 35
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Derek Price, Bruno Haible.
 dnl Test whether <inttypes.h> is supported or must be substituted.
 
-AC_DEFUN([gl_INTTYPES_H],
+AC_DEFUN_ONCE([gl_INTTYPES_H],
 [
   AC_REQUIRE([gl_INTTYPES_INCOMPLETE])
   gl_INTTYPES_PRI_SCN
@@ -28,17 +28,26 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
     ]], [imaxabs imaxdiv strtoimax strtoumax])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 # Ensure that the PRI* and SCN* macros are defined appropriately.
 AC_DEFUN([gl_INTTYPES_PRI_SCN],
 [
-  AC_REQUIRE([gt_INTTYPES_PRI])
-
   PRIPTR_PREFIX=
   if test -n "$STDINT_H"; then
-    dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
-    PRIPTR_PREFIX='"l"'
+    dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
+    dnl 'long long', depending on _WIN64.
+    AC_COMPILE_IFELSE(
+      [AC_LANG_PROGRAM([[
+         #ifdef _WIN64
+         LLP64
+         #endif
+         ]])
+      ],
+      [PRIPTR_PREFIX='"l"'],
+      [PRIPTR_PREFIX='"ll"'])
   else
     dnl Using the system's <stdint.h>.
     for glpfx in '' l ll I64; do
@@ -113,10 +122,8 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
 
             #if $2
              #define CONDITION ($3)
-            #elif HAVE_LONG_LONG_INT
-             #define CONDITION ($4)
             #else
-             #define CONDITION 0
+             #define CONDITION ($4)
             #endif
             int test[CONDITION ? 1 : -1];]])],
        [gl_cv_test_$1=yes],
@@ -129,19 +136,34 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
   AC_SUBST([$1])
 ])
 
+# gl_INTTYPES_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_INTTYPES_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_INTTYPES_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXABS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXDIV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOIMAX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUMAX])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
 [
-  GNULIB_IMAXABS=0;      AC_SUBST([GNULIB_IMAXABS])
-  GNULIB_IMAXDIV=0;      AC_SUBST([GNULIB_IMAXDIV])
-  GNULIB_STRTOIMAX=0;    AC_SUBST([GNULIB_STRTOIMAX])
-  GNULIB_STRTOUMAX=0;    AC_SUBST([GNULIB_STRTOUMAX])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_IMAXABS=1;   AC_SUBST([HAVE_DECL_IMAXABS])
   HAVE_DECL_IMAXDIV=1;   AC_SUBST([HAVE_DECL_IMAXDIV])
@@ -152,7 +174,6 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
   REPLACE_STRTOUMAX=0;   AC_SUBST([REPLACE_STRTOUMAX])
   INT32_MAX_LT_INTMAX_MAX=1;  AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
   INT64_MAX_EQ_LONG_MAX='defined _LP64';  AC_SUBST([INT64_MAX_EQ_LONG_MAX])
-  PRI_MACROS_BROKEN=0;   AC_SUBST([PRI_MACROS_BROKEN])
   PRIPTR_PREFIX=__PRIPTR_PREFIX;  AC_SUBST([PRIPTR_PREFIX])
   UINT32_MAX_LT_UINTMAX_MAX=1;  AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
   UINT64_MAX_EQ_ULONG_MAX='defined _LP64';  AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
index 954848b..672a93e 100644 (file)
@@ -1,5 +1,5 @@
 # inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 835338a..efd29f3 100644 (file)
@@ -1,5 +1,5 @@
-# ioctl.m4 serial 5
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# ioctl.m4 serial 6
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_IOCTL],
 [
   AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   HAVE_IOCTL=1
   if test "$ac_cv_header_winsock2_h" = yes; then
     dnl Even if the 'socket' module is not used here, another part of the
index f98dfbf..e77e1a8 100644 (file)
@@ -1,5 +1,5 @@
 # isblank.m4 serial 3
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 4906a47..84fd838 100644 (file)
@@ -1,5 +1,5 @@
-# iswblank.m4 serial 4
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# iswblank.m4 serial 5
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,16 +12,9 @@ AC_DEFUN([gl_FUNC_ISWBLANK],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_FUNCS_ONCE([iswblank])
   AC_CHECK_DECLS([iswblank], , , [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-#include <wctype.h>
-]])
+    #include <wchar.h>
+    #include <wctype.h>
+  ]])
   if test $ac_cv_func_iswblank = no; then
     HAVE_ISWBLANK=0
     if test $ac_cv_have_decl_iswblank = yes; then
diff --git a/m4/iswdigit.m4 b/m4/iswdigit.m4
new file mode 100644 (file)
index 0000000..de4ffce
--- /dev/null
@@ -0,0 +1,115 @@
+# iswdigit.m4 serial 3
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISWDIGIT],
+[
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  AC_REQUIRE([gl_WCTYPE_H])
+  AC_REQUIRE([gt_LOCALE_FR])
+  AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    dnl <wctype.h> redefines iswdigit already.
+    REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
+  else
+    AC_CACHE_CHECK([whether iswdigit is ISO C compliant],
+      [gl_cv_func_iswdigit_works],
+      [
+       dnl Initial guess, used when cross-compiling or when no suitable locale
+       dnl is present.
+changequote(,)dnl
+       case "$host_os" in
+         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+           gl_cv_func_iswdigit_works="guessing no" ;;
+         # Guess yes otherwise.
+         *) gl_cv_func_iswdigit_works="guessing yes" ;;
+       esac
+changequote([,])dnl
+       if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+/* Returns the value of iswdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret != n)
+    abort ();
+
+  return iswdigit (wc);
+}
+
+int
+main (int argc, char *argv[])
+{
+  int is;
+  int result = 0;
+
+  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+    {
+      /* This fails on mingw, MSVC 14.  */
+      /* U+00B2 SUPERSCRIPT TWO */
+      is = for_character ("\262", 1);
+      if (!(is == 0))
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      /* This fails on NetBSD 8.0.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
+      /* U+0663 ARABIC-INDIC DIGIT THREE */
+      is = for_character ("\331\243", 2);
+      if (!(is == 0))
+        result |= 4;
+      /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\357\274\221", 3);
+      if (!(is == 0))
+        result |= 8;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 16;
+    }
+  return result;
+}]])],
+           [gl_cv_func_iswdigit_works=yes],
+           [gl_cv_func_iswdigit_works=no],
+           [:])
+       fi
+      ])
+    case "$gl_cv_func_iswdigit_works" in
+      *yes) ;;
+      *) REPLACE_ISWDIGIT=1 ;;
+    esac
+  fi
+])
diff --git a/m4/iswxdigit.m4 b/m4/iswxdigit.m4
new file mode 100644 (file)
index 0000000..f96d735
--- /dev/null
@@ -0,0 +1,106 @@
+# iswxdigit.m4 serial 3
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISWXDIGIT],
+[
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  AC_REQUIRE([gl_WCTYPE_H])
+  AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([gt_LOCALE_ZH_CN])
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+    dnl <wctype.h> redefines iswxdigit already.
+    REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
+  else
+    AC_CACHE_CHECK([whether iswxdigit is ISO C compliant],
+      [gl_cv_func_iswxdigit_works],
+      [
+       dnl Initial guess, used when cross-compiling or when no suitable locale
+       dnl is present.
+changequote(,)dnl
+       case "$host_os" in
+         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+         freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+           gl_cv_func_iswxdigit_works="guessing no" ;;
+         # Guess yes otherwise.
+         *) gl_cv_func_iswxdigit_works="guessing yes" ;;
+       esac
+changequote([,])dnl
+       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+/* Returns the value of iswxdigit for the multibyte character s[0..n-1].  */
+static int
+for_character (const char *s, size_t n)
+{
+  mbstate_t state;
+  wchar_t wc;
+  size_t ret;
+
+  memset (&state, '\0', sizeof (mbstate_t));
+  wc = (wchar_t) 0xBADFACE;
+  ret = mbrtowc (&wc, s, n, &state);
+  if (ret != n)
+    abort ();
+
+  return iswxdigit (wc);
+}
+
+int
+main (int argc, char *argv[])
+{
+  int is;
+  int result = 0;
+
+  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+    {
+      /* This fails on NetBSD 8.0.  */
+      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+      is = for_character ("\243\301", 2);
+      if (!(is == 0))
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      /* This fails on FreeBSD 13.0.  */
+      /* U+0663 ARABIC-INDIC DIGIT THREE */
+      is = for_character ("\331\243", 2);
+      if (!(is == 0))
+        result |= 2;
+      /* This fails on MSVC 14.  */
+      /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+      is = for_character ("\357\274\241", 3);
+      if (!(is == 0))
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+    {
+      /* This fails on Solaris 10, Solaris 11.4.  */
+      /* U+FF11 FULLWIDTH DIGIT ONE */
+      is = for_character ("\243\261", 2);
+      if (!(is == 0))
+        result |= 8;
+    }
+  return result;
+}]])],
+           [gl_cv_func_iswxdigit_works=yes],
+           [gl_cv_func_iswxdigit_works=no],
+           [:])
+       fi
+      ])
+    case "$gl_cv_func_iswxdigit_works" in
+      *yes) ;;
+      *) REPLACE_ISWXDIGIT=1 ;;
+    esac
+  fi
+])
index de077c3..87959f7 100644 (file)
@@ -1,10 +1,10 @@
-# langinfo_h.m4 serial 8
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# langinfo_h.m4 serial 12
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_LANGINFO_H],
+AC_DEFUN_ONCE([gl_LANGINFO_H],
 [
   AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
 
@@ -23,8 +23,10 @@ AC_DEFUN([gl_LANGINFO_H],
   AC_CHECK_HEADERS_ONCE([langinfo.h])
   if test $ac_cv_header_langinfo_h = yes; then
     HAVE_LANGINFO_H=1
-    dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
-    dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
+    dnl Determine what <langinfo.h> defines.
+    dnl CODESET is missing on OpenBSD 3.8.
+    dnl ERA etc. are missing on OpenBSD 6.7.
+    dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
     dnl ALTMON_* are missing on glibc 2.26 and many other systems.
     AC_CACHE_CHECK([whether langinfo.h defines CODESET],
       [gl_cv_header_langinfo_codeset],
@@ -102,18 +104,33 @@ int a = YESEXPR;
     ]], [nl_langinfo])
 ])
 
+# gl_LANGINFO_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_LANGINFO_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_LANGINFO_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NL_LANGINFO])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
 [
-  GNULIB_NL_LANGINFO=0;  AC_SUBST([GNULIB_NL_LANGINFO])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_NL_LANGINFO=1;    AC_SUBST([HAVE_NL_LANGINFO])
   REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
index bec7cd1..fbde5e6 100644 (file)
@@ -1,28 +1,47 @@
 # Enable large files on systems where this is not the default.
+# Enable support for files on Linux file systems with 64-bit inode numbers.
 
-# Copyright 1992-1996, 1998-2018 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# The following implementation works around a problem in autoconf <= 2.69;
+# The following macro works around a problem in Autoconf's AC_FUNC_FSEEKO:
+# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
+# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
+# and ftello in C++ mode as well.
+AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_FUNC_FSEEKO
+  case "$host_os" in
+    hpux*)
+      AC_DEFINE([_LARGEFILE_SOURCE], [1],
+        [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
+      ;;
+  esac
+])
+
+# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+
+# with _TIME_BITS.  Also, work around a problem in autoconf <= 2.69:
 # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
 # or configures them incorrectly in some cases.
-m4_version_prereq([2.70], [] ,[
+m4_version_prereq([2.70], [][
 
 # _AC_SYS_LARGEFILE_TEST_INCLUDES
 # -------------------------------
 m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
-[@%:@include <sys/types.h>
+[#include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
   int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
                        && LARGE_OFF_T % 2147483647 == 1)
                       ? 1 : -1]];[]dnl
 ])
+])# m4_version_prereq 2.70
 
 
 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
@@ -37,7 +56,8 @@ m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
     [AC_LANG_PROGRAM([$5], [$6])],
     [$3=no; break])
   m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
-    [AC_LANG_PROGRAM([@%:@define $1 $2
+    [AC_LANG_PROGRAM([#undef $1
+#define $1 $2
 $5], [$6])],
     [$3=$2; break])
   $3=unknown
@@ -56,13 +76,15 @@ rm -rf conftest*[]dnl
 # By default, many hosts won't let programs access large files;
 # one must use special compiler options to get large-file access to work.
 # For more details about this brain damage please see:
-# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
+# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# Additionally, on Linux file systems with 64-bit inodes a file that happens
+# to have a 64-bit inode number cannot be accessed by 32-bit applications on
+# Linux x86/x86_64.  This can occur with file systems such as XFS and NFS.
 AC_DEFUN([AC_SYS_LARGEFILE],
 [AC_ARG_ENABLE(largefile,
                [  --disable-largefile     omit support for large files])
-if test "$enable_largefile" != no; then
-
-  AC_CACHE_CHECK([for special C compiler options needed for large files],
+AS_IF([test "$enable_largefile" != no],
+ [AC_CACHE_CHECK([for special C compiler options needed for large files],
     ac_cv_sys_largefile_CC,
     [ac_cv_sys_largefile_CC=no
      if test "$GCC" != yes; then
@@ -87,18 +109,15 @@ if test "$enable_largefile" != no; then
     ac_cv_sys_file_offset_bits,
     [Number of bits in a file offset, on hosts where this is settable.],
     [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
-      ac_cv_sys_large_files,
-      [Define for large files, on AIX-style hosts.],
-      [_AC_SYS_LARGEFILE_TEST_INCLUDES])
-  fi
-
-  AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1],
-    [Enable large inode numbers on Mac OS X 10.5.])
-fi
+  AS_CASE([$ac_cv_sys_file_offset_bits],
+    [unknown],
+      [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
+         [ac_cv_sys_large_files],
+         [Define for large files, on AIX-style hosts.],
+         [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
+    [64],
+      [gl_YEAR2038_BODY([])])])
 ])# AC_SYS_LARGEFILE
-])# m4_version_prereq 2.70
 
 # Enable large files on systems where this is implemented by Gnulib, not by the
 # system headers.
index 1244ff8..076358d 100644 (file)
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 9
-dnl Copyright (C) 1996-2003, 2009-2018 Free Software Foundation, Inc.
+# lib-ld.m4 serial 10
+dnl Copyright (C) 1996-2003, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -122,7 +122,7 @@ else
       *-*-aix*)
         AC_COMPILE_IFELSE(
           [AC_LANG_SOURCE(
-             [[#if defined __powerpc64__ || defined _ARCH_PPC64
+             [[#if defined __powerpc64__ || defined __LP64__
                 int ok;
                #else
                 error fail
index dee3300..787efab 100644 (file)
@@ -1,5 +1,5 @@
-# lib-link.m4 serial 28
-dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# lib-link.m4 serial 32
+dnl Copyright (C) 2001-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -192,6 +192,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
   AC_LIB_WITH_FINAL_PREFIX([
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
+    eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+    eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
   ])
   AC_ARG_WITH(PACK[-prefix],
 [[  --with-]]PACK[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
@@ -204,17 +206,23 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         AC_LIB_WITH_FINAL_PREFIX([
           eval additional_includedir=\"$includedir\"
           eval additional_libdir=\"$libdir\"
+          eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+          eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
         ])
       else
         additional_includedir="$withval/include"
         additional_libdir="$withval/$acl_libdirstem"
-        if test "$acl_libdirstem2" != "$acl_libdirstem" \
-           && test ! -d "$withval/$acl_libdirstem"; then
-          additional_libdir="$withval/$acl_libdirstem2"
-        fi
+        additional_libdir2="$withval/$acl_libdirstem2"
+        additional_libdir3="$withval/$acl_libdirstem3"
       fi
     fi
 ])
+  if test "X$additional_libdir2" = "X$additional_libdir"; then
+    additional_libdir2=
+  fi
+  if test "X$additional_libdir3" = "X$additional_libdir"; then
+    additional_libdir3=
+  fi
   dnl Search the library and its dependencies in $additional_libdir and
   dnl $LDFLAGS. Using breadth-first-seach.
   LIB[]NAME=
@@ -270,48 +278,54 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
             shrext=
           fi
           if test $use_additional = yes; then
-            dir="$additional_libdir"
-            dnl The same code as in the loop below:
-            dnl First look for a shared library.
-            if test -n "$acl_shlibext"; then
-              if test -f "$dir/$libname$shrext"; then
-                found_dir="$dir"
-                found_so="$dir/$libname$shrext"
-              else
-                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
-                  ver=`(cd "$dir" && \
-                        for f in "$libname$shrext".*; do echo "$f"; done \
-                        | sed -e "s,^$libname$shrext\\\\.,," \
-                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
-                        | sed 1q ) 2>/dev/null`
-                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
-                    found_dir="$dir"
-                    found_so="$dir/$libname$shrext.$ver"
+            for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+              if test "X$found_dir" = "X"; then
+                eval dir=\$$additional_libdir_variable
+                if test -n "$dir"; then
+                  dnl The same code as in the loop below:
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+                      found_dir="$dir"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
+                      fi
+                    fi
                   fi
-                else
-                  eval library_names=\"$acl_library_names_spec\"
-                  for f in $library_names; do
-                    if test -f "$dir/$f"; then
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
                       found_dir="$dir"
-                      found_so="$dir/$f"
-                      break
+                      found_a="$dir/$libname.$acl_libext"
                     fi
-                  done
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
                 fi
               fi
-            fi
-            dnl Then look for a static library.
-            if test "X$found_dir" = "X"; then
-              if test -f "$dir/$libname.$acl_libext"; then
-                found_dir="$dir"
-                found_a="$dir/$libname.$acl_libext"
-              fi
-            fi
-            if test "X$found_dir" != "X"; then
-              if test -f "$dir/$libname.la"; then
-                found_la="$dir/$libname.la"
-              fi
-            fi
+            done
           fi
           if test "X$found_dir" = "X"; then
             for x in $LDFLAGS $LTLIB[]NAME; do
@@ -321,7 +335,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
                   dnl First look for a shared library.
                   if test -n "$acl_shlibext"; then
-                    if test -f "$dir/$libname$shrext"; then
+                    if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
                       found_dir="$dir"
                       found_so="$dir/$libname$shrext"
                     else
@@ -331,14 +345,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                               | sed -e "s,^$libname$shrext\\\\.,," \
                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
                               | sed 1q ) 2>/dev/null`
-                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
                           found_dir="$dir"
                           found_so="$dir/$libname$shrext.$ver"
                         fi
                       else
                         eval library_names=\"$acl_library_names_spec\"
                         for f in $library_names; do
-                          if test -f "$dir/$f"; then
+                          if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
                             found_dir="$dir"
                             found_so="$dir/$f"
                             break
@@ -349,7 +363,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                   fi
                   dnl Then look for a static library.
                   if test "X$found_dir" = "X"; then
-                    if test -f "$dir/$libname.$acl_libext"; then
+                    if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
                       found_dir="$dir"
                       found_a="$dir/$libname.$acl_libext"
                     fi
@@ -375,7 +389,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               dnl standard /usr/lib.
               if test "$enable_rpath" = no \
                  || test "X$found_dir" = "X/usr/$acl_libdirstem" \
-                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
                 dnl No hardcoding is needed.
                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
               else
@@ -475,6 +490,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                 fi
                 additional_includedir="$basedir/include"
                 ;;
+              */$acl_libdirstem3 | */$acl_libdirstem3/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
             esac
             if test "X$additional_includedir" != "X"; then
               dnl Potentially add $additional_includedir to $INCNAME.
@@ -525,19 +547,21 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               for dep in $dependency_libs; do
                 case "$dep" in
                   -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME.
                     dnl But don't add it
                     dnl   1. if it's the standard /usr/lib,
                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
                     dnl   3. if it's already present in $LDFLAGS or the already
                     dnl      constructed $LIBNAME,
                     dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
-                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+                    if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+                       && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
-                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+                      if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+                         || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -548,29 +572,29 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                         haveit=
                         for x in $LDFLAGS $LIB[]NAME; do
                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
+                          if test "X$x" = "X-L$dependency_libdir"; then
                             haveit=yes
                             break
                           fi
                         done
                         if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          if test -d "$dependency_libdir"; then
+                            dnl Really add $dependency_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir"
                           fi
                         fi
                         haveit=
                         for x in $LDFLAGS $LTLIB[]NAME; do
                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
+                          if test "X$x" = "X-L$dependency_libdir"; then
                             haveit=yes
                             break
                           fi
                         done
                         if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          if test -d "$dependency_libdir"; then
+                            dnl Really add $dependency_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
                           fi
                         fi
                       fi
@@ -607,7 +631,20 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                     ;;
                   -l*)
                     dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    dnl But on GNU systems, ignore -lc options, because
+                    dnl   - linking with libc is the default anyway,
+                    dnl   - linking with libc.a may produce an error
+                    dnl     "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie"
+                    dnl     or may produce an executable that always crashes, see
+                    dnl     <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
+                    dep=`echo "X$dep" | sed -e 's/^X-l//'`
+                    if test "X$dep" != Xc \
+                       || case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) false ;;
+                            *)                          true ;;
+                          esac; then
+                      names_next_round="$names_next_round $dep"
+                    fi
                     ;;
                   *.la)
                     dnl Handle this in the next round. Throw away the .la's
@@ -718,7 +755,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
           dir="$next"
           dnl No need to hardcode the standard /usr/lib.
           if test "X$dir" != "X/usr/$acl_libdirstem" \
-             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+             && test "X$dir" != "X/usr/$acl_libdirstem2" \
+             && test "X$dir" != "X/usr/$acl_libdirstem3"; then
             rpathdirs="$rpathdirs $dir"
           fi
           next=
@@ -728,7 +766,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
                  dnl No need to hardcode the standard /usr/lib.
                  if test "X$dir" != "X/usr/$acl_libdirstem" \
-                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                    && test "X$dir" != "X/usr/$acl_libdirstem2" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem3"; then
                    rpathdirs="$rpathdirs $dir"
                  fi
                  next= ;;
index 2e90b11..3c94db0 100644 (file)
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 14
-dnl Copyright (C) 2001-2005, 2008-2018 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 19
+dnl Copyright (C) 2001-2005, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -147,21 +147,24 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
 ])
 
 dnl AC_LIB_PREPARE_MULTILIB creates
-dnl - a variable acl_libdirstem, containing the basename of the libdir, either
-dnl   "lib" or "lib64" or "lib/64",
-dnl - a variable acl_libdirstem2, as a secondary possible value for
-dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
-dnl   "lib/amd64".
+dnl - a function acl_is_expected_elfclass, that tests whether standard input
+dn;   has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
+dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
+dnl   the basename of the libdir to try in turn, either "lib" or "lib64" or
+dnl   "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
 [
-  dnl There is no formal standard regarding lib and lib64.
-  dnl On glibc systems, the current practice is that on a system supporting
+  dnl There is no formal standard regarding lib, lib32, and lib64.
+  dnl On most glibc systems, the current practice is that on a system supporting
   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
-  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
-  dnl the compiler's default mode by looking at the compiler's library search
-  dnl path. If at least one of its elements ends in /lib64 or points to a
-  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
-  dnl Otherwise we use the default, namely "lib".
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
+  dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
+  dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
+  dnl We determine the compiler's default mode by looking at the compiler's
+  dnl library search path. If at least one of its elements ends in /lib64 or
+  dnl points to a directory whose absolute pathname ends in /lib64, we use that
+  dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
+  dnl namely "lib".
   dnl On Solaris systems, the current practice is that on a system supporting
   dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
   dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
@@ -169,27 +172,75 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
 
-  case "$host_os" in
-    solaris*)
-      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
-        [AC_COMPILE_IFELSE(
-           [AC_LANG_SOURCE(
-              [[#ifdef _LP64
-                 int ok;
-                #else
-                 error fail
-                #endif
-              ]])],
-           [gl_cv_solaris_64bit=yes],
-           [gl_cv_solaris_64bit=no])
-        ]);;
-  esac
+  AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
+    [AC_EGREP_CPP([Extensible Linking Format],
+       [#ifdef __ELF__
+        Extensible Linking Format
+        #endif
+       ],
+       [gl_cv_elf=yes],
+       [gl_cv_elf=no])
+    ])
+  if test $gl_cv_elf = yes; then
+    # Extract the ELF class of a file (5th byte) in decimal.
+    # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+    if od -A x < /dev/null >/dev/null 2>/dev/null; then
+      # Use POSIX od.
+      func_elfclass ()
+      {
+        od -A n -t d1 -j 4 -N 1
+      }
+    else
+      # Use BSD hexdump.
+      func_elfclass ()
+      {
+        dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+        echo
+      }
+    fi
+    # Use 'expr', not 'test', to compare the values of func_elfclass, because on
+    # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
+    # not 1 or 2.
+changequote(,)dnl
+    case $HOST_CPU_C_ABI_32BIT in
+      yes)
+        # 32-bit ABI.
+        acl_is_expected_elfclass ()
+        {
+          expr "`func_elfclass | sed -e 's/[   ]//g'`" = 1 > /dev/null
+        }
+        ;;
+      no)
+        # 64-bit ABI.
+        acl_is_expected_elfclass ()
+        {
+          expr "`func_elfclass | sed -e 's/[   ]//g'`" = 2 > /dev/null
+        }
+        ;;
+      *)
+        # Unknown.
+        acl_is_expected_elfclass ()
+        {
+          :
+        }
+        ;;
+    esac
+changequote([,])dnl
+  else
+    acl_is_expected_elfclass ()
+    {
+      :
+    }
+  fi
 
   dnl Allow the user to override the result by setting acl_cv_libdirstems.
   AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
     [acl_cv_libdirstems],
-    [acl_libdirstem=lib
+    [dnl Try 'lib' first, because that's the default for libdir in GNU, see
+     dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+     acl_libdirstem=lib
      acl_libdirstem2=
+     acl_libdirstem3=
      case "$host_os" in
        solaris*)
          dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
@@ -197,53 +248,76 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
          dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
          dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
          dnl symlink is missing, so we set acl_libdirstem2 too.
-         if test $gl_cv_solaris_64bit = yes; then
-           acl_libdirstem=lib/64
+         if test $HOST_CPU_C_ABI_32BIT = no; then
+           acl_libdirstem2=lib/64
            case "$host_cpu" in
-             sparc*)        acl_libdirstem2=lib/sparcv9 ;;
-             i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+             sparc*)        acl_libdirstem3=lib/sparcv9 ;;
+             i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
            esac
          fi
          ;;
        *)
          dnl If $CC generates code for a 32-bit ABI, the libraries are
-         dnl surely under $prefix/lib, not $prefix/lib64.
-         if test "$HOST_CPU_C_ABI_32BIT" != yes; then
-           dnl The result is a property of the system. However, non-system
-           dnl compilers sometimes have odd library search paths. Therefore
-           dnl prefer asking /usr/bin/gcc, if available, rather than $CC.
-           searchpath=`(if test -f /usr/bin/gcc \
-                           && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
-                          LC_ALL=C /usr/bin/gcc -print-search-dirs; \
-                        else \
-                          LC_ALL=C $CC -print-search-dirs; \
-                        fi) 2>/dev/null \
-                       | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-           if test -n "$searchpath"; then
-             acl_save_IFS="${IFS=      }"; IFS=":"
-             for searchdir in $searchpath; do
-               if test -d "$searchdir"; then
-                 case "$searchdir" in
-                   */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-                   */../ | */.. )
-                     # Better ignore directories of this form. They are misleading.
-                     ;;
-                   *) searchdir=`cd "$searchdir" && pwd`
-                      case "$searchdir" in
-                        */lib64 ) acl_libdirstem=lib64 ;;
-                      esac ;;
-                 esac
-               fi
-             done
-             IFS="$acl_save_IFS"
+         dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
+         dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
+         dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
+         dnl Find the compiler's search path. However, non-system compilers
+         dnl sometimes have odd library search paths. But we can't simply invoke
+         dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
+         dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
+         searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+                     | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+         if test $HOST_CPU_C_ABI_32BIT != no; then
+           # 32-bit or unknown ABI.
+           if test -d /usr/lib32; then
+             acl_libdirstem2=lib32
+           fi
+         fi
+         if test $HOST_CPU_C_ABI_32BIT != yes; then
+           # 64-bit or unknown ABI.
+           if test -d /usr/lib64; then
+             acl_libdirstem3=lib64
+           fi
+         fi
+         if test -n "$searchpath"; then
+           acl_save_IFS="${IFS=        }"; IFS=":"
+           for searchdir in $searchpath; do
+             if test -d "$searchdir"; then
+               case "$searchdir" in
+                 */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+                 */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+                 */../ | */.. )
+                   # Better ignore directories of this form. They are misleading.
+                   ;;
+                 *) searchdir=`cd "$searchdir" && pwd`
+                    case "$searchdir" in
+                      */lib32 ) acl_libdirstem2=lib32 ;;
+                      */lib64 ) acl_libdirstem3=lib64 ;;
+                    esac ;;
+               esac
+             fi
+           done
+           IFS="$acl_save_IFS"
+           if test $HOST_CPU_C_ABI_32BIT = yes; then
+             # 32-bit ABI.
+             acl_libdirstem3=
+           fi
+           if test $HOST_CPU_C_ABI_32BIT = no; then
+             # 64-bit ABI.
+             acl_libdirstem2=
            fi
          fi
          ;;
      esac
      test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
-     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
+     test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+     acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
     ])
-  # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
+  dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
+  dnl acl_libdirstem3.
+changequote(,)dnl
   acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
-  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
+  acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+  acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
+changequote([,])dnl
 ])
index 399c555..3255235 100644 (file)
@@ -1,5 +1,5 @@
 # libsigsegv.m4 serial 4
-dnl Copyright (C) 2002-2003, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 1587f36..657bc0d 100644 (file)
@@ -1,5 +1,5 @@
 # libunistring-base.m4 serial 5
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3a2cd91..00c9fe9 100644 (file)
@@ -1,6 +1,6 @@
 dnl Check whether limits.h has needed features.
 
-dnl Copyright 2016-2018 Free Software Foundation, Inc.
+dnl Copyright 2016-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
 [
   gl_CHECK_NEXT_HEADERS([limits.h])
 
-  AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.],
+  AC_CACHE_CHECK([whether limits.h has WORD_BIT, BOOL_WIDTH etc.],
     [gl_cv_header_limits_width],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
@@ -22,6 +22,7 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
             long long llm = LLONG_MAX;
             int wb = WORD_BIT;
             int ullw = ULLONG_WIDTH;
+            int bw = BOOL_WIDTH;
           ]])],
        [gl_cv_header_limits_width=yes],
        [gl_cv_header_limits_width=no])])
index d38a2c9..04389fc 100644 (file)
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index a37a0d2..b61df7e 100644 (file)
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 19
-dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
+# locale-fr.m4 serial 20
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_FR],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -78,8 +77,7 @@ int main () {
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
@@ -143,8 +141,7 @@ AC_DEFUN([gt_LOCALE_FR_UTF8],
 [
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -206,8 +203,7 @@ int main () {
 #endif
   return 0;
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index 9f16231..cd94288 100644 (file)
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 14
-dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
+# locale-ja.m4 serial 15
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_JA],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -82,8 +81,7 @@ int main ()
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index 2f2cf47..ecb8b60 100644 (file)
@@ -1,5 +1,5 @@
-# locale-tr.m4 serial 11
-dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
+# locale-tr.m4 serial 13
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_TR_UTF8],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -21,6 +20,7 @@ changequote(,)dnl
 #endif
 #include <stdlib.h>
 #include <string.h>
+#include <wctype.h>
 struct tm t;
 char buf[16];
 int main () {
@@ -74,8 +74,7 @@ int main () {
     return 1;
   return 0;
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index cfb447f..1228be8 100644 (file)
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 14
-dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc.
+# locale-zh.m4 serial 15
+dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,7 @@ AC_DEFUN([gt_LOCALE_ZH_CN],
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([
-changequote(,)dnl
+    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <stdlib.h>
 #include <time.h>
@@ -83,8 +82,7 @@ int main ()
   return 0;
 #endif
 }
-changequote([,])dnl
-      ])])
+      ]])])
     if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
       case "$host_os" in
         # Handle native Windows specially, because there setlocale() interprets
index e619dcd..444a381 100644 (file)
@@ -1,13 +1,13 @@
-# locale_h.m4 serial 21
-dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# locale_h.m4 serial 28
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_LOCALE_H],
+AC_DEFUN_ONCE([gl_LOCALE_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
   AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
 
   dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
@@ -17,6 +17,8 @@ AC_DEFUN([gl_LOCALE_H],
   dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
   AC_REQUIRE([gl_STDDEF_H])
 
+  AC_REQUIRE([gl_LOCALE_T])
+
   dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv'
   dnl only if _LCONV_C99 is defined.
   AC_REQUIRE([AC_CANONICAL_HOST])
@@ -37,34 +39,6 @@ AC_DEFUN([gl_LOCALE_H],
        [gl_cv_header_locale_h_posix2001=yes],
        [gl_cv_header_locale_h_posix2001=no])])
 
-  dnl Check for <xlocale.h>.
-  AC_CHECK_HEADERS_ONCE([xlocale.h])
-  if test $ac_cv_header_xlocale_h = yes; then
-    HAVE_XLOCALE_H=1
-    dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
-    dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
-    dnl itself, we assume that <xlocale.h> will do so.
-    AC_CACHE_CHECK([whether locale.h defines locale_t],
-      [gl_cv_header_locale_has_locale_t],
-      [AC_COMPILE_IFELSE(
-         [AC_LANG_PROGRAM(
-            [[#include <locale.h>
-              locale_t x;]],
-            [[]])],
-         [gl_cv_header_locale_has_locale_t=yes],
-         [gl_cv_header_locale_has_locale_t=no])
-      ])
-    if test $gl_cv_header_locale_has_locale_t = yes; then
-      gl_cv_header_locale_h_needs_xlocale_h=no
-    else
-      gl_cv_header_locale_h_needs_xlocale_h=yes
-    fi
-  else
-    HAVE_XLOCALE_H=0
-    gl_cv_header_locale_h_needs_xlocale_h=no
-  fi
-  AC_SUBST([HAVE_XLOCALE_H])
-
   dnl Check whether 'struct lconv' is complete.
   dnl Bionic libc's 'struct lconv' is just a dummy.
   dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
@@ -82,7 +56,20 @@ AC_DEFUN([gl_LOCALE_H],
        [gl_cv_sys_struct_lconv_ok=no])
     ])
   if test $gl_cv_sys_struct_lconv_ok = no; then
-    REPLACE_STRUCT_LCONV=1
+    dnl On native Windows with MSVC, merely define these member names as macros.
+    dnl This avoids trouble in C++ mode.
+    case "$host_os" in
+      mingw*)
+        AC_EGREP_CPP([Special], [
+#ifdef _MSC_VER
+ Special
+#endif
+          ],
+          [],
+          [REPLACE_STRUCT_LCONV=1])
+        ;;
+      *) REPLACE_STRUCT_LCONV=1 ;;
+    esac
   fi
 
   dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
@@ -99,21 +86,80 @@ AC_DEFUN([gl_LOCALE_H],
     [setlocale newlocale duplocale freelocale])
 ])
 
+dnl Checks to determine whether the system has the locale_t type,
+dnl and how to obtain it.
+AC_DEFUN([gl_LOCALE_T],
+[
+  dnl Persuade glibc and Solaris <locale.h> to define locale_t.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
+  dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
+  dnl itself, we assume that <xlocale.h> will do so.
+  AC_CACHE_CHECK([whether locale.h defines locale_t],
+    [gl_cv_header_locale_has_locale_t],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <locale.h>
+            locale_t x;]],
+          [[]])],
+       [gl_cv_header_locale_has_locale_t=yes],
+       [gl_cv_header_locale_has_locale_t=no])
+    ])
+
+  dnl Check for <xlocale.h>.
+  AC_CHECK_HEADERS_ONCE([xlocale.h])
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
+    fi
+    HAVE_LOCALE_T=1
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      HAVE_LOCALE_T=1
+    else
+      HAVE_LOCALE_T=0
+    fi
+  fi
+  AC_SUBST([HAVE_XLOCALE_H])
+])
+
+# gl_LOCALE_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_LOCALE_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALECONV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE_NULL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUPLOCALE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_LOCALE_H_DEFAULTS],
 [
-  GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
-  GNULIB_SETLOCALE=0;  AC_SUBST([GNULIB_SETLOCALE])
-  GNULIB_DUPLOCALE=0;  AC_SUBST([GNULIB_DUPLOCALE])
-  GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_NEWLOCALE=1;       AC_SUBST([HAVE_NEWLOCALE])
   HAVE_DUPLOCALE=1;       AC_SUBST([HAVE_DUPLOCALE])
@@ -124,4 +170,5 @@ AC_DEFUN([gl_LOCALE_H_DEFAULTS],
   REPLACE_DUPLOCALE=0;    AC_SUBST([REPLACE_DUPLOCALE])
   REPLACE_FREELOCALE=0;   AC_SUBST([REPLACE_FREELOCALE])
   REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
+  LOCALENAME_ENHANCE_LOCALE_FUNCS=0; AC_SUBST([LOCALENAME_ENHANCE_LOCALE_FUNCS])
 ])
index 517f398..e29c7c3 100644 (file)
@@ -1,5 +1,5 @@
 # localeconv.m4 serial 1
-dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/localtime-buffer.m4 b/m4/localtime-buffer.m4
deleted file mode 100644 (file)
index 4b3ec57..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# localtime-buffer.m4 serial 1
-dnl Copyright (C) 2017-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_LOCALTIME_BUFFER_DEFAULTS],
-[
-  NEED_LOCALTIME_BUFFER=0
-])
-
-dnl Macro invoked from other modules, to signal that the compilation of
-dnl module 'localtime-buffer' is needed.
-AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED],
-[
-  AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
-  NEED_LOCALTIME_BUFFER=1
-  REPLACE_GMTIME=1
-  REPLACE_LOCALTIME=1
-])
diff --git a/m4/lock.m4 b/m4/lock.m4
new file mode 100644 (file)
index 0000000..d68c12d
--- /dev/null
@@ -0,0 +1,47 @@
+# lock.m4 serial 14
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_LOCK],
+[
+  AC_REQUIRE([gl_THREADLIB])
+  if test "$gl_threads_api" = posix; then
+    # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
+    # pthread_rwlock_* functions.
+    has_rwlock=false
+    AC_CHECK_TYPE([pthread_rwlock_t],
+      [has_rwlock=true
+       AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+         [Define if the POSIX multithreading library has read/write locks.])],
+      [],
+      [#include <pthread.h>])
+    if $has_rwlock; then
+      gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+    fi
+    # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+    AC_COMPILE_IFELSE([
+      AC_LANG_PROGRAM(
+        [[#include <pthread.h>]],
+        [[
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+       && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+        ]])],
+      [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+         [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+  fi
+  gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
deleted file mode 100644 (file)
index 582af53..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-# longlong.m4 serial 18
-dnl Copyright (C) 1999-2007, 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-AC_PREREQ([2.62])
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This can be faster than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
-  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
-     [ac_cv_type_long_long_int=yes
-      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
-        if test $ac_cv_type_long_long_int = yes; then
-          dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
-          dnl If cross compiling, assume the bug is not important, since
-          dnl nobody cross compiles for this platform as far as we know.
-          AC_RUN_IFELSE(
-            [AC_LANG_PROGRAM(
-               [[@%:@include <limits.h>
-                 @%:@ifndef LLONG_MAX
-                 @%:@ define HALF \
-                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-                 @%:@ define LLONG_MAX (HALF - 1 + HALF)
-                 @%:@endif]],
-               [[long long int n = 1;
-                 int i;
-                 for (i = 0; ; i++)
-                   {
-                     long long int m = n << i;
-                     if (m >> i != n)
-                       return 1;
-                     if (LLONG_MAX / 2 < m)
-                       break;
-                   }
-                 return 0;]])],
-            [],
-            [ac_cv_type_long_long_int=no],
-            [:])
-        fi
-      fi])
-  if test $ac_cv_type_long_long_int = yes; then
-    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type 'long long int'.])
-  fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This can be faster than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
-  AC_CACHE_CHECK([for unsigned long long int],
-    [ac_cv_type_unsigned_long_long_int],
-    [ac_cv_type_unsigned_long_long_int=yes
-     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-       AC_LINK_IFELSE(
-         [_AC_TYPE_LONG_LONG_SNIPPET],
-         [],
-         [ac_cv_type_unsigned_long_long_int=no])
-     fi])
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
-      [Define to 1 if the system has the type 'unsigned long long int'.])
-  fi
-])
-
-# Expands to a C program that can be used to test for simultaneous support
-# of 'long long' and 'unsigned long long'. We don't want to say that
-# 'long long' is available if 'unsigned long long' is not, or vice versa,
-# because too many programs rely on the symmetry between signed and unsigned
-# integer types (excluding 'bool').
-AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
-[
-  AC_LANG_PROGRAM(
-    [[/* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;]],
-    [[/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));]])
-])
index 3694e4c..62e9db2 100644 (file)
@@ -1,6 +1,6 @@
-# serial 32
+# serial 33
 
-# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -63,8 +63,8 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
             # Guess no on native Windows.
             gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
           *)
-            # If we don't know, assume the worst.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
         esac
        ])
      rm -f conftest.sym conftest.file
index 4c182b4..972e808 100644 (file)
@@ -1,29 +1,21 @@
-# malloc.m4 serial 17
-dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# malloc.m4 serial 27
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-m4_version_prereq([2.70], [] ,[
-
 # This is adapted with modifications from upstream Autoconf here:
-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
-  AC_REQUIRE([AC_HEADER_STDC])dnl
   AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
-  AC_CHECK_HEADERS([stdlib.h])
-  AC_CACHE_CHECK([for GNU libc compatible malloc],
+  AC_CACHE_CHECK([whether malloc (0) returns nonnull],
     [ac_cv_func_malloc_0_nonnull],
     [AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
-            # include <stdlib.h>
-            #else
-            char *malloc ();
-            #endif
+          [[#include <stdlib.h>
           ]],
-          [[char *p = malloc (0);
+          [[void *p = malloc (0);
             int result = !p;
             free (p);
             return result;]])
@@ -32,70 +24,151 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
        [ac_cv_func_malloc_0_nonnull=no],
        [case "$host_os" in
           # Guess yes on platforms where we know the result.
-          *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
-            ac_cv_func_malloc_0_nonnull=yes ;;
-          # If we don't know, assume the worst.
-          *) ac_cv_func_malloc_0_nonnull=no ;;
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
         esac
        ])
     ])
-  AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2])
+  AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2])
 ])# _AC_FUNC_MALLOC_IF
 
-])
-
 # gl_FUNC_MALLOC_GNU
 # ------------------
-# Test whether 'malloc (0)' is handled like in GNU libc, and replace malloc if
-# it is not.
+# Replace malloc if it is not compatible with GNU libc.
 AC_DEFUN([gl_FUNC_MALLOC_GNU],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
-  dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
-  _AC_FUNC_MALLOC_IF(
-    [AC_DEFINE([HAVE_MALLOC_GNU], [1],
-               [Define to 1 if your system has a GNU libc compatible 'malloc'
-                function, and to 0 otherwise.])],
-    [AC_DEFINE([HAVE_MALLOC_GNU], [0])
-     REPLACE_MALLOC=1
+  AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+  if test $REPLACE_MALLOC = 0; then
+    _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1])
+  fi
+])
+
+# gl_FUNC_MALLOC_PTRDIFF
+# ----------------------
+# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX,
+# and replace malloc otherwise.
+AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
+  test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1
+])
+
+# Test whether malloc, realloc, calloc refuse to create objects
+# larger than what can be expressed in ptrdiff_t.
+# Set gl_cv_func_malloc_gnu to yes or no accordingly.
+AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF],
+[
+  AC_CACHE_CHECK([whether malloc is ptrdiff_t safe],
+    [gl_cv_malloc_ptrdiff],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdint.h>
+          ]],
+          [[/* 64-bit ptrdiff_t is so wide that no practical platform
+               can exceed it.  */
+            #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
+
+            /* On rare machines where size_t fits in ptrdiff_t there
+               is no problem.  */
+            #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
+
+            /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
+               bounds even on 32-bit platforms.  We don't know which
+               non-glibc systems are safe.  */
+            #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
+
+            #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
+              return 0;
+            #else
+              #error "malloc might not be ptrdiff_t safe"
+              syntax error
+            #endif
+          ]])],
+       [gl_cv_malloc_ptrdiff=yes],
+       [gl_cv_malloc_ptrdiff=no])
     ])
 ])
 
 # gl_FUNC_MALLOC_POSIX
 # --------------------
 # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
-# fails), and replace malloc if it is not.
+# fails, and doesn't mess up with ptrdiff_t overflow), and replace
+# malloc if it is not.
 AC_DEFUN([gl_FUNC_MALLOC_POSIX],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF])
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
-  if test $gl_cv_func_malloc_posix = yes; then
+  if test "$gl_cv_func_malloc_posix" = yes; then
     AC_DEFINE([HAVE_MALLOC_POSIX], [1],
-      [Define if the 'malloc' function is POSIX compliant.])
+      [Define if malloc, realloc, and calloc set errno on allocation failure.])
   else
     REPLACE_MALLOC=1
   fi
 ])
 
-# Test whether malloc, realloc, calloc are POSIX compliant,
+# Test whether malloc, realloc, calloc set errno to ENOMEM on failure.
 # Set gl_cv_func_malloc_posix to yes or no accordingly.
 AC_DEFUN([gl_CHECK_MALLOC_POSIX],
 [
-  AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure],
     [gl_cv_func_malloc_posix],
     [
       dnl It is too dangerous to try to allocate a large amount of memory:
       dnl some systems go to their knees when you do that. So assume that
-      dnl all Unix implementations of the function are POSIX compliant.
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[]],
-           [[#if defined _WIN32 && ! defined __CYGWIN__
-             choke me
-             #endif
-            ]])],
-        [gl_cv_func_malloc_posix=yes],
-        [gl_cv_func_malloc_posix=no])
+      dnl all Unix implementations of the function set errno on failure,
+      dnl except on those platforms where we have seen 'test-malloc-gnu',
+      dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
+      case "$host_os" in
+        mingw*)
+          gl_cv_func_malloc_posix=no ;;
+        irix* | solaris*)
+          dnl On IRIX 6.5, the three functions return NULL with errno unset
+          dnl when the argument is larger than PTRDIFF_MAX.
+          dnl On Solaris 11.3, the three functions return NULL with errno set
+          dnl to EAGAIN, not ENOMEM, when the argument is larger than
+          dnl PTRDIFF_MAX.
+          dnl Here is a test program:
+m4_divert_push([KILL])
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#define ptrdiff_t long
+#ifndef PTRDIFF_MAX
+# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1))
+#endif
+
+int main ()
+{
+  void *p;
+
+  fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX);
+
+  errno = 0;
+  p = malloc ((unsigned long) PTRDIFF_MAX + 1);
+  fprintf (stderr, "p=%p errno=%d\n", p, errno);
+
+  errno = 0;
+  p = calloc (PTRDIFF_MAX / 2 + 1, 2);
+  fprintf (stderr, "p=%p errno=%d\n", p, errno);
+
+  errno = 0;
+  p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1);
+  fprintf (stderr, "p=%p errno=%d\n", p, errno);
+
+  return 0;
+}
+m4_divert_pop([KILL])
+          gl_cv_func_malloc_posix=no ;;
+        *)
+          gl_cv_func_malloc_posix=yes ;;
+      esac
     ])
 ])
index 2251e61..06ed2c6 100644 (file)
@@ -1,5 +1,5 @@
-# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 Free Software Foundation,
+# malloca.m4 serial 2
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,5 +11,4 @@ AC_DEFUN([gl_MALLOCA],
   dnl @ALLOCA@ and @LTALLOCA@.
   dnl gl_FUNC_ALLOCA   dnl Already brought in by the module dependencies.
   AC_REQUIRE([gl_EEMALLOC])
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
 ])
index d831ed2..53ab153 100644 (file)
@@ -1,5 +1,5 @@
-# manywarnings.m4 serial 17
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# manywarnings.m4 serial 21
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,7 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
       *" $gl_warn_item "*)
         ;;
       *)
-        gl_warn_set="$gl_warn_set $gl_warn_item"
+        gl_AS_VAR_APPEND([gl_warn_set], [" $gl_warn_item"])
         ;;
     esac
   done
@@ -39,8 +39,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
 
 # Specialization for _AC_LANG = C.
-# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
-m4_defun([gl_MANYWARN_ALL_GCC(C)],
+AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
 [
   AC_LANG_PUSH([C])
 
@@ -49,12 +48,12 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
   AC_REQUIRE([AC_PROG_CC])
   if test -n "$GCC"; then
 
-    dnl Check if -W -Werror -Wno-missing-field-initializers is supported
+    dnl Check if -Wextra -Werror -Wno-missing-field-initializers is supported
     dnl with the current $CC $CFLAGS $CPPFLAGS.
     AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
       [gl_cv_cc_nomfi_supported],
       [gl_save_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
+       CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
        AC_COMPILE_IFELSE(
          [AC_LANG_PROGRAM([[]], [[]])],
          [gl_cv_cc_nomfi_supported=yes],
@@ -68,7 +67,7 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
       AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
         [gl_cv_cc_nomfi_needed],
         [gl_save_CFLAGS="$CFLAGS"
-         CFLAGS="$CFLAGS -W -Werror"
+         CFLAGS="$CFLAGS -Wextra -Werror"
          AC_COMPILE_IFELSE(
            [AC_LANG_PROGRAM(
               [[int f (void)
@@ -105,129 +104,41 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
   # To compare this list to your installed GCC's, run this Bash command:
   #
   # comm -3 \
-  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
+  #  <((sed -n 's/^  *\(-[^ 0-9][^ ]*\).*/\1/p' manywarnings.m4; \
   #     awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
   #  <(LC_ALL=C gcc --help=warnings | sed -n 's/^  \(-[^ ]*\) .*/\1/p' | sort)
 
-  gl_manywarn_set=
-  for gl_manywarn_item in -fno-common \
-    -W \
-    -Waddress \
-    -Waggressive-loop-optimizations \
+  $1=
+  for gl_manywarn_item in -fanalyzer -fno-common \
     -Wall \
-    -Wattribute-alias \
-    -Wattributes \
+    -Warith-conversion \
     -Wbad-function-cast \
-    -Wbool-compare \
-    -Wbool-operation \
-    -Wbuiltin-declaration-mismatch \
-    -Wbuiltin-macro-redefined \
-    -Wcast-align \
     -Wcast-align=strict \
-    -Wcast-function-type \
-    -Wchar-subscripts \
-    -Wclobbered \
-    -Wcomment \
-    -Wcomments \
-    -Wcoverage-mismatch \
-    -Wcpp \
-    -Wdangling-else \
     -Wdate-time \
-    -Wdeprecated \
-    -Wdeprecated-declarations \
-    -Wdesignated-init \
     -Wdisabled-optimization \
-    -Wdiscarded-array-qualifiers \
-    -Wdiscarded-qualifiers \
-    -Wdiv-by-zero \
     -Wdouble-promotion \
     -Wduplicated-branches \
     -Wduplicated-cond \
-    -Wduplicate-decl-specifier \
-    -Wempty-body \
-    -Wendif-labels \
-    -Wenum-compare \
-    -Wexpansion-to-defined \
     -Wextra \
-    -Wformat-contains-nul \
-    -Wformat-extra-args \
-    -Wformat-nonliteral \
-    -Wformat-security \
     -Wformat-signedness \
-    -Wformat-y2k \
-    -Wformat-zero-length \
-    -Wframe-address \
-    -Wfree-nonheap-object \
-    -Whsa \
-    -Wif-not-aligned \
-    -Wignored-attributes \
-    -Wignored-qualifiers \
-    -Wimplicit \
-    -Wimplicit-function-declaration \
-    -Wimplicit-int \
-    -Wincompatible-pointer-types \
     -Winit-self \
     -Winline \
-    -Wint-conversion \
-    -Wint-in-bool-context \
-    -Wint-to-pointer-cast \
-    -Winvalid-memory-model \
     -Winvalid-pch \
-    -Wlogical-not-parentheses \
     -Wlogical-op \
-    -Wmain \
-    -Wmaybe-uninitialized \
-    -Wmemset-elt-size \
-    -Wmemset-transposed-args \
-    -Wmisleading-indentation \
-    -Wmissing-attributes \
-    -Wmissing-braces \
     -Wmissing-declarations \
-    -Wmissing-field-initializers \
     -Wmissing-include-dirs \
-    -Wmissing-parameter-type \
     -Wmissing-prototypes \
-    -Wmultichar \
-    -Wmultistatement-macros \
-    -Wnarrowing \
     -Wnested-externs \
-    -Wnonnull \
-    -Wnonnull-compare \
     -Wnull-dereference \
-    -Wodr \
-    -Wold-style-declaration \
     -Wold-style-definition \
     -Wopenmp-simd \
-    -Woverflow \
     -Woverlength-strings \
-    -Woverride-init \
     -Wpacked \
-    -Wpacked-bitfield-compat \
-    -Wpacked-not-aligned \
-    -Wparentheses \
     -Wpointer-arith \
-    -Wpointer-compare \
-    -Wpointer-sign \
-    -Wpointer-to-int-cast \
-    -Wpragmas \
-    -Wpsabi \
-    -Wrestrict \
-    -Wreturn-local-addr \
-    -Wreturn-type \
-    -Wscalar-storage-order \
-    -Wsequence-point \
     -Wshadow \
-    -Wshift-count-negative \
-    -Wshift-count-overflow \
-    -Wshift-negative-value \
-    -Wsizeof-array-argument \
-    -Wsizeof-pointer-div \
-    -Wsizeof-pointer-memaccess \
     -Wstack-protector \
-    -Wstrict-aliasing \
     -Wstrict-overflow \
     -Wstrict-prototypes \
-    -Wstringop-truncation \
     -Wsuggest-attribute=cold \
     -Wsuggest-attribute=const \
     -Wsuggest-attribute=format \
@@ -236,99 +147,69 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
     -Wsuggest-attribute=pure \
     -Wsuggest-final-methods \
     -Wsuggest-final-types \
-    -Wswitch \
-    -Wswitch-bool \
-    -Wswitch-unreachable \
     -Wsync-nand \
     -Wsystem-headers \
-    -Wtautological-compare \
     -Wtrampolines \
-    -Wtrigraphs \
-    -Wtype-limits \
     -Wuninitialized \
     -Wunknown-pragmas \
     -Wunsafe-loop-optimizations \
-    -Wunused \
-    -Wunused-but-set-parameter \
-    -Wunused-but-set-variable \
-    -Wunused-function \
-    -Wunused-label \
-    -Wunused-local-typedefs \
     -Wunused-macros \
-    -Wunused-parameter \
-    -Wunused-result \
-    -Wunused-value \
-    -Wunused-variable \
-    -Wvarargs \
     -Wvariadic-macros \
     -Wvector-operation-performance \
     -Wvla \
-    -Wvolatile-register-var \
     -Wwrite-strings \
     \
     ; do
-    gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
+    gl_AS_VAR_APPEND([$1], [" $gl_manywarn_item"])
   done
 
   # gcc --help=warnings outputs an unusual form for these options; list
   # them here so that the above 'comm' command doesn't report a false match.
-  # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
-  # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
-  # the only platforms where it does not fit in a long, so make that
-  # a special case.
-  AC_MSG_CHECKING([max safe object size])
-  AC_COMPUTE_INT([gl_alloc_max],
-    [LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
-     ? -1
-     : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1],
-    [[#include <limits.h>
-      #include <stddef.h>
-      #include <stdint.h>
-    ]],
-    [gl_alloc_max=2147483647])
-  case $gl_alloc_max in
-    -1) gl_alloc_max=9223372036854775807;;
-  esac
-  AC_MSG_RESULT([$gl_alloc_max])
-  gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
-  gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
-  gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
-  gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
-  gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
-  gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
-  gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
-  gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
+  gl_AS_VAR_APPEND([$1], [' -Warray-bounds=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wattribute-alias=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wformat-overflow=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wformat=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wformat-truncation=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wimplicit-fallthrough=5'])
+  gl_AS_VAR_APPEND([$1], [' -Wshift-overflow=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wunused-const-variable=2'])
+  gl_AS_VAR_APPEND([$1], [' -Wvla-larger-than=4031'])
 
   # These are needed for older GCC versions.
   if test -n "$GCC"; then
     case `($CC --version) 2>/dev/null` in
       'gcc (GCC) '[[0-3]].* | \
       'gcc (GCC) '4.[[0-7]].*)
-        gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
-        gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
+        gl_AS_VAR_APPEND([$1], [' -fdiagnostics-show-option'])
+        gl_AS_VAR_APPEND([$1], [' -funit-at-a-time'])
           ;;
     esac
   fi
 
   # Disable specific options as needed.
   if test "$gl_cv_cc_nomfi_needed" = yes; then
-    gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
+    gl_AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])
   fi
 
   if test "$gl_cv_cc_uninitialized_supported" = no; then
-    gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
+    gl_AS_VAR_APPEND([$1], [' -Wno-uninitialized'])
   fi
 
-  $1=$gl_manywarn_set
+  # Some warnings have too many false alarms in GCC 10.1.
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93695
+  gl_AS_VAR_APPEND([$1], [' -Wno-analyzer-double-free'])
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94458
+  gl_AS_VAR_APPEND([$1], [' -Wno-analyzer-malloc-leak'])
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94851
+  gl_AS_VAR_APPEND([$1], [' -Wno-analyzer-null-dereference'])
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95758
+  gl_AS_VAR_APPEND([$1], [' -Wno-analyzer-use-after-free'])
 
   AC_LANG_POP([C])
 ])
 
 # Specialization for _AC_LANG = C++.
-# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
-m4_defun([gl_MANYWARN_ALL_GCC(C++)],
+AC_DEFUN([gl_MANYWARN_ALL_GCC(C++)],
 [
   gl_MANYWARN_ALL_GCC_CXX_IMPL([$1])
 ])
index 2ecb4d4..b6842bb 100644 (file)
@@ -1,5 +1,5 @@
 # mbchar.m4 serial 9
-dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 8ffa6f4..0d57379 100644 (file)
@@ -1,5 +1,5 @@
 # mbiter.m4 serial 7
-dnl Copyright (C) 2005, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index c706d04..1d4e73d 100644 (file)
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 31  -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 Free Software Foundation,
+# mbrtowc.m4 serial 38  -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,8 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN([gl_FUNC_MBRTOWC],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([gl_PTHREADLIB])
+  AC_CHECK_HEADERS_ONCE([threads.h])
 
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   gl_MBSTATE_T_BROKEN
@@ -16,15 +18,8 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
   if test $ac_cv_func_mbrtowc = no; then
     HAVE_MBRTOWC=0
     AC_CHECK_DECLS([mbrtowc],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbrtowc = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbrtowc() although
       dnl it does not have the function. Avoid a collision with gnulib's
@@ -39,6 +34,7 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
       gl_MBRTOWC_NULL_ARG2
       gl_MBRTOWC_RETVAL
       gl_MBRTOWC_NUL_RETVAL
+      gl_MBRTOWC_STORES_INCOMPLETE
       gl_MBRTOWC_EMPTY_INPUT
       gl_MBRTOWC_C_LOCALE
       case "$gl_cv_func_mbrtowc_null_arg1" in
@@ -69,6 +65,13 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
            REPLACE_MBRTOWC=1
            ;;
       esac
+      case "$gl_cv_func_mbrtowc_stores_incomplete" in
+        *no) ;;
+        *) AC_DEFINE([MBRTOWC_STORES_INCOMPLETE_BUG], [1],
+             [Define if the mbrtowc function stores a wide character when reporting incomplete input.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
       case "$gl_cv_func_mbrtowc_empty_input" in
         *yes) ;;
         *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
@@ -77,15 +80,32 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
            REPLACE_MBRTOWC=1
            ;;
       esac
-      case $gl_cv_C_locale_sans_EILSEQ in
+      case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
         *yes) ;;
-        *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
-             [Define to 1 if the C locale may have encoding errors.])
+        *) AC_DEFINE([MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ], [1],
+             [Define if the mbrtowc function may signal encoding errors in the C locale.])
            REPLACE_MBRTOWC=1
            ;;
       esac
     fi
   fi
+  if test $REPLACE_MBSTATE_T = 1; then
+    case "$host_os" in
+      mingw*) LIB_MBRTOWC= ;;
+      *)
+        gl_WEAK_SYMBOLS
+        case "$gl_cv_have_weak" in
+          *yes) LIB_MBRTOWC= ;;
+          *)    LIB_MBRTOWC="$LIBPTHREAD" ;;
+        esac
+        ;;
+    esac
+  else
+    LIB_MBRTOWC=
+  fi
+  dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
+  dnl with gcc or xlc, and empty otherwise.
+  AC_SUBST([LIB_MBRTOWC])
 ])
 
 dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
@@ -97,11 +117,19 @@ dnl avoid inconsistencies.
 AC_DEFUN([gl_MBSTATE_T_BROKEN],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
 
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   AC_CHECK_FUNCS_ONCE([mbsinit])
   AC_CHECK_FUNCS_ONCE([mbrtowc])
-  if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+  dnl On native Windows, we know exactly how mbsinit() behaves and don't need
+  dnl to override it, even if - like on MSVC - mbsinit() is only defined as
+  dnl an inline function, not as a global function.
+  if case "$host_os" in
+       mingw*) true ;;
+       *) test $ac_cv_func_mbsinit = yes ;;
+     esac \
+    && test $ac_cv_func_mbrtowc = yes; then
     gl_MBRTOWC_INCOMPLETE_STATE
     gl_MBRTOWC_SANITYCHECK
     REPLACE_MBSTATE_T=0
@@ -126,6 +154,7 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([gt_LOCALE_JA])
+  AC_REQUIRE([gt_LOCALE_FR_UTF8])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
     [gl_cv_func_mbrtowc_incomplete_state],
@@ -145,13 +174,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -171,6 +193,32 @@ int main ()
           [gl_cv_func_mbrtowc_incomplete_state=yes],
           [gl_cv_func_mbrtowc_incomplete_state=no],
           [:])
+      else
+        if test $LOCALE_FR_UTF8 != none; then
+          AC_RUN_IFELSE(
+            [AC_LANG_SOURCE([[
+#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;
+}]])],
+          [gl_cv_func_mbrtowc_incomplete_state=yes],
+          [gl_cv_func_mbrtowc_incomplete_state=no],
+          [:])
+        fi
       fi
     ])
 ])
@@ -202,13 +250,6 @@ changequote([,])dnl
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -262,13 +303,6 @@ changequote([,])dnl
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -331,13 +365,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -393,13 +420,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -521,13 +541,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
@@ -550,6 +563,112 @@ int main ()
     ])
 ])
 
+dnl Test whether mbrtowc stores a wide character when reporting incomplete
+dnl input.
+
+AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether mbrtowc stores incomplete characters],
+    [gl_cv_func_mbrtowc_stores_incomplete],
+    [
+     dnl Initial guess, used when cross-compiling or when no suitable locale
+     dnl is present.
+changequote(,)dnl
+     case "$host_os" in
+               # Guess yes on native Windows.
+       mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
+       *)      gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
+     esac
+changequote([,])dnl
+     case "$host_os" in
+       mingw*)
+         AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  int result = 0;
+  if (setlocale (LC_ALL, "French_France.65001") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 1;
+    }
+  if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 2;
+    }
+  if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 4;
+    }
+  if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        result |= 8;
+    }
+  return result;
+}]])],
+           [gl_cv_func_mbrtowc_stores_incomplete=no],
+           [gl_cv_func_mbrtowc_stores_incomplete=yes],
+           [:])
+         ;;
+       *)
+         AC_REQUIRE([gt_LOCALE_FR_UTF8])
+         if test $LOCALE_FR_UTF8 != none; then
+           AC_RUN_IFELSE(
+             [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+    {
+      wchar_t wc = (wchar_t) 0xBADFACE;
+      mbstate_t state;
+
+      memset (&state, '\0', sizeof (mbstate_t));
+      if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+          && wc != (wchar_t) 0xBADFACE)
+        return 1;
+    }
+  return 0;
+}]])],
+             [gl_cv_func_mbrtowc_stores_incomplete=no],
+             [gl_cv_func_mbrtowc_stores_incomplete=yes],
+             [:])
+         fi
+         ;;
+     esac
+    ])
+])
+
 dnl Test whether mbrtowc returns the correct value on empty input.
 
 AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
@@ -595,11 +714,11 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
 [
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([whether the C locale is free of encoding errors],
-    [gl_cv_C_locale_sans_EILSEQ],
+    [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ],
     [
      dnl Initial guess, used when cross-compiling or when no suitable locale
      dnl is present.
-     gl_cv_C_locale_sans_EILSEQ="guessing no"
+     gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
 
      AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
@@ -622,22 +741,28 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
               }
             return 0;
           ]])],
-      [gl_cv_C_locale_sans_EILSEQ=yes],
-      [gl_cv_C_locale_sans_EILSEQ=no],
+      [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
+      [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
       [case "$host_os" in
                  # Guess yes on native Windows.
-         mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+         mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
        esac
       ])
     ])
 ])
 
-# Prerequisites of lib/mbrtowc.c.
+# Prerequisites of lib/mbrtowc.c and lib/lc-charset-dispatch.c.
 AC_DEFUN([gl_PREREQ_MBRTOWC], [
   AC_REQUIRE([AC_C_INLINE])
   :
 ])
 
+# Prerequisites of lib/mbtowc-lock.c.
+AC_DEFUN([gl_PREREQ_MBTOWC_LOCK],
+[
+  gl_VISIBILITY
+])
+
 
 dnl From Paul Eggert
 
@@ -650,14 +775,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC],
     [gl_cv_func_mbrtowc],
     [AC_LINK_IFELSE(
        [AC_LANG_PROGRAM(
-            [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                 included before <wchar.h>.
-                 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                 must be included before <wchar.h>.  */
-              #include <stddef.h>
-              #include <stdio.h>
-              #include <time.h>
-              #include <wchar.h>]],
+            [[#include <wchar.h>]],
             [[wchar_t wc;
               char const s[] = "";
               size_t n = 1;
index 5cba3df..dc6e10d 100644 (file)
@@ -1,5 +1,5 @@
-# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2018 Free Software Foundation, Inc.
+# mbsinit.m4 serial 9
+dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -16,15 +16,8 @@ AC_DEFUN([gl_FUNC_MBSINIT],
   if test $ac_cv_func_mbsinit = no; then
     HAVE_MBSINIT=0
     AC_CHECK_DECLS([mbsinit],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbsinit = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbsinit() although
       dnl it does not have the function. Avoid a collision with gnulib's
index b61c59d..0801fdf 100644 (file)
@@ -1,12 +1,12 @@
-# mbslen.m4 serial 2
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# mbslen.m4 serial 3
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_MBSLEN],
 [
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
   AC_CHECK_FUNCS_ONCE([mbslen])
   if test $ac_cv_func_mbslen = yes; then
     HAVE_MBSLEN=1
index 871dd96..cf8e962 100644 (file)
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 13
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 14
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,8 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
   if test $ac_cv_func_mbsrtowcs = no; then
     HAVE_MBSRTOWCS=0
     AC_CHECK_DECLS([mbsrtowcs],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_mbsrtowcs = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares mbsrtowcs() although
       dnl it does not have the function. Avoid a collision with gnulib's
@@ -72,13 +65,6 @@ changequote([,])dnl
           [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 int main ()
 {
index 004aa0d..e7fe358 100644 (file)
@@ -1,5 +1,5 @@
-# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2018 Free Software Foundation, Inc.
+# mbstate_t.m4 serial 14
+dnl Copyright (C) 2000-2002, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -20,14 +20,7 @@ AC_DEFUN([AC_TYPE_MBSTATE_T],
      [AC_COMPILE_IFELSE(
         [AC_LANG_PROGRAM(
            [AC_INCLUDES_DEFAULT[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>]],
+             #include <wchar.h>]],
            [[mbstate_t x; return sizeof x;]])],
         [ac_cv_type_mbstate_t=yes],
         [ac_cv_type_mbstate_t=no])])
index ecac6a2..7fc74c9 100644 (file)
@@ -1,5 +1,5 @@
-# mbtowc.m4 serial 2
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# mbtowc.m4 serial 3
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,8 +8,13 @@ AC_DEFUN([gl_FUNC_MBTOWC],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
 
-  if false; then
-    REPLACE_MBTOWC=1
+  AC_CHECK_FUNCS([mbtowc])
+  if test $ac_cv_func_mbtowc = no; then
+    HAVE_MBTOWC=0
+  else
+    if false; then
+      REPLACE_MBTOWC=1
+    fi
   fi
 ])
 
index 83c65c1..ca08192 100644 (file)
@@ -1,5 +1,5 @@
-# memchr.m4 serial 13
-dnl Copyright (C) 2002-2004, 2009-2018 Free Software Foundation, Inc.
+# memchr.m4 serial 18
+dnl Copyright (C) 2002-2004, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,25 +13,18 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
   AC_CHECK_HEADERS_ONCE([sys/mman.h])
   AC_CHECK_FUNCS_ONCE([mprotect])
 
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [
-    dnl These days, we assume memchr is present.  But if support for old
-    dnl platforms is desired:
-    AC_CHECK_FUNCS_ONCE([memchr])
-    if test $ac_cv_func_memchr = no; then
-      HAVE_MEMCHR=0
-    fi
-  ])
-  if test $HAVE_MEMCHR = 1; then
-    # Detect platform-specific bugs in some versions of glibc:
-    # memchr should not dereference anything with length 0
-    #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
-    # memchr should not dereference overestimated length after a match
-    #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
-    #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
-    # Assume that memchr works on platforms that lack mprotect.
-    AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
+  # Detect platform-specific bugs in some versions of glibc:
+  # memchr should not dereference anything with length 0
+  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
+  # memchr should not dereference overestimated length after a match
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+  # memchr should cast the second argument to 'unsigned char'.
+  #   This bug exists in Android 4.3.
+  # Assume that memchr works on platforms that lack mprotect.
+  AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
+    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 #include <string.h>
 #if HAVE_SYS_MMAN_H
 # include <fcntl.h>
@@ -66,6 +59,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
 #endif
   if (fence)
     {
+      /* Test against bugs on glibc systems.  */
       if (memchr (fence, 0, 0))
         result |= 1;
       strcpy (fence - 9, "12345678");
@@ -73,24 +67,37 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
         result |= 2;
       if (memchr (fence - 1, 0, 3) != fence - 1)
         result |= 4;
+      /* Test against bug on AIX 7.2.  */
+      if (memchr (fence - 4, '6', 16) != fence - 4)
+        result |= 8;
     }
+  /* Test against bug on Android 4.3.  */
+  {
+    char input[3];
+    input[0] = 'a';
+    input[1] = 'b';
+    input[2] = 'c';
+    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
+      result |= 16;
+  }
   return result;
 ]])],
-         [gl_cv_func_memchr_works=yes],
-         [gl_cv_func_memchr_works=no],
-         [case "$host_os" in
-                    # Guess yes on native Windows.
-            mingw*) gl_cv_func_memchr_works="guessing yes" ;;
-                    # Be pessimistic for now.
-            *)      gl_cv_func_memchr_works="guessing no" ;;
-          esac
-         ])
-      ])
-    case "$gl_cv_func_memchr_works" in
-      *yes) ;;
-      *) REPLACE_MEMCHR=1 ;;
-    esac
-  fi
+       [gl_cv_func_memchr_works=yes],
+       [gl_cv_func_memchr_works=no],
+       [case "$host_os" in
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+                           # Guess yes on native Windows.
+          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+    ])
+  case "$gl_cv_func_memchr_works" in
+    *yes) ;;
+    *) REPLACE_MEMCHR=1 ;;
+  esac
 ])
 
 # Prerequisites of lib/memchr.c.
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
new file mode 100644 (file)
index 0000000..f9d9ec8
--- /dev/null
@@ -0,0 +1,26 @@
+# mempcpy.m4 serial 12
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MEMPCPY],
+[
+  dnl Persuade glibc <string.h> to declare mempcpy().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'.
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
+  AC_CHECK_FUNCS([mempcpy])
+  if test $ac_cv_func_mempcpy = no; then
+    HAVE_MEMPCPY=0
+  fi
+])
+
+# Prerequisites of lib/mempcpy.c.
+AC_DEFUN([gl_PREREQ_MEMPCPY], [
+  :
+])
index 5e88508..e21a687 100644 (file)
@@ -1,5 +1,5 @@
 # minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 1452999..031fd29 100644 (file)
@@ -1,6 +1,6 @@
-# serial 14
+# serial 17
 
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,33 +16,34 @@ AC_DEFUN([gl_FUNC_MKDIR],
   AC_CACHE_CHECK([whether mkdir handles trailing slash],
     [gl_cv_func_mkdir_trailing_slash_works],
     [rm -rf conftest.dir
-      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#       include <sys/types.h>
-#       include <sys/stat.h>
-]], [return mkdir ("conftest.dir/", 0700);])],
-      [gl_cv_func_mkdir_trailing_slash_works=yes],
-      [gl_cv_func_mkdir_trailing_slash_works=no],
-      [case "$host_os" in
-                          # Guess yes on Linux systems.
-         linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on glibc systems.
-         *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
-                          # Guess yes on MSVC, no on mingw.
-         mingw*)          AC_EGREP_CPP([Known], [
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #include <sys/types.h>
+          #include <sys/stat.h>
+          ]GL_MDA_DEFINES],
+          [[return mkdir ("conftest.dir/", 0700);]])],
+       [gl_cv_func_mkdir_trailing_slash_works=yes],
+       [gl_cv_func_mkdir_trailing_slash_works=no],
+       [case "$host_os" in
+                           # Guess yes on Linux systems.
+          linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+                           # Guess yes on MSVC, no on mingw.
+          mingw*)          AC_EGREP_CPP([Known], [
 #ifdef _MSC_VER
  Known
 #endif
-                            ],
-                            [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
-                            [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
-                          ;;
-                          # If we don't know, assume the worst.
-         *)               gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
-       esac
-      ])
-    rm -rf conftest.dir
-    ]
-  )
+                             ],
+                             [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
+                             [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+                           ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -rf conftest.dir
+    ])
   case "$gl_cv_func_mkdir_trailing_slash_works" in
     *yes) ;;
     *)
@@ -53,22 +54,26 @@ AC_DEFUN([gl_FUNC_MKDIR],
   AC_CACHE_CHECK([whether mkdir handles trailing dot],
     [gl_cv_func_mkdir_trailing_dot_works],
     [rm -rf conftest.dir
-      AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-#       include <sys/types.h>
-#       include <sys/stat.h>
-]], [return !mkdir ("conftest.dir/./", 0700);])],
-      [gl_cv_func_mkdir_trailing_dot_works=yes],
-      [gl_cv_func_mkdir_trailing_dot_works=no],
-      [case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
-                        # Guess no on native Windows.
-         mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-                        # If we don't know, assume the worst.
-         *)             gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
-       esac
-      ])
-    rm -rf conftest.dir
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM([[
+          #include <sys/types.h>
+          #include <sys/stat.h>
+          ]GL_MDA_DEFINES],
+          [[return !mkdir ("conftest.dir/./", 0700);]])],
+       [gl_cv_func_mkdir_trailing_dot_works=yes],
+       [gl_cv_func_mkdir_trailing_dot_works=no],
+       [case "$host_os" in
+                         # Guess yes on glibc systems.
+          *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess yes on musl systems.
+          *-musl*)       gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+                         # Guess no on native Windows.
+          mingw*)        gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
+        esac
+       ])
+     rm -rf conftest.dir
     ]
   )
   case "$gl_cv_func_mkdir_trailing_dot_works" in
index 1407ed9..9318fa6 100644 (file)
@@ -1,6 +1,6 @@
-#serial 25
+#serial 28
 
-# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -26,7 +26,8 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
         mkdir conftest.mkstemp
         AC_RUN_IFELSE(
           [AC_LANG_PROGRAM(
-            [AC_INCLUDES_DEFAULT],
+            [AC_INCLUDES_DEFAULT
+             GL_MDA_DEFINES],
             [[int result = 0;
               int i;
               off_t large = (off_t) 4294967295u;
@@ -59,10 +60,12 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
           [case "$host_os" in
                             # Guess yes on glibc systems.
              *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+                            # Guess yes on musl systems.
+             *-musl*)       gl_cv_func_working_mkstemp="guessing yes" ;;
                             # Guess no on native Windows.
              mingw*)        gl_cv_func_working_mkstemp="guessing no" ;;
-                            # If we don't know, assume the worst.
-             *)             gl_cv_func_working_mkstemp="guessing no" ;;
+                            # If we don't know, obey --enable-cross-guesses.
+             *)             gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
            esac
           ])
         rm -rf conftest.mkstemp
index 4b3e399..721189a 100644 (file)
@@ -1,5 +1,5 @@
-# serial 30
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
+# serial 36
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,17 +31,16 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS],
   dnl in Autoconf and because it invokes AC_LIBOBJ.
   AC_CHECK_HEADERS_ONCE([unistd.h])
   AC_CHECK_DECLS_ONCE([alarm])
-  AC_CHECK_FUNCS_ONCE([tzset])
   AC_REQUIRE([gl_MULTIARCH])
-  if test $APPLE_UNIVERSAL_BUILD = 1; then
-    # A universal build on Apple Mac OS X platforms.
-    # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
-    # But we need a configuration result that is valid in both modes.
-    gl_cv_func_working_mktime=no
-  fi
   AC_CACHE_CHECK([for working mktime], [gl_cv_func_working_mktime],
-    [AC_RUN_IFELSE(
-       [AC_LANG_SOURCE(
+    [if test $APPLE_UNIVERSAL_BUILD = 1; then
+       # A universal build on Apple Mac OS X platforms.
+       # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
+       # But we need a configuration result that is valid in both modes.
+       gl_cv_func_working_mktime="guessing no"
+     else
+       AC_RUN_IFELSE(
+         [AC_LANG_SOURCE(
 [[/* Test program from Paul Eggert and Tony Leneis.  */
 #include <limits.h>
 #include <stdlib.h>
@@ -55,13 +54,12 @@ AC_DEFUN([gl_FUNC_MKTIME_WORKS],
 # include <signal.h>
 #endif
 
+]GL_MDA_DEFINES[
+
 #ifndef TIME_T_IS_SIGNED
 # define TIME_T_IS_SIGNED 0
 #endif
 
-/* Work around redefinition to rpl_putenv by other config tests.  */
-#undef putenv
-
 static time_t time_t_max;
 static time_t time_t_min;
 
@@ -242,21 +240,22 @@ main ()
     result |= 64;
   return result;
 }]])],
-       [gl_cv_func_working_mktime=yes],
-       [gl_cv_func_working_mktime=no],
-       [case "$host_os" in
-                  # Guess no on native Windows.
-          mingw*) gl_cv_func_working_mktime="guessing no" ;;
-          *)      gl_cv_func_working_mktime="guessing no" ;;
-        esac
-       ])
+         [gl_cv_func_working_mktime=yes],
+         [gl_cv_func_working_mktime=no],
+         [case "$host_os" in
+                    # Guess no on native Windows.
+            mingw*) gl_cv_func_working_mktime="guessing no" ;;
+            *)      gl_cv_func_working_mktime="$gl_cross_guess_normal" ;;
+          esac
+         ])
+     fi
     ])
 ])
 
 dnl Main macro of module 'mktime'.
 AC_DEFUN([gl_FUNC_MKTIME],
 [
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([gl_FUNC_MKTIME_WORKS])
 
index 55fea82..e47aa2d 100644 (file)
@@ -1,5 +1,5 @@
-# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc.
+# mmap-anon.m4 serial 12
+dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,11 +9,11 @@ dnl with or without modifications, as long as this notice is preserved.
 # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
 #   and MAP_ANON exist and have the same value.
 # - On HP-UX, only MAP_ANONYMOUS exists.
-# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, only MAP_ANON exists.
 # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
 #   used.
 
-AC_DEFUN([gl_FUNC_MMAP_ANON],
+AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON],
 [
   dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
index 83e276c..3bd4b89 100644 (file)
@@ -1,5 +1,5 @@
 # mode_t.m4 serial 2
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 55baeec..3ba5b4e 100644 (file)
@@ -1,5 +1,5 @@
 # msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 74ae427..aae25ce 100644 (file)
@@ -1,5 +1,5 @@
 # msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 38a11cc..f1678d9 100644 (file)
@@ -1,5 +1,5 @@
-# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# multiarch.m4 serial 9
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -21,37 +21,40 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_DEFUN_ONCE([gl_MULTIARCH],
 [
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
-  gl_cv_c_multiarch=no
-  AC_COMPILE_IFELSE(
-    [AC_LANG_SOURCE(
-      [[#ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
-      ]])],
-    [
-     dnl Check for potential -arch flags.  It is not universal unless
-     dnl there are at least two -arch flags with different values.
-     arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
-             fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
+  AC_CACHE_CHECK([whether the compiler produces multi-arch binaries],
+    [gl_cv_c_multiarch],
+    [gl_cv_c_multiarch=no
+     AC_COMPILE_IFELSE(
+       [AC_LANG_SOURCE(
+         [[#ifndef __APPLE_CC__
+            not a universal capable compiler
+           #endif
+           typedef int dummy;
+         ]])],
+       [
+        dnl Check for potential -arch flags.  It is not universal unless
+        dnl there are at least two -arch flags with different values.
+        arch=
+        prev=
+        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+          if test -n "$prev"; then
+            case $word in
+              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
+                if test -z "$arch" || test "$arch" = "$word"; then
+                  arch="$word"
+                else
+                  gl_cv_c_multiarch=yes
+                fi
+                ;;
+            esac
+            prev=
+          else
+            if test "x$word" = "x-arch"; then
+              prev=arch
+            fi
+          fi
+        done
+       ])
     ])
   if test $gl_cv_c_multiarch = yes; then
     APPLE_UNIVERSAL_BUILD=1
diff --git a/m4/musl.m4 b/m4/musl.m4
new file mode 100644 (file)
index 0000000..60bd62a
--- /dev/null
@@ -0,0 +1,18 @@
+# musl.m4 serial 3
+dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for musl libc, despite the musl libc authors don't like it
+# <https://wiki.musl-libc.org/faq.html>
+# <https://lists.gnu.org/archive/html/bug-gnulib/2018-02/msg00079.html>.
+# From Bruno Haible.
+
+AC_DEFUN_ONCE([gl_MUSL_LIBC],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;;
+  esac
+])
index 7c945cc..baebe88 100644 (file)
@@ -1,11 +1,11 @@
-# serial 38
+# serial 40
 
 dnl From Jim Meyering.
 dnl Check for the nanosleep function.
 dnl If not found, use the supplied replacement.
 dnl
 
-# Copyright (C) 1999-2001, 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,7 @@ dnl
 
 AC_DEFUN([gl_FUNC_NANOSLEEP],
 [
- AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ AC_REQUIRE([gl_TIME_H_DEFAULTS])
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
  dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
@@ -119,8 +119,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
             gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
           mingw*) # Guess no on native Windows.
             gl_cv_func_nanosleep='guessing no' ;;
-          *)      # If we don't know, assume the worst.
-            gl_cv_func_nanosleep='guessing no' ;;
+          *)      # If we don't know, obey --enable-cross-guesses.
+            gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
         esac
        ])
     ])
index 473e142..c555596 100644 (file)
@@ -1,5 +1,5 @@
 # netinet_in_h.m4 serial 5
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 82d4750..6ad32c8 100644 (file)
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 6
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 8
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,10 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
   AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
   AC_REQUIRE([gl_LANGINFO_H])
   AC_CHECK_FUNCS_ONCE([nl_langinfo])
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
+  AC_REQUIRE([gl_PTHREADLIB])
+  AC_CHECK_HEADERS_ONCE([threads.h])
   if test $ac_cv_func_nl_langinfo = yes; then
     # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
     AC_CACHE_CHECK([whether YESEXPR works],
@@ -36,11 +39,19 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
     AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS],
       [$FUNC_NL_LANGINFO_YESEXPR_WORKS],
       [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.])
+    # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
+    case "$host_os" in
+      solaris*) NL_LANGINFO_MTSAFE=0 ;;
+      *)        NL_LANGINFO_MTSAFE=1 ;;
+    esac
+    AC_DEFINE_UNQUOTED([NL_LANGINFO_MTSAFE], [$NL_LANGINFO_MTSAFE],
+      [Define to 1 if nl_langinfo is multithread-safe.])
     if test $HAVE_LANGINFO_CODESET = 1 \
        && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
        && test $HAVE_LANGINFO_ALTMON = 1 \
        && test $HAVE_LANGINFO_ERA = 1 \
-       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
+       && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
+       && test $NL_LANGINFO_MTSAFE = 1; then
       :
     else
       REPLACE_NL_LANGINFO=1
@@ -50,4 +61,17 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
   else
     HAVE_NL_LANGINFO=0
   fi
+  if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
+    LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
+  else
+    LIB_NL_LANGINFO=
+  fi
+  dnl LIB_NL_LANGINFO is expected to be empty everywhere.
+  AC_SUBST([LIB_NL_LANGINFO])
+])
+
+# Prerequisites of lib/nl_langinfo-lock.c.
+AC_DEFUN([gl_PREREQ_NL_LANGINFO_LOCK],
+[
+  gl_VISIBILITY
 ])
index 4914007..27412cd 100644 (file)
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -53,7 +53,7 @@ nocrash_init (void)
   /* Allocate a port on which the thread shall listen for exceptions.  */
   if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
       == KERN_SUCCESS) {
-    /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
+    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
     if (mach_port_insert_right (self, our_exception_port, our_exception_port,
                                 MACH_MSG_TYPE_MAKE_SEND)
         == KERN_SUCCESS) {
@@ -72,7 +72,7 @@ nocrash_init (void)
            for a particular thread.  This has the effect that when our exception
            port gets the message, the thread specific exception port has already
            been asked, and we don't need to bother about it.
-           See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
+           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
         task_set_exception_ports (self, mask, our_exception_port,
                                   EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
       }
index bbb1f05..b510554 100644 (file)
@@ -1,6 +1,6 @@
-# serial 34
+# serial 37
 
-# Copyright (C) 1996-1997, 1999-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2007, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 AC_DEFUN([gl_FUNC_GNU_STRFTIME],
 [
- # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ # This defines (or not) HAVE_TZNAME and HAVE_STRUCT_TM_TM_ZONE.
  AC_REQUIRE([AC_STRUCT_TIMEZONE])
 
  AC_REQUIRE([gl_TM_GMTOFF])
 
- AC_CHECK_FUNCS_ONCE([tzset])
-
  AC_DEFINE([my_strftime], [nstrftime],
    [Define to the name of the strftime replacement function.])
 ])
index f4d5787..bdec43c 100644 (file)
@@ -1,5 +1,5 @@
 # off_t.m4 serial 1
-dnl Copyright (C) 2012-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index a272784..542a90f 100644 (file)
@@ -1,6 +1,6 @@
 # Test whether O_CLOEXEC is defined.
 
-dnl Copyright 2017-2018 Free Software Foundation, Inc.
+dnl Copyright 2017-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
new file mode 100644 (file)
index 0000000..e619039
--- /dev/null
@@ -0,0 +1,60 @@
+# open-slash.m4 serial 2
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Tests whether open() and creat() recognize a trailing slash.
+dnl Sets gl_cv_func_open_slash.
+AC_DEFUN([gl_OPEN_TRAILING_SLASH_BUG],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  dnl open("foo/") should not create a file when the file name has a
+  dnl trailing slash.  FreeBSD only has the problem on symlinks.
+  AC_CHECK_FUNCS_ONCE([lstat])
+  AC_CACHE_CHECK([whether open recognizes a trailing slash],
+    [gl_cv_func_open_slash],
+    [# Assume that if we have lstat, we can also check symlinks.
+     if test $ac_cv_func_lstat = yes; then
+       touch conftest.tmp
+       ln -s conftest.tmp conftest.lnk
+     fi
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE([[
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+]GL_MDA_DEFINES[
+int main ()
+{
+  int result = 0;
+#if HAVE_LSTAT
+  if (open ("conftest.lnk/", O_RDONLY) != -1)
+    result |= 1;
+#endif
+  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
+    result |= 2;
+  return result;
+}]])],
+       [gl_cv_func_open_slash=yes],
+       [gl_cv_func_open_slash=no],
+       [
+changequote(,)dnl
+        case "$host_os" in
+          freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
+            gl_cv_func_open_slash="guessing no" ;;
+          *)
+            gl_cv_func_open_slash="guessing yes" ;;
+        esac
+changequote([,])dnl
+       ])
+     rm -f conftest.sl conftest.tmp conftest.lnk
+    ])
+  case "$gl_cv_func_open_slash" in
+    *no)
+      AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+        [Define to 1 if open() fails to recognize a trailing slash.])
+      ;;
+  esac
+])
index 8b3d402..c634386 100644 (file)
@@ -1,5 +1,5 @@
 # open.m4 serial 15
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -19,48 +19,9 @@ AC_DEFUN([gl_FUNC_OPEN],
       if test "$gl_cv_macro_O_CLOEXEC" != yes; then
         REPLACE_OPEN=1
       fi
-      AC_CACHE_CHECK([whether open recognizes a trailing slash],
-        [gl_cv_func_open_slash],
-        [# Assume that if we have lstat, we can also check symlinks.
-          if test $ac_cv_func_lstat = yes; then
-            touch conftest.tmp
-            ln -s conftest.tmp conftest.lnk
-          fi
-          AC_RUN_IFELSE(
-            [AC_LANG_SOURCE([[
-#include <fcntl.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-int main ()
-{
-  int result = 0;
-#if HAVE_LSTAT
-  if (open ("conftest.lnk/", O_RDONLY) != -1)
-    result |= 1;
-#endif
-  if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
-    result |= 2;
-  return result;
-}]])],
-            [gl_cv_func_open_slash=yes],
-            [gl_cv_func_open_slash=no],
-            [
-changequote(,)dnl
-             case "$host_os" in
-               freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
-                 gl_cv_func_open_slash="guessing no" ;;
-               *)
-                 gl_cv_func_open_slash="guessing yes" ;;
-             esac
-changequote([,])dnl
-            ])
-          rm -f conftest.sl conftest.tmp conftest.lnk
-        ])
+      gl_OPEN_TRAILING_SLASH_BUG
       case "$gl_cv_func_open_slash" in
         *no)
-          AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
-            [Define to 1 if open() fails to recognize a trailing slash.])
           REPLACE_OPEN=1
           ;;
       esac
index 292a256..e67c656 100644 (file)
@@ -1,5 +1,5 @@
 # pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 60568a7..9f2ac2d 100644 (file)
@@ -1,5 +1,5 @@
-# perror.m4 serial 7
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# perror.m4 serial 9
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -48,10 +48,12 @@ AC_DEFUN([gl_FUNC_PERROR],
             rm -rf conftest.txt1 conftest.txt2],
            [gl_cv_func_perror_works=no],
            [case "$host_os" in
-                      # Guess yes on native Windows.
-              mingw*) gl_cv_func_perror_works="guessing yes" ;;
-                      # Otherwise guess no.
-              *)      gl_cv_func_perror_works="guessing no" ;;
+                       # 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" ;;
             esac
            ])
         ])
index 1d3e274..89d666d 100644 (file)
@@ -1,5 +1,5 @@
 # pipe.m4 serial 2
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index e5f7b39..284c7c5 100644 (file)
@@ -1,5 +1,5 @@
-# printf.m4 serial 59
-dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
+# printf.m4 serial 73
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -62,9 +62,12 @@ int main ()
 changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_printf_sizes_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_printf_sizes_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+           midnightbsd*)         gl_cv_func_printf_sizes_c99="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_sizes_c99="guessing no";;
            darwin*)              gl_cv_func_printf_sizes_c99="guessing yes";;
@@ -79,6 +82,8 @@ changequote(,)dnl
            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
                                  gl_cv_func_printf_sizes_c99="guessing no";;
            netbsd*)              gl_cv_func_printf_sizes_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_printf_sizes_c99="guessing yes";;
 changequote([,])dnl
                                  # Guess yes on MSVC, no on mingw.
            mingw*)               AC_EGREP_CPP([Known], [
@@ -89,8 +94,8 @@ changequote([,])dnl
                                    [gl_cv_func_printf_sizes_c99="guessing yes"],
                                    [gl_cv_func_printf_sizes_c99="guessing no"])
                                  ;;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_printf_sizes_c99="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_printf_sizes_c99="$gl_cross_guess_normal";;
          esac
         ])
     ])
@@ -132,17 +137,20 @@ int main ()
         [gl_cv_func_printf_long_double=yes],
         [gl_cv_func_printf_long_double=no],
         [case "$host_os" in
-           beos*)  gl_cv_func_printf_long_double="guessing no";;
-                   # Guess yes on MSVC, no on mingw.
-           mingw*) AC_EGREP_CPP([Known], [
+                            # Guess no on BeOS.
+           beos*)           gl_cv_func_printf_long_double="guessing no";;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
+                            # Guess yes on MSVC, no on mingw.
+           mingw*)          AC_EGREP_CPP([Known], [
 #ifdef _MSC_VER
  Known
 #endif
-                     ],
-                     [gl_cv_func_printf_long_double="guessing yes"],
-                     [gl_cv_func_printf_long_double="guessing no"])
-                   ;;
-           *)      gl_cv_func_printf_long_double="guessing yes";;
+                              ],
+                              [gl_cv_func_printf_long_double="guessing yes"],
+                              [gl_cv_func_printf_long_double="guessing no"])
+                            ;;
+           *)               gl_cv_func_printf_long_double="guessing yes";;
          esac
         ])
     ])
@@ -235,9 +243,12 @@ int main ()
 changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+           midnightbsd*)         gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_infinite="guessing no";;
            darwin*)              gl_cv_func_printf_infinite="guessing yes";;
@@ -248,8 +259,13 @@ changequote(,)dnl
            netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
                                  gl_cv_func_printf_infinite="guessing no";;
            netbsd*)              gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess yes on OpenBSD >= 6.0.
+           openbsd[1-5].*)       gl_cv_func_printf_infinite="guessing no";;
+           openbsd*)             gl_cv_func_printf_infinite="guessing yes";;
                                  # Guess yes on BeOS.
            beos*)                gl_cv_func_printf_infinite="guessing yes";;
+                                 # Guess no on Android.
+           linux*-android*)      gl_cv_func_printf_infinite="guessing no";;
 changequote([,])dnl
                                  # Guess yes on MSVC, no on mingw.
            mingw*)               AC_EGREP_CPP([Known], [
@@ -260,8 +276,8 @@ changequote([,])dnl
                                    [gl_cv_func_printf_infinite="guessing yes"],
                                    [gl_cv_func_printf_infinite="guessing no"])
                                  ;;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_printf_infinite="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_printf_infinite="$gl_cross_guess_normal";;
          esac
         ])
     ])
@@ -450,12 +466,20 @@ int main ()
 changequote(,)dnl
                                          # Guess yes on glibc systems.
                    *-gnu* | gnu*)        gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on musl systems.
+                   *-musl*)              gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on FreeBSD >= 6.
                    freebsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
                    freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+                   midnightbsd*)         gl_cv_func_printf_infinite_long_double="guessing yes";;
                                          # Guess yes on HP-UX >= 11.
                    hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
                    hpux*)                gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess yes on OpenBSD >= 6.0.
+                   openbsd[1-5].*)       gl_cv_func_printf_infinite_long_double="guessing no";;
+                   openbsd*)             gl_cv_func_printf_infinite_long_double="guessing yes";;
+                                         # Guess no on Android.
+                   linux*-android*)      gl_cv_func_printf_infinite_long_double="guessing no";;
 changequote([,])dnl
                                          # Guess yes on MSVC, no on mingw.
                    mingw*)               AC_EGREP_CPP([Known], [
@@ -466,8 +490,8 @@ changequote([,])dnl
                                            [gl_cv_func_printf_infinite_long_double="guessing yes"],
                                            [gl_cv_func_printf_infinite_long_double="guessing no"])
                                          ;;
-                                         # If we don't know, assume the worst.
-                   *)                    gl_cv_func_printf_infinite_long_double="guessing no";;
+                                         # If we don't know, obey --enable-cross-guesses.
+                   *)                    gl_cv_func_printf_infinite_long_double="$gl_cross_guess_normal";;
                  esac
                  ;;
              esac
@@ -513,7 +537,7 @@ int main ()
           && strcmp (buf, "-0X6.488P-1 33") != 0
           && strcmp (buf, "-0XC.91P-2 33") != 0))
     result |= 2;
-  /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
+  /* This catches a FreeBSD 13.0 bug: it doesn't round.  */
   if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
       || (strcmp (buf, "0x1.83p+0 33") != 0
           && strcmp (buf, "0x3.05p-1 33") != 0
@@ -566,10 +590,14 @@ int main ()
                [gl_cv_func_printf_directive_a="guessing yes"],
                [gl_cv_func_printf_directive_a="guessing no"])
              ;;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_printf_directive_a="guessing yes";;
+                                 # Guess no on Android.
+           linux*-android*)      gl_cv_func_printf_directive_a="guessing no";;
                                  # Guess no on native Windows.
            mingw*)               gl_cv_func_printf_directive_a="guessing no";;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_printf_directive_a="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_printf_directive_a="$gl_cross_guess_normal";;
          esac
         ])
     ])
@@ -614,15 +642,23 @@ int main ()
 changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on FreeBSD >= 6.
            freebsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+           midnightbsd*)         gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_printf_directive_f="guessing no";;
            darwin*)              gl_cv_func_printf_directive_f="guessing yes";;
+                                 # Guess yes on OpenBSD >= 6.0.
+           openbsd[1-5].*)       gl_cv_func_printf_directive_f="guessing no";;
+           openbsd*)             gl_cv_func_printf_directive_f="guessing yes";;
                                  # Guess yes on Solaris >= 2.10.
            solaris2.[1-9][0-9]*) gl_cv_func_printf_directive_f="guessing yes";;
            solaris*)             gl_cv_func_printf_directive_f="guessing no";;
+                                 # Guess no on Android.
+           linux*-android*)      gl_cv_func_printf_directive_f="guessing no";;
 changequote([,])dnl
                                  # Guess yes on MSVC, no on mingw.
            mingw*)               AC_EGREP_CPP([Known], [
@@ -633,8 +669,8 @@ changequote([,])dnl
                                    [gl_cv_func_printf_directive_f="guessing yes"],
                                    [gl_cv_func_printf_directive_f="guessing no"])
                                  ;;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_printf_directive_f="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_printf_directive_f="$gl_cross_guess_normal";;
          esac
         ])
     ])
@@ -657,7 +693,10 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
 #include <stdlib.h>
 #include <string.h>
 #ifdef _MSC_VER
-/* See page about "Parameter Validation" on msdn.microsoft.com.  */
+#include <inttypes.h>
+/* See page about "Parameter Validation" on msdn.microsoft.com.
+   <https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation>
+   <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-invalid-parameter-handler-set-thread-local-invalid-parameter-handler>  */
 static void cdecl
 invalid_parameter_handler (const wchar_t *expression,
                            const wchar_t *function,
@@ -688,9 +727,21 @@ int main ()
         [gl_cv_func_printf_directive_n=yes],
         [gl_cv_func_printf_directive_n=no],
         [case "$host_os" in
-                   # Guess no on native Windows.
-           mingw*) gl_cv_func_printf_directive_n="guessing no";;
-           *)      gl_cv_func_printf_directive_n="guessing yes";;
+                            # Guess no on glibc when _FORTIFY_SOURCE >= 2.
+           *-gnu* | gnu*)   AC_COMPILE_IFELSE(
+                              [AC_LANG_SOURCE(
+                                 [[#if _FORTIFY_SOURCE >= 2
+                                    error fail
+                                   #endif
+                                 ]])],
+                              [gl_cv_func_printf_directive_n="guessing yes"],
+                              [gl_cv_func_printf_directive_n="guessing no"])
+                            ;;
+                            # Guess no on Android.
+           linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
+                            # Guess no on native Windows.
+           mingw*)          gl_cv_func_printf_directive_n="guessing no";;
+           *)               gl_cv_func_printf_directive_n="guessing yes";;
          esac
         ])
     ])
@@ -712,13 +763,7 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
     [
       AC_RUN_IFELSE(
         [AC_LANG_SOURCE([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
 #include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 #include <string.h>
 int main ()
@@ -766,14 +811,18 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-           openbsd*)       gl_cv_func_printf_directive_ls="guessing no";;
-           irix*)          gl_cv_func_printf_directive_ls="guessing no";;
-           solaris*)       gl_cv_func_printf_directive_ls="guessing no";;
-           cygwin*)        gl_cv_func_printf_directive_ls="guessing no";;
-           beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
-                           # Guess yes on native Windows.
-           mingw*)         gl_cv_func_printf_directive_ls="guessing yes";;
-           *)              gl_cv_func_printf_directive_ls="guessing yes";;
+                            # Guess yes on OpenBSD >= 6.0.
+           openbsd[1-5].*)  gl_cv_func_printf_directive_ls="guessing no";;
+           openbsd*)        gl_cv_func_printf_directive_ls="guessing yes";;
+           irix*)           gl_cv_func_printf_directive_ls="guessing no";;
+           solaris*)        gl_cv_func_printf_directive_ls="guessing no";;
+           cygwin*)         gl_cv_func_printf_directive_ls="guessing no";;
+           beos* | haiku*)  gl_cv_func_printf_directive_ls="guessing no";;
+                            # Guess no on Android.
+           linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
+                            # Guess yes on native Windows.
+           mingw*)          gl_cv_func_printf_directive_ls="guessing yes";;
+           *)               gl_cv_func_printf_directive_ls="guessing yes";;
          esac
 changequote([,])dnl
         ])
@@ -810,11 +859,13 @@ int main ()
 changequote(,)dnl
          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 no on native Windows.
-           mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
-           *)            gl_cv_func_printf_positions="guessing yes";;
+                            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
 changequote([,])dnl
         ])
@@ -849,11 +900,13 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-           cygwin*)      gl_cv_func_printf_flag_grouping="guessing no";;
-           netbsd*)      gl_cv_func_printf_flag_grouping="guessing no";;
-                         # Guess no on native Windows.
-           mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
-           *)            gl_cv_func_printf_flag_grouping="guessing yes";;
+           cygwin*)         gl_cv_func_printf_flag_grouping="guessing no";;
+           netbsd*)         gl_cv_func_printf_flag_grouping="guessing no";;
+                            # Guess no on Android.
+           linux*-android*) gl_cv_func_printf_flag_grouping="guessing no";;
+                            # Guess no on native Windows.
+           mingw* | pw*)    gl_cv_func_printf_flag_grouping="guessing no";;
+           *)               gl_cv_func_printf_flag_grouping="guessing yes";;
          esac
 changequote([,])dnl
         ])
@@ -890,14 +943,16 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-                    # Guess yes on HP-UX 11.
-           hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
-                    # Guess no on HP-UX 10 and older.
-           hpux*)   gl_cv_func_printf_flag_leftadjust="guessing no";;
-                    # Guess yes on native Windows.
-           mingw*)  gl_cv_func_printf_flag_leftadjust="guessing yes";;
-                    # Guess yes otherwise.
-           *)       gl_cv_func_printf_flag_leftadjust="guessing yes";;
+                            # Guess yes on HP-UX 11.
+           hpux11*)         gl_cv_func_printf_flag_leftadjust="guessing yes";;
+                            # Guess no on HP-UX 10 and older.
+           hpux*)           gl_cv_func_printf_flag_leftadjust="guessing no";;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+                            # Guess yes on native Windows.
+           mingw*)          gl_cv_func_printf_flag_leftadjust="guessing yes";;
+                            # Guess yes otherwise.
+           *)               gl_cv_func_printf_flag_leftadjust="guessing yes";;
          esac
 changequote([,])dnl
         ])
@@ -935,14 +990,18 @@ int main ()
         [
 changequote(,)dnl
          case "$host_os" in
-                          # Guess yes on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
-                          # Guess yes on BeOS.
-           beos*)         gl_cv_func_printf_flag_zero="guessing yes";;
-                          # Guess no on native Windows.
-           mingw*)        gl_cv_func_printf_flag_zero="guessing no";;
-                          # If we don't know, assume the worst.
-           *)             gl_cv_func_printf_flag_zero="guessing no";;
+                            # Guess yes on glibc systems.
+           *-gnu* | gnu*)   gl_cv_func_printf_flag_zero="guessing yes";;
+                            # Guess yes on musl systems.
+           *-musl*)         gl_cv_func_printf_flag_zero="guessing yes";;
+                            # Guess yes on BeOS.
+           beos*)           gl_cv_func_printf_flag_zero="guessing yes";;
+                            # Guess no on Android.
+           linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
+                            # Guess no on native Windows.
+           mingw*)          gl_cv_func_printf_flag_zero="guessing no";;
+                            # If we don't know, obey --enable-cross-guesses.
+           *)               gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
          esac
 changequote([,])dnl
         ])
@@ -995,10 +1054,12 @@ int main ()
 changequote(,)dnl
          case "$host_os" in
            # Guess no only on Solaris, native Windows, and BeOS systems.
-           solaris*)     gl_cv_func_printf_precision="guessing no" ;;
-           mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
-           beos*)        gl_cv_func_printf_precision="guessing no" ;;
-           *)            gl_cv_func_printf_precision="guessing yes" ;;
+           solaris*)        gl_cv_func_printf_precision="guessing no" ;;
+           mingw* | pw*)    gl_cv_func_printf_precision="guessing no" ;;
+           beos*)           gl_cv_func_printf_precision="guessing no" ;;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_printf_precision="guessing yes" ;;
+           *)               gl_cv_func_printf_precision="guessing yes" ;;
          esac
 changequote([,])dnl
         ])
@@ -1020,9 +1081,8 @@ AC_DEFUN([gl_PRINTF_ENOMEM],
       gl_cv_func_printf_enomem="guessing no"
       if test "$cross_compiling" = no; then
         if test $APPLE_UNIVERSAL_BUILD = 0; then
-          AC_LANG_CONFTEST([AC_LANG_SOURCE([
+          AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 ]GL_NOCRASH[
-changequote(,)dnl
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/time.h>
@@ -1067,8 +1127,7 @@ int main()
   ret = printf ("%.5000000f", 1.0);
   return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
 }
-changequote([,])dnl
-          ])])
+          ]])])
           if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
             (./conftest 2>&AS_MESSAGE_LOG_FD
              result=$?
@@ -1095,28 +1154,30 @@ changequote([,])dnl
       if test "$gl_cv_func_printf_enomem" = "guessing no"; then
 changequote(,)dnl
         case "$host_os" in
-                         # Guess yes on glibc systems.
-          *-gnu* | gnu*) gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on Solaris.
-          solaris*)      gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on AIX.
-          aix*)          gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on HP-UX/hppa.
-          hpux*)         case "$host_cpu" in
-                           hppa*) gl_cv_func_printf_enomem="guessing yes";;
-                           *)     gl_cv_func_printf_enomem="guessing no";;
-                         esac
-                         ;;
-                         # Guess yes on IRIX.
-          irix*)         gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on OSF/1.
-          osf*)          gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on BeOS.
-          beos*)         gl_cv_func_printf_enomem="guessing yes";;
-                         # Guess yes on Haiku.
-          haiku*)        gl_cv_func_printf_enomem="guessing yes";;
-                         # If we don't know, assume the worst.
-          *)             gl_cv_func_printf_enomem="guessing no";;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on Solaris.
+          solaris*)        gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on AIX.
+          aix*)            gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on HP-UX/hppa.
+          hpux*)           case "$host_cpu" in
+                             hppa*) gl_cv_func_printf_enomem="guessing yes";;
+                             *)     gl_cv_func_printf_enomem="guessing no";;
+                           esac
+                           ;;
+                           # Guess yes on IRIX.
+          irix*)           gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on OSF/1.
+          osf*)            gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on BeOS.
+          beos*)           gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess yes on Haiku.
+          haiku*)          gl_cv_func_printf_enomem="guessing yes";;
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_printf_enomem="guessing no";;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_printf_enomem="$gl_cross_guess_normal";;
         esac
 changequote([,])dnl
       fi
@@ -1135,7 +1196,7 @@ dnl Test whether the string produced by the snprintf function is always NUL
 dnl terminated. (ISO C99, POSIX:2001)
 dnl Result is gl_cv_func_snprintf_truncation_c99.
 
-AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
+AC_DEFUN_ONCE([gl_SNPRINTF_TRUNCATION_C99],
 [
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -1177,9 +1238,12 @@ changequote(,)dnl
          case "$host_os" in
                                  # 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";;
                                  # 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";;
+           midnightbsd*)         gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_truncation_c99="guessing no";;
            darwin*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -1208,10 +1272,12 @@ changequote(,)dnl
            netbsd*)              gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess yes on BeOS.
            beos*)                gl_cv_func_snprintf_truncation_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_snprintf_truncation_c99="guessing yes";;
                                  # Guess no on native Windows.
            mingw*)               gl_cv_func_snprintf_truncation_c99="guessing no";;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_snprintf_truncation_c99="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
          esac
 changequote([,])dnl
         ])
@@ -1277,9 +1343,12 @@ int main ()
 changequote(,)dnl
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # 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";;
+           midnightbsd*)         gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_retval_c99="guessing no";;
            darwin*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -1299,6 +1368,8 @@ changequote(,)dnl
            netbsd*)              gl_cv_func_snprintf_retval_c99="guessing yes";;
                                  # Guess yes on BeOS.
            beos*)                gl_cv_func_snprintf_retval_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_snprintf_retval_c99="guessing yes";;
 changequote([,])dnl
                                  # Guess yes on MSVC, no on mingw.
            mingw*)               AC_EGREP_CPP([Known], [
@@ -1309,8 +1380,8 @@ changequote([,])dnl
                                    [gl_cv_func_snprintf_retval_c99="guessing yes"],
                                    [gl_cv_func_snprintf_retval_c99="guessing no"])
                                  ;;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_snprintf_retval_c99="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
          esac
         ])
     ])
@@ -1363,13 +1434,24 @@ int main ()
         [gl_cv_func_snprintf_directive_n=yes],
         [gl_cv_func_snprintf_directive_n=no],
         [
-changequote(,)dnl
          case "$host_os" in
-                                 # Guess yes on glibc systems.
-           *-gnu* | gnu*)        gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess no on glibc when _FORTIFY_SOURCE >= 2.
+           *-gnu* | gnu*)        AC_COMPILE_IFELSE(
+                                   [AC_LANG_SOURCE(
+                                      [[#if _FORTIFY_SOURCE >= 2
+                                         error fail
+                                        #endif
+                                      ]])],
+                                   [gl_cv_func_snprintf_directive_n="guessing yes"],
+                                   [gl_cv_func_snprintf_directive_n="guessing no"])
+                                 ;;
+changequote(,)dnl
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_snprintf_directive_n="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_snprintf_directive_n="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+           midnightbsd*)         gl_cv_func_snprintf_directive_n="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_snprintf_directive_n="guessing no";;
            darwin*)              gl_cv_func_snprintf_directive_n="guessing yes";;
@@ -1391,12 +1473,14 @@ changequote(,)dnl
            netbsd*)              gl_cv_func_snprintf_directive_n="guessing yes";;
                                  # Guess yes on BeOS.
            beos*)                gl_cv_func_snprintf_directive_n="guessing yes";;
+                                 # Guess no on Android.
+           linux*-android*)      gl_cv_func_snprintf_directive_n="guessing no";;
                                  # Guess no on native Windows.
            mingw*)               gl_cv_func_snprintf_directive_n="guessing no";;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_snprintf_directive_n="guessing no";;
-         esac
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_snprintf_directive_n="$gl_cross_guess_normal";;
 changequote([,])dnl
+         esac
         ])
     ])
 ])
@@ -1440,9 +1524,11 @@ int main()
         [gl_cv_func_snprintf_size1=yes],
         [gl_cv_func_snprintf_size1=no],
         [case "$host_os" in
-                   # Guess yes on native Windows.
-           mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
-           *)      gl_cv_func_snprintf_size1="guessing yes" ;;
+                            # Guess yes on Android.
+           linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
+                            # Guess yes on native Windows.
+           mingw*)          gl_cv_func_snprintf_size1="guessing yes" ;;
+           *)               gl_cv_func_snprintf_size1="guessing yes" ;;
          esac
         ])
     ])
@@ -1517,9 +1603,12 @@ changequote(,)dnl
          case "$host_os" in
                                  # Guess yes on glibc systems.
            *-gnu* | gnu*)        gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on musl systems.
+           *-musl*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on FreeBSD >= 5.
            freebsd[1-4].*)       gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+           midnightbsd*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on Mac OS X >= 10.3.
            darwin[1-6].*)        gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
            darwin*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
@@ -1540,10 +1629,12 @@ changequote(,)dnl
            netbsd*)              gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on BeOS.
            beos*)                gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+                                 # Guess yes on Android.
+           linux*-android*)      gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
                                  # Guess yes on native Windows.
            mingw* | pw*)         gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
-                                 # If we don't know, assume the worst.
-           *)                    gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+                                 # If we don't know, obey --enable-cross-guesses.
+           *)                    gl_cv_func_vsnprintf_zerosize_c99="$gl_cross_guess_normal";;
          esac
 changequote([,])dnl
         ])
@@ -1599,9 +1690,12 @@ dnl
 dnl                                  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
 dnl   glibc 2.5                      .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 dnl   glibc 2.3.6                    .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
+dnl   FreeBSD 13.0                   .  .  .  .  #  .  .  .  .  .  .  .  .  #  .  .  .  .  .  .
 dnl   FreeBSD 5.4, 6.1               .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   Mac OS X 10.13.5               .  .  .  #  #  .  #  .  .  .  .  .  .  .  .  .  .  #  .  .
 dnl   Mac OS X 10.5.8                .  .  .  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
 dnl   Mac OS X 10.3.9                .  .  .  .  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
+dnl   OpenBSD 6.0, 6.7               .  .  .  .  #  .  .  .  .  .  .  .  .  #  .  .  .  .  .  .
 dnl   OpenBSD 3.9, 4.0               .  .  #  #  #  #  .  #  .  #  .  #  .  #  .  .  .  .  .  .
 dnl   Cygwin 1.7.0 (2009)            .  .  .  #  .  .  .  ?  .  .  .  .  .  ?  .  .  .  .  .  .
 dnl   Cygwin 1.5.25 (2008)           .  .  .  #  #  .  .  #  .  .  .  .  .  #  .  .  .  .  .  .
@@ -1621,11 +1715,13 @@ dnl   HP-UX 10.20                    #  .  #  .  #  #  .  ?  .  .  #  #  .  .  .
 dnl   IRIX 6.5                       #  .  #  #  #  #  .  #  .  .  .  #  .  .  .  .  #  .  .  .
 dnl   OSF/1 5.1                      #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  #
 dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  .  #  .  .  #  #  #  #  #  #
+dnl   NetBSD 9.0                     .  .  .  .  #  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 dnl   NetBSD 5.0                     .  .  .  #  #  .  .  .  .  .  .  #  .  #  .  .  .  .  .  .
 dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  ?  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
 dnl   NetBSD 3.0                     .  .  .  .  #  #  .  ?  #  #  ?  #  .  #  .  .  .  .  .  .
 dnl   Haiku                          .  .  .  #  #  #  .  #  .  .  .  .  .  ?  .  .  ?  .  .  .
 dnl   BeOS                           #  #  .  #  #  #  .  ?  #  .  ?  .  #  ?  .  .  ?  .  .  .
+dnl   Android 4.3                    .  .  #  #  #  #  #  #  .  #  .  #  .  #  .  .  .  #  .  .
 dnl   old mingw / msvcrt             #  #  #  #  #  #  .  .  #  #  .  #  #  ?  .  #  #  #  .  .
 dnl   MSVC 9                         #  #  #  #  #  #  #  .  #  #  .  #  #  ?  #  #  #  #  .  .
 dnl   mingw 2009-2011                .  #  .  #  .  .  .  .  #  #  .  .  .  ?  .  .  .  .  .  .
diff --git a/m4/pthread-thread.m4 b/m4/pthread-thread.m4
new file mode 100644 (file)
index 0000000..949186d
--- /dev/null
@@ -0,0 +1,69 @@
+# pthread-thread.m4 serial 2
+dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PTHREAD_THREAD],
+[
+  AC_REQUIRE([gl_PTHREAD_H])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+     && test $gl_threads_api = windows; then
+    dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+    dnl library.
+    REPLACE_PTHREAD_CREATE=1
+    REPLACE_PTHREAD_ATTR_INIT=1
+    REPLACE_PTHREAD_ATTR_GETDETACHSTATE=1
+    REPLACE_PTHREAD_ATTR_SETDETACHSTATE=1
+    REPLACE_PTHREAD_ATTR_DESTROY=1
+    REPLACE_PTHREAD_SELF=1
+    REPLACE_PTHREAD_EQUAL=1
+    REPLACE_PTHREAD_DETACH=1
+    REPLACE_PTHREAD_JOIN=1
+    REPLACE_PTHREAD_EXIT=1
+  else
+    if test $HAVE_PTHREAD_H = 0; then
+      HAVE_PTHREAD_CREATE=0
+      HAVE_PTHREAD_ATTR_INIT=0
+      HAVE_PTHREAD_ATTR_GETDETACHSTATE=0
+      HAVE_PTHREAD_ATTR_SETDETACHSTATE=0
+      HAVE_PTHREAD_ATTR_DESTROY=0
+      HAVE_PTHREAD_SELF=0
+      HAVE_PTHREAD_EQUAL=0
+      HAVE_PTHREAD_DETACH=0
+      HAVE_PTHREAD_JOIN=0
+      HAVE_PTHREAD_EXIT=0
+    else
+      dnl On HP-UX 11.11, pthread_create() and pthread_attr_init() are only
+      dnl defined as inline functions.
+      AC_CACHE_CHECK([whether pthread_create exists as a global function],
+        [gl_cv_func_pthread_create],
+        [saved_LIBS="$LIBS"
+         LIBS="$LIBS $LIBPMULTITHREAD"
+         AC_LINK_IFELSE(
+           [AC_LANG_SOURCE(
+              [[extern
+                #ifdef __cplusplus
+                "C"
+                #endif
+                int pthread_create (void);
+                int main ()
+                {
+                  return pthread_create ();
+                }
+              ]])],
+           [gl_cv_func_pthread_create=yes],
+           [gl_cv_func_pthread_create=no])
+         LIBS="$saved_LIBS"
+        ])
+      if test $gl_cv_func_pthread_create = no; then
+        REPLACE_PTHREAD_CREATE=1
+        REPLACE_PTHREAD_ATTR_INIT=1
+        AC_DEFINE([PTHREAD_CREATE_IS_INLINE], [1],
+          [Define if pthread_create is an inline function.])
+      fi
+    fi
+  fi
+])
diff --git a/m4/pthread_h.m4 b/m4/pthread_h.m4
new file mode 100644 (file)
index 0000000..62a6ca8
--- /dev/null
@@ -0,0 +1,283 @@
+# pthread_h.m4 serial 8
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_PTHREAD_H],
+[
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
+  AC_REQUIRE([gl_PTHREAD_H_DEFAULTS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_PTHREADLIB])
+
+  gl_CHECK_NEXT_HEADERS([pthread.h])
+  if test $ac_cv_header_pthread_h = yes; then
+    HAVE_PTHREAD_H=1
+    dnl On mingw, if --enable-threads=windows or gl_AVOID_WINPTHREAD is used,
+    dnl ignore the <pthread.h> from the mingw-w64 winpthreads library.
+    m4_ifdef([gl_][THREADLIB], [
+      AC_REQUIRE([gl_][THREADLIB])
+      if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+         && test $gl_threads_api = windows; then
+        HAVE_PTHREAD_H=0
+      fi
+    ])
+  else
+    HAVE_PTHREAD_H=0
+  fi
+  AC_SUBST([HAVE_PTHREAD_H])
+
+  AC_CHECK_TYPES([pthread_t, pthread_spinlock_t], [], [],
+    [AC_INCLUDES_DEFAULT[
+     #if HAVE_PTHREAD_H
+      #include <pthread.h>
+     #endif]])
+  if test $ac_cv_type_pthread_t != yes; then
+    HAVE_PTHREAD_T=0
+  fi
+  if test $ac_cv_type_pthread_spinlock_t != yes; then
+    HAVE_PTHREAD_SPINLOCK_T=0
+  fi
+
+  dnl Constants may be defined as C preprocessor macros or as enum items.
+
+  AC_CACHE_CHECK([for PTHREAD_CREATE_DETACHED],
+    [gl_cv_const_PTHREAD_CREATE_DETACHED],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <pthread.h>
+            int x = PTHREAD_CREATE_DETACHED;
+          ]],
+          [[]])],
+       [gl_cv_const_PTHREAD_CREATE_DETACHED=yes],
+       [gl_cv_const_PTHREAD_CREATE_DETACHED=no])
+    ])
+  if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
+    HAVE_PTHREAD_CREATE_DETACHED=0
+  fi
+
+  AC_CACHE_CHECK([for PTHREAD_MUTEX_RECURSIVE],
+    [gl_cv_const_PTHREAD_MUTEX_RECURSIVE],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <pthread.h>
+            int x = PTHREAD_MUTEX_RECURSIVE;
+          ]],
+          [[]])],
+       [gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes],
+       [gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no])
+    ])
+  if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
+    HAVE_PTHREAD_MUTEX_RECURSIVE=0
+  fi
+
+  AC_CACHE_CHECK([for PTHREAD_MUTEX_ROBUST],
+    [gl_cv_const_PTHREAD_MUTEX_ROBUST],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <pthread.h>
+            int x = PTHREAD_MUTEX_ROBUST;
+          ]],
+          [[]])],
+       [gl_cv_const_PTHREAD_MUTEX_ROBUST=yes],
+       [gl_cv_const_PTHREAD_MUTEX_ROBUST=no])
+    ])
+  if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
+    HAVE_PTHREAD_MUTEX_ROBUST=0
+  fi
+
+  AC_CACHE_CHECK([for PTHREAD_PROCESS_SHARED],
+    [gl_cv_const_PTHREAD_PROCESS_SHARED],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <pthread.h>
+            int x = PTHREAD_PROCESS_SHARED;
+          ]],
+          [[]])],
+       [gl_cv_const_PTHREAD_PROCESS_SHARED=yes],
+       [gl_cv_const_PTHREAD_PROCESS_SHARED=no])
+    ])
+  if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
+    HAVE_PTHREAD_PROCESS_SHARED=0
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, if it is not common
+  dnl enough to be declared everywhere.
+  gl_WARN_ON_USE_PREPARE([[#include <pthread.h>
+    ]], [
+    pthread_create pthread_attr_init pthread_attr_getdetachstate
+    pthread_attr_setdetachstate pthread_attr_destroy pthread_self pthread_equal
+    pthread_detach pthread_join pthread_exit
+    pthread_once
+    pthread_mutex_init pthread_mutexattr_init pthread_mutexattr_gettype
+    pthread_mutexattr_settype pthread_mutexattr_getrobust
+    pthread_mutexattr_setrobust pthread_mutexattr_destroy pthread_mutex_lock
+    pthread_mutex_trylock pthread_mutex_timedlock pthread_mutex_unlock
+    pthread_mutex_destroy
+    pthread_rwlock_init pthread_rwlockattr_init pthread_rwlockattr_destroy
+    pthread_rwlock_rdlock pthread_rwlock_wrlock pthread_rwlock_tryrdlock
+    pthread_rwlock_trywrlock pthread_rwlock_timedrdlock
+    pthread_rwlock_timedwrlock pthread_rwlock_unlock pthread_rwlock_destroy
+    pthread_cond_init pthread_condattr_init pthread_condattr_destroy
+    pthread_cond_wait pthread_cond_timedwait pthread_cond_signal
+    pthread_cond_broadcast pthread_cond_destroy
+    pthread_key_create pthread_setspecific pthread_getspecific
+    pthread_key_delete
+    pthread_spin_init pthread_spin_lock pthread_spin_trylock pthread_spin_unlock
+    pthread_spin_destroy])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  dnl For backward compatibility with gnulib versions <= 2019-07.
+  LIB_PTHREAD="$LIBPMULTITHREAD"
+  AC_SUBST([LIB_PTHREAD])
+])
+
+# gl_PTHREAD_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_PTHREAD_MODULE_INDICATOR],
+[
+  dnl Ensure to expand the default settings once only.
+  gl_PTHREAD_H_REQUIRE_DEFAULTS
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_PTHREAD_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_PTHREAD_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_THREAD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_ONCE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_MUTEX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_RWLOCK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_COND])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_TSS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SPIN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_MUTEX_TIMEDLOCK])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_PTHREAD_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_PTHREAD_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_PTHREAD_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_PTHREAD_T=1;                      AC_SUBST([HAVE_PTHREAD_T])
+  HAVE_PTHREAD_SPINLOCK_T=1;             AC_SUBST([HAVE_PTHREAD_SPINLOCK_T])
+  HAVE_PTHREAD_CREATE_DETACHED=1;        AC_SUBST([HAVE_PTHREAD_CREATE_DETACHED])
+  HAVE_PTHREAD_MUTEX_RECURSIVE=1;        AC_SUBST([HAVE_PTHREAD_MUTEX_RECURSIVE])
+  HAVE_PTHREAD_MUTEX_ROBUST=1;           AC_SUBST([HAVE_PTHREAD_MUTEX_ROBUST])
+  HAVE_PTHREAD_PROCESS_SHARED=1;         AC_SUBST([HAVE_PTHREAD_PROCESS_SHARED])
+  HAVE_PTHREAD_CREATE=1;                 AC_SUBST([HAVE_PTHREAD_CREATE])
+  HAVE_PTHREAD_ATTR_INIT=1;              AC_SUBST([HAVE_PTHREAD_ATTR_INIT])
+  HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;    AC_SUBST([HAVE_PTHREAD_ATTR_GETDETACHSTATE])
+  HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;    AC_SUBST([HAVE_PTHREAD_ATTR_SETDETACHSTATE])
+  HAVE_PTHREAD_ATTR_DESTROY=1;           AC_SUBST([HAVE_PTHREAD_ATTR_DESTROY])
+  HAVE_PTHREAD_SELF=1;                   AC_SUBST([HAVE_PTHREAD_SELF])
+  HAVE_PTHREAD_EQUAL=1;                  AC_SUBST([HAVE_PTHREAD_EQUAL])
+  HAVE_PTHREAD_DETACH=1;                 AC_SUBST([HAVE_PTHREAD_DETACH])
+  HAVE_PTHREAD_JOIN=1;                   AC_SUBST([HAVE_PTHREAD_JOIN])
+  HAVE_PTHREAD_EXIT=1;                   AC_SUBST([HAVE_PTHREAD_EXIT])
+  HAVE_PTHREAD_ONCE=1;                   AC_SUBST([HAVE_PTHREAD_ONCE])
+  HAVE_PTHREAD_MUTEX_INIT=1;             AC_SUBST([HAVE_PTHREAD_MUTEX_INIT])
+  HAVE_PTHREAD_MUTEXATTR_INIT=1;         AC_SUBST([HAVE_PTHREAD_MUTEXATTR_INIT])
+  HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;      AC_SUBST([HAVE_PTHREAD_MUTEXATTR_GETTYPE])
+  HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;      AC_SUBST([HAVE_PTHREAD_MUTEXATTR_SETTYPE])
+  HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;    AC_SUBST([HAVE_PTHREAD_MUTEXATTR_GETROBUST])
+  HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;    AC_SUBST([HAVE_PTHREAD_MUTEXATTR_SETROBUST])
+  HAVE_PTHREAD_MUTEXATTR_DESTROY=1;      AC_SUBST([HAVE_PTHREAD_MUTEXATTR_DESTROY])
+  HAVE_PTHREAD_MUTEX_LOCK=1;             AC_SUBST([HAVE_PTHREAD_MUTEX_LOCK])
+  HAVE_PTHREAD_MUTEX_TRYLOCK=1;          AC_SUBST([HAVE_PTHREAD_MUTEX_TRYLOCK])
+  HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;        AC_SUBST([HAVE_PTHREAD_MUTEX_TIMEDLOCK])
+  HAVE_PTHREAD_MUTEX_UNLOCK=1;           AC_SUBST([HAVE_PTHREAD_MUTEX_UNLOCK])
+  HAVE_PTHREAD_MUTEX_DESTROY=1;          AC_SUBST([HAVE_PTHREAD_MUTEX_DESTROY])
+  HAVE_PTHREAD_RWLOCK_INIT=1;            AC_SUBST([HAVE_PTHREAD_RWLOCK_INIT])
+  HAVE_PTHREAD_RWLOCKATTR_INIT=1;        AC_SUBST([HAVE_PTHREAD_RWLOCKATTR_INIT])
+  HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;     AC_SUBST([HAVE_PTHREAD_RWLOCKATTR_DESTROY])
+  HAVE_PTHREAD_RWLOCK_RDLOCK=1;          AC_SUBST([HAVE_PTHREAD_RWLOCK_RDLOCK])
+  HAVE_PTHREAD_RWLOCK_WRLOCK=1;          AC_SUBST([HAVE_PTHREAD_RWLOCK_WRLOCK])
+  HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;       AC_SUBST([HAVE_PTHREAD_RWLOCK_TRYRDLOCK])
+  HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;       AC_SUBST([HAVE_PTHREAD_RWLOCK_TRYWRLOCK])
+  HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;     AC_SUBST([HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK])
+  HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;     AC_SUBST([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK])
+  HAVE_PTHREAD_RWLOCK_UNLOCK=1;          AC_SUBST([HAVE_PTHREAD_RWLOCK_UNLOCK])
+  HAVE_PTHREAD_RWLOCK_DESTROY=1;         AC_SUBST([HAVE_PTHREAD_RWLOCK_DESTROY])
+  HAVE_PTHREAD_COND_INIT=1;              AC_SUBST([HAVE_PTHREAD_COND_INIT])
+  HAVE_PTHREAD_CONDATTR_INIT=1;          AC_SUBST([HAVE_PTHREAD_CONDATTR_INIT])
+  HAVE_PTHREAD_CONDATTR_DESTROY=1;       AC_SUBST([HAVE_PTHREAD_CONDATTR_DESTROY])
+  HAVE_PTHREAD_COND_WAIT=1;              AC_SUBST([HAVE_PTHREAD_COND_WAIT])
+  HAVE_PTHREAD_COND_TIMEDWAIT=1;         AC_SUBST([HAVE_PTHREAD_COND_TIMEDWAIT])
+  HAVE_PTHREAD_COND_SIGNAL=1;            AC_SUBST([HAVE_PTHREAD_COND_SIGNAL])
+  HAVE_PTHREAD_COND_BROADCAST=1;         AC_SUBST([HAVE_PTHREAD_COND_BROADCAST])
+  HAVE_PTHREAD_COND_DESTROY=1;           AC_SUBST([HAVE_PTHREAD_COND_DESTROY])
+  HAVE_PTHREAD_KEY_CREATE=1;             AC_SUBST([HAVE_PTHREAD_KEY_CREATE])
+  HAVE_PTHREAD_SETSPECIFIC=1;            AC_SUBST([HAVE_PTHREAD_SETSPECIFIC])
+  HAVE_PTHREAD_GETSPECIFIC=1;            AC_SUBST([HAVE_PTHREAD_GETSPECIFIC])
+  HAVE_PTHREAD_KEY_DELETE=1;             AC_SUBST([HAVE_PTHREAD_KEY_DELETE])
+  HAVE_PTHREAD_SPIN_INIT=1;              AC_SUBST([HAVE_PTHREAD_SPIN_INIT])
+  HAVE_PTHREAD_SPIN_LOCK=1;              AC_SUBST([HAVE_PTHREAD_SPIN_LOCK])
+  HAVE_PTHREAD_SPIN_TRYLOCK=1;           AC_SUBST([HAVE_PTHREAD_SPIN_TRYLOCK])
+  HAVE_PTHREAD_SPIN_UNLOCK=1;            AC_SUBST([HAVE_PTHREAD_SPIN_UNLOCK])
+  HAVE_PTHREAD_SPIN_DESTROY=1;           AC_SUBST([HAVE_PTHREAD_SPIN_DESTROY])
+  REPLACE_PTHREAD_CREATE=0;              AC_SUBST([REPLACE_PTHREAD_CREATE])
+  REPLACE_PTHREAD_ATTR_INIT=0;           AC_SUBST([REPLACE_PTHREAD_ATTR_INIT])
+  REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0; AC_SUBST([REPLACE_PTHREAD_ATTR_GETDETACHSTATE])
+  REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0; AC_SUBST([REPLACE_PTHREAD_ATTR_SETDETACHSTATE])
+  REPLACE_PTHREAD_ATTR_DESTROY=0;        AC_SUBST([REPLACE_PTHREAD_ATTR_DESTROY])
+  REPLACE_PTHREAD_SELF=0;                AC_SUBST([REPLACE_PTHREAD_SELF])
+  REPLACE_PTHREAD_EQUAL=0;               AC_SUBST([REPLACE_PTHREAD_EQUAL])
+  REPLACE_PTHREAD_DETACH=0;              AC_SUBST([REPLACE_PTHREAD_DETACH])
+  REPLACE_PTHREAD_JOIN=0;                AC_SUBST([REPLACE_PTHREAD_JOIN])
+  REPLACE_PTHREAD_EXIT=0;                AC_SUBST([REPLACE_PTHREAD_EXIT])
+  REPLACE_PTHREAD_ONCE=0;                AC_SUBST([REPLACE_PTHREAD_ONCE])
+  REPLACE_PTHREAD_MUTEX_INIT=0;          AC_SUBST([REPLACE_PTHREAD_MUTEX_INIT])
+  REPLACE_PTHREAD_MUTEXATTR_INIT=0;      AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_INIT])
+  REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;   AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_GETTYPE])
+  REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;   AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_SETTYPE])
+  REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0; AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_GETROBUST])
+  REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0; AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_SETROBUST])
+  REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;   AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_DESTROY])
+  REPLACE_PTHREAD_MUTEX_LOCK=0;          AC_SUBST([REPLACE_PTHREAD_MUTEX_LOCK])
+  REPLACE_PTHREAD_MUTEX_TRYLOCK=0;       AC_SUBST([REPLACE_PTHREAD_MUTEX_TRYLOCK])
+  REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;     AC_SUBST([REPLACE_PTHREAD_MUTEX_TIMEDLOCK])
+  REPLACE_PTHREAD_MUTEX_UNLOCK=0;        AC_SUBST([REPLACE_PTHREAD_MUTEX_UNLOCK])
+  REPLACE_PTHREAD_MUTEX_DESTROY=0;       AC_SUBST([REPLACE_PTHREAD_MUTEX_DESTROY])
+  REPLACE_PTHREAD_RWLOCK_INIT=0;         AC_SUBST([REPLACE_PTHREAD_RWLOCK_INIT])
+  REPLACE_PTHREAD_RWLOCKATTR_INIT=0;     AC_SUBST([REPLACE_PTHREAD_RWLOCKATTR_INIT])
+  REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;  AC_SUBST([REPLACE_PTHREAD_RWLOCKATTR_DESTROY])
+  REPLACE_PTHREAD_RWLOCK_RDLOCK=0;       AC_SUBST([REPLACE_PTHREAD_RWLOCK_RDLOCK])
+  REPLACE_PTHREAD_RWLOCK_WRLOCK=0;       AC_SUBST([REPLACE_PTHREAD_RWLOCK_WRLOCK])
+  REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;    AC_SUBST([REPLACE_PTHREAD_RWLOCK_TRYRDLOCK])
+  REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;    AC_SUBST([REPLACE_PTHREAD_RWLOCK_TRYWRLOCK])
+  REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;  AC_SUBST([REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK])
+  REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;  AC_SUBST([REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK])
+  REPLACE_PTHREAD_RWLOCK_UNLOCK=0;       AC_SUBST([REPLACE_PTHREAD_RWLOCK_UNLOCK])
+  REPLACE_PTHREAD_RWLOCK_DESTROY=0;      AC_SUBST([REPLACE_PTHREAD_RWLOCK_DESTROY])
+  REPLACE_PTHREAD_COND_INIT=0;           AC_SUBST([REPLACE_PTHREAD_COND_INIT])
+  REPLACE_PTHREAD_CONDATTR_INIT=0;       AC_SUBST([REPLACE_PTHREAD_CONDATTR_INIT])
+  REPLACE_PTHREAD_CONDATTR_DESTROY=0;    AC_SUBST([REPLACE_PTHREAD_CONDATTR_DESTROY])
+  REPLACE_PTHREAD_COND_WAIT=0;           AC_SUBST([REPLACE_PTHREAD_COND_WAIT])
+  REPLACE_PTHREAD_COND_TIMEDWAIT=0;      AC_SUBST([REPLACE_PTHREAD_COND_TIMEDWAIT])
+  REPLACE_PTHREAD_COND_SIGNAL=0;         AC_SUBST([REPLACE_PTHREAD_COND_SIGNAL])
+  REPLACE_PTHREAD_COND_BROADCAST=0;      AC_SUBST([REPLACE_PTHREAD_COND_BROADCAST])
+  REPLACE_PTHREAD_COND_DESTROY=0;        AC_SUBST([REPLACE_PTHREAD_COND_DESTROY])
+  REPLACE_PTHREAD_KEY_CREATE=0;          AC_SUBST([REPLACE_PTHREAD_KEY_CREATE])
+  REPLACE_PTHREAD_SETSPECIFIC=0;         AC_SUBST([REPLACE_PTHREAD_SETSPECIFIC])
+  REPLACE_PTHREAD_GETSPECIFIC=0;         AC_SUBST([REPLACE_PTHREAD_GETSPECIFIC])
+  REPLACE_PTHREAD_KEY_DELETE=0;          AC_SUBST([REPLACE_PTHREAD_KEY_DELETE])
+  REPLACE_PTHREAD_SPIN_INIT=0;           AC_SUBST([REPLACE_PTHREAD_SPIN_INIT])
+  REPLACE_PTHREAD_SPIN_LOCK=0;           AC_SUBST([REPLACE_PTHREAD_SPIN_LOCK])
+  REPLACE_PTHREAD_SPIN_TRYLOCK=0;        AC_SUBST([REPLACE_PTHREAD_SPIN_TRYLOCK])
+  REPLACE_PTHREAD_SPIN_UNLOCK=0;         AC_SUBST([REPLACE_PTHREAD_SPIN_UNLOCK])
+  REPLACE_PTHREAD_SPIN_DESTROY=0;        AC_SUBST([REPLACE_PTHREAD_SPIN_DESTROY])
+])
diff --git a/m4/pthread_rwlock_rdlock.m4 b/m4/pthread_rwlock_rdlock.m4
new file mode 100644 (file)
index 0000000..a5fbead
--- /dev/null
@@ -0,0 +1,185 @@
+# pthread_rwlock_rdlock.m4 serial 4
+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Inspired by
+dnl https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
+dnl by Intel Corporation.
+
+dnl Test whether in a situation where
+dnl   - an rwlock is taken by a reader and has a writer waiting,
+dnl   - an additional reader requests the lock,
+dnl   - the waiting writer and the requesting reader threads have the same
+dnl     priority,
+dnl the requesting reader thread gets blocked, so that at some point the
+dnl waiting writer can acquire the lock.
+dnl Without such a guarantee, when there a N readers and each of the readers
+dnl spends more than 1/Nth of the time with the lock held, there is a high
+dnl probability that the waiting writer will not get the lock in a given finite
+dnl time, a phenomenon called "writer starvation".
+dnl Without such a guarantee, applications have a hard time avoiding writer
+dnl starvation.
+dnl
+dnl POSIX:2017 makes this requirement only for implementations that support TPS
+dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO
+dnl and SCHED_RR, see
+dnl https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdlock.html
+dnl but this test verifies the guarantee regardless of TPS and regardless of
+dnl scheduling policy.
+dnl Glibc does not provide this guarantee (and never will on Linux), see
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
+dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052
+AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader],
+    [gl_cv_pthread_rwlock_rdlock_prefer_writer],
+    [save_LIBS="$LIBS"
+     LIBS="$LIBS $LIBMULTITHREAD"
+     AC_RUN_IFELSE(
+       [AC_LANG_SOURCE([[
+#include <errno.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#define SUCCEED() exit (0)
+#define FAILURE() exit (1)
+#define UNEXPECTED(n) (exit (10 + (n)))
+
+/* The main thread creates the waiting writer and the requesting reader threads
+   in the default way; this guarantees that they have the same priority.
+   We can reuse the main thread as first reader thread.  */
+
+static pthread_rwlock_t lock;
+static pthread_t reader1;
+static pthread_t writer;
+static pthread_t reader2;
+static pthread_t timer;
+/* Used to pass control from writer to reader2 and from reader2 to timer,
+   as in a relay race.
+   Passing control from one running thread to another running thread
+   is most likely faster than to create the second thread.  */
+static pthread_mutex_t baton;
+
+static void *
+timer_func (void *ignored)
+{
+  /* Step 13 (can be before or after step 12):
+     The timer thread takes the baton, then waits a moment to make sure
+     it can tell whether the second reader thread is blocked at step 12.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (13);
+  usleep (100000);
+  /* By the time we get here, it's clear that the second reader thread is
+     blocked at step 12.  This is the desired behaviour.  */
+  SUCCEED ();
+}
+
+static void *
+reader2_func (void *ignored)
+{
+  int err;
+
+  /* Step 8 (can be before or after step 7):
+     The second reader thread takes the baton, then waits a moment to make sure
+     the writer thread has reached step 7.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (8);
+  usleep (100000);
+  /* Step 9: The second reader thread requests the lock.  */
+  err = pthread_rwlock_tryrdlock (&lock);
+  if (err == 0)
+    FAILURE ();
+  else if (err != EBUSY)
+    UNEXPECTED (9);
+  /* Step 10: Launch a timer, to test whether the next call blocks.  */
+  if (pthread_create (&timer, NULL, timer_func, NULL))
+    UNEXPECTED (10);
+  /* Step 11: Release the baton.  */
+  if (pthread_mutex_unlock (&baton))
+    UNEXPECTED (11);
+  /* Step 12: The second reader thread requests the lock.  */
+  err = pthread_rwlock_rdlock (&lock);
+  if (err == 0)
+    FAILURE ();
+  else
+    UNEXPECTED (12);
+}
+
+static void *
+writer_func (void *ignored)
+{
+  /* Step 4: Take the baton, so that the second reader thread does not go ahead
+     too early.  */
+  if (pthread_mutex_lock (&baton))
+    UNEXPECTED (4);
+  /* Step 5: Create the second reader thread.  */
+  if (pthread_create (&reader2, NULL, reader2_func, NULL))
+    UNEXPECTED (5);
+  /* Step 6: Release the baton.  */
+  if (pthread_mutex_unlock (&baton))
+    UNEXPECTED (6);
+  /* Step 7: The writer thread requests the lock.  */
+  if (pthread_rwlock_wrlock (&lock))
+    UNEXPECTED (7);
+  return NULL;
+}
+
+int
+main ()
+{
+  reader1 = pthread_self ();
+
+  /* Step 1: The main thread initializes the lock and the baton.  */
+  if (pthread_rwlock_init (&lock, NULL))
+    UNEXPECTED (1);
+  if (pthread_mutex_init (&baton, NULL))
+    UNEXPECTED (1);
+  /* Step 2: The main thread acquires the lock as a reader.  */
+  if (pthread_rwlock_rdlock (&lock))
+    UNEXPECTED (2);
+  /* Step 3: Create the writer thread.  */
+  if (pthread_create (&writer, NULL, writer_func, NULL))
+    UNEXPECTED (3);
+  /* Job done.  Go to sleep.  */
+  for (;;)
+    {
+      sleep (1);
+    }
+}
+]])],
+       [gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
+       [gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
+       [case "$host_os" in
+                         # Guess no on glibc systems.
+          *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                         # Guess no on musl systems.
+          *-musl*)       gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                         # Guess no on bionic systems.
+          *-android*)    gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+                         # Guess yes on native Windows with the mingw-w64 winpthreads library.
+                         # Guess no on native Windows with the gnulib windows-rwlock module.
+          mingw*)        if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+                         else
+                           gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
+                         fi
+                         ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
+         esac
+       ])
+     LIBS="$save_LIBS"
+    ])
+  case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
+    *yes)
+      AC_DEFINE([HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER], [1],
+        [Define if the 'pthread_rwlock_rdlock' function prefers a writer to a reader.])
+      ;;
+  esac
+])
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
new file mode 100644 (file)
index 0000000..ff7fa96
--- /dev/null
@@ -0,0 +1,274 @@
+# pthread_sigmask.m4 serial 21
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
+[
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+
+  AC_CHECK_FUNCS_ONCE([pthread_sigmask])
+
+  dnl On MinGW pthread_sigmask is just a macro which always returns 0.
+  dnl It does not exist as a real function, which is required by POSIX.
+  AC_CACHE_CHECK([whether pthread_sigmask is a macro],
+    [gl_cv_func_pthread_sigmask_macro],
+    [AC_EGREP_CPP([headers_define_pthread_sigmask], [
+#include <pthread.h>
+#include <signal.h>
+#ifdef pthread_sigmask
+ headers_define_pthread_sigmask
+#endif],
+       [gl_cv_func_pthread_sigmask_macro=yes],
+       [gl_cv_func_pthread_sigmask_macro=no])
+    ])
+
+  LIB_PTHREAD_SIGMASK=
+
+  if test $gl_cv_func_pthread_sigmask_macro = yes; then
+    dnl pthread_sigmask is a dummy macro.
+    HAVE_PTHREAD_SIGMASK=0
+    dnl Make sure to '#undef pthread_sigmask' before defining it.
+    REPLACE_PTHREAD_SIGMASK=1
+  else
+    dnl Test whether the gnulib module 'threadlib' is in use.
+    dnl Some packages like Emacs use --avoid=threadlib.
+    dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
+    dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+    m4_ifdef([gl_][THREADLIB], [
+      AC_REQUIRE([gl_][THREADLIB])
+
+      if test "$gl_threads_api" = posix; then
+        if test $ac_cv_func_pthread_sigmask = yes; then
+          dnl pthread_sigmask is available without -lpthread.
+          :
+        else
+          if test -n "$LIBMULTITHREAD"; then
+            AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
+              [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
+              [gl_save_LIBS="$LIBS"
+               LIBS="$LIBS $LIBMULTITHREAD"
+               AC_LINK_IFELSE(
+                 [AC_LANG_PROGRAM(
+                    [[#include <pthread.h>
+                      #include <signal.h>
+                    ]],
+                    [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]])
+                 ],
+                 [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
+                 [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
+               LIBS="$gl_save_LIBS"
+              ])
+            if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
+              dnl pthread_sigmask is available with -pthread or -lpthread.
+              LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+            else
+              dnl pthread_sigmask is not available at all.
+              HAVE_PTHREAD_SIGMASK=0
+            fi
+          else
+            dnl pthread_sigmask is not available at all.
+            HAVE_PTHREAD_SIGMASK=0
+          fi
+        fi
+      else
+        dnl pthread_sigmask may exist but does not interoperate with the chosen
+        dnl multithreading facility.
+        if test $ac_cv_func_pthread_sigmask = yes; then
+          REPLACE_PTHREAD_SIGMASK=1
+        else
+          HAVE_PTHREAD_SIGMASK=0
+        fi
+      fi
+    ], [
+      dnl The module 'threadlib' is not in use, due to --avoid=threadlib being
+      dnl specified.
+      dnl The package either has prepared CPPFLAGS and LIBS for use of
+      dnl POSIX:2008 threads, or wants to build single-threaded programs.
+      if test $ac_cv_func_pthread_sigmask = yes; then
+        dnl pthread_sigmask exists and does not require extra libraries.
+        dnl Assume that it is declared.
+        :
+      else
+        dnl pthread_sigmask either does not exist or needs extra libraries.
+        HAVE_PTHREAD_SIGMASK=0
+        dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask,
+        dnl so as to not accidentally override the system's pthread_sigmask
+        dnl symbol from libpthread. This is necessary on IRIX 6.5.
+        REPLACE_PTHREAD_SIGMASK=1
+      fi
+    ])
+  fi
+
+  AC_SUBST([LIB_PTHREAD_SIGMASK])
+  dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
+  dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
+  dnl same.
+
+  dnl Now test for some bugs in the system function.
+  if test $HAVE_PTHREAD_SIGMASK = 1; then
+    AC_REQUIRE([AC_PROG_CC])
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+    dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
+    dnl that are not linked with -lpthread, the pthread_sigmask() function
+    dnl always returns 0 and has no effect.
+    if test -z "$LIB_PTHREAD_SIGMASK"; then
+      case " $LIBS " in
+        *' -pthread '*) ;;
+        *' -lpthread '*) ;;
+        *)
+          AC_CACHE_CHECK([whether pthread_sigmask works without -lpthread],
+            [gl_cv_func_pthread_sigmask_in_libc_works],
+            [
+              AC_RUN_IFELSE(
+                [AC_LANG_SOURCE([[
+                   #include <pthread.h>
+                   #include <signal.h>
+                   #include <stddef.h>
+                   int main ()
+                   {
+                     sigset_t set;
+                     sigemptyset (&set);
+                     return pthread_sigmask (1729, &set, NULL) != 0;
+                   }]])],
+                [gl_cv_func_pthread_sigmask_in_libc_works=no],
+                [gl_cv_func_pthread_sigmask_in_libc_works=yes],
+                [
+                 changequote(,)dnl
+                 case "$host_os" in
+                   freebsd* | midnightbsd* | hpux* | solaris | solaris2.[2-9]*)
+                     gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
+                   *)
+                     gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
+                 esac
+                 changequote([,])dnl
+                ])
+            ])
+          case "$gl_cv_func_pthread_sigmask_in_libc_works" in
+            *no)
+              REPLACE_PTHREAD_SIGMASK=1
+              AC_DEFINE([PTHREAD_SIGMASK_INEFFECTIVE], [1],
+                [Define to 1 if pthread_sigmask may return 0 and have no effect.])
+              ;;
+          esac;;
+      esac
+    fi
+
+    dnl On Cygwin 1.7.5, the pthread_sigmask() has a wrong return value
+    dnl convention: Upon failure, it returns -1 and sets errno.
+    AC_CACHE_CHECK([whether pthread_sigmask returns error numbers],
+      [gl_cv_func_pthread_sigmask_return_works],
+      [
+        gl_save_LIBS="$LIBS"
+        LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <pthread.h>
+#include <signal.h>
+#include <stddef.h>
+int main ()
+{
+  sigset_t set;
+  sigemptyset (&set);
+  if (pthread_sigmask (1729, &set, NULL) == -1)
+    return 1;
+  return 0;
+}]])],
+          [gl_cv_func_pthread_sigmask_return_works=yes],
+          [gl_cv_func_pthread_sigmask_return_works=no],
+          [case "$host_os" in
+             cygwin*)
+               gl_cv_func_pthread_sigmask_return_works="guessing no";;
+             *)
+               gl_cv_func_pthread_sigmask_return_works="guessing yes";;
+           esac
+          ])
+        LIBS="$gl_save_LIBS"
+      ])
+    case "$gl_cv_func_pthread_sigmask_return_works" in
+      *no)
+        REPLACE_PTHREAD_SIGMASK=1
+        AC_DEFINE([PTHREAD_SIGMASK_FAILS_WITH_ERRNO], [1],
+          [Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno.])
+        ;;
+    esac
+
+    dnl On IRIX 6.5, in a single-threaded program, pending signals are not
+    dnl immediately delivered when they are unblocked through pthread_sigmask,
+    dnl only a little while later.
+    AC_CACHE_CHECK([whether pthread_sigmask unblocks signals correctly],
+      [gl_cv_func_pthread_sigmask_unblock_works],
+      [
+        case "$host_os" in
+          irix*)
+            gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
+          *)
+            gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
+        esac
+        m4_ifdef([gl_][THREADLIB],
+          [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
+           dnl Otherwise we get a false positive on those platforms where
+           dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
+           gl_save_LIBS=$LIBS
+           LIBS="$LIBS $LIBMULTITHREAD"])
+        AC_RUN_IFELSE(
+          [AC_LANG_SOURCE([[
+#include <pthread.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+]GL_MDA_DEFINES[
+static volatile int sigint_occurred;
+static void
+sigint_handler (int sig)
+{
+  sigint_occurred++;
+}
+int main ()
+{
+  sigset_t set;
+  int pid = getpid ();
+  char command[80];
+  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);
+  if (!(system (command) == 0))
+    return 2;
+  sleep (2);
+  if (!(sigint_occurred == 0))
+    return 3;
+  if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
+    return 4;
+  if (!(sigint_occurred == 1)) /* This fails on IRIX.  */
+    return 5;
+  return 0;
+}]])],
+          [:],
+          [gl_cv_func_pthread_sigmask_unblock_works=no],
+          [:])
+        m4_ifdef([gl_][THREADLIB], [LIBS=$gl_save_LIBS])
+      ])
+    case "$gl_cv_func_pthread_sigmask_unblock_works" in
+      *no)
+        REPLACE_PTHREAD_SIGMASK=1
+        AC_DEFINE([PTHREAD_SIGMASK_UNBLOCK_BUG], [1],
+          [Define to 1 if pthread_sigmask() unblocks signals incorrectly.])
+        ;;
+    esac
+  fi
+])
+
+# Prerequisite of lib/pthread_sigmask.c.
+AC_DEFUN([gl_PREREQ_PTHREAD_SIGMASK],
+[
+  if test $HAVE_PTHREAD_SIGMASK = 1; then
+    AC_DEFINE([HAVE_PTHREAD_SIGMASK], [1],
+      [Define to 1 if the pthread_sigmask function can be used (despite bugs).])
+  fi
+])
index f2a76b2..919984d 100644 (file)
@@ -1,5 +1,5 @@
-# putenv.m4 serial 22
-dnl Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# putenv.m4 serial 25
+dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,35 +14,41 @@ AC_DEFUN([gl_FUNC_PUTENV],
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
-   [gl_cv_func_svid_putenv],
-   [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
-    /* Put it in env.  */
-    if (putenv ("CONFTEST_putenv=val"))
-      return 1;
+    [gl_cv_func_svid_putenv],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [AC_INCLUDES_DEFAULT
+           GL_MDA_DEFINES],
+          [[
+            /* Put it in env.  */
+            if (putenv ("CONFTEST_putenv=val"))
+              return 1;
 
-    /* Try to remove it.  */
-    if (putenv ("CONFTEST_putenv"))
-      return 2;
+            /* Try to remove it.  */
+            if (putenv ("CONFTEST_putenv"))
+              return 2;
 
-    /* Make sure it was deleted.  */
-    if (getenv ("CONFTEST_putenv") != 0)
-      return 3;
+            /* Make sure it was deleted.  */
+            if (getenv ("CONFTEST_putenv") != 0)
+              return 3;
 
-    return 0;
-              ]])],
-             gl_cv_func_svid_putenv=yes,
-             gl_cv_func_svid_putenv=no,
-             dnl When crosscompiling, assume putenv is broken.
-             [case "$host_os" in
-                               # Guess yes on glibc systems.
-                *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
-                               # Guess no on native Windows.
-                mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
-                               # If we don't know, assume the worst.
-                *)             gl_cv_func_svid_putenv="guessing no" ;;
-              esac
-             ])
-   ])
+            return 0;
+          ]])],
+       [gl_cv_func_svid_putenv=yes],
+       [gl_cv_func_svid_putenv=no],
+       [dnl When crosscompiling, assume putenv is broken.
+        case "$host_os" in
+                         # Guess yes on glibc systems.
+          *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+                         # Guess yes on musl systems.
+          *-musl*)       gl_cv_func_svid_putenv="guessing yes" ;;
+                         # Guess no on native Windows.
+          mingw*)        gl_cv_func_svid_putenv="guessing no" ;;
+                         # If we don't know, obey --enable-cross-guesses.
+          *)             gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
+        esac
+       ])
+    ])
   case "$gl_cv_func_svid_putenv" in
     *yes) ;;
     *)
index 4d2198b..be205c0 100644 (file)
@@ -1,5 +1,5 @@
 # quote.m4 serial 6
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index c639e6f..19067f5 100644 (file)
@@ -1,10 +1,11 @@
-# quotearg.m4 serial 9
-dnl Copyright (C) 2002, 2004-2018 Free Software Foundation, Inc.
+# quotearg.m4 serial 10
+dnl Copyright (C) 2002, 2004-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_QUOTEARG],
 [
+  AC_REQUIRE([AC_C_RESTRICT])
   :
 ])
index 761e4b9..4bf0ca9 100644 (file)
@@ -1,5 +1,5 @@
 # raise.m4 serial 4
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index b7497b8..452fab1 100644 (file)
@@ -1,5 +1,5 @@
-# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
+# rawmemchr.m4 serial 3
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_RAWMEMCHR],
   dnl Persuade glibc <string.h> to declare rawmemchr().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
   AC_CHECK_FUNCS([rawmemchr])
   if test $ac_cv_func_rawmemchr = no; then
     HAVE_RAWMEMCHR=0
index 4d0ab48..352788c 100644 (file)
@@ -1,5 +1,5 @@
-# readlink.m4 serial 14
-dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
+# readlink.m4 serial 16
+dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,7 +23,7 @@ AC_DEFUN([gl_FUNC_READLINK],
     dnl Solaris 9 ignores trailing slash.
     dnl FreeBSD 7.2 dereferences only one level of links with trailing slash.
     AC_CACHE_CHECK([whether readlink handles trailing slash correctly],
-      [gl_cv_func_readlink_works],
+      [gl_cv_func_readlink_trailing_slash],
       [# We have readlink, so assume ln -s works.
        ln -s conftest.no-such conftest.link
        ln -s conftest.link conftest.lnk2
@@ -32,18 +32,22 @@ AC_DEFUN([gl_FUNC_READLINK],
            [[#include <unistd.h>
 ]], [[char buf[20];
       return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
-         [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
+         [gl_cv_func_readlink_trailing_slash=yes],
+         [gl_cv_func_readlink_trailing_slash=no],
          [case "$host_os" in
-                             # Guess yes on Linux systems.
-            linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
-                             # Guess yes on glibc systems.
-            *-gnu* | gnu*)   gl_cv_func_readlink_works="guessing yes" ;;
-                             # If we don't know, assume the worst.
-            *)               gl_cv_func_readlink_works="guessing no" ;;
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_trailing_slash="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_trailing_slash="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_trailing_slash="$gl_cross_guess_normal" ;;
           esac
          ])
       rm -f conftest.link conftest.lnk2])
-    case "$gl_cv_func_readlink_works" in
+    case "$gl_cv_func_readlink_trailing_slash" in
       *yes)
         if test "$gl_cv_decl_readlink_works" != yes; then
           REPLACE_READLINK=1
@@ -55,6 +59,43 @@ AC_DEFUN([gl_FUNC_READLINK],
         REPLACE_READLINK=1
         ;;
     esac
+
+    AC_CACHE_CHECK([whether readlink truncates results correctly],
+      [gl_cv_func_readlink_truncate],
+      [# We have readlink, so assume ln -s works.
+       ln -s ab conftest.link
+       AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+           [[#include <unistd.h>
+]], [[char c;
+      return readlink ("conftest.link", &c, 1) != 1;]])],
+         [gl_cv_func_readlink_truncate=yes],
+         [gl_cv_func_readlink_truncate=no],
+         [case "$host_os" in
+            # Guess yes on Linux or glibc systems.
+            linux-* | linux | *-gnu* | gnu*)
+              gl_cv_func_readlink_truncate="guessing yes" ;;
+            # Guess no on AIX or HP-UX.
+            aix* | hpux*)
+              gl_cv_func_readlink_truncate="guessing no" ;;
+            # If we don't know, obey --enable-cross-guesses.
+            *)
+              gl_cv_func_readlink_truncate="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      rm -f conftest.link conftest.lnk2])
+    case $gl_cv_func_readlink_truncate in
+      *yes)
+        if test "$gl_cv_decl_readlink_works" != yes; then
+          REPLACE_READLINK=1
+        fi
+        ;;
+      *)
+        AC_DEFINE([READLINK_TRUNCATE_BUG], [1], [Define to 1 if readlink
+          sets errno instead of truncating a too-long link.])
+        REPLACE_READLINK=1
+        ;;
+    esac
   fi
 ])
 
diff --git a/m4/realloc.m4 b/m4/realloc.m4
new file mode 100644 (file)
index 0000000..0abc418
--- /dev/null
@@ -0,0 +1,63 @@
+# realloc.m4 serial 24
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# This is adapted with modifications from upstream Autoconf here:
+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455
+AC_DEFUN([_AC_FUNC_REALLOC_IF],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+  AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull],
+    [ac_cv_func_realloc_0_nonnull],
+    [AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <stdlib.h>
+          ]],
+          [[void *p = realloc (0, 0);
+            int result = !p;
+            free (p);
+            return result;]])
+       ],
+       [ac_cv_func_realloc_0_nonnull=yes],
+       [ac_cv_func_realloc_0_nonnull=no],
+       [case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_realloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
+        esac
+       ])
+    ])
+  AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2])
+])# AC_FUNC_REALLOC
+
+# gl_FUNC_REALLOC_GNU
+# -------------------
+# Replace realloc if it is not compatible with GNU libc.
+AC_DEFUN([gl_FUNC_REALLOC_GNU],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
+  if test $REPLACE_REALLOC = 0; then
+    _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1])
+  fi
+])# gl_FUNC_REALLOC_GNU
+
+# gl_FUNC_REALLOC_POSIX
+# ---------------------
+# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails, and doesn't mess up with ptrdiff_t overflow),
+# and replace realloc if it is not.
+AC_DEFUN([gl_FUNC_REALLOC_POSIX],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+  if test $REPLACE_MALLOC = 1; then
+    REPLACE_REALLOC=1
+  fi
+])
diff --git a/m4/reallocarray.m4 b/m4/reallocarray.m4
new file mode 100644 (file)
index 0000000..9d8a626
--- /dev/null
@@ -0,0 +1,23 @@
+# reallocarray.m4 serial 3
+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_REALLOCARRAY],
+[
+  dnl Persuade glibc <stdlib.h> to declare reallocarray.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
+  AC_CHECK_FUNCS([reallocarray])
+  if test "$ac_cv_func_reallocarray" = no; then
+    HAVE_REALLOCARRAY=0
+  elif test "$gl_cv_malloc_ptrdiff" = no; then
+    REPLACE_REALLOCARRAY=1
+  fi
+])
+
+# Prerequisites of lib/reallocarray.c.
+AC_DEFUN([gl_PREREQ_REALLOCARRAY], [:])
index 3a39b1a..1c7e562 100644 (file)
@@ -1,6 +1,6 @@
-# serial 68
+# serial 73
 
-# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -90,11 +90,14 @@ AC_DEFUN([gl_REGEX],
                   s = re_compile_pattern (pat, sizeof pat - 1, &regex);
                   if (s)
                     result |= 1;
-                  else if (re_search (&regex, data, sizeof data - 1,
-                                      0, sizeof data - 1, &regs)
-                           != -1)
-                    result |= 1;
-                  regfree (&regex);
+                  else
+                    {
+                      if (re_search (&regex, data, sizeof data - 1,
+                                     0, sizeof data - 1, &regs)
+                          != -1)
+                        result |= 1;
+                      regfree (&regex);
+                    }
                 }
 
                 {
@@ -125,8 +128,8 @@ AC_DEFUN([gl_REGEX],
                                      0, sizeof data - 1, 0);
                       if (i != 0 && i != 21)
                         result |= 1;
+                      regfree (&regex);
                     }
-                  regfree (&regex);
                 }
 
                 if (! setlocale (LC_ALL, "C"))
@@ -139,9 +142,13 @@ AC_DEFUN([gl_REGEX],
             s = re_compile_pattern ("a[^x]b", 6, &regex);
             if (s)
               result |= 2;
-            /* This should fail, but succeeds for glibc-2.5.  */
-            else if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
-              result |= 2;
+            else
+              {
+                /* This should fail, but succeeds for glibc-2.5.  */
+                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+                  result |= 2;
+                regfree (&regex);
+              }
 
             /* This regular expression is from Spencer ere test number 75
                in grep-2.3.  */
@@ -153,7 +160,10 @@ AC_DEFUN([gl_REGEX],
             s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
             /* This should fail with _Invalid character class name_ error.  */
             if (!s)
-              result |= 4;
+              {
+                result |= 4;
+                regfree (&regex);
+              }
 
             /* Ensure that [b-a] is diagnosed as invalid, when
                using RE_NO_EMPTY_RANGES. */
@@ -161,13 +171,18 @@ AC_DEFUN([gl_REGEX],
             memset (&regex, 0, sizeof regex);
             s = re_compile_pattern ("a[b-a]", 6, &regex);
             if (s == 0)
-              result |= 8;
+              {
+                result |= 8;
+                regfree (&regex);
+              }
 
             /* This should succeed, but does not for glibc-2.1.3.  */
             memset (&regex, 0, sizeof regex);
             s = re_compile_pattern ("{1", 2, &regex);
             if (s)
               result |= 8;
+            else
+              regfree (&regex);
 
             /* The following example is derived from a problem report
                against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>.  */
@@ -175,17 +190,35 @@ AC_DEFUN([gl_REGEX],
             s = re_compile_pattern ("[an\371]*n", 7, &regex);
             if (s)
               result |= 8;
-            /* This should match, but does not for glibc-2.2.1.  */
-            else if (re_match (&regex, "an", 2, 0, &regs) != 2)
-              result |= 8;
+            else
+              {
+                /* This should match, but does not for glibc-2.2.1.  */
+                if (re_match (&regex, "an", 2, 0, &regs) != 2)
+                  result |= 8;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
             memset (&regex, 0, sizeof regex);
             s = re_compile_pattern ("x", 1, &regex);
             if (s)
               result |= 8;
-            /* glibc-2.2.93 does not work with a negative RANGE argument.  */
-            else if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
-              result |= 8;
+            else
+              {
+                /* glibc-2.2.93 does not work with a negative RANGE argument.  */
+                if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+                  result |= 8;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
             /* The version of regex.c in older versions of gnulib
                ignored RE_ICASE.  Detect that problem too.  */
@@ -194,8 +227,17 @@ AC_DEFUN([gl_REGEX],
             s = re_compile_pattern ("x", 1, &regex);
             if (s)
               result |= 16;
-            else if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
-              result |= 16;
+            else
+              {
+                if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+                  result |= 16;
+                else
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
 
             /* Catch a bug reported by Vin Shelton in
                https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
@@ -204,9 +246,11 @@ AC_DEFUN([gl_REGEX],
                            & ~RE_CONTEXT_INVALID_DUP
                            & ~RE_NO_EMPTY_RANGES);
             memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+            s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
             if (s)
               result |= 32;
+            else
+              regfree (&regex);
 
             /* REG_STARTEND was added to glibc on 2004-01-15.
                Reject older versions.  */
@@ -220,9 +264,51 @@ AC_DEFUN([gl_REGEX],
                back reference.  */
             re_set_syntax (RE_SYNTAX_POSIX_EGREP);
             memset (&regex, 0, sizeof regex);
-            s = re_compile_pattern ("0|()0|\\1|0", 10, &regex);
-            if (!s || strcmp (s, "Invalid back reference"))
+            s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
+            if (!s)
+              {
+                memset (&regs, 0, sizeof regs);
+                i = re_search (&regex, "x", 1, 0, 1, &regs);
+                if (i != -1)
+                  result |= 64;
+                if (0 <= i)
+                  {
+                    free (regs.start);
+                    free (regs.end);
+                  }
+                regfree (&regex);
+              }
+            else
+              {
+                if (strcmp (s, "Invalid back reference"))
+                  result |= 64;
+              }
+
+            /* glibc bug 11053.  */
+            re_set_syntax (RE_SYNTAX_POSIX_BASIC);
+            memset (&regex, 0, sizeof regex);
+            static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
+            s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
+            if (s)
               result |= 64;
+            else
+              {
+                memset (&regs, 0, sizeof regs);
+                static char const data[] = "a";
+                int datalen = sizeof data - 1;
+                i = re_search (&regex, data, datalen, 0, datalen, &regs);
+                if (i != 0)
+                  result |= 64;
+                else if (regs.num_regs < 2)
+                  result |= 64;
+                else if (! (regs.start[0] == 0 && regs.end[0] == 1))
+                  result |= 64;
+                else if (! (regs.start[1] == 0 && regs.end[1] == 0))
+                  result |= 64;
+                regfree (&regex);
+                free (regs.start);
+                free (regs.end);
+              }
 
 #if 0
             /* It would be nice to reject hosts whose regoff_t values are too
@@ -243,8 +329,8 @@ AC_DEFUN([gl_REGEX],
         [case "$host_os" in
                    # Guess no on native Windows.
            mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
-                   # Otherwise, assume it is not working.
-           *)      gl_cv_func_re_compile_pattern_working="guessing no" ;;
+                   # Otherwise obey --enable-cross-guesses.
+           *)      gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
          esac
         ])
       ])
@@ -304,7 +390,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([AC_TYPE_MBSTATE_T])
   AC_REQUIRE([gl_EEMALLOC])
-  AC_REQUIRE([gl_GLIBC21])
   AC_CHECK_HEADERS([libintl.h])
   AC_CHECK_FUNCS_ONCE([isblank iswctype])
   AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
diff --git a/m4/sched_h.m4 b/m4/sched_h.m4
new file mode 100644 (file)
index 0000000..a840e3d
--- /dev/null
@@ -0,0 +1,106 @@
+# sched_h.m4 serial 15
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN_ONCE([gl_SCHED_H],
+[
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
+  AC_REQUIRE([gl_SCHED_H_DEFAULTS])
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
+  AC_CHECK_HEADERS([sched.h], [], [],
+    [[#if HAVE_SYS_CDEFS_H
+       #include <sys/cdefs.h>
+      #endif
+    ]])
+  gl_NEXT_HEADERS([sched.h])
+
+  if test "$ac_cv_header_sched_h" = yes; then
+    HAVE_SCHED_H=1
+  else
+    HAVE_SCHED_H=0
+  fi
+  AC_SUBST([HAVE_SCHED_H])
+
+  if test "$HAVE_SCHED_H" = 1; then
+    AC_CHECK_TYPE([struct sched_param],
+      [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+      [[#if HAVE_SYS_CDEFS_H
+         #include <sys/cdefs.h>
+        #endif
+        #include <sched.h>
+      ]])
+  else
+    HAVE_STRUCT_SCHED_PARAM=0
+    case "$host_os" in
+      os2*)
+        dnl On OS/2 kLIBC, struct sched_param is in spawn.h.
+        AC_CHECK_TYPE([struct sched_param],
+          [HAVE_STRUCT_SCHED_PARAM=1], [],
+          [#include <spawn.h>])
+        ;;
+      vms)
+        dnl On OpenVMS 7.2 or newer, struct sched_param is in pthread.h.
+        AC_CHECK_TYPE([struct sched_param],
+          [HAVE_STRUCT_SCHED_PARAM=1], [],
+          [#include <pthread.h>])
+        ;;
+    esac
+  fi
+  AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+
+  if test "$ac_cv_header_sys_cdefs_h" = yes; then
+    HAVE_SYS_CDEFS_H=1
+  else
+    HAVE_SYS_CDEFS_H=0
+  fi
+  AC_SUBST([HAVE_SYS_CDEFS_H])
+
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use, if it is not common
+  dnl enough to be declared everywhere.
+  gl_WARN_ON_USE_PREPARE([[#include <sched.h>
+    ]], [sched_yield])
+])
+
+# gl_SCHED_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_SCHED_MODULE_INDICATOR],
+[
+  dnl Ensure to expand the default settings once only.
+  gl_SCHED_H_REQUIRE_DEFAULTS
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SCHED_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SCHED_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCHED_YIELD])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SCHED_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SCHED_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_SCHED_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_SCHED_YIELD=1;    AC_SUBST([HAVE_SCHED_YIELD])
+  REPLACE_SCHED_YIELD=0; AC_SUBST([REPLACE_SCHED_YIELD])
+])
index 098af8e..72c068f 100644 (file)
@@ -1,12 +1,12 @@
-# select.m4 serial 10
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# select.m4 serial 13
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_SELECT],
 [
-  AC_REQUIRE([gl_HEADER_SYS_SELECT])
+  AC_REQUIRE([gl_SYS_SELECT_H])
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_REQUIRE([gl_SOCKETS])
@@ -60,7 +60,8 @@ changequote([,])dnl
 #endif
 #include <unistd.h>
 #include <errno.h>
-]],[[
+]GL_MDA_DEFINES],
+[[
   fd_set set;
   dup2(0, 16);
   FD_ZERO(&set);
@@ -78,8 +79,8 @@ changequote([,])dnl
             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, assume the worst.
-            *)               gl_cv_func_select_detects_ebadf="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_select_detects_ebadf="$gl_cross_guess_normal" ;;
            esac
           ])
       ])
index 5d257f7..f79a278 100644 (file)
@@ -1,5 +1,5 @@
-# setenv.m4 serial 27
-dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc.
+# setenv.m4 serial 30
+dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -37,8 +37,10 @@ AC_DEFUN([gl_FUNC_SETENV],
       [case "$host_os" in
                         # Guess yes on glibc systems.
          *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
-                        # If we don't know, assume the worst.
-         *)             gl_cv_func_setenv_works="guessing no" ;;
+                        # 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
       ])])
     case "$gl_cv_func_setenv_works" in
@@ -104,35 +106,39 @@ int unsetenv (const char *name);
     dnl OpenBSD 4.7 unsetenv("") does not fail.
     AC_CACHE_CHECK([whether unsetenv obeys POSIX],
       [gl_cv_func_unsetenv_works],
-      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-       #include <stdlib.h>
-       #include <errno.h>
-       extern char **environ;
-      ]], [[
-       char entry1[] = "a=1";
-       char entry2[] = "b=2";
-       char *env[] = { entry1, entry2, NULL };
-       if (putenv ((char *) "a=1")) return 1;
-       if (putenv (entry2)) return 2;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 3;
-       if (!unsetenv ("") || errno != EINVAL) return 4;
-       entry2[0] = 'b';
-       environ = env;
-       if (!getenv ("a")) return 5;
-       entry2[0] = 'a';
-       unsetenv ("a");
-       if (getenv ("a")) return 6;
-      ]])],
-      [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
-      [case "$host_os" in
-                 # Guess yes on glibc systems.
-         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
-                 # If we don't know, assume the worst.
-         *)      gl_cv_func_unsetenv_works="guessing no" ;;
-       esac
-      ])])
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM([[
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+           ]GL_MDA_DEFINES],
+           [[
+            char entry1[] = "a=1";
+            char entry2[] = "b=2";
+            char *env[] = { entry1, entry2, NULL };
+            if (putenv ((char *) "a=1")) return 1;
+            if (putenv (entry2)) return 2;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 3;
+            if (!unsetenv ("") || errno != EINVAL) return 4;
+            entry2[0] = 'b';
+            environ = env;
+            if (!getenv ("a")) return 5;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 6;
+           ]])],
+         [gl_cv_func_unsetenv_works=yes],
+         [gl_cv_func_unsetenv_works=no],
+         [case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+          esac
+         ])
+      ])
     case "$gl_cv_func_unsetenv_works" in
       *yes) ;;
       *)
diff --git a/m4/setlocale.m4 b/m4/setlocale.m4
deleted file mode 100644 (file)
index e0fb74a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# setlocale.m4 serial 5
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_SETLOCALE],
-[
-  AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  case "$host_os" in
-    dnl On native Windows systems, setlocale(category,NULL) does not look at
-    dnl the environment variables LC_ALL, category, and LANG.
-    mingw*) REPLACE_SETLOCALE=1 ;;
-    dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
-    dnl is then still "C".
-    cygwin*)
-      case `uname -r` in
-        1.5.*) REPLACE_SETLOCALE=1 ;;
-      esac
-      ;;
-  esac
-])
-
-# Prerequisites of lib/setlocale.c.
-AC_DEFUN([gl_PREREQ_SETLOCALE],
-[
-  dnl No need to check for CFLocaleCopyPreferredLanguages and
-  dnl CFPreferencesCopyAppValue because lib/setlocale.c is not used on Mac OS X.
-  dnl (The Mac OS X specific code is only used in libintl.)
-  :
-])
diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4
new file mode 100644 (file)
index 0000000..2c958ed
--- /dev/null
@@ -0,0 +1,98 @@
+# setlocale_null.m4 serial 5
+dnl Copyright (C) 2019-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([gl_PTHREADLIB])
+  AC_CHECK_HEADERS_ONCE([threads.h])
+
+  AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
+    [gl_cv_func_setlocale_null_all_mtsafe],
+    [case "$host_os" in
+       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
+       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+         gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
+       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
+     esac
+    ])
+  dnl On platforms without multithreading, there is no issue.
+  case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_all_mtsafe" in
+    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
+  esac
+  AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ALL_MTSAFE], [$SETLOCALE_NULL_ALL_MTSAFE],
+    [Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe.])
+
+  dnl This is about a single category (not LC_ALL).
+  AC_CACHE_CHECK([whether setlocale (category, NULL) is multithread-safe],
+    [gl_cv_func_setlocale_null_one_mtsafe],
+    [case "$host_os" in
+       # Guess no on OpenBSD, AIX.
+       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*)
+         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
+     esac
+    ])
+  dnl On platforms without multithreading, there is no issue.
+  case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_one_mtsafe" in
+    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
+  esac
+  AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ONE_MTSAFE], [$SETLOCALE_NULL_ONE_MTSAFE],
+    [Define to 1 if setlocale (category, NULL) is multithread-safe.])
+
+  dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
+  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    case "$host_os" in
+      mingw*) LIB_SETLOCALE_NULL= ;;
+      *)
+        gl_WEAK_SYMBOLS
+        case "$gl_cv_have_weak" in
+          *yes) LIB_SETLOCALE_NULL= ;;
+          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+        esac
+        ;;
+    esac
+  else
+    LIB_SETLOCALE_NULL=
+  fi
+  dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
+  dnl with gcc or xlc, and empty otherwise.
+  AC_SUBST([LIB_SETLOCALE_NULL])
+])
+
+# Prerequisites of lib/setlocale-lock.c.
+AC_DEFUN([gl_PREREQ_SETLOCALE_LOCK],
+[
+  gl_VISIBILITY
+])
index f6918fa..a8c1d15 100644 (file)
@@ -1,5 +1,5 @@
 # sigaction.m4 serial 7
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/sigaltstack.m4 b/m4/sigaltstack.m4
new file mode 100644 (file)
index 0000000..6dbd677
--- /dev/null
@@ -0,0 +1,197 @@
+# sigaltstack.m4 serial 15
+dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Written by Bruno Haible and Eric Blake.
+
+AC_DEFUN([SV_SIGALTSTACK],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  AC_CHECK_FUNCS_ONCE([sigaltstack setrlimit])
+
+  if test "$ac_cv_func_sigaltstack" = yes; then
+    AC_CHECK_TYPE([stack_t], ,
+      [AC_DEFINE(stack_t, [struct sigaltstack],
+         [Define to 'struct sigaltstack' if that's the type of the argument to sigaltstack])
+      ],
+      [
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
+      ])
+  fi
+
+  AC_CACHE_CHECK([for working sigaltstack], [sv_cv_sigaltstack], [
+    if test "$ac_cv_func_sigaltstack" = yes; then
+      case "$host_os" in
+        macos* | darwin[[6-9]]* | darwin[[1-9]][[0-9]]*)
+          # On MacOS X 10.2 or newer, just assume that if it compiles, it will
+          # work. If we were to perform the real test, 1 Crash Report dialog
+          # window would pop up.
+          AC_LINK_IFELSE([
+            AC_LANG_PROGRAM([[#include <signal.h>]],
+              [[int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);]])],
+            [sv_cv_sigaltstack="guessing yes"],
+            [sv_cv_sigaltstack=no])
+          ;;
+        *)
+          AC_RUN_IFELSE([
+            AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
+#if HAVE_SETRLIMIT
+# include <sys/types.h>
+# include <sys/time.h>
+# include <sys/resource.h>
+#endif
+void stackoverflow_handler (int sig)
+{
+  /* If we get here, the stack overflow was caught.  */
+  exit (0);
+}
+volatile int * recurse_1 (volatile int n, volatile int *p)
+{
+  if (n >= 0)
+    *recurse_1 (n + 1, p) += n;
+  return p;
+}
+int recurse (volatile int n)
+{
+  int sum = 0;
+  return *recurse_1 (n, &sum);
+}
+char mystack[2 * (1 << 24)];
+int main ()
+{
+  stack_t altstack;
+  struct sigaction action;
+#if defined HAVE_SETRLIMIT && defined RLIMIT_STACK
+  /* Before starting the endless recursion, try to be friendly to the user's
+     machine.  On some Linux 2.2.x systems, there is no stack limit for user
+     processes at all.  We don't want to kill such systems.  */
+  struct rlimit rl;
+  rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
+  setrlimit (RLIMIT_STACK, &rl);
+#endif
+  /* Install the alternate stack.  Use the midpoint of mystack, to guard
+     against a buggy interpretation of ss_sp on IRIX.  */
+#ifdef SIGSTKSZ
+  if (sizeof mystack / 2 < SIGSTKSZ)
+    exit (3);
+#endif
+  altstack.ss_sp = mystack + sizeof mystack / 2;
+  altstack.ss_size = sizeof mystack / 2;
+  altstack.ss_flags = 0; /* no SS_DISABLE */
+  if (sigaltstack (&altstack, NULL) < 0)
+    exit (1);
+  /* Install the SIGSEGV handler.  */
+  sigemptyset (&action.sa_mask);
+  action.sa_handler = &stackoverflow_handler;
+  action.sa_flags = SA_ONSTACK;
+  sigaction (SIGSEGV, &action, (struct sigaction *) NULL);
+  sigaction (SIGBUS, &action, (struct sigaction *) NULL);
+  /* Provoke a stack overflow.  */
+  recurse (0);
+  exit (2);
+}]])],
+            [sv_cv_sigaltstack=yes],
+            [sv_cv_sigaltstack=no],
+            [
+              dnl FIXME: Put in some more known values here.
+              case "$host_os" in
+                *)
+                  AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include <signal.h>]],
+                      [[int x = SA_ONSTACK; stack_t ss; sigaltstack ((stack_t*)0, &ss);]])],
+                    [sv_cv_sigaltstack="guessing yes"],
+                    [sv_cv_sigaltstack=no])
+                  ;;
+              esac
+            ])
+          ;;
+      esac
+    else
+      sv_cv_sigaltstack=no
+    fi
+  ])
+  if test "$sv_cv_sigaltstack" != no; then
+    AC_DEFINE([HAVE_WORKING_SIGALTSTACK], [1],
+      [Define if you have the sigaltstack() function and it works.])
+
+    dnl The ss_sp field of a stack_t is, according to POSIX, the lowest address
+    dnl of the memory block designated as an alternate stack. But IRIX 5.3
+    dnl interprets it as the highest address!
+    AC_CACHE_CHECK([for correct stack_t interpretation],
+      [sv_cv_sigaltstack_low_base], [
+      AC_RUN_IFELSE([
+        AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <signal.h>
+#if HAVE_SYS_SIGNAL_H
+# include <sys/signal.h>
+#endif
+volatile char *stack_lower_bound;
+volatile char *stack_upper_bound;
+static void check_stack_location (volatile char *addr)
+{
+  if (addr >= stack_lower_bound && addr <= stack_upper_bound)
+    exit (0);
+  else
+    exit (1);
+}
+static void stackoverflow_handler (int sig)
+{
+  char dummy;
+  check_stack_location (&dummy);
+}
+char mystack[2 * (1 << 24)];
+int main ()
+{
+  stack_t altstack;
+  struct sigaction action;
+  /* Install the alternate stack.  */
+  altstack.ss_sp = mystack + sizeof mystack / 2;
+  altstack.ss_size = sizeof mystack / 2;
+  stack_lower_bound = (char *) altstack.ss_sp;
+  stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
+  altstack.ss_flags = 0; /* no SS_DISABLE */
+  if (sigaltstack (&altstack, NULL) < 0)
+    exit (2);
+  /* Install the SIGSEGV handler.  */
+  sigemptyset (&action.sa_mask);
+  action.sa_handler = &stackoverflow_handler;
+  action.sa_flags = SA_ONSTACK;
+  if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
+    exit(3);
+  /* Provoke a SIGSEGV.  */
+  raise (SIGSEGV);
+  exit (3);
+}]])],
+      [sv_cv_sigaltstack_low_base=yes],
+      [sv_cv_sigaltstack_low_base=no],
+      [
+        dnl FIXME: Put in some more known values here.
+        case "$host_os" in
+          irix5*) sv_cv_sigaltstack_low_base="no" ;;
+          *)      sv_cv_sigaltstack_low_base="guessing yes" ;;
+        esac
+      ])
+    ])
+    if test "$sv_cv_sigaltstack_low_base" = no; then
+      AC_DEFINE([SIGALTSTACK_SS_REVERSED], [1],
+        [Define if sigaltstack() interprets the stack_t.ss_sp field incorrectly,
+         as the highest address of the alternate stack range rather than as the
+         lowest address.])
+    fi
+  fi
+])
index 394b91d..8b93880 100644 (file)
@@ -1,10 +1,10 @@
-# signal_h.m4 serial 18
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# signal_h.m4 serial 22
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_SIGNAL_H],
+AC_DEFUN_ONCE([gl_SIGNAL_H],
 [
   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
@@ -34,6 +34,8 @@ AC_DEFUN([gl_SIGNAL_H],
     ]], [pthread_sigmask sigaction
     sigaddset sigdelset sigemptyset sigfillset sigismember
     sigpending sigprocmask])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
@@ -50,22 +52,37 @@ AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
   fi
 ])
 
+# gl_SIGNAL_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SIGNAL_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
 [
-  GNULIB_PTHREAD_SIGMASK=0;    AC_SUBST([GNULIB_PTHREAD_SIGMASK])
-  GNULIB_RAISE=0;              AC_SUBST([GNULIB_RAISE])
-  GNULIB_SIGNAL_H_SIGPIPE=0;   AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
-  GNULIB_SIGPROCMASK=0;        AC_SUBST([GNULIB_SIGPROCMASK])
-  GNULIB_SIGACTION=0;          AC_SUBST([GNULIB_SIGACTION])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
   HAVE_PTHREAD_SIGMASK=1;      AC_SUBST([HAVE_PTHREAD_SIGMASK])
index 4350b21..bfd76b7 100644 (file)
@@ -1,5 +1,5 @@
-# signalblocking.m4 serial 14
-dnl Copyright (C) 2001-2002, 2006-2018 Free Software Foundation, Inc.
+# signalblocking.m4 serial 17
+dnl Copyright (C) 2001-2002, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,11 +13,9 @@ AC_DEFUN([gl_SIGNALBLOCKING],
 [
   AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
   AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
-  if test $gl_cv_type_sigset_t = yes; then
-    AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
-  fi
-  if test -z "$gl_cv_func_sigprocmask"; then
-    HAVE_POSIX_SIGNALBLOCKING=0
+  HAVE_POSIX_SIGNALBLOCKING=0
+  if test "$gl_cv_type_sigset_t" = yes; then
+    AC_CHECK_FUNC([sigprocmask], [HAVE_POSIX_SIGNALBLOCKING=1])
   fi
 ])
 
index 3e3986e..1d41ce9 100644 (file)
@@ -1,5 +1,5 @@
-# size_max.m4 serial 11
-dnl Copyright (C) 2003, 2005-2006, 2008-2018 Free Software Foundation, Inc.
+# size_max.m4 serial 12
+dnl Copyright (C) 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_SIZE_MAX],
   AC_CHECK_HEADERS([stdint.h])
   dnl First test whether the system already has SIZE_MAX.
   AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
-    gl_cv_size_max=
+    gl_cv_size_max=no
     AC_EGREP_CPP([Found it], [
 #include <limits.h>
 #if HAVE_STDINT_H
@@ -23,7 +23,7 @@ AC_DEFUN([gl_SIZE_MAX],
 Found it
 #endif
 ], [gl_cv_size_max=yes])
-    if test -z "$gl_cv_size_max"; then
+    if test $gl_cv_size_max != yes; then
       dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
       dnl than the type 'unsigned long'. Try hard to find a definition that can
       dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
index 7ddaffa..49a2dcb 100644 (file)
@@ -1,5 +1,5 @@
-# sleep.m4 serial 9
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# sleep.m4 serial 11
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -48,10 +48,12 @@ handle_alarm (int sig)
       [case "$host_os" in
                         # Guess yes on glibc systems.
          *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+                        # Guess yes on musl systems.
+         *-musl*)       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, assume the worst.
-         *)             gl_cv_func_sleep_works="guessing no" ;;
+                        # If we don't know, obey --enable-cross-guesses.
+         *)             gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
        esac
       ])])
     case "$gl_cv_func_sleep_works" in
index decc8e5..8520994 100644 (file)
@@ -1,5 +1,5 @@
 # snprintf.m4 serial 7
-dnl Copyright (C) 2002-2004, 2007-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index a725d3c..0f8a082 100644 (file)
@@ -1,5 +1,5 @@
-# socketlib.m4 serial 2
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# socketlib.m4 serial 3
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,21 +14,27 @@ AC_DEFUN([gl_SOCKETLIB],
   LIBSOCKET=
   if test $HAVE_WINSOCK2_H = 1; then
     dnl Native Windows API (not Cygwin).
-    AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32],
-                   [gl_cv_func_wsastartup], [
-      gl_save_LIBS="$LIBS"
-      LIBS="$LIBS -lws2_32"
-      AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+    dnl If the function WSAStartup exists (declared in <winsock2.h> and
+    dnl defined through -lws2_32), we need to call it.
+    AC_CACHE_CHECK([for WSAStartup],
+      [gl_cv_func_wsastartup], [
+       gl_save_LIBS="$LIBS"
+       LIBS="$LIBS -lws2_32"
+       AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM([[
 #ifdef HAVE_WINSOCK2_H
 # include <winsock2.h>
 #endif]], [[
-          WORD wVersionRequested = MAKEWORD(1, 1);
-          WSADATA wsaData;
-          int err = WSAStartup(wVersionRequested, &wsaData);
-          WSACleanup ();]])],
-        gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no)
-      LIBS="$gl_save_LIBS"
-    ])
+            WORD wVersionRequested = MAKEWORD(1, 1);
+            WSADATA wsaData;
+            int err = WSAStartup(wVersionRequested, &wsaData);
+            WSACleanup ();
+            ]])
+         ],
+         [gl_cv_func_wsastartup=yes],
+         [gl_cv_func_wsastartup=no])
+       LIBS="$gl_save_LIBS"
+      ])
     if test "$gl_cv_func_wsastartup" = "yes"; then
       AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
       LIBSOCKET='-lws2_32'
index d941dad..02b43b6 100644 (file)
@@ -1,5 +1,5 @@
 # sockets.m4 serial 7
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index fa79b07..eca1d1b 100644 (file)
@@ -1,5 +1,5 @@
 # socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index cc47b8b..17e14c7 100644 (file)
@@ -1,5 +1,5 @@
-# sockpfaf.m4 serial 9
-dnl Copyright (C) 2004, 2006, 2009-2018 Free Software Foundation, Inc.
+# sockpfaf.m4 serial 10
+dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@ dnl From Bruno Haible.
 
 AC_DEFUN([gl_SOCKET_FAMILIES],
 [
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   AC_CHECK_HEADERS_ONCE([netinet/in.h])
 
   AC_CACHE_CHECK([for IPv4 sockets],
@@ -60,7 +60,7 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
 
 AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
 [
-  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+  AC_REQUIRE([gl_SYS_SOCKET_H])
   AC_CHECK_HEADERS_ONCE([sys/un.h])
 
   AC_CACHE_CHECK([for UNIX domain sockets],
index 0977f20..f0ed509 100644 (file)
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
new file mode 100644 (file)
index 0000000..9328725
--- /dev/null
@@ -0,0 +1,105 @@
+# stack-direction.m4 serial 7
+dnl Copyright (C) 2002-2021 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Written by Bruno Haible.
+
+# Determine the stack direction. Define the C macro STACK_DIRECTION.
+AC_DEFUN([SV_STACK_DIRECTION],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([for stack direction], [sv_cv_stack_direction_msg], [
+    case "$host_cpu" in
+      dnl See the #define STACK_GROWS_DOWNWARD in gcc-3.1/gcc/config/*/*.h.
+      a29k | \
+      aarch64* | \
+      alpha* | \
+      arc | \
+      arm* | strongarm* | xscale* | \
+      avr | avr32 | \
+      bfin | \
+      c1 | c2 | c32 | c34 | c38 | \
+      clipper | \
+      cris | \
+      d30v | \
+      elxsi | \
+      fr30 | \
+      h8300 | \
+      i?86 | x86_64 | \
+      i860 | \
+      ia64 | \
+      m32r | \
+      m68* | \
+      m88k | \
+      mcore | \
+      microblaze | \
+      mips* | \
+      mmix | \
+      mn10200 | \
+      mn10300 | \
+      nios2 | \
+      nds32* | \
+      ns32k | \
+      pdp11 | \
+      pj* | \
+      powerpc* | rs6000 | \
+      riscv* | \
+      romp | \
+      s390* | \
+      sh* | \
+      sparc* | \
+      v850 | \
+      vax | \
+      xtensa)
+        sv_cv_stack_direction=-1 ;;
+      c4x | \
+      dsp16xx | \
+      i960 | \
+      hppa* | parisc* | \
+      stormy16 | \
+      we32k)
+        sv_cv_stack_direction=1 ;;
+      *)
+        if test $cross_compiling = no; then
+          cat > conftest.c <<EOF
+#include <stdio.h>
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+int
+main (int argc, char *argv[])
+{
+  printf ("%d\n", find_stack_direction (NULL, argc + 20));
+  return 0;
+}
+EOF
+          AC_TRY_EVAL([ac_link])
+          sv_cv_stack_direction=`./conftest`
+        else
+          sv_cv_stack_direction=0
+        fi
+        ;;
+    esac
+    case $sv_cv_stack_direction in
+      1)  sv_cv_stack_direction_msg="grows up";;
+      -1) sv_cv_stack_direction_msg="grows down";;
+      *)  sv_cv_stack_direction_msg="unknown";;
+    esac
+  ])
+  AC_DEFINE_UNQUOTED([STACK_DIRECTION], [$sv_cv_stack_direction],
+    [Define as the direction of stack growth for your system.
+     STACK_DIRECTION > 0 => grows toward higher addresses
+     STACK_DIRECTION < 0 => grows toward lower addresses
+     STACK_DIRECTION = 0 => spaghetti stack.])
+])
index d0d17ed..df1c2a7 100644 (file)
@@ -1,6 +1,6 @@
 # Checks for stat-related time functions.
 
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2018 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2021 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
index e8ec3b2..9bcdb72 100644 (file)
@@ -1,6 +1,6 @@
-# serial 15
+# serial 18
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -47,8 +47,8 @@ AC_DEFUN([gl_FUNC_STAT],
               linux-* | linux) 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, assume the worst.
-              *)               gl_cv_func_stat_file_slash="guessing no" ;;
+                               # If we don't know, obey --enable-cross-guesses.
+              *)               gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
             esac
            ])
          rm -f conftest.tmp conftest.lnk])
@@ -69,6 +69,17 @@ AC_DEFUN([gl_FUNC_STAT],
 
 # Prerequisites of lib/stat.c and lib/stat-w32.c.
 AC_DEFUN([gl_PREREQ_STAT], [
-  AC_REQUIRE([gl_HEADER_SYS_STAT_H])
+  AC_REQUIRE([gl_SYS_STAT_H])
+  AC_REQUIRE([gl_PREREQ_STAT_W32])
   :
 ])
+
+# Prerequisites of lib/stat-w32.c.
+AC_DEFUN([gl_PREREQ_STAT_W32], [
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_CHECK_HEADERS([sdkddkver.h])
+      ;;
+  esac
+])
index c74fe9b..e22d7f7 100644 (file)
@@ -1,6 +1,6 @@
 # Check for stdalign.h that conforms to C11.
 
-dnl Copyright 2011-2018 Free Software Foundation, Inc.
+dnl Copyright 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,8 @@ AC_DEFUN([gl_STDALIGN_H],
     [gl_cv_header_working_stdalign_h],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[#include <stdalign.h>
+          [[#include <stdint.h>
+            #include <stdalign.h>
             #include <stddef.h>
 
             /* Test that alignof yields a result consistent with offsetof.
@@ -32,6 +33,7 @@ AC_DEFUN([gl_STDALIGN_H],
             /* 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__) \
index f89d38b..0b5fb63 100644 (file)
@@ -1,5 +1,5 @@
 # stdarg.m4 serial 7
-dnl Copyright (C) 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index f8c0577..3169779 100644 (file)
@@ -1,22 +1,36 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-#serial 7
+#serial 8
 
 # Prepare for substituting <stdbool.h> if it is not supported.
 
 AC_DEFUN([AM_STDBOOL_H],
 [
   AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
+  AC_REQUIRE([AC_CANONICAL_HOST])
 
-  # Define two additional variables used in the Makefile substitution.
-
+  dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
+  dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
+  dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
+  dnl replacement, also in C mode (for binary compatibility between C and C++).
   if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
+    case "$host_os" in
+      solaris*)
+        if test -z "$GCC"; then
+          STDBOOL_H='stdbool.h'
+        else
+          STDBOOL_H=''
+        fi
+        ;;
+      *)
+        STDBOOL_H=''
+        ;;
+    esac
   else
     STDBOOL_H='stdbool.h'
   fi
index 07b040a..1303d2e 100644 (file)
@@ -1,14 +1,19 @@
-dnl A placeholder for <stddef.h>, for platforms that have issues.
-# stddef_h.m4 serial 6
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# stddef_h.m4 serial 11
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_STDDEF_H],
+dnl A placeholder for <stddef.h>, for platforms that have issues.
+
+AC_DEFUN_ONCE([gl_STDDEF_H],
 [
   AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
+
+  dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
   STDDEF_H=
 
   dnl Test whether the type max_align_t exists and whether its alignment
@@ -19,10 +24,17 @@ AC_DEFUN([gl_STDDEF_H],
        [AC_LANG_PROGRAM(
           [[#include <stddef.h>
             unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __IBM__ALIGNOF__
+            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
             int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
             int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
             #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
           ]])],
        [gl_cv_type_max_align_t=yes],
        [gl_cv_type_max_align_t=no])
@@ -56,13 +68,28 @@ AC_DEFUN([gl_STDDEF_H],
   fi
 ])
 
+# gl_STDDEF_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_STDDEF_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS], [
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_STDDEF_H_DEFAULTS],
 [
   dnl Assume proper GNU behavior unless another module says otherwise.
index 81d065f..2eb1652 100644 (file)
@@ -1,5 +1,5 @@
-# stdint.m4 serial 53
-dnl Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# stdint.m4 serial 60
+dnl Copyright (C) 2001-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -17,21 +17,12 @@ AC_DEFUN_ONCE([gl_STDINT_H],
   AC_REQUIRE([gl_LIMITS_H])
   AC_REQUIRE([gt_TYPE_WINT_T])
 
-  dnl Check for long long int and unsigned long long int.
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
-  if test $ac_cv_type_long_long_int = yes; then
-    HAVE_LONG_LONG_INT=1
-  else
-    HAVE_LONG_LONG_INT=0
-  fi
-  AC_SUBST([HAVE_LONG_LONG_INT])
-  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    HAVE_UNSIGNED_LONG_LONG_INT=1
-  else
-    HAVE_UNSIGNED_LONG_LONG_INT=0
-  fi
-  AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+  dnl For backward compatibility. Some packages may still be testing these
+  dnl macros.
+  AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+    [Define to 1 if the system has the type 'long long int'.])
+  AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+    [Define to 1 if the system has the type 'unsigned long long int'.])
 
   dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
   AC_CHECK_HEADERS_ONCE([wchar.h])
@@ -43,7 +34,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
   AC_SUBST([HAVE_WCHAR_H])
 
   dnl Check for <inttypes.h>.
-  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+  AC_CHECK_HEADERS_ONCE([inttypes.h])
   if test $ac_cv_header_inttypes_h = yes; then
     HAVE_INTTYPES_H=1
   else
@@ -52,7 +43,7 @@ AC_DEFUN_ONCE([gl_STDINT_H],
   AC_SUBST([HAVE_INTTYPES_H])
 
   dnl Check for <sys/types.h>.
-  dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+  AC_CHECK_HEADERS_ONCE([sys/types.h])
   if test $ac_cv_header_sys_types_h = yes; then
     HAVE_SYS_TYPES_H=1
   else
@@ -161,7 +152,7 @@ uintmax_t j = UINTMAX_MAX;
 /* Check that SIZE_MAX has the correct type, if possible.  */
 #if 201112 <= __STDC_VERSION__
 int k = _Generic (SIZE_MAX, size_t: 0);
-#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
        || (0x5110 <= __SUNPRO_C && !__STDC__))
 extern size_t k;
 extern __typeof__ (SIZE_MAX) k;
@@ -179,7 +170,7 @@ struct s {
       PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
       && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
       ? 1 : -1;
-  /* Detect bug in FreeBSD 6.0 / ia64.  */
+  /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
   int check_SIG_ATOMIC:
       SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
       && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
@@ -311,9 +302,10 @@ static const char *macro_values[] =
       HAVE_C99_STDINT_H=1
       dnl Now see whether the system <stdint.h> works without
       dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
-      AC_CACHE_CHECK([whether stdint.h predates C++11],
-        [gl_cv_header_stdint_predates_cxx11_h],
-        [gl_cv_header_stdint_predates_cxx11_h=yes
+      dnl If not, there would be problems when stdint.h is included from C++.
+      AC_CACHE_CHECK([whether stdint.h works without ISO C predefines],
+        [gl_cv_header_stdint_without_STDC_macros],
+        [gl_cv_header_stdint_without_STDC_macros=no
          AC_COMPILE_IFELSE([
            AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
@@ -324,13 +316,14 @@ gl_STDINT_INCLUDES
 intmax_t im = INTMAX_MAX;
 int32_t i32 = INT32_C (0x7fffffff);
            ]])],
-           [gl_cv_header_stdint_predates_cxx11_h=no])])
+           [gl_cv_header_stdint_without_STDC_macros=yes])
+        ])
 
-      if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+      if test $gl_cv_header_stdint_without_STDC_macros = no; then
         AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
-                  [Define to 1 if the system <stdint.h> predates C++11.])
+          [Define to 1 if the system <stdint.h> predates C++11.])
         AC_DEFINE([__STDC_LIMIT_MACROS], [1],
-                  [Define to 1 if the system <stdint.h> predates C++11.])
+          [Define to 1 if the system <stdint.h> predates C++11.])
       fi
       AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
         [gl_cv_header_stdint_width],
@@ -500,13 +493,9 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
 dnl gl_STDINT_INCLUDES
 AC_DEFUN([gl_STDINT_INCLUDES],
 [[
-  /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-     included before <wchar.h>.  */
   #include <stddef.h>
   #include <signal.h>
   #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
   # include <wchar.h>
   #endif
 ]])
@@ -538,7 +527,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
   dnl requirement that wint_t is "unchanged by default argument promotions".
   dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
   dnl Set the variable BITSIZEOF_WINT_T accordingly.
-  if test $GNULIB_OVERRIDES_WINT_T = 1; then
+  if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
     BITSIZEOF_WINT_T=32
   fi
 ])
index 2d2a33c..18aa50a 100644 (file)
@@ -1,5 +1,5 @@
 # stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 0debe69..e704383 100644 (file)
@@ -1,11 +1,12 @@
-# stdio_h.m4 serial 49
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# stdio_h.m4 serial 56
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_STDIO_H],
+AC_DEFUN_ONCE([gl_STDIO_H],
 [
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   AH_VERBATIM([MINGW_ANSI_STDIO],
 [/* Use GNU style printf and scanf.  */
 #ifndef __USE_MINGW_ANSI_STDIO
@@ -13,7 +14,6 @@ AC_DEFUN([gl_STDIO_H],
 #endif
 ])
   AC_DEFINE([__USE_MINGW_ANSI_STDIO])
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
   gl_NEXT_HEADERS([stdio.h])
 
   dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
@@ -40,17 +40,6 @@ AC_DEFUN([gl_STDIO_H],
        attribute "__gnu_printf__" instead of "__printf__"])
   fi
 
-  dnl No need to create extra modules for these functions. Everyone who uses
-  dnl <stdio.h> likely needs them.
-  GNULIB_FSCANF=1
-  gl_MODULE_INDICATOR([fscanf])
-  GNULIB_SCANF=1
-  gl_MODULE_INDICATOR([scanf])
-  GNULIB_FGETC=1
-  GNULIB_GETC=1
-  GNULIB_GETCHAR=1
-  GNULIB_FGETS=1
-  GNULIB_FREAD=1
   dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
   dnl "expected source file, required through AC_LIBSOURCES, not found". It is
   dnl also an optimization, to avoid performing a configure check whose result
@@ -64,18 +53,6 @@ AC_DEFUN([gl_STDIO_H],
     fi
   ])
 
-  dnl No need to create extra modules for these functions. Everyone who uses
-  dnl <stdio.h> likely needs them.
-  GNULIB_FPRINTF=1
-  GNULIB_PRINTF=1
-  GNULIB_VFPRINTF=1
-  GNULIB_VPRINTF=1
-  GNULIB_FPUTC=1
-  GNULIB_PUTC=1
-  GNULIB_PUTCHAR=1
-  GNULIB_FPUTS=1
-  GNULIB_PUTS=1
-  GNULIB_FWRITE=1
   dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c"
   dnl "expected source file, required through AC_LIBSOURCES, not found". It is
   dnl also an optimization, to avoid performing a configure check whose result
@@ -107,73 +84,103 @@ AC_DEFUN([gl_STDIO_H],
   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
     ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
     renameat snprintf tmpfile vdprintf vsnprintf])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([fcloseall])
+  if test $ac_cv_have_decl_fcloseall = no; then
+    HAVE_DECL_FCLOSEALL=0
+  fi
 ])
 
+# gl_STDIO_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_STDIO_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREAD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREOPEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSCANF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEKO])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTCHAR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMOVE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FILENO], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETW], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTW], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TEMPNAM], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_STDIO_H_DEFAULTS],
 [
-  GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
-  GNULIB_FCLOSE=0;               AC_SUBST([GNULIB_FCLOSE])
-  GNULIB_FDOPEN=0;               AC_SUBST([GNULIB_FDOPEN])
-  GNULIB_FFLUSH=0;               AC_SUBST([GNULIB_FFLUSH])
-  GNULIB_FGETC=0;                AC_SUBST([GNULIB_FGETC])
-  GNULIB_FGETS=0;                AC_SUBST([GNULIB_FGETS])
-  GNULIB_FOPEN=0;                AC_SUBST([GNULIB_FOPEN])
-  GNULIB_FPRINTF=0;              AC_SUBST([GNULIB_FPRINTF])
-  GNULIB_FPRINTF_POSIX=0;        AC_SUBST([GNULIB_FPRINTF_POSIX])
-  GNULIB_FPURGE=0;               AC_SUBST([GNULIB_FPURGE])
-  GNULIB_FPUTC=0;                AC_SUBST([GNULIB_FPUTC])
-  GNULIB_FPUTS=0;                AC_SUBST([GNULIB_FPUTS])
-  GNULIB_FREAD=0;                AC_SUBST([GNULIB_FREAD])
-  GNULIB_FREOPEN=0;              AC_SUBST([GNULIB_FREOPEN])
-  GNULIB_FSCANF=0;               AC_SUBST([GNULIB_FSCANF])
-  GNULIB_FSEEK=0;                AC_SUBST([GNULIB_FSEEK])
-  GNULIB_FSEEKO=0;               AC_SUBST([GNULIB_FSEEKO])
-  GNULIB_FTELL=0;                AC_SUBST([GNULIB_FTELL])
-  GNULIB_FTELLO=0;               AC_SUBST([GNULIB_FTELLO])
-  GNULIB_FWRITE=0;               AC_SUBST([GNULIB_FWRITE])
-  GNULIB_GETC=0;                 AC_SUBST([GNULIB_GETC])
-  GNULIB_GETCHAR=0;              AC_SUBST([GNULIB_GETCHAR])
-  GNULIB_GETDELIM=0;             AC_SUBST([GNULIB_GETDELIM])
-  GNULIB_GETLINE=0;              AC_SUBST([GNULIB_GETLINE])
-  GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
-  GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
-  GNULIB_PCLOSE=0;               AC_SUBST([GNULIB_PCLOSE])
-  GNULIB_PERROR=0;               AC_SUBST([GNULIB_PERROR])
-  GNULIB_POPEN=0;                AC_SUBST([GNULIB_POPEN])
-  GNULIB_PRINTF=0;               AC_SUBST([GNULIB_PRINTF])
-  GNULIB_PRINTF_POSIX=0;         AC_SUBST([GNULIB_PRINTF_POSIX])
-  GNULIB_PUTC=0;                 AC_SUBST([GNULIB_PUTC])
-  GNULIB_PUTCHAR=0;              AC_SUBST([GNULIB_PUTCHAR])
-  GNULIB_PUTS=0;                 AC_SUBST([GNULIB_PUTS])
-  GNULIB_REMOVE=0;               AC_SUBST([GNULIB_REMOVE])
-  GNULIB_RENAME=0;               AC_SUBST([GNULIB_RENAME])
-  GNULIB_RENAMEAT=0;             AC_SUBST([GNULIB_RENAMEAT])
-  GNULIB_SCANF=0;                AC_SUBST([GNULIB_SCANF])
-  GNULIB_SNPRINTF=0;             AC_SUBST([GNULIB_SNPRINTF])
-  GNULIB_SPRINTF_POSIX=0;        AC_SUBST([GNULIB_SPRINTF_POSIX])
-  GNULIB_STDIO_H_NONBLOCKING=0;  AC_SUBST([GNULIB_STDIO_H_NONBLOCKING])
-  GNULIB_STDIO_H_SIGPIPE=0;      AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
-  GNULIB_TMPFILE=0;              AC_SUBST([GNULIB_TMPFILE])
-  GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
-  GNULIB_VFSCANF=0;              AC_SUBST([GNULIB_VFSCANF])
-  GNULIB_VSCANF=0;               AC_SUBST([GNULIB_VSCANF])
-  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
-  GNULIB_VFPRINTF=0;             AC_SUBST([GNULIB_VFPRINTF])
-  GNULIB_VFPRINTF_POSIX=0;       AC_SUBST([GNULIB_VFPRINTF_POSIX])
-  GNULIB_VPRINTF=0;              AC_SUBST([GNULIB_VPRINTF])
-  GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
-  GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
-  GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
   dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_FCLOSEALL=1;         AC_SUBST([HAVE_DECL_FCLOSEALL])
   HAVE_DECL_FPURGE=1;            AC_SUBST([HAVE_DECL_FPURGE])
   HAVE_DECL_FSEEKO=1;            AC_SUBST([HAVE_DECL_FSEEKO])
   HAVE_DECL_FTELLO=1;            AC_SUBST([HAVE_DECL_FTELLO])
index 49dc5d5..9c1d1c7 100644 (file)
@@ -1,10 +1,10 @@
-# stdlib_h.m4 serial 45
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 63
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_STDLIB_H],
+AC_DEFUN_ONCE([gl_STDLIB_H],
 [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   gl_NEXT_HEADERS([stdlib.h])
@@ -22,71 +22,122 @@ AC_DEFUN([gl_STDLIB_H],
 #if HAVE_RANDOM_H
 # include <random.h>
 #endif
-    ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
-    initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
-    posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray
-    realpath rpmatch secure_getenv setenv setstate setstate_r srandom
-    srandom_r strtod strtoll strtoull unlockpt unsetenv])
+    ]], [_Exit aligned_alloc atoll canonicalize_file_name free
+    getloadavg getsubopt grantpt
+    initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps
+    posix_memalign posix_openpt ptsname ptsname_r qsort_r
+    random random_r reallocarray realpath rpmatch secure_getenv setenv
+    setstate setstate_r srandom srandom_r
+    strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([ecvt])
+  if test $ac_cv_have_decl_ecvt = no; then
+    HAVE_DECL_ECVT=0
+  fi
+  AC_CHECK_DECLS_ONCE([fcvt])
+  if test $ac_cv_have_decl_fcvt = no; then
+    HAVE_DECL_FCVT=0
+  fi
+  AC_CHECK_DECLS_ONCE([gcvt])
+  if test $ac_cv_have_decl_gcvt = no; then
+    HAVE_DECL_GCVT=0
+  fi
 ])
 
+# gl_STDLIB_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_STDLIB_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMPS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMPS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_MEMALIGN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_OPENPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOULL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYSTEM_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLOCKPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNSETENV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOMB])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ECVT], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCVT], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GCVT], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKTEMP], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTENV], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
 [
-  GNULIB__EXIT=0;         AC_SUBST([GNULIB__EXIT])
-  GNULIB_ATOLL=0;         AC_SUBST([GNULIB_ATOLL])
-  GNULIB_CALLOC_POSIX=0;  AC_SUBST([GNULIB_CALLOC_POSIX])
-  GNULIB_CANONICALIZE_FILE_NAME=0;  AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
-  GNULIB_GETLOADAVG=0;    AC_SUBST([GNULIB_GETLOADAVG])
-  GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
-  GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
-  GNULIB_MALLOC_POSIX=0;  AC_SUBST([GNULIB_MALLOC_POSIX])
-  GNULIB_MBTOWC=0;        AC_SUBST([GNULIB_MBTOWC])
-  GNULIB_MKDTEMP=0;       AC_SUBST([GNULIB_MKDTEMP])
-  GNULIB_MKOSTEMP=0;      AC_SUBST([GNULIB_MKOSTEMP])
-  GNULIB_MKOSTEMPS=0;     AC_SUBST([GNULIB_MKOSTEMPS])
-  GNULIB_MKSTEMP=0;       AC_SUBST([GNULIB_MKSTEMP])
-  GNULIB_MKSTEMPS=0;      AC_SUBST([GNULIB_MKSTEMPS])
-  GNULIB_POSIX_OPENPT=0;  AC_SUBST([GNULIB_POSIX_OPENPT])
-  GNULIB_PTSNAME=0;       AC_SUBST([GNULIB_PTSNAME])
-  GNULIB_PTSNAME_R=0;     AC_SUBST([GNULIB_PTSNAME_R])
-  GNULIB_PUTENV=0;        AC_SUBST([GNULIB_PUTENV])
-  GNULIB_QSORT_R=0;       AC_SUBST([GNULIB_QSORT_R])
-  GNULIB_RANDOM=0;        AC_SUBST([GNULIB_RANDOM])
-  GNULIB_RANDOM_R=0;      AC_SUBST([GNULIB_RANDOM_R])
-  GNULIB_REALLOCARRAY=0;  AC_SUBST([GNULIB_REALLOCARRAY])
-  GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
-  GNULIB_REALPATH=0;      AC_SUBST([GNULIB_REALPATH])
-  GNULIB_RPMATCH=0;       AC_SUBST([GNULIB_RPMATCH])
-  GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV])
-  GNULIB_SETENV=0;        AC_SUBST([GNULIB_SETENV])
-  GNULIB_STRTOD=0;        AC_SUBST([GNULIB_STRTOD])
-  GNULIB_STRTOLL=0;       AC_SUBST([GNULIB_STRTOLL])
-  GNULIB_STRTOULL=0;      AC_SUBST([GNULIB_STRTOULL])
-  GNULIB_SYSTEM_POSIX=0;  AC_SUBST([GNULIB_SYSTEM_POSIX])
-  GNULIB_UNLOCKPT=0;      AC_SUBST([GNULIB_UNLOCKPT])
-  GNULIB_UNSETENV=0;      AC_SUBST([GNULIB_UNSETENV])
-  GNULIB_WCTOMB=0;        AC_SUBST([GNULIB_WCTOMB])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE__EXIT=1;              AC_SUBST([HAVE__EXIT])
+  HAVE_ALIGNED_ALLOC=1;      AC_SUBST([HAVE_ALIGNED_ALLOC])
   HAVE_ATOLL=1;              AC_SUBST([HAVE_ATOLL])
   HAVE_CANONICALIZE_FILE_NAME=1;  AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+  HAVE_DECL_ECVT=1;          AC_SUBST([HAVE_DECL_ECVT])
+  HAVE_DECL_FCVT=1;          AC_SUBST([HAVE_DECL_FCVT])
+  HAVE_DECL_GCVT=1;          AC_SUBST([HAVE_DECL_GCVT])
   HAVE_DECL_GETLOADAVG=1;    AC_SUBST([HAVE_DECL_GETLOADAVG])
   HAVE_GETSUBOPT=1;          AC_SUBST([HAVE_GETSUBOPT])
   HAVE_GRANTPT=1;            AC_SUBST([HAVE_GRANTPT])
+  HAVE_INITSTATE=1;          AC_SUBST([HAVE_INITSTATE])
   HAVE_DECL_INITSTATE=1;     AC_SUBST([HAVE_DECL_INITSTATE])
+  HAVE_MBTOWC=1;             AC_SUBST([HAVE_MBTOWC])
   HAVE_MKDTEMP=1;            AC_SUBST([HAVE_MKDTEMP])
   HAVE_MKOSTEMP=1;           AC_SUBST([HAVE_MKOSTEMP])
   HAVE_MKOSTEMPS=1;          AC_SUBST([HAVE_MKOSTEMPS])
   HAVE_MKSTEMP=1;            AC_SUBST([HAVE_MKSTEMP])
   HAVE_MKSTEMPS=1;           AC_SUBST([HAVE_MKSTEMPS])
+  HAVE_POSIX_MEMALIGN=1;     AC_SUBST([HAVE_POSIX_MEMALIGN])
   HAVE_POSIX_OPENPT=1;       AC_SUBST([HAVE_POSIX_OPENPT])
   HAVE_PTSNAME=1;            AC_SUBST([HAVE_PTSNAME])
   HAVE_PTSNAME_R=1;          AC_SUBST([HAVE_PTSNAME_R])
@@ -100,28 +151,44 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   HAVE_SECURE_GETENV=1;      AC_SUBST([HAVE_SECURE_GETENV])
   HAVE_SETENV=1;             AC_SUBST([HAVE_SETENV])
   HAVE_DECL_SETENV=1;        AC_SUBST([HAVE_DECL_SETENV])
+  HAVE_SETSTATE=1;           AC_SUBST([HAVE_SETSTATE])
   HAVE_DECL_SETSTATE=1;      AC_SUBST([HAVE_DECL_SETSTATE])
   HAVE_STRTOD=1;             AC_SUBST([HAVE_STRTOD])
+  HAVE_STRTOL=1;             AC_SUBST([HAVE_STRTOL])
+  HAVE_STRTOLD=1;            AC_SUBST([HAVE_STRTOLD])
   HAVE_STRTOLL=1;            AC_SUBST([HAVE_STRTOLL])
+  HAVE_STRTOUL=1;            AC_SUBST([HAVE_STRTOUL])
   HAVE_STRTOULL=1;           AC_SUBST([HAVE_STRTOULL])
   HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
   HAVE_SYS_LOADAVG_H=0;      AC_SUBST([HAVE_SYS_LOADAVG_H])
   HAVE_UNLOCKPT=1;           AC_SUBST([HAVE_UNLOCKPT])
   HAVE_DECL_UNSETENV=1;      AC_SUBST([HAVE_DECL_UNSETENV])
+  REPLACE_ALIGNED_ALLOC=0;   AC_SUBST([REPLACE_ALIGNED_ALLOC])
   REPLACE_CALLOC=0;          AC_SUBST([REPLACE_CALLOC])
   REPLACE_CANONICALIZE_FILE_NAME=0;  AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+  REPLACE_FREE=0;            AC_SUBST([REPLACE_FREE])
+  REPLACE_INITSTATE=0;       AC_SUBST([REPLACE_INITSTATE])
   REPLACE_MALLOC=0;          AC_SUBST([REPLACE_MALLOC])
   REPLACE_MBTOWC=0;          AC_SUBST([REPLACE_MBTOWC])
   REPLACE_MKSTEMP=0;         AC_SUBST([REPLACE_MKSTEMP])
+  REPLACE_POSIX_MEMALIGN=0;  AC_SUBST([REPLACE_POSIX_MEMALIGN])
   REPLACE_PTSNAME=0;         AC_SUBST([REPLACE_PTSNAME])
   REPLACE_PTSNAME_R=0;       AC_SUBST([REPLACE_PTSNAME_R])
   REPLACE_PUTENV=0;          AC_SUBST([REPLACE_PUTENV])
   REPLACE_QSORT_R=0;         AC_SUBST([REPLACE_QSORT_R])
+  REPLACE_RANDOM=0;          AC_SUBST([REPLACE_RANDOM])
   REPLACE_RANDOM_R=0;        AC_SUBST([REPLACE_RANDOM_R])
   REPLACE_REALLOC=0;         AC_SUBST([REPLACE_REALLOC])
+  REPLACE_REALLOCARRAY=0;    AC_SUBST([REPLACE_REALLOCARRAY])
   REPLACE_REALPATH=0;        AC_SUBST([REPLACE_REALPATH])
   REPLACE_SETENV=0;          AC_SUBST([REPLACE_SETENV])
+  REPLACE_SETSTATE=0;        AC_SUBST([REPLACE_SETSTATE])
   REPLACE_STRTOD=0;          AC_SUBST([REPLACE_STRTOD])
+  REPLACE_STRTOL=0;          AC_SUBST([REPLACE_STRTOL])
+  REPLACE_STRTOLD=0;         AC_SUBST([REPLACE_STRTOLD])
+  REPLACE_STRTOLL=0;         AC_SUBST([REPLACE_STRTOLL])
+  REPLACE_STRTOUL=0;         AC_SUBST([REPLACE_STRTOUL])
+  REPLACE_STRTOULL=0;        AC_SUBST([REPLACE_STRTOULL])
   REPLACE_UNSETENV=0;        AC_SUBST([REPLACE_UNSETENV])
   REPLACE_WCTOMB=0;          AC_SUBST([REPLACE_WCTOMB])
 ])
index 3444fda..ea88283 100644 (file)
@@ -1,5 +1,5 @@
-# strcase.m4 serial 11
-dnl Copyright (C) 2002, 2005-2018 Free Software Foundation, Inc.
+# strcase.m4 serial 12
+dnl Copyright (C) 2002, 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ AC_DEFUN([gl_STRCASE],
 
 AC_DEFUN([gl_FUNC_STRCASECMP],
 [
-  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
   AC_CHECK_FUNCS([strcasecmp])
   if test $ac_cv_func_strcasecmp = no; then
     HAVE_STRCASECMP=0
@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_STRCASECMP],
 
 AC_DEFUN([gl_FUNC_STRNCASECMP],
 [
-  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
   AC_CHECK_FUNCS([strncasecmp])
   if test $ac_cv_func_strncasecmp = yes; then
     HAVE_STRNCASECMP=1
index b886b8d..438ba92 100644 (file)
@@ -1,12 +1,12 @@
-# strerror.m4 serial 19
-dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc.
+# strerror.m4 serial 22
+dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_STRERROR],
 [
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_ERRNO_H])
   AC_REQUIRE([gl_FUNC_STRERROR_0])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -26,8 +26,10 @@ AC_DEFUN([gl_FUNC_STRERROR],
         [case "$host_os" in
                           # Guess yes on glibc systems.
            *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
-                          # If we don't know, assume the worst.
-           *)             gl_cv_func_working_strerror="guessing no" ;;
+                          # 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" ;;
          esac
         ])
     ])
@@ -80,10 +82,12 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
       [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, assume the worst.
-         *)             gl_cv_func_strerror_0_works="guessing no" ;;
+                        # If we don't know, obey --enable-cross-guesses.
+         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
        esac
       ])
   ])
index a3e3a4c..0689e46 100644 (file)
@@ -1,12 +1,12 @@
-# strerror_r.m4 serial 19
-dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc.
+# strerror_r.m4 serial 21
+dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_STRERROR_R],
 [
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
 
   dnl Persuade Solaris <string.h> to declare strerror_r().
@@ -163,7 +163,7 @@ changequote([,])dnl
                [gl_cv_func_strerror_r_works=no],
                [dnl Guess no on all platforms that have __xpg_strerror_r,
                 dnl at least until fixed glibc and cygwin are more common.
-                gl_cv_func_strerror_r_works="guessing no"
+                gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
                ])
             ])
         fi
index 97c80dc..80d1e58 100644 (file)
@@ -1,25 +1,19 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 22
+# serial 32
 
 # Written by Paul Eggert.
 
-AC_DEFUN([gl_HEADER_STRING_H],
+AC_DEFUN_ONCE([gl_STRING_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_STRING_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_STRING_H_BODY],
-[
-  AC_REQUIRE([AC_C_RESTRICT])
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
   gl_NEXT_HEADERS([string.h])
 
   dnl Check for declarations of anything we want to poison if the
@@ -29,64 +23,86 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
     ]],
     [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
      strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
-     strerror_r strsignal strverscmp])
+     strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
+# gl_STRING_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_STRING_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_STRING_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
-AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPLICIT_BZERO])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSLL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSEP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSTR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASECMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNCASECMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPCASECMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASESTR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCSPN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPBRK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSIGNAL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRVERSCMP])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MEMCCPY], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_STRDUP], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_STRING_H_DEFAULTS],
 [
-  GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
-  GNULIB_FFSL=0;        AC_SUBST([GNULIB_FFSL])
-  GNULIB_FFSLL=0;       AC_SUBST([GNULIB_FFSLL])
-  GNULIB_MEMCHR=0;      AC_SUBST([GNULIB_MEMCHR])
-  GNULIB_MEMMEM=0;      AC_SUBST([GNULIB_MEMMEM])
-  GNULIB_MEMPCPY=0;     AC_SUBST([GNULIB_MEMPCPY])
-  GNULIB_MEMRCHR=0;     AC_SUBST([GNULIB_MEMRCHR])
-  GNULIB_RAWMEMCHR=0;   AC_SUBST([GNULIB_RAWMEMCHR])
-  GNULIB_STPCPY=0;      AC_SUBST([GNULIB_STPCPY])
-  GNULIB_STPNCPY=0;     AC_SUBST([GNULIB_STPNCPY])
-  GNULIB_STRCHRNUL=0;   AC_SUBST([GNULIB_STRCHRNUL])
-  GNULIB_STRDUP=0;      AC_SUBST([GNULIB_STRDUP])
-  GNULIB_STRNCAT=0;     AC_SUBST([GNULIB_STRNCAT])
-  GNULIB_STRNDUP=0;     AC_SUBST([GNULIB_STRNDUP])
-  GNULIB_STRNLEN=0;     AC_SUBST([GNULIB_STRNLEN])
-  GNULIB_STRPBRK=0;     AC_SUBST([GNULIB_STRPBRK])
-  GNULIB_STRSEP=0;      AC_SUBST([GNULIB_STRSEP])
-  GNULIB_STRSTR=0;      AC_SUBST([GNULIB_STRSTR])
-  GNULIB_STRCASESTR=0;  AC_SUBST([GNULIB_STRCASESTR])
-  GNULIB_STRTOK_R=0;    AC_SUBST([GNULIB_STRTOK_R])
-  GNULIB_MBSLEN=0;      AC_SUBST([GNULIB_MBSLEN])
-  GNULIB_MBSNLEN=0;     AC_SUBST([GNULIB_MBSNLEN])
-  GNULIB_MBSCHR=0;      AC_SUBST([GNULIB_MBSCHR])
-  GNULIB_MBSRCHR=0;     AC_SUBST([GNULIB_MBSRCHR])
-  GNULIB_MBSSTR=0;      AC_SUBST([GNULIB_MBSSTR])
-  GNULIB_MBSCASECMP=0;  AC_SUBST([GNULIB_MBSCASECMP])
-  GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
-  GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
-  GNULIB_MBSCASESTR=0;  AC_SUBST([GNULIB_MBSCASESTR])
-  GNULIB_MBSCSPN=0;     AC_SUBST([GNULIB_MBSCSPN])
-  GNULIB_MBSPBRK=0;     AC_SUBST([GNULIB_MBSPBRK])
-  GNULIB_MBSSPN=0;      AC_SUBST([GNULIB_MBSSPN])
-  GNULIB_MBSSEP=0;      AC_SUBST([GNULIB_MBSSEP])
-  GNULIB_MBSTOK_R=0;    AC_SUBST([GNULIB_MBSTOK_R])
-  GNULIB_STRERROR=0;    AC_SUBST([GNULIB_STRERROR])
-  GNULIB_STRERROR_R=0;  AC_SUBST([GNULIB_STRERROR_R])
-  GNULIB_STRSIGNAL=0;   AC_SUBST([GNULIB_STRSIGNAL])
-  GNULIB_STRVERSCMP=0;  AC_SUBST([GNULIB_STRVERSCMP])
-  HAVE_MBSLEN=0;        AC_SUBST([HAVE_MBSLEN])
+  HAVE_MBSLEN=0;             AC_SUBST([HAVE_MBSLEN])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_EXPLICIT_BZERO=1;        AC_SUBST([HAVE_EXPLICIT_BZERO])
   HAVE_FFSL=1;                  AC_SUBST([HAVE_FFSL])
   HAVE_FFSLL=1;                 AC_SUBST([HAVE_FFSLL])
-  HAVE_MEMCHR=1;                AC_SUBST([HAVE_MEMCHR])
   HAVE_DECL_MEMMEM=1;           AC_SUBST([HAVE_DECL_MEMMEM])
   HAVE_MEMPCPY=1;               AC_SUBST([HAVE_MEMPCPY])
   HAVE_DECL_MEMRCHR=1;          AC_SUBST([HAVE_DECL_MEMRCHR])
@@ -102,8 +118,12 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   HAVE_STRCASESTR=1;            AC_SUBST([HAVE_STRCASESTR])
   HAVE_DECL_STRTOK_R=1;         AC_SUBST([HAVE_DECL_STRTOK_R])
   HAVE_DECL_STRERROR_R=1;       AC_SUBST([HAVE_DECL_STRERROR_R])
+  HAVE_STRERRORNAME_NP=1;       AC_SUBST([HAVE_STRERRORNAME_NP])
+  HAVE_SIGABBREV_NP=1;          AC_SUBST([HAVE_SIGABBREV_NP])
+  HAVE_SIGDESCR_NP=1;           AC_SUBST([HAVE_SIGDESCR_NP])
   HAVE_DECL_STRSIGNAL=1;        AC_SUBST([HAVE_DECL_STRSIGNAL])
   HAVE_STRVERSCMP=1;            AC_SUBST([HAVE_STRVERSCMP])
+  REPLACE_FFSLL=0;              AC_SUBST([REPLACE_FFSLL])
   REPLACE_MEMCHR=0;             AC_SUBST([REPLACE_MEMCHR])
   REPLACE_MEMMEM=0;             AC_SUBST([REPLACE_MEMMEM])
   REPLACE_STPNCPY=0;            AC_SUBST([REPLACE_STPNCPY])
@@ -117,6 +137,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
   REPLACE_STRTOK_R=0;           AC_SUBST([REPLACE_STRTOK_R])
   REPLACE_STRERROR=0;           AC_SUBST([REPLACE_STRERROR])
   REPLACE_STRERROR_R=0;         AC_SUBST([REPLACE_STRERROR_R])
+  REPLACE_STRERRORNAME_NP=0;    AC_SUBST([REPLACE_STRERRORNAME_NP])
   REPLACE_STRSIGNAL=0;          AC_SUBST([REPLACE_STRSIGNAL])
   UNDEFINE_STRTOK_R=0;          AC_SUBST([UNDEFINE_STRTOK_R])
 ])
index 9dcb830..69de32a 100644 (file)
@@ -1,21 +1,16 @@
 # Configure a replacement for <strings.h>.
-# serial 6
+# serial 9
 
-# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_HEADER_STRINGS_H],
+AC_DEFUN_ONCE([gl_STRINGS_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_STRINGS_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
-[
-  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
+  AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
 
   gl_CHECK_NEXT_HEADERS([strings.h])
   if test $ac_cv_header_strings_h = yes; then
@@ -35,16 +30,31 @@ AC_DEFUN([gl_HEADER_STRINGS_H_BODY],
     ]], [ffs strcasecmp strncasecmp])
 ])
 
+# gl_STRINGS_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_STRINGS_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_STRINGS_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
 ])
 
-AC_DEFUN([gl_HEADER_STRINGS_H_DEFAULTS],
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_STRINGS_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFS])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_STRINGS_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_STRINGS_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_STRINGS_H_DEFAULTS],
 [
-  GNULIB_FFS=0;            AC_SUBST([GNULIB_FFS])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_FFS=1;              AC_SUBST([HAVE_FFS])
   HAVE_STRCASECMP=1;       AC_SUBST([HAVE_STRCASECMP])
diff --git a/m4/strndup.m4 b/m4/strndup.m4
deleted file mode 100644 (file)
index 07ac886..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-# strndup.m4 serial 22
-dnl Copyright (C) 2002-2003, 2005-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_STRNDUP],
-[
-  dnl Persuade glibc <string.h> to declare strndup().
-  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_CHECK_DECLS_ONCE([strndup])
-  AC_CHECK_FUNCS_ONCE([strndup])
-  if test $ac_cv_have_decl_strndup = no; then
-    HAVE_DECL_STRNDUP=0
-  fi
-
-  if test $ac_cv_func_strndup = yes; then
-    HAVE_STRNDUP=1
-    # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
-    AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
-      [AC_RUN_IFELSE([
-         AC_LANG_PROGRAM([[#include <string.h>
-                           #include <stdlib.h>]], [[
-#if !HAVE_DECL_STRNDUP
-  extern
-  #ifdef __cplusplus
-  "C"
-  #endif
-  char *strndup (const char *, size_t);
-#endif
-  int result;
-  char *s;
-  s = strndup ("some longer string", 15);
-  free (s);
-  s = strndup ("shorter string", 13);
-  result = s[13] != '\0';
-  free (s);
-  return result;]])],
-         [gl_cv_func_strndup_works=yes],
-         [gl_cv_func_strndup_works=no],
-         [
-changequote(,)dnl
-          case $host_os in
-            aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
-            *)               gl_cv_func_strndup_works="guessing yes";;
-          esac
-changequote([,])dnl
-         ])])
-    case $gl_cv_func_strndup_works in
-      *no) REPLACE_STRNDUP=1 ;;
-    esac
-  else
-    HAVE_STRNDUP=0
-  fi
-])
index 856747c..1d4f106 100644 (file)
@@ -1,5 +1,5 @@
-# strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation,
+# strnlen.m4 serial 14
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_STRNLEN],
 [
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_STRING_H_DEFAULTS])
 
   dnl Persuade glibc <string.h> to declare strnlen().
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
index 51668c8..982fec8 100644 (file)
@@ -1,12 +1,12 @@
-# strptime.m4 serial 7
-dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# strptime.m4 serial 8
+dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_STRPTIME],
 [
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_C_RESTRICT])
   AC_CHECK_FUNCS_ONCE([strptime])
   if test $ac_cv_func_strptime != yes; then
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
new file mode 100644 (file)
index 0000000..d767d57
--- /dev/null
@@ -0,0 +1,88 @@
+# strtoimax.m4 serial 16
+dnl Copyright (C) 2002-2004, 2006, 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOIMAX],
+[
+  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+
+  dnl On OSF/1 5.1 with cc, this function is declared but not defined.
+  AC_CHECK_FUNCS_ONCE([strtoimax])
+  AC_CHECK_DECLS_ONCE([strtoimax])
+  if test "$ac_cv_have_decl_strtoimax" != yes; then
+    HAVE_DECL_STRTOIMAX=0
+  fi
+
+  if test "$ac_cv_func_strtoimax" = yes; then
+    HAVE_STRTOIMAX=1
+    dnl On AIX 5.1, strtoimax() fails for values outside the 'int' range.
+    AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+    AC_CACHE_CHECK([whether strtoimax works], [gl_cv_func_strtoimax],
+      [AC_RUN_IFELSE(
+         [AC_LANG_SOURCE([[
+#include <errno.h>
+#include <string.h>
+#include <inttypes.h>
+int main ()
+{
+  if (sizeof (intmax_t) > sizeof (int))
+    {
+      const char *s = "4294967295";
+      char *p;
+      intmax_t res;
+      errno = 0;
+      res = strtoimax (s, &p, 10);
+      if (p != s + strlen (s))
+        return 1;
+      if (errno != 0)
+        return 2;
+      if (res != (intmax_t) 65535 * (intmax_t) 65537)
+        return 3;
+    }
+  else
+    {
+      const char *s = "2147483647";
+      char *p;
+      intmax_t res;
+      errno = 0;
+      res = strtoimax (s, &p, 10);
+      if (p != s + strlen (s))
+        return 1;
+      if (errno != 0)
+        return 2;
+      if (res != 2147483647)
+        return 3;
+    }
+  return 0;
+}
+]])],
+         [gl_cv_func_strtoimax=yes],
+         [gl_cv_func_strtoimax=no],
+         [case "$host_os" in
+                    # Guess no on AIX 5.
+            aix5*)  gl_cv_func_strtoimax="guessing no" ;;
+                    # Guess yes on native Windows.
+            mingw*) gl_cv_func_strtoimax="guessing yes" ;;
+                    # Guess yes otherwise.
+            *)      gl_cv_func_strtoimax="guessing yes" ;;
+          esac
+         ])
+      ])
+    case "$gl_cv_func_strtoimax" in
+      *no) REPLACE_STRTOIMAX=1 ;;
+    esac
+  else
+    if test "$ac_cv_have_decl_strtoimax" = yes; then
+      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
+      REPLACE_STRTOIMAX=1
+    fi
+    HAVE_STRTOIMAX=0
+  fi
+])
+
+# Prerequisites of lib/strtoimax.c.
+AC_DEFUN([gl_PREREQ_STRTOIMAX], [
+  AC_CHECK_DECLS([strtoll])
+])
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
new file mode 100644 (file)
index 0000000..14455dc
--- /dev/null
@@ -0,0 +1,51 @@
+# strtoll.m4 serial 9
+dnl Copyright (C) 2002, 2004, 2006, 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOLL],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CHECK_FUNCS([strtoll])
+  if test $ac_cv_func_strtoll = yes; then
+    AC_CACHE_CHECK([whether strtoll works],
+      [gl_cv_func_strtoll_works],
+      [AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <stdlib.h>]],
+            [[int result = 0;
+              char *term;
+              /* This test fails on Minix and native Windows.  */
+              {
+                const char input[] = "0x";
+                (void) strtoll (input, &term, 16);
+                if (term != input + 1)
+                  result |= 1;
+              }
+              return result;
+            ]])
+         ],
+         [gl_cv_func_strtoll_works=yes],
+         [gl_cv_func_strtoll_works=no],
+         [case "$host_os" in
+                    # Guess no on native Windows.
+            mingw*) gl_cv_func_strtoll_works="guessing no" ;;
+            *)      gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
+          esac
+         ])
+    ])
+    case "$gl_cv_func_strtoll_works" in
+      *yes) ;;
+      *)    REPLACE_STRTOLL=1 ;;
+    esac
+  else
+    HAVE_STRTOLL=0
+  fi
+])
+
+# Prerequisites of lib/strtoll.c.
+AC_DEFUN([gl_PREREQ_STRTOLL], [
+  :
+])
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
deleted file mode 100644 (file)
index e740799..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# strtoull.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2008-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_STRTOULL],
-[
-  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
-  dnl We don't need (and can't compile) the replacement strtoull
-  dnl unless the type 'unsigned long long int' exists.
-  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-  if test "$ac_cv_type_unsigned_long_long_int" = yes; then
-    AC_CHECK_FUNCS([strtoull])
-    if test $ac_cv_func_strtoull = no; then
-      HAVE_STRTOULL=0
-    fi
-  fi
-])
-
-# Prerequisites of lib/strtoull.c.
-AC_DEFUN([gl_PREREQ_STRTOULL], [
-  :
-])
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
deleted file mode 100644 (file)
index e876564..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# strtoumax.m4 serial 12
-dnl Copyright (C) 2002-2004, 2006, 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_STRTOUMAX],
-[
-  AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
-
-  dnl On OSF/1 5.1 with cc, this function is declared but not defined.
-  AC_CHECK_FUNCS_ONCE([strtoumax])
-  AC_CHECK_DECLS_ONCE([strtoumax])
-  if test "$ac_cv_have_decl_strtoumax" = yes; then
-    if test "$ac_cv_func_strtoumax" != yes; then
-      # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
-      REPLACE_STRTOUMAX=1
-    fi
-  else
-    HAVE_DECL_STRTOUMAX=0
-  fi
-])
-
-# Prerequisites of lib/strtoumax.c.
-AC_DEFUN([gl_PREREQ_STRTOUMAX], [
-  AC_CHECK_DECLS([strtoull])
-  AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-])
index afaa941..209dece 100644 (file)
@@ -1,7 +1,7 @@
-# serial 8
+# serial 9
 # See if we need to provide symlink replacement.
 
-dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -40,8 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
             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, assume the worst.
-            *)               gl_cv_func_symlink_works="guessing no" ;;
+                             # If we don't know, obey --enable-cross-guesses.
+            *)               gl_cv_func_symlink_works="$gl_cross_guess_normal" ;;
           esac
          ])
       rm -f conftest.f conftest.link conftest.lnk2])
index 1ef67c0..cd00410 100644 (file)
@@ -1,15 +1,15 @@
-# sys_ioctl_h.m4 serial 10
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# sys_ioctl_h.m4 serial 15
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Bruno Haible.
 
-AC_DEFUN([gl_SYS_IOCTL_H],
+AC_DEFUN_ONCE([gl_SYS_IOCTL_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
   AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
 
   AC_CHECK_HEADERS_ONCE([sys/ioctl.h])
@@ -22,8 +22,8 @@ AC_DEFUN([gl_SYS_IOCTL_H],
       [dnl We cannot use AC_CHECK_DECL because it produces its own messages.
        AC_COMPILE_IFELSE(
          [AC_LANG_PROGRAM(
-            [AC_INCLUDES_DEFAULT([#include <sys/ioctl.h>])],
-            [(void) ioctl;])],
+            [[#include <sys/ioctl.h>]],
+            [[(void) ioctl;]])],
          [gl_cv_decl_ioctl_in_sys_ioctl_h=yes],
          [gl_cv_decl_ioctl_in_sys_ioctl_h=no])
       ])
@@ -44,18 +44,33 @@ AC_DEFUN([gl_SYS_IOCTL_H],
     ]], [ioctl])
 ])
 
+# gl_SYS_IOCTL_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_IOCTL_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_IOCTL_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_IOCTL_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_IOCTL_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IOCTL])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_IOCTL_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_IOCTL_H_DEFAULTS],
 [
-  GNULIB_IOCTL=0;         AC_SUBST([GNULIB_IOCTL])
   dnl Assume proper GNU behavior unless another module says otherwise.
   SYS_IOCTL_H_HAVE_WINSOCK2_H=0; AC_SUBST([SYS_IOCTL_H_HAVE_WINSOCK2_H])
   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4
new file mode 100644 (file)
index 0000000..37bc316
--- /dev/null
@@ -0,0 +1,68 @@
+# sys_random_h.m4 serial 8
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_SYS_RANDOM_H],
+[
+  AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+  dnl <sys/random.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([sys/random.h])
+  if test $ac_cv_header_sys_random_h = yes; then
+    HAVE_SYS_RANDOM_H=1
+  else
+    HAVE_SYS_RANDOM_H=0
+  fi
+  AC_SUBST([HAVE_SYS_RANDOM_H])
+
+  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+  if test $ac_cv_header_sys_random_h = yes; then
+    UNISTD_H_HAVE_SYS_RANDOM_H=1
+  fi
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_RANDOM_H
+/* Additional includes are needed before <sys/random.h> on uClibc
+   and Mac OS X.  */
+# include <sys/types.h>
+# include <stdlib.h>
+# include <sys/random.h>
+#endif
+    ]],
+    [getrandom])
+])
+
+# gl_SYS_RANDOM_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_SYS_RANDOM_MODULE_INDICATOR],
+[
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_RANDOM_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETRANDOM])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_SYS_RANDOM_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_GETRANDOM=1;       AC_SUBST([HAVE_GETRANDOM])
+  REPLACE_GETRANDOM=0;    AC_SUBST([REPLACE_GETRANDOM])
+])
index 8e9eff4..2e7d140 100644 (file)
@@ -1,13 +1,13 @@
-# sys_select_h.m4 serial 20
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# sys_select_h.m4 serial 23
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_HEADER_SYS_SELECT],
+AC_DEFUN_ONCE([gl_SYS_SELECT_H],
 [
-  AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS])
+  AC_REQUIRE([AC_C_RESTRICT])
   AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
     [gl_cv_header_sys_select_h_selfcontained],
     [
@@ -75,19 +75,34 @@ AC_DEFUN([gl_HEADER_SYS_SELECT],
     ]], [pselect select])
 ])
 
+# gl_SYS_SELECT_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_SELECT_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_SELECT_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PSELECT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SELECT])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS],
 [
-  GNULIB_PSELECT=0; AC_SUBST([GNULIB_PSELECT])
-  GNULIB_SELECT=0; AC_SUBST([GNULIB_SELECT])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_PSELECT=1; AC_SUBST([HAVE_PSELECT])
   REPLACE_PSELECT=0; AC_SUBST([REPLACE_PSELECT])
index f210378..5676a0d 100644 (file)
@@ -1,12 +1,12 @@
-# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2018 Free Software Foundation, Inc.
+# sys_socket_h.m4 serial 28
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Simon Josefsson.
 
-AC_DEFUN([gl_HEADER_SYS_SOCKET],
+AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
 [
   AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
@@ -95,6 +95,8 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
 #include <sys/socket.h>
     ]], [socket connect accept bind getpeername getsockname getsockopt
     listen recv send recvfrom sendto setsockopt shutdown accept4])
+
+  AC_REQUIRE([AC_C_RESTRICT])
 ])
 
 AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
@@ -104,17 +106,11 @@ AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
   gl_CHECK_NEXT_HEADERS([sys/socket.h])
   if test $ac_cv_header_sys_socket_h = yes; then
     HAVE_SYS_SOCKET_H=1
-    HAVE_WS2TCPIP_H=0
   else
     HAVE_SYS_SOCKET_H=0
-    if test $ac_cv_header_ws2tcpip_h = yes; then
-      HAVE_WS2TCPIP_H=1
-    else
-      HAVE_WS2TCPIP_H=0
-    fi
   fi
   AC_SUBST([HAVE_SYS_SOCKET_H])
-  AC_SUBST([HAVE_WS2TCPIP_H])
+  gl_PREREQ_SYS_H_WS2TCPIP
 ])
 
 # Common prerequisites of the <sys/socket.h> replacement and of the
@@ -142,32 +138,65 @@ AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
   AC_SUBST([HAVE_WINSOCK2_H])
 ])
 
+# Common prerequisites of the <sys/socket.h> replacement and of the
+# <arpa/inet.h> replacement.
+# Sets and substitutes HAVE_WS2TCPIP_H.
+AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP],
+[
+  AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_WS2TCPIP_H=0
+  else
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+  AC_SUBST([HAVE_WS2TCPIP_H])
+])
+
+# gl_SYS_SOCKET_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_SOCKET_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SOCKET])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CONNECT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BIND])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPEERNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKOPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LISTEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SEND])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECVFROM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SENDTO])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETSOCKOPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SHUTDOWN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT4])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
 [
-  GNULIB_SOCKET=0;      AC_SUBST([GNULIB_SOCKET])
-  GNULIB_CONNECT=0;     AC_SUBST([GNULIB_CONNECT])
-  GNULIB_ACCEPT=0;      AC_SUBST([GNULIB_ACCEPT])
-  GNULIB_BIND=0;        AC_SUBST([GNULIB_BIND])
-  GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
-  GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
-  GNULIB_GETSOCKOPT=0;  AC_SUBST([GNULIB_GETSOCKOPT])
-  GNULIB_LISTEN=0;      AC_SUBST([GNULIB_LISTEN])
-  GNULIB_RECV=0;        AC_SUBST([GNULIB_RECV])
-  GNULIB_SEND=0;        AC_SUBST([GNULIB_SEND])
-  GNULIB_RECVFROM=0;    AC_SUBST([GNULIB_RECVFROM])
-  GNULIB_SENDTO=0;      AC_SUBST([GNULIB_SENDTO])
-  GNULIB_SETSOCKOPT=0;  AC_SUBST([GNULIB_SETSOCKOPT])
-  GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
-  GNULIB_ACCEPT4=0;     AC_SUBST([GNULIB_ACCEPT4])
   HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
                         AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
index 52f06aa..ac91d42 100644 (file)
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 31   -*- Autoconf -*-
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 41   -*- Autoconf -*-
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
 dnl From Eric Blake.
 dnl Provide a GNU-like <sys/stat.h>.
 
-AC_DEFUN([gl_HEADER_SYS_STAT_H],
+AC_DEFUN_ONCE([gl_SYS_STAT_H],
 [
   AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
 
@@ -46,40 +46,64 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
-    ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
-    mknod mknodat stat utimensat])
-]) # gl_HEADER_SYS_STAT_H
+    ]], [fchmodat fstat fstatat futimens getumask lchmod lstat
+    mkdirat mkfifo mkfifoat mknod mknodat stat utimensat])
 
+  AC_REQUIRE([AC_C_RESTRICT])
+])
+
+# gl_SYS_STAT_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_STAT_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FUTIMENS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUMASK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHMOD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSTAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIRAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFO])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFOAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNOD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNODAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UTIMENSAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHMOD], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKDIR], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UMASK], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
 [
-  AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
-  GNULIB_FCHMODAT=0;    AC_SUBST([GNULIB_FCHMODAT])
-  GNULIB_FSTAT=0;       AC_SUBST([GNULIB_FSTAT])
-  GNULIB_FSTATAT=0;     AC_SUBST([GNULIB_FSTATAT])
-  GNULIB_FUTIMENS=0;    AC_SUBST([GNULIB_FUTIMENS])
-  GNULIB_LCHMOD=0;      AC_SUBST([GNULIB_LCHMOD])
-  GNULIB_LSTAT=0;       AC_SUBST([GNULIB_LSTAT])
-  GNULIB_MKDIRAT=0;     AC_SUBST([GNULIB_MKDIRAT])
-  GNULIB_MKFIFO=0;      AC_SUBST([GNULIB_MKFIFO])
-  GNULIB_MKFIFOAT=0;    AC_SUBST([GNULIB_MKFIFOAT])
-  GNULIB_MKNOD=0;       AC_SUBST([GNULIB_MKNOD])
-  GNULIB_MKNODAT=0;     AC_SUBST([GNULIB_MKNODAT])
-  GNULIB_STAT=0;        AC_SUBST([GNULIB_STAT])
-  GNULIB_UTIMENSAT=0;   AC_SUBST([GNULIB_UTIMENSAT])
-  GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_FCHMODAT=1;      AC_SUBST([HAVE_FCHMODAT])
   HAVE_FSTATAT=1;       AC_SUBST([HAVE_FSTATAT])
   HAVE_FUTIMENS=1;      AC_SUBST([HAVE_FUTIMENS])
+  HAVE_GETUMASK=1;      AC_SUBST([HAVE_GETUMASK])
   HAVE_LCHMOD=1;        AC_SUBST([HAVE_LCHMOD])
   HAVE_LSTAT=1;         AC_SUBST([HAVE_LSTAT])
   HAVE_MKDIRAT=1;       AC_SUBST([HAVE_MKDIRAT])
@@ -88,13 +112,16 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
   HAVE_MKNOD=1;         AC_SUBST([HAVE_MKNOD])
   HAVE_MKNODAT=1;       AC_SUBST([HAVE_MKNODAT])
   HAVE_UTIMENSAT=1;     AC_SUBST([HAVE_UTIMENSAT])
+  REPLACE_FCHMODAT=0;   AC_SUBST([REPLACE_FCHMODAT])
   REPLACE_FSTAT=0;      AC_SUBST([REPLACE_FSTAT])
   REPLACE_FSTATAT=0;    AC_SUBST([REPLACE_FSTATAT])
   REPLACE_FUTIMENS=0;   AC_SUBST([REPLACE_FUTIMENS])
   REPLACE_LSTAT=0;      AC_SUBST([REPLACE_LSTAT])
   REPLACE_MKDIR=0;      AC_SUBST([REPLACE_MKDIR])
   REPLACE_MKFIFO=0;     AC_SUBST([REPLACE_MKFIFO])
+  REPLACE_MKFIFOAT=0;   AC_SUBST([REPLACE_MKFIFOAT])
   REPLACE_MKNOD=0;      AC_SUBST([REPLACE_MKNOD])
+  REPLACE_MKNODAT=0;    AC_SUBST([REPLACE_MKNODAT])
   REPLACE_STAT=0;       AC_SUBST([REPLACE_STAT])
   REPLACE_UTIMENSAT=0;  AC_SUBST([REPLACE_UTIMENSAT])
 ])
index d7e9268..c425a96 100644 (file)
@@ -1,25 +1,20 @@
 # Configure a replacement for <sys/time.h>.
-# serial 9
+# serial 12
 
-# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
 # Written by Paul Eggert and Martin Lambers.
 
-AC_DEFUN([gl_HEADER_SYS_TIME_H],
+AC_DEFUN_ONCE([gl_SYS_TIME_H],
 [
   dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
   dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
   dnl statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
-])
-
-AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
-[
+  AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_C_RESTRICT])
-  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
   AC_CHECK_HEADERS_ONCE([sys/time.h])
   gl_CHECK_NEXT_HEADERS([sys/time.h])
 
@@ -89,18 +84,33 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
     ]], [gettimeofday])
 ])
 
+# gl_SYS_TIME_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_TIME_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
-AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_TIME_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETTIMEOFDAY])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_SYS_TIME_H_DEFAULTS],
 [
-  GNULIB_GETTIMEOFDAY=0;     AC_SUBST([GNULIB_GETTIMEOFDAY])
   dnl Assume POSIX behavior unless another module says otherwise.
   HAVE_GETTIMEOFDAY=1;       AC_SUBST([HAVE_GETTIMEOFDAY])
   HAVE_STRUCT_TIMEVAL=1;     AC_SUBST([HAVE_STRUCT_TIMEVAL])
index 2debfb0..6dd6fee 100644 (file)
@@ -1,15 +1,16 @@
-# sys_types_h.m4 serial 9
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 13
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN_ONCE([gl_SYS_TYPES_H],
 [
+  AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
+
   dnl Use sane struct stat types in OpenVMS 8.2 and later.
   AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
 
-  AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
   gl_NEXT_HEADERS([sys/types.h])
 
   dnl Ensure the type pid_t gets defined.
@@ -30,31 +31,40 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
   AC_SUBST([WINDOWS_STAT_INODES])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS], [
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
 [
 ])
 
 # This works around a buggy version in autoconf <= 2.69.
 # See <https://lists.gnu.org/r/autoconf/2016-08/msg00014.html>
+# The 2.70 version isn't quoted properly, so override it too.
 
-m4_version_prereq([2.70], [], [
-
-# This is taken from the following Autoconf patch:
-# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974
+m4_version_prereq([2.70.1], [], [
 
 m4_undefine([AC_HEADER_MAJOR])
 AC_DEFUN([AC_HEADER_MAJOR],
 [AC_CHECK_HEADERS_ONCE([sys/types.h])
 AC_CHECK_HEADER([sys/mkdev.h],
-  [AC_DEFINE([MAJOR_IN_MKDEV], [1],
-    [Define to 1 if `major', `minor', and `makedev' are declared in
-     <mkdev.h>.])])
+                [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+                           [Define to 1 if `major', `minor', and `makedev' are
+                            declared in <mkdev.h>.])])
 if test $ac_cv_header_sys_mkdev_h = no; then
   AC_CHECK_HEADER([sys/sysmacros.h],
-    [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
-      [Define to 1 if `major', `minor', and `makedev' are declared in
-       <sysmacros.h>.])])
+                  [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+                             [Define to 1 if `major', `minor', and `makedev'
+                              are declared in <sysmacros.h>.])])
 fi
-])
+])# AC_HEADER_MAJOR
 
 ])
index 2cd01e1..fa176e0 100644 (file)
@@ -1,10 +1,10 @@
-# sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# sys_uio_h.m4 serial 3
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_HEADER_SYS_UIO],
+AC_DEFUN_ONCE([gl_SYS_UIO_H],
 [
   AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
   dnl <sys/uio.h> is always overridden, because of GNULIB_POSIXCHECK.
@@ -17,15 +17,30 @@ AC_DEFUN([gl_HEADER_SYS_UIO],
   AC_SUBST([HAVE_SYS_UIO_H])
 ])
 
+# gl_SYS_UIO_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_UIO_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_UIO_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS], [
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_UIO_H_DEFAULTS],
 [
 ])
index 25b3815..d7c412a 100644 (file)
@@ -1,10 +1,10 @@
-# sys_wait_h.m4 serial 6
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# sys_wait_h.m4 serial 9
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_SYS_WAIT_H],
+AC_DEFUN_ONCE([gl_SYS_WAIT_H],
 [
   AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
 
@@ -20,17 +20,32 @@ AC_DEFUN([gl_SYS_WAIT_H],
     [waitpid])
 ])
 
+# gl_SYS_WAIT_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_SYS_WAIT_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SYS_WAIT_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_WAIT_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WAITPID])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_WAIT_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS],
 [
-  GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID])
   dnl Assume proper GNU behavior unless another module says otherwise.
 ])
index ed813f1..14c796d 100644 (file)
@@ -1,6 +1,6 @@
 #serial 5
 
-# Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/thread.m4 b/m4/thread.m4
new file mode 100644 (file)
index 0000000..8ec9cc3
--- /dev/null
@@ -0,0 +1,17 @@
+# thread.m4 serial 3
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_THREAD],
+[
+  AC_REQUIRE([gl_THREADLIB])
+
+  if test $gl_threads_api = posix; then
+    gl_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIBMULTITHREAD"
+    AC_CHECK_FUNCS([pthread_atfork])
+    LIBS="$gl_save_LIBS"
+  fi
+])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
new file mode 100644 (file)
index 0000000..37b797c
--- /dev/null
@@ -0,0 +1,654 @@
+# threadlib.m4 serial 31
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.60])
+
+dnl The general structure of the multithreading modules in gnulib is that we
+dnl have three set of modules:
+dnl
+dnl   * POSIX API:
+dnl     pthread, which combines
+dnl       pthread-h
+dnl       pthread-thread
+dnl       pthread-once
+dnl       pthread-mutex
+dnl       pthread-rwlock
+dnl       pthread-cond
+dnl       pthread-tss
+dnl       pthread-spin
+dnl     sched_yield
+dnl
+dnl   * ISO C API:
+dnl     threads, which combines
+dnl       threads-h
+dnl       thrd
+dnl       mtx
+dnl       cnd
+dnl       tss
+dnl
+dnl   * Gnulib API, with an implementation that can be chosen at configure
+dnl     time through the option --enable-threads=...
+dnl       thread
+dnl       lock
+dnl       cond
+dnl       tls
+dnl       yield
+dnl
+dnl They are independent, except for the fact that
+dnl   - the implementation of the ISO C API may use the POSIX (or some other
+dnl     platform dependent) API,
+dnl   - the implementation of the Gnulib API may use the POSIX or ISO C or
+dnl     some other platform dependent API, depending on the --enable-threads
+dnl     option.
+dnl
+dnl This file contains macros for all of these APIs!
+
+dnl ============================================================================
+dnl Macros for all thread APIs
+
+AC_DEFUN([gl_ANYTHREADLIB_EARLY],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  if test -z "$gl_anythreadlib_early_done"; then
+    case "$host_os" in
+      osf*)
+        # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+        # groks <pthread.h>. cc also understands the flag -pthread, but
+        # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+        # 2. putting a flag into CPPFLAGS that has an effect on the linker
+        # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+        # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+        CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+        ;;
+    esac
+    # Some systems optimize for single-threaded programs by default, and
+    # need special flags to disable these optimizations. For example, the
+    # definition of 'errno' in <errno.h>.
+    case "$host_os" in
+      aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+      solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+    esac
+    gl_anythreadlib_early_done=done
+  fi
+])
+
+dnl Checks whether the compiler and linker support weak declarations of symbols.
+
+AC_DEFUN([gl_WEAK_SYMBOLS],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([whether imported symbols can be declared weak],
+    [gl_cv_have_weak],
+    [gl_cv_have_weak=no
+     dnl First, test whether the compiler accepts it syntactically.
+     AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[extern void xyzzy ();
+#pragma weak xyzzy]],
+          [[xyzzy();]])],
+       [gl_cv_have_weak=maybe])
+     if test $gl_cv_have_weak = maybe; then
+       dnl Second, test whether it actually works. On Cygwin 1.7.2, with
+       dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
+       AC_RUN_IFELSE(
+         [AC_LANG_SOURCE([[
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}]])],
+         [gl_cv_have_weak=yes],
+         [gl_cv_have_weak=no],
+         [dnl When cross-compiling, assume that only ELF platforms support
+          dnl weak symbols.
+          AC_EGREP_CPP([Extensible Linking Format],
+            [#ifdef __ELF__
+             Extensible Linking Format
+             #endif
+            ],
+            [gl_cv_have_weak="guessing yes"],
+            [gl_cv_have_weak="guessing no"])
+         ])
+     fi
+     dnl But when linking statically, weak symbols don't work.
+     case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+     dnl Test for a bug in FreeBSD 11: A link error occurs when using a weak
+     dnl symbol and linking against a shared library that has a dependency on
+     dnl the shared library that defines the symbol.
+     case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&AS_MESSAGE_LOG_FD 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&AS_MESSAGE_LOG_FD 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
+    ])
+  case "$gl_cv_have_weak" in
+    *yes)
+      AC_DEFINE([HAVE_WEAK_SYMBOLS], [1],
+        [Define to 1 if the compiler and linker support weak declarations of symbols.])
+      ;;
+  esac
+])
+
+dnl ============================================================================
+dnl Macros for the POSIX API
+
+dnl gl_PTHREADLIB
+dnl -------------
+dnl Tests for the libraries needs for using the POSIX threads API.
+dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile.
+dnl Sets the variable LIBPMULTITHREAD, for programs that really need
+dnl multithread functionality. The difference between LIBPTHREAD and
+dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
+dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
+dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl sched_yield() function.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX
+dnl threads API is available.
+
+dnl The guts of gl_PTHREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_PTHREADLIB_BODY],
+[
+  AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    AC_CHECK_HEADER([pthread.h],
+      [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+             [[#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
+             ]],
+             [[pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);]])],
+          [gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread])
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:__oline__: gl_pthread_api=$gl_pthread_api" >&AS_MESSAGE_LOG_FD
+      echo "$as_me:__oline__: LIBPTHREAD=$LIBPTHREAD" >&AS_MESSAGE_LOG_FD
+
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          AC_EGREP_CPP([Lucky user],
+            [#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
+            ],
+            [gl_pthread_in_glibc=yes],
+            [])
+          ;;
+      esac
+      echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD
+
+      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+      # since it is defined as a macro on OSF/1.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        AC_CHECK_LIB([pthread], [pthread_kill],
+          [if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                   [Define if the pthread_in_use() detection is hard.])
+             esac
+           fi
+          ])
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        AC_CHECK_LIB([pthread], [pthread_kill],
+          [gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread])
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          AC_CHECK_LIB([c_r], [pthread_kill],
+            [gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r])
+        fi
+      fi
+      echo "$as_me:__oline__: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&AS_MESSAGE_LOG_FD
+    fi
+    AC_MSG_CHECKING([whether POSIX threads API is available])
+    AC_MSG_RESULT([$gl_pthread_api])
+    AC_SUBST([LIBPTHREAD])
+    AC_SUBST([LIBPMULTITHREAD])
+    if test $gl_pthread_api = yes; then
+      AC_DEFINE([HAVE_PTHREAD_API], [1],
+        [Define if you have the <pthread.h> header and the POSIX threads API.])
+    fi
+
+    dnl On some systems, sched_yield is in librt, rather than in libpthread.
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#include <sched.h>]],
+         [[sched_yield ();]])],
+      [LIB_SCHED_YIELD=
+      ],
+      [dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
+       AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+         [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+          AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+      ])
+    AC_SUBST([LIB_SCHED_YIELD])
+
+    gl_pthreadlib_body_done=done
+  fi
+])
+
+AC_DEFUN([gl_PTHREADLIB],
+[
+  AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+  gl_PTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the ISO C API
+
+dnl gl_STDTHREADLIB
+dnl ---------------
+dnl Tests for the libraries needs for using the ISO C threads API.
+dnl Sets the variable LIBSTDTHREAD to the linker options for use in a Makefile.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_THREADS_H if (at least parts of) the ISO C threads
+dnl API is available.
+
+dnl The guts of gl_STDTHREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_STDTHREADLIB_BODY],
+[
+  AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  if test -z "$gl_stdthreadlib_body_done"; then
+    AC_CHECK_HEADERS_ONCE([threads.h])
+
+    case "$host_os" in
+      mingw*)
+        LIBSTDTHREAD=
+        ;;
+      *)
+        gl_PTHREADLIB_BODY
+        if test $ac_cv_header_threads_h = yes; then
+          dnl glibc >= 2.29 has thrd_create in libpthread.
+          dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends
+          dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
+          dnl glibc >= 2.34, AIX >= 7.1, and Solaris >= 11.4 have thrd_create in
+          dnl libc.
+          AC_CHECK_FUNCS([thrd_create])
+          if test $ac_cv_func_thrd_create = yes; then
+            LIBSTDTHREAD=
+          else
+            AC_CHECK_LIB([stdthreads], [thrd_create], [
+              LIBSTDTHREAD='-lstdthreads -lpthread'
+            ], [
+              dnl Guess that thrd_create is in libpthread.
+              LIBSTDTHREAD="$LIBPMULTITHREAD"
+            ])
+          fi
+        else
+          dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
+          LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+        fi
+        ;;
+    esac
+    AC_SUBST([LIBSTDTHREAD])
+
+    AC_MSG_CHECKING([whether ISO C threads API is available])
+    AC_MSG_RESULT([$ac_cv_header_threads_h])
+    gl_stdthreadlib_body_done=done
+  fi
+])
+
+AC_DEFUN([gl_STDTHREADLIB],
+[
+  AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+  gl_STDTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the Gnulib API
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS,
+dnl USE_ISOC_AND_POSIX_THREADS, USE_WINDOWS_THREADS.
+dnl The choice --enable-threads=isoc+posix is available only on platforms that
+dnl have both the ISO C and the POSIX threads APIs. It has the effect of using
+dnl the ISO C API for most things and the POSIX API only for creating and
+dnl controlling threads (because there is no equivalent to pthread_atfork in
+dnl the ISO C API).
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the
+dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the
+dnl same value. Only system libraries are needed.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+  dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+  dnl influences the result of the autoconf tests that test for *_unlocked
+  dnl declarations, on AIX 5 at least. Therefore it must come early.
+  AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+  AC_BEFORE([$0], [gl_ARGP])dnl
+
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+  dnl Check for multithreading.
+  m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+    [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+  m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
+  AC_ARG_ENABLE([threads],
+AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
+    [gl_use_threads=$enableval],
+    [if test -n "$gl_use_threads_default"; then
+       gl_use_threads="$gl_use_threads_default"
+     else
+changequote(,)dnl
+       case "$host_os" in
+         dnl Disable multithreading by default on OSF/1, because it interferes
+         dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+         dnl child process gets an endless segmentation fault inside execvp().
+         osf*) gl_use_threads=no ;;
+         dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+         dnl bugs that lead to endless loops or crashes. See
+         dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+         cygwin*)
+               case `uname -r` in
+                 1.[0-5].*) gl_use_threads=no ;;
+                 *)         gl_use_threads=yes ;;
+               esac
+               ;;
+         dnl Obey gl_AVOID_WINPTHREAD on mingw.
+         mingw*)
+               case "$gl_use_winpthreads_default" in
+                 yes) gl_use_threads=posix ;;
+                 no)  gl_use_threads=windows ;;
+                 *)   gl_use_threads=yes ;;
+               esac
+               ;;
+         *)    gl_use_threads=yes ;;
+       esac
+changequote([,])dnl
+     fi
+    ])
+  if test "$gl_use_threads" = yes \
+     || test "$gl_use_threads" = isoc \
+     || test "$gl_use_threads" = posix \
+     || test "$gl_use_threads" = isoc+posix; then
+    # For using <threads.h> or <pthread.h>:
+    gl_ANYTHREADLIB_EARLY
+  fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
+    dnl Check whether the compiler and linker support weak declarations.
+    gl_WEAK_SYMBOLS
+    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+      dnl If we use weak symbols to implement pthread_in_use / pth_in_use /
+      dnl thread_in_use, we also need to test whether the ISO C 11 thrd_create
+      dnl facility is in use.
+      AC_CHECK_HEADERS_ONCE([threads.h])
+      :
+    fi
+    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
+      AC_CHECK_HEADERS_ONCE([threads.h])
+      gl_have_isoc_threads="$ac_cv_header_threads_h"
+    fi
+    if test "$gl_use_threads" = yes \
+       || test "$gl_use_threads" = posix \
+       || test "$gl_use_threads" = isoc+posix; then
+      gl_PTHREADLIB_BODY
+      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
+      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
+      if test $gl_pthread_api = yes; then
+        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
+          gl_threads_api='isoc+posix'
+          AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1],
+            [Define if the combination of the ISO C and POSIX multithreading APIs can be used.])
+          LIBTHREAD= LTLIBTHREAD=
+        else
+          gl_threads_api=posix
+          AC_DEFINE([USE_POSIX_THREADS], [1],
+            [Define if the POSIX multithreading library can be used.])
+          if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
+            AC_DEFINE([USE_POSIX_THREADS_FROM_LIBC], [1],
+              [Define if references to the POSIX multithreading library are satisfied by libc.])
+          else
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+                [Define if references to the POSIX multithreading library should be made weak.])
+              LIBTHREAD= LTLIBTHREAD=
+            else
+              case "$host_os" in
+                freebsd* | dragonfly* | midnightbsd*)
+                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
+                    dnl If weak symbols can't tell whether pthread_create(), pthread_key_create()
+                    dnl etc. will succeed, we need a runtime test.
+                    AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+                      [Define if the pthread_in_use() detection is hard.])
+                  fi
+                  ;;
+              esac
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
+        gl_STDTHREADLIB_BODY
+        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
+        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
+        gl_threads_api=isoc
+        AC_DEFINE([USE_ISOC_THREADS], [1],
+          [Define if the ISO C multithreading library can be used.])
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+            AC_DEFINE([USE_WINDOWS_THREADS], [1],
+              [Define if the native Windows multithreading API can be used.])
+          fi
+          ;;
+      esac
+    fi
+  fi
+  AC_MSG_CHECKING([for multithread API to use])
+  AC_MSG_RESULT([$gl_threads_api])
+  AC_SUBST([LIBTHREAD])
+  AC_SUBST([LTLIBTHREAD])
+  AC_SUBST([LIBMULTITHREAD])
+  AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+  AC_REQUIRE([gl_THREADLIB_EARLY])
+  AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+  m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl gl_AVOID_WINPTHREAD
+dnl -------------------
+dnl Sets the gl_THREADLIB default so that on mingw, a dependency to the
+dnl libwinpthread DLL (mingw-w64 winpthreads library) is avoided.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_AVOID_WINPTHREAD], [
+  m4_divert_text([INIT_PREPARE], [gl_use_winpthreads_default=no])
+])
+
+
+dnl ============================================================================
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform           Available  Compiler    Supports   test-lock
+dnl                    flavours   option      weak       result
+dnl ---------------    ---------  ---------   --------   ---------
+dnl Linux 2.4/glibc    posix      -lpthread       Y      OK
+dnl
+dnl Linux/glibc 2.34   posix                      Y      OK
+dnl
+dnl GNU Hurd/glibc     posix      -lpthread       Y      OK
+dnl
+dnl Ubuntu 14.04       posix      -pthread        Y      OK
+dnl
+dnl FreeBSD 5.3        posix      -lc_r           Y
+dnl                    posix      -lkse ?         Y
+dnl                    posix      -lpthread ?     Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 5.2        posix      -lc_r           Y
+dnl                    posix      -lkse           Y
+dnl                    posix      -lthr           Y
+dnl
+dnl FreeBSD 4.0,4.10   posix      -lc_r           Y      OK
+dnl
+dnl NetBSD 1.6         --
+dnl
+dnl OpenBSD 3.4        posix      -lpthread       Y      OK
+dnl
+dnl Mac OS X 10.[123]  posix      -lpthread       Y      OK
+dnl
+dnl Solaris 7,8,9      posix      -lpthread       Y      Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11           posix      -lpthread       N (cc) OK
+dnl                                               Y (gcc)
+dnl
+dnl IRIX 6.5           posix      -lpthread       Y      0.5
+dnl
+dnl AIX 4.3,5.1        posix      -lpthread       N      AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1      posix      -pthread (cc)   N      OK
+dnl                               -lpthread (gcc) Y
+dnl
+dnl Cygwin             posix      -lpthread       Y      OK
+dnl
+dnl Mingw              windows                    N      OK
+dnl
+dnl BeOS 5             --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl   OK if all three tests terminate OK,
+dnl   0.5 if the first test terminates OK but the second one loops endlessly,
+dnl   0.0 if the first test already loops endlessly.
index ad6f2f5..b57474b 100644 (file)
@@ -1,8 +1,8 @@
 # Configure a more-standard replacement for <time.h>.
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
-# serial 11
+# serial 18
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 # Written by Paul Eggert and Jim Meyering.
 
-AC_DEFUN([gl_HEADER_TIME_H],
+AC_DEFUN_ONCE([gl_TIME_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
-  AC_REQUIRE([gl_HEADER_TIME_H_BODY])
-])
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
 
-AC_DEFUN([gl_HEADER_TIME_H_BODY],
-[
-  AC_REQUIRE([AC_C_RESTRICT])
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
   gl_NEXT_HEADERS([time.h])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CACHE_CHECK([for TIME_UTC in <time.h>],
+    [gl_cv_time_h_has_TIME_UTC],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <time.h>
+          ]],
+          [[static int x = TIME_UTC; x++;]])],
+       [gl_cv_time_h_has_TIME_UTC=yes],
+       [gl_cv_time_h_has_TIME_UTC=no])])
+  if test $gl_cv_time_h_has_TIME_UTC = yes; then
+    TIME_H_DEFINES_TIME_UTC=1
+  else
+    TIME_H_DEFINES_TIME_UTC=0
+  fi
+  AC_SUBST([TIME_H_DEFINES_TIME_UTC])
 ])
 
 dnl Check whether 'struct timespec' is declared
@@ -93,33 +106,51 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
   AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC])
 ])
 
+# gl_TIME_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_TIME_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_TIME_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
-AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_TIME_H_DEFAULTS],
 [
-  GNULIB_CTIME=0;                        AC_SUBST([GNULIB_CTIME])
-  GNULIB_MKTIME=0;                       AC_SUBST([GNULIB_MKTIME])
-  GNULIB_LOCALTIME=0;                    AC_SUBST([GNULIB_LOCALTIME])
-  GNULIB_NANOSLEEP=0;                    AC_SUBST([GNULIB_NANOSLEEP])
-  GNULIB_STRFTIME=0;                     AC_SUBST([GNULIB_STRFTIME])
-  GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
-  GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
-  GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
-  GNULIB_TIME_RZ=0;                      AC_SUBST([GNULIB_TIME_RZ])
-  GNULIB_TZSET=0;                        AC_SUBST([GNULIB_TZSET])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
   HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
   HAVE_STRPTIME=1;                       AC_SUBST([HAVE_STRPTIME])
   HAVE_TIMEGM=1;                         AC_SUBST([HAVE_TIMEGM])
-  HAVE_TZSET=1;                          AC_SUBST([HAVE_TZSET])
+  HAVE_TIMESPEC_GET=1;                   AC_SUBST([HAVE_TIMESPEC_GET])
   dnl Even GNU libc does not have timezone_t yet.
   HAVE_TIMEZONE_T=0;                     AC_SUBST([HAVE_TIMEZONE_T])
   dnl If another module says to replace or to not replace, do that.
index daf4bba..2d49b64 100644 (file)
@@ -1,6 +1,6 @@
 dnl Reentrant time functions: localtime_r, gmtime_r.
 
-dnl Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -12,12 +12,20 @@ AC_DEFUN([gl_TIME_R],
   dnl Persuade glibc and Solaris <time.h> to declare localtime_r.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
 
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_C_RESTRICT])
 
   dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTRANT is
   dnl not defined.
-  AC_CHECK_DECLS([localtime_r], [], [], [[#include <time.h>]])
+  AC_CHECK_DECLS([localtime_r], [], [],
+    [[/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+         been included before.  */
+      #if defined __MINGW32__
+      # include <unistd.h>
+      #endif
+      #include <time.h>
+    ]])
   if test $ac_cv_have_decl_localtime_r = no; then
     HAVE_DECL_LOCALTIME_R=0
   fi
@@ -29,7 +37,14 @@ AC_DEFUN([gl_TIME_R],
       [gl_cv_time_r_posix],
       [AC_COMPILE_IFELSE(
          [AC_LANG_PROGRAM(
-            [[#include <time.h>]],
+            [[/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
+            ]],
             [[/* We don't need to append 'restrict's to the argument types,
                  even though the POSIX signature has the 'restrict's,
                  since C99 says they can't affect type compatibility.  */
@@ -49,6 +64,32 @@ AC_DEFUN([gl_TIME_R],
     fi
   else
     HAVE_LOCALTIME_R=0
+    dnl On mingw, localtime_r() is defined as an inline function; use through a
+    dnl direct function call works but the use as a function pointer leads to a
+    dnl link error.
+    AC_CACHE_CHECK([whether localtime_r exists as an inline function],
+      [gl_cv_func_localtime_r_inline],
+      [AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
+            ]],
+            [[time_t a;
+              struct tm r;
+              localtime_r (&a, &r);
+            ]])
+         ],
+         [gl_cv_func_localtime_r_inline=yes],
+         [gl_cv_func_localtime_r_inline=no])
+      ])
+    if test $gl_cv_func_localtime_r_inline = yes; then
+      REPLACE_LOCALTIME_R=1
+    fi
   fi
 ])
 
index 5555706..c5e85dc 100644 (file)
@@ -1,6 +1,6 @@
 dnl Time zone functions: tzalloc, localtime_rz, etc.
 
-dnl Copyright (C) 2015-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2015-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -10,15 +10,15 @@ dnl Written by Paul Eggert.
 AC_DEFUN([gl_TIME_RZ],
 [
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_STRUCT_TIMEZONE])
 
-  # Mac OS X 10.6 loops forever with some time_t values.
+  # On Mac OS X 10.6, localtime loops forever with some time_t values.
   # See Bug#27706, Bug#27736, and
   # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
-  AC_CACHE_CHECK([whether localtime loops forever near extrema],
-    [gl_cv_func_localtime_infloop_bug],
-    [gl_cv_func_localtime_infloop_bug=no
+  AC_CACHE_CHECK([whether localtime works even near extrema],
+    [gl_cv_func_localtime_works],
+    [gl_cv_func_localtime_works=yes
      AC_RUN_IFELSE(
        [AC_LANG_PROGRAM(
           [[#include <stdlib.h>
@@ -37,10 +37,10 @@ AC_DEFUN([gl_TIME_RZ],
             return tm && tm->tm_isdst;
           ]])],
        [(TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
-           gl_cv_func_localtime_infloop_bug=yes],
+           gl_cv_func_localtime_works=no],
        [],
-       [gl_cv_func_localtime_infloop_bug="guessing no"])])
-  if test "$gl_cv_func_localtime_infloop_bug" = yes; then
+       [gl_cv_func_localtime_works="guessing yes"])])
+  if test "$gl_cv_func_localtime_works" = no; then
       AC_DEFINE([HAVE_LOCALTIME_INFLOOP_BUG], 1,
         [Define if localtime-like functions can loop forever on
          extreme arguments.])
index 46f599c..58123be 100644 (file)
@@ -1,12 +1,12 @@
-# timegm.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
+# timegm.m4 serial 13
+dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FUNC_TIMEGM],
 [
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([gl_FUNC_MKTIME_WORKS])
   REPLACE_TIMEGM=0
   AC_CHECK_FUNCS_ONCE([timegm])
index accabf9..40307d4 100644 (file)
@@ -1,6 +1,6 @@
 #serial 15
 
-# Copyright (C) 2000-2001, 2003-2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 56c48a6..2743999 100644 (file)
@@ -1,5 +1,5 @@
 # tm_gmtoff.m4 serial 3
-dnl Copyright (C) 2002, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 9f1658a..8a4f285 100644 (file)
@@ -1,83 +1,18 @@
-# serial 11
+# serial 16
 
-# Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# See if we have a working tzset function.
-# If so, arrange to compile the wrapper function.
-# For at least Solaris 2.5.1 and 2.6, this is necessary
-# because tzset can clobber the contents of the buffer
-# used by localtime.
-
 # Written by Paul Eggert and Jim Meyering.
 
 AC_DEFUN([gl_FUNC_TZSET],
 [
-  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
-  AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
+  AC_REQUIRE([gl_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_CHECK_FUNCS_ONCE([tzset])
-  if test $ac_cv_func_tzset = no; then
-    HAVE_TZSET=0
-  fi
-  gl_FUNC_TZSET_CLOBBER
   REPLACE_TZSET=0
-  case "$gl_cv_func_tzset_clobber" in
-    *yes)
-      REPLACE_TZSET=1
-      AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
-        [Define if tzset clobbers localtime's static buffer.])
-      gl_LOCALTIME_BUFFER_NEEDED
-      ;;
-  esac
   case "$host_os" in
     mingw*) REPLACE_TZSET=1 ;;
   esac
 ])
-
-# Set gl_cv_func_tzset_clobber.
-AC_DEFUN([gl_FUNC_TZSET_CLOBBER],
-[
-  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
-  AC_CACHE_CHECK([whether tzset clobbers localtime buffer],
-                 [gl_cv_func_tzset_clobber],
-    [AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <time.h>
-#include <stdlib.h>
-
-int
-main ()
-{
-  time_t t1 = 853958121;
-  struct tm *p, s;
-  putenv ("TZ=GMT0");
-  p = localtime (&t1);
-  s = *p;
-  putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
-  tzset ();
-  return (p->tm_year != s.tm_year
-          || p->tm_mon != s.tm_mon
-          || p->tm_mday != s.tm_mday
-          || p->tm_hour != s.tm_hour
-          || p->tm_min != s.tm_min
-          || p->tm_sec != s.tm_sec);
-}
-  ]])],
-       [gl_cv_func_tzset_clobber=no],
-       [gl_cv_func_tzset_clobber=yes],
-       [case "$host_os" in
-                         # Guess all is fine on glibc systems.
-          *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
-                         # Guess no on native Windows.
-          mingw*)        gl_cv_func_tzset_clobber="guessing no" ;;
-                         # If we don't know, assume the worst.
-          *)             gl_cv_func_tzset_clobber="guessing yes" ;;
-        esac
-       ])
-    ])
-
-  AC_DEFINE([HAVE_RUN_TZSET_TEST], [1],
-    [Define to 1 if you have run the test for working tzset.])
-])
index 3ba64da..0ce4ea4 100644 (file)
@@ -1,15 +1,15 @@
-# unistd_h.m4 serial 74
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# unistd_h.m4 serial 89
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Simon Josefsson, Bruno Haible.
 
-AC_DEFUN([gl_UNISTD_H],
+AC_DEFUN_ONCE([gl_UNISTD_H],
 [
-  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
-  dnl once only, before all statements that occur in other macros.
+  dnl Ensure to expand the default settings once only, before all statements
+  dnl that occur in other macros.
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
 
   gl_CHECK_NEXT_HEADERS([unistd.h])
@@ -41,81 +41,140 @@ AC_DEFUN([gl_UNISTD_H],
 #  include <io.h>
 # endif
 #endif
-    ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat
-    fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups
-    gethostname getlogin getlogin_r getpagesize getpass
+    ]], [access chdir chown copy_file_range dup dup2 dup3 environ euidaccess
+    execl execle execlp execv execve execvp execvpe
+    faccessat fchdir
+    fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize
+    getentropy getgroups gethostname getlogin getlogin_r getpagesize getpass
     getusershell setusershell endusershell
     group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite
     readlink readlinkat rmdir sethostname sleep symlink symlinkat
     truncate ttyname_r unlink unlinkat usleep])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS_ONCE([execvpe])
+  if test $ac_cv_have_decl_execvpe = no; then
+    HAVE_DECL_EXECVPE=0
+  fi
 ])
 
+# gl_UNISTD_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_UNISTD_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_UNISTD_H_DEFAULTS],
 [
-  GNULIB_CHDIR=0;                AC_SUBST([GNULIB_CHDIR])
-  GNULIB_CHOWN=0;                AC_SUBST([GNULIB_CHOWN])
-  GNULIB_CLOSE=0;                AC_SUBST([GNULIB_CLOSE])
-  GNULIB_DUP=0;                  AC_SUBST([GNULIB_DUP])
-  GNULIB_DUP2=0;                 AC_SUBST([GNULIB_DUP2])
-  GNULIB_DUP3=0;                 AC_SUBST([GNULIB_DUP3])
-  GNULIB_ENVIRON=0;              AC_SUBST([GNULIB_ENVIRON])
-  GNULIB_EUIDACCESS=0;           AC_SUBST([GNULIB_EUIDACCESS])
-  GNULIB_FACCESSAT=0;            AC_SUBST([GNULIB_FACCESSAT])
-  GNULIB_FCHDIR=0;               AC_SUBST([GNULIB_FCHDIR])
-  GNULIB_FCHOWNAT=0;             AC_SUBST([GNULIB_FCHOWNAT])
-  GNULIB_FDATASYNC=0;            AC_SUBST([GNULIB_FDATASYNC])
-  GNULIB_FSYNC=0;                AC_SUBST([GNULIB_FSYNC])
-  GNULIB_FTRUNCATE=0;            AC_SUBST([GNULIB_FTRUNCATE])
-  GNULIB_GETCWD=0;               AC_SUBST([GNULIB_GETCWD])
-  GNULIB_GETDOMAINNAME=0;        AC_SUBST([GNULIB_GETDOMAINNAME])
-  GNULIB_GETDTABLESIZE=0;        AC_SUBST([GNULIB_GETDTABLESIZE])
-  GNULIB_GETGROUPS=0;            AC_SUBST([GNULIB_GETGROUPS])
-  GNULIB_GETHOSTNAME=0;          AC_SUBST([GNULIB_GETHOSTNAME])
-  GNULIB_GETLOGIN=0;             AC_SUBST([GNULIB_GETLOGIN])
-  GNULIB_GETLOGIN_R=0;           AC_SUBST([GNULIB_GETLOGIN_R])
-  GNULIB_GETPAGESIZE=0;          AC_SUBST([GNULIB_GETPAGESIZE])
-  GNULIB_GETPASS=0;              AC_SUBST([GNULIB_GETPASS])
-  GNULIB_GETUSERSHELL=0;         AC_SUBST([GNULIB_GETUSERSHELL])
-  GNULIB_GROUP_MEMBER=0;         AC_SUBST([GNULIB_GROUP_MEMBER])
-  GNULIB_ISATTY=0;               AC_SUBST([GNULIB_ISATTY])
-  GNULIB_LCHOWN=0;               AC_SUBST([GNULIB_LCHOWN])
-  GNULIB_LINK=0;                 AC_SUBST([GNULIB_LINK])
-  GNULIB_LINKAT=0;               AC_SUBST([GNULIB_LINKAT])
-  GNULIB_LSEEK=0;                AC_SUBST([GNULIB_LSEEK])
-  GNULIB_PIPE=0;                 AC_SUBST([GNULIB_PIPE])
-  GNULIB_PIPE2=0;                AC_SUBST([GNULIB_PIPE2])
-  GNULIB_PREAD=0;                AC_SUBST([GNULIB_PREAD])
-  GNULIB_PWRITE=0;               AC_SUBST([GNULIB_PWRITE])
-  GNULIB_READ=0;                 AC_SUBST([GNULIB_READ])
-  GNULIB_READLINK=0;             AC_SUBST([GNULIB_READLINK])
-  GNULIB_READLINKAT=0;           AC_SUBST([GNULIB_READLINKAT])
-  GNULIB_RMDIR=0;                AC_SUBST([GNULIB_RMDIR])
-  GNULIB_SETHOSTNAME=0;          AC_SUBST([GNULIB_SETHOSTNAME])
-  GNULIB_SLEEP=0;                AC_SUBST([GNULIB_SLEEP])
-  GNULIB_SYMLINK=0;              AC_SUBST([GNULIB_SYMLINK])
-  GNULIB_SYMLINKAT=0;            AC_SUBST([GNULIB_SYMLINKAT])
-  GNULIB_TRUNCATE=0;             AC_SUBST([GNULIB_TRUNCATE])
-  GNULIB_TTYNAME_R=0;            AC_SUBST([GNULIB_TTYNAME_R])
-  GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING])
-  GNULIB_UNISTD_H_SIGPIPE=0;     AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
-  GNULIB_UNLINK=0;               AC_SUBST([GNULIB_UNLINK])
-  GNULIB_UNLINKAT=0;             AC_SUBST([GNULIB_UNLINKAT])
-  GNULIB_USLEEP=0;               AC_SUBST([GNULIB_USLEEP])
-  GNULIB_WRITE=0;                AC_SUBST([GNULIB_WRITE])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_CHOWN=1;           AC_SUBST([HAVE_CHOWN])
-  HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
+  HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
   HAVE_DUP3=1;            AC_SUBST([HAVE_DUP3])
   HAVE_EUIDACCESS=1;      AC_SUBST([HAVE_EUIDACCESS])
+  HAVE_EXECVPE=1;         AC_SUBST([HAVE_EXECVPE])
   HAVE_FACCESSAT=1;       AC_SUBST([HAVE_FACCESSAT])
   HAVE_FCHDIR=1;          AC_SUBST([HAVE_FCHDIR])
   HAVE_FCHOWNAT=1;        AC_SUBST([HAVE_FCHOWNAT])
@@ -123,6 +182,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_FSYNC=1;           AC_SUBST([HAVE_FSYNC])
   HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
   HAVE_GETDTABLESIZE=1;   AC_SUBST([HAVE_GETDTABLESIZE])
+  HAVE_GETENTROPY=1;      AC_SUBST([HAVE_GETENTROPY])
   HAVE_GETGROUPS=1;       AC_SUBST([HAVE_GETGROUPS])
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETLOGIN=1;        AC_SUBST([HAVE_GETLOGIN])
@@ -145,6 +205,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
   HAVE_USLEEP=1;          AC_SUBST([HAVE_USLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
+  HAVE_DECL_EXECVPE=1;    AC_SUBST([HAVE_DECL_EXECVPE])
   HAVE_DECL_FCHDIR=1;     AC_SUBST([HAVE_DECL_FCHDIR])
   HAVE_DECL_FDATASYNC=1;  AC_SUBST([HAVE_DECL_FDATASYNC])
   HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
@@ -157,10 +218,18 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_DECL_TTYNAME_R=1;  AC_SUBST([HAVE_DECL_TTYNAME_R])
   HAVE_OS_H=0;            AC_SUBST([HAVE_OS_H])
   HAVE_SYS_PARAM_H=0;     AC_SUBST([HAVE_SYS_PARAM_H])
+  REPLACE_ACCESS=0;       AC_SUBST([REPLACE_ACCESS])
   REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
   REPLACE_CLOSE=0;        AC_SUBST([REPLACE_CLOSE])
   REPLACE_DUP=0;          AC_SUBST([REPLACE_DUP])
   REPLACE_DUP2=0;         AC_SUBST([REPLACE_DUP2])
+  REPLACE_EXECL=0;        AC_SUBST([REPLACE_EXECL])
+  REPLACE_EXECLE=0;       AC_SUBST([REPLACE_EXECLE])
+  REPLACE_EXECLP=0;       AC_SUBST([REPLACE_EXECLP])
+  REPLACE_EXECV=0;        AC_SUBST([REPLACE_EXECV])
+  REPLACE_EXECVE=0;       AC_SUBST([REPLACE_EXECVE])
+  REPLACE_EXECVP=0;       AC_SUBST([REPLACE_EXECVP])
+  REPLACE_EXECVPE=0;      AC_SUBST([REPLACE_EXECVPE])
   REPLACE_FACCESSAT=0;    AC_SUBST([REPLACE_FACCESSAT])
   REPLACE_FCHOWNAT=0;     AC_SUBST([REPLACE_FCHOWNAT])
   REPLACE_FTRUNCATE=0;    AC_SUBST([REPLACE_FTRUNCATE])
@@ -191,6 +260,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   REPLACE_UNLINKAT=0;     AC_SUBST([REPLACE_UNLINKAT])
   REPLACE_USLEEP=0;       AC_SUBST([REPLACE_USLEEP])
   REPLACE_WRITE=0;        AC_SUBST([REPLACE_WRITE])
+  UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H])
   UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
                            AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
index 7e46367..b689020 100644 (file)
@@ -1,6 +1,6 @@
-# unlocked-io.m4 serial 15
+# unlocked-io.m4 serial 16
 
-# Copyright (C) 1998-2006, 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 1998-2006, 2009-2021 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,11 +16,6 @@ dnl on Solaris 2.6).
 
 AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
 [
-  AC_DEFINE([USE_UNLOCKED_IO], [1],
-    [Define to 1 if you want getc etc. to use unlocked I/O if available.
-     Unlocked I/O can improve performance in unithreaded apps,
-     but it is not safe for multithreaded apps.])
-
   dnl Persuade glibc and Solaris <stdio.h> to declare
   dnl fgets_unlocked(), fputs_unlocked() etc.
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
deleted file mode 100644 (file)
index 17563b5..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-# Check for variable-length arrays.
-
-# serial 5
-
-# From Paul Eggert
-
-# Copyright (C) 2001, 2009-2018 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This is a copy of AC_C_VARARRAYS from a recent development version
-# of Autoconf.  It replaces Autoconf's version, or for pre-2.61 autoconf
-# it defines the macro that Autoconf lacks.
-AC_DEFUN([AC_C_VARARRAYS],
-[
-  AC_CACHE_CHECK([for variable-length arrays],
-    ac_cv_c_vararrays,
-    [AC_EGREP_CPP([defined],
-       [#ifdef __STDC_NO_VLA__
-        defined
-        #endif
-       ],
-       [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
-       [AC_COMPILE_IFELSE(
-          [AC_LANG_PROGRAM(
-             [[/* Test for VLA support.  This test is partly inspired
-                  from examples in the C standard.  Use at least two VLA
-                  functions to detect the GCC 3.4.3 bug described in:
-                  https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
-                  */
-               #ifdef __STDC_NO_VLA__
-                syntax error;
-               #else
-                 extern int n;
-                 int B[100];
-                 int fvla (int m, int C[m][m]);
-
-                 int
-                 simple (int count, int all[static count])
-                 {
-                   return all[count - 1];
-                 }
-
-                 int
-                 fvla (int m, int C[m][m])
-                 {
-                   typedef int VLA[m][m];
-                   VLA x;
-                   int D[m];
-                   static int (*q)[m] = &B;
-                   int (*s)[n] = q;
-                   return C && &x[0][0] == &D[0] && &D[0] == s[0];
-                 }
-               #endif
-               ]])],
-          [ac_cv_c_vararrays=yes],
-          [ac_cv_c_vararrays=no])])])
-  if test "$ac_cv_c_vararrays" = yes; then
-    dnl This is for compatibility with Autoconf 2.61-2.69.
-    AC_DEFINE([HAVE_C_VARARRAYS], 1,
-      [Define to 1 if C supports variable-length arrays.])
-  elif test "$ac_cv_c_vararrays" = no; then
-    AC_DEFINE([__STDC_NO_VLA__], 1,
-      [Define to 1 if C does not support variable-length arrays, and
-       if the compiler does not already define this.])
-  fi
-])
index b3fda27..483bba9 100644 (file)
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 36
-dnl Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 38
+dnl Copyright (C) 2002-2004, 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -32,7 +32,6 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
 # Prerequisites of lib/printf-args.h, lib/printf-args.c.
 AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 [
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
 ])
@@ -41,7 +40,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
 AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 [
   AC_REQUIRE([gl_FEATURES_H])
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
   AC_REQUIRE([AC_TYPE_SIZE_T])
@@ -56,7 +54,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
 AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
 [
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
   AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
@@ -77,6 +74,16 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
          if the buffer had been large enough.])
       ;;
   esac
+  dnl Additionally, the use of %n can be eliminated by assuming that snprintf
+  dnl always produces NUL-terminated strings (no truncation).
+  AC_REQUIRE([gl_SNPRINTF_TRUNCATION_C99])
+  case "$gl_cv_func_snprintf_truncation_c99" in
+    *yes)
+      AC_DEFINE([HAVE_SNPRINTF_TRUNCATION_C99], [1],
+        [Define if the string produced by the snprintf function is always NUL
+         terminated.])
+      ;;
+  esac
 ])
 
 # Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
index 0c00b4b..a26de84 100644 (file)
@@ -1,5 +1,5 @@
 # vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2018 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2021 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
index 815378a..ca7fd24 100644 (file)
@@ -1,5 +1,5 @@
 # version-etc.m4 serial 1
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/m4/visibility.m4 b/m4/visibility.m4
new file mode 100644 (file)
index 0000000..d161bd7
--- /dev/null
@@ -0,0 +1,82 @@
+# visibility.m4 serial 8
+dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl Mac OS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  CFLAG_VISIBILITY=
+  HAVE_VISIBILITY=0
+  if test -n "$GCC"; then
+    dnl First, check whether -Werror can be added to the command line, or
+    dnl whether it leads to an error because of some other option that the
+    dnl user has put into $CC $CFLAGS $CPPFLAGS.
+    AC_CACHE_CHECK([whether the -Werror option is usable],
+      [gl_cv_cc_vis_werror],
+      [gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -Werror"
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM([[]], [[]])],
+         [gl_cv_cc_vis_werror=yes],
+         [gl_cv_cc_vis_werror=no])
+       CFLAGS="$gl_save_CFLAGS"
+      ])
+    dnl Now check whether visibility declarations are supported.
+    AC_CACHE_CHECK([for simple visibility declarations],
+      [gl_cv_cc_visibility],
+      [gl_save_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -fvisibility=hidden"
+       dnl We use the option -Werror and a function dummyfunc, because on some
+       dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+       dnl "visibility attribute not supported in this configuration; ignored"
+       dnl at the first function definition in every compilation unit, and we
+       dnl don't want to use the option in this case.
+       if test $gl_cv_cc_vis_werror = yes; then
+         CFLAGS="$CFLAGS -Werror"
+       fi
+       AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+              extern __attribute__((__visibility__("default"))) int exportedvar;
+              extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+              extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
+              void dummyfunc (void) {}
+            ]],
+            [[]])],
+         [gl_cv_cc_visibility=yes],
+         [gl_cv_cc_visibility=no])
+       CFLAGS="$gl_save_CFLAGS"
+      ])
+    if test $gl_cv_cc_visibility = yes; then
+      CFLAG_VISIBILITY="-fvisibility=hidden"
+      HAVE_VISIBILITY=1
+    fi
+  fi
+  AC_SUBST([CFLAG_VISIBILITY])
+  AC_SUBST([HAVE_VISIBILITY])
+  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
index 8e270cf..04edfe8 100644 (file)
@@ -1,5 +1,5 @@
-# warn-on-use.m4 serial 6
-dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# warn-on-use.m4 serial 9
+dnl Copyright (C) 2010-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -30,17 +30,15 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
        [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
          [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
           undefining macros.])])dnl
-dnl FIXME: gl_Symbol must be used unquoted until we can assume
-dnl autoconf 2.64 or newer.
      for gl_func in m4_flatten([$2]); do
        AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
        AC_CACHE_CHECK([whether $gl_func is declared without a macro],
-         gl_Symbol,
+         [gl_Symbol],
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
-[@%:@undef $gl_func
-  (void) $gl_func;])],
-           [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
-       AS_VAR_IF(gl_Symbol, [yes],
+[[#undef $gl_func
+  (void) $gl_func;]])],
+           [AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
+       AS_VAR_IF([gl_Symbol], [yes],
          [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
           dnl shortcut - if the raw declaration exists, then set a cache
           dnl variable to allow skipping any later AC_CHECK_DECL efforts
index 07edda1..9e24d89 100644 (file)
@@ -1,5 +1,5 @@
-# warnings.m4 serial 14
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# warnings.m4 serial 16
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -23,8 +23,6 @@ m4_ifdef([AS_VAR_APPEND],
 # The effects of this macro depend on the current language (_AC_LANG).
 AC_DEFUN([gl_COMPILER_OPTION_IF],
 [
-dnl FIXME: gl_Warn must be used unquoted until we can assume Autoconf
-dnl 2.64 or newer.
 AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
 AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
 AS_LITERAL_IF([$1],
@@ -34,13 +32,13 @@ case $gl_positive in
   -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
 esac
 m4_pushdef([gl_Positive], [$gl_positive])])dnl
-AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
+AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], [gl_Warn], [
   gl_save_compiler_FLAGS="$gl_Flags"
   gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
     [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
-  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([])])],
-                 [AS_VAR_SET(gl_Warn, [yes])],
-                 [AS_VAR_SET(gl_Warn, [no])])
+  AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([[]])])],
+                 [AS_VAR_SET([gl_Warn], [yes])],
+                 [AS_VAR_SET([gl_Warn], [no])])
   gl_Flags="$gl_save_compiler_FLAGS"
 ])
 AS_VAR_IF(gl_Warn, [yes], [$2], [$3])
@@ -59,8 +57,7 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS],
 [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
 
 # Specialization for _AC_LANG = C. This macro can be AC_REQUIREd.
-# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
-m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
 [
   AC_LANG_PUSH([C])
   gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
@@ -68,8 +65,7 @@ m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C)],
 ])
 
 # Specialization for _AC_LANG = C++. This macro can be AC_REQUIREd.
-# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
-m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
 [
   AC_LANG_PUSH([C++])
   gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
@@ -77,8 +73,7 @@ m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(C++)],
 ])
 
 # Specialization for _AC_LANG = Objective C. This macro can be AC_REQUIREd.
-# Use of m4_defun rather than AC_DEFUN works around a bug in autoconf < 2.63b.
-m4_defun([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)],
+AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS(Objective C)],
 [
   AC_LANG_PUSH([Objective C])
   gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL
index a062ca9..818b319 100644 (file)
@@ -1,15 +1,15 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Eric Blake.
 
-# wchar_h.m4 serial 43
+# wchar_h.m4 serial 53
 
-AC_DEFUN([gl_WCHAR_H],
+AC_DEFUN_ONCE([gl_WCHAR_H],
 [
   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
   AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
@@ -40,23 +40,24 @@ AC_DEFUN([gl_WCHAR_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
-#include <wchar.h>
+      #include <wchar.h>
     ]],
     [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
-     wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset
+     wcsrtombs wcsnrtombs wcwidth
+     wmemchr wmemcmp wmemcpy wmemmove wmempcpy wmemset
      wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp
      wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr
      wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime
     ])
+
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_DECLS([wcsdup], [], [], [[
+      #include <wchar.h>
+    ]])
+  if test $ac_cv_have_decl_wcsdup = no; then
+    HAVE_DECL_WCSDUP=0
+  fi
 ])
 
 dnl Check whether <wchar.h> is usable at all.
@@ -67,56 +68,49 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
   dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
   dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
   dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
     [gl_cv_header_wchar_h_correct_inline],
     [gl_cv_header_wchar_h_correct_inline=yes
-     AC_LANG_CONFTEST([
-       AC_LANG_SOURCE([[#define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-extern int zero (void);
-int main () { return zero(); }
-]])])
-     dnl Do not rename the object file from conftest.$ac_objext to
-     dnl conftest1.$ac_objext, as this will cause the link to fail on
-     dnl z/OS when using the XPLINK object format (due to duplicate
-     dnl CSECT names). Instead, temporarily redefine $ac_compile so
-     dnl that the object file has the latter name from the start.
-     save_ac_compile="$ac_compile"
-     ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
-     if echo '#include "conftest.c"' >conftest1.c &&
-        AC_TRY_EVAL([ac_compile]); then
-       AC_LANG_CONFTEST([
-         AC_LANG_SOURCE([[#define wcstod renamed_wcstod
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int zero (void) { return 0; }
-]])])
-       dnl See note above about renaming object files.
-       ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
-       if echo '#include "conftest.c"' >conftest2.c &&
-          AC_TRY_EVAL([ac_compile]); then
-         if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
-           :
-         else
-           gl_cv_header_wchar_h_correct_inline=no
+     case "$host_os" in
+       *-gnu* | gnu*)
+         AC_LANG_CONFTEST([
+           AC_LANG_SOURCE([[
+             #define wcstod renamed_wcstod
+             #include <wchar.h>
+             extern int zero (void);
+             int main () { return zero(); }
+           ]])])
+         dnl Do not rename the object file from conftest.$ac_objext to
+         dnl conftest1.$ac_objext, as this will cause the link to fail on
+         dnl z/OS when using the XPLINK object format (due to duplicate
+         dnl CSECT names). Instead, temporarily redefine $ac_compile so
+         dnl that the object file has the latter name from the start.
+         save_ac_compile="$ac_compile"
+         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+         if echo '#include "conftest.c"' >conftest1.c \
+            && AC_TRY_EVAL([ac_compile]); then
+           AC_LANG_CONFTEST([
+             AC_LANG_SOURCE([[
+               #define wcstod renamed_wcstod
+               #include <wchar.h>
+               int zero (void) { return 0; }
+             ]])])
+           dnl See note above about renaming object files.
+           ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+           if echo '#include "conftest.c"' >conftest2.c \
+              && AC_TRY_EVAL([ac_compile]); then
+             if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+               :
+             else
+               gl_cv_header_wchar_h_correct_inline=no
+             fi
+           fi
          fi
-       fi
-     fi
-     ac_compile="$save_ac_compile"
-     rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
+         ac_compile="$save_ac_compile"
+         rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
+         ;;
+     esac
     ])
   if test $gl_cv_header_wchar_h_correct_inline = no; then
     AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
@@ -131,57 +125,75 @@ Configuration aborted.])
   fi
 ])
 
+# gl_WCHAR_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_WCHAR_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOWC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOB])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSINIT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOWC])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOWCS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNRTOWCS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCRTOMB])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRTOMBS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNRTOMBS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCWIDTH])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMMOVE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMPCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WMEMSET])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNLEN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCPNCPY])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCAT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCASECMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSNCASECMP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCOLL])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSXFRM])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSDUP])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSRCHR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSCSPN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSPN])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSPBRK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSSTR])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSTOK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSWIDTH])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSFTIME])
+    dnl Support Microsoft deprecated alias function names by default.
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WCSDUP], [1])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_WCHAR_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_WCHAR_H_DEFAULTS],
 [
-  GNULIB_BTOWC=0;       AC_SUBST([GNULIB_BTOWC])
-  GNULIB_WCTOB=0;       AC_SUBST([GNULIB_WCTOB])
-  GNULIB_MBSINIT=0;     AC_SUBST([GNULIB_MBSINIT])
-  GNULIB_MBRTOWC=0;     AC_SUBST([GNULIB_MBRTOWC])
-  GNULIB_MBRLEN=0;      AC_SUBST([GNULIB_MBRLEN])
-  GNULIB_MBSRTOWCS=0;   AC_SUBST([GNULIB_MBSRTOWCS])
-  GNULIB_MBSNRTOWCS=0;  AC_SUBST([GNULIB_MBSNRTOWCS])
-  GNULIB_WCRTOMB=0;     AC_SUBST([GNULIB_WCRTOMB])
-  GNULIB_WCSRTOMBS=0;   AC_SUBST([GNULIB_WCSRTOMBS])
-  GNULIB_WCSNRTOMBS=0;  AC_SUBST([GNULIB_WCSNRTOMBS])
-  GNULIB_WCWIDTH=0;     AC_SUBST([GNULIB_WCWIDTH])
-  GNULIB_WMEMCHR=0;     AC_SUBST([GNULIB_WMEMCHR])
-  GNULIB_WMEMCMP=0;     AC_SUBST([GNULIB_WMEMCMP])
-  GNULIB_WMEMCPY=0;     AC_SUBST([GNULIB_WMEMCPY])
-  GNULIB_WMEMMOVE=0;    AC_SUBST([GNULIB_WMEMMOVE])
-  GNULIB_WMEMSET=0;     AC_SUBST([GNULIB_WMEMSET])
-  GNULIB_WCSLEN=0;      AC_SUBST([GNULIB_WCSLEN])
-  GNULIB_WCSNLEN=0;     AC_SUBST([GNULIB_WCSNLEN])
-  GNULIB_WCSCPY=0;      AC_SUBST([GNULIB_WCSCPY])
-  GNULIB_WCPCPY=0;      AC_SUBST([GNULIB_WCPCPY])
-  GNULIB_WCSNCPY=0;     AC_SUBST([GNULIB_WCSNCPY])
-  GNULIB_WCPNCPY=0;     AC_SUBST([GNULIB_WCPNCPY])
-  GNULIB_WCSCAT=0;      AC_SUBST([GNULIB_WCSCAT])
-  GNULIB_WCSNCAT=0;     AC_SUBST([GNULIB_WCSNCAT])
-  GNULIB_WCSCMP=0;      AC_SUBST([GNULIB_WCSCMP])
-  GNULIB_WCSNCMP=0;     AC_SUBST([GNULIB_WCSNCMP])
-  GNULIB_WCSCASECMP=0;  AC_SUBST([GNULIB_WCSCASECMP])
-  GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP])
-  GNULIB_WCSCOLL=0;     AC_SUBST([GNULIB_WCSCOLL])
-  GNULIB_WCSXFRM=0;     AC_SUBST([GNULIB_WCSXFRM])
-  GNULIB_WCSDUP=0;      AC_SUBST([GNULIB_WCSDUP])
-  GNULIB_WCSCHR=0;      AC_SUBST([GNULIB_WCSCHR])
-  GNULIB_WCSRCHR=0;     AC_SUBST([GNULIB_WCSRCHR])
-  GNULIB_WCSCSPN=0;     AC_SUBST([GNULIB_WCSCSPN])
-  GNULIB_WCSSPN=0;      AC_SUBST([GNULIB_WCSSPN])
-  GNULIB_WCSPBRK=0;     AC_SUBST([GNULIB_WCSPBRK])
-  GNULIB_WCSSTR=0;      AC_SUBST([GNULIB_WCSSTR])
-  GNULIB_WCSTOK=0;      AC_SUBST([GNULIB_WCSTOK])
-  GNULIB_WCSWIDTH=0;    AC_SUBST([GNULIB_WCSWIDTH])
-  GNULIB_WCSFTIME=0;    AC_SUBST([GNULIB_WCSFTIME])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_BTOWC=1;         AC_SUBST([HAVE_BTOWC])
   HAVE_MBSINIT=1;       AC_SUBST([HAVE_MBSINIT])
@@ -196,6 +208,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   HAVE_WMEMCMP=1;       AC_SUBST([HAVE_WMEMCMP])
   HAVE_WMEMCPY=1;       AC_SUBST([HAVE_WMEMCPY])
   HAVE_WMEMMOVE=1;      AC_SUBST([HAVE_WMEMMOVE])
+  HAVE_WMEMPCPY=1;      AC_SUBST([HAVE_WMEMPCPY])
   HAVE_WMEMSET=1;       AC_SUBST([HAVE_WMEMSET])
   HAVE_WCSLEN=1;        AC_SUBST([HAVE_WCSLEN])
   HAVE_WCSNLEN=1;       AC_SUBST([HAVE_WCSNLEN])
@@ -222,6 +235,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   HAVE_WCSWIDTH=1;      AC_SUBST([HAVE_WCSWIDTH])
   HAVE_WCSFTIME=1;      AC_SUBST([HAVE_WCSFTIME])
   HAVE_DECL_WCTOB=1;    AC_SUBST([HAVE_DECL_WCTOB])
+  HAVE_DECL_WCSDUP=1;   AC_SUBST([HAVE_DECL_WCSDUP])
   HAVE_DECL_WCWIDTH=1;  AC_SUBST([HAVE_DECL_WCWIDTH])
   REPLACE_MBSTATE_T=0;  AC_SUBST([REPLACE_MBSTATE_T])
   REPLACE_BTOWC=0;      AC_SUBST([REPLACE_BTOWC])
@@ -237,4 +251,5 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
   REPLACE_WCWIDTH=0;    AC_SUBST([REPLACE_WCWIDTH])
   REPLACE_WCSWIDTH=0;   AC_SUBST([REPLACE_WCSWIDTH])
   REPLACE_WCSFTIME=0;   AC_SUBST([REPLACE_WCSFTIME])
+  REPLACE_WCSTOK=0;     AC_SUBST([REPLACE_WCSTOK])
 ])
index 83bc3d5..34db10e 100644 (file)
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index e71c57a..cd96f11 100644 (file)
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 13
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 17
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,8 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
   if test $ac_cv_func_wcrtomb = no; then
     HAVE_WCRTOMB=0
     AC_CHECK_DECLS([wcrtomb],,, [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+      #include <wchar.h>
+    ]])
     if test $ac_cv_have_decl_wcrtomb = yes; then
       dnl On Minix 3.1.8, the system's <wchar.h> declares wcrtomb() although
       dnl it does not have the function. Avoid a collision with gnulib's
@@ -31,9 +24,13 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
       REPLACE_WCRTOMB=1
     fi
   else
-    if test $REPLACE_MBSTATE_T = 1; then
-      REPLACE_WCRTOMB=1
-    else
+    dnl We don't actually need to override wcrtomb when redefining the semantics
+    dnl of the mbstate_t type. Tested on 32-bit AIX.
+    dnl if test $REPLACE_MBSTATE_T = 1; then
+    dnl   REPLACE_WCRTOMB=1
+    dnl fi
+    if test $REPLACE_WCRTOMB = 0; then
+      dnl On Android 4.3, wcrtomb produces wrong characters in the C locale.
       dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL)
       dnl sometimes returns 0 instead of 1.
       AC_REQUIRE([AC_PROG_CC])
@@ -42,6 +39,41 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
       AC_REQUIRE([gt_LOCALE_JA])
       AC_REQUIRE([gt_LOCALE_ZH_CN])
       AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+      AC_CACHE_CHECK([whether wcrtomb works in the C locale],
+        [gl_cv_func_wcrtomb_works],
+        [AC_RUN_IFELSE(
+           [AC_LANG_SOURCE([[
+#include <string.h>
+#include <stdlib.h>
+#include <wchar.h>
+int main ()
+{
+  mbstate_t state;
+  char out[64];
+  int count;
+  memset (&state, 0, sizeof (state));
+  out[0] = 'x';
+  count = wcrtomb (out, L'a', &state);
+  return !(count == 1 && out[0] == 'a');
+}]])],
+           [gl_cv_func_wcrtomb_works=yes],
+           [gl_cv_func_wcrtomb_works=no],
+           [case "$host_os" in
+                               # Guess no on Android.
+              linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
+                               # Guess yes otherwise.
+              *)               gl_cv_func_wcrtomb_works="guessing yes";;
+            esac
+           ])
+        ])
+      case "$gl_cv_func_wcrtomb_works" in
+        *yes) ;;
+        *) AC_DEFINE([WCRTOMB_C_LOCALE_BUG], [1],
+             [Define if the wcrtomb function does not work in the C locale.])
+           REPLACE_WCRTOMB=1 ;;
+      esac
+    fi
+    if test $REPLACE_WCRTOMB = 0; then
       AC_CACHE_CHECK([whether wcrtomb return value is correct],
         [gl_cv_func_wcrtomb_retval],
         [
@@ -49,12 +81,10 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
           dnl is present.
 changequote(,)dnl
           case "$host_os" in
-                                     # Guess no on AIX 4, OSF/1 and Solaris.
-            aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
-                                     # Guess yes on native Windows.
-            mingw*)                  gl_cv_func_wcrtomb_retval="guessing yes" ;;
-                                     # Guess yes otherwise.
-            *)                       gl_cv_func_wcrtomb_retval="guessing yes" ;;
+            # Guess no on AIX 4, OSF/1, Solaris, native Windows.
+            aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+            # Guess yes otherwise.
+            *)                                gl_cv_func_wcrtomb_retval="guessing yes" ;;
           esac
 changequote([,])dnl
           if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
@@ -62,14 +92,8 @@ changequote([,])dnl
               [AC_LANG_SOURCE([[
 #include <locale.h>
 #include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
+#include <stdlib.h>
 int main ()
 {
   int result = 0;
@@ -82,6 +106,12 @@ int main ()
     {
       if (wcrtomb (NULL, 0, NULL) != 1)
         result |= 2;
+      {
+        wchar_t wc = (wchar_t) 0xBADFACE;
+        if (mbtowc (&wc, "\303\274", 2) == 2)
+          if (wcrtomb (NULL, wc, NULL) != 1)
+            result |= 2;
+      }
     }
   if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
@@ -102,7 +132,9 @@ int main ()
         ])
       case "$gl_cv_func_wcrtomb_retval" in
         *yes) ;;
-        *) REPLACE_WCRTOMB=1 ;;
+        *) AC_DEFINE([WCRTOMB_RETVAL_BUG], [1],
+             [Define if the wcrtomb function has an incorrect return value.])
+           REPLACE_WCRTOMB=1 ;;
       esac
     fi
   fi
index c7eeb5f..159b609 100644 (file)
@@ -1,5 +1,5 @@
-# wctob.m4 serial 11
-dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
+# wctob.m4 serial 13
+dnl Copyright (C) 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -43,13 +43,6 @@ changequote([,])dnl
             AC_RUN_IFELSE(
               [AC_LANG_SOURCE([[
 #include <locale.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 
 register long global __asm__ ("%ebx");
@@ -74,14 +67,7 @@ int main ()
           AC_RUN_IFELSE(
             [AC_LANG_SOURCE([[
 #include <locale.h>
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
+#include <stdlib.h>
 #include <wchar.h>
 int main ()
 {
@@ -108,15 +94,8 @@ int main ()
 
       dnl IRIX 6.5 has the wctob() function but does not declare it.
       AC_CHECK_DECLS([wctob], [], [], [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+        #include <wchar.h>
+      ]])
       if test $ac_cv_have_decl_wctob != yes; then
         HAVE_DECL_WCTOB=0
       fi
index 962ed84..2da8b26 100644 (file)
@@ -1,5 +1,5 @@
 # wctomb.m4 serial 2
-dnl Copyright (C) 2011-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 15d1ef3..7d74212 100644 (file)
@@ -1,15 +1,15 @@
-# wctype_h.m4 serial 21
+# wctype_h.m4 serial 30
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Written by Paul Eggert.
 
-AC_DEFUN([gl_WCTYPE_H],
+AC_DEFUN_ONCE([gl_WCTYPE_H],
 [
   AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
   AC_REQUIRE([AC_PROG_CC])
@@ -41,13 +41,6 @@ AC_DEFUN([gl_WCTYPE_H],
         [
           AC_RUN_IFELSE(
             [AC_LANG_SOURCE([[
-               /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-                  included before <wchar.h>.
-                  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-                  must be included before <wchar.h>.  */
-               #include <stddef.h>
-               #include <stdio.h>
-               #include <time.h>
                #include <wchar.h>
                #include <wctype.h>
                int main () { return iswprint ('x') == 0; }
@@ -57,7 +50,7 @@ AC_DEFUN([gl_WCTYPE_H],
              AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
                           #if __GNU_LIBRARY__ == 1
                           Linux libc5 i18n is broken.
-                          #endif]], [])],
+                          #endif]], [[]])],
               [gl_cv_func_iswcntrl_works="guessing yes"],
               [gl_cv_func_iswcntrl_works="guessing no"])
             ])
@@ -69,10 +62,14 @@ AC_DEFUN([gl_WCTYPE_H],
   fi
   AC_SUBST([HAVE_WCTYPE_H])
 
-  case "$gl_cv_func_iswcntrl_works" in
-    *yes) REPLACE_ISWCNTRL=0 ;;
-    *)    REPLACE_ISWCNTRL=1 ;;
-  esac
+  if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+    REPLACE_ISWCNTRL=1
+  else
+    case "$gl_cv_func_iswcntrl_works" in
+      *yes) REPLACE_ISWCNTRL=0 ;;
+      *)    REPLACE_ISWCNTRL=1 ;;
+    esac
+  fi
   AC_SUBST([REPLACE_ISWCNTRL])
 
   if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
@@ -88,14 +85,7 @@ AC_DEFUN([gl_WCTYPE_H],
       REPLACE_TOWLOWER=0
     else
       AC_CHECK_DECLS([towlower],,,
-        [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-             included before <wchar.h>.
-             BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-             must be included before <wchar.h>.  */
-          #include <stddef.h>
-          #include <stdio.h>
-          #include <time.h>
-          #include <wchar.h>
+        [[#include <wchar.h>
           #if HAVE_WCTYPE_H
           # include <wctype.h>
           #endif
@@ -124,14 +114,7 @@ AC_DEFUN([gl_WCTYPE_H],
   AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+          [[#include <wchar.h>
             #if HAVE_WCTYPE_H
             # include <wctype.h>
             #endif
@@ -150,14 +133,7 @@ AC_DEFUN([gl_WCTYPE_H],
   AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
-               included before <wchar.h>.
-               BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
-               must be included before <wchar.h>.  */
-            #include <stddef.h>
-            #include <stdio.h>
-            #include <time.h>
-            #include <wchar.h>
+          [[#include <wchar.h>
             #include <wctype.h>
             wctrans_t a;
           ]],
@@ -172,14 +148,7 @@ AC_DEFUN([gl_WCTYPE_H],
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
 #if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
 # include <wchar.h>
 #endif
 #include <wctype.h>
@@ -188,25 +157,44 @@ AC_DEFUN([gl_WCTYPE_H],
     ])
 ])
 
+# gl_WCTYPE_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
 AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR],
 [
-  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
-  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+  dnl Ensure to expand the default settings once only.
+  gl_WCTYPE_H_REQUIRE_DEFAULTS
   gl_MODULE_INDICATOR_SET_VARIABLE([$1])
   dnl Define it also as a C macro, for the benefit of the unit tests.
   gl_MODULE_INDICATOR_FOR_TESTS([$1])
 ])
 
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd.  It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_WCTYPE_H_REQUIRE_DEFAULTS],
+[
+  m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS], [
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWBLANK])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWDIGIT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWXDIGIT])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTYPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWCTYPE])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTRANS])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOWCTRANS])
+  ])
+  m4_require(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS])
+  AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+])
+
 AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
 [
-  GNULIB_ISWBLANK=0;    AC_SUBST([GNULIB_ISWBLANK])
-  GNULIB_WCTYPE=0;      AC_SUBST([GNULIB_WCTYPE])
-  GNULIB_ISWCTYPE=0;    AC_SUBST([GNULIB_ISWCTYPE])
-  GNULIB_WCTRANS=0;     AC_SUBST([GNULIB_WCTRANS])
-  GNULIB_TOWCTRANS=0;   AC_SUBST([GNULIB_TOWCTRANS])
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_ISWBLANK=1;      AC_SUBST([HAVE_ISWBLANK])
   HAVE_WCTYPE_T=1;      AC_SUBST([HAVE_WCTYPE_T])
   HAVE_WCTRANS_T=1;     AC_SUBST([HAVE_WCTRANS_T])
   REPLACE_ISWBLANK=0;   AC_SUBST([REPLACE_ISWBLANK])
+  REPLACE_ISWDIGIT=0;   AC_SUBST([REPLACE_ISWDIGIT])
+  REPLACE_ISWXDIGIT=0;  AC_SUBST([REPLACE_ISWXDIGIT])
 ])
index 1cd489b..2ac2a51 100644 (file)
@@ -1,5 +1,5 @@
-# wcwidth.m4 serial 27
-dnl Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# wcwidth.m4 serial 34
+dnl Copyright (C) 2006-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -19,17 +19,8 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
   AC_CHECK_FUNCS_ONCE([wcwidth])
 
   AC_CHECK_DECLS([wcwidth], [], [], [[
-/* AIX 3.2.5 declares wcwidth in <string.h>. */
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-]])
+    #include <wchar.h>
+  ]])
   if test $ac_cv_have_decl_wcwidth != yes; then
     HAVE_DECL_WCWIDTH=0
   fi
@@ -50,25 +41,20 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
   if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
     HAVE_WCWIDTH=1
     dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
-    dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
-    dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
+    dnl On NetBSD 9.0, OpenBSD 5.0, MidnightBSD 1.1,
+    dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
+    dnl On NetBSD 9.0, MidnightBSD 1.1, OSF/1 5.1,
+    dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
     dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0.
     dnl This leads to bugs in 'ls' (coreutils).
+    dnl On Solaris 11.4, wcwidth(0x2202) (PARTIAL DIFFERENTIAL) returns 2,
+    dnl even in Western locales.
     AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
       [gl_cv_func_wcwidth_works],
       [
         AC_RUN_IFELSE(
           [AC_LANG_SOURCE([[
 #include <locale.h>
-/* AIX 3.2.5 declares wcwidth in <string.h>. */
-#include <string.h>
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
 #include <wchar.h>
 #if !HAVE_DECL_WCWIDTH
 extern
@@ -80,7 +66,7 @@ int wcwidth (int);
 int main ()
 {
   int result = 0;
-  if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+  if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
     {
       if (wcwidth (0x0301) > 0)
         result |= 1;
@@ -90,6 +76,8 @@ int main ()
         result |= 4;
       if (wcwidth (0xFF1A) == 0)
         result |= 8;
+      if (wcwidth (0x2202) > 1)
+        result |= 16;
     }
   return result;
 }]])],
@@ -98,9 +86,13 @@ int main ()
           [
 changequote(,)dnl
            case "$host_os" in
-                                        # Guess yes on glibc and AIX 7 systems.
-             *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
-             *)                         gl_cv_func_wcwidth_works="guessing no";;
+                            # 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";;
            esac
 changequote([,])dnl
           ])
index 95f6854..a49c508 100644 (file)
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 7
-dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc.
+# wint_t.m4 serial 11
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -14,15 +14,7 @@ AC_DEFUN([gt_TYPE_WINT_T],
   AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-          [[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
-   before <wchar.h>.  */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
+          [[#include <wchar.h>
             wint_t foo = (wchar_t)'\0';]],
           [[]])],
        [gt_cv_c_wint_t=yes],
@@ -32,33 +24,24 @@ AC_DEFUN([gt_TYPE_WINT_T],
 
     dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
     dnl override 'wint_t'.
-    AC_CACHE_CHECK([whether wint_t is too small],
-      [gl_cv_type_wint_t_too_small],
+    AC_CACHE_CHECK([whether wint_t is large enough],
+      [gl_cv_type_wint_t_large_enough],
       [AC_COMPILE_IFELSE(
-           [AC_LANG_PROGRAM([[
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
-   <wchar.h>.
-   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
-   included before <wchar.h>.  */
-#if !(defined __GLIBC__ && !defined __UCLIBC__)
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-#endif
-#include <wchar.h>
+         [AC_LANG_PROGRAM(
+            [[#include <wchar.h>
               int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
-              ]])],
-           [gl_cv_type_wint_t_too_small=no],
-           [gl_cv_type_wint_t_too_small=yes])])
-    if test $gl_cv_type_wint_t_too_small = yes; then
-      GNULIB_OVERRIDES_WINT_T=1
+            ]])],
+         [gl_cv_type_wint_t_large_enough=yes],
+         [gl_cv_type_wint_t_large_enough=no])])
+    if test $gl_cv_type_wint_t_large_enough = no; then
+      GNULIBHEADERS_OVERRIDE_WINT_T=1
     else
-      GNULIB_OVERRIDES_WINT_T=0
+      GNULIBHEADERS_OVERRIDE_WINT_T=0
     fi
   else
-    GNULIB_OVERRIDES_WINT_T=0
+    GNULIBHEADERS_OVERRIDE_WINT_T=0
   fi
-  AC_SUBST([GNULIB_OVERRIDES_WINT_T])
+  AC_SUBST([GNULIBHEADERS_OVERRIDE_WINT_T])
 ])
 
 dnl Prerequisites of the 'wint_t' override.
diff --git a/m4/wmemchr.m4 b/m4/wmemchr.m4
new file mode 100644 (file)
index 0000000..a5b4eb7
--- /dev/null
@@ -0,0 +1,25 @@
+# wmemchr.m4 serial 5
+dnl Copyright (C) 2011-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WMEMCHR],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+  dnl We cannot use AC_CHECK_FUNCS here, because the MSVC 9 header files
+  dnl provide this function as an inline function definition.
+  AC_CACHE_CHECK([for wmemchr], [gl_cv_func_wmemchr],
+    [AC_LINK_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <wchar.h>
+          ]],
+          [[return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);]])
+       ],
+       [gl_cv_func_wmemchr=yes],
+       [gl_cv_func_wmemchr=no])
+    ])
+  if test $gl_cv_func_wmemchr = no; then
+    HAVE_WMEMCHR=0
+  fi
+])
diff --git a/m4/wmempcpy.m4 b/m4/wmempcpy.m4
new file mode 100644 (file)
index 0000000..9d774ae
--- /dev/null
@@ -0,0 +1,21 @@
+# wmempcpy.m4 serial 1
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WMEMPCPY],
+[
+  AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+  dnl Persuade glibc <wchar.h> to declare wmempcpy().
+  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+  dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
+  AC_REQUIRE([AC_C_RESTRICT])
+
+  AC_CHECK_FUNCS_ONCE([wmempcpy])
+  if test $ac_cv_func_wmempcpy = no; then
+    HAVE_WMEMPCPY=0
+  fi
+])
index 7bd360b..8fabf1c 100644 (file)
@@ -1,5 +1,5 @@
 # xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index fc7c1ab..64e8a4f 100644 (file)
@@ -1,5 +1,5 @@
 # xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/xstrndup.m4 b/m4/xstrndup.m4
deleted file mode 100644 (file)
index 457bcc3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2018 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_XSTRNDUP],
-[
-  gl_PREREQ_XSTRNDUP
-])
-
-# Prerequisites of lib/xstrndup.c.
-AC_DEFUN([gl_PREREQ_XSTRNDUP], [
-  :
-])
index 4f86f01..e6cdef5 100644 (file)
@@ -1,5 +1,5 @@
 #serial 11
-dnl Copyright (C) 2002-2007, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2007, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 6670b21..20a1a06 100644 (file)
@@ -1,5 +1,5 @@
 # xvasprintf.m4 serial 2
-dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/year2038.m4 b/m4/year2038.m4
new file mode 100644 (file)
index 0000000..ad7f303
--- /dev/null
@@ -0,0 +1,112 @@
+# year2038.m4 serial 5
+dnl Copyright (C) 2017-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Attempt to ensure that 'time_t' is a 64-bit type
+dnl and that the functions time(), stat(), etc. return 64-bit times.
+
+AC_DEFUN([gl_YEAR2038_EARLY],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  case "$host_os" in
+    mingw*)
+      AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+        [For 64-bit time_t on 32-bit mingw.])
+      ;;
+  esac
+])
+
+# gl_YEAR2038_TEST_INCLUDES
+# -------------------------
+AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
+[[
+  #include <time.h>
+  /* Check that time_t can represent 2**63 - 1 correctly.
+     We can't simply define LARGE_TIME_T to be 9223372036854775807,
+     since some C++ compilers masquerading as C compilers
+     incorrectly reject 9223372036854775807.  */
+  #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31 << 31))
+  int verify_time_t_range[(LARGE_TIME_T % 2147483629 == 721
+                           && LARGE_TIME_T % 2147483647 == 1)
+                          ? 1 : -1];
+]])
+
+# gl_YEAR2038_BODY(REQUIRE-64-BIT)
+----------------------------------
+AC_DEFUN([gl_YEAR2038_BODY],
+[
+ AC_ARG_ENABLE([year2038],
+   [  --disable-year2038      omit support for timestamps past the year 2038])
+ AS_IF([test "$enable_year2038" != no],
+ [
+  dnl On many systems, time_t is already a 64-bit type.
+  dnl On those systems where time_t is still 32-bit, it requires kernel
+  dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux,
+  dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM.
+  dnl
+  dnl On native Windows, the system include files define types __time32_t
+  dnl and __time64_t. By default, time_t is an alias of
+  dnl   - __time32_t on 32-bit mingw,
+  dnl   - __time64_t on 64-bit mingw and on MSVC (since MSVC 8).
+  dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an
+  dnl alias of __time64_t.
+  dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of
+  dnl __time32_t.
+  AC_CACHE_CHECK([for 64-bit time_t], [gl_cv_type_time_t_64],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])],
+       [gl_cv_type_time_t_64=yes], [gl_cv_type_time_t_64=no])
+    ])
+  if test "$gl_cv_type_time_t_64" = no; then
+    AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64],
+      [gl_cv_type_time_t_bits_macro],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_SOURCE([[#define _TIME_BITS 64
+                           #define _FILE_OFFSET_BITS 64
+                           ]gl_YEAR2038_TEST_INCLUDES])],
+         [gl_cv_type_time_t_bits_macro=yes],
+         [gl_cv_type_time_t_bits_macro=no])
+      ])
+    if test "$gl_cv_type_time_t_bits_macro" = yes; then
+      AC_DEFINE([_TIME_BITS], [64],
+        [Number of bits in a timestamp, on hosts where this is settable.])
+      dnl AC_SYS_LARGFILE also defines this; it's OK if we do too.
+      AC_DEFINE([_FILE_OFFSET_BITS], [64],
+        [Number of bits in a file offset, on hosts where this is settable.])
+      gl_cv_type_time_t_64=yes
+    fi
+  fi
+  if test $gl_cv_type_time_t_64 = no; then
+    AC_COMPILE_IFELSE(
+      [AC_LANG_SOURCE(
+         [[#ifdef _USE_32BIT_TIME_T
+             int ok;
+           #else
+             error fail
+           #endif
+         ]])],
+      [AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type. Remove _USE_32BIT_TIME_T from the compiler flags.])],
+      [# If not cross-compiling and $1 says we should check,
+       # and 'touch' works with a large timestamp, then evidently 64-bit time_t
+       # is desired and supported, so fail and ask the builder to fix the
+       # problem.  Otherwise, just warn the builder.
+       m4_ifval([$1],
+         [if test $cross_compiling = no \
+             && TZ=UTC0 touch -t 210602070628.16 conftest.time 2>/dev/null; then
+            rm -f conftest.time
+            AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type, which your system appears to support. You might try configuring with 'CPPFLAGS="-m64" LDFLAGS="-m64"'. To build with a 32-bit time_t anyway (not recommended), configure with '--disable-year2038'.])
+          fi])
+       if test "$gl_warned_about_64_bit_time_t" != yes; then
+         AC_MSG_WARN([This package requires a 64-bit 'time_t' type if there is any way to access timestamps outside the year range 1901-2038 on your platform. Perhaps you should configure with 'CPPFLAGS="-m64" LDFLAGS="-m64"'?])
+         gl_warned_about_64_bit_time_t=yes
+       fi
+      ])
+  fi])
+])
+
+AC_DEFUN([gl_YEAR2038],
+[
+  gl_YEAR2038_BODY([require-64-bit])
+])
diff --git a/m4/zzgnulib.m4 b/m4/zzgnulib.m4
new file mode 100644 (file)
index 0000000..b953384
--- /dev/null
@@ -0,0 +1,23 @@
+# zzgnulib.m4 serial 1
+dnl Copyright (C) 2020-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts after all other
+dnl package- or gnulib-provided .m4 files - at least for those packages
+dnl that redefine AC_PROG_CC.
+
+dnl Redefine AC_PROG_CC so that it ends with invocations of gl_COMPILER_CLANG
+dnl and gl_COMPILER_PREPARE_CHECK_DECL.
+m4_define([AC_PROG_CC],
+  m4_defn([AC_PROG_CC])[
+gl_COMPILER_CLANG
+gl_COMPILER_PREPARE_CHECK_DECL
+])
+
+# gl_ZZGNULIB
+# -----------
+# Witness macro that this file has been included.  Needed to force
+# Automake to include this file after all other gnulib .m4 files.
+AC_DEFUN([gl_ZZGNULIB])
index 4889eba..044254b 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -2,7 +2,7 @@
 # This Makefile fragment tries to be general-purpose enough to be
 # used by many projects via the gnulib maintainer-makefile module.
 
-## Copyright (C) 2001-2018 Free Software Foundation, Inc.
+## Copyright (C) 2001-2021 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 ME := maint.mk
 
+# These variables ought to be defined through the configure.ac section
+# of the module description. But some packages import this file directly,
+# ignoring the module description.
+AWK ?= awk
+GREP ?= grep
+SED ?= sed
+
 # Helper variables.
 _empty =
 _sp = $(_empty) $(_empty)
@@ -46,7 +53,7 @@ member-check =                                                                \
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
-  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+  $(shell gzip --help 2>/dev/null|$(GREP) rsyncable >/dev/null \
     && printf %s --rsyncable)
 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
 
@@ -57,7 +64,11 @@ VC_LIST = $(srcdir)/$(_build-aux)/vc-list-files -C $(srcdir)
 
 # You can override this variable in cfg.mk if your gnulib submodule lives
 # in a different location.
-gnulib_dir ?= $(srcdir)/gnulib
+gnulib_dir ?= $(shell if test -d $(srcdir)/gnulib; then \
+                       echo $(srcdir)/gnulib; \
+               else \
+                       echo ${GNULIB_SRCDIR}; \
+               fi)
 
 # You can override this variable in cfg.mk to set your own regexp
 # matching files to ignore.
@@ -83,9 +94,9 @@ _sc_excl = \
   $(or $(exclude_file_name_regexp--$@),^$$)
 VC_LIST_EXCEPT = \
   $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \
-       | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
-         else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
-       | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
+       | if test -f $(srcdir)/.x-$@; then $(GREP) -vEf $(srcdir)/.x-$@; \
+         else $(GREP) -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+       | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \
        $(_prepend_srcdir_prefix)
 
 ifeq ($(origin prev_version_file), undefined)
@@ -156,7 +167,7 @@ ifneq ($(_gl-Makefile),)
 _cfg_mk := $(wildcard $(srcdir)/cfg.mk)
 
 # Collect the names of rules starting with 'sc_'.
-syntax-check-rules := $(sort $(shell $(SED) -n \
+syntax-check-rules := $(sort $(shell env LC_ALL=C $(SED) -n \
    's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk)))
 .PHONY: $(syntax-check-rules)
 
@@ -184,7 +195,7 @@ $(sc_z_rules_): %.z: %
        @end=$$(date +%s.%N);                                           \
        start=$$(cat .sc-start-$*);                                     \
        rm -f .sc-start-$*;                                             \
-       awk -v s=$$start -v e=$$end                                     \
+       $(AWK) -v s=$$start -v e=$$end                                  \
          'END {printf "%.2f $(patsubst sc_%,%,$*)\n", e - s}' < /dev/null
 
 # The patsubst here is to replace each sc_% rule with its sc_%.z wrapper
@@ -292,42 +303,56 @@ define _sc_search_regexp
                                                                        \
    : Filter by file name;                                              \
    if test -n "$$in_files"; then                                       \
-     files=$$(find $(srcdir) | grep -E "$$in_files"                    \
-              | grep -Ev '$(_sc_excl)');                               \
+     files=$$(find $(srcdir) | $(GREP) -E "$$in_files"                 \
+              | $(GREP) -Ev '$(_sc_excl)');                            \
    else                                                                        \
      files=$$($(VC_LIST_EXCEPT));                                      \
      if test -n "$$in_vc_files"; then                                  \
-       files=$$(echo "$$files" | grep -E "$$in_vc_files");             \
+       files=$$(echo "$$files" | $(GREP) -E "$$in_vc_files");          \
      fi;                                                               \
    fi;                                                                 \
                                                                        \
    : Filter by content;                                                        \
-   test -n "$$files" && test -n "$$containing"                         \
-     && { files=$$(grep -l "$$containing" $$files); } || :;            \
-   test -n "$$files" && test -n "$$non_containing"                     \
-     && { files=$$(grep -vl "$$non_containing" $$files); } || :;       \
+   test -n "$$files"                                                   \
+     && test -n "$$containing"                                         \
+     && { files=$$(echo "$$files" | xargs $(GREP) -l "$$containing"); }        \
+     || :;                                                             \
+   test -n "$$files"                                                   \
+     && test -n "$$non_containing"                                     \
+     && { files=$$(echo "$$files" | xargs $(GREP) -vl "$$non_containing"); } \
+     || :;                                                             \
                                                                        \
    : Check for the construct;                                          \
    if test -n "$$files"; then                                          \
      if test -n "$$prohibit"; then                                     \
-       grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
-         | grep -vE "$${exclude:-^$$}"                                 \
-         && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
+       echo "$$files"                                                  \
+         | xargs $(GREP) $$with_grep_options $(_ignore_case) -nE       \
+               "$$prohibit" /dev/null                                  \
+         | $(GREP) -vE "$${exclude:-^$$}"                              \
+         && { msg="$$halt" $(_sc_say_and_exit) }                       \
+         || :;                                                         \
      else                                                              \
-       grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
-           | grep .                                                    \
-         && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
+       echo "$$files"                                                  \
+         | xargs                                                       \
+             $(GREP) $$with_grep_options $(_ignore_case) -LE "$$require" \
+         | $(GREP) .                                                   \
+         && { msg="$$halt" $(_sc_say_and_exit) }                       \
+         || :;                                                         \
      fi                                                                        \
    else :;                                                             \
    fi || :;
 endef
 
 sc_avoid_if_before_free:
-       @$(srcdir)/$(_build-aux)/useless-if-before-free                 \
-               $(useless_free_options)                                 \
-           $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) &&   \
-         { echo '$(ME): found useless "if" before "free" above' 1>&2;  \
-           exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | $(GREP) -v useless-if-before-free                           \
+         | xargs                                                       \
+             $(srcdir)/$(_build-aux)/useless-if-before-free            \
+             $(useless_free_options)                                   \
+         && { printf '$(ME): found useless "if"'                       \
+                     ' before "free" above\n' 1>&2;                    \
+              exit 1; }                                                \
+         || :
 
 sc_cast_of_argument_to_free:
        @prohibit='\<free *\( *\(' halt="don't cast free argument"      \
@@ -388,6 +413,43 @@ sc_prohibit_magic_number_exit:
        halt='use EXIT_* values rather than magic number'               \
          $(_sc_search_regexp)
 
+# Check that we don't use $< in non-implicit Makefile rules.
+#
+# To find the Makefiles, trace AC_CONFIG_FILES.  Using VC_LIST would
+# miss the Makefiles that are not under VC control (e.g., symlinks
+# installed for gettext).  "Parsing" (recursive) uses of SUBDIRS seems
+# too delicate.
+#
+# Use GNU Make's --print-data-base to normalize the rules into some
+# easy to parse format: they are separated by two \n.  Look for the
+# "section" about non-pattern rules (marked with "# Files") inside
+# which there are still the POSIX Make like implicit rules (".c.o").
+sc_prohibit_gnu_make_extensions_awk_ =                                 \
+  BEGIN {                                                              \
+      RS = "\n\n";                                                     \
+      in_rules = 0;                                                    \
+  }                                                                    \
+  /^\# Files/ {                                                                \
+      in_rules = 1;                                                    \
+  }                                                                    \
+  /\$$</ && in_rules && $$0 !~ /^(.*\n)*\.\w+(\.\w+)?:/ {              \
+      print "Error: " file ": $$< in a non implicit rule\n" $$0;       \
+      status = 1;                                                      \
+  }                                                                    \
+  END {                                                                        \
+     exit status;                                                      \
+  }
+sc_prohibit_gnu_make_extensions:
+       @if $(AWK) --version | grep GNU >/dev/null 2>&1; then           \
+         (cd $(srcdir) && autoconf --trace AC_CONFIG_FILES:'$$1') |    \
+           tr ' ' '\n' |                                               \
+           $(SED) -ne '/Makefile/{s/\.in$$//;p;}' |                    \
+           while read m; do                                            \
+             $(MAKE) -qp -f $$m .DUMMY-TARGET 2>/dev/null |            \
+               $(AWK) -v file=$$m -e '$($@_awk_)' || exit 1;           \
+           done;                                                       \
+       fi
+
 # Using EXIT_SUCCESS as the first argument to error is misleading,
 # since when that parameter is 0, error does not exit.  Use '0' instead.
 sc_error_exit_success:
@@ -399,25 +461,31 @@ sc_error_exit_success:
 # "FATAL:" should be fully upper-cased in error messages
 # "WARNING:" should be fully upper-cased, or fully lower-cased
 sc_error_message_warn_fatal:
-       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
-           | grep -E '"Warning|"Fatal|"fatal' &&                       \
-         { echo '$(ME): use FATAL, WARNING or warning' 1>&2;           \
-           exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null              \
+         | $(GREP) -E '"Warning|"Fatal|"fatal'                         \
+         && { echo '$(ME): use FATAL, WARNING or warning' 1>&2;        \
+              exit 1; }                                                \
+         || :
 
 # Error messages should not start with a capital letter
 sc_error_message_uppercase:
-       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
-           | grep -E '"[A-Z]'                                          \
-           | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' &&           \
-         { echo '$(ME): found capitalized error message' 1>&2;         \
-           exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null              \
+         | $(GREP) -E '"[A-Z]'                                         \
+         | $(GREP) -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX'             \
+         && { echo '$(ME): found capitalized error message' 1>&2;      \
+              exit 1; }                                                \
+         || :
 
 # Error messages should not end with a period
 sc_error_message_period:
-       @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT))              \
-           | grep -E '[^."]\."' &&                                     \
-         { echo '$(ME): found error message ending in period' 1>&2;    \
-           exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs $(GREP) -nEA2 '[^rp]error *\(' /dev/null              \
+         | $(GREP) -E '[^."]\."'                                       \
+         && { echo '$(ME): found error message ending in period' 1>&2; \
+              exit 1; }                                                \
+         || :
 
 sc_file_system:
        @prohibit=file''system                                          \
@@ -459,8 +527,8 @@ perl_config_h_first_ =                                                      \
 # You must include <config.h> before including any other header file.
 # This can possibly be via a package-specific header, if given by cfg.mk.
 sc_require_config_h_first:
-       @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then          \
-         files=$$($(VC_LIST_EXCEPT) | grep '\.c$$') &&                 \
+       @if $(VC_LIST_EXCEPT) | $(GREP) '\.c$$' > /dev/null; then       \
+         files=$$($(VC_LIST_EXCEPT) | $(GREP) '\.c$$') &&              \
          perl -n $(perl_config_h_first_) $$files ||                    \
            { echo '$(ME): the above files include some other header'   \
                'before <config.h>' 1>&2; exit 1; } || :;               \
@@ -478,10 +546,10 @@ sc_prohibit_HAVE_MBRTOWC:
 define _sc_header_without_use
   dummy=; : so we do not need a semicolon before each use;             \
   h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`;                        \
-  if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then                        \
-    files=$$(grep -l '^# *include '"$$h_esc"                           \
-            $$($(VC_LIST_EXCEPT) | grep '\.c$$')) &&                   \
-    grep -LE "$$re" $$files | grep . &&                                        \
+  if $(VC_LIST_EXCEPT) | $(GREP) '\.c$$' > /dev/null; then             \
+    files=$$($(GREP) -l '^# *include '"$$h_esc"                                \
+            $$($(VC_LIST_EXCEPT) | $(GREP) '\.c$$')) &&                \
+    $(GREP) -LE "$$re" $$files | $(GREP) . &&                          \
       { echo "$(ME): the above files include $$h but don't use it"     \
        1>&2; exit 1; } || :;                                           \
   else :;                                                              \
@@ -511,7 +579,7 @@ sc_prohibit_quote_without_use:
 
 # Don't include this header unless you use one of its functions.
 sc_prohibit_long_options_without_use:
-       @h='long-options.h' re='\<parse_long_options *\(' \
+       @h='long-options.h' re='\<parse_(long_options|gnu_standard_options_only) *\(' \
          $(_sc_header_without_use)
 
 # Don't include this header unless you use one of its functions.
@@ -585,7 +653,7 @@ sc_prohibit_safe_read_without_use:
 
 sc_prohibit_argmatch_without_use:
        @h='argmatch.h' \
-       re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
+       re='(\<(ARGMATCH_DEFINE_GROUP|ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<(invalid_arg|argmatch(_exit_fn|_(in)?valid)?) *\()' \
          $(_sc_header_without_use)
 
 sc_prohibit_canonicalize_without_use:
@@ -735,9 +803,9 @@ Exit_base := $(notdir $(Exit_witness_file))
 sc_require_test_exit_idiom:
        @if test -f $(srcdir)/$(Exit_witness_file); then                \
          die=0;                                                        \
-         for i in $$(grep -l -F 'srcdir/$(Exit_base)'                  \
+         for i in $$($(GREP) -l -F 'srcdir/$(Exit_base)'               \
                $$($(VC_LIST) tests)); do                               \
-           tail -n1 $$i | grep '^Exit .' > /dev/null                   \
+           tail -n1 $$i | $(GREP) '^Exit .' > /dev/null                \
              && : || { die=1; echo $$i; }                              \
          done;                                                         \
          test $$die = 1 &&                                             \
@@ -842,18 +910,23 @@ endef
 # Don't define macros that we already get from gnulib header files.
 sc_prohibit_always-defined_macros:
        @if test -d $(gnulib_dir); then                                 \
-         case $$(echo all: | grep -l -f - Makefile) in Makefile);; *)  \
+         case $$(echo all: | $(GREP) -l -f - Makefile) in Makefile);; *) \
            echo '$(ME): skipping $@: you lack GNU grep' 1>&2; exit 0;; \
          esac;                                                         \
-         $(def_sym_regex) | grep -E -f - $$($(VC_LIST_EXCEPT))         \
-           && { echo '$(ME): define the above via some gnulib .h file' \
-                 1>&2;  exit 1; } || :;                                \
+         regex=$$($(def_sym_regex)); export regex;                     \
+         $(VC_LIST_EXCEPT)                                             \
+           | xargs sh -c 'echo $$regex | $(GREP) -E -f - "$$@"'        \
+               dummy /dev/null                                         \
+           && { printf '$(ME): define the above'                       \
+                       ' via some gnulib .h file\n' 1>&2;              \
+                exit 1; }                                              \
+           || :;                                                       \
        fi
 # ==================================================================
 
 # Prohibit checked in backup files.
 sc_prohibit_backup_files:
-       @$(VC_LIST) | grep '~$$' &&                             \
+       @$(VC_LIST) | $(GREP) '~$$' &&                                  \
          { echo '$(ME): found version controlled backup file' 1>&2;    \
            exit 1; } || :
 
@@ -927,9 +1000,11 @@ require_exactly_one_NL_at_EOF_ =                                  \
     }                                                                  \
   END { exit defined $$fail }
 sc_prohibit_empty_lines_at_EOF:
-       @perl -le '$(require_exactly_one_NL_at_EOF_)' $$($(VC_LIST_EXCEPT)) \
-         || { echo '$(ME): empty line(s) or no newline at EOF'         \
-               1>&2; exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs perl -le '$(require_exactly_one_NL_at_EOF_)'          \
+         || { echo '$(ME): empty line(s) or no newline at EOF' 1>&2;   \
+              exit 1; }                                                \
+         || :
 
 # Make sure we don't use st_blocks.  Use ST_NBLOCKS instead.
 # This is a bit of a kludge, since it prevents use of the string
@@ -972,9 +1047,12 @@ prohibit_doubled_word_ =                                          \
 ignore_doubled_word_match_RE_ ?= ^$$
 
 sc_prohibit_doubled_word:
-       @perl -n -0777 $(prohibit_doubled_word_) $$($(VC_LIST_EXCEPT))  \
-         | grep -vE '$(ignore_doubled_word_match_RE_)'                 \
-         | grep . && { echo '$(ME): doubled words' 1>&2; exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs perl -n -0777 $(prohibit_doubled_word_)               \
+         | $(GREP) -vE '$(ignore_doubled_word_match_RE_)'              \
+         | $(GREP) .                                                   \
+         && { echo '$(ME): doubled words' 1>&2; exit 1; }              \
+         || :
 
 # A regular expression matching undesirable combinations of words like
 # "can not"; this matches them even when the two words appear on different
@@ -998,10 +1076,12 @@ prohibit_undesirable_word_seq_ =                                 \
 ignore_undesirable_word_sequence_RE_ ?= ^$$
 
 sc_prohibit_undesirable_word_seq:
-       @perl -n -0777 $(prohibit_undesirable_word_seq_)                \
-            $$($(VC_LIST_EXCEPT))                                      \
-         | grep -vE '$(ignore_undesirable_word_sequence_RE_)' | grep . \
-         && { echo '$(ME): undesirable word sequence' >&2; exit 1; } || :
+       @$(VC_LIST_EXCEPT)                                              \
+         | xargs perl -n -0777 $(prohibit_undesirable_word_seq_)       \
+         | $(GREP) -vE '$(ignore_undesirable_word_sequence_RE_)'       \
+         | $(GREP) .                                                   \
+         && { echo '$(ME): undesirable word sequence' >&2; exit 1; }   \
+         || :
 
 # Except for shell files and for loops, double semicolon is probably a mistake
 sc_prohibit_double_semicolon:
@@ -1033,7 +1113,8 @@ sc_prohibit_test_double_equal:
 # definition of LDADD from the appropriate Makefile.am and exits 0
 # when it contains "ICONV".
 sc_proper_name_utf8_requires_ICONV:
-       @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
+       @progs=$$($(VC_LIST_EXCEPT)                                     \
+                   | xargs $(GREP) -l 'proper_name_utf8 ''("');        \
        if test "x$$progs" != x; then                                   \
          fail=0;                                                       \
          for p in $$progs; do                                          \
@@ -1042,7 +1123,7 @@ sc_proper_name_utf8_requires_ICONV:
              -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)'  \
              $$dir/Makefile.am && continue;                            \
            base=$$(basename "$$p" .c);                                 \
-           grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
+           $(GREP) "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null      \
              || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
          done;                                                         \
          test $$fail = 1 &&                                            \
@@ -1103,12 +1184,12 @@ sc_makefile_at_at_check:
           -e ' && !/(\w+)\s+=.*\@\1\@$$/'                              \
           -e ''$(_makefile_at_at_check_exceptions)                     \
          -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}'    \
-           $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
+           $$($(VC_LIST_EXCEPT) | $(GREP) -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
          && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
 
 news-check: NEWS
        $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $<            \
-           | grep -E $(news-check-regexp) >/dev/null; then             \
+           | $(GREP) -E $(news-check-regexp) >/dev/null; then          \
          :;                                                            \
        else                                                            \
          echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2;      \
@@ -1153,12 +1234,13 @@ generated_files ?= $(srcdir)/lib/*.[ch]
 _gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
 sc_po_check:
        @if test -f $(po_file); then                                    \
-         grep -E -v '^(#|$$)' $(po_file)                               \
-           | grep -v '^src/false\.c$$' | sort > $@-1;                  \
-         files=$$(perl $(perl_translatable_files_list_)                \
-           $$($(VC_LIST_EXCEPT)) $(generated_files));                  \
-         grep -E -l '$(_gl_translatable_string_re)' $$files            \
-           | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2;   \
+         $(GREP) -E -v '^(#|$$)' $(po_file)                            \
+           | $(GREP) -v '^src/false\.c$$' | sort > $@-1;               \
+         { $(VC_LIST_EXCEPT); echo $(generated_files); }               \
+           | xargs perl $(perl_translatable_files_list_)               \
+           | xargs $(GREP) -E -l '$(_gl_translatable_string_re)'       \
+           | $(SED) 's|^$(_dot_escaped_srcdir)/||'                     \
+           | sort -u > $@-2;                                           \
          diff -u -L $(po_file) -L $(po_file) $@-1 $@-2                 \
            || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; };   \
          rm -f $@-1 $@-2;                                              \
@@ -1222,18 +1304,21 @@ _hv_regex_weak ?= ^ *\. .*/init\.sh"
 _hv_regex_strong ?= ^ *\. "\$${srcdir=\.}/init\.sh"
 sc_cross_check_PATH_usage_in_tests:
        @if test -f $(_hv_file); then                                   \
-         grep -l 'VERSION mismatch' $(_hv_file) >/dev/null             \
+         $(GREP) -l 'VERSION mismatch' $(_hv_file) >/dev/null          \
            || { echo "$@: skipped: no such file: $(_hv_file)" 1>&2;    \
                 exit 0; };                                             \
-         grep -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null         \
+         $(GREP) -lE '$(_hv_regex_strong)' $(_hv_file) >/dev/null      \
            || { echo "$@: $(_hv_file) lacks conforming use of init.sh" 1>&2; \
                 exit 1; };                                             \
-         good=$$(grep -E '$(_hv_regex_strong)' $(_hv_file));           \
-         grep -LFx "$$good"                                            \
-               $$(grep -lE '$(_hv_regex_weak)' $$($(VC_LIST_EXCEPT)))  \
-             | grep . &&                                               \
-           { echo "$(ME): the above files use path_prepend_ inconsistently" \
-               1>&2; exit 1; } || :;                                   \
+         good=$$($(GREP) -E '$(_hv_regex_strong)' $(_hv_file));        \
+         $(VC_LIST_EXCEPT)                                             \
+           | xargs $(GREP) -lE '$(_hv_regex_weak)'                     \
+           | xargs $(GREP) -LFx "$$good"                               \
+           | $(GREP) .                                                 \
+           && { printf "$(ME): the above files use"                    \
+                       " path_prepend_ inconsistently\n" 1>&2;         \
+                exit 1; }                                              \
+           || :;                                                       \
        fi
 
 # BRE regex of file contents to identify a test script.
@@ -1305,7 +1390,7 @@ gpg_key_ID ?=                                                             \
   $$(cd $(srcdir)                                                      \
      && git cat-file tag v$(VERSION)                                   \
         | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null    \
-        | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
+        | $(AWK) '/^\[GNUPG:\] ERRSIG / {print $$3; exit}')
 
 translation_project_ ?= coordinator@translationproject.org
 
@@ -1324,7 +1409,7 @@ announcement_mail_headers_alpha =         \
 announcement_mail_Cc_beta = $(announcement_mail_Cc_alpha)
 announcement_mail_headers_beta = $(announcement_mail_headers_alpha)
 
-announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
+announcement_Cc_ ?= $(announcement_Cc_$(release-type))
 announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
 announcement: NEWS ChangeLog $(rel-files)
 # Not $(AM_V_GEN) since the output of this command serves as
@@ -1426,7 +1511,7 @@ check: $(gl_public_submodule_commit)
 ALL_RECURSIVE_TARGETS += alpha beta stable
 alpha beta stable: $(local-check) writable-files $(submodule-checks)
        $(AM_V_GEN)test $@ = stable                                     \
-         && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$'         \
+         && { echo $(VERSION) | $(GREP) -E '^[0-9]+(\.[0-9]+)+$$'      \
               || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
          || :
        $(AM_V_at)$(MAKE) vc-diff-check
@@ -1524,7 +1609,7 @@ refresh-gnulib-patches:
               -e 'END{defined $$d and print $$d}' bootstrap.conf);     \
          test -n "$$t" && gl=$$t;                                      \
        fi;                                                             \
-       for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do     \
+       for diff in $$(cd $$gl; git ls-files | $(GREP) '\.diff$$'); do  \
          b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//');               \
          VERSION_CONTROL=none                                          \
            patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1;          \
@@ -1567,7 +1652,7 @@ update-copyright-env ?=
 # in the file .x-update-copyright.
 .PHONY: update-copyright
 update-copyright:
-       $(AM_V_GEN)grep -l -w Copyright                                  \
+       $(AM_V_GEN)$(GREP) -l -w Copyright                               \
          $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
          | $(update-copyright-env) xargs $(srcdir)/$(_build-aux)/$@
 
@@ -1581,9 +1666,9 @@ _gl_TS_dir ?= src
 ALL_RECURSIVE_TARGETS += sc_tight_scope
 sc_tight_scope: tight-scope.mk
        @fail=0;                                                        \
-       if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk        \
+       if ! $(GREP) '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk     \
                > /dev/null                                             \
-          && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
+          && ! $(GREP) -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
                > /dev/null 2>&1; then                                  \
            echo '$(ME): skipping $@';                                  \
        else                                                            \
@@ -1655,12 +1740,12 @@ _gl_tight_scope: $(bin_PROGRAMS)
        hdr=`for f in $(_gl_TS_headers); do                             \
               test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
        ( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions);     \
-         grep -h -A1 '^extern .*[^;]$$' $$src                          \
-           | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d';    \
+         $(GREP) -h -A1 '^extern .*[^;]$$' $$src                       \
+           | $(GREP) -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d'; \
          perl -lne                                                     \
             '$(_gl_TS_function_match) and print $$1' $$hdr;            \
        ) | sort -u | $(SED) "$$sed_wrap" > $$t;                        \
-       nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \
+       nm -g $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|$(GREP) -Ev -f $$t \
          && { echo the above functions should have static scope >&2;   \
               exit 1; } || : ;                                         \
        ( printf '%s\n' '__.*' main $(_gl_TS_unmarked_extern_vars);     \
@@ -1668,7 +1753,7 @@ _gl_tight_scope: $(bin_PROGRAMS)
                $$hdr $(_gl_TS_other_headers)                           \
        ) | sort -u | $(SED) "$$sed_wrap" > $$t;                        \
        nm -g $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p'       \
-            | sort -u | grep -Ev -f $$t                                        \
+            | sort -u | $(GREP) -Ev -f $$t                             \
          && { echo the above variables should have static scope >&2;   \
               exit 1; } || :
 # TS-end
index 8ac311f..73073d8 100644 (file)
@@ -1,6 +1,6 @@
 # Automakefile for GNU diffutils man pages
 
-# Copyright (C) 2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,8 @@ bin_dir = ../src
 $(dist_man1_MANS): $(SRC_VERSION_C) help2man
        $(AM_V_GEN)base=`expr $@ : '\(.*\).1'`                          \
          && test -x $(bin_dir)/$$base                                  \
-         && (echo '[NAME]' && sed 's@/\* *@@; s/-/\\-/; q' $S/$$base.c) \
+         && (echo '[NAME]'                                             \
+              && sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c)   \
             | PATH="$(bin_dir)$(PATH_SEPARATOR)$$PATH"                 \
               $(srcdir)/help2man -i - -i $(srcdir)/$$base.x            \
                 -S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@
index e8409e1..6968f6a 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 
 # Automakefile for GNU diffutils man pages
 
-# Copyright (C) 2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -109,11 +109,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -123,13 +125,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -137,49 +140,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -187,30 +198,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -291,9 +305,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -308,321 +325,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -657,13 +764,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -685,17 +793,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -711,7 +823,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -720,7 +831,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -743,11 +854,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -764,10 +934,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -781,14 +956,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -802,23 +982,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -857,12 +1038,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -883,20 +1067,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -905,8 +1103,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -927,6 +1127,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -936,6 +1138,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -959,6 +1162,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -968,6 +1173,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -992,31 +1198,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1036,6 +1254,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1043,10 +1262,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1068,7 +1290,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1080,29 +1304,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1114,6 +1394,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1124,6 +1405,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1150,6 +1436,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1158,6 +1445,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1171,10 +1459,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1334,7 +1624,6 @@ ctags CTAGS:
 
 cscope cscopelist:
 
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1499,7 +1788,8 @@ sdiff.1: $S/sdiff.c sdiff.x
 $(dist_man1_MANS): $(SRC_VERSION_C) help2man
        $(AM_V_GEN)base=`expr $@ : '\(.*\).1'`                          \
          && test -x $(bin_dir)/$$base                                  \
-         && (echo '[NAME]' && sed 's@/\* *@@; s/-/\\-/; q' $S/$$base.c) \
+         && (echo '[NAME]'                                             \
+              && sed 's@/\* *@@; s/-/\\-/;s/^GNU //; q' $S/$$base.c)   \
             | PATH="$(bin_dir)$(PATH_SEPARATOR)$$PATH"                 \
               $(srcdir)/help2man -i - -i $(srcdir)/$$base.x            \
                 -S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@
index 6ad769d..2f364d7 100644 (file)
--- a/man/cmp.1
+++ b/man/cmp.1
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH GNU "1" "December 2018" "diffutils 3.7" "User Commands"
+.TH CMP "1" "August 2021" "diffutils 3.8" "User Commands"
 .SH NAME
-GNU cmp \- compare two files byte by byte
+cmp \- compare two files byte by byte
 .SH SYNOPSIS
 .B cmp
 [\fIOPTION\fR]... \fIFILE1 \fR[\fIFILE2 \fR[\fISKIP1 \fR[\fISKIP2\fR]]]
@@ -53,7 +53,7 @@ GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
 .br
 General help using GNU software: <https://www.gnu.org/gethelp/>
 .SH COPYRIGHT
-Copyright \(co 2018 Free Software Foundation, Inc.
+Copyright \(co 2021 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
@@ -62,13 +62,13 @@ There is NO WARRANTY, to the extent permitted by law.
 diff(1), diff3(1), sdiff(1)
 .PP
 The full documentation for
-.B GNU
+.B cmp
 is maintained as a Texinfo manual.  If the
 .B info
 and
-.B GNU
+.B cmp
 programs are properly installed at your site, the command
 .IP
-.B info GNU
+.B info cmp
 .PP
 should give you access to the complete manual.
index fc6e21c..5fbf246 100644 (file)
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH GNU "1" "December 2018" "diffutils 3.7" "User Commands"
+.TH DIFF "1" "August 2021" "diffutils 3.8" "User Commands"
 .SH NAME
-GNU diff \- compare files line by line
+diff \- compare files line by line
 .SH SYNOPSIS
 .B diff
 [\fIOPTION\fR]... \fIFILES\fR
@@ -218,8 +218,8 @@ keep NUM lines of the common prefix and suffix
 assume large files and many scattered small changes
 .TP
 \fB\-\-color\fR[=\fIWHEN\fR]
-colorize the output; WHEN can be 'never', 'always',
-or 'auto' (the default)
+color output; WHEN is 'never', 'always', or 'auto';
+plain \fB\-\-color\fR means \fB\-\-color=\fR'auto'
 .TP
 \fB\-\-palette\fR=\fIPALETTE\fR
 the colors to use when \fB\-\-color\fR is active; PALETTE is
@@ -245,7 +245,7 @@ GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
 .br
 General help using GNU software: <https://www.gnu.org/gethelp/>
 .SH COPYRIGHT
-Copyright \(co 2018 Free Software Foundation, Inc.
+Copyright \(co 2021 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
@@ -254,13 +254,13 @@ There is NO WARRANTY, to the extent permitted by law.
 wdiff(1), cmp(1), diff3(1), sdiff(1), patch(1)
 .PP
 The full documentation for
-.B GNU
+.B diff
 is maintained as a Texinfo manual.  If the
 .B info
 and
-.B GNU
+.B diff
 programs are properly installed at your site, the command
 .IP
-.B info GNU
+.B info diff
 .PP
 should give you access to the complete manual.
index 1bc2595..6522b94 100644 (file)
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH GNU "1" "December 2018" "diffutils 3.7" "User Commands"
+.TH DIFF3 "1" "August 2021" "diffutils 3.8" "User Commands"
 .SH NAME
-GNU diff3 \- compare three files line by line
+diff3 \- compare three files line by line
 .SH SYNOPSIS
 .B diff3
 [\fIOPTION\fR]... \fIMYFILE OLDFILE YOURFILE\fR
@@ -79,7 +79,7 @@ GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
 .br
 General help using GNU software: <https://www.gnu.org/gethelp/>
 .SH COPYRIGHT
-Copyright \(co 2018 Free Software Foundation, Inc.
+Copyright \(co 2021 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
@@ -88,13 +88,13 @@ There is NO WARRANTY, to the extent permitted by law.
 cmp(1), diff(1), sdiff(1)
 .PP
 The full documentation for
-.B GNU
+.B diff3
 is maintained as a Texinfo manual.  If the
 .B info
 and
-.B GNU
+.B diff3
 programs are properly installed at your site, the command
 .IP
-.B info GNU
+.B info diff3
 .PP
 should give you access to the complete manual.
index 304985c..49a76e5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 # Generate a short man page from --help and --version output.
-# Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2018 Free Software Foundation,
+# Copyright (C) 1997-2005, 2009-2011, 2013, 2015-2021 Free Software Foundation,
 # Inc.
 
 # This program is free software; you can redistribute it and/or modify
index 8dc42b2..5a83d6b 100644 (file)
@@ -1,7 +1,7 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH GNU "1" "December 2018" "diffutils 3.7" "User Commands"
+.TH SDIFF "1" "August 2021" "diffutils 3.8" "User Commands"
 .SH NAME
-GNU sdiff \- side-by-side merge of file differences
+sdiff \- side-by-side merge of file differences
 .SH SYNOPSIS
 .B sdiff
 [\fIOPTION\fR]... \fIFILE1 FILE2\fR
@@ -81,7 +81,7 @@ GNU diffutils home page: <https://www.gnu.org/software/diffutils/>
 .br
 General help using GNU software: <https://www.gnu.org/gethelp/>
 .SH COPYRIGHT
-Copyright \(co 2018 Free Software Foundation, Inc.
+Copyright \(co 2021 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
 .br
 This is free software: you are free to change and redistribute it.
@@ -90,13 +90,13 @@ There is NO WARRANTY, to the extent permitted by law.
 cmp(1), diff(1), diff3(1)
 .PP
 The full documentation for
-.B GNU
+.B sdiff
 is maintained as a Texinfo manual.  If the
 .B info
 and
-.B GNU
+.B sdiff
 programs are properly installed at your site, the command
 .IP
-.B info GNU
+.B info sdiff
 .PP
 should give you access to the complete manual.
index 8a3afda..80c7cf4 100644 (file)
@@ -14,11 +14,14 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
  --flag=N_:1:pass-c-format\
  --flag=error:3:c-format --flag=error_at_line:5:c-format\
 \
+ --flag=asnprintf:3:c-format\
+ --flag=asprintf:2:c-format\
  --from-code=UTF-8\
- --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\
- --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\
- --flag=message:1:c-format --flag=message5:1:c-format\
+ --flag=message:1:c-format\
+ --flag=message5:1:c-format\
  --flag=try_help:1:c-format\
+ --flag=vasprintf:2:c-format\
+ --flag=vasnprintf:3:c-format\
  $${end_of_xgettext_options+}
 
 # This is the copyright holder that gets inserted into the header of the
index 2f02513..b4f8ef8 100644 (file)
@@ -1,6 +1,6 @@
 # List of files that contain translatable strings.
 
-# Copyright (C) 2001-2002, 2009-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2009-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 lib/argmatch.c
+lib/argmatch.h
 lib/c-stack.c
 lib/error.c
 lib/file-type.c
@@ -24,7 +25,7 @@ lib/quotearg.c
 lib/regcomp.c
 lib/xalloc-die.c
 lib/xfreopen.c
-lib/xstrtol-error.c
+lib/xstdopen.c
 lib/version-etc.c
 
 src/analyze.c
index 5e1bb43..fb2d988 100644 (file)
Binary files a/po/bg.gmo and b/po/bg.gmo differ
index 3bc9def..5c7607f 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -1,14 +1,14 @@
 # Bulgarian translation of GNU diffutils po-file.
-# Copyright (C) 2017, 2018 Free Software Foundation, Inc.
+# Copyright (C) 2017, 2018, 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Alexander Shopov <ash@kambanaria.org>, 2017, 2018.
+# Alexander Shopov <ash@kambanaria.org>, 2017, 2018, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-27 17:27+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 18:17+0200\n"
 "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
 "Language-Team: Bulgarian <dict@ludost.net>\n"
 "Language: bg\n"
@@ -18,25 +18,25 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "аргументът „%s“ на опцията „%s“ е неправилен"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "аргументът „%s“ на опцията „%s“ не е еднозначен"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Възможните аргументи са:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "програмна грешка"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "препълване на стека"
 
@@ -196,11 +196,11 @@ msgstr "%s: опцията изисква аргумент — „%c“\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "“"
 
@@ -272,7 +272,7 @@ msgstr "Регулярният израз е прекалено голям"
 msgid "Unmatched ) or \\)"
 msgstr "„)“ или „\\)“ без еш"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Няма предхождащ регулярен израз"
 
@@ -280,41 +280,31 @@ msgstr "Няма предхождащ регулярен израз"
 msgid "memory exhausted"
 msgstr "паметта е изчерпана"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "стандартен вход"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "стандартен изход"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "стандартна грешка"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "непознат поток"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "файлът „%s“ не може да се отвори наново с режим „%s“"
 
-#: lib/xstrtol-error.c:63
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "неправилен аргумент „%3$s“ за опцията „%1$s%2$s“"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "неправилен суфикс в аргумента „%3$s“ за опцията „%1$s%2$s“"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "прекалено дълъг аргумент „%3$s“ за опцията „%1$s%2$s“"
+msgid "standard file descriptors"
+msgstr "стандартни файлови дескриптори"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -333,39 +323,32 @@ msgstr "Пакетирано от %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Лиценз — Общ публичен лиценз на GNU (GNU GPL), както е публикуван от "
-"Фондацията\n"
-"за свободен софтуер — версия 3 на лиценза или (по ваше решение) по-късна "
-"версия.\n"
-"<https://gnu.org/licenses/gpl.html>\n"
-"Тази програма е свободен софтуер. Можете да я разпространявате и/или "
-"променяте.\n"
-"Тя се разпространява БЕЗ НИКАКВИ ГАРАНЦИИ доколкото е позволено от закона.\n"
+"Лиценз GPLv3+: ОПЛ на GNU, версия 3 или по-висока <%s>\n"
+"Това е свободен софтуер. Можете да го променяте и разпространявате.\n"
+"Няма НИКАКВИ ГАРАНЦИИ до степента позволена от закона.\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Създадено от %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Създадено от %s и %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Създадено от %s, %s и %s.\n"
@@ -373,7 +356,7 @@ msgstr "Създадено от %s, %s и %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +368,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +380,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +392,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +404,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +418,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +432,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,36 +447,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Докладвайте грешки в програмата на адрес: %s\n"
 "Докладвайте грешки в превода на адрес: <dict@ludost.net>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Докладвайте грешки в „%s“ на адрес: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Уеб страница на „%s“: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Уеб Ñ\81Ñ\82Ñ\80аниÑ\86а Ð½Ð° â\80\9e%sâ\80\9c: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Ð\9eбÑ\89а Ð¿Ð¾Ð¼Ð¾Ñ\89 Ð·Ð° Ð¿Ñ\80огÑ\80амиÑ\82е Ð½Ð° GNU: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Обща помощ за програмите на GNU: <https://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Файловете „%s“ и „%s“ се различават\n"
@@ -503,56 +479,56 @@ msgstr "Файловете „%s“ и „%s“ се различават\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Двоичните файлове „%s“ и „%s“ се различават\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Липсва нов ред в края на файла"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Вижте „%s --help“ за повече информация."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "неправилна стойност „%s“ за опцията „--ignore-initial“"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "опциите „-l“ и „-s“ са несъвместими"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "неуспешен запис"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "стандартен изход"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          извеждане на различаващите се байтове"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=ПРЕСКАЧАНЕ\n"
 "                             ПРЕСКАЧАНЕ на този брой байтове и от двата\n"
 "                             входа"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -561,7 +537,7 @@ msgstr ""
 "                             прескачане на съответния брой байтове —\n"
 "                             ПРЕСКАЧАНЕ_1 от ФАЙЛ_1, ПРЕСКАЧАНЕ_2 от ФАЙЛ_2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
@@ -569,32 +545,32 @@ msgstr ""
 "различните\n"
 "                             байтове"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=БРОЙ           сравняване на максимум този БРОЙ байтове"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      без извеждане на обичайната информация"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 извеждане на тази помощ и изход"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              извеждане на версията и изход"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Употреба: %s [ОПЦИЯ]… ФАЙЛ_1 [ФАЙЛ_1 [ПРЕСКАЧАНЕ_1 [ПРЕСКАЧАНЕ_2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Побайтово сравнение на два файла"
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -603,7 +579,7 @@ msgstr ""
 "байтове,\n"
 "които да се прескочат от началото на всеки файл (броенето почва от 0)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
@@ -611,7 +587,7 @@ msgstr ""
 "късите\n"
 "варианти.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -622,144 +598,144 @@ msgstr ""
 "kB: 1000, K: 1024, MB: 1 000 000, M: 1 048 576,\n"
 "GB: 1 000 000 000, G: 1 073 741 824 и т.н. за „T“, „P“, „E“, „Z“ и „Y“."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Ако името на ФАЙЛ е „-“ или липсва, се чете от стандартния вход."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "Изходният код е 0 при еднаквост, 1 при разлика и 2 при грешка."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "неправилен аргумент „%s“ за опцията „--bytes“"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "липсва операнд след „%s“"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "излишен операнд след „%s“"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "„%s“ и „%s“ се различават: байт %s, ред  %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "„%s“ и „%s“ се различават: байт %s, ред  %s е %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: „EOF“ в празния „%s“\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: „EOF“ в „%s“ след байт %s, ред %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: „EOF“ в „%s“ след байт %s, на ред %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: „EOF“ в „%s“ след байт %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "неправилен размер на контекста „%s“"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "страницирането не се поддържа на този компютър"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "прекалено много операции за етикети на файл"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "неправилна широчина „%s“"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "опциите за широчина са в конфликт"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "неправилен обхват на хоризонта: „%s“"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "неправилен размер на табулатора: „%s“"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "противоречиви опции за размера на табулацията"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "указани са и двете опции „--from-file“ и „--to-file“"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  извеждане на разликите по обичайния начин\n"
 "                              (стандартно)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q, --brief                   извеждане на информация само при различни "
 "файлове"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  извеждане на информация при еднакви файлове"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
@@ -768,7 +744,7 @@ msgstr ""
 "контекст\n"
 "                              (стандартно е 3)"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
@@ -777,44 +753,44 @@ msgstr ""
 "контекст\n"
 "                              (стандартно е 3)"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      извеждане на скрипт на „ed“"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     разлика във формат „RCS“"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            изход в 2 колони"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=БРОЙ              извеждане на максимум този БРОЙ знаци на ред\n"
 "                              (стандартно е 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             извеждане само на лявата страна при еднакви "
 "редове"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   без извеждане на еднаквите редове"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         указване на имената на функциите на „C“, в "
 "които\n"
 "                              има промени"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=РЕГУЛЯРЕН_ИЗРАЗ\n"
@@ -822,7 +798,7 @@ msgstr ""
 "този\n"
 "                              РЕГУЛЯРЕН_ИЗРАЗ"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -830,18 +806,18 @@ msgstr ""
 "    --label ЕТИКЕТ            ползване на този ЕТИКЕТ вместо име на файл и\n"
 "                              момент във времето (може да го повторите)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             заместване на табулациите с интервали в изхода"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             подравняване на табулациите чрез добавяне на\n"
 "                              табулация отпред"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
@@ -849,33 +825,33 @@ msgstr ""
 "този\n"
 "                              брой знаци на ред"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    без извеждане на интервал или табулация пред\n"
 "                              празни редове"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                извеждане през командата „pr“ за странициране"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive               рекурсивно сравнение на директориите"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference          без следване на символните връзки"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                липсващите файлове да се обработват като празни"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   \n"
@@ -883,14 +859,14 @@ msgstr ""
 "като\n"
 "                              празни"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case   без разлика главни/малки при сравнение на "
 "имена\n"
 "                              на файлове"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case\n"
@@ -898,21 +874,21 @@ msgstr ""
 "имена\n"
 "                              на файлове"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=ШАБЛОН          прескачане на файловете с имена напасващи "
 "този\n"
 "                              ШАБЛОН"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=ФАЙЛ       прескачане на файловете с имена напасващи на\n"
 "                              някой от шаблоните в този ФАЙЛ"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
@@ -920,7 +896,7 @@ msgstr ""
 "този\n"
 "                              файл"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -928,7 +904,7 @@ msgstr ""
 "    --from-file=ФАЙЛ_1        сравняване на ФАЙЛ_1 с всички аргументи.\n"
 "                              ФАЙЛ_1 може да е и директория"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -936,7 +912,7 @@ msgstr ""
 "    --to-file=ФАЙЛ_2          сравняване на всички аргументи с ФАЙЛ_1.\n"
 "                              ФАЙЛ_2 може да е и директория"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
@@ -944,35 +920,35 @@ msgstr ""
 "на\n"
 "                              файловете"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion    без значение на замяната на табулации с\n"
 "                              интервали"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space   без значение на празните знаци в края на\n"
 "                              редовете"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change     без значение на промяната в празните знаци"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space        без значение на всички празни знаци"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines      без значение на промяната на празните редове"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=РЕГУЛЯРЕН_ИЗРАЗ\n"
@@ -980,41 +956,41 @@ msgstr ""
 "напасващи\n"
 "                              този РЕГУЛЯРЕН_ИЗРАЗ"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr ""
 "-a, --text                    всички файлове да се обработят като текст"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr       изтриване на последващите знаци „\\r“ на входа"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    четене и запис на данните в двоичен режим"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=ИМЕ               сливане чрез ползване на директиви „#ifdef ИМЕ“"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --ВИД_ГР-group-format=ФМТ_ГР\n"
 "                              форматиране на този ВИД_ГРупи на входа с този\n"
 "                              ФорМаТ_за_ГРупи"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=ФМТ_РД      форматиране на всички входни редови с този\n"
 "                              ФорМаТ_за_РеДове"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --ВИД_РД-line-format=ФМТ_РД\n"
@@ -1022,7 +998,7 @@ msgstr ""
 "този\n"
 "                              ФорМаТ_за_РеДове"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1030,7 +1006,7 @@ msgstr ""
 "  Тези опции дават повече контрол върху изведената информация, все едно \n"
 "  „-D/--ifdef“ на стероиди"
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  ВИД_РД е „old“ (стара), „new“ (нова) или „unchanged“ (непроменена).\n"
@@ -1038,7 +1014,7 @@ msgstr ""
 "„changed“\n"
 "           (променена)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1068,7 +1044,7 @@ msgstr ""
 "        M     L+1\n"
 "    %(A=B?T:E)  Ако A е равно на B, то T, в противен случай — E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1081,7 +1057,7 @@ msgstr ""
 "    %[-][ШИР][.[ТЧНС]]{doxX}n     форматиращ низ на printf за номерата на\n"
 "                                  входните редове"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1095,11 +1071,11 @@ msgstr ""
 "    %c'\\OOO'  знак с този осмичен номер\n"
 "    C         знакът „C“ (останалите знаци представляват себе си)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal                 търсене на по-малки разлики"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=БРОЙ      без прескачане на този БРОЙ еднакви редове в\n"
@@ -1107,24 +1083,26 @@ msgstr ""
 "откриване\n"
 "                              на по-малки разлики"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files       обработване на файловете все едно са големи с\n"
 "                              множество разпръснати, малки разлики"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=КОГАТО]          цветен изход, КОГАТО е „never“ (никога), "
 "„always“\n"
-"                              (винаги) или „auto“ (автоматично — стандартно)"
+"                              (винаги) или „auto“ (автоматично — "
+"стандартно).\n"
+"                              Без аргумент е  същото като „--color='auto'“"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1134,22 +1112,22 @@ msgstr ""
 "                              ПАЛИТРАта е списък с разделител „:“ от\n"
 "                              възможностите на „terminfo“"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help                    извеждане на тази помощ и изход"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version                 извеждане на версията и изход"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ФАЙЛовете са „ФАЙЛ_1 ФАЙЛ_2“, „ДИРЕКТОРИЯ_1 ДИРЕКТОРИЯ_2“, „ДИРЕКТОРИЯ ФАЙЛ“ "
 "или\n"
 "„ФАЙЛ ДИРЕКТОРИЯ“."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
@@ -1157,93 +1135,93 @@ msgstr ""
 "ограничения\n"
 "за ФАЙЛовете."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Ако за ФАЙЛ е използвано „-“, се чете от стандартния вход."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Употреба: %s [ОПЦИЯ]… ФАЙЛ…\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Поредово сравнение на ФАЙЛовете"
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "противоречив аргумент към опцията „%s“: „%s“"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "противоречащи си опции за стила на изведената информация"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "неправилен цвят „%s“"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Само в „%s“: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "„-“ не може да се сравни с директория"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "опцията „-D“ не се поддържа с директории"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Общи поддиректории: „%s“ и „%s“\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Файл „%s“ е %s, а файл „%s“ е %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Символните връзки „%s“ и „%s“ се различават\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Файловете „%s“ и „%s“ са еднакви\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "несъвместими опции"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "„-“ е указан за повече от един от входните файлове"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "неуспешно прочитане"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              извеждане на всички промени, конфликтите се\n"
 "                              заграждат"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1253,11 +1231,11 @@ msgstr ""
 "                              от ПЪРВОНАЧАЛНия_ФАЙЛ спрямо ЧУЖДия_ФАЙЛ в "
 "МОЯ_ФАЙЛ"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          като „-e“, но конфликтите се заграждат"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1266,7 +1244,7 @@ msgstr ""
 "не\n"
 "                              се припокриват"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
@@ -1274,18 +1252,18 @@ msgstr ""
 "се\n"
 "                              припокриват"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          като „-x“, но конфликтите се заграждат"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          добавяне на командите „w“ и „q“ към скриптовете "
 "за\n"
 "                              „ed“"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1294,26 +1272,26 @@ msgstr ""
 "при\n"
 "                              опцията „-A“ (ако не са зададени други опции)"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  всички файлове да се считат за текст"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     изтриване на последващите знаци „\\r“ на входа"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           подравняване на табулациите чрез добавяне на\n"
 "                              табулация отпред"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=ПРОГРАМА сравнение на файловете с тази ПРОГРАМА"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1321,24 +1299,24 @@ msgstr ""
 "-L, --label=ЕТИКЕТ          ползване на този ЕТИКЕТ вместо име на файл\n"
 "                              (може да го повторите до три пъти)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  извеждане на тази помощ и изход"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               извеждане не версията и изход"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Употреба: %s [ОПЦИЯ]… МОЙ_ФАЙЛ ПЪРВОНАЧАЛЕН_ФАЙЛ ЧУЖД_ФАЙЛ\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Поредово сравняване на три файла"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1361,45 +1339,45 @@ msgstr ""
 "се извежда директно слетият резултат.  Когато входът е необичаен, това\n"
 "дава по-добър резултат отколкото „ed“.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Изходният код е 0 при успех, 1 при конфликт и 2 при грешка."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "вътрешна грешка: неправилен формат на разликите"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: неуспешно изпълнение: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "вътрешна грешка: неправилен вид на разликата в „process_diff“"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "неправилен формат на разликата: грешен разделител на разлика"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "неправилен формат на разликата: последният ред не е завършен"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "допълнителната програма „%s“ не може да бъде стартирана"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "неправилен формат на разликата: грешни знаци в началото на реда"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "вътрешна грешка: зададен е неправилен вид на изхода"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "входен файл се смали"
 
@@ -1414,50 +1392,50 @@ msgid "%s: recursive directory loop"
 msgstr "%s: зацикляне при рекурсивна обработка на директориите"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=ФАЙЛ            интерактивен режим, изходът отива в този ФАЙЛ"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            пренебрегване на регистъра на буквите"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   пренебрегване на промените поради заместване "
 "на\n"
 "                               табулациите с интервали"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  пренебрегване на празните знаци в края на реда"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    пренебрегване на промените в празните знаци"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       пренебрегване на всички празни знаци"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     пренебрегване на промени, които са от празни "
 "редове"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=РЕГУЛЯРЕН_ИЗРАЗ\n"
@@ -1465,16 +1443,16 @@ msgstr ""
 "които\n"
 "                               напасват на този РЕГУЛЯРЕН_ИЗРАЗ"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      махане на последващите знаци „\\r“ на входа"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   всички файлове да се считат за текст"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
@@ -1482,23 +1460,23 @@ msgstr ""
 "ред\n"
 "                               (стандартно е 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            извеждане само на лявата колона от еднаквите "
 "редове"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  без извеждане на еднаквите редове"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            табулациите да се заменят с интервали на изхода"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
@@ -1506,11 +1484,11 @@ msgstr ""
 "знаци\n"
 "                               (стандартно е 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                опит промените да се сведат до по-малки"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
@@ -1518,36 +1496,36 @@ msgstr ""
 "малки\n"
 "                               промени"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=ПРОГРАМА  сравнение на файловете с тази ПРОГРАМА"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   извеждане на тази помощ и изход"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                извеждане на версията и изход"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Употреба: %s [ОПЦИЯ]… ФАЙЛ_1 ФАЙЛ_2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Успоредно сливане на разликите във ФАЙЛ_1 и ФАЙЛ_2"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "стандартният вход не може да се слива интерактивно"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "и двата подадени файла са директории"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1580,3 +1558,15 @@ msgstr "непознат префикс: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr "непознат аргумент към опцията „--palette“"
+
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "неправилен аргумент „%3$s“ за опцията „%1$s%2$s“"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "неправилен суфикс в аргумента „%3$s“ за опцията „%1$s%2$s“"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "прекалено дълъг аргумент „%3$s“ за опцията „%1$s%2$s“"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Уеб страница на „%s“: <https://www.gnu.org/software/%s/>\n"
index dae2148..5ce9078 100644 (file)
Binary files a/po/ca.gmo and b/po/ca.gmo differ
index 7ab7e50..837c027 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 2.8.7\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2004-04-21 13:33+0200\n"
 "Last-Translator: Ernest Adrogué Calveras <eadrogue@gmx.net>\n"
 "Language-Team: Catalan <ca@dodds.net>\n"
@@ -17,25 +17,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "error del programa"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "desbordament de pila"
 
@@ -199,11 +199,11 @@ msgstr "%s: l'opci
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr ""
 
@@ -277,7 +277,7 @@ msgstr "L'expressi
 msgid "Unmatched ) or \\)"
 msgstr "Hi ha un signe ) o \\) desaparellat"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "No hi ha cap expressió regular prèvia"
 
@@ -285,41 +285,31 @@ msgstr "No hi ha cap expressi
 msgid "memory exhausted"
 msgstr "memòria exhaurida"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr ""
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr ""
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr ""
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 #, fuzzy
 msgid "unknown stream"
 msgstr "Error no identificat del sistema"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr ""
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "el valor «%s» per l'opció --bytes no és vàlid"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
@@ -339,30 +329,29 @@ msgstr ""
 msgid "(C)"
 msgstr ""
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Escrit per %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Escrit per %s i %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Escrit per %s, %s i %s.\n"
@@ -370,7 +359,7 @@ msgstr "Escrit per %s, %s i %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -382,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -394,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -406,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -418,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -432,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -446,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -461,33 +450,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Els fitxers %s i %s difereixen\n"
@@ -497,55 +480,55 @@ msgstr "Els fitxers %s i %s difereixen\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Els fitxers %s i %s difereixen\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "No hi ha cap caràcter de salt de línia al final del fitxer"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr ""
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Proveu «%s --help» per obtenir més informació."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "el valor «%s» per l'opció --ignore-initial no és vàlid"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "les opcions -l i -s són incompatibles"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "error d'escriptura"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "sortida estàndard"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes  Mostra els octets que difereixen."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i SALT  --ignore-initial=SALT  Ignora els primers SALT octets."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
@@ -553,40 +536,40 @@ msgid ""
 msgstr ""
 "  Ignora els primers SALT1 octets de FITXER1 i els primers SALT2 de FITXER2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l  --verbose  Mostra la posició i valor dels octets que difereixen."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n LÍMIT  --bytes=LÍMIT  Compara com a màxim LÍMIT octets."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version  Mostra la versió del programa."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Mode d'ús: %s [OPCIÓ]... FITXER1 [FITXER2 [SALT1 [SALT2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Compara dos fitxers octet a octet."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
@@ -594,12 +577,12 @@ msgid ""
 msgstr ""
 "SALT1 i SALT2 són el nombre d'octets que es passen per alt de cada fitxer."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -609,218 +592,218 @@ msgstr ""
 "kB per 1000, K per 1024, MB per 1.000.000, M per 1.048.576, GB per\n"
 "1.000.000.000, G per 1.073.741.824, i així amb T, P, E, Z i Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Si un FITXER és «-» o falta, llegeix l'entrada estàndard."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "L'estat de sortida és 0 si les entrades són iguals, 1 si són diferents\n"
 "i 2 en cas d'error."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "el valor «%s» per l'opció --bytes no és vàlid"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "falta un operand després de «%s»"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "sobra l'operand «%s»"
 
 # mirar el comentari del codi font
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s i %s difereixen: octet %s, línia %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s i %s difereixen: l'octet %s, línia %s, és %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: final de fitxer a %s\n"
 
 # mirar el comentari del codi font
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s i %s difereixen: octet %s, línia %s\n"
 
 # mirar el comentari del codi font
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s i %s difereixen: octet %s, línia %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: final de fitxer a %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr ""
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "el nombre de línies de context «%s» no és vàlid"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "aquest sistema no suporta paginació"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "massa opcions d'etiqueta de fitxer"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "l'amplada «%s» no és vàlida"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opcions d'amplada incompatibles"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "el nombre de línies d'horitzó «%s» no és vàlid"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "la distància de tabulació «%s» no és vàlida"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opcions de distància de tabulació incompatibles"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "heu especificat les opcions --from-file i --to-file al mateix temps"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "--normal  Genera un diff normal."
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  Indica només si els fitxers difereixen o no."
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  Avisa quan dos fitxers són idèntics."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 #, fuzzy
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-w NÚM  --width=NÚM  No més de NÚM (130 per omissió) caràcters per línia."
 
-#: src/diff.c:896
+#: src/diff.c:898
 #, fuzzy
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed  Genera un script ed."
 
-#: src/diff.c:897
+#: src/diff.c:899
 #, fuzzy
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs  Genera un diff en format RCS."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 #, fuzzy
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w NÚM  --width=NÚM  No més de NÚM (130 per omissió) caràcters per línia."
 
-#: src/diff.c:900
+#: src/diff.c:902
 #, fuzzy
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "-l  --left-column  Només escriu les línies en comú a la columna esquerra."
 
-#: src/diff.c:901
+#: src/diff.c:903
 #, fuzzy
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "-s  --suppress-common-lines  No mostra les línies en comú."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 
-#: src/diff.c:908
+#: src/diff.c:910
 #, fuzzy
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Expandeix les tabulacions de la sortida a espais."
 
-#: src/diff.c:909
+#: src/diff.c:911
 #, fuzzy
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Alinea el text de cada línia amb un caràcter de tabulació."
 
-#: src/diff.c:910
+#: src/diff.c:912
 #, fuzzy
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
@@ -828,40 +811,40 @@ msgstr ""
 "--tabsize=NÚM  Estableix la distància de tabulació en NÚM (8 per omissió)\n"
 "               caràcters."
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l  --paginate  Pagina la sortida amb el programa «pr»."
 
-#: src/diff.c:914
+#: src/diff.c:916
 #, fuzzy
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r  --recursive  Compara recursivament qualsevol subdirectori existent."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 #, fuzzy
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file  Considera els fitxers inexistents com si fóssin buits."
 
-#: src/diff.c:917
+#: src/diff.c:919
 #, fuzzy
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "--unidirectional-new-file  Tracta els fitxers primers inexistents com si\n"
 "                           fóssin buits."
 
-#: src/diff.c:918
+#: src/diff.c:920
 #, fuzzy
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
@@ -869,19 +852,19 @@ msgstr ""
 "en\n"
 "                         els noms dels fitxers."
 
-#: src/diff.c:919
+#: src/diff.c:921
 #, fuzzy
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "--no-ignore-file-name-case  Té en compte diferències entre majúscules i\n"
 "                            minúscules en comparar noms de fitxers."
 
-#: src/diff.c:920
+#: src/diff.c:922
 #, fuzzy
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x PAT  --exclude=PAT  Exclou fitxers que coincideixen amb PAT."
 
-#: src/diff.c:921
+#: src/diff.c:923
 #, fuzzy
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
@@ -889,7 +872,7 @@ msgstr ""
 "-X FITXER  --exclude-from=FITXER  Exclou fitxers que coincideixen amb\n"
 "                                  qualsevol patró de FITXER."
 
-#: src/diff.c:922
+#: src/diff.c:924
 #, fuzzy
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
@@ -897,7 +880,7 @@ msgstr ""
 "-S FITXER  --starting-file=FITXER  Comença per FITXER quan es comparen\n"
 "                                   directoris."
 
-#: src/diff.c:923
+#: src/diff.c:925
 #, fuzzy
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
@@ -906,7 +889,7 @@ msgstr ""
 "--from-file=FITXER1  Compara FITXER1 amb tots els operands. FITXER1 pot ser\n"
 "                     un directori."
 
-#: src/diff.c:925
+#: src/diff.c:927
 #, fuzzy
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
@@ -915,66 +898,66 @@ msgstr ""
 "--to-file=FITXER1  Compara tots els operands amb FITXER2. FITXER2 pot ser\n"
 "                   un directori."
 
-#: src/diff.c:928
+#: src/diff.c:930
 #, fuzzy
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i  --ignore-case  Ignora diferències entre majúscules i minúscules."
 
-#: src/diff.c:929
+#: src/diff.c:931
 #, fuzzy
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignora canvis provocats per la distància de\n"
 "                            tabulació."
 
-#: src/diff.c:930
+#: src/diff.c:932
 #, fuzzy
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignora tot l'espai en blanc."
 
-#: src/diff.c:931
+#: src/diff.c:933
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change  Ignora canvis en la quantitat d'espai en blanc."
 
-#: src/diff.c:932
+#: src/diff.c:934
 #, fuzzy
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space  Ignora tot l'espai en blanc."
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B  --ignore-blank-lines  Ignora canvis en línies que estan en blanc."
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I ER  --ignore-matching-lines=ER  Ignora canvis en línies que continguin ER."
 
-#: src/diff.c:936
+#: src/diff.c:938
 #, fuzzy
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text  Tracta tots els fitxers com a text."
 
-#: src/diff.c:937
+#: src/diff.c:939
 #, fuzzy
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Treu els caràcters finals de retorn de carro de "
 "l'entrada."
 
-#: src/diff.c:939
+#: src/diff.c:941
 #, fuzzy
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary  Escriu i llegeix dades en mode binari."
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
@@ -983,30 +966,30 @@ msgstr ""
 "                      amb directives `#ifdef NOM'."
 
 # `grups' o `grups de línies' (no queda prou clar)
-#: src/diff.c:943
+#: src/diff.c:945
 #, fuzzy
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "--TIPUSG-group-format=FMTG  Similar, però formata els grups TIPUSG amb FMTG."
 
-#: src/diff.c:944
+#: src/diff.c:946
 #, fuzzy
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "--line-format=FMTL  Similar, però formata totes les línies amb FMTL."
 
-#: src/diff.c:945
+#: src/diff.c:947
 #, fuzzy
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "--TIPUSL-line-format=FMTL  Similar, però formata les línies TIPUSL amb FMTL."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
@@ -1014,7 +997,7 @@ msgstr ""
 "«unchanged» (inalterades).\n"
 "  TIPUSG pot ser qualsevol TIPUSL o bé «changed» (alterades)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 #, fuzzy
 msgid ""
 "  GFMT (only) may contain:\n"
@@ -1044,7 +1027,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1"
 
-#: src/diff.c:961
+#: src/diff.c:963
 #, fuzzy
 msgid ""
 "  LFMT (only) may contain:\n"
@@ -1058,7 +1041,7 @@ msgstr ""
 "    %[-][AMPLADA][.[PRECISIÓ]]{doxX}n  espec. estil printf pel nombre de "
 "línia"
 
-#: src/diff.c:965
+#: src/diff.c:967
 #, fuzzy
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
@@ -1072,17 +1055,17 @@ msgstr ""
 "    %c'C'  el caràcter C\n"
 "    %c'\\OOO'  el caràcter de codi octal OOO"
 
-#: src/diff.c:971
+#: src/diff.c:973
 #, fuzzy
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Intenta trobar canvis mínims."
 
-#: src/diff.c:972
+#: src/diff.c:974
 #, fuzzy
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "--horizon-lines=NÚM  No descarta NÚM línies amb prefix i sufix comú."
 
-#: src/diff.c:973
+#: src/diff.c:975
 #, fuzzy
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
@@ -1090,135 +1073,135 @@ msgstr ""
 "-H  --speed-large-files  Assumeix fitxers grans i molts canvis petits "
 "dispersos."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 #, fuzzy
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version  Mostra la versió del programa."
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FITXERS és «FITXER1 FITXER2» o «DIR1 DIR2» o «DIR FITXER...» o «FITXER... "
 "DIR»."
 
-#: src/diff.c:983
+#: src/diff.c:985
 #, fuzzy
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Amb les opcions --from-file o --to-file no hi ha restriccions de FITXERS."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr "Si FITXER és «-», llegeix l'entrada estàndard."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Mode d'ús: %s [OPCIÓ]... FITXERS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 #, fuzzy
 msgid "Compare FILES line by line."
 msgstr "Compara fitxers línia per línia."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "el valor «%s» per l'opció %s és conflictiu"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "opcions d'estil de sortida conflictives"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "el nombre de línies de context «%s» no és vàlid"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Només a %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "no es pot comparar «-» amb un directori"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "l'opció -D no funciona amb directoris"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirectoris comuns: %s i %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "El fitxer %s és un %s mentre que el fitxer %s és un %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Els fitxers %s i %s difereixen\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Els fitxers %s i %s són idèntics\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr ""
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opcions incompatibles"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "heu especificat «-» per més d'un fitxer d'entrada"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lectura fallida"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 #, fuzzy
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A  --show-all  Mostra tots els canvis, senyalant els conflictes amb "
 "separadors."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 #, fuzzy
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
@@ -1226,7 +1209,7 @@ msgid ""
 msgstr ""
 "-e  --ed  Mostra els canvis no comuns de FITXER-VELL a FITXER2 en FITXER1."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 #, fuzzy
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
@@ -1234,82 +1217,82 @@ msgstr ""
 "amb\n"
 "                    separadors."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 #, fuzzy
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "-3  --easy-only  Mostra els canvis no comuns i no solapats."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 #, fuzzy
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x  --overlap-only  Mostra els canvis solapats."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i  Afegeix les instruccions «w» i «q» a l'script ed."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 #, fuzzy
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text  Tracta tots els fitxers com a text."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 #, fuzzy
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Treu els caràcters finals de retorn de carro de "
 "l'entrada."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 #, fuzzy
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Alinea el text de cada línia amb un caràcter de tabulació."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 #, fuzzy
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAMA  Usa PROGRAMA per comparar fitxers."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 #, fuzzy
 msgid "-v, --version               output version information and exit"
 msgstr "-v  --version  Mostra la versió del programa."
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Mode d'ús: %s [OPCIÓ]... FITXER1 FITXER-VELL FITXER2\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Compara tres fitxers línia per línia."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1323,47 +1306,47 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "L'estat de sortida és 0 si s'acaba amb èxit, 1 si hi ha conflictes\n"
 "i 2 en cas d'error."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "error intern: format dels blocs diff desmanegat"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff ha fallat: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "error intern: tipus de diff invàlid en process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "el format diff no és vàlid: el separador de canvis no és vàlid"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "el format diff no és vàlid: l'última línia està incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "no s'ha pogut invocar el programa subsidiari «%s»"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "el format diff no és vàlid: caràcters invàlids al principi de línia"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "error intern: tipus de diff no vàlid passat a la sortida"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "el fitxer d'entrada s'ha encongit"
 
@@ -1378,11 +1361,11 @@ msgid "%s: recursive directory loop"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr ""
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 #, fuzzy
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
@@ -1390,84 +1373,84 @@ msgstr ""
 "-o FITXER  --output=FITXER  Opera interactivament, i envia la sortida a "
 "FITXER."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 #, fuzzy
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i  --ignore-case  No distingeix entre majúscules i minúscules."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 #, fuzzy
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignora canvis provocats per la distància de\n"
 "                            tabulació."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 #, fuzzy
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignora tot l'espai en blanc."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change  Ignora canvis en la quantitat d'espai en blanc."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 #, fuzzy
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space  Ignora tot l'espai en blanc."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 #, fuzzy
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B  --ignore-blank-lines  Ignora canvis en línies que estan en blanc."
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I ER  --ignore-matching-lines=ER  Ignora canvis en línies que continguin ER."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 #, fuzzy
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Treu els caràcters finals de retorn de carro de "
 "l'entrada."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 #, fuzzy
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text  Tracta tots els fitxers com a text."
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 #, fuzzy
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w NÚM  --width=NÚM  No més de NÚM (130 per omissió) caràcters per línia."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 #, fuzzy
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l  --left-column  Només escriu les línies en comú a la columna esquerra."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 #, fuzzy
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  No mostra les línies en comú."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 #, fuzzy
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Expandeix les tabulacions de la sortida a espais."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 #, fuzzy
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
@@ -1475,12 +1458,12 @@ msgstr ""
 "--tabsize=NÚM  Estableix la distància de tabulació en NÚM (8 per omissió)\n"
 "               caràcters."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 #, fuzzy
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Intenta trobar canvis mínims."
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 #, fuzzy
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
@@ -1488,39 +1471,39 @@ msgstr ""
 "-H  --speed-large-files  Assumeix fitxers grans i molts canvis petits "
 "dispersos."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 #, fuzzy
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAMA  Usa PROGRAMA per comparar fitxers."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 #, fuzzy
 msgid "-v, --version                output version information and exit"
 msgstr "-v  --version  Mostra la versió del programa."
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Mode d'ús: %s [OPCIÓ]... FITXER1 FITXER2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 #, fuzzy
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Combina diferències entre fitxers en dues columnes"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "no es pot combinar interactivament l'entrada estàndard"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "ambdós fitxers són directoris"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 #, fuzzy
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
@@ -1556,6 +1539,10 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "el valor «%s» per l'opció --bytes no és vàlid"
+
+#, fuzzy
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: l'opció «--%s» no admet arguments\n"
 
index 6243edc..da1b9e8 100644 (file)
Binary files a/po/cs.gmo and b/po/cs.gmo differ
index ba26ad4..774c62e 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -2,14 +2,14 @@
 # Copyright (C) 1998, 2002, 2004, 2010 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Petr Kočvara <petr.kocvara@nemfm.cz>, 1998, 2002, 2004, 2010
-# Petr Pisar <petr.pisar@atlas.cz, 2014, 2017, 2018.
+# Petr Pisar <petr.pisar@atlas.cz, 2014, 2017, 2018, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-30 22:24+01:00\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 18:23+02:00\n"
 "Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
 "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
 "Language: cs\n"
@@ -18,25 +18,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "neplatný argument „%s“ pro %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "nejednoznačný argument %s pro %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Platné argumenty jsou:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "chyba programu"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "přetečení zásobníku"
 
@@ -118,11 +118,11 @@ msgstr "síťový speciální soubor"
 
 #: lib/file-type.c:96
 msgid "migrated file with data"
-msgstr "zmigrovaný soubor s daty"
+msgstr "převedený soubor s daty"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr "zmigrovaný soubor bez dat"
+msgstr "převedený soubor bez dat"
 
 #: lib/file-type.c:102
 msgid "port"
@@ -196,11 +196,11 @@ msgstr "%s: přepínač vyžaduje argument – „%c“\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "“"
 
@@ -272,7 +272,7 @@ msgstr "Regulární výraz je příliš dlouhý"
 msgid "Unmatched ) or \\)"
 msgstr "Nepárová ) nebo \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Předchozí regulární výraz neexistuje"
 
@@ -280,41 +280,31 @@ msgstr "Předchozí regulární výraz neexistuje"
 msgid "memory exhausted"
 msgstr "paměť vyčerpána"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "neznámý proud"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "nelze znovuotevřít %s v módu %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "neplatný argument „%3$s“ přepínače %1$s%2$s"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "neplatná přípona argumentu „%3$s“ přepínače %2$s%1$s"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argument „%3$s“ přepínače %1$s%2$s je příliš velký"
+msgid "standard file descriptors"
+msgstr "standardní deskriptory souboru"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -333,36 +323,33 @@ msgstr "Balíček připravil %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
 "Licence GPLv3+: GNU GPL verze 3 nebo novější\n"
-"<https://gnu.org/licenses/gpl.html>.\n"
-"Toto je svobodné programové vybavení: máte právo měnit jej a dále šířit.\n"
+"<%s>.\n"
+"Toto je svobodné programové vybavení: máte právo jej měnit a dále šířit.\n"
 "Není poskytována ŽÁDNÁ ZÁRUKA, jak jen zákon dovoluje.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Autor: %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Autoři: %s a %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Autoři: %s, %s a %s.\n"
@@ -370,7 +357,7 @@ msgstr "Autoři: %s, %s a %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -382,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -394,7 +381,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -406,7 +393,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -418,7 +405,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -432,7 +419,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -446,7 +433,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -461,18 +448,15 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Chyby v programu oznamujte na adrese %s (anglicky),\n"
 "připomínky k překladu na adrese <translation-team-cs@lists.sourceforge.net>\n"
 "(česky).\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
@@ -480,22 +464,17 @@ msgstr ""
 "Připomínky k překladu (česky) na: <translation-team-cs@lists.sourceforge."
 "net>\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Domovská stránka %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Domovská stránka programu %s: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Obecná pomoc při používání softwaru GNU: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Obecná pomoc při používání softwaru GNU: <https://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Soubory %s a %s jsou různé\n"
@@ -505,53 +484,53 @@ msgstr "Soubory %s a %s jsou různé\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binární soubory %s a %s jsou rozdílné\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Chybí znak konce řádku na konci souboru"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Více informací získáte příkazem „%s --help“."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "neplatná hodnota --ignore-inital „%s“"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "přepínače -l a -s nejsou kompatibilní"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "zápis selhal"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standardní výstup"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          vypíše rozdílné bajty"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i, --ignore-initial=N     přeskočí prvních N bajtů obou vstupů"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -559,37 +538,37 @@ msgstr ""
 "-i, --ignore-initial=N1:N2 přeskočí prvních N1 bajtů SOUBORU1 a\n"
 "                             prvních N2 bajtů SOUBORU2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l  --verbose              vypíše pozice a hodnoty rozdílných bajtů"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMIT          porovná nejvýše LIMIT bajtů"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      potlačí veškerý běžný výstup"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 zobrazí tuto nápovědu a skončí"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version              vypíše údaje o verzi a skončí"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Použití: %s [PŘEPÍNAČ]… SOUBOR1 [SOUBOR2 [N1 [N2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Porovnává dva soubory bajt po bajtu."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -597,13 +576,13 @@ msgstr ""
 "Volitelné argumenty N1 a N2 udávají počet bajtů, které budou přeskočeny\n"
 "na začátku každého souboru (výchozí je nula)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Povinné argumenty dlouhých přepínačů jsou též povinné u krátkých forem.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -613,141 +592,141 @@ msgstr ""
 "kB 1000, K 1024, MB 1 000 000, M 1 048 576,\n"
 "GB 1 000 000 000, G 1 073 741 824  a stejně tak i pro T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Pokud SOUBOR je „-“ nebo nebo chybí, bude čten standardní vstup."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Návratový kód je roven 0 pokud jsou vstupy shodné, 1 pokud se liší a 2 při "
 "chybě."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "neplatná hodnota přepínače --bytes „%s“"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "po „%s“ chybí operand"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "operand „%s“ je nadbytečný"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s se liší: bajt %s, řádek %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s se liší: bajt %s, řádek %s je %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: konec souboru v %s, který je prázdný\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: konec souboru v %s po bajtu %s, řádek %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: konec souboru v %s po bajtu %s na řádku %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: konec souboru v %s po bajtu %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "neplatná délka kontextu „%s“"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "přestránkování není na tomto počítači podporováno"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "příliš mnoho přepínačů popisu souboru"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "nesprávná délka „%s“"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "konfliktní volby šířky výstupu"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "neplatná výška obzoru „%s“"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "nesprávná hodnota --tabsize „%s“"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "konfliktní přepínače tabsize"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "parametry --from-file i to-file použity najednou"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  normálním formát výstupu diff (výchozí)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief                   výstup pouze při rozdílných souborech"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  hlásí shodné soubory"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
@@ -755,7 +734,7 @@ msgstr ""
 "                              vypíše POČET (výchozí je 3) řádků\n"
 "                              kopírovaného kontextu"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
@@ -763,45 +742,45 @@ msgstr ""
 "                              vypíše POČET (výchozí je 3) řádků\n"
 "                              unifikovaného kontextu"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed                      vypíše skript pro ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs                     vypíše rozdíl ve formátu RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            vypíše ve dvou sloupcích"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=POČET             vypíše nejvýše POČET (výchozí je 130)\n"
 "                              tiskových sloupců"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             vypíše pouze levý sloupec společných řádků"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   nevypisuje shodné řádky"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         ukáže, ve které funkci C se změna nachází"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RV   ukáže poslední řádek odpovídající RV"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -810,84 +789,84 @@ msgstr ""
 "údaje\n"
 "                              (lze opakovat)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t,  --expand-tabs             ve výstupu převede tabulátory na mezery"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T,  --initial-tab             na začátek řádků se vloží tabulátor"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=POČET           tabulátor zastavuje každých POČET\n"
 "                              (výchozí je 8) tiskových sloupců"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    potlačí mezeru nebo tabulátor před prázdnými\n"
 "                              řádky výstupu"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l,  --paginate                výstup projde přes „pr“ pro přestránkování"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r  --recursive                 rekurzivně porovná všechny nalezené "
 "podadresáře"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            nenásleduje symbolické odkazy"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  neexistující soubory považuje za prázdné"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   neexistující soubory z prvního adresáře\n"
 "                                považuje za prázdné"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     ignoruje velikost písmen v názvech souborů"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  bere v potaz velikost písmen v názvech "
 "souborů"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=VZOR              vynechá soubory odpovídající VZORU"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=SOUBOR       vynechá soubory, které odpovídají\n"
 "                                libovolnému vzoru ze SOUBORU"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=SOUBOR      při porovnávání adresářů začne SOUBOREM"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -895,7 +874,7 @@ msgstr ""
 "    --from-file=SOUBOR1         porovná SOUBOR1 se všemi operandy,\n"
 "                                SOUBOR1 může být adresář"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -903,77 +882,77 @@ msgstr ""
 "    --to-file=SOUBOR2           porovná všechny operandy se SOUBOREM2,\n"
 "                                SOUBOR2 může být adresář"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               ignoruje velikost písmen v obsahu souborů"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion      ignoruje změny v odsazení tabulátorem"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     ignoruje bílá místa na konci řádku"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       ignoruje změny v počtu bílých míst"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignoruje všechna bílá místa"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        ignoruje změny v případě prázdných řádků"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RV  ignoruje změny na všech řádcích\n"
 "                                odpovídajících RV"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      pokládá všechny soubory za text"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr         odstraní ukončovací znak CR na vstupu"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    data čte a zapisuje data v binárním režimu"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NÁZEV               vypíše sloučený soubor s rozdíly „#ifdef "
 "NÁZEV“"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT   formátuje vstupní skupiny GTYPE podle FMTS"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          formátuje všechny vstupní řádky podle LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT    formátuje vstupní řádky LTYPE podle LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -981,13 +960,13 @@ msgstr ""
 "  Tyto formátovací přepínače poskytují jemnou kontrolu nad výstupem diffu\n"
 "  a zobecňují -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE je „old“ (starý), „new“ (nový) nebo „unchanged“ (nezměněn). GTYPE\n"
 "  je LTYPE nebo „changed“ (změněn)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1015,7 +994,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  pokud A se rovná B, tak T, jinak E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1029,7 +1008,7 @@ msgstr ""
 "vstupního\n"
 "        řádku"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1043,33 +1022,35 @@ msgstr ""
 "    %c'\\000'  znak s osmičkovým kódem 000\n"
 "    C    znak C (ostatní znaky zastupují samy sebe)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            pokusí se nalézt nejmenší sadu změn"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=POČET\n"
 "                        ponechá POČET shodných řádků předpony a přípony"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  předpokládá velké soubory a mnoho rozptýlených\n"
 "                         drobných změn"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=KDY]        obarví výstup, KDY smí být „never“ [nikdy],\n"
-"                         „always“ [vždy] nebo „auto“ (výchozí)"
+"    --color[=KDY]        obarví výstup, KDY je „never“ [nikdy], "
+"„always“ [vždy]\n"
+"                         nebo „auto“ (výchozí); samotné --color znamená\n"
+"                         --color=auto"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1079,113 +1060,113 @@ msgstr ""
 "PALETA\n"
 "                         je dvojtečkou oddělený seznam schopností terminfa"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               zobrazí tuto nápovědu a skončí"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            vypíše údaje o verzi a skončí"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "SOUBORY jsou „SOUBOR1 SOUBOR2“ nebo „ADRESÁŘ1 ADRESÁŘ2' nebo\n"
 "„ADRESÁŘ SOUBOR“ nebo „SOUBOR ADRESÁŘ“."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Pokud je uveden --from-file nebo --to-file, pak nejsou u SOUBORŮ žádná "
 "omezení."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Pokud SOUBOR bude „-“, bude čten standardní vstup."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Použití: %s [PŘEPÍNAČ]… SOUBORY\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Porovnává SOUBORY řádek po řádku."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "konfliktní hodnota „%2$s“ přepínače „%1$s“"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "konfliktní přepínače pro styl výstupu"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "neplatná barva „%s“"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Pouze v %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "„-“ s adresářem nelze porovnat"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D přepínač nepodporuje práci s adresáři"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Společné podadresáře: %s a %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Soubor %s je %s zatímco soubor %s je %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Symbolické odkazy %s a %s se liší\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Soubory %s a %s jsou identické\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "nekompatibilní přepínače"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "„-“ zadáno pro více než jeden vstupní soubor"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "čtení selhalo"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              vypíše všechny rozdíly, konflikty v závorkách"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1193,32 +1174,32 @@ msgstr ""
 "-e, --ed                    vypíše ed skript zahrnující změny mezi\n"
 "                            STARÝM_SOUBOREM a VAŠÍM_SOUBOREM do MÉHO_SOUBORU"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          jako -e, ale konflikty umístí do závorek"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 "-3, --easy-only             jako -e, ale zahrne jen nepřekrývající se změny"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          jako -e, ale zahrne jen překrývající se změny"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          jako -x, ale konflikty umístí do závorek"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          přidá příkazy „w“ a „q“ do skriptů pro ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1227,23 +1208,23 @@ msgstr ""
 "li\n"
 "                            uvedeny další přepínače"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  pokládá všechny soubory za text"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     odstraní ukončovací znak CR na vstupu"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab           na začátek řádků se vloží tabulátor"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  použije PROGRAM k porovnání souborů"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1251,24 +1232,24 @@ msgstr ""
 "-L, --label=NÁZEV           použije NÁZEV namísto názvu souboru\n"
 "                            (lze opakovat až třikrát)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  zobrazí tuto nápovědu a skončí"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               vypíše údaje o verzi a skončí"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Použití: %s [PŘEPÍNAČ]… MŮJ_SOUBOR STARÝ_SOUBOR VÁŠ_SOUBOR\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Porovnání tří souborů řádek po řádku."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1292,45 +1273,45 @@ msgstr ""
 "vlastní spojený soubor. V případě neobvyklého vstupu, je toto spolehlivější\n"
 "způsob než použití programu ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Návratová hodnota je 0 při úspěchu, 1 při konfliktu a 2 při chybě."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "vnitřní chyba: chyba ve formátu diff bloků"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff selhal: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "vnitřní chyba: nesprávný typ diffu v process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "neplatný formát diff souboru; neplatný oddělovač změny"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "neplatný formát diff souboru; nekompletní poslední řádek"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "pomocný program „%s“ nebylo možné zavolat"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "neplatný formát diff souboru; nesprávné úvodní znaky na řádku"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "vnitřní chyba: nesprávný typ diffu pro výstup"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "vstupní soubor se zmenšil"
 
@@ -1345,58 +1326,58 @@ msgid "%s: recursive directory loop"
 msgstr "%s: smyčka v rekurzi adresářů"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=SOUBOR          interaktivní režim, výstup půjde do SOUBORU"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            nerozlišuje velká a malá písmena"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion   ignoruje změny v odsazení tabulátorem"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  ignoruje všechny bílé znaky na konci řádku"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    ignoruje změny v počtu bílých znaků"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignoruje všechny bílé znaky"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines     ignoruje změny v případě prázdných řádků"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RV  ignoruje změny na všech řádcích\n"
 "                                odpovídajících RV"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      odstraní ukončovací znak CR na vstupu"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a,  --text                  pokládá všechny soubory za text"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
@@ -1404,21 +1385,21 @@ msgstr ""
 "tiskových\n"
 "                             sloupců"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            vypíše pouze levý sloupec společných řádků"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  nevypisuje společné řádky"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            ve výstupu převede tabulátory na mezery"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
@@ -1426,47 +1407,47 @@ msgstr ""
 "8)\n"
 "                            tiskových sloupců"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                pokusí se nalézt nejmenší sadu změn"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      předpokládá velké soubory a mnoho rozptýlených\n"
 "                             drobných změn"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM   použije PROGRAM k porovnání souborů"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   zobrazí tuto nápovědu a skončí"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                vypíše údaje o verzi a skončí"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Použití: %s [PŘEPÍNAČ]… SOUBOR1 SOUBOR2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Spojí změny mezi SOUBOREM1 a SOUBOREM2 v režimu „vedle sebe“."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "interaktivně nelze standardní vstup sloučit"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "oba soubory k porovnání jsou adresáři"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1500,6 +1481,18 @@ msgstr "nerozpoznaná předpona: %s"
 msgid "unparsable value for --palette"
 msgstr "nerozebratelná hodnota pro přepínač --pellete"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "neplatný argument „%3$s“ přepínače %1$s%2$s"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "neplatná přípona argumentu „%3$s“ přepínače %2$s%1$s"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "argument „%3$s“ přepínače %1$s%2$s je příliš velký"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Domovská stránka programu %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: přepínač „--%s“ musí být zadán bez argumentu\n"
 
index 0f22256..a0d7e34 100644 (file)
Binary files a/po/da.gmo and b/po/da.gmo differ
index 6051078..6dcf725 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils-3.5.25\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2017-11-14 14:26+0100\n"
 "Last-Translator: Ask Hjorth Larsen <asklarsen@gmail.com>\n"
 "Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -20,25 +20,25 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "X-Generator: KBabel 0.9.5\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ugyldigt argument %s til %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "flertydigt argument %s til %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Gyldige argumenter er:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programfejl"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stakoverløb"
 
@@ -199,11 +199,11 @@ msgstr "%s: tilvalg kræver et argument -- \"%c\"\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "\""
 
@@ -275,7 +275,7 @@ msgstr "For stort regulært udtryk"
 msgid "Unmatched ) or \\)"
 msgstr "Uparret ) eller \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Intet foranstillet regulært udtryk"
 
@@ -283,41 +283,31 @@ msgstr "Intet foranstillet regulært udtryk"
 msgid "memory exhausted"
 msgstr "hukommelse opbrugt"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "ukendt strøm"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "kunne ikke genåbne %s i tilstand %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "ugyldigt %s%s-argument \"%s\""
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "ugyldig endelse i %s%s-argument \"%s\""
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s-argumentet \"%s\" er for stort"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -337,15 +327,13 @@ msgid "(C)"
 msgstr "©"
 
 # første linje passer netop ind i 80 linjer (hvilket ikke ville være tilfældet med 'version' frem for 'udgave'
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Licens GPLv3+: GNU GPL udgave 3 eller nyere <http://gnu.org/licenses/gpl."
@@ -355,19 +343,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Skrevet af %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Skrevet af %s og %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Skrevet af %s, %s og %s.\n"
@@ -375,7 +363,7 @@ msgstr "Skrevet af %s, %s og %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -387,7 +375,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -399,7 +387,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -411,7 +399,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -423,7 +411,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -437,7 +425,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -451,7 +439,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -466,36 +454,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Rapportér fejl til: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Rapportér fejl i %s til: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Hjemmeside for %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Hjemmeside for %s: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr "Generel hjælp til GNU-programmer: <http://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Filerne %s og %s er forskellige\n"
@@ -505,55 +486,55 @@ msgstr "Filerne %s og %s er forskellige\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binære filer %s og %s er forskellige\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Intet linjeskift ved filafslutning"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Prøv \"%s --help\" for mere information."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "ugyldig værdi \"%s\" for --ignore-initial"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "tilvalgene -l og -s er inkompatible"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "skrivning mislykkedes"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standard-ud"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          vis afvigende byte"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SPRING       spring de første SPRING byte over i begge\n"
 "                                    input"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -562,39 +543,39 @@ msgstr ""
 "og\n"
 "                                        SPRING2 byte af FIL2 over"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              vis numre og værdier for de byte, der er "
 "forskellige"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=GRÆNSE         sammenlign højst GRÆNSE byte"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      undertryk al normal udskrift"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 vis denne hjælpetekst og afslut"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              vis versionsoplysninger og afslut"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Brug: %s [TILVALG]... FIL1 [FIL2 [SPRING1 [SPRING2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Sammenlign to filer byte for byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -602,14 +583,14 @@ msgstr ""
 "De valgfri SPRING1 og SPRING2 angiver antallet af byte, der skal springes\n"
 "over ved begyndelsen af hver fil (normalt 0)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Obligatoriske argumenter til lange tilvalg er også obligatoriske til de "
 "korte.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -619,140 +600,140 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, og så videre for T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Såfremt en FIL er \"-\" eller mangler, læses fra standard-ind."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Slutstatus er 0 hvis inddata er ens, 1 hvis ikke, og 2 hvis der er problemer."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "ugyldig værdi \"%s\" for --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "manglende operand efter \"%s\""
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "ekstra operand \"%s\""
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s afviger: byte %s, linje %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s afviger: tegn %s, linje %s er %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: filafslutning på %s som er tom\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: filafslutning på %s efter byte %s, linje %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: filafslutning på %s efter byte %s i linje %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: filafslutning på %s efter byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "ugyldig kontekstlængde \"%s\""
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "paginering understøttes ikke af denne vært"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "for mange fil-mærke tilvalg"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "ugyldig bredde \"%s\""
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "modstridende breddeangivelser"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "ugyldig horisontlængde \"%s\""
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "ugyldig tabulatorbredde \"%s\""
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "modstridende angivelser af tabulatorbredde"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "både --from-file og --to-file er angivet"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  udskriv en almindelig diff (forvalg)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   angiv kun når filerne er forskellige"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  rapportér hvis to filer er ens"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
@@ -760,50 +741,50 @@ msgstr ""
 "kopieret\n"
 "                                   kontekst"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U ANTAL, --unified[=ANTAL]  Udskriv højst ANTAL (normalt 3) linjer\n"
 "                                   forenet kontekst"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      udskriv et ed-script"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     udskriv en diff i RCS-format"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            udskriv i to kolonner"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=ANTAL             udskriv højst ANTAL (normalt 130) kolonner"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             udskriv kun venstre kolonne i fælles linjer"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   udskriv ikke fælles linjer"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         vis hvilken C-funktion hver ændring er i"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   vis den seneste linje der matcher RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -811,88 +792,88 @@ msgstr ""
 "    --label MÆRKAT            brug MÆRKAT frem for filnavn og tidsstempel\n"
 "                                (kan gentages)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             lav tabulatorer om til mellemrum i udskrift"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             få tabulatorer på linje ved at forudstille en\n"
 "                                tabulator"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ANTAL           tabulatorstop for hver ANTAL (normalt 8) "
 "kolonner"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    intet mellemrum eller tabulator før tomme\n"
 "                                ud-linjer"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                led uddata gennem \"pr\" for at sideinddele det"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 sammenlign alle fundne underkataloger "
 "rekursivt"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            følg ikke symbolske lænker"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  behandl manglende filer som var de tomme"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   behandl manglende førstefiler som var de "
 "tomme"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     ingen forskel på store og små bogstaver ved\n"
 "                                  sammenligning af filnavne"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  skeln mellem store og små bogstaver ved\n"
 "                                  sammenligning af filnavne"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=MØNSTER           udelad filer, det matcher MØNSTER"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FIL          udelad filer, der matcher ethvert mønster i "
 "FIL"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FIL         start med FIL, når der sammenlignes kataloger"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -900,7 +881,7 @@ msgstr ""
 "    --from-file=FIL1            sammenlign FIL1 med alle operander; FIL1 må\n"
 "                                  godt være et katalog"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -909,75 +890,75 @@ msgstr ""
 "må\n"
 "                                  godt være et katalog"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i, --ignore-case               ignorér versalforskelle i filindhold"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      ignorér ændringer der skyldes\n"
 "                                  tabulatoromsætning"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space     ignorér blanke tegn ved linjens afslutning"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       ignorér ændringer i mængden af blanke tegn"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignorér alle blanke tegn"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B, --ignore-blank-lines        ignorér ændringer med kun tomme linjer"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=MØNSTER  ignorér ændringer, hvis linjer alle\n"
 "                                       matcher MØNSTER"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      behandl alle filer som tekst"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr         fjern afsluttende vognretur i inddata"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    læs og skriv data binært"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAVN                udskriv flettet fil med \"#ifdef NAVN\"-"
 "differ"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT    formatér GTYPE-inputgrupper med GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          formatér alle inputlinjer med LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    formatér LTYPE-inputlinjer med LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -985,7 +966,7 @@ msgstr ""
 "  Disse formattilvalg giver finkontrol over udskriften af diff, og\n"
 "    generaliserer -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE er \"old\" (gammel), \"new\" (ny) eller \"unchanged\" (uændret).\n"
@@ -993,7 +974,7 @@ msgstr ""
 
 # hvad er PREC?  Det står ingen steder i filen.  PRÆC blev brugt i tidligere
 # oversættelse, så beholder. -Ask
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1023,7 +1004,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  hvis A lig med B så T, ellers E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1035,7 +1016,7 @@ msgstr ""
 "    %l  indhold af linje, undtagen eventuelt følgende linjeskift\n"
 "    %[-][BREDDE][.[PRÆC]]{doxX}n  printf-angivelse for inputlinjenummer"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1049,34 +1030,35 @@ msgstr ""
 "    %c'\\OOO'  tegnet med oktalkode OOO\n"
 "    C    tegnet C (andre tegn repræsenterer sig selv)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            grundigt forsøg på at finde et mindre antal "
 "ændringer"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ANTAL  behold ANTAL linjer af fælles præfiks og suffiks"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  antag store filer og mange spredte, små ændringer"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=HVORNÅR]    farv udskriften; HVORNÅR kan være \"never\", "
 "\"always\"\n"
 "                           eller \"auto\" (standard)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1086,114 +1068,114 @@ msgstr ""
 "er\n"
 "                           en kolon-adskilt liste af terminfo-egenskaber"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               vis denne hjælpetekst og afslut"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            vis versionsoplysninger og afslut"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FILER er \"FIL1 FIL2\" eller \"KATALOG1 KATALOG2\" eller \"KATALOG FIL\" "
 "eller \"FIL KATALOG\"."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Hvis --from-file eller --to-file er givet, er der ingen restriktioner på "
 "FILer."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Såfremt en FIL er \"-\", læses fra standard-ind."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Brug: %s [TILVALG]... FILER\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Sammenlign filer linjevis."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "modstridende værdi for %s-tilvalget: \"%s\""
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "modstridende valg af uddata-stil"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "ugyldig farve \"%s\""
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Kun i %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "kan ikke sammenligne \"-\" med et katalog"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D tilvalg understøttes ikke for kataloger"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Identiske underkataloger: %s og %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Filen %s er en %s mens filen %s er en %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "De symbolske lænker %s og %s er forskellige\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Filerne %s og %s er identiske\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "inkompatible tilvalg"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "\"-\" angivet for mere end én ind-fil"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "læsning mislykkedes"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              udskriv alle ændringer, med konflikter i "
 "parenteser"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1201,11 +1183,11 @@ msgstr ""
 "-e, --ed                    udskriv et ed-script som udfører ændringerne\n"
 "                                fra GAMMELFIL til DINFIL ind i MINFIL"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          som -e, men sæt konflikter i parentes"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1213,22 +1195,22 @@ msgstr ""
 "-3, --easy-only             som -e, men inkludér kun ikke-overlappende "
 "ændringer"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          som -e, men inkludér kun overlappende ændringer"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          som -x, men sæt konflikter i parenteser"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          tilføj \"w\" og \"q\"-kommandoer til ed-script"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1236,25 +1218,25 @@ msgstr ""
 "-m, --merge                 udskriv faktisk flettet fil ifølge -A\n"
 "                                hvis ingen andre tilvalg er givet"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  behandl alle filer som tekst"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     fjern afsluttende vognretur i inddata"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           få tabulatorer på linje ved at forudstille\n"
 "                              en tabulator"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  brug PROGRAM til at sammenligne filerne"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1262,24 +1244,24 @@ msgstr ""
 "-L, --label=MÆRKAT          brug MÆRKAT frem for filnavn\n"
 "                                (kan gentages op til tre gange)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  vis denne hjælpetekst og afslut"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               vis versionsoplysninger og afslut"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Brug: %s [TILVALG]... MINFIL GAMMELFIL DINFIL\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Sammenlign tre filer linje for linje."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1305,47 +1287,47 @@ msgstr ""
 "end\n"
 "med ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Slutstatus er 0 hvis succes, 1 hvis der er konflikter, 2 hvis der er "
 "problemer."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "intern fejl: rod i formatet på diff blokke"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff fejlede: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "intern fejl: ugyldig diff type i process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "ugyldigt diff format; ugyldig ændrings-separator"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "ugyldigt diff format; uafsluttet sidste linje"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "hjælpeprogrammet \"%s\" kunne ikke køres"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "ugyldigt diff format; forkerte linje-begyndelses-tegn"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "intern fejl: ugyldig diff type sendt til uddata"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "ind-fil formindskedes"
 
@@ -1360,130 +1342,130 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekursiv katalogløkke"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=FIL             arbejd interaktivt, og send uddata til FIL"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case            anse store og små bogstaver for at være ens"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ignorér ændringer, der skyldes "
 "tabulatoromsætning"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  ignorér blanke tegn ved linjens afslutning"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    ignorér ændringer i mængden af blanke tegn"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignorér alle blanke tegn"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     ignorér ændringer med udelukkende blanke linjer"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=MØNSTER  ignorér ændringer, hvis linjer alle\n"
 "                                       matcher MØNSTER"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      fjern afsluttende vognretur i inddata"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   behandl alle filer som tekst"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr "-w, --width=ANTAL            udskriv højst ANTAL (normalt 130) søjler"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l, --left-column            vis kun venstre kolonne af fælles linjer"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  vis ingen fælles linjer"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            lav tabulatorer om til mellemrum i output"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ANTAL          tabulatorstop for hver ANTAL (normalt 8) "
 "kolonner"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                forsøg ihærdigt at finde et mindre antal "
 "ændringer"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      antag store filer og mange spredte, små "
 "ændringer"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM   brug PROGRAM til at sammenligne filerne"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   vis denne hjælpetekst og afslut"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                vis versionsoplysninger og afslut"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Brug: %s [TILVALG]... FIL1 FIL2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Side om side-fletning af forskelle mellem FIL1 og FIL2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "kan ikke indflette standard input interaktivt"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "begge filer der sammenlignes er kataloger"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1517,6 +1499,19 @@ msgstr "ukendt præfiks: %s"
 msgid "unparsable value for --palette"
 msgstr "værdi for --palette kan ikke fortolkes"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "ugyldigt %s%s-argument \"%s\""
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "ugyldig endelse i %s%s-argument \"%s\""
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s-argumentet \"%s\" er for stort"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Hjemmeside for %s: <http://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: tilvalget \"--%s\" tillader ikke et argument\n"
 
index 1cc3b04..307d5e5 100644 (file)
Binary files a/po/de.gmo and b/po/de.gmo differ
index 551fafa..879edbb 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -1,18 +1,18 @@
 # German messages for GNU diffutils.
 # This file is distributed under the same license as the diffutils package.
 # Copyright (C) 1996, 2001, 2002, 2012, 2013 Free Software Foundation, Inc.
-# Karl Eichwalder <keichwa@gmx.net>, 1996
-# Martin von Löwis <martin@v.loewis.de>, 1997, 2001, 2002
+#
+# Karl Eichwalder <keichwa@gmx.net>, 1996.
+# Martin von Löwis <martin@v.loewis.de>, 1997, 2001-2002.
 # Jakob Kramer <jakob.kramer@gmx.de>, 2012, 2013.
 # Benno Schulenberg <bensberg@justemail.net>, 2013.
-# Mario Blättermann <mario.blaettermann@gmail.com>, 2014-2018.
-#
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2014-2018, 2020-2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.6.17\n"
+"Project-Id-Version: GNU diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-27 12:56+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-22 11:18+0200\n"
 "Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
 "Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
 "Language: de\n"
@@ -20,28 +20,28 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Gtranslator 3.30.0\n"
+"X-Generator: Lokalize 21.04.3\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ungültiges Argument %s für %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "Argument %s für %s ist mehrdeutig"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Gültige Argumente sind:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "Programmfehler"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "Stacküberlauf"
 
@@ -201,11 +201,11 @@ msgstr "%s: Option verlangt ein Argument -- »%c«\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "»"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "«"
 
@@ -277,7 +277,7 @@ msgstr "Regulärer Ausdruck ist zu groß."
 msgid "Unmatched ) or \\)"
 msgstr "Schließende ) oder \\) ohne öffnende."
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Kein vorhergehender regulärer Ausdruck."
 
@@ -285,41 +285,31 @@ msgstr "Kein vorhergehender regulärer Ausdruck."
 msgid "memory exhausted"
 msgstr "Speicher verbraucht."
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "Standardeingabe"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "Standardausgabe"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "Standardfehlerausgabe"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "unbekannter Datenstrom"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "%s konnte mit Modus %s nicht wieder geöffnet werden"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "ungültiges %s%s-Argument »%s«"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "ungültiges Suffix in %s%s Argument »%s«"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s-Argument »%s« ist zu groß"
+msgid "standard file descriptors"
+msgstr "Standard-Dateideskriptoren"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -338,37 +328,33 @@ msgstr "Paket erstellt von %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Lizenz GPLv3+: GNU GPL Version 3 oder später <https://www.gnu.org/licenses/"
-"gpl.html>.\n"
+"Lizenz GPLv3+: GNU GPL Version 3 oder neuer <%s>.\n"
 "Dies ist freie Software: Sie dürfen sie verändern und verbreiten.\n"
 "Es gibt KEINE GARANTIE, soweit diese nicht durch das Gesetz vorgeschrieben\n"
 "wird.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Geschrieben von %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Geschrieben von %s und %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Geschrieben von %s, %s und %s.\n"
@@ -376,7 +362,7 @@ msgstr "Geschrieben von %s, %s und %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -388,7 +374,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -400,7 +386,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -412,7 +398,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -424,7 +410,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -438,7 +424,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -452,7 +438,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -467,38 +453,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Fehlerberichte an %s.\n"
 "Übersetzungsfehler an <http://translationproject.org/team/de.html>.\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Berichten Sie Fehler in %s an %s.\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Homepage von %s: <%s>.\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Homepage von %s: <https://www.gnu.org/software/%s/>.\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Allgemeine Hilfe zur Benutzung von GNU-Software: <https://www.gnu.org/"
-"gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Allgemeine Hilfe zur Benutzung von GNU-Software: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Dateien %s und %s sind verschieden.\n"
@@ -508,55 +485,55 @@ msgstr "Dateien %s und %s sind verschieden.\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binärdateien %s und %s sind verschieden.\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Kein Zeilenumbruch am Dateiende."
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "»%s --help« gibt Ihnen mehr Informationen."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "ungültiger --ignore-initial-Wert »%s«."
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "Die Optionen -l und -s sind inkompatibel."
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "Schreibfehler."
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "Standardausgabe"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes      Unterschiedliche Bytes ausgeben."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SKIP\n"
 "                         Die ersten SKIP Bytes der Eingabe überspringen."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -565,39 +542,39 @@ msgstr ""
 "                         Die ersten SKIP1 Bytes von DATEI1 und die\n"
 "                         ersten SKIP2 Bytes von DATEI2 überspringen."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose          Bytenummern und Werte aller unterschiedlichen\n"
 "                         Bytes ausgeben."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMIT      Höchstens LIMIT Bytes vergleichen."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent  Alle normalen Ausgaben unterdrücken."
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help             Diese Hilfe anzeigen und beenden."
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, -version           Versionsinformation ausgeben und beenden."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Aufruf: %s [OPTION]... DATEI1 [DATEI2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Zwei Dateien Byte für Byte vergleichen."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -605,13 +582,13 @@ msgstr ""
 "Die optionalen Argumente SKIP1 und SKIP2 geben die Zahl der Bytes an,\n"
 "die in jeder Datei übersprungen werden (standardmäßig null)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Nötige Argumente für lange Optionen sind auch für kurze Optionen nötig.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -621,170 +598,170 @@ msgstr ""
 "kB 1000, K 1024, MB 1.000.000, M 1.048.576,\n"
 "GB 1.000.000.000, G 1.073.741.824, und so weiter für T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Wenn DATEI »-« ist oder fehlt, wird von der Standardeingabe gelesen."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Der Rückgabewert des Programms ist 0, falls die Eingaben identisch\n"
 "sind, 1 falls sie verschieden sind und 2, falls es Probleme gab."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "ungültiger --bytes-Wert »%s«"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "fehlender Operand nach »%s«"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "extra Operand »%s«."
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s sind verschieden: Byte %s, Zeile %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s sind verschieden: Zeichen %s, Zeile %s ist %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: Dateiende in %s, welche leer ist.\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: Dateiende in %s nach Byte %s, Zeile %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: Dateiende in %s nach Byte %s, Zeile %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: Dateiende in %s nach Byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "ungültige Kontextlänge »%s«."
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "Seitenumbruch wird auf diesem System nicht unterstützt."
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "Zu viele Datei-Label-Optionen wurden angegeben."
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "ungültige Breite »%s«."
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "widersprüchliche Breitenoptionen"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "ungültige Horizontlänge »%s«."
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "ungültige Tabulatorbreite »%s«."
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "widersprüchliche Tabulatorbreitenoptionen."
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file und --to-file sind beide angegeben."
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                    Ein normales Diff ausgeben (Vorgabe)."
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q, --brief                     Nur ausgeben, ob die Dateien verschieden "
 "sind."
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files    Zurückgeben, ob zwei Dateien gleich sind."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C ZAHL, --context[=ZAHL]   ZAHL Zeilen des kopierten Kontexts ausgeben\n"
 "                                  (Vorgabe: 3)."
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
-"-u, -U ZAHL, --unified[=ZAHL]   ZAHL Zeilen des Unified-Kontexts ausgeben\n"
-"                                  (Vorgabe: 3)."
+"-u, -U ZAHL, --unified[=ZAHL]   ZAHL Zeilen des vereinheitlichten Kontexts\n"
+"                                  ausgeben (Vorgabe: 3)."
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                        Ein ed-Skript ausgeben."
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                       Im RCS-Format ausgeben."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side              In zwei Spalten ausgeben."
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
@@ -792,31 +769,31 @@ msgstr ""
 "ausgeben\n"
 "                                  (Vorgabe: 130)."
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column               Nur linke Spalte der gemeinsamen Zeilen\n"
 "                                  ausgeben."
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines     Keine gemeinsamen Zeilen ausgeben."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function           Für jede Änderung zeigen, in welcher\n"
 "                                  C-Funktion sie ist."
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE     Die vorangehende Zeile zeigen, die dem "
 "Muster\n"
 "                                  RE entspricht."
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -825,89 +802,89 @@ msgstr ""
 "Zeitstempels\n"
 "                                  benutzen (kann wiederholt werden)."
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, -expand-tabs                Tabulatoren in der Ausgabe zu Leerzeichen\n"
 "                                  ausdehnen."
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab               Einrückungen durch vorangestellte "
 "Tabulatoren\n"
 "                                  erzeugen."
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ZAHL              Tabulatorstopps sind alle ZAHL Spalten\n"
 "                                  (Vorgabe: 8)."
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty      Leerzeichen oder Tabulator vor leeren\n"
 "                                  Ausgabezeilen verhindern."
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                  Ausgabe an »pr« zum Seitenumbruch übergeben."
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 Rekursiv alle Unterverzeichnisse vergleichen."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 "    --no-dereference            Symbolischen Verknüpfungen nicht folgen."
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  Fehlende Dateien als leer betrachten."
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   Fehlende erste Dateien als leer betrachten."
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     Unterschiede der Groß-/Kleinschreibung von\n"
 "                                  Dateinamen ignorieren."
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  Unterschiede der Groß-/Kleinschreibung von\n"
 "                                  Dateinamen beachten."
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=MUSTER            Dateien ausschließen, die auf MUSTER passen."
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=DATEI        Dateien ausschließen, die auf eines der\n"
 "                                  Muster in DATEI passen."
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=DATEI       Beim Verzeichnisvergleich mit DATEI beginnen."
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -915,7 +892,7 @@ msgstr ""
 "    --from-file=DATEI1          DATEI1 mit allen Operanden vergleichen.\n"
 "                                  DATEI1 kann ein Verzeichnis sein."
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -923,33 +900,33 @@ msgstr ""
 "    --to-file=DATEI2            Alle Operanden mit DATEI2 vergleichen.\n"
 "                                  DATEI2 kann ein Verzeichnis sein."
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               Unterschiede der Groß-/Kleinschreibung\n"
 "                                  im Dateiinhalt ignorieren."
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      Änderungen aufgrund von Tabausdehnungen\n"
 "                                  ignorieren."
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     Leerraum am Zeilenende ignorieren."
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       Änderungen im Leerraum ignorieren."
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          Leerraum ignorieren."
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
@@ -957,49 +934,49 @@ msgstr ""
 "Zeilen\n"
 "                                  leer sind."
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  Änderungen ignorieren, bei denen alle "
 "Zeilen\n"
 "                                  auf das Muster RE passen."
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      Alle Dateien als Text behandeln."
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         Wagenrücklauf (CR) am Zeilenende beim\n"
 "                                  Einlesen entfernen."
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    Daten im Binärmodus lesen und schreiben."
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAME                Zusammengefügte Datei mit »#ifdef NAME« in\n"
 "                                  die Ausgabe mischen."
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   GTYPE-Eingabe mit GFMT formatieren."
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          Alle Eingabe-Zeilen mit LFMT formatieren."
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    LTYPE-Eingabe mit LFMT formatieren."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1007,13 +984,13 @@ msgstr ""
 "  Diese Formatoptionen stellen haargenaue Kontrolle über die Eingabe\n"
 "  von diff bereit, indem -D/--ifdef verallgemeinert wird."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE kann »old«, »new« oder »unchanged« sein.\n"
 "  GTYPE ist LTYPE oder »changed«."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1043,7 +1020,7 @@ msgstr ""
 "        M  L+1.\n"
 "    %(A=B?T:E)  Falls A gleich B, dann T, sonst E."
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1055,7 +1032,7 @@ msgstr ""
 "    %l  Inhalt der Zeile, ohne Zeilenumbruch am Ende.\n"
 "    %[-][BREITE][.[PRÄZ]]{doxX}n  Zeilennummer im printf-Stil."
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1069,37 +1046,39 @@ msgstr ""
 "    %c'\\OOO'  das Zeichen mit dem Oktalcode OOO\n"
 "    C    Das Zeichen C (andere Zeichen stellen sich selbst dar)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal             Intensiv nach einer kleineren Menge von "
 "Änderungen\n"
 "                            suchen."
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ZAHL  ZAHL Zeilen mit gemeinsamem Präfix und Suffix\n"
 "                            behalten."
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files   Es werden große Dateien mit vielen verstreuten,\n"
 "                            kleinen Änderungen vermutet."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=WANN]        Die Ausgabe einfärben; WANN kann »never«, "
 "»always«,\n"
-"                            oder »auto« sein (Voreinstellung)"
+"                            oder »auto« sein (Voreinstellung); »--color« "
+"ohne\n"
+"                            weitere Angaben bedeutet »--color='auto'«"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1110,113 +1089,113 @@ msgstr ""
 "                           PALETTE ist eine durch Doppelpunkte getrennte\n"
 "                           Liste aus terminfo-Capabilities."
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help                Diese Hilfe anzeigen und beenden."
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, -version              Versionsinformation ausgeben und beenden."
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "DATEIEN sind »DATEI1 DATEI2« oder »VERZ1 VERZ2« oder »VERZ DATEI«\n"
 "  oder »DATEI VERZ«."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Wenn --from-file oder --to-file angegeben werden, gibt es keine\n"
 "  Einschränkungen für DATEI(EN)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Wenn DATEI »-« ist, von der Standardeingabe lesen."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Aufruf: %s [OPTION]... DATEIEN\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "DATEIEN Zeile für Zeile vergleichen."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "Widersprüchlicher %s-Optionswert »%s«."
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "Widersprüchliche Optionen für den Ausgabestil."
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "Ungültige Farbe »%s«."
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Nur in %s: %s.\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "»-« kann nicht mit Verzeichnis verglichen werden."
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "Option -D nicht unterstützt bei Verzeichnissen"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Gemeinsame Unterverzeichnisse: %s und %s.\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Datei %s ist ein %s, während Datei %s ein %s ist.\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Symbolische Verknüpfungen %s und %s sind verschieden.\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Dateien %s und %s sind identisch.\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "Inkompatible Optionen."
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "»-« für mehr als eine Eingabedatei angegeben."
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "Lesefehler."
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all               Alle Änderungen ausgeben, Konflikte in Klammern."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1225,11 +1204,11 @@ msgstr ""
 "                                 von ALTEDATEI hin zu DEINEDATEI in\n"
 "                                 MEINEDATEI integriert."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E  --show-overlap           Wie -e, aber Konflikte in Klammern."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1237,23 +1216,23 @@ msgstr ""
 "-3, --easy-only              Wie -e, aber nur nichtüberlappende Änderungen\n"
 "                                 integrieren."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only           Wie -e, aber nur überlappende Änderungen\n"
 "                               integrieren."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                           Wie -x, aber Konflikte in Klammern."
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                           An ed-Skripte »w«- und »q«-Befehle anhängen."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1262,28 +1241,28 @@ msgstr ""
 "                                 falls keine anderen Optionen übergeben "
 "wurden."
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                   Alle Dateien als Text behandeln."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      Wagenrücklauf (CR) am Zeilenende beim Einlesen\n"
 "                                 entfernen."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab            Einrückungen durch vorangestellte Tabulatoren\n"
 "                                 erzeugen."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMM  PROGRAMM zum Vergleichen von Dateien verwenden."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1291,24 +1270,24 @@ msgstr ""
 "-L, --label=LABEL            LABEL statt des Dateinamens benutzen\n"
 "                                 (kann bis zu dreimal wiederholt werden)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                   Diese Hilfe anzeigen und beenden."
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version                Versionsinformation ausgeben und beenden."
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Aufruf: %s [OPTION]... MEINEDATEI ALTEDATEI DEINEDATEI\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Drei Dateien Zeile für Zeile vergleichen."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1332,47 +1311,47 @@ msgstr ""
 "intern zusammenführt und die eigentliche, zusammengeführte Datei ausgegeben\n"
 "wird. Für ungewöhnliche Eingaben ist dies robuster, als ed zu benutzen.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Der Rückgabewert des Programms ist 0, falls es erfolgreich ist, 1 falls\n"
 "es Konflikte gibt und 2 falls Probleme auftreten."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "Interner Fehler: Format für diff-Blöcke ist durcheinander."
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: »diff« ist gescheitert: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "Interner Fehler: Ungültiger diff-Typ in process_diff."
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "Ungültiges Diff-Format; ungültiger Änderungstrenner."
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "Ungültiges Diff-Format; unvollständige letzte Zeile."
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "Unterprogramm »%s« konnte nicht aufgerufen werden."
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "Ungültiges Diff-Format; inkorrektes führendes Zeichen in Zeile."
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "Interner Fehler: Ungültiger diff-Typ an Ausgabe übergeben."
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "Eingabedatei ist überraschend geschrumpft."
 
@@ -1387,105 +1366,105 @@ msgid "%s: recursive directory loop"
 msgstr "%s: Rekursive Verzeichnisschleife"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=DATEI           Interaktiv arbeiten, Ausgabe in DATEI speichern."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case            Nicht zwischen Groß- und Kleinschreibung "
 "unterscheiden."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   Änderungen aufgrund von Tabausdehnungen "
 "ignorieren."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  Leerraum am Zeilenende ignorieren."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    Änderungen an der Größe des Leerraums "
 "ignorieren."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       Leerraum ignorieren."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     Änderungen ignorieren, bei denen alle Zeilen "
 "leer sind."
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  Änderungen ignorieren, bei denen alle "
 "Zeilen\n"
 "                                  auf das Muster RE passen."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      Wagenrücklauf (CR) am Zeilenende beim Einlesen "
 "entfernen."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   Alle Dateien als Text betrachten."
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=ZAHL             Maximale ZAHL Druckspalten pro Zeile (Vorgabe: "
 "130)."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            Nur linke Spalte der gemeinsamen Zeilen "
 "ausgeben."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s,  --suppress-common-lines  Keine gemeinsamen Zeilen ausgeben."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            Tabulatoren in der Ausgabe zu Leerzeichen "
 "ausdehnen."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ZAHL           Tabulatorstopps sind alle ZAHL Spalten "
 "(Vorgabe: 8)."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                Intensiv nach einer kleineren Menge von "
 "Änderungen suchen."
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
@@ -1493,39 +1472,39 @@ msgstr ""
 "verstreuten,\n"
 "                               kleinen Änderungen vermutet."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMM  PROGRAMM zum Vergleichen von Dateien verwenden."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   Diese Hilfe anzeigen und beenden."
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, -version                 Versionsinformation ausgeben und beenden."
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Aufruf: %s [OPTION]... DATEI1 DATEI2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ""
 "Nebeneinanderstehendes Zusammenbringen der Unterschiede zwischen\n"
 "DATEI1 und DATEI2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "Die Standardeingabe kann nicht interaktiv zusammengebracht werden."
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "Beide zu vergleichende Dateien sind Verzeichnisse."
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1559,124 +1538,3 @@ msgstr "Unbekanntes Präfix: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr "Wert für --palette ist nicht auswertbar"
-
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: Option »--%s« erlaubt kein Argument.\n"
-
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: Unbekannte Option »--%s«.\n"
-
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: Option »-W %s« ist mehrdeutig\n"
-
-#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
-#~ msgstr "%s: Option »-W %s« erlaubt kein Argument.\n"
-
-#~ msgid "%s: option '-W %s' requires an argument\n"
-#~ msgstr "%s: Option »-W %s« verlangt ein Argument.\n"
-
-#~ msgid "                           or 'auto' (the default)"
-#~ msgstr "                            oder »auto« sein (Voreinstellung)"
-
-#~ msgid ""
-#~ "    --palette=PALETTE    specify the colors to use when --color is active"
-#~ msgstr "    --palette=PALETTE     Farben angeben, wenn --color aktiv ist."
-
-#~ msgid ""
-#~ "This program comes with NO WARRANTY, to the extent permitted by law.\n"
-#~ "You may redistribute copies of this program\n"
-#~ "under the terms of the GNU General Public License.\n"
-#~ "For more information about these matters, see the file named COPYING."
-#~ msgstr ""
-#~ "Dieses Programm wird ohne Gewährleistung geliefert, soweit dies\n"
-#~ "gesetzlich zulässig ist. Sie können es unter den Bedingungen der GNU\n"
-#~ "General Public License weitergeben. \n"
-#~ "Details dazu enthält die Datei COPYING."
-
-#~ msgid "%s: illegal option -- %c\n"
-#~ msgstr "%s: ungültige Option -- %c.\n"
-
-#~ msgid "Written by Torbjorn Granlund and David MacKenzie."
-#~ msgstr "Geschrieben von Torbjorn Granlund und David MacKenzie."
-
-#~ msgid "-i SKIP1:SKIP2  --ignore-initial=SKIP1:SKIP2"
-#~ msgstr "-i SKIP1:SKIP2  --ignore-initial=SKIP1:SKIP2"
-
-#~ msgid "-s  --quiet  --silent  Output nothing; yield exit status only."
-#~ msgstr "-s  -quiet  --silent  Keine Ausgabe; nur den Exit-Status setzen."
-
-#~ msgid "--help  Output this help."
-#~ msgstr "--help   Nur diese Hilfe zeigen."
-
-#~ msgid "Report bugs to <bug-gnu-utils@gnu.org>."
-#~ msgstr "Fehlerberichte bitte an <bug-gnu-utils@gnu.org>."
-
-#~ msgid ""
-#~ "Written by Paul Eggert, Mike Haertel, David Hayes,\n"
-#~ "Richard Stallman, and Len Tower."
-#~ msgstr ""
-#~ "Geschrieben von Paul Eggert, Mike Haertel, David Hayes,\n"
-#~ "Richard Stallman und Len Tower."
-
-#~ msgid "`-%ld' option is obsolete; use `-%c %ld'"
-#~ msgstr "Die Option »-%ld« ist veraltet; verwenden Sie »-%c %ld«."
-
-#~ msgid "`-%ld' option is obsolete; omit it"
-#~ msgstr "Die Option »-%ld« ist veraltet; lassen Sie sie weg."
-
-#~ msgid ""
-#~ "-c  -C NUM  --context[=NUM]  Output NUM (default 3) lines of copied "
-#~ "context.\n"
-#~ "-u  -U NUM  --unified[=NUM]  Output NUM (default 3) lines of unified "
-#~ "context.\n"
-#~ "  --label LABEL  Use LABEL instead of file name.\n"
-#~ "  -p  --show-c-function  Show which C function each change is in.\n"
-#~ "  -F RE  --show-function-line=RE  Show the most recent line matching RE."
-#~ msgstr ""
-#~ "  -c, -C ZAHL, --context[=ZAHL]    ZAHL Zeilen des kopierten Kontextes "
-#~ "ausgeben\n"
-#~ "                                   (Vorgabe: 3).\n"
-#~ "  -u, -U ZAHL, --unified[=ZAHL]    ZAHL Zeilen des \"unifizierten\" "
-#~ "Kontextes ausgeben\n"
-#~ "                                   (Vorgabe: 3).\n"
-#~ "  --label LABEL                    LABEL statt Dateiname verwenden.\n"
-#~ "  -p, --show-c-function            Anzeigen, in welcher C-Funktion die "
-#~ "Veränderung\n"
-#~ "                                   vorkommt.\n"
-#~ "  -F RE, --show-function-line=RE   Die nächste Zeile anzeigen, auf die RE "
-#~ "zutrifft."
-
-#~ msgid ""
-#~ "-y  --side-by-side  Output in two columns.\n"
-#~ "  -W NUM  --width=NUM  Output at most NUM (default 130) print columns.\n"
-#~ "  --left-column  Output only the left column of common lines.\n"
-#~ "  --suppress-common-lines  Do not output common lines."
-#~ msgstr ""
-#~ "-y  -side-by-side  In zwei Spalten ausgeben.\n"
-#~ "  -W ZAHL  --width=ZAHL  Maximal ZAHL Zeichen pro Zeile ausgeben(Vorgabe: "
-#~ "130).\n"
-#~ "  --left-column  Nur linke Spalte gemeinsamer Zeilen ausgeben.\n"
-#~ "  ---suppress-common-lines  Keine gemeinsamen Zeilen ausgeben."
-
-#~ msgid ""
-#~ "--speed-large-files  Assume large files and many scattered small changes."
-#~ msgstr ""
-#~ "--speed-large-files  Es werden große Dateien und viele Änderungen "
-#~ "vermutet."
-
-#~ msgid "-X  Output overlapping changes, bracketing them."
-#~ msgstr "-X  Überlappende Änderungen geklammert ausgeben."
-
-#~ msgid "-m  --merge  Output merged file instead of ed script (default -A)."
-#~ msgstr ""
-#~ "-m  --merge  Zusammengeführte Datei anstelle von ed-Skript ausgeben "
-#~ "(Vorgabe -A)."
-
-#~ msgid "-L LABEL  --label=LABEL  Use LABEL instead of file name."
-#~ msgstr "-L LABEL  --label=LABEL  LABEL anstelle des Dateinamens verwenden."
-
-#~ msgid "subsidiary program `%s' failed"
-#~ msgstr "Unterprogramm »%s« schlug fehl."
-
-#~ msgid "subsidiary program `%s' not executable"
-#~ msgstr "Unterprogramm »%s« ist nicht ausführbar."
index e4b2b54..6d4a7f2 100644 (file)
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.7\n"
+"Project-Id-Version: GNU diffutils 3.8\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,25 +17,25 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr ""
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr ""
 
@@ -195,11 +195,11 @@ msgstr ""
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr ""
 
@@ -271,7 +271,7 @@ msgstr ""
 msgid "Unmatched ) or \\)"
 msgstr ""
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr ""
 
@@ -279,40 +279,30 @@ msgstr ""
 msgid "memory exhausted"
 msgstr ""
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr ""
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr ""
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr ""
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr ""
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr ""
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
@@ -332,30 +322,29 @@ msgstr ""
 msgid "(C)"
 msgstr ""
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr ""
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr ""
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr ""
@@ -363,7 +352,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -373,7 +362,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -383,7 +372,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -393,7 +382,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -403,7 +392,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -414,7 +403,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -425,7 +414,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -437,33 +426,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr ""
@@ -473,432 +456,432 @@ msgstr ""
 msgid "Binary files %s and %s differ\n"
 msgstr ""
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr ""
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr ""
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr ""
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr ""
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr ""
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr ""
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr ""
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr ""
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr ""
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr ""
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr ""
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr ""
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y."
 msgstr ""
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr ""
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr ""
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr ""
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr ""
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr ""
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr ""
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr ""
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr ""
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr ""
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr ""
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr ""
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr ""
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr ""
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr ""
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr ""
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr ""
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr ""
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr ""
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr ""
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr ""
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr ""
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr ""
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
 msgstr ""
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr ""
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr ""
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -914,7 +897,7 @@ msgid ""
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -922,7 +905,7 @@ msgid ""
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -931,209 +914,209 @@ msgid ""
 "    C    the character C (other characters represent themselves)"
 msgstr ""
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr ""
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr ""
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr ""
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr ""
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr ""
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr ""
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr ""
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr ""
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr ""
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr ""
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr ""
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr ""
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr ""
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr ""
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr ""
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr ""
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr ""
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr ""
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr ""
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr ""
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr ""
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1147,45 +1130,45 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr ""
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr ""
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr ""
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr ""
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr ""
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr ""
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr ""
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr ""
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr ""
 
@@ -1200,115 +1183,115 @@ msgid "%s: recursive directory loop"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr ""
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr ""
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr ""
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr ""
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr ""
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr ""
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ""
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr ""
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr ""
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
index fad2338..9e74012 100644 (file)
Binary files a/po/el.gmo and b/po/el.gmo differ
index 7c1ba1d..6bb6aa4 100644 (file)
--- a/po/el.po
+++ b/po/el.po
@@ -2,13 +2,13 @@
 # Copyright (C) 2004 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Lefteris Dimitroulakis <edimitro@tee.gr>, 2004.
-# Lefteris Dimitroulakis <ledimitro@gmail.com>, 2013, 2014, 2017.
+# Lefteris Dimitroulakis <ledimitro@gmail.com>, 2013, 2014, 2017, 2019.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils-3.5.25\n"
+"Project-Id-Version: diffutils-3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2017-05-13 01:10+0300\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-01-10 22:24+0200\n"
 "Last-Translator: Lefteris Dimitroulakis <ledimitro@gmail.com>\n"
 "Language-Team: Greek <team@lists.gnome.gr>\n"
 "Language: el\n"
@@ -16,28 +16,28 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 1.5\n"
-"Plural-Forms:  nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 2.4.2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "μη έγκυρο όρισμα %s για %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "ασαφές όρισμα %s για %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Έγκυρο ορίσματα είναι:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "σφάλμα προγράμματος"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "υπερχείλιση στοίβας"
 
@@ -149,7 +149,7 @@ msgstr "%s: η επιλογή «%s%s» είναι ασαφής\n"
 #: lib/getopt.c:284
 #, c-format
 msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: η επιλογή «%s%s» είναι ασαφής· επιλογές: "
+msgstr "%s: η επιλογή «%s%s» είναι ασαφής· επιλογές:"
 
 #: lib/getopt.c:319
 #, c-format
@@ -197,11 +197,11 @@ msgstr "%s: η επιλογή απαιτεί όρισμα -- «%c»\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "»"
 
@@ -273,7 +273,7 @@ msgstr "Πολύ μεγάλη κανονική έκφραση"
 msgid "Unmatched ) or \\)"
 msgstr "Δε βρέθηκε ) ή \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Δεν προηγήθηκε κανονική έκφραση"
 
@@ -281,41 +281,31 @@ msgstr "Δεν προηγήθηκε κανονική έκφραση"
 msgid "memory exhausted"
 msgstr "η μνήμη εξαντλήθηκε"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "άγνωστο ρεύμα"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "αποτυχία ξανανοίγματος %s σε κατάσταση %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "μη έγκυρο %s%s όρισμα «%s»"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "μη έγκυρη κατάληξη «%s» στο όρισμα %s%s"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s όρισμα «%s» πολύ μεγάλο"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,37 +324,35 @@ msgstr "Packaged by %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
-"Άδεια GPLv3+: GNU GPL έκδοση 3 ή νεότερη <http://gnu.org/licenses/gpl."
+"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
 "html>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Γράφτηκε από %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Γράφτηκε από %s και %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Γράφτηκε από %s, %s,και %s.\n"
@@ -372,7 +360,7 @@ msgstr "Γράφτηκε από %s, %s,και %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -384,7 +372,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -396,7 +384,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -408,7 +396,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -420,7 +408,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -434,7 +422,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -448,7 +436,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -463,37 +451,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Report bugs to: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Report %s bugs to: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s home page: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s home page: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Γενική βοήθεια στη χρήση λογισμικού GNU: <http://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Τα αρχεία %s και %s διαφέρουν\n"
@@ -503,110 +483,108 @@ msgstr "Τα αρχεία %s και %s διαφέρουν\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Τα δυαδικά αρχεία %s και %s διαφέρουν\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Δοκιμάστε «%s --help» για περισσότερες πληροφορίες."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "άκυρη τιμή --ignore-initial «%s»"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "οι επιλογές -l και -s είναι ασύμβατες"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "η εγγραφή απέτυχε"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "κανονική έξοδος"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
-msgstr "-b,  --print-bytes  Εμφανίζει bytes που διαφέρουν."
+msgstr "-b,  --print-bytes  Εμφανίζει bytes που διαφέρουν"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SKIP  Παράβλεψη των πρώτων SKIP bytes και των δύο "
 "εισόδων"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
 "-i, --ignore-initial=SKIP1:SKIP2  παράβλεψη των πρώτων SKIP1 bytes του "
-"αρχείου FILE1 και\n"
-"      των πρώτων SKIP2 bytes του αρχείου FILE2"
+"αρχείου FILE1 και των πρώτων SKIP2 bytes του αρχείου FILE2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
-msgstr "-l  --verbose  Έξοδος αριθμού και τιμής όλων των bytes που διαφέρουν."
+msgstr "-l  --verbose  Έξοδος αριθμού και τιμής όλων των bytes που διαφέρουν"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
-msgstr "-n,  --bytes=ΟΡΙΟ  Σύγκριση το πολύ ΟΡΙΟ bytes."
+msgstr "-n,  --bytes=ΟΡΙΟ  Σύγκριση το πολύ ΟΡΙΟ bytes"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      απάλειψη κανονικής εξόδου"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 εμφάνιση αυτής εδώ της βοήθειας κι έξοδος"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v,  --version  εμφάνιση πληροφοριών έκδοσης κι έξοδος"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... ΑΡΧΕΙΟ1 [ΑΡΧΕΙΟ2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Σύγκριση δύο αρχείων byte προς byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr ""
-"Οι προαιρετικές παράμετροι SKIP1 και SKIP2 καθορίζουν τον αριθμό των bytes "
-"προς παράβλεψη\n"
-"στην αρχή κάθε αρχείου (η προεπιλογή είναι μηδέν). "
+"Οι προαιρετικές παράμετροι SKIP1 και SKIP2 καθορίζουν τον αριθμό των bytes\n"
+"προς παράβλεψη στην αρχή κάθε αρχείου (η προεπιλογή είναι μηδέν)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
-"Υποχρεωτικά ορίσματα στις μακρές επιλογές είναι υποχρεωτικά και στις κοντές "
-"επιλογές επίσης.\n"
+"Υποχρεωτικά ορίσματα στις μακρές επιλογές είναι υποχρεωτικά και στις "
+"κονÏ\84έÏ\82εÏ\80ιλογέÏ\82 ÎµÏ\80ίÏ\83ηÏ\82.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -617,275 +595,275 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, κτλ γιά T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Αν ένα ΑΡΧΕΙΟ είναι «-» ή απών, τότε ανάγνωση από την κανονική είσοδο."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Η έξοδος είναι 0 αν τα δεδομένα αρχεία είναι ίδια, 1 αν είναι διαφορετικά,\n"
 "2 αν υπάρχει πρόβλημα."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
-msgstr "άκυρη τιμή «%s» για την επιλογή --bytes "
+msgstr "άκυρη τιμή «%s» για την επιλογή --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "απών τελεστέος μετά από «%s»"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "συμπληρωματικός τελεστέος «%s»"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s διαφέρουν: byte %s, γραμμή %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s διαφέρουν: byte %s, γραμμή %s είναι %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF στο %s που είναι κενό\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF στο %s μετά το byte %s, γραμμή %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF στο %s μετά το byte %s, στη γραμμή %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF στο %s μετά το byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "μη έγκυρο μήκος συμφραζομένων «%s»"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
-msgstr "Î\97 Î±Ï\81ίθμιση σελίδων δεν υποστηρίζεται σ' αυτόν τον υπολογιστή"
+msgstr "η Î±Ï\81ίθμηση σελίδων δεν υποστηρίζεται σ' αυτόν τον υπολογιστή"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "πάρα πολλές επιλογές ετικέττας αρχείου"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "μη έγκυρο πλάτος «%s»"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "αντικρουόμενες επιλογές πλάτους"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "μη έγκυρο μήκος ορίζοντα «%s»"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "μη έγκυρο μήκος στηλοθέτησης `%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "αντικρουόμενες επιλογές μήκους στηλοθέτησης"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file και --to-file έχουν οριστεί αμφότερα"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "  --normal  Δημιουργία ενός κανονικού `diff' (προεπιλογή)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  αποτέλεσμα στην έξοδο μόνο αν τ' αρχεία διαφέρουν"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s,  --report-identical-files  Ειδοποιεί όταν δύο αρχεία είναι ίδια"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   έξοδος NUM (προεπιλογή 3) γραμμές of copied "
 "context"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
-"-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
+"-u, -U NUM, --unified[=NUM]   έξοδος NUM (προεπιλογή 3) γραμμές of unified "
+"context"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed   εμφανίζει ένα ed script"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n  --rcs  Δημιουργία αρχείου «diff» σε μορφή RCS."
+msgstr "-n  --rcs  Δημιουργία αρχείου «diff» σε μορφή RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            έξοδος σε δυο στήλες"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
-"--left-column  Εμφάνιση μόνο της αριστερής στήλης των ταυτόσημων γραμμών."
+"    --left-column  Εμφάνιση μόνο της αριστερής στήλης των ταυτόσημων γραμμών"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
-msgstr "-s  --suppress-common-lines  Οι ταυτόσημες γραμμές δεν εμφανίζονται."
+msgstr "    --suppress-common-lines  Οι ταυτόσημες γραμμές δεν εμφανίζονται"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function    εμφάνιση σε ποιά συνάρτηση C βρίσκεται κάθε αλλαγή"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE   εμφάνιση του πιο πρόσφατου ταιριάσματος "
 "γραμμής RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
-"-L, --label=LABEL           χρήση LABEL αντί ονόματος αρχείου και timestamp\n"
+"    --label=LABEL           χρήση LABEL αντί ονόματος αρχείου και timestamp\n"
 "                                (μπορεί να επαναληφθεί)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
-msgstr "-t,  --expand-tabs  Μετατροπή στηλοθετών σε διαστήματα στην έξοδο."
+msgstr "-t,  --expand-tabs  Μετατροπή στηλοθετών σε διαστήματα στην έξοδο"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
-"-T,  --initial-tab  Στοίχιση των στηλοθετών με την επιπρόσθεση ενός στην "
-"αρχή."
+"-T,  --initial-tab  Στοίχιση των στηλοθετών με την επιπρόσθεση ενός στην αρχή"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
-"  --tabsize=ΑΡ  Ο αριθμός διαστημάτων του στηλοθέτη είναι ΑΡ (προεπιλογή 8)"
+"    --tabsize=NUM  Ο αριθμός διαστημάτων του στηλοθέτη είναι NUM (προεπιλογή "
+"8) στήλες"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
-" --suppress-blank-empty  απάλειψη διαστήματος ή στ/θέτη πριν από κενές "
+"    --suppress-blank-empty  απάλειψη διαστήματος ή στ/θέτη πριν από κενές "
 "γραμμές στην έξοδο"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
-msgstr ""
-" -l,  --paginate  Έξοδος δια μέσου του «pr» ώστε να αριθμιθούν οι σελίδες"
+msgstr "-l,  --paginate       Έξοδος δια μέσου του «pr» για αρίθμηση"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r,  --recursive  Αναδρομική σύγκριση όσων υποκαταλόγων βρεθούν"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr " --no-dereference            μην ακολουθείς συμβολικούς συνδέσμους"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N,  --new-file  Θεωρεί τα απόντα αρχεία ως κενά"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
-msgstr "--unidirectional-new-file  Θεωρεί τα απόντα πρώτα αρχεία ως κενά."
+msgstr "--unidirectional-new-file  Θεωρεί τα απόντα πρώτα αρχεία ως κενά"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
-"--ignore-file-name-case  Î\91γνοεί τις διαφορές λόγω πεζών-κεφαλαίων\n"
-"                                     κατά τη σύγκριση ονομάτων αρχείων."
+"--ignore-file-name-case  Î±γνοεί τις διαφορές λόγω πεζών-κεφαλαίων\n"
+"κατά τη σύγκριση ονομάτων αρχείων."
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
-"--no-ignore-file-name-case  Λαμβάνει υπ' όψιν τις διαφορές λόγω\n"
-"                      πεζών-κεφαλαίων κατά τη σύγκριση ονομάτων αρχείων."
+"     --no-ignore-file-name-case  λαμβάνει υπ' όψιν τις διαφορές λόγω\n"
+"                      πεζών-κεφαλαίων κατά τη σύγκριση ονομάτων αρχείων"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
-msgstr "-x,  --exclude=PAT  Εξαίρεση αρχείων με όνομα που ταιριάζει με PAT."
+msgstr "-x,  --exclude=PAT    εξαίρεση αρχείων με όνομα που ταιριάζει με PAT"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X,  --exclude-from=ΑΡΧΕΙΟ    Εξαίρεση αρχείων με όνομα που ταιράζει\n"
 "                                  με τα ονόματα που βρίσκονται στο ΑΡΧΕΙΟ"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S,  --starting-file=ΑΡΧΕΙΟ  Εκκίνηση σύγκρισης καταλόγων από το ΑΡΧΕΙΟ"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -893,7 +871,7 @@ msgstr ""
 "--from-file=ΑΡΧΕΙΟ1      Σύγκριση ΑΡΧΕΙΟ1 με όλους τους τελεστέους·\n"
 "                                        ΑΡΧΕΙΟ1 μπορεί να είναι κατάλογος"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -901,79 +879,79 @@ msgstr ""
 "--to-file=ΑΡΧΕΙΟ2   Σύγκριση όλων των τελεστέων στο ΑΡΧΕΙΟ2·\n"
 "                                        ΑΡΧΕΙΟ2 μπορεί να είναι κατάλογος"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i,  --ignore-case  Αγνοεί τις διαφορές λόγω πεζών-κεφαλαίων στα περιεχόμενα "
 "των αρχείων"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E,  --ignore-tab-expansion  Αγνοεί αλλαγές οφειλόμενες στη στηλοθέτηση"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space     αγνοεί λευκά διαστήματα στο τέλος γραμμής"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b,  --ignore-space-change  Αγνοεί αλλαγές οφειλόμενες στον αριθμό λευκών "
 "διαστημάτων."
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w,  --ignore-all-space  Αγνοεί όλα τα λευκά διαστήματα."
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B,  --ignore-blank-lines    Αγνοεί αλλαγές οφειλόμενες στις λευκές γραμμές"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
-"-I,  --ignore-matching-lines=RE  Αγνοεί αλλαγές που οι γραμμές τους "
-"ταιριάζουν με RE."
+"-I,  --ignore-matching-lines=RE  Αγνοεί αλλαγές που οι γραμμές τους \n"
+" ταιριάζουν με RE."
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a,  --text  Θεωρεί όλα τα αρχεία ως κείμενο."
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Απαλειφή του χαρακτήρα επιστροφής στην είσοδο."
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary  Ανάγνωση και εγγραφή πληροφορίας σε δυαδική μορφή."
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=ΟΝΟΜΑ  Έξοδος συγχωνευμένου αρχείου με τις διαφορές «#ifdef "
 "NAME»."
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "--GTYPE-group-format=GFMT  μορφοποίηση ομάδων εισόδου GTYPE με GFMT."
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "--line-format=LFMT           μορφοποίηση όλων των γραμμών εισόδου με LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "--LTYPE-line-format=LFMT  μορφοποίηση γραμμών εισόδου LTYPE με LFMT."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -981,12 +959,12 @@ msgstr ""
 "Αυτές οι επιλογές μορφής παρέχουν λεπτομερή έλεγχο πάνω στην έξοδο\n"
 "    του diff, γενικεύοντας -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
-"  LTYPE είναι «old», «new», ή «unchanged».  GTYPE είναι LTYPE ή «changed»."
+"LTYPE είναι «old», «new», ή «unchanged».  GTYPE είναι LTYPE ή «changed»."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1001,7 +979,7 @@ msgid ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
-"GFMT μπορεί να περιέχει:\n"
+"GFMT (μόνο) μπορεί να περιέχει:\n"
 "    %<  για να δηλώνει γραμμές από το ΑΡΧΕΙΟ1\n"
 "    %>  για να δηλώνει γραμμές από το ΑΡΧΕΙΟ2\n"
 "    %=  για να δηλώνει ταυτόσημες γραμμές μεταξύ των ΑΡΧΕΙΟ1 και ΑΡΧΕΙΟ2\n"
@@ -1015,20 +993,20 @@ msgstr ""
 "        M  L+1\n"
 "      %(A=B?T:E)  αν A ίσον B τότε T αλλιώς E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
 "    %l  contents of line, excluding any trailing newline\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
-"  LFMT μπορεί να περιέχει:\n"
+"  LFMT (μόνο) μπορεί να περιέχει:\n"
 "    %L              για το περιεχόμενο της γραμμής\n"
 "    %l              για το περιεχόμενο της γραμμής χωρίς το τέλος γραμμής\n"
 "    %[-][ΠΛΑΤΟΣ][.[PREC]]{doxX}n  την προδιαγραφή του αριθμού γραμμής\n"
 "                                  εισόδου κατά τη μορφή της printf()"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1042,32 +1020,32 @@ msgstr ""
 "    %c'\\OOO'  το χαρακτήρα με οκταδικό κωδικό OOO\n"
 "    C    το χαρακτήρα C (οι άλλοι χαρακτήρες αναπαριστούν τον εαυτόν τους)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal  προσπάθεια εύρεσης μικρότερου συνόλου διαφορών."
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "--horizon-lines=ΑΡ  Διατηρεί ΑΡ γραμμές με ταυτόσημα προθέματα κι επιθέματα."
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "--speed-large-files  Υποθέτει μεγάλα αρχεία με πολλές σκόρπιες μικροαλλαγές."
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=WHEN]       χρωματίζει την έξοδο, WHEN μπορεί να είναι «ποτέ», "
-"«πάντα»,\n"
-" ή «αυτόματο» (προεπιλογή)"
+"    --color[=WHEN]       χρωματίζει την έξοδο, WHEN μπορεί να είναι «ποτέ»,\n"
+" «πάντα», ή «αυτόματο» (προεπιλογή)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1075,115 +1053,116 @@ msgid ""
 msgstr ""
 "    --palette=PALETTE    τα προς χρήση χρώματα όταν η επιλογή --color έχει "
 "ενεργοποιηθεί, PALETTE είναι\n"
-"                           μια λίστα ικανοτήτων terminfo που χωρίζονται από "
-"δίστιγμα. capabilities"
+" \n"
+"        μια λίστα ικανοτήτων terminfo capabilities που χωρίζονται από "
+"δίστιγμα"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               εμφάνιση αυτής εδώ της βοήθειας κι έξοδος"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version  Εμφάνιση πληροφοριών έκδοσης κι έξοδος"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ΑΡΧΕΙΑ είναι «ΑΡΧΕΙΟ1 ΑΡΧΕΙΟ2» ή «ΚΑΤ1 ΚΑΤ2» ή «ΚΑΤ ΑΡΧΕΙΟ...» ή «ΑΡΧΕΙΟ..."
 "ΚΑΤ»."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Αν δίδεται το --from-file ή το --to-file, τότε δεν υπάρχει περιορισμός στα "
 "ΑΡΧΕΙΑ. "
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Αν ένα ΑΡΧΕΙΟ είναι «-», τότε ανάγνωση από την τυπική είσοδο. "
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... ΑΡΧΕΙΑ\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Σύγκριση αρχείων γραμμή προς γραμμή."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "η επιλογή %s είναι αντικρουόμενη με την τιμή «%s»"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "αντικρουόμενες επιλογές για τη μορφή εξόδου"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "μη έγκυρο χρώμα «%s»"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Μόνο στο %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "Αδύνατη η σύγκριση του «-» με ένα κατάλογο"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "Η επιλογή -D δεν υποστηρίζεται για καταλόγους"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Οι υποκατάλογοι %s και %s είναι ταυτόσημοι\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Το αρχείο %s είναι %s ενώ το αρχείο %s είναι %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Οι συμβολικοί σύνδεσμοι %s και %s διαφέρουν\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Τα αρχεία %s καί %s είναι πανομοιότυπα\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "ασύμβατες επιλογές"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "«-» ορίστηκε για περισσότερα από ένα αρχεία εισόδου"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "αποτυχία ανάγνωσης"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr "-A  --show-all  Έξοδος όλων των διαφορών σε αγκύλες."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1191,11 +1170,11 @@ msgstr ""
 "-e, --ed  έξοδος ενός ed script που περιλαμβάνει τις αλλαγές\n"
 "από OLDFILE σε YOURFILE στο MYFILE "
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          όπως -e, αλλά οι διαφορές σε αγκύλες"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1203,22 +1182,22 @@ msgstr ""
 "-3, --easy-only    όπως -e, αλλά περιλαμβάνει μόνο τις μη "
 "αλληλοεπικαλυπτόμενες αλλαγές"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only    όπως -e, αλλά περιλαμβάνει μόνο τις αλληλοκαλυπτόμενες "
 "αλλαγές"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          like -x, but bracket conflicts"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i         προσάρτηση των εντολών «w» και «q» στα σενάρια του «ed»"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1226,25 +1205,25 @@ msgstr ""
 "-m, --merge                 έξοδος του συγχωνευμένου αρχείου σύμφωνα με την\n"
 "                                  -A αν δεν δίνεται άλλη επιλογή"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a,  --text  Θεωρεί όλα τα αρχεία ως κείμενο."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Απαλειφή του χαρακτήρα επιστροφής στην είσοδο."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T,  --initial-tab  στοίχιση των στηλοθετών με την επιπρόσθεση ενός στην "
 "αρχή."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "--diff-program=ΠΡΟΓΡ  Χρήση του ΠΡΟΓΡάμματος στη σύγκριση αρχείων."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1252,24 +1231,24 @@ msgstr ""
 "-L, --label=LABEL           χρήση LABEL αντί ονόματος αρχείου\n"
 "                                (μπορεί να επαναληφθεί μέχρι τρεις φορές) "
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  εμφάνιση αυτής εδώ της βοήθειας κι έξοδος "
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v,  --version  εμφάνιση πληροφοριών έκδοσης κι έξοδος"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Σύγκριση τριών αρχείων γραμμή προς γραμμή."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1296,45 +1275,45 @@ msgstr ""
 "είσοδο, αυτό είναι\n"
 "σταθερότερο απο την χρήση του ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Σε επιτυχία η έξοδος είναι 0, σε σύγκρουση 1 και σε πρόβλημα 2."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "εσωτερικό σφάλμα: μπέρδεμα στις μορφές των μπλοκ diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: αποτυχία του diff: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "εσωτερικό σφάλμα: μη έγκυρος τύπος diff στο process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "άκυρη μορφή diff· μη έγκυρος οριοθέτης αλλαγής"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "άκυρη μορφή diff· ασυμπλήρωτη τελευταία γραμμή"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "το υποπρόγραμμα «%s» δεν ήταν δυνατόν να κληθεί"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "άκυρη μορφή diff· λάθος χαρακτήρες στη γραμμή αποτελεσμάτων"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "εσωτερικό σφάλμα: μη έγκυρος τύπος diff πέρασε στην έξοδο"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "Το αρχείο εισόδου συρρικνώθηκε"
 
@@ -1349,129 +1328,129 @@ msgid "%s: recursive directory loop"
 msgstr "%s: αναδρομικός βρόχος στον κατάλογο"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o,  --output=ΑΡΧΕΙΟ  Αλληλεπιδραστική λειτουργία με αποστολή εξόδου στο "
 "ΑΡΧΕΙΟ."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i,  --ignore-case  Θεωρεί πεζά-κεφαλαία ίδια"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E,  --ignore-tab-expansion  Αγνοεί αλλαγές οφειλόμενες στη στηλοθέτηση"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  αγνοεί το λευκό διάστημα στο τέλος γραμμής"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change  αγνοεί αλλαγές οφειλόμενες στον αριθμό λευκών "
 "διαστημάτων"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W,  --ignore-all-space  Αγνοεί όλα τα λευκά διαστήματα."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B,  --ignore-blank-lines  Αγνοεί αλλαγές οφειλόμενες στις λευκές γραμμές"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  αγνοεί αλλαγές που οι γραμμές τους "
 "ταιριάζουν με RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Απαλειφή του χαρακτήρα επιστροφής στην είσοδο"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text  Θεωρεί όλα τα αρχεία ως κείμενο"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w,  --width=ΑΡ  Έξοδος με το πολύ ΑΡ στήλες εκτύπωσης (προεπιλογή 130)."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l,  --left-column  Εμφάνιση στην αριστερή στήλη των κοινών γραμμών"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s,  --suppress-common-lines  Οι ταυτόσημες γραμμές δεν εμφανίζονται"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t,  --expand-tabs  Μετατροπή στηλοθετών σε διαστήματα στην έξοδο"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "  --tabsize=ΑΡ  Ο αριθμός διαστημάτων του στηλοθέτη είναι ΑΡ (προεπιλογή 8) "
 "στήλες"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal   προσπάθεια εύρεσης μικρότερου συνόλου αλλαγών"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H,  --speed-large-files  Υποθέτει μεγάλα αρχεία με πολλές σκόρπιες "
 "μικροδιαφορές"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "--diff-program=ΠΡΟΓΡ  Χρήση του ΠΡΟΓΡάμματος στη σύγκριση αρχείων"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help    εμφάνιση αυτής εδώ της βοήθειας κι έξοδος "
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v  --version  ονόμα, έκδοση κι έξοδος"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Χρήση: %s [ΕΠΙΛΟΓΗ]... ΑΡΧΕΙΟ1 ΑΡΧΕΙΟ2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Συγχώνευση δίπλα-δίπλα των διαφορών των ΑΡΧΕΙΟ1 και ΑΡΧΕΙΟ2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "αδυνατώ να συγχωνεύσω αλληλεπιδραστικά την πρότυπη είσοδο."
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "και τα δύο προς σύγκριση αρχεία είναι κατάλογοι"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1487,11 +1466,11 @@ msgstr ""
 "ed:\tΔιόρθωση και μετά χρήση και των δύο παραλλαγών,\n"
 "εκάστη διακοσμημένη με επικεφαλίδα.\n"
 "eb:\tΔιόρθωση και μετά χρήση και των δύο παραλλαγών.\n"
-"el:\tΔιόρθωση και μετά χρήση της αριστερής παραλλαγής.\n"
-"er:\tΔιόρθωση και μετά χρήση της δεξιάς παραλλαγής.\n"
+"el ή e1:\tΔιόρθωση και μετά χρήση της αριστερής παραλλαγής.\n"
+"er ή e2:\tΔιόρθωση και μετά χρήση της δεξιάς παραλλαγής.\n"
 "e:\tΔιόρθωση νέας παραλλαγής.\n"
-"l:\tΧρήση αριστερής παραλλαγής.\n"
-"r:\tΧρήση δεξιάς παραλλαγής.\n"
+"l ή 1:\tΧρήση αριστερής παραλλαγής.\n"
+"r ή 2:\tΧρήση δεξιάς παραλλαγής.\n"
 "s:\tΣυμπεριλαμβάνει τις ταυτόσημες γραμμές σιωπηρά.\n"
 "v:\tΣυμπεριλαμβάνει τις ταυτόσημες γραμμές και το επισημαίνει.\n"
 "q:\tΈξοδος.\n"
@@ -1505,3 +1484,19 @@ msgstr "άγνωστο πρόθεμα: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr "unparsable τιμή για --palette "
+
+#, c-format
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "μη έγκυρο %s%s όρισμα «%s»"
+
+#, c-format
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "μη έγκυρη κατάληξη «%s» στο όρισμα %s%s"
+
+#, c-format
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s όρισμα «%s» πολύ μεγάλο"
+
+#, c-format
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s home page: <https://www.gnu.org/software/%s/>\n"
index 315df30..80d03ba 100644 (file)
Binary files a/po/eo.gmo and b/po/eo.gmo differ
index f64bcc8..345d61c 100644 (file)
--- a/po/eo.po
+++ b/po/eo.po
@@ -1,15 +1,15 @@
 # Esperantaj mesaĝoj por GNU diffutils.
-# Copyright (C) 1996, 2001, 2002, 2004, 2013, 2018 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2004, 2013, 2018, 2019 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Edmund GRIMLEY EVANS <edmundo@rano.org>, 2001, 2002, 2003, 2004.
-# Felipe Castro <fefcas@gmail.com>, 2013, 2018.
+# Felipe Castro <fefcas@gmail.com>, 2013, 2018, 2019.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.5.25\n"
+"Project-Id-Version: GNU diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-05-14 21:44-0300\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2019-01-27 18:19+0100\n"
 "Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
 "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
 "Language: eo\n"
@@ -17,27 +17,27 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Generator: Poedit 2.0.7\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "malvalida argumento %s por %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "plursenca argumento %s por %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Validaj argumentoj estas:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "program-eraro"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stako tro granda"
 
@@ -197,11 +197,11 @@ msgstr "%s: la modifilo postulas argumenton -- '%c'\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "‘"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "’"
 
@@ -273,7 +273,7 @@ msgstr "Regula esprimo tro grandas"
 msgid "Unmatched ) or \\)"
 msgstr "Neparigita ) aŭ \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Mankas antaŭa regulesprimo"
 
@@ -281,41 +281,31 @@ msgstr "Mankas antaŭa regulesprimo"
 msgid "memory exhausted"
 msgstr "memoro elĉerpiĝis"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "ĉefenigujo"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "ĉefeligujo"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "ĉeferar-eligujo"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "nekonata fluo"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "malsukcesis remalfermi %s per reĝimo %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "malvalida %s%s-argumento '%s'"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "malvalida sufikso en %s%s-argumento '%s'"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s-argumento '%s' tro larĝas"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,18 +324,16 @@ msgstr "Pakigita de %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
-"Permeso GPLv3+: GNU GPL versio 3 aŭ posta <http://gnu.org/licenses/gpl."
+"Permeso GPLv3+: GNU GPL versio 3 aŭ posta <https://gnu.org/licenses/gpl."
 "html>.\n"
 "Tio ĉi estas libera programaro: vi estas libera por ŝanĝi kaj redisdoni "
 "ĝin.\n"
@@ -353,19 +341,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Verkita de %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Verkita de %s kaj %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Verkita de %s, %s, kaj %s.\n"
@@ -373,7 +361,7 @@ msgstr "Verkita de %s, %s, kaj %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +373,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +385,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +397,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +409,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +423,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +437,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,39 +452,32 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Raportu program-misojn al: %s\n"
 "\n"
 "Raportu tradukajn misojn al: <translation-team-eo@lists.sourceforge.net>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Raportu %s misojn al: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s hejm-paĝo: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s hejm-paĝo: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
-"Ĝenerala helpo por uzi programaron GNU: <http://www.gnu.org/gethelp/>\n"
+"Ĝenerala helpo por uzi programaron GNU: <https://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Dosieroj %s kaj %s estas malsamaj\n"
@@ -506,55 +487,55 @@ msgstr "Dosieroj %s kaj %s estas malsamaj\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Ciferecaj dosieroj %s kaj %s estas malsamaj\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Mankas linifino ĉe fino de dosiero"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn GRANLUND"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MACKENZIE"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Provu '%s --help' por pli da informoj."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "malvalida valoro '%s' de --ignore-initial"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "modifiloj -l kaj -s malakordas"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "skriberaro"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "normala eligo"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          eligi malsamajn bajtojn"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i N  --ignore-initial=SALTO     preterpasi la unuajn SALTO bajtojn de ambaŭ "
 "enigoj"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -563,39 +544,39 @@ msgstr ""
 "                                      DOSIERO1 kaj la unuajn SALT2 bajtojn\n"
 "                                      de DOSIERO2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              montri numerojn kaj valorojn de ĉiuj malsamaj "
 "bajtoj"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMO           kompari maksimume LIMO bajtojn"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      forkaŝi ĉiun normalan eligon"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 montri ĉi tiun helpon kaj eliri"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
-msgstr " -v, --version             eligi informon pri versio kaj eliri"
+msgstr "-v, --version              eligi informon pri versio kaj eliri"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Uzmaniero: %s [MODIFILO]... DOSIERO1 [DOSIERO2 [SALT1 [SALT2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Kompari du dosierojn bajton post bajto."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -603,13 +584,13 @@ msgstr ""
 "La nedevigaj SALT1 kaj SALT2 indikas la nombron da bajtoj por salti\n"
 "en la komenco de ĉiu dosiero (aprioras nulo)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Nepraj argumentoj por longaj modifiloj ankaŭ nepras por la mallongaj.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -619,192 +600,192 @@ msgstr ""
 "kB 1000, K 1024, MB 1 000 000, M 1 048 576,\n"
 "GB 1 000 000 000, G 1 073 741 824, kaj tiel plu por T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Se DOSIERO estas '-' aŭ mankas, legi la normalan enigon."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Elig-valoro estas 0 se enigoj estas samaj, 1 se malsamaj, 2 se problemaj."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "malvalida valoro '%s' de --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "mankas argumento post '%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "superflua argumento '%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s malsamas: bajto %s, linio %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s malsamas: bajto %s, linio %s estas %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF ĉe %s, kiu malplenas\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF ĉe %s post bajto %s, linio %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF ĉe %s post bajto %s, en linio %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF ĉe %s post bajto %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul EGGERT"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike HAERTEL"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David HAYES"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard STALLMANN"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len TOWER"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "malvalida longo '%s' de kunteksto"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "dispaĝigo ne eblas kun ĉi tiu sistemo"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "tro multe da dosier-etikedaj modifiloj"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "malvalida larĝo '%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "malakordaj modifiloj pri larĝo"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "malvalida horizonta longo '%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "malvalida TAB-larĝo '%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "malkongruaj modifiloj pri TAB-larĝo"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file kaj --to-file ambaŭ specifitaj"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  montri normalan malsamon (aprioras)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   montri nur kiam la dosieroj malsamas"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  montri kiam du dosieroj samas"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   montri NUM (aprioras 3) liniojn da kopiita "
 "kunteksto"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NUM, --unified[=NUM]   montri NUM (aprioras 3) liniojn da unuigita "
 "kunteksto"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      montri ed-skripton"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     montri malsamon laŭ RCS-formo"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            montri en du kolumnoj"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NUM               montri maksimume NUM (aprioras 130) kolumnojn"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             montri nur la maldekstran kolumnon de komunaj "
 "linioj"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   ne montri komunajn liniojn"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         montri en kiu C-funkcio ĉiu ŝanĝo estas"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE   montri la plej freŝa linio kongruanta al RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -813,84 +794,84 @@ msgstr ""
 "tempindiko\n"
 "                                (povas esti ripetata)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             etendigi tabojn al spacoj en la eligo"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab             ĝustigi tabojn per antaŭmeto de tabo"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             tab-lokoj estas post ĉiuj NUM (aprioras 8) "
 "kolumnoj"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    forkaŝi spacon aŭ tabon antaŭ malplenaj "
 "eligitaj linioj"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                pasigi la eligon tra 'pr' por enpaĝigi ĝin"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 rikure kompari trovitajn subdosierujojn"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            ne sekvi simbolajn ligojn"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  trakti mankantajn dosierojn kiel malplenajn"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   trakti mankantajn unuajn dosierojn kiel "
 "malplenajn"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     preteratenti usklecon dum komparo de "
 "dosiernomoj"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  konsideri usklecon dum komparo de dosiernomoj"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=ŜABLONO           forigi dosierojn, kiuj kongruas kun ŜABLONO"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=DOSIERO      forigi dosierojn, kiuj kongruas kun iu "
 "ŝablono en DOSIERO"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=DOSIERO     komenci per DOSIERO, komparante dosierujojn"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -898,7 +879,7 @@ msgstr ""
 "    --from-file=DOSIERO1        kompari DOSIERO1 kun ĉiuj argumentoj;\n"
 "                                  DOSIERO1 povas esti dosierujo"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -906,78 +887,78 @@ msgstr ""
 "    --to-file=DOSIERO2          kompari ĉiujn argumentojn kun DOSIERO2;\n"
 "                                  DOSIERO2 povas esti dosierujo"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               preteratenti malsamojn en uskleco en "
 "dosierenhavo"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      preteratenti ŝanĝojn kaŭzatajn de tab-"
 "etendigo"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     preteratenti blank-spacon ĉe linifino"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       preteratenti ŝanĝojn en kvanto da blank-spaco"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          preteratenti ĉiun blankan spacon"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines         preteratenti ŝanĝojn, kie linioj estas ĉiuj "
 "malplenaj"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  preteratenti ŝanĝojn, kie ĉiuj linioj "
 "kongruas al RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                     trakti ĉiujn dosierojn kiel tekstajn"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr         forigi linifinan CR ĉe enigo"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    legi kaj skribi datumaron ciferece"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOMO                montri kunfanditan dosieron kun malsamoj "
 "'#ifdef NOMO'"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   enformigi enig-grupojn GTYPE per GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          enformigi ĉiujn enigliniojn per LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    enformigi enig-grupojn LTYPE per LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -985,12 +966,12 @@ msgstr ""
 "  Tiuj enformigaj modifiloj provizas rafinitan regadon pri la eligo\n"
 "    de diff, ĝeneraliganta -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE estas 'old', 'new' aŭ 'unchanged'.  GTYPE estas LTYPE aŭ 'changed'."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1018,7 +999,7 @@ msgstr ""
 "       M  L+1\n"
 "    %(A=B?T:E)  se A egalas al B, do T, male E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1030,7 +1011,7 @@ msgstr ""
 "    %l  enhavo linio, sen eventuala linifino\n"
 "    %[-][LARĜO][.[PREC]]{doxX}n  printf-stila indiko de lininumero"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1044,33 +1025,34 @@ msgstr ""
 "    %c'\\000'  la signo kun okuma kodo OOO\n"
 "    C    la signo C (aliaj signoj reprezentas ili mem)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            strebe serĉi pli etan aron da ŝanĝoj"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=NUM  teni NUM liniojn de la komuna prefikso kaj sufikso"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  atendi grandajn dosierojn kaj multajn disajn "
 "ŝanĝetojn"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=KIAM]       kolorigi la eligon; KIAM povas esti 'never', "
 "'always',\n"
 "                           aŭ 'auto' (aprioras)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1080,113 +1062,113 @@ msgstr ""
 "PALETRO\n"
 "                           estas kom-apartita listo de kapabloj de terminfo"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               montri ĉi tiun helpon kaj eliri"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            montri informon pri versio kaj eliri"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "DOSIEROJ estas 'DOSIERO1 DOSIERO2' aŭ 'UJO1 UJO2' aŭ 'UJA DOSIERO' aŭ "
 "'DOSIERA UJO'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Se --from-file aŭ --to-file estas donita, ne estas limigoj por DOSIERO(j)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Se DOSIERO estas '-', legi la ĉefenigujon."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Uzmaniero: %s [MODIFILO]... DOSIEROJ\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Kompari DOSIEROJn linion post linio."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "malakorda valoro de opcio %s: '%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "malakordaj modifiloj pri elig-stilo"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "malvalida koloro '%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Nur en %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "ne eblas kompari '-' al dosierujo"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "modifilo -D ne estas subtenata kun dosierujoj"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Komunaj subdosierujoj: %s kaj %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Dosiero %s estas %s, dum dosiero %s estas %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Simbolaj ligoj %s kaj %s malsamas\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Dosieroj %s kaj %s samas\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy SMITH"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "malkongruaj modifiloj"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "'-' indikita por pli ol unu enigdosiero"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lego fiaskis"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              montri ĉiujn ŝanĝojn, kun konfliktoj inter "
 "krampoj"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1194,11 +1176,11 @@ msgstr ""
 "-e, --ed                    montri ed-skripton enkorpigantan ŝanĝojn\n"
 "                                de PRADOSIERO al VIADOSIERO en MIADOSIEROn"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          kiel -e, sed kun konfliktoj inter krampoj"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1206,23 +1188,23 @@ msgstr ""
 "-3, --easy-only             kiel -e, sed enkorpigi nur ne-interkovriĝantajn "
 "ŝanĝojn"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          kiel -e, sed enkorpigi nur interkovriĝantajn "
 "ŝanĝojn"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          kiel -x, sed kun konfliktoj inter krampoj"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          aldoni la komandojn 'w' kaj 'q' al ed-skriptoj"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1230,23 +1212,23 @@ msgstr ""
 "-m, --merge                 montri veran kunfanditan dosieron, akorde al\n"
 "                                -A se neniu alia modifilo ĉeestas"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  trakti ĉiujn dosierojn kiel tekstajn"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     forigi linifinan CR ĉe enigo"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab           ĝustigi tabojn per antaŭmeto de tabo"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMO uzi PROGRAMOn por kompari dosierojn"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1254,24 +1236,24 @@ msgstr ""
 "-L, --label=ETIKEDO          uzi ETIKEDOn anstataŭ dosiernomo\n"
 "                                (povas esti ripetata ĝis 3 fojoj)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  montri ĉi tiun helpon kaj eliri"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               eligi informon pri versio kaj eliri"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Uzmaniero: %s [MODIFILO]... MIADOSIERO PRADOSIERO VIADOSIERO\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Kompari tri dosierojn linion post linio."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1295,45 +1277,45 @@ msgstr ""
 "eligu la veran kunfanditan dosieron.  Por ne-ordinara enigo, tio ĉi estas\n"
 "pli fortika ol la uzo de ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Elig-valoro estas 0 por sukceso, 1 por konfliktoj, 2 por problemo."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "interna eraro: fuŝo en formato de diff-blokoj"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff malsukcesis: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "interna eraro: malvalida diff-speco en process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "malvalida diff-formato; malvalida ŝanĝ-apartigilo"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "malvalida diff-formato; malkompleta lasta linio"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "ne eblis alvoki la subprogramon '%s'"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "malvalida diff-formato; malĝusta signo en antaŭa linio"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "interna eraro: malvalida diff-speco donita al eligo"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "enigdosiero ŝrumpis"
 
@@ -1348,132 +1330,132 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rikura dosieruja ciklo"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas LORD"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=DOSIERO         funkcii interage, sendante eligon al DOSIERO"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case            konsideri majusklojn kaj minusklojn kiel samajn"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   preteratenti ŝanĝojn kaŭzatajn de tab-etendigo"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  preteratenti ĉiun blank-spacon ĉe linifino"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change     preteratenti ŝanĝojn en la kvanto da blank-"
 "spaco"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       preteratenti ĉiun blank-spacon"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     preteratenti ŝanĝojn, kie linioj estas ĉiuj "
 "malplenaj"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  preteratenti ŝanĝojn, kie ĉiuj linioj "
 "kongruas al RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      forigi linifinan CR ĉe enigo"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   trakti ĉiujn dosierojn kiel tekstajn"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NUM               montri maksimume NUM (aprioras 130) kolumnojn"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column             montri nur la maldekstran kolumnon de komunaj "
 "linioj"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  ne eligi komunajn liniojn"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            etendigi tabojn al spacoj en la eligo"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             tab-lokoj estas post ĉiu NUM (aprioras 8) "
 "kolumnoj"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                strebe serĉi pli etan aron da ŝanĝoj"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      atendi grandajn dosierojn kaj multajn disajn "
 "ŝanĝetojn"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMO  uzi PROGRAMOn por kompari dosierojn"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   montri ĉi tiun helpon kaj eliri"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                montri informon pri versio kaj eliri"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Uzmaniero: %s [MODIFILO]... DOSIERO1 DOSIERO2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Apuda kunfando de malsamoj inter DOSIERO1 kaj DOSIERO2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "ne eblas interage kunfandi la ĉefenigujon"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "ambaŭ komparendaj dosieroj estas dosierujoj"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1507,6 +1489,18 @@ msgstr "nerekonata prefikso: %s"
 msgid "unparsable value for --palette"
 msgstr "neanalizebla valoro por --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "malvalida %s%s-argumento '%s'"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "malvalida sufikso en %s%s-argumento '%s'"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s-argumento '%s' tro larĝas"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s hejm-paĝo: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: la modifilo '--%s' ne permesas argumenton\n"
 
index e6b8770..948a436 100644 (file)
Binary files a/po/es.gmo and b/po/es.gmo differ
index 2e641f0..4f676c4 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -2,42 +2,41 @@
 # Copyright (C) 1996, 2001, 2002, 2004, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Iñaky Pérez González <inaky@peloncho.fis.ucm.es>, 1996.
-# Santiago Vila Doncel <sanvila@unex.es>, 2001, 2002, 2004, 2009, 2010, 2011, 2013.
+# Santiago Vila Doncel <sanvila@unex.es>, 2001, 2002, 2004, 2009, 2010, 2011, 2013, 2020.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.3-pre1\n"
+"Project-Id-Version: GNU diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2013-02-19 00:30+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2020-12-31 16:55+0100\n"
 "Last-Translator: Santiago Vila Doncel <sanvila@unex.es>\n"
-"Language-Team: Spanish <es@li.org>\n"
+"Language-Team: Spanish <es@tp.org.es>\n"
 "Language: es\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
-#, fuzzy, c-format
+#: lib/argmatch.c:132
+#, c-format
 msgid "invalid argument %s for %s"
-msgstr "argumento de %s%s inválido '%s'"
+msgstr "argumento %s inválido para %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
-msgstr ""
+msgstr "argumento %s ambiguo para %s"
 
-#: lib/argmatch.c:154
-#, fuzzy
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
-msgstr "argumento de %s%s inválido '%s'"
+msgstr "Los argumentos válidos son:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "error del programa"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "desbordamiento de pila"
 
@@ -88,7 +87,7 @@ msgstr "fichero especial de caracteres"
 
 #: lib/file-type.c:72
 msgid "contiguous data"
-msgstr ""
+msgstr "datos contiguos"
 
 #: lib/file-type.c:75
 msgid "fifo"
@@ -96,21 +95,19 @@ msgstr "`fifo'"
 
 #: lib/file-type.c:78
 msgid "door"
-msgstr ""
+msgstr "puerta"
 
 #: lib/file-type.c:81
-#, fuzzy
 msgid "multiplexed block special file"
-msgstr "fichero especial de bloques"
+msgstr "fichero especial de bloques multiplexado"
 
 #: lib/file-type.c:84
-#, fuzzy
 msgid "multiplexed character special file"
-msgstr "fichero especial de caracteres"
+msgstr "fichero especial de caracteres multiplexado"
 
 #: lib/file-type.c:87
 msgid "multiplexed file"
-msgstr ""
+msgstr "fichero multiplexado"
 
 # FIXME
 # se podría decir algo más decente para "weird" ... pero ¿qué?
@@ -118,34 +115,34 @@ msgstr ""
 # ¡Nchts! Prefiero extraño ... no habitual me suena muy difuso
 # siempre podemos poner escachifollado ;) ipg
 #: lib/file-type.c:90
-#, fuzzy
 msgid "named file"
-msgstr "fichero extraño"
+msgstr "fichero nombrado"
 
 #: lib/file-type.c:93
-#, fuzzy
 msgid "network special file"
-msgstr "fichero especial de bloques"
+msgstr "fichero especial de red"
 
 #: lib/file-type.c:96
 msgid "migrated file with data"
-msgstr ""
+msgstr "fichero migrado con datos"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr ""
+msgstr "fichero migrado sin datos"
 
 #: lib/file-type.c:102
 msgid "port"
-msgstr ""
+msgstr "puerto"
 
 #: lib/file-type.c:105
 msgid "socket"
 msgstr "`socket'"
 
+# Esto por lo visto se utiliza en un unionfs cuando la capa inferior es
+# de sólo lectura y en la capa superior se borra el fichero.
 #: lib/file-type.c:108
 msgid "whiteout"
-msgstr ""
+msgstr "suprimido"
 
 # FIXME
 # se podría decir algo más decente para "weird" ... pero ¿qué?
@@ -157,29 +154,29 @@ msgid "weird file"
 msgstr "fichero extraño"
 
 #: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: la opción '-W %s' es ambigua\n"
+msgstr "%s: la opción '%s%s' es ambigua\n"
 
 #: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: la opción '%s' es ambigua; posibilidades:"
+msgstr "%s: la opción '%s%s' es ambigua; posibilidades:"
 
 #: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: opción no reconocida '%c%s'\n"
+msgstr "%s: opción no reconocida '%s%s'\n"
 
 #: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: la opción '%c%s' no admite ningún argumento\n"
+msgstr "%s: la opción '%s%s' no admite ningún argumento\n"
 
 #: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: la opción '--%s' requiere un argumento\n"
+msgstr "%s: la opción '%s%s' requiere un argumento\n"
 
 #: lib/getopt.c:621
 #, c-format
@@ -212,11 +209,11 @@ msgstr "%s: la opción requiere un argumento -- '%c'\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "»"
 
@@ -294,9 +291,8 @@ msgid "Invalid back reference"
 msgstr "Retro-referencia inválida"
 
 #: lib/regcomp.c:156
-#, fuzzy
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "[ ó [^ desemparejados"
+msgstr "[, [^, [:, [. ó [= desemparejados"
 
 #: lib/regcomp.c:159
 msgid "Unmatched ( or \\("
@@ -334,7 +330,7 @@ msgstr "La expresión regular es demasiado grande"
 msgid "Unmatched ) or \\)"
 msgstr ") ó \\) desemparejado"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "No hay ninguna expresión regular previa"
 
@@ -342,41 +338,31 @@ msgstr "No hay ninguna expresión regular previa"
 msgid "memory exhausted"
 msgstr "memoria agotada"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "entrada estándar"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "salida estándar"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "salida de error estándar"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "flujo desconocido"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "fallo al reabrir %s con modo %s"
 
-#: lib/xstrtol-error.c:63
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argumento de %s%s inválido '%s'"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "sufijo inválido en el argumento de %s%s '%s'"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s argumento '%s' demasiado grande"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -395,37 +381,35 @@ msgstr "Empaquetado por %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
-"Licencia GPLv3+: GPL de GNU versión 3 o posterior <http://gnu.org/licenses/"
+"Licencia GPLv3+: GPL de GNU versión 3 o posterior <https://gnu.org/licenses/"
 "gpl.html>.\n"
 "Esto es software libre, usted es libre de cambiarlo y redistribuirlo.\n"
 "No hay NINGUNA GARANTÍA, hasta donde permite la ley.\n"
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Escrito por %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Escrito por %s y %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Escrito por %s, %s, y %s.\n"
@@ -433,7 +417,7 @@ msgstr "Escrito por %s, %s, y %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -445,7 +429,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -457,7 +441,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -469,7 +453,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -481,7 +465,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -495,7 +479,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -509,7 +493,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -524,39 +508,32 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Comunicar errores en el programa a: %s\n"
-"Comunicar errores de traducción a es@li.org y al último traductor.\n"
+"Comunicar errores de traducción al último traductor.\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Comunicar errores de %s a: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
-msgstr "%s página inicial: <%s>\n"
+msgstr "Página inicial de %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s página inicial: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
-"Ayuda general sobre el uso de software de GNU: <http://www.gnu.org/gethelp/"
+"Ayuda general sobre el uso de software de GNU: <https://www.gnu.org/gethelp/"
 ">\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Los ficheros %s y %s son distintos\n"
@@ -566,100 +543,100 @@ msgstr "Los ficheros %s y %s son distintos\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Los ficheros binarios %s y %s son distintos\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "No hay ningún carácter de nueva línea al final del fichero"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Pruebe '%s --help' para más información."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "valor --ignore-initial inválido '%s'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "las opciones -l y -s son incompatibles"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "la escritura falló"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "salida estándar"
 
 # Muestra como caracteres los bytes que difieran
 # queda más claro, creo yo em
 # Yo no le veo diferencia (¿será por qué lo parí yo? ;) ipg
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          muestra los bytes que son distintos"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
-"-i, --ignore-initial=SALTO           salta los primeros SALTO bytes de\n"
-"                                     las dos entradas"
+"-i, --ignore-initial=SALTO          salta los primeros SALTO bytes de\n"
+"                                        las dos entradas"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
 "-i, --ignore-initial=SALTO1:SALTO2  salta los primeros SALTO1 bytes de "
 "FICHERO1\n"
-"                                    y los primeros SALTO2 bytes de FICHERO2"
+"                                        y los primeros SALTO2 bytes de "
+"FICHERO2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
-"-l,  --verbose      muestra los números de byte y valores de todos los bytes "
-"que\n"
-"                    difieran"
+"-l, --verbose              muestra los números de byte y valores de todos\n"
+"                               los bytes que difieran"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LÍMITE         compara como máximo LÍMITE bytes"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      suprime toda la salida normal"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 muestra esta ayuda y finaliza"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              informa de la versión y finaliza"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Modo de empleo: %s [OPCIÓN]... FICHERO1 [FICHERO2 [SALTO1 [SALTO2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Compara dos ficheros byte por byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -667,7 +644,7 @@ msgstr ""
 "Los parámetros opcionales SALTO1 y SALTO2 especifican el número de\n"
 "bytes que se saltan en cada fichero (cero por omisión)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
@@ -675,7 +652,7 @@ msgstr ""
 "obligatorios\n"
 "para las opciones cortas.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -686,92 +663,92 @@ msgstr ""
 "kB 1.000, K 1.024, MB 1.000.000, M 1.048.576,\n"
 "GB 1.000.000.000, G 1.073.741.824, y así en adelante para T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Si un FICHERO es '-' o no se especifica, lee la entrada estándar."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "El estado de salida es 0 si las entradas son iguales, 1 si son diferentes,\n"
 "2 en caso de problema."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valor --bytes inválido '%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "falta un operando después de '%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "operando extra '%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s son distintos: byte %s, línea %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s son distintos: el byte %s, en la línea %s es %3o %s %3o %s\n"
 
-#: src/cmp.c:571
-#, fuzzy, c-format
+#: src/cmp.c:580
+#, c-format
 msgid "cmp: EOF on %s which is empty\n"
-msgstr "cmp: fin de fichero encontrado en %s\n"
+msgstr "cmp: fin de fichero encontrado en %s que está vacío\n"
 
-#: src/cmp.c:585
-#, fuzzy, c-format
+#: src/cmp.c:594
+#, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
-msgstr "%s %s son distintos: byte %s, línea %s\n"
+msgstr "cmp: fin de fichero en %s después del byte %s, línea %s\n"
 
-#: src/cmp.c:586
-#, fuzzy, c-format
+#: src/cmp.c:595
+#, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
-msgstr "%s %s son distintos: byte %s, línea %s\n"
+msgstr "cmp: fin de fichero en %s después del byte %s, en la línea %s\n"
 
-#: src/cmp.c:592
-#, fuzzy, c-format
+#: src/cmp.c:601
+#, c-format
 msgid "cmp: EOF on %s after byte %s\n"
-msgstr "cmp: fin de fichero encontrado en %s\n"
+msgstr "cmp: fin de fichero encontrado en %s después del byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "longitud de contexto inválida '%s'"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "este sistema no admite paginación"
@@ -785,137 +762,135 @@ msgstr "este sistema no admite paginación"
 # se refiere. la opción de etiqueta de fichero se ha especificado demasiadas
 # veces. O más cortito, dejarlo como está :) em+
 # Me parece que así está bien ...
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "demasiadas opciones de etiqueta de fichero"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "ancho inválido '%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opciones de ancho conflictivas"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "longitud del horizonte inválida '%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tamaño de tab inválido '%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opciones de tamaño de tab conflictivas"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "se ha especificado tanto --from-file como --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  produce un diff normal (predeterminado)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
-"-q  --brief                   indica sólo si los ficheros son diferentes o no"
+"-q, --brief                   indica sólo si los ficheros son diferentes o no"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
-"-s  --report-identical-files  notifica cuándo dos ficheros son idénticos"
+"-s, --report-identical-files  notifica cuándo dos ficheros son idénticos"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NÚM, --context[=NÚM]   muestra NÚM (por omisión 3) líneas de contexto"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NÚM, --unified[=NÚM]   muestra NÚM (por omisión 3) línea de contexto\n"
-"                              unificado"
+"                                unificado"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
-msgstr "-e  --ed                      produce un script ed"
+msgstr "-e, --ed                      produce un script ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n  --rcs                     produce un diff en formato RCS"
+msgstr "-n, --rcs                     produce un diff en formato RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            muestra en dos columnas"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
-"-W, --width=NÚM                     muestra como mucho NÚM columnas de "
-"impresión\n"
-"                                    (por omisión 130)"
+"-W, --width=NÚM               muestra como mucho NÚM columnas de impresión\n"
+"                                (por omisión 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
-"  --left-column        muestra sólo en la columna izquierda las líneas "
-"comunes"
+"    --left-column             muestra sólo en la columna izquierda las "
+"líneas comunes"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   no muestra las líneas comunes"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         muestra en qué función C está cada cambio"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=ER   muestra la línea más reciente que encaje con ER"
 
-#: src/diff.c:905
-#, fuzzy
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 "    --label ETIQUETA          utiliza ETIQUETA en lugar del nombre del "
-"fichero\n"
-"                                (se puede repetir)"
+"fichero y\n"
+"                                la marca de tiempo (se puede repetir)"
 
 # Aquí a lo mejor también: la salida -> el resultado. sv
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
-"-t  --expand-tabs             expande los tabuladores a espacios en la salida"
+"-t, --expand-tabs             expande los tabuladores a espacios en la salida"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             hace que los tabuladores se alineen\n"
 "                              anteponiendo uno"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
-"     --tabsize=NÚM  los topes de tabulación están separados por NÚM "
-"columnas\n"
-"                    de impresión (por omisión, 8)"
+"    --tabsize=NÚM             los topes de tabulación están separados por "
+"NÚM columnas\n"
+"                                de impresión (por omisión, 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -933,68 +908,68 @@ msgstr ""
 # Te mandaré el gettext, para que veas lo que vale un peine... sv
 # X'D ... no soy tan malo ... ipg
 # Medita de nuevo si no usas resultado em
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                pasa la salida a través de 'pr' para paginarla"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 compara recursivamente todos los "
 "subdirectorios"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            no sigue los enlaces simbólicos"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  trata los ficheros que no existan como vacíos"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
-"        --unidirectional-new-file   trata los ficheros originales que no "
+"    --unidirectional-new-file   trata los ficheros originales que no "
 "existan\n"
-"                                    como vacíos"
+"                                  como vacíos"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
-"    --ignore-file-name-case   descarta las diferencias entre mayúsculas y\n"
-"                              minúsculas al comparar los nombres de los "
+"    --ignore-file-name-case     descarta las diferencias entre mayúsculas y\n"
+"                                  minúsculas al comparar los nombres de los "
 "ficheros"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
-"--no-ignore-file-name-case  considera distintas mayúsculas y minúsculas\n"
-"                            cuando compara los nombres de los ficheros"
+"    --no-ignore-file-name-case  considera distintas mayúsculas y minúsculas\n"
+"                                  cuando compara los nombres de los ficheros"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=PAT               excluye los ficheros que coincidan con PAT"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FICHERO      excluye los ficheros que coincidan con "
 "alguna\n"
-"                                expresión regular de FICHERO"
+"                                  expresión regular de FICHERO"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FICHERO     comienza por FICHERO cuando se comparan\n"
 "                                directorios"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -1002,100 +977,100 @@ msgstr ""
 "    --from-file=FICHERO1        compara FICHERO1 con todos los operandos;\n"
 "                                  FICHERO1 puede ser un directorio"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
-"    --to-file=FICHERO2          compara todos los operandos con FICHERO2\n"
+"    --to-file=FICHERO2          compara todos los operandos con FICHERO2;\n"
 "                                  FICHERO2 puede ser un directorio"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
-"-i, --ignore-case        descarta las diferencias entre mayúsculas y "
+"-i, --ignore-case               descarta las diferencias entre mayúsculas y "
 "minúsculas\n"
-"                         en el contenido de los ficheros"
+"                                  en el contenido de los ficheros"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      descarta cambios debidos a expansiones de "
 "tabs"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space     descarta espacio en blanco al final de línea"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
-"-b, --ignore-space-change      descarta las diferencias en la cantidad de\n"
-"                               espacio en blanco"
+"-b, --ignore-space-change       descarta las diferencias en la cantidad de\n"
+"                                  espacio en blanco"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          descarta los espacios en blanco"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        descarta los cambios en líneas completamente "
 "vacías"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=EXPR-REG  descarta las líneas que coincidan con "
 "EXPR-REG"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr ""
 "-a, --text                      trata todos los ficheros como de tipo texto"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         elimina los retornos de carro finales en la "
 "entrada"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    lee y escribe los datos en modo binario"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
-"-D, --ifdef=NOMBRE        genera un fichero combinado que muestra las\n"
-"                          diferencias con '#ifdef NOMBRE'"
+"-D, --ifdef=NOMBRE              genera un fichero combinado que muestra las\n"
+"                                  diferencias con '#ifdef NOMBRE'"
 
 # Propongo similar -> parecida. Ver gettext. sv
 # Hmmm ... prefiero similar. Antes estaba puesto `parecida' y la verdad,
 # no quedaba tan bien. ipg
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT   formatea los grupos de entrada GTYPE con GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          formatea todas las líneas de entrada con LFMT"
 
 # ídem. sv
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT    formatea las líneas de entrada LTYPE con LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1104,13 +1079,13 @@ msgstr ""
 "resultado\n"
 "    de diff, generalizando -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE es 'old' (antiguo), 'new' (nuevo) o 'unchanged' (sin cambios).\n"
 "  GTYPE es como LTYPE o 'changed' (cambiado)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1130,16 +1105,16 @@ msgstr ""
 "    %>  líneas del FICHERO2\n"
 "    %=  líneas comunes a FICHERO1 y FICHERO2\n"
 "    %[-][ANCHO][.[PRECISIÓN]]{doxX}LETRA  especificación printf para LETRA\n"
-"    Las LETRAs pueden ser como siguen para grupos nuevos (en minúsculas\n"
-"    para grupos antiguos):\n"
-"      F  número de la primera línea\n"
-"      L  número de la última línea\n"
-"      N  número de líneas = L-F+1\n"
-"      E  F-1\n"
-"      M  L+1\n"
+"      Las LETRAs pueden ser como siguen para grupos nuevos (en minúsculas\n"
+"      para grupos antiguos):\n"
+"        F  número de la primera línea\n"
+"        L  número de la última línea\n"
+"        N  número de líneas = L-F+1\n"
+"        E  F-1\n"
+"        M  L+1\n"
 "  %(A=B?T:E)  si A es igual a B entonces T en caso contrario E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1153,7 +1128,7 @@ msgstr ""
 "el\n"
 "                                      número de línea de entrada"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1167,146 +1142,153 @@ msgstr ""
 "    %c'\\OOO'  el carácter con código octal OOO\n"
 "    C    el carácter C (los otros caracteres se representan a sí mismos)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            se esfuerza en encontrar un grupo de cambios menor"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=NÚM  mantiene NÚM líneas de prefijos y sufijos comunes"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  supone que los ficheros son grandes y los cambios "
 "son\n"
-"                         numerosos, pequeños y dispersos"
+"                           numerosos, pequeños y dispersos"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
+"    --color[=CUÁNDO]     colorea la salida; CUÁNDO puede ser 'never', "
+"'always',\n"
+"                           o 'auto' (por omisión)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
+"    --palette=PALETA     los colores que se usan cuando --color está activo; "
+"PALETA es\n"
+"                           una lista de capacidades de terminfo separadas "
+"por dos puntos"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               muestra esta ayuda y finaliza"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            informa de la versión y finaliza"
 
-#: src/diff.c:982
-#, fuzzy
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FICHEROS puede ser 'FICHERO1 FICHERO2' o 'DIRECTORIO1 DIRECTORIO2'\n"
-"  o 'DIRECTORIO FICHERO...' o 'FICHERO... DIRECTORIO'."
+"  o 'DIRECTORIO FICHERO' o 'FICHERO DIRECTORIO'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr "Si se da --from-file o --to-file, no hay restricciones en FICHERO(s)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Si un FICHERO es '-', lee la entrada estándar."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Modo de empleo: %s [OPCIÓN]... FICHEROS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Compara FICHEROS línea por línea."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "la opción %s tiene el valor conflictivo '%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "las especificaciones del estilo de salida son conflictivas"
 
-#: src/diff.c:1061
-#, fuzzy, c-format
+#: src/diff.c:1063
+#, c-format
 msgid "invalid color '%s'"
-msgstr "ancho inválido '%s'"
+msgstr "color inválido '%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Sólo en %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "no se puede comparar '-' con un directorio"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "la opción -D no se puede usar con directorios"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirectorios comunes: %s y %s\n"
 
 # Nota: El segundo y el cuarto `%s' son tipos de fichero.
 # Por ejemplo, "texto C", "texto FORTRAN", etc.
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "El fichero %s es un %s mientras que el %s es un %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Los enlaces simbólicos %s y %s son distintos\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Los ficheros %s y %s son idénticos\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opciones incompatibles"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "se ha especificado '-' para más de un fichero de entrada"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "la lectura falló"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              muestra todos los cambios, encerrando los "
 "conflictos\n"
-"                            entre corchetes"
+"                                entre corchetes"
 
 # Sería ideal traducir OLDFILE y YOURFILE. sv
 # Sí, eso pensé yo, pero no sé como ponerlo para que quede bien ...
@@ -1317,79 +1299,80 @@ msgstr ""
 #      MYFILE          MI-FICHERO
 #
 # Pongo eso por ahora, pero espero una sugerencia mejor ;)
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
-"-e, --ed              muestra un `script' ed incorporando los cambios entre\n"
-"                      FICHERO-ANTIGUO y TU-FICHERO a MI-FICHERO"
+"-e, --ed                    muestra un `script' ed incorporando los cambios "
+"entre\n"
+"                                FICHERO-ANTIGUO y TU-FICHERO a MI-FICHERO"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          como -e, pero encerrando los conflictos\n"
-"                            entre corchetes"
+"                                entre corchetes"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 "-3, --easy-only             como -e, pero solamente incorpora los cambios "
 "que\n"
-"                            no se superponen"
+"                                no se superponen"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          como -e, pero solamente muestra los cambios que "
 "se\n"
-"                            solapan"
+"                                solapan"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          como -x, pero encierra conflictos entre corchetes"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          añade las órdenes 'w' y 'q' a los scripts ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 "-m, --merge                 muestra el fichero combinado, de acuerdo con -A "
 "si\n"
-"                              no se especifica ninguna otra opción"
+"                                no se especifica ninguna otra opción"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr ""
 "-a, --text                  trata todos los ficheros como de tipo texto"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     elimina los retornos de carro finales en la "
 "entrada"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           hace que los tabuladores se alineen anteponiendo "
 "uno"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMA utiliza PROGRAMA para comparar los ficheros"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1398,24 +1381,24 @@ msgstr ""
 "fichero\n"
 "                                (se puede reperir hasta tres veces)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  muestra esta ayuda y finaliza"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v  --version               informa de la versión y finaliza"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Modo de empleo: %s [OPCIÓN]... MI-FICHERO FICHERO-ANTIGUO TU-FICHERO\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Compara tres ficheros línea por línea."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1442,49 +1425,49 @@ msgstr ""
 "es\n"
 "más robusto que usar ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "El estado de salida es 0 en caso de éxito, 1 si hay conflictos, 2 en caso "
 "de\n"
 "problema."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "error interno: fallo en el formato de los bloques diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff falló: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "error interno: tipo de diff inválido en process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formato de diff inválido; separador de cambio inválido"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formato de diff inválido; línea final incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "no se ha podido invocar al programa subsidiario '%s'"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr ""
 "formato de diff inválido; caracteres incorrectos al comienzo de la línea"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "error interno: tipo de diff inválido pasado a la salida"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "el fichero de entrada ha menguado"
 
@@ -1499,143 +1482,142 @@ msgid "%s: recursive directory loop"
 msgstr "%s: bucle de directorio recursivo"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
-"-o, --output=FICHERO            opera interactivamente, enviando el "
-"resultado\n"
-"                                al fichero FICHERO"
+"-o, --output=FICHERO         opera interactivamente, enviando el resultado\n"
+"                                 al fichero FICHERO"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            considera iguales mayúsculas y minúsculas"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   descarta cambios debidos a expansiones de tabs"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  descarta espacio en blanco al final de línea"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
-"-b, --ignore-space-change    descarta las diferencias en la cantidad "
+"-b, --ignore-space-change    descarta las diferencias en la cantidad de "
 "espacio\n"
-"                             en blanco"
+"                                 en blanco"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       descarta todo el espacio en blanco"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     descarta los cambios cuyas líneas son todas "
 "vacías"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=EXPR-REG  descarta las líneas que coincidan con "
 "EXPR-REG"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      elimina los retornos de carro finales en la "
 "entrada"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr ""
 "-a, --text                   trata todos los ficheros como de tipo texto"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
-"-w,  --width=NÚM             muestra como mucho NÚM columnas de impresión\n"
-"                             (por omisión 130)"
+"-w, --width=NÚM              muestra como mucho NÚM columnas de impresión\n"
+"                                 (por omisión 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            muestra sólo la columna izquierda de líneas "
 "comunes"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  no muestra las líneas comunes"
 
 # Aquí a lo mejor también: la salida -> el resultado. sv
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            expande los tabuladores a espacios en la salida"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NÚM            los topes de tabulación están separados por "
 "NÚM\n"
-"                             columnas de impresión (por omisión, 8)"
+"                                 columnas de impresión (por omisión, 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                se esfuerza en encontrar un grupo de cambios "
 "menor"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      supone que los ficheros son grandes y los "
 "cambios\n"
-"                             son numerosos, pequeños y dispersos"
+"                                 son numerosos, pequeños y dispersos"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMA  utiliza PROGRAMA para comparar los ficheros"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   muestra esta ayuda y finaliza"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                informa de la versión y finaliza"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Modo de empleo: %s [OPCIÓN]... FICHERO1 FICHERO2\n"
 
 # Se admiten sugerencias.
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ""
 "Combinación a dos columnas de las diferencias entre FICHERO1 y FICHERO2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "no se puede mezclar interactivamente con la entrada estándar"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "los dos ficheros que hay que comparar son directorios"
 
@@ -1680,7 +1662,7 @@ msgstr "los dos ficheros que hay que comparar son directorios"
 # ## verbosidad
 # ## I. De verbo.
 # ##    1. (sustantivo femenino). Verborrea.
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1705,28 +1687,33 @@ msgstr ""
 "q:       Salir.\n"
 
 #: src/util.c:662
-#, fuzzy, c-format
+#, c-format
 msgid "unrecognized prefix: %s"
-msgstr "%s: opción no reconocida '--%s'\n"
+msgstr "prefijo no reconocido: %s"
 
 #: src/util.c:692
 #, c-format
 msgid "unparsable value for --palette"
-msgstr ""
+msgstr "valor incomprensible para --palette"
 
-#, fuzzy
-#~ msgid "                           or 'auto' (the default)"
-#~ msgstr ""
-#~ "    --normal                  produce un diff normal (predeterminado)"
+#, c-format
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "argumento de %s%s inválido '%s'"
 
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: la opción '--%s' no admite ningún argumento\n"
+#, c-format
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "sufijo inválido en el argumento de %s%s '%s'"
 
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: opción no reconocida '--%s'\n"
+#, c-format
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s argumento '%s' demasiado grande"
 
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: la opción '-W %s' es ambigua\n"
+#, c-format
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Página inicial de %s: <https://www.gnu.org/software/%s/>\n"
+
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: la opción '--%s' no admite ningún argumento\n"
 
 #~ msgid "%s: option '-W %s' doesn't allow an argument\n"
 #~ msgstr "%s: la opción '-W %s' no admite ningún argumento\n"
index 7305156..52fae2d 100644 (file)
Binary files a/po/fi.gmo and b/po/fi.gmo differ
index ac41639..a1a1a8b 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,14 +1,14 @@
 # Finnish translation of GNU diffutils.
 # This file is distributed under the same license as the diffutils package.
-# Copyright © 2016 Free Software Foundation, Inc.
-# Lauri Nurmi <lanurmi@iki.fi>, 2002-2004,2015-2016.
+# Copyright © 2021 Free Software Foundation, Inc.
+# Lauri Nurmi <lanurmi@iki.fi>, 2002-2004, 2015-2016, 2019, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.3-pre1\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2016-05-26 21:28+0300\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 12:40+0300\n"
 "Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
 "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
 "Language: fi\n"
@@ -16,29 +16,28 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 1.8.7\n"
+"X-Generator: Poedit 3.0\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:134
-#, fuzzy, c-format
+#: lib/argmatch.c:132
+#, c-format
 msgid "invalid argument %s for %s"
-msgstr "argumentti %s on virheellinen %s:lle"
+msgstr "virheellinen argumentti %s %s:lle"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
-msgstr ""
+msgstr "moniselitteinen argumentti %s %s:lle"
 
-#: lib/argmatch.c:154
-#, fuzzy
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
-msgstr "argumentti %s on virheellinen %s:lle"
+msgstr "Kelvolliset argumentit ovat:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "ohjelmavirhe"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "pinon ylivuoto"
 
@@ -72,7 +71,7 @@ msgstr "semafori"
 
 #: lib/file-type.c:58
 msgid "shared memory object"
-msgstr "jaettu muistiobjekti"
+msgstr "jaetun muistin objekti"
 
 #: lib/file-type.c:61
 msgid "typed memory object"
@@ -88,7 +87,7 @@ msgstr "merkkilaite-erikoistiedosto"
 
 #: lib/file-type.c:72
 msgid "contiguous data"
-msgstr ""
+msgstr "yhtenäistä dataa"
 
 #: lib/file-type.c:75
 msgid "fifo"
@@ -96,43 +95,39 @@ msgstr "fifo"
 
 #: lib/file-type.c:78
 msgid "door"
-msgstr ""
+msgstr "ovi"
 
 #: lib/file-type.c:81
-#, fuzzy
 msgid "multiplexed block special file"
-msgstr "lohkolaite-erikoistiedosto"
+msgstr "limitetty lohkoerikoistiedosto"
 
 #: lib/file-type.c:84
-#, fuzzy
 msgid "multiplexed character special file"
-msgstr "merkkilaite-erikoistiedosto"
+msgstr "limitetty merkkierikoistiedosto"
 
 #: lib/file-type.c:87
 msgid "multiplexed file"
-msgstr ""
+msgstr "limitetty tiedosto"
 
 #: lib/file-type.c:90
-#, fuzzy
 msgid "named file"
-msgstr "outo tiedosto"
+msgstr "nimetty tiedosto"
 
 #: lib/file-type.c:93
-#, fuzzy
 msgid "network special file"
-msgstr "lohkolaite-erikoistiedosto"
+msgstr "verkkoerikoistiedosto"
 
 #: lib/file-type.c:96
 msgid "migrated file with data"
-msgstr ""
+msgstr "datallinen siirretty tiedosto"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr ""
+msgstr "dataton siirretty tiedosto"
 
 #: lib/file-type.c:102
 msgid "port"
-msgstr ""
+msgstr "portti"
 
 #: lib/file-type.c:105
 msgid "socket"
@@ -140,36 +135,36 @@ msgstr "pistoke"
 
 #: lib/file-type.c:108
 msgid "whiteout"
-msgstr ""
+msgstr "himmeä"
 
 #: lib/file-type.c:110
 msgid "weird file"
 msgstr "outo tiedosto"
 
 #: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: valitsin ”-W %s” on moniselitteinen\n"
+msgstr "%s: valitsin ”%s%s” on moniselitteinen\n"
 
 #: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: valitsin ”%s” on moniselitteinen; vaihtoehdot:"
+msgstr "%s: valitsin ”%s%s” on moniselitteinen; vaihtoehdot:"
 
 #: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: tunnistamaton valitsin ”%c%s”\n"
+msgstr "%s: tunnistamaton valitsin ”%s%s”\n"
 
 #: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n"
+msgstr "%s: valitsin ”%s%s” ei salli argumenttia\n"
 
 #: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: valitsin ”--%s” vaatii argumentin\n"
+msgstr "%s: valitsin ”%s%s” vaatii argumentin\n"
 
 #: lib/getopt.c:621
 #, c-format
@@ -202,11 +197,11 @@ msgstr "%s: valitsin vaatii argumentin -- ”%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "”"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -216,7 +211,7 @@ msgstr "Onnistui"
 
 #: lib/regcomp.c:138
 msgid "No match"
-msgstr "Ei vastaavuutta"
+msgstr "Ei täsmäävyyttä"
 
 #: lib/regcomp.c:141
 msgid "Invalid regular expression"
@@ -239,9 +234,8 @@ msgid "Invalid back reference"
 msgstr "Virheellinen takaisinviittaus"
 
 #: lib/regcomp.c:156
-#, fuzzy
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Pariton [ tai [^"
+msgstr "Pariton [, [^, [:, [. tai [="
 
 #: lib/regcomp.c:159
 msgid "Unmatched ( or \\("
@@ -253,7 +247,7 @@ msgstr "Pariton \\{"
 
 #: lib/regcomp.c:165
 msgid "Invalid content of \\{\\}"
-msgstr "Virheellinen \"\\{\\}\":n sisältö"
+msgstr "Virheellinen \\{\\}:n sisältö"
 
 #: lib/regcomp.c:168
 msgid "Invalid range end"
@@ -279,7 +273,7 @@ msgstr "Liian suuri säännöllinen lauseke"
 msgid "Unmatched ) or \\)"
 msgstr "Pariton ) tai \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Ei edellistä säännöllistä lauseketta"
 
@@ -287,41 +281,31 @@ msgstr "Ei edellistä säännöllistä lauseketta"
 msgid "memory exhausted"
 msgstr "muisti lopussa"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "vakiosyöte"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "vakiotuloste"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
-msgstr "vakiovirhetuloste"
+msgstr "vakiovirhe"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "tuntematon virta"
 
-#: lib/xfreopen.c:39
-#, fuzzy, c-format
+#: lib/xfreopen.c:38
+#, c-format
 msgid "failed to reopen %s with mode %s"
-msgstr "%s: Oikeuksien muuttaminen tilaan %s ei onnistu"
+msgstr "tiedoston %s avaaminen uudelleen tilassa %s epäonnistui"
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argumentti %s on virheellinen %s:lle"
-
-#: lib/xstrtol-error.c:68
-#, fuzzy, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "virheellinen loppuliite ”%.*s” liukulukuvakiolla"
-
-#: lib/xstrtol-error.c:72
-#, fuzzy, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "lukumäärä %s on liian suuri"
+#: lib/xstdopen.c:34
+#, c-format
+msgid "standard file descriptors"
+msgstr "tavalliset tiedostokahvat"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -340,37 +324,32 @@ msgstr "Paketoinut %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Lisenssi GPLv3+: GNU GPL versio 3 tai myöhempi <http://gnu.org/licenses/gpl."
-"html>.\n"
+"Lisenssi GPLv3+: GNU GPL versio 3 tai myöhempi <%s>.\n"
 "Tämä on vapaa ohjelmisto; sitä saa vapaasti muuttaa ja levittää edelleen.\n"
 "Siinä määrin kuin laki sallii, TAKUUTA EI OLE.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Kirjoittanut %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Kirjoittaneet %s ja %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Kirjoittaneet %s, %s ja %s.\n"
@@ -378,7 +357,7 @@ msgstr "Kirjoittaneet %s, %s ja %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -390,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -402,7 +381,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -414,7 +393,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -427,7 +406,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -441,7 +420,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -455,7 +434,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -470,37 +449,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Ilmoita ohjelmistovioista (englanniksi) osoitteeseen: %s\n"
+msgid "Report bugs to: %s\n"
+msgstr "Ilmoita ohjelmistovioista (englanniksi) osoitteeseen: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Ilmoita %s-vioista (englanniksi) osoitteeseen %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s-kotisivu: <%s>\n"
 
-#: lib/version-etc.c:253
-#, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s-kotisivu: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Yleisohjeita GNU-ohjelmistojen käyttöön: <http://www.gnu.org/gethelp/>\n"
+#: lib/version-etc.c:260
+#, c-format
+msgid "General help using GNU software: <%s>\n"
+msgstr "Yleisohjeita GNU-ohjelmistojen käyttöön: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Tiedostot %s ja %s eroavat\n"
@@ -510,512 +479,490 @@ msgstr "Tiedostot %s ja %s eroavat\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binääritiedostot %s ja %s eroavat\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Ei rivinvaihtoa tiedoston lopussa"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Komento ”%s --help” antaa lisää tietoa."
 
-#: src/cmp.c:137
-#, fuzzy, c-format
+#: src/cmp.c:138
+#, c-format
 msgid "invalid --ignore-initial value '%s'"
-msgstr "virheellinen alkuarvo jäsenelle %qE"
+msgstr "virheellinen arvo ”%s” valitsimelle --ignore-initial"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
-msgstr "valitsimet -l ja -s eivät ole yhteensopivia"
+msgstr "valitsimet -l ja -s ovat yhteensopimattomat"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "kirjoitus epäonnistui"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "vakiotuloste"
 
-#: src/cmp.c:161
-#, fuzzy
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
-msgstr "-b  --print-bytes  Tulostaa eroavat tavut."
+msgstr "-b, --print-bytes           tulosta eroavat tavut"
 
-#: src/cmp.c:162
-#, fuzzy
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
-"-i OHITA --ignore-initial=OHITA Ohittaa syötteen ensimmäiset OHITA tavua."
+"-i, --ignore-initial=OHITUS       ohita ensimmäiset OHITUS tavua\n"
+"                                    kummastakin syötteestä"
 
-#: src/cmp.c:163
-#, fuzzy
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
-"  Ohittaa TIEDOSTO1:n ensimmäiset OHITA1 tavua, ja TIEDOSTO2:n ensimmäiset "
-"OHITA2 tavua."
+"-i, --ignore-initial=OHITUS1:OHITUS2 ohita TIEDOSTO1:n ensimmäiset OHITUS1\n"
+"                                      tavua ja TIEDOSTO2:n ensimmäiset "
+"OHITUS2 tavua"
 
-#: src/cmp.c:165
-#, fuzzy
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
-msgstr "-I  --verbose  Näytä kaikkien eroavien tavujen sijainnit ja arvot"
+msgstr "-l, --verbose              tulosta tavujen sijainnit ja eroavat arvot"
 
-#: src/cmp.c:166
-#, fuzzy
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
-msgstr "-n RAJA   --bytes=RAJA  Vertaa korkeintaan RAJAn verran tavuja."
+msgstr "-n, --bytes=RAJA           vertaa enintään RAJAn verran tavuja"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      vaienna kaikki tavanomainen tuloste"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                  näytä tämä ohje ja poistu"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              näytä versiotiedot ja poistu"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
-msgstr "Käyttö: %s [VALITSIN]... TIEDOSTO1 [TIEDOSTO2 [OHITA1 [OHITA2]]]\n"
+msgstr "Käyttö: %s [VALITSIN]... TIEDOSTO1 [TIEDOSTO2 [OHITUS1 [OHITUS2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Vertaa kahta tiedostoa tavu tavulta."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr ""
-"OHITA1 ja OHITA2 ovat jokaisen tiedostn alusta ohitettavien tavujen\n"
-"määrä (oletusarvo on nolla)."
+"Valinnaiset OHITUS1 ja OHITUS2 ovat kunkin tiedoston alusta\n"
+"ohitettavien tavujen määrä (oletusarvoisesti nolla)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y."
 msgstr ""
-"OHITA-arvoihin voidaan liittää perään seuraavat kertoimet:\n"
-"kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
-"GB 1,000,000,000, G 1,073,741,824, sekä T, P, E, Z, Y."
+"OHITUS-arvoihin voidaan liittää perään seuraavat kertoimet:\n"
+"kB 1000, K 1024, MB 1 000 000, M 1 048 576,\n"
+"GB 1 000 000 000, G 1 073 741 824 jne. myös kertoimille T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Jos TIEDOSTOa ei ole annettu, tai se on ”-”, luetaan vakiosyötettä."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Paluuarvo on 0, jos syötteet ovat samoja, 1 jos erilaisia, "
 "ongelmatilanteissa 2."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "virheellinen arvo ”%s” valitsimelle --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "puuttuva operandi argumentin ”%s” jälkeen"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "ylimääräinen operandi ”%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s eroavat: tavu %s, rivi %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s eroavat: tavu %s, rivi %s on %3o %s %3o %s\n"
 
-#: src/cmp.c:571
-#, fuzzy, c-format
+#: src/cmp.c:580
+#, c-format
 msgid "cmp: EOF on %s which is empty\n"
-msgstr "cmp: Tiedoston %s loppu\n"
+msgstr "cmp: tyhjän tiedoston %s loppu\n"
 
-#: src/cmp.c:585
-#, fuzzy, c-format
+#: src/cmp.c:594
+#, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
-msgstr "%s %s eroavat: tavu %s, rivi %s\n"
+msgstr "cmp: tiedoston %s loppu tavun %s jälkeen, rivi %s\n"
 
-#: src/cmp.c:586
-#, fuzzy, c-format
+#: src/cmp.c:595
+#, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
-msgstr "%s %s eroavat: tavu %s, rivi %s\n"
+msgstr "cmp: tiedoston %s loppu tavun %s jälkeen, rivissä %s\n"
 
-#: src/cmp.c:592
-#, fuzzy, c-format
+#: src/cmp.c:601
+#, c-format
 msgid "cmp: EOF on %s after byte %s\n"
-msgstr "cmp: Tiedoston %s loppu\n"
+msgstr "cmp: tiedoston %s loppu tavun %s jälkeen\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "virheellinen kontekstin pituus ”%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
-msgstr "tämä isäntä ei tue sivunumerointia"
+msgstr "tämä kone ei tue sivunumerointia"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
-msgstr "liian monta tiedostonimivalitsinta"
+msgstr "liian monta tiedostonimiövalitsinta"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
-msgstr "virheellinen leveys \"%s\""
+msgstr "virheellinen leveys ”%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "ristiriitaiset leveysvalinnat"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
-msgstr "virheellinen horisontin pituus \"%s\""
+msgstr "virheellinen horisontin pituus ”%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
-msgstr "virheellinen sarkaimen koko \"%s\""
+msgstr "virheellinen sarkaimen koko ”%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "ristiriitaiset sarkaimen kokovalinnat"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
-msgstr "sekä valitsin --from-file että --to-file on määritetty"
+msgstr "sekä valitsin --from-file että --to-file on annettu"
 
-#: src/diff.c:891
-#, fuzzy
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
-msgstr "--normal  Tulosta normaali diff."
+msgstr "    --normal                  tulosta normaali diff (oletus)"
 
-#: src/diff.c:892
-#, fuzzy
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
-msgstr "-q  --brief  Kertoo vain, eroavatko tiedostot."
+msgstr "-q, --brief                   kertoo vain, eroavatko tiedostot"
 
-#: src/diff.c:893
-#, fuzzy
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
-msgstr "-s  --report-identical-files  Ilmoita, jos kaksi tiedostoa ovat samat."
+msgstr "-s, --report-identical-files  ilmoita, jos kaksi tiedostoa ovat samat"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
+"-c, -C MÄÄRÄ, --context[=MÄÄRÄ] tulosta MÄÄRÄ riviä (oletus 3) kopioitua "
+"kontekstia"
 
-#: src/diff.c:895
-#, fuzzy
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
-"-w MÄÄRÄ  --width=MÄÄRÄ  Tulosta enintään MÄÄRÄ (oletus 130) merkkiä riville."
+"-u, -U MÄÄRÄ, --unified[=MÄÄRÄ] tulosta MÄÄRÄ riviä (oletus 3) "
+"yhtenäistettyä\n"
+"                                  kontekstia"
 
-#: src/diff.c:896
-#, fuzzy
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
-msgstr "-e  --ed  Tulosta ed-skripti."
+msgstr "-e, --ed                      tulosta ed-skripti"
 
-#: src/diff.c:897
-#, fuzzy
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n  --rcs  Tulosta RCS-muotoinen diff."
+msgstr "-n, --rcs                     tulosta RCS-muotoinen diff"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
-msgstr ""
+msgstr "-y, --side-by-side            tulosta kahdelle palstalle"
 
-#: src/diff.c:899
-#, fuzzy
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
-"-w MÄÄRÄ  --width=MÄÄRÄ  Tulosta enintään MÄÄRÄ (oletus 130) merkkiä riville."
+"-W, --width=MÄÄRÄ            tulosta enintään MÄÄRÄ (oletus 130) merkkiä "
+"riville"
 
-#: src/diff.c:900
-#, fuzzy
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
-msgstr "-l  --left-column  Tulosta vain yhteisten rivien vasen palsta"
+msgstr ""
+"    --left-column             tulosta vain yhteisten rivien vasen palsta"
 
-#: src/diff.c:901
-#, fuzzy
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
-msgstr "-s  --suppress-common-lines  Älä tulosta yhteisiä rivejä."
+msgstr "    --suppress-common-lines  älä tulosta yhteisiä rivejä"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
-msgstr ""
+msgstr "-p, --show-c-function         näytä missä C-funktiossa kukin muutos on"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
+"-F, --show-function-line=SL   näytä viimeisin SL-lausekkeeseen täsmäävä rivi"
 
-#: src/diff.c:905
-#, fuzzy
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
-"--from-file=TIEDOSTO1  Vertaa TIEDOSTO1:ä kaikkiin operandeihin. TIEDOSTO1 "
-"voi olla hakemisto."
+"    --label NIMIÖ             käytä NIMIÖtä tiedostonimen ja aikaleiman\n"
+"                                sijaan (voidaan toistaa)"
 
-#: src/diff.c:908
-#, fuzzy
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
-msgstr "-t  --expand-tabs  Laajentaa sarkaimet välilyönneiksi tulosteessa."
+msgstr ""
+"-t, --expand-tabs             laajenna sarkaimet välilyönneiksi tulosteessa"
 
-#: src/diff.c:909
-#, fuzzy
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab  Lisää sarkain rivien alkuun."
+msgstr "-T, --initial-tab             kohdista sarkaimet lisäämällä sarkaimia"
 
-#: src/diff.c:910
-#, fuzzy
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
-msgstr "--tabsize=KOKO Sarkaimen koko on KOKO (oletus 8) merkkiä."
+msgstr ""
+"    --tabsize=KOKO            sarkaimet joka KOKO. merkin välein (oletus 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
+"    --suppress-blank-empty    vaienna välilyönti tai sarkain tyhjien\n"
+"                                tulosterivien edeltä"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
-"-l  --paginate  Ohjaa tuloste ohjelman \"pr\" läpi sivunumerointia varten."
+"-l, --paginate                ohjaa tuloste ”pr”-ohjelman läpi\n"
+"                                sivunumerointia varten"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
-"-r,  --recursive                 vertaa löytyneitä alihakemistoja "
+"-r, --recursive                 vertaa löytyneitä alihakemistoja "
 "rekursiivisesti"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
-msgstr ""
+msgstr "    --no-dereference            älä seuraa symbolisia linkkejä"
 
-#: src/diff.c:916
-#, fuzzy
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
-msgstr "-N  --new-file  Käsittele puuttuvia tiedostoja tyhjinä."
+msgstr "-N, --new-file                  käsittele puuttuvia tiedostoja tyhjinä"
 
-#: src/diff.c:917
-#, fuzzy
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
-msgstr "--unidirectional-new-file  Käsittele puuttuvia tiedostoja tyhjinä."
+msgstr ""
+"    --unidirectional-new-file    käsittele puuttuvia tiedostoja tyhjinä"
 
-#: src/diff.c:918
-#, fuzzy
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
-"--ignore-file-name-case  Älä huomioi kirjainkokoa tiedostojen nimiä "
-"verrattaessa."
+"    --ignore-file-name-case     älä huomioi kirjainkokoa tiedostonimiä\n"
+"                                  verrattaessa"
 
-#: src/diff.c:919
-#, fuzzy
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
-"--no-ignore-file-name-case  Kirjainkoko huomioidaan tiedostonimiä "
-"verrattaessa."
+"    --no-ignore-file-name-case  huomioi kirjankoko tiedostonimiä verrattaessa"
 
-#: src/diff.c:920
-#, fuzzy
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
-"-x HAHMO  --exclude=HAHMO  Jätä pois tiedostot, jotka vastaavat HAHMOa."
+"-x, --exclude=HAHMO             jätä pois tiedostot, jotka täsmäävät HAHMOon"
 
-#: src/diff.c:921
-#, fuzzy
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
-"-X TIEDOSTO --exclude-from=TIEDOSTO  Jätä pois TIEDOSTOssa listatut "
-"tiedostot."
+"-X, --exclude-from=TIEDOSTO     jätä pois TIEDOSTOssa lueteltuihin\n"
+"                                  hahmoihin täsmäävät tiedostot"
 
-#: src/diff.c:922
-#, fuzzy
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
-"-S TIEDOSTO  --starting-file=TIEDOSTO  Aloita TIEDOSTOlla verrattaessa "
-"hakemistoja."
+"-S, --starting-file=TIEDOSTO    aloita TIEDOSTOlla hakemistoja verrattaessa"
 
-#: src/diff.c:923
-#, fuzzy
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
 msgstr ""
-"--from-file=TIEDOSTO1  Vertaa TIEDOSTO1:ä kaikkiin operandeihin. TIEDOSTO1 "
-"voi olla hakemisto."
+"    --from-file=TIEDOSTO1       vertaa TIEDOSTO1:tä kaikkiin operandeihin;\n"
+"                                  TIEDOSTO1 voi olla hakemisto"
 
-#: src/diff.c:925
-#, fuzzy
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
-"--to-file=TIEDOSTO2  Vertaa kaikkia operandeja TIEDOSTO2:een. TIEDOSTO2 voi "
-"olla hakemisto."
+"    --to-file=TIEDOSTO2         vertaa kaikkia operandeja TIEDOSTO2:een;\n"
+"                                  TIEDOSTO2 voi olla hakemisto"
 
-#: src/diff.c:928
-#, fuzzy
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
-"-i  --ignore-case  Älä huomioi kirjainkokoa tiedostojen sisältöä "
-"verrattaessa."
+"-i, --ignore-case               älä huomioi kirjainkokoa tiedostojen "
+"sisällössä"
 
-#: src/diff.c:929
-#, fuzzy
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
-"-E  --ignore-tab-expansion  Älä huomioi sarkainten laajennuksesta johtuvia "
-"eroja."
+"-E, --ignore-tab-expansion      älä huomioi sarkainten laajennuksesta\n"
+"                                  johtuvia eroja"
 
-#: src/diff.c:930
-#, fuzzy
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
-msgstr "-w  --ignore-all-white-space  Älä huomioi tyhjiä merkkejä."
+msgstr "-Z, --ignore-trailing-space     älä huomioi tyhjeitä rivin lopussa"
 
-#: src/diff.c:931
-#, fuzzy
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
-"-b  --ignore-space-change  Älä huomioi tyhjistä merkeistä johtuvia eroja."
+"-b, --ignore-space-change       älä huomioi tyhjemerkkien määrästä johtuvia "
+"eroja"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
-msgstr "-w  --ignore-all-white-space  älä huomioi tyhjiä merkkejä"
+msgstr "-w  --ignore-all-white-space  älä huomioi tyhjemerkkejä"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B  --ignore-blank-lines  älä huomioi tyhjistä riveistä johtuvia eroja"
 
-#: src/diff.c:934
-#, fuzzy
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
-"-I SI  --ignore-matching-lines=SI  Älä huomioi eroavia rivejä, jotka "
-"vastaavat säännöllistä lauseketta."
+"-I, --ignore-matching-lines=SL  älä huomioi eroavia rivejä, jotka kaikki\n"
+"                                  täsmäävät säännölliseen lausekkeeseen SL"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text                      käsittelee kaikki tiedostot tekstinä"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
-msgstr "--strip-trailing-cr  poista vaununpalautus syötteen lopusta"
+msgstr "    --strip-trailing-cr         poista vaununpalautus syötteen lopusta"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "   --binary                     lue ja kirjoita dataa binääritilassa"
 
-#: src/diff.c:942
-#, fuzzy
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
-"-D NIMI  --ifdef=NIMI  Tulosta yhdistetty tiedosto näyttämään \"#ifdef NIMI"
-"\"-erot."
+"-D, --ifdef=NIMI                tulosta yhdistetty tiedosto ”#ifdef NIMI” -"
+"eroin"
 
-#: src/diff.c:943
-#, fuzzy
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
-"--GTYYPPI-group-format=GMUOTO  Sama, muotoile GTYYPPIset syöteryhmät "
-"GMUOTOon."
+"    --GTYYPPI-group-format=GMUOTO muotoile GTYYPPIset syöteryhmät GMUOTOon"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LMUOTO   muotoile kaikki syöterivit LMUOTOon"
 
-#: src/diff.c:945
-#, fuzzy
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
-msgstr "    --line-format=LMUOTO   muotoile kaikki syöterivit LMUOTOon"
+msgstr "    --line-format=LMUOTO        muotoile LTYYPPI-syöterivit LMUOTOon"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
+"  Näillä muotoiluvalitsimilla hienosäädetään diffin tulostetta,\n"
+"    yleistäen -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
-"  LTYYPPI on \"old\", \"new\" tai \"unchanged\". GTYYPPI on LTYYPPI tai "
-"\"changed\"."
+"  LTYYPPI on ”old”, ”new” tai ”unchanged”. GTYYPPI on LTYYPPI tai ”changed”."
 
-#: src/diff.c:949
-#, fuzzy
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1030,34 +977,34 @@ msgid ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
-"  GMUOTO voi sisältää:\n"
+"  (vain) GMUOTO voi sisältää:\n"
 "    %<  rivejä TIEDOSTO1:stä\n"
 "    %>  rivejä TIEDOSTO2:sta\n"
 "    %=  TIEDOSTO1:n ja TIEDOSTO2:n yhteiset rivit\n"
-"    %[-][LEVEYS][.[TARKK]]{doxX}KIRJAIN  printf-tyylimääritys KIRJAIMELLE\n"
-"      KIRJAIMET ovat seuraavat uudelle ryhmälle; pienet kirjaimet vanhalle "
-"ryhmälle:\n"
+"    %[-][LEVEYS][.[TARKK]]{doxX}KIRJAIN  printf-tyylinen määritys "
+"KIRJAIMelle\n"
+"      KIRJAIMET ovat seuraavat uudelle ryhmälle; pienet kirjaimet\n"
+"        vanhalle ryhmälle:\n"
 "        F  ensimmäinen rivinumero\n"
 "        L  viimeinen rivinumero\n"
 "        N  rivien määrä = L-F+1\n"
 "        E  F-1\n"
-"        M  L+1"
+"        M  L+1\n"
+"    %(A=B?T:E)  jos A yhtäkuin B niin T muuten E"
 
-#: src/diff.c:961
-#, fuzzy
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
 "    %l  contents of line, excluding any trailing newline\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
-"  LMUOTO voi sisältää:\n"
+"  (vain) LMUOTO voi sisältää:\n"
 "    %L  rivin sisältö\n"
-"    %l  rivin sisältö, mahdollinen edeltävä rivinvaihto poislukien\n"
-"    %[-][LEVEYS][.[TARKK]]{doxX}n syöterivin numero printf-tyylillä"
+"    %l  rivin sisältö, mahdollinen jälkeinen rivinvaihto poistettuna\n"
+"    %[-][LEVEYS][.[TARKK]]{doxX}n printf-tyylinen määritys rivinumerolle"
 
-#: src/diff.c:965
-#, fuzzy
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1066,242 +1013,239 @@ msgid ""
 "    C    the character C (other characters represent themselves)"
 msgstr ""
 "  Sekä GMUOTO että LMUOTO voivat sisältää:\n"
-"   %%   %\n"
-"    %c'C'  yksittäinen merkki C\n"
-"    %c'\\OOO'  yksittäinen merkki oktaalikoodilla OOO"
+"    %%      %\n"
+"    %c'C'   yksittäinen merkki C\n"
+"    %c'\\OOO' yksittäinen merkki, jonka oktaalikoodi OOO\n"
+"    C       merkki C (loput merkit vastaavat itseään)"
 
-#: src/diff.c:971
-#, fuzzy
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
-msgstr "-d  --minimal  Yrittää löytää pienemmän määrän muutoksia."
+msgstr "-d, --minimal            yritä kovin löytää pienempi muutosjoukko"
 
-#: src/diff.c:972
-#, fuzzy
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
-"--horizon-lines=MÄÄRÄ  Säilytä MÄÄRÄ riviä yhteisestä etu- ja "
-"jälkiliitteestä."
+"    --horizon-lines=MÄÄRÄ  säilytä MÄÄRÄ riviä yhteisistä etu- ja "
+"jälkiliitteistä"
 
-#: src/diff.c:973
-#, fuzzy
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
-"-H  --speed-large-files  Oleta suuret tiedostot, joissa pieniä muutoksia "
-"ympäri tiedoston."
+"    --speed-large-files  oleta suuret tiedostot, joissa paljon pieniä\n"
+"                           muutoksia ympäri tiedoston"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
+"    --color[=MILLOIN]    väritä tuloste; MILLOIN voi olla ”never”, "
+"”always”,\n"
+"                           tai ”auto”; pelkkä --color on sama kuin --"
+"color=auto"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
+"    --palette=PALETTI    käytettävät värit, kun --color on käytössä; "
+"PALETTI\n"
+"                           on kaksoispiste-eroteltu luettelo terminfo-"
+"kyvyistä"
 
-#: src/diff.c:979
-#, fuzzy
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
-msgstr "    --help                  näytä tämä ohje ja poistu"
+msgstr "    --help               näytä tämä ohje ja poistu"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            näytä versiotiedot ja poistu"
 
-#: src/diff.c:982
-#, fuzzy
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
-"TIEDOSTOT ovat \"TIEDOSTO1 TIEDOSTO2\" tai \"HAK1 HAK2\" tai \"HAK "
-"TIEDOSTO...\" tai \"TIEDOSTO... HAK\"."
+"TIEDOSTOT ovat ”TIEDOSTO1 TIEDOSTO2” tai ”HAK1 HAK2” tai ”HAK TIEDOSTO” tai "
+"”TIEDOSTO HAK”."
 
-#: src/diff.c:983
-#, fuzzy
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
-msgstr "Tiedoston lisääminen hakemiston %s ulkopuolelta epäonnistui"
+msgstr ""
+"Jos --from-file tai --to-file on annettu, TIEDOSTO(i)lle ei ole rajoitteita."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
-#, fuzzy
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
-msgstr ""
-"\n"
-"Jos TIEDOSTOa ei ole annettu, tai se on ”-”, luetaan vakiosyötettä.\n"
+msgstr "Jos TIEDOSTOa ei ole annettu, tai se on ”-”, luetaan vakiosyötettä."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Käyttö: %s [VALITSIN]... TIEDOSTOT\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Vertaa TIEDOSTOja rivi riviltä."
 
-#: src/diff.c:1032
-#, fuzzy, c-format
+#: src/diff.c:1034
+#, c-format
 msgid "conflicting %s option value '%s'"
-msgstr "ristiriitaiset tyypit kohteelle %<%c%s%>:lle"
+msgstr "ristiriitainen arvo ”%2$s” valitsimelle ”%1$s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "ristiriitaiset tulostustyylin valinnat"
 
-#: src/diff.c:1061
-#, fuzzy, c-format
+#: src/diff.c:1063
+#, c-format
 msgid "invalid color '%s'"
-msgstr "virheellinen leveys \"%s\""
+msgstr "virheellinen väri ”%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Vain hakemistossa %s: %s\n"
 
-#: src/diff.c:1251
-#, fuzzy
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
-msgstr "hakemiston %s luominen ei onnistu"
+msgstr "”-” ei ole verrattavissa hakemistoon"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "valitsin -D ei toimi hakemistojen kanssa"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Yhteiset alihakemistot: %s ja %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Tiedosto %s on %s, kun taas tiedosto %s on %s\n"
 
-#: src/diff.c:1373
-#, fuzzy, c-format
+#: src/diff.c:1375
+#, c-format
 msgid "Symbolic links %s and %s differ\n"
-msgstr "Tiedostot %s ja %s eroavat\n"
+msgstr "Symboliset linkit %s ja %s eroavat\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Tiedostot %s ja %s ovat identtiset\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "yhteensopimattomat valitsimet"
 
-#: src/diff3.c:391
-#, fuzzy
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
-msgstr "Voidaan antaa vain yksi syötetiedosto!\n"
+msgstr "”-” annettu useammaksi syötetiedostoksi"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lukeminen epäonnistui"
 
-#: src/diff3.c:475
-#, fuzzy
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
-msgstr "-A  --show-all  Tulosta kaikki muutokset, ristiriidat merkiten."
+msgstr ""
+"-A, --show-all              tulosta kaikki muutokset, ristiriidat merkiten"
 
-#: src/diff3.c:477
-#, fuzzy
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
-"-e  --ed  Tulosta VANHANTIEDOSTON yhdistämättömät muutokset TIEDOSTOOSI "
-"verrattuna TIEDOSTOONI."
+"-e, --ed                    tulosta TIEDOSTOONI ed-skripti, joka sisältää\n"
+"                                VANHANTIEDOSTON muutokset verrattuna "
+"TIEDOSTOOSI"
 
-#: src/diff3.c:479
-#, fuzzy
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
-msgstr ""
-"-E  --show-overlap  Tulosta yhdistämättömät muutokset, ristiriidat merkiten."
+msgstr "-E, --show-overlap          kuin -e, mutta ristiriidat merkiten"
 
-#: src/diff3.c:480
-#, fuzzy
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
-msgstr "-3  --easy-only  Tulosta yhdistämättömät ei-päällekkäiset muutokset."
+msgstr ""
+"-3, --easy-only             kuin -e, mutta vain ei-päällekkäiset muutokset"
 
-#: src/diff3.c:481
-#, fuzzy
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
-msgstr "-x  --overlap-only  Tulosta päällekkäiset muutokset."
+msgstr ""
+"-x, --overlap-only          kuin -e, mutta vain päällekkäiset muutokset"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
-msgstr ""
+msgstr "-X                          kuin -x, mutta ristiriidat merkiten"
 
-#: src/diff3.c:483
-#, fuzzy
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
-msgstr "-i  Lisää komennot \"w\" ja \"q\" ed-skripteihin."
+msgstr "-i                          lisää komennot ”w” ja ”q” ed-skripteihin"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
+"-m, --merge                 tulosta varsinainen yhdistetty tiedosto -A:n\n"
+"                                mukaisesti ellei muita valitsimia annettu"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  käsittele kaikki tiedostot tekstinä"
 
-#: src/diff3.c:489
-#, fuzzy
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
-msgstr "--strip-trailing-cr  poista vaununpalautus syötteen lopusta"
+msgstr "    --strip-trailing-cr     poista vaununpalautus syötteen lopusta"
 
-#: src/diff3.c:490
-#, fuzzy
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab  Lisää sarkain rivien alkuun."
+msgstr "-T, --initial-tab           kohdista sarkaimet lisäämällä sarkaimia"
 
-#: src/diff3.c:491
-#, fuzzy
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
-msgstr "--diff-program=OHJELMA  Käytä OHJELMAa tiedostojen vertaamiseen."
+msgstr "    --diff-program=OHJELMA  käytä OHJELMAa tiedostojen vertaamiseen"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
+"-L, --label NIMIÖ           käytä NIMIÖtä tiedostonimen sijaan\n"
+"                                (voidaan toistaa enintään kolmesti)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  näytä tämä ohje ja poistu"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version              näytä versiotiedot ja poistu"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Käyttö: %s [VALITSIN]... TIEDOSTONI VANHATIEDOSTO TIEDOSTOSI\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Vertaa kolmea tiedostoa rivi riviltä."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1314,196 +1258,197 @@ msgid ""
 "and output the actual merged file.  For unusual input, this is more\n"
 "robust than using ed.\n"
 msgstr ""
+"\n"
+"Oletustulostusmuoto on jossain määrin ihmisluettava esitys muutoksista.\n"
+"\n"
+"Valitsimet -e, -E, -x, -X (ja vastaavat pitkät) johtavat ed-skriptin\n"
+"tulostamiseen oletusmuodon sijaan.\n"
+"\n"
+"Valitsin -m (--merge) saa diff3:n tekemään yhdistämisen sisäisesti\n"
+"ja tulostamaan varsinaisen yhdistetyn tiedoston. Epätavalliselle\n"
+"syötteelle tämä on vankempaa kuin edin käyttäminen.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Paluuarvo on onnistuessa 0, ristiriitatilanteissa 1, ja ongelmatilanteissa 2."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
-msgstr "sisäinen virhe: virhe diff-lohkojen muodossa"
+msgstr "sisäinen virhe: möhläys diff-lohkojen muodossa"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff epäonnistui: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
-msgstr "sisäinen virhe: virheellinen diff-tyyppi funktiossa process_diff"
+msgstr "sisäinen virhe: virheellinen diff-tyyppi process_diff-funktiossa"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "virheellinen diff-muoto; virheellinen muutoserotin"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "virheellinen diff-muoto; viimeinen rivi vajaa"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
-#, fuzzy, c-format
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
+#, c-format
 msgid "subsidiary program '%s' could not be invoked"
-msgstr "apuohjelmaa \"%s\" ei voitu käynnistää"
+msgstr "apuohjelmaa ”%s” ei voitu käynnistää"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "virheellinen diff-muoto; väärät rivin alkumerkit"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "sisäinen virhe: virheellinen diff-muoto välitetty tulosteeseen"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "syötetiedosto kutistui"
 
 #: src/dir.c:156
-#, fuzzy, c-format
+#, c-format
 msgid "cannot compare file names '%s' and '%s'"
-msgstr "tiedostonimiä %s ja %s ei voi vertailla"
+msgstr "tiedostonimiä ”%s” ja ”%s” ei voi vertailla"
 
 #: src/dir.c:225
-#, fuzzy, c-format
+#, c-format
 msgid "%s: recursive directory loop"
-msgstr "%s: syöte sisältää silmukan:"
+msgstr "%s: rekursiivinen hakemistosilmukka"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
-#, fuzzy
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
-"-o TIEDOSTO  --output=TIEDOSTO  Vuorovaikutteinen toiminta, tuloste "
-"TIEDOSTOon."
+"-o, --output=TIEDOSTO        toimi vuorovaikutteisesti, tuloste TIEDOSTOon"
 
-#: src/sdiff.c:175
-#, fuzzy
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
-msgstr "-i  --ignore-case  Käsittele isot ja pienet kirjaimet samoina."
+msgstr ""
+"-i, --ignore-case            käsittele isot ja pienet kirjaimet samoina"
 
-#: src/sdiff.c:176
-#, fuzzy
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
-"-E  --ignore-tab-expansion  Älä huomioi sarkainten laajennuksesta johtuvia "
-"eroja."
+"-E, --ignore-tab-expansion   älä huomioi sarkainten laajennuksesta\n"
+"                               johtuvia eroja"
 
-#: src/sdiff.c:177
-#, fuzzy
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
-msgstr "-w  --ignore-all-white-space  Älä huomioi tyhjiä merkkejä."
+msgstr "-Z, --ignore-trailing-space  älä huomioi tyhjeitä rivin lopussa"
 
-#: src/sdiff.c:178
-#, fuzzy
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
-"-b  --ignore-space-change  Älä huomioi tyhjistä merkeistä johtuvia eroja."
+"-b, --ignore-space-change    älä huomioi tyhjemerkkien määrästä johtuvia "
+"eroja"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space        älä huomioi tyhjiä merkkejä"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines      älä huomioi tyhjistä riveistä johtuvia eroja"
 
-#: src/sdiff.c:181
-#, fuzzy
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
-"-I SI  --ignore-matching-lines=SI  Älä huomioi eroavia rivejä, jotka "
-"vastaavat säännöllistä lauseketta."
+"-I, --ignore-matching-lines=SL  älä huomioi eroavia rivejä, jotka\n"
+"                                  täsmäävät säännölliseen lausekkeeseen SL"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr       poista vaununpalautus syötteen lopusta"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text                    käsittele kaikki tiedostot tekstinä"
 
-#: src/sdiff.c:185
-#, fuzzy
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
-"-w MÄÄRÄ  --width=MÄÄRÄ  Tulosta enintään MÄÄRÄ (oletus 130) merkkiä riville."
+"-w, --width=MÄÄRÄ            tulosta enintään MÄÄRÄ (oletus 130) merkkiä "
+"riville"
 
-#: src/sdiff.c:186
-#, fuzzy
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
-msgstr "-l  --left-column  Tulosta vain yhteisten rivien vasen palsta"
+msgstr ""
+"-l, --left-column            tulosta vain yhteisten rivien vasen palsta"
 
-#: src/sdiff.c:187
-#, fuzzy
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
-msgstr "-s  --suppress-common-lines  Älä tulosta yhteisiä rivejä."
+msgstr "-s, --suppress-common-lines  älä tulosta yhteisiä rivejä"
 
-#: src/sdiff.c:189
-#, fuzzy
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
-msgstr "-t  --expand-tabs  Laajentaa sarkaimet välilyönneiksi tulosteessa."
+msgstr ""
+"-t, --expand-tabs            laajenna sarkaimet välilyönneiksi tulosteessa"
 
-#: src/sdiff.c:190
-#, fuzzy
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
-msgstr "--tabsize=KOKO Sarkaimen koko on KOKO (oletus 8) merkkiä."
+msgstr "    --tabsize=KOKO           sarkaimen koko on KOKO (oletus 8) merkkiä"
 
-#: src/sdiff.c:192
-#, fuzzy
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
-msgstr "-d  --minimal  Yrittää löytää pienemmän määrän muutoksia."
+msgstr "-d, --minimal               yritä kovin löytää pienempi muutosjoukko"
 
-#: src/sdiff.c:193
-#, fuzzy
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
-"-H  --speed-large-files  Oleta suuret tiedostot, joissa pieniä muutoksia "
-"ympäri tiedoston."
+"-H, --speed-large-files      oleta suuret tiedostot, joissa pieniä "
+"muutoksia\n"
+"                               ympäri tiedoston"
 
-#: src/sdiff.c:194
-#, fuzzy
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
-msgstr "--diff-program=OHJELMA  Käytä OHJELMAa tiedostojen vertaamiseen."
+msgstr "    --diff-program=OHJELMA  käytä OHJELMAa tiedostojen vertaamiseen"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                  näytä tämä ohje ja poistu"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
-msgstr "-v  --version                näytä versiotiedot ja poistu"
+msgstr "-v, --version                näytä versiotiedot ja poistu"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Käyttö: %s [VALITSIN]...TIEDOSTO1 TIEDOSTO2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ""
-"Tiedostojen TIED1 ja TIED2 erojen yhdistäminen vierekkäisillä palstoilla."
+"Tiedostojen TIEDOSTO1 ja TIEDOSTO2 erojen yhdistäminen vierekkäisillä "
+"palstoilla."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "vakiosyötettä ei voi yhdistää vuorovaikutteisesti"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "molemmat vertailtavat tiedostot ovat hakemistoja"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1528,27 +1473,29 @@ msgstr ""
 "q:\tLopeta.\n"
 
 #: src/util.c:662
-#, fuzzy, c-format
+#, c-format
 msgid "unrecognized prefix: %s"
-msgstr "%s: tunnistamaton valitsin ”--%s”\n"
+msgstr "tunnistamaton etuliite: %s"
 
 #: src/util.c:692
 #, c-format
 msgid "unparsable value for --palette"
-msgstr ""
+msgstr "jäsentymätön arvo valitsimelle --palette"
 
-#, fuzzy
-#~ msgid "                           or 'auto' (the default)"
-#~ msgstr "--normal  Tulosta normaali diff."
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "virheellinen %s%s-argumentti ”%s”"
 
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: valitsin ”--%s” ei salli argumenttia\n"
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "virheellinen loppuliite %s%s-argumentissa ”%s”"
 
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: tunnistamaton valitsin ”--%s”\n"
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s-argumentti ”%s” on liian suuri"
 
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: valitsin ”-W %s” on moniselitteinen\n"
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s-kotisivu: <https://www.gnu.org/software/%s/>\n"
+
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: valitsin ”--%s” ei salli argumenttia\n"
 
 #~ msgid "%s: option '-W %s' doesn't allow an argument\n"
 #~ msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n"
index a2de358..09d8e08 100644 (file)
Binary files a/po/fr.gmo and b/po/fr.gmo differ
index 2f9075a..02d0c58 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,15 +1,15 @@
 # Messages français pour GNU concernant diffutils.
-# Copyright (C) 2018 Free Software Foundation, Inc.
+# Copyright (C) 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 #
 # Michel Robitaille <robitail@IRO.UMontreal.CA>, 1996.
-# Frédéric Marchal <fmarchal@perso.be>, 2018.
+# Frédéric Marchal <fmarchal@perso.be>, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.6.17\n"
+"Project-Id-Version: GNU diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 08:04+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 20:07+0200\n"
 "Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "Language: fr\n"
@@ -19,25 +19,25 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n >= 2);\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argument %s pas valable pour %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument %s ambigu pour %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Les arguments valables sont:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "erreur du programme"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "débordement de pile"
 
@@ -198,11 +198,11 @@ msgstr "%s: l'option -- « %c » requiert un argument\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "« "
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr " »"
 
@@ -274,7 +274,7 @@ msgstr "Expression régulière trop grande"
 msgid "Unmatched ) or \\)"
 msgstr ") or \\) sans vis-à-vis"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "N'est pas précédé d'une expression régulière"
 
@@ -282,41 +282,31 @@ msgstr "N'est pas précédé d'une expression régulière"
 msgid "memory exhausted"
 msgstr "mémoire épuisée"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "flux inconnu"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "impossible de ré-ouvrir %s avec le mode %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argument pour %s%s pas valable: « %s »"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "suffixe par valable dans l'argument de %s%s: « %s »"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s: argument « %s » trop grand"
+msgid "standard file descriptors"
+msgstr "descripteurs de fichier standard"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -333,39 +323,35 @@ msgstr "Empaqueté par %s\n"
 #. locale.  Otherwise, do not translate "(C)"; leave it as-is.
 #: lib/version-etc.c:83
 msgid "(C)"
-msgstr "(C)"
+msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licence GPLv3+: GNU GPL version 3 ou ultérieure <https://www.gnu.org/"
-"licenses/gpl-3.0.fr.html>.\n"
-"Ceci est un logiciel libre: vous êtes libre de le changer et de le "
+"Licence GPLv3+: GNU GPL version 3 ou ultérieure <%s>.\n"
+"Ceci est un logiciel libre : vous êtes libre de le changer et de le "
 "redistribuer.\n"
 "Il n'y a PAS de GARANTIE, dans les limites permises par la loi.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Écrit par %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Écrit par %s et %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Écrit par %s, %s et %s.\n"
@@ -373,7 +359,7 @@ msgstr "Écrit par %s, %s et %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,39 +450,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
-"Signalez les bogues à: %s\n"
+"Signalez les bogues à : %s\n"
+"Signalez les bogues de traduction à : <traduc@traduc.org>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
-"Signalez les bogues de %s à: %s\n"
-"Signalez les bogues de traduction à traduc@traduc.org\n"
+"Signalez les bogues de %s à : %s\n"
+"Signalez les bogues de traduction à : <traduc@traduc.org>\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "site internet de %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "site internet de %s: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Aide générale sur l'utilisation des logiciels GNU: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Aide générale sur l'utilisation des logiciels GNU: <https://www.gnu.org/"
-"software/gethelp.fr.html>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Les fichiers %s et %s sont différents\n"
@@ -506,54 +484,54 @@ msgstr "Les fichiers %s et %s sont différents\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Les fichiers binaires %s et %s sont différents\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Pas de fin de ligne à la fin du fichier"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Utilisez « %s --help » pour en savoir d'avantage."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "valeur invalide pour --ignore-initial: « %s »"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "options -l et -s sont incompatibles"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "échec d'écriture"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "sortie standard"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes           Afficher les octets qui diffèrent"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=N      Escamoter les N premiers octets des entrées"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -561,41 +539,41 @@ msgstr ""
 "-i, --ignore-initial=N1:N2  Escamoter les N1 premiers octets de FICHIER1 et "
 "les N2 premiers octets de FICHIER2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose               Afficher les numéros d'octets et les valeurs de "
 "tous les octets qui diffèrent."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMITE          Comparer au plus LIMITE octets"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent       Supprimer la sortie normale"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                  Afficher cette aide et terminer"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr ""
 "-v, --version               Afficher le nom et la version du logiciel puis "
 "terminer"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Usage: %s [OPTION]... FICHIER1 [FICHIER2 [SAUT1 [SAUT2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Comparer deux fichiers octet par octet."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -604,14 +582,14 @@ msgstr ""
 "escamoter\n"
 "au début de chaque fichier (zéro par défaut)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Les paramètres requis pour les options longues sont également requis pour "
 "les options courtes.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -622,202 +600,202 @@ msgstr ""
 "kB 1000, K 1024, MB 1.000.000, M 1.048.576,\n"
 "GB 1.000.000.000, G 1.073.741.824, et ainsi de suite pour T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Si un FICHIER est « - » ou manquant, lire sur l'entrée standard."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Le statut de fin d'exécution est 0 si les entrées sont les mêmes, 1 si "
 "différentes et 2 si problématiques."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valeur invalide pour --bytes: « %s »"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "opérande manquante après « %s »"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "opérande supplémentaire « %s »"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s sont différents: octet %s, ligne %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s diffèrent: octet %s, ligne %s est %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: Fin-de-fichier (EOF) sur %s qui est vide\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: Fin-de-fichier (EOF) sur %s après l'octet %s, ligne %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: Fin-de-fichier (EOF) sur %s après l'octet %s, ligne %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: Fin-de-fichier (EOF) sur %s après l'octet %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "longueur du contexte invalide « %s »"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "La pagination n'est pas supporté sur cette machine"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "Trop de noms de fichiers dans les options"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "largeur invalide « %s »"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "options de largeur conflictuelles"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "longueur d'horizon invalide « %s »"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "taille de tabulation invalide « %s »"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "options conflictuelles de taille de tabulation"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file et --to-file ont été spécifiés ensemble"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  Produire un « diff » en format normal (par "
 "défaut)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q, --brief                   Indiquer seulement si les fichiers diffèrent"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  Indiquer si les deux fichiers sont identiques"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C N, --context[=N]              Afficher N (3 par défaut) lignes du "
 "contexte copié"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U N, --unified[=N]              Afficher N (3 par défaut) lignes dans "
 "le context unifié"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      Générer un script pour « ed »"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr ""
 "-n, --rcs                     Générer un fichier « diff » au format RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            Affichage sur deux colonnes"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=N                Limiter la sortie à au plus N colonnes "
 "imprimées (130 par défaut)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column            Afficher les lignes identiques uniquement dans "
 "la colonne de gauche"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   Ne pas afficher les lignes identiques"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         Afficher dans quelle fonction C le changement "
 "se trouve"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE   Montrer la ligne la plus récente correspondant "
 "à RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -826,93 +804,93 @@ msgstr ""
 "et de l'horodatage\n"
 "                                (peut être répété)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             Étaler les tabulateurs en espaces dans la "
 "sortie"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab            Aligner les tabulateurs en préfixant un "
 "tabulateur"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=N              Les balises de tabulation sont à chaque N (8 "
 "par défaut) colonnes"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty   Supprimer les espaces et les tabulations avant "
 "les lignes vides"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                Relayer la sortie à « pr » afin de la paginer"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive               Comparer récursivement les sous-répertoires "
 "trouvés"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            Ne pas suivre les liens symboliques"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                Traiter les fichiers absents comme des "
 "fichiers vides"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file Traiter les premiers fichiers absents comme "
 "vides"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case   Ignorer la casse lors de la comparaison des "
 "noms de fichiers"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case Tenir compte de la casse lors de la "
 "comparaison des noms de fichiers"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=PAT            Exclure les fichiers dont les noms concordent "
 "avec le PATron"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FICHIER   Exclure les fichiers dont les noms\n"
 "                              concordent avec ceux contenus dans le FICHIER"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FICHIER  Débuter la comparaison des répertoires par le "
 "FICHIER"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -920,7 +898,7 @@ msgstr ""
 "    --from-file=FICHIER1     Comparer le FICHIER1 à toutes les opérandes.\n"
 "                                  FICHIER1 peut être un répertoire"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -928,86 +906,86 @@ msgstr ""
 "    --to-file=FICHIER2       Comparer toutes les opérandes à FICHIER2.\n"
 "                                  FICHIER2 peut être un répertoire"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case            Ignorer les différences de casses dans le "
 "contenu des fichiers"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   Ignorer les changements liés à l'expansion des "
 "tabulations"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space       Ignorer les blancs d'espacement à la fin "
 "de la ligne"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change     Ignorer les changements dans le nombre "
 "d'espaces"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space        Ignorer tout blanc d'espacement"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     Ignorer les changements dont toutes les lignes "
 "sont blanches"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE Ignorer les différences dont toutes les\n"
 "                       lignes concordent avec l'expression régulière RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr ""
 "-a, --text                    Traiter tous les fichiers comme des textes"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr       Éliminer les retours de chariot de l'entrée"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                  Lire et écrire les données en binaire"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOM              Afficher les fichiers fusionnés en marquant les "
 "différences par des « #ifdef NOM »"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT Formater les groupes d'entrée GTYPE avec GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT       Formater toutes les lignes d'entrée avec LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT Formater les lignes d'entrée LTYPE avec LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1015,13 +993,13 @@ msgstr ""
 "  Ces options de formatage fournissent un contrôle fin sur la sortie\n"
 "    de diff et généralise -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE peut être soit « old », « new », ou « unchanged ».  GTYPE prend une "
 "des valeurs de LTYPE ou « changed »."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1051,7 +1029,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1    %(A=B?T:E)  si A égal B alors T sinon E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1064,7 +1042,7 @@ msgstr ""
 "      %[-][LARGEUR][.[PREC]]{doxX}n  la spécification du numéro de ligne\n"
 "                            d'entrée selon le format de printf"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1078,36 +1056,37 @@ msgstr ""
 "    %c'\\OOO» le caractère dont le code octal est OOO    C         le "
 "caractère C (les autres caractères se représentent eux-mêmes)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            rechercher assidûment le plus petit ensemble de "
 "différences"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=N    retenir N lignes ayant des préfixes et suffixes "
 "identiques"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  suppose de grands fichiers et de nombreux petits "
 "changements éparpillés"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=QUAND]      coloriser la sortie; QUAND peut être "
-"« never » (jamais),\n"
-"                           « always » (toujours) ou « auto » (par défaut)"
+"    --color[=QUAND]      coloriser la sortie; QUAND est 'never' (jamais),\n"
+"                           'always' (toujours) ou 'auto' (par défaut).\n"
+"                           --color sans argument est identique à --"
+"color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1118,116 +1097,116 @@ msgstr ""
 "                           est une liste de capacités terminfo séparées par "
 "des virgules"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               afficher cette aide et terminer"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr ""
 "-v, --version            afficher le nom et la version du logiciel et "
 "terminer"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FICHIERS sont « FICHIER1 FICHIER2 » ou « RÉP1 RÉP2 » ou « RÉP FICHIER » ou "
 "« FICHIER RÉP »."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Si --from-file ou --to-file sont fournis, il n'y a pas de restriction sur "
 "les FICHIERS."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Si un FICHIER est « - » alors lire depuis l'entrée standard."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Usage: %s [OPTION]... FICHIERS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Comparer les fichiers ligne par ligne."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "valeur conflictuelle de l'option %s: « %s »"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "options de style de sortie conflictuelles"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "couleur « %s » invalide"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Seulement dans %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "ne peut comparer « - » avec un répertoire"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "L'option -D ne traite pas les répertoires"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Les sous-répertoires %s et %s sont identiques\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Le fichier %s est un %s alors que le fichier %s est un %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Les liens symboliques %s et %s sont différents\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Les fichiers %s et %s sont identiques\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "options incompatibles"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "« - » fourni pour plus d'un fichier d'entrée"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lecture non-réussie"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all               Afficher toutes les différences avec les "
 "conflits entre crochets"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1237,12 +1216,12 @@ msgstr ""
 "                             du fichier ORIGINAL vers le fichier MODIFIÉ\n"
 "                             vers le fichier de SORTIE"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap           Comme -e mais les conflits sont entre crochets"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1250,24 +1229,24 @@ msgstr ""
 "-3, --easy-only              Comme -e mais n'inclut que les changements qui "
 "ne se recoupent pas"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only    Comme -e mais inclut les changements qui se recoupent"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          Comme -x mais le conflits sont entre crochets"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                            Ajouter les commandes « w » et « q » au script "
 "« ed »"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1276,29 +1255,29 @@ msgstr ""
 "autre\n"
 "                                option n'est spécifiée"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr ""
 "-a, --text                    Traiter tous les fichiers comme des textes"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr       Éliminer les retours de chariot de l'entrée"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab            Aligner les tabulateurs en préfixant un "
 "tabulateur"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROG              Utiliser le PROGramme pour comparer les "
 "fichiers"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1307,26 +1286,26 @@ msgstr ""
 "fichier\n"
 "                                       (peut être répété jusqu'à trois fois)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                    Afficher cette aide et terminer"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr ""
 "-v, --version                 Afficher le nom et la version du logiciel et "
 "terminer"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Comparer trois fichiers ligne par ligne."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1352,48 +1331,48 @@ msgstr ""
 "plus\n"
 "robuste que d'utiliser ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Le statut de fin d'exécution est 0 si réussite, 1 si en conflit et 2 si "
 "problématique."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "erreur interne: mélange dans le format des blocs « diff »"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: échec de « diff » : "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "erreur interne: type de « diff » invalide dans process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "format de « diff » invalide ; séparateur de changement invalide"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "format de « diff » invalide ; dernière ligne incomplète"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "programme subsidiaire « %s » n'a pu être invoqué"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr ""
 "format de « diff » invalide ; caractères incorrects au début de la ligne"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "erreur interne : type de « diff » invalide fourni en sortie"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "le fichier d'entrée a rétréci"
 
@@ -1408,140 +1387,140 @@ msgid "%s: recursive directory loop"
 msgstr "%s: boucle récursive dans le répertoire"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=FICHIER         Agir interactivement, avec sortie sur FICHIER"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            Banaliser majuscules et minuscules"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   Ignorer les changements liés à l'expansion des "
 "tabulations"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space       Ignorer les blancs d'espacement à la fin "
 "de la ligne"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    Ignorer les changements dans l'espacement"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       Ignorer tout blanc d'espacement"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     Ignorer les changements dont toutes les lignes "
 "sont blanches"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE Ignorer les différences dont toutes les\n"
 "                       lignes concordent avec l'expression régulière RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      Éliminer les retours de chariot de l'entrée"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr ""
 "-a, --text                   Traiter tous les fichiers comme des textes"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=N                Limiter la sortie à au plus N colonnes "
 "imprimées (130 par défaut)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            Afficher uniquement la colonne de gauche des "
 "lignes identiques"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  Ne pas afficher les lignes identiques"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            Étaler les tabulateurs en espaces dans la sortie"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=N              Les balises de tabulation sont à chaque N (8 "
 "par défaut) colonnes"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                Rechercher assidûment le plus petit ensemble de "
 "différences"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      Suppose de grands fichiers et de nombreux "
 "petits changements éparpillés"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROG      Utiliser le PROGramme pour comparer les fichiers"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   Afficher cette aide et terminer"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr ""
 "-v, --version                Afficher le nom et la version du logiciel et "
 "terminer"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Usage: %s [OPTION]... FICHIER1 FICHIER2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Fusion côte à côte des différences des fichiers."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "ne peut fusionner l'entrée standard interactivement"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "les deux fichiers à comparer sont des répertoires"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1576,6 +1555,18 @@ msgstr "préfixe non reconnu: %s"
 msgid "unparsable value for --palette"
 msgstr "valeur impossible à analyser pour --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "argument pour %s%s pas valable: « %s »"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "suffixe par valable dans l'argument de %s%s: « %s »"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s: argument « %s » trop grand"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "site internet de %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: l'option « --%s » n'accepte aucun argument\n"
 
index ebaef8e..1f20d36 100644 (file)
Binary files a/po/ga.gmo and b/po/ga.gmo differ
index 59103cd..4ca4558 100644 (file)
--- a/po/ga.po
+++ b/po/ga.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 2.8.7\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2004-12-03 13:47-0500\n"
 "Last-Translator: Kevin Patrick Scannell <scannell@SLU.EDU>\n"
 "Language-Team: Irish <ga@li.org>\n"
@@ -17,25 +17,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "earráid chláir"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "cruach thar maoil"
 
@@ -201,11 +201,11 @@ msgstr "%s: n
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr ""
 
@@ -282,7 +282,7 @@ msgstr "Slonn ionada
 msgid "Unmatched ) or \\)"
 msgstr ") nó \\) corr"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Níl aon slonn ionadaíochta roimhe seo"
 
@@ -290,41 +290,31 @@ msgstr "N
 msgid "memory exhausted"
 msgstr "cuimhne ídithe"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr ""
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr ""
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr ""
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 #, fuzzy
 msgid "unknown stream"
 msgstr "Earráid chórais anaithnid"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr ""
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "luach neamhbhailí --bytes `%s'"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
@@ -344,30 +334,29 @@ msgstr ""
 msgid "(C)"
 msgstr ""
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Le %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Le %s agus %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Le %s, %s, agus %s.\n"
@@ -375,7 +364,7 @@ msgstr "Le %s, %s, agus %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -387,7 +376,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -399,7 +388,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -411,7 +400,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -423,7 +412,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -437,7 +426,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -451,7 +440,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -466,33 +455,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Tá difríocht idir na comhaid %s agus %s\n"
@@ -502,98 +485,98 @@ msgstr "T
 msgid "Binary files %s and %s differ\n"
 msgstr "Tá difríocht idir na comhaid %s agus %s\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Gan líne nua ag an chomhadchríoch"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr ""
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Bain triail as `%s --help' chun tuilleadh eolais a fháil."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "luach neamhbhailí --ignore-initial `%s'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "Níl na roghanna -l agus -s comhoiriúnach"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "teipeadh ag scríobh"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "aschur caighdeánach"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes  Taispeáin na bearta atá difriúla."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i UIMHIR  --ignore-initial=UIMHIR Gabh thar an chéad UIMHIR beart "
 "ionchurtha."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr "  Gabh thar an chéad SCIP1 beart as COMHAD1 agus SCIP2 as COMHAD2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l  --verbose  Taispeáin uimhreacha agus luachanna do bhearta uile difriúla."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n TEOR  --bytes=TEOR  Cuir TEOR beart i gcomparáid, ar a mhéad."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version  Taispeáin eolas faoin leagan."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Úsáid: %s [ROGHA]... COMHAD1 [COMHAD2 [SCIPEÁIL1 [SCIPEÁIL2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Cuir dhá chomhad i gcomparáid, beart le beart."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
@@ -601,12 +584,12 @@ msgid ""
 msgstr ""
 "Is éard atá i SCIP1 agus SCIP2 ná líonta na mbeart a scipeáil i ngach comhad."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -616,268 +599,268 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, srl. do T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Mura bhfuil COMHAD ann, nó más `-' é, léigh ón ionchur caighdeánach."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "Stádas scortha: 0 más ionann iad, 1 más difriúil, 2 má tá fadhb ann."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "luach neamhbhailí --bytes `%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "ní foláir argóint i ndiaidh `%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "oibreann breise `%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s difriúil: beart %s, líne %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s difriúil: beart %s, líne %s = %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF ar %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s difriúil: beart %s, líne %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s difriúil: beart %s, líne %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF ar %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr ""
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "Fad neamhbhailí comhthéacs `%s'"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "Ní thacaítear leis an uimhriú leathanach ar an óstríomhaire seo"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "an iomarca argóintí do lipéid chomhaid"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "leithead neamhbhailí `%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "roghanna leithid contrártha"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "fad léaslíne neamhbhailí `%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tá an mhéid tháib `%s' neamhbhailí"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "Roghanna tábmhéid contrártha"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "tugadh --from-file agus --to-file lena chéile"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "--normal  Aschuir diff coitianta."
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  Ná taispeáin ach difriúil nó nach ea."
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s  --report-identical-files  Tuairiscigh nuair atá dhá chomhad comhionanna."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 #, fuzzy
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-w UIMH --width=UIMH  UIMH colún priontála ar a mhéad (réamhshocrú=130)."
 
-#: src/diff.c:896
+#: src/diff.c:898
 #, fuzzy
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed  Aschuir script `ed'."
 
-#: src/diff.c:897
+#: src/diff.c:899
 #, fuzzy
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs  Aschuir diff i gcruth RCS."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 #, fuzzy
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w UIMH --width=UIMH  UIMH colún priontála ar a mhéad (réamhshocrú=130)."
 
-#: src/diff.c:900
+#: src/diff.c:902
 #, fuzzy
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "-l  --left-column  Ná taispeáin an colún ar dheis más ionann iad."
 
-#: src/diff.c:901
+#: src/diff.c:903
 #, fuzzy
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "-s  --suppress-common-lines  Ná taispeáin línte atá i bpáirt acu."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 
-#: src/diff.c:908
+#: src/diff.c:910
 #, fuzzy
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  leathnaigh táib go spásanna san aschur."
 
-#: src/diff.c:909
+#: src/diff.c:911
 #, fuzzy
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Ailínigh táib trí tháb a chur in ionad spás tosaigh."
 
-#: src/diff.c:910
+#: src/diff.c:912
 #, fuzzy
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "--tabsize=UIMH Tábstop gach UIMH colún (réamhshocrú=8)."
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l  --paginate  uimhrigh leathanaigh le `pr'."
 
-#: src/diff.c:914
+#: src/diff.c:916
 #, fuzzy
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r  --recursive  Cuir fochomhadlanna i gcomparáid go hathchúrsach."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 #, fuzzy
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file  Caith le comhad ar iarraidh mar chomhad folamh."
 
-#: src/diff.c:917
+#: src/diff.c:919
 #, fuzzy
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "--unidirectional-new-file  Más ar iarraidh, caith leis an chéad chomhad\n"
 "                                     mar chomhad folamh."
 
-#: src/diff.c:918
+#: src/diff.c:920
 #, fuzzy
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr "--ignore-file-name-case  Ná bí cásíogair le hainmneacha comhaid."
 
-#: src/diff.c:919
+#: src/diff.c:921
 #, fuzzy
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "--no-ignore-file-name-case  Bí cásíogair maidir le hainmneacha comhaid."
 
-#: src/diff.c:920
+#: src/diff.c:922
 #, fuzzy
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-X SLONN --exclude=SLONN Fág comhaid as má tá siad comhoiriúnacha le SLONN."
 
-#: src/diff.c:921
+#: src/diff.c:923
 #, fuzzy
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
@@ -886,7 +869,7 @@ msgstr ""
 "haon\n"
 "                                    slonn ionadaíochta as an CHOMHAD."
 
-#: src/diff.c:922
+#: src/diff.c:924
 #, fuzzy
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
@@ -894,7 +877,7 @@ msgstr ""
 "-S COMHAD --starting-file=COMHAD Tosaigh le COMHAD agus comhadlanna á "
 "gcóimheas."
 
-#: src/diff.c:923
+#: src/diff.c:925
 #, fuzzy
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
@@ -902,7 +885,7 @@ msgid ""
 msgstr ""
 "--from-file=COMHAD Cuir COMHAD (nó comhadlann) i gcomparáid le gach oibreann."
 
-#: src/diff.c:925
+#: src/diff.c:927
 #, fuzzy
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
@@ -910,41 +893,41 @@ msgid ""
 msgstr ""
 "--to-file=COMHAD Cuir gach oibreann i gcomparáid le COMHAD (nó comhadlann)."
 
-#: src/diff.c:928
+#: src/diff.c:930
 #, fuzzy
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i  --ignore-case  Ná bí cásíogair le hinneachar na gcomhad."
 
-#: src/diff.c:929
+#: src/diff.c:931
 #, fuzzy
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Déan neamhshuim ar athruithe ó leathnú na dtáib."
 
-#: src/diff.c:930
+#: src/diff.c:932
 #, fuzzy
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-w  --ignore-all-space  Déan neamhshuim ar spás bán go hiomlán."
 
-#: src/diff.c:931
+#: src/diff.c:933
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Déan neamhshuim ar mhéid an spáis bán."
 
-#: src/diff.c:932
+#: src/diff.c:934
 #, fuzzy
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space  Déan neamhshuim ar spás bán go hiomlán."
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B  --ignore-blank-lines  Déan neamhshuim ar línte folmha."
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
@@ -952,23 +935,23 @@ msgstr ""
 "comhoiriúnach\n"
 "                                     leis an slonn SI."
 
-#: src/diff.c:936
+#: src/diff.c:938
 #, fuzzy
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text  Caith le gach comhad mar théacschomhad."
 
-#: src/diff.c:937
+#: src/diff.c:939
 #, fuzzy
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Dealaigh aisfhilleadh carráiste ó gach líne ionchurtha."
 
-#: src/diff.c:939
+#: src/diff.c:941
 #, fuzzy
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary  Léigh agus scríobh sonraí sa mhód dénártha."
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
@@ -976,35 +959,35 @@ msgstr ""
 "-D AINM  --ifdef=AINM  Taispeáin comhad cumaiscthe chun na diff-aí\n"
 "                                `#ifdef AINM' a léiriú"
 
-#: src/diff.c:943
+#: src/diff.c:945
 #, fuzzy
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "--GCINL-group-format=GFMD  Taispeáin grúpaí GCINL ionchuir de réir GFMD."
 
-#: src/diff.c:944
+#: src/diff.c:946
 #, fuzzy
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "--line-format=LFMD  Taispeáin gach líne ionchuir de réir LFMD."
 
-#: src/diff.c:945
+#: src/diff.c:947
 #, fuzzy
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "--LCINL-line-format=LFMD   Taispeáin línte LCINL ionchuir de réir LFMD."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr "  LCINL = `old', `new', nó `unchanged'.  GCINL = LCINL nó `changed'."
 
-#: src/diff.c:949
+#: src/diff.c:951
 #, fuzzy
 msgid ""
 "  GFMT (only) may contain:\n"
@@ -1032,7 +1015,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1"
 
-#: src/diff.c:961
+#: src/diff.c:963
 #, fuzzy
 msgid ""
 "  LFMT (only) may contain:\n"
@@ -1045,7 +1028,7 @@ msgstr ""
 "    %l  ábhar na líne, gan aon líne nua\n"
 "    %[-][LEITHEAD][.[SONRÚ]]{doxX}n  sonrú do líne-uimhir mar C `printf'"
 
-#: src/diff.c:965
+#: src/diff.c:967
 #, fuzzy
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
@@ -1059,151 +1042,151 @@ msgstr ""
 "    %c'C'  an carachtar litriúil C\n"
 "    %c'\\OOO'  an carachtar le cód ochtnártha OOO"
 
-#: src/diff.c:971
+#: src/diff.c:973
 #, fuzzy
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Obair go crua le haghaidh níos lú athruithe."
 
-#: src/diff.c:972
+#: src/diff.c:974
 #, fuzzy
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "--horizon-lines=UIMH  Coinnigh UIMH líne den réimír/iarmhír choiteann."
 
-#: src/diff.c:973
+#: src/diff.c:975
 #, fuzzy
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "-H  --speed-large-files  Comhaid móra agus go leor mionathruithe forleata."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 #, fuzzy
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version  Taispeáin eolas faoin leagan."
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "COMHAID = `COMHAD1 COMHAD2' nó `COMHADLANN1 COMHADLANN2' nó `COMHADLANN "
 "COMHAD...' nó `COMHAD... COMHADLANN'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 #, fuzzy
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Má tá --from-file nó --to-file tugtha, níl a leithéid de shrian ar COMHAID."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr "Más '-' é an COMHAD, léigh ón ionchur caighdeánach."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Úsáid: %s [ROGHA]... COMHAID\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 #, fuzzy
 msgid "Compare FILES line by line."
 msgstr "Déan comparáid idir na comhaid, líne ar líne."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "luach contrártha don rogha %s: `%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "roghanna contrártha le haghaidh na stíle aschuir"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "Fad neamhbhailí comhthéacs `%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "I %s amháin: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "ní féidir `-' a chur i gcomparáid le comhadlann"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "Níl an rogha -D ar fáil do chomhadlanna"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Fochomhadlanna i gcoitianta: %s agus %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Tá comhad %s ina %s ach tá comhad %s ina %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Tá difríocht idir na comhaid %s agus %s\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Is comhionann iad na comhaid %s agus %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr ""
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "roghanna neamh-chomhoiriúnacha"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "bhí `-' tugtha le haghaidh níos mó ná inchomhad amháin"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "theip ar léamh"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 #, fuzzy
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A  --show-all  Taispeáin gach athrú agus cuir coinbhleachtaí idir lúibíní."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 #, fuzzy
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
@@ -1212,90 +1195,90 @@ msgstr ""
 "-e  --ed  Scríobh i MOCHOMHAD na hathruithe neamhchumaiscthe ó SEANCHOMHAD "
 "go DOCHOMHAD."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 #, fuzzy
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E  --show-overlap  Taispeáin na hathruithe neamhchumaiscthe agus cuir "
 "coinbhleachtaí idir lúibíní."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 #, fuzzy
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "-3  --easy-only  Taispeáin athruithe neamhchumaiscthe forluiteacha."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 #, fuzzy
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x  --overlap-only  Taispeáin na hathruithe forluiteacha."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i  Cuir na horduithe `w' agus `q' le scripteanna `ed'."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 #, fuzzy
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text  Caith le gach comhad mar théacschomhad."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 #, fuzzy
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Dealaigh aisfhilleadh carráiste ó gach líne ionchurtha."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 #, fuzzy
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Ailínigh táib trí tháb a chur in ionad spás tosaigh."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 #, fuzzy
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "--diff-program=CLÁR     Bain úsáid as an CLÁR chun comhaid a chur i "
 "gcomparáid."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 #, fuzzy
 msgid "-v, --version               output version information and exit"
 msgstr "-v  --version  Taispeáin eolas faoin leagan."
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Úsáid: %s [ROGHA]... MOCHOMHAD SEANCHOMHAD DOCHOMHAD\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Cuir trí chomhad i gcomparáid, líne ar líne."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1309,46 +1292,46 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Stádas scortha = 0 (rathúil), 1 (coinbhleachtaí), 2 (trioblóid)."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "earráid inmheánach: formáid de na bloic diff trína chéile"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: theip ar diff: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "earráid inmheánach: cineál neamhbhailí diff san fheidhm process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formáid diff neamhbhailí; teorantóir neamhbhailí idir athruithe"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formáid neamhbhailí diff; líne deiridh neamhiomlán"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "níorbh fhéidir an fochlár `%s' a rith"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "formáid neamhbhailí diff; carachtair mhíchearta ag tosach na líne"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr ""
 "earráid inmheánach: seachadadh cineál neamhbhailí diff go dtí an aschur"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "crapadh an t-inchomhad"
 
@@ -1364,11 +1347,11 @@ msgid "%s: recursive directory loop"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr ""
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 #, fuzzy
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
@@ -1376,40 +1359,40 @@ msgstr ""
 "-o COMHAD --output=COMHAD Mód idirghníomhach, ag scríobh an aschuir i "
 "gCOMHAD."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 #, fuzzy
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i  --ignore-case  Ná bí cásíogair."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 #, fuzzy
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Déan neamhshuim ar athruithe ó leathnú na dtáib."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 #, fuzzy
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-w  --ignore-all-space  Déan neamhshuim ar spás bán go hiomlán."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Déan neamhshuim ar mhéid an spáis bán."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 #, fuzzy
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space  Déan neamhshuim ar spásanna bán go hiomlán."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 #, fuzzy
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B  --ignore-blank-lines  Déan neamhshuim ar línte folmha."
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
@@ -1417,93 +1400,93 @@ msgstr ""
 "comhoiriúnach\n"
 "                                     leis an slonn SI."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 #, fuzzy
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Dealaigh aisfhilleadh carráiste ó gach líne ionchurtha."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 #, fuzzy
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text  Caith le gach comhad mar théacschomhad."
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 #, fuzzy
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w UIMH --width=UIMH  UIMH colún priontála ar a mhéad (réamhshocrú=130)."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 #, fuzzy
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l  --left-column  Ná taispeáin an colún ar dheis más ionann iad."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 #, fuzzy
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  Ná taispeáin línte atá i bpáirt acu."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 #, fuzzy
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  leathnaigh táib go spásanna san aschur."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 #, fuzzy
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "--tabsize=UIMH Tábstop gach UIMH colún (réamhshocrú=8)."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 #, fuzzy
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Obair go crua le haghaidh níos lú athruithe."
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 #, fuzzy
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H  --speed-large-files  Comhaid móra agus go leor mionathruithe forleata."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 #, fuzzy
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "--diff-program=CLÁR     Bain úsáid as an CLÁR chun comhaid a chur i "
 "gcomparáid."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 #, fuzzy
 msgid "-v, --version                output version information and exit"
 msgstr "-v  --version  Taispeáin eolas faoin leagan."
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Úsáid: %s [ROGHA]... COMHAD1 COMHAD2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 #, fuzzy
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Cumaisc difríochtaí idir na comhaid, taobh le taobh."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "ní féidir an t-ionchur caighdeánach a chumasc go hidirghníomhach"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "is comhadlanna iad na comhaid le cur i gcomparáid"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 #, fuzzy
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
@@ -1539,6 +1522,10 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "luach neamhbhailí --bytes `%s'"
+
+#, fuzzy
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: ní cheadaítear argóint i ndiaidh na rogha `--%s'\n"
 
index 11e0b96..a759cb0 100644 (file)
Binary files a/po/gl.gmo and b/po/gl.gmo differ
index 10ddc59..4f92a38 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU diffutils 3.2\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2011-10-17 12:43+0100\n"
 "Last-Translator: Leandro Regueiro <leandro.regueiro@gmail.com>\n"
 "Language-Team: Galician <proxecto@trasno.net>\n"
@@ -19,26 +19,26 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, fuzzy, c-format
 msgid "invalid argument %s for %s"
 msgstr "o argumento «%s» de %s%s é incorrecto"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 #, fuzzy
 msgid "Valid arguments are:"
 msgstr "o argumento «%s» de %s%s é incorrecto"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "erro do programa"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "desbordamento da pila"
 
@@ -202,11 +202,11 @@ msgstr "%s: a opción require un argumento -- «%c»\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "»"
 
@@ -279,7 +279,7 @@ msgstr "Expresión regular demasiado grande"
 msgid "Unmatched ) or \\)"
 msgstr ") ou \\) non emparellado"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Non hai unha expresión regular anterior"
 
@@ -287,41 +287,31 @@ msgstr "Non hai unha expresión regular anterior"
 msgid "memory exhausted"
 msgstr "esgotouse a memoria"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "entrada estándar"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "saída estándar"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "saída estándar de erro"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "fluxo descoñecido"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "produciuse un erro ao volver abrir %s en modo %s"
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "o argumento «%s» de %s%s é incorrecto"
-
-#: lib/xstrtol-error.c:68
-#, fuzzy, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "sufixo incorrecto %s%s no argumento «%s»"
-
-#: lib/xstrtol-error.c:72
-#, fuzzy, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s argumento «%s» demasiado longo"
+#: lib/xstdopen.c:34
+#, c-format
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -340,15 +330,13 @@ msgstr "Empaquetado por %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Licenza GPLv3+: GNU GPL versión 3 ou posterior <http://gnu.org/licenses/gpl."
@@ -358,19 +346,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Escrito por %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Escrito por %s e %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Escrito por %s, %s e %s.\n"
@@ -378,7 +366,7 @@ msgstr "Escrito por %s, %s e %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -390,7 +378,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -402,7 +390,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -414,7 +402,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -426,7 +414,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -440,7 +428,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -454,7 +442,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -469,36 +457,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Envíe os informes de erros a: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Envíe %s informes de erros a: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s páxina web: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s páxina web: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr "Axuda xeral ao usar software GNU: <http://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Os ficheiros %s e %s son diferentes\n"
@@ -508,56 +489,56 @@ msgstr "Os ficheiros %s e %s son diferentes\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Os ficheiros binarios %s e %s son diferentes\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Non hai un salto de liña na fin da liña"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Probe «%s --help» para obter máis información."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "valor de --ignore-initial «%s» non válido"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "as opcións -l e -s son incompatíbeis"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "fallou a escritura"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "saída estándar"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "Axustar a resolución de impresión"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i N     --ignore-initial=N     Omitir os primeiros N bytes de entrada."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
@@ -565,52 +546,52 @@ msgid ""
 msgstr ""
 "  Omitir os primeiros N1 bytes de FICH1 e os primeiros N2 bytes de FICH2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l  --verbose  Amosar os números e valores dos bytes que difiran."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n LÍMITE  --bytes=LÍMITE  Comparar como moito LÍMITE bytes."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
 msgstr "Mostrar información da versión e saír"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Uso: %s [OPCIÓN]... FICH1 [FICH2 [N1 [N2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Comparar dous ficheiros byte a byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr "N1 e N2 son o número de bytes a omitir en cada ficheiro."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -620,196 +601,196 @@ msgstr ""
 "kB 1000, K 1024, MB 1.000.000, M 1.048.576,\n"
 "GB 1.000.000.000, G 1.073.741.824, e así para T, P, E, Z e Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Se un FICHEIRO é «-» ou non se indica, lese da entrada estándar."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "O estado de saída é 0 se as entradas son iguais, 1 se son diferentes, 2 en "
 "caso de problema."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valor de --bytes «%s» non válido"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "falta un operando despois de «%s»"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "operando «%s» sobrante"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s son diferentes: byte %s, liña %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s son diferentes: byte %s, liña %s é %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: Fin de ficheiro en %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s son diferentes: byte %s, liña %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s son diferentes: byte %s, liña %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: Fin de ficheiro en %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "lonxitude do contexto «%s» non válida"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "a paxinación non está admitida nesta máquina"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "demasiadas opcións de etiquetas de ficheiro"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "largo «%s» non válido"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opcións de largura conflitivas"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "lonxitude do horizonte «%s» non válida"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tamaño de tabulación «%s» non válido"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opcións de tamaño de tabulación conflitivas"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "Especificáronse --from-file e --to-file ao mesmo tempo"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "Aparencia predefinida no modo normal"
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  Producir unha saída só se os ficheiros teñen diferencias."
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s  --report-identical-files  Informar cando dous ficheiros son o mesmo."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 #, fuzzy
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr "-w NÚM  --width=NÚM  Amosar como moito NÚM columnas (130 por omisión)."
 
-#: src/diff.c:896
+#: src/diff.c:898
 #, fuzzy
 msgid "-e, --ed                      output an ed script"
 msgstr "Gardar a saída da consola de Script-Fu"
 
-#: src/diff.c:897
+#: src/diff.c:899
 #, fuzzy
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs  Producir un diff en formato RCS."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 #, fuzzy
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr "-w NÚM  --width=NÚM  Amosar como moito NÚM columnas (130 por omisión)."
 
-#: src/diff.c:900
+#: src/diff.c:902
 #, fuzzy
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "-l  --left-column  Amosar só a columna da esquerda nas liñas comúns."
 
-#: src/diff.c:901
+#: src/diff.c:903
 #, fuzzy
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "-s --suppress-common-lines  Non amosar as liñas comúns."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 #, fuzzy
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
@@ -818,25 +799,25 @@ msgstr ""
 "--from-file=FICH1  Comparar FICH1 con todos os operandos. Pode ser "
 "directorio."
 
-#: src/diff.c:908
+#: src/diff.c:910
 #, fuzzy
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Expandir as tabulacións a espazos na saída."
 
-#: src/diff.c:909
+#: src/diff.c:911
 #, fuzzy
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Facer que as tabulacións queden aliñadas poñendo outra\n"
 "                     tabulación ao principio da liña."
 
-#: src/diff.c:910
+#: src/diff.c:912
 #, fuzzy
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "--tabsize=NÚM  Tabulacións de NÚM columnas (8 por omisión)."
 
-#: src/diff.c:911
+#: src/diff.c:913
 #, fuzzy
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
@@ -844,53 +825,53 @@ msgstr ""
 "--suppress-blank-empty  Suprime espazos ou tabuladores antes dunha liña "
 "baleira."
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l  --paginate  Pasar a saída por «pr» para paxinala."
 
-#: src/diff.c:914
+#: src/diff.c:916
 #, fuzzy
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r  --recursive  Comparar recursivamente os subdirectorios que se atopen."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 #, fuzzy
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file  Tratar os ficheiros ausentes como baleiros."
 
-#: src/diff.c:917
+#: src/diff.c:919
 #, fuzzy
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "--unidirectional-new-file  Tratar os ficheiros antigos ausentes como\r\n"
 "a baleiros."
 
-#: src/diff.c:918
+#: src/diff.c:920
 #, fuzzy
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "--ignore-file-name-case  Ignorar maiúsculas/minúsculas no nome do ficheiro."
 
-#: src/diff.c:919
+#: src/diff.c:921
 #, fuzzy
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "--no-ignore-file-name-case  Ter en conta as maiúsculas/minúsculas\r\n"
 "                                ao comparar os nomes dos ficheiros."
 
-#: src/diff.c:920
+#: src/diff.c:922
 #, fuzzy
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x MOD  --exclude=MOD  Excluír os ficheiros que coinciden co MODelo."
 
-#: src/diff.c:921
+#: src/diff.c:923
 #, fuzzy
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
@@ -898,14 +879,14 @@ msgstr ""
 "-X FICH  --exclude-from=FICH  Excluír ficheiros que coinciden con algún\r\n"
 "                                modelo do FICHeiro."
 
-#: src/diff.c:922
+#: src/diff.c:924
 #, fuzzy
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S FICH  --starting-file=FICH  Comezar no FICHeiro ao comparar directorios."
 
-#: src/diff.c:923
+#: src/diff.c:925
 #, fuzzy
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
@@ -914,7 +895,7 @@ msgstr ""
 "--from-file=FICH1  Comparar FICH1 con todos os operandos. Pode ser "
 "directorio."
 
-#: src/diff.c:925
+#: src/diff.c:927
 #, fuzzy
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
@@ -923,36 +904,36 @@ msgstr ""
 "--to-file=FICH2  Comparar todos os operandos con FICH2. Pode ser un "
 "directorio."
 
-#: src/diff.c:928
+#: src/diff.c:930
 #, fuzzy
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i  --ignore-case  Ignorar maiúsculas/minúsculas no contido do ficheiro."
 
-#: src/diff.c:929
+#: src/diff.c:931
 #, fuzzy
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignorar os cambios pola expansión de tabulacións."
 
-#: src/diff.c:930
+#: src/diff.c:932
 #, fuzzy
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignorar todos os espazos en branco."
 
-#: src/diff.c:931
+#: src/diff.c:933
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Ignorar os cambios na cantidade de espazos."
 
-#: src/diff.c:932
+#: src/diff.c:934
 #, fuzzy
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "Todo visíbel (ignorar patrón)"
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
@@ -960,7 +941,7 @@ msgstr ""
 "-B  --ignore-blank-lines  Ignorar os cambios que teñan todas as liñas en "
 "branco"
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
@@ -968,31 +949,31 @@ msgstr ""
 "todas as liñas\r\n"
 "                                     conteñan EXPR-REG."
 
-#: src/diff.c:936
+#: src/diff.c:938
 #, fuzzy
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text  Tratar todos os ficheiros como texto"
 
-#: src/diff.c:937
+#: src/diff.c:939
 #, fuzzy
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminar os retornos de carro á fin das liñas de "
 "entrada."
 
-#: src/diff.c:939
+#: src/diff.c:941
 #, fuzzy
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary  Ler e escribir datos en modo binario."
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D NOME  -ifdef=NOME  Amosar o ficheiro mesturado con diffs «#ifdef NOME»."
 
-#: src/diff.c:943
+#: src/diff.c:945
 #, fuzzy
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
@@ -1000,14 +981,14 @@ msgstr ""
 "\r\n"
 "                             con GFMT."
 
-#: src/diff.c:944
+#: src/diff.c:946
 #, fuzzy
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "--line-format=LFMT  Similar, mais formatar todas as liñas de entrada con "
 "LFMT."
 
-#: src/diff.c:945
+#: src/diff.c:947
 #, fuzzy
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
@@ -1015,20 +996,20 @@ msgstr ""
 "\r\n"
 "                            con LFMT."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE é «old» (antigo), «new» (novo) ou «unchanged» (sen cambios).\r\n"
 "  GTYPE é LTYPE ou «changed» (con cambios)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 #, fuzzy
 msgid ""
 "  GFMT (only) may contain:\n"
@@ -1058,7 +1039,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1"
 
-#: src/diff.c:961
+#: src/diff.c:963
 #, fuzzy
 msgid ""
 "  LFMT (only) may contain:\n"
@@ -1071,7 +1052,7 @@ msgstr ""
 "    %l  contido da liña, excluíndo os saltos de liña finais\n"
 "    %[-][ANCHO][.[PREC]]{doxX}n  especif. estilo printf do número da liña"
 
-#: src/diff.c:965
+#: src/diff.c:967
 #, fuzzy
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
@@ -1085,17 +1066,17 @@ msgstr ""
 "    %c«C»  o carácter C\n"
 "    %c«\\OOO»  o carácter de código octal OOO"
 
-#: src/diff.c:971
+#: src/diff.c:973
 #, fuzzy
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Procurar atopar o conxunto de cambios máis pequeno."
 
-#: src/diff.c:972
+#: src/diff.c:974
 #, fuzzy
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "--horizon-lines=NUM  Manter NUM liñas do prefixo e sufixo comúns."
 
-#: src/diff.c:973
+#: src/diff.c:975
 #, fuzzy
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
@@ -1103,133 +1084,133 @@ msgstr ""
 "-H  --speed-large-files  Asumir ficheiros longos e pequenos cambios "
 "dispersos."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 #, fuzzy
 msgid "-v, --version            output version information and exit"
 msgstr "Mostrar información da versión e saír"
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "Os FICHEIROS son «FICH1 FICH2», «DIR1 DIR2», «DIR FICH...» ou «FICH... DIR»."
 
-#: src/diff.c:983
+#: src/diff.c:985
 #, fuzzy
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Se se indica --from-file ou --to-file, non hai restricións nos FICHEIROS."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr "Se un FICHEIRO é «-», lese da entrada estándar."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Uso: %s [OPCIÓN]... FICHEIROS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 #, fuzzy
 msgid "Compare FILES line by line."
 msgstr "Comparar os ficheiros liña a liña."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "valor «%1$s» da opción %2$s conflitivo"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "opcións de estilo da saída conflitivas"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "lonxitude do contexto «%s» non válida"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Só en %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "non se pode comparar «-» cun directorio"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "A opción -D non está admitida con directorios"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirectorios comúns: %s e %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "O ficheiro %s é un %s mentres que o ficheiro %s é un %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Os ficheiros %s e %s son diferentes\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Os ficheiros %s e %s son idénticos\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opcións incompatíbeis"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "Especificouse «-» para máis dun ficheiro de entrada"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "fallou a lectura"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 #, fuzzy
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-a  --show-all  Amosar todos os cambios, cos conflitos entre parénteses."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 #, fuzzy
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
@@ -1237,91 +1218,91 @@ msgid ""
 msgstr ""
 "-e  --ed  Produce cambios sen mesturar de FICH-ANTIGO a TEU-FICH en MEU-FICH."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 #, fuzzy
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E  --show-overlap  Amosar cambios sen mesturar cos conflitos entre "
 "parénteses."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 #, fuzzy
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "-3  --easy-only  Amosar cambios non sobrepostos e non mesturados."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 #, fuzzy
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x  --overlap-only  Amosar los cambios que se superpoñen."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i  Engadir as ordes  «w» e «q» aos scripts en ed."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 #, fuzzy
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text  Tratar todos os ficheiros como texto"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 #, fuzzy
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminar os retornos de carro á fin das liñas de "
 "entrada."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 #, fuzzy
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab  Facer que as tabulacións queden aliñadas poñendo outra\n"
 "                     tabulación ao principio da liña."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 #, fuzzy
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "--diff-program=PROGRAMA  Empregar o PROGRAMA para comparar os ficheiros."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 #, fuzzy
 msgid "-v, --version               output version information and exit"
 msgstr "Mostrar información da versión e saír"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Uso: %s [OPCIÓN]... MEU-FICH ANTIGO-FICH TEU-FICH\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Comparar tres ficheiros liña a liña."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1335,47 +1316,47 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "O estado de saída é 0 se é correcto, 1 se hai conflitos, 2 en caso de "
 "problema."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "erro interno: fallo no formato dos bloques diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff fallou: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "erro interno: tipo de diff non válido en process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formato de diff non válido; separador de cambios non válido"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formato de diff non válido: última liña incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "non foi posíbel invocar o programa subsidiario «%s»"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "formato de diff non válido: caracteres a principio de liña incorrectos"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "erro interno_ tipo de diff non válido pasado á saída"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "o ficheiro de entrada minguou"
 
@@ -1390,11 +1371,11 @@ msgid "%s: recursive directory loop"
 msgstr "%s: bucle de directorio recursivo"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 #, fuzzy
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
@@ -1402,43 +1383,43 @@ msgstr ""
 "-o FICH  --output=FICH  Operar interactivamente, enviando a saída ao "
 "FICHeiro."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 #, fuzzy
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i  --ignore-case  Ignorar as diferencias entre maiúsculas e minúsculas."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 #, fuzzy
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignorar os cambios pola expansión de tabulacións."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 #, fuzzy
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignorar todos os espazos en branco."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Ignorar os cambios na cantidade de espazos."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 #, fuzzy
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "Todo visíbel (ignorar patrón)"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 #, fuzzy
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines  Ignorar os cambios que teñan todas as liñas en "
 "branco"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
@@ -1446,52 +1427,52 @@ msgstr ""
 "todas as liñas\r\n"
 "                                     conteñan EXPR-REG."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 #, fuzzy
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminar os retornos de carro á fin das liñas de "
 "entrada."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 #, fuzzy
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text  Tratar todos os ficheiros como texto"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 #, fuzzy
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr "-w NÚM  --width=NÚM  Amosar como moito NÚM columnas (130 por omisión)."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 #, fuzzy
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l  --left-column  Amosar só a columna da esquerda nas liñas comúns."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 #, fuzzy
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s --suppress-common-lines  Non amosar as liñas comúns."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 #, fuzzy
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Expandir as tabulacións a espazos na saída."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 #, fuzzy
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "--tabsize=NÚM  Tabulacións de NÚM columnas (8 por omisión)."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 #, fuzzy
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d  --minimal  Procurar atopar o conxunto de cambios máis pequeno."
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 #, fuzzy
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
@@ -1499,40 +1480,40 @@ msgstr ""
 "-H  --speed-large-files  Asumir ficheiros longos e pequenos cambios "
 "dispersos."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 #, fuzzy
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "--diff-program=PROGRAMA  Empregar o PROGRAMA para comparar os ficheiros."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 #, fuzzy
 msgid "-v, --version                output version information and exit"
 msgstr "Mostrar información da versión e saír"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Uso: %s [OPCIÓN]... FICH1 FICH2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 #, fuzzy
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Mestura en dúas columnas das diferencias entre os ficheiros."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "non se pode mesturar a entrada estándar interactivamente"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "ámbolos dous ficheiros a ser comparados son directorios"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1567,6 +1548,22 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "o argumento «%s» de %s%s é incorrecto"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "sufixo incorrecto %s%s no argumento «%s»"
+
+#, fuzzy
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s argumento «%s» demasiado longo"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s páxina web: <http://www.gnu.org/software/%s/>\n"
+
+#, fuzzy
 #~ msgid "                           or 'auto' (the default)"
 #~ msgstr "Aparencia predefinida no modo normal"
 
index 70ae115..78d1991 100644 (file)
Binary files a/po/he.gmo and b/po/he.gmo differ
index 18bc558..e42c600 100644 (file)
--- a/po/he.po
+++ b/po/he.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 2.8.3\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2002-06-17 13:03+0300\n"
 "Last-Translator: Eli Zaretskii <eliz@gnu.org>\n"
 "Language-Team: Hebrew <eliz@gnu.org>\n"
@@ -16,25 +16,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "úéðëúá äøåîç äì÷ú"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "úéðñçî úùéìâ"
 
@@ -198,11 +198,11 @@ msgstr "%s: 
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr ""
 
@@ -275,7 +275,7 @@ msgstr "
 msgid "Unmatched ) or \\)"
 msgstr "âåæ-ïá åì ïéàù \\) åà )"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "íãå÷ éøìåâø éåèéá ïéà"
 
@@ -283,41 +283,31 @@ msgstr "
 msgid "memory exhausted"
 msgstr "ïåøëæä øîâð"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr ""
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr ""
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr ""
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 #, fuzzy
 msgid "unknown stream"
 msgstr "ääåæî-éúìá äì÷ú"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr ""
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "--bytes ïééôàî øåáò `%s' éåâù êøò"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
@@ -337,30 +327,29 @@ msgstr ""
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, fuzzy, c-format
 msgid "Written by %s.\n"
 msgstr ".Thomas Lord é\"ò áúëð"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, fuzzy, c-format
 msgid "Written by %s and %s.\n"
 msgstr ".Randy Smith é\"ò áúëð"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, fuzzy, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr ".Randy Smith é\"ò áúëð"
@@ -368,7 +357,7 @@ msgstr ".Randy Smith 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -378,7 +367,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -388,7 +377,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -398,7 +387,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -408,7 +397,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -419,7 +408,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -430,7 +419,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -442,33 +431,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "äæî äæ íéðåù `%s'-å `%s' íéöá÷ä\n"
@@ -478,107 +461,107 @@ msgstr "
 msgid "Binary files %s and %s differ\n"
 msgstr "äæî äæ íéðåù `%s'-å `%s' íééøðéá íéöá÷\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "õáå÷ä óåñá äùãç-äøåù åú øñç"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr ""
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr ".øúåé áø òãéî úâöäì `%s --help' ùé÷äì äñð"
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "--ignore-initial ïééôàî øåáò `%s' éåâù êøò"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "äæ úà äæ íéøúåñ -s-å -l íéðééôàîä"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "äáéúëá äì÷ú"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "éð÷ú èìô õåøòì"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "                       .íéäæ íðéàù íéúá âöä  -b    --print-bytes"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "             .èì÷ä ìù íéðåùàø íéúá N ìò âìã  -i N --ignore-initial=N"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ".éðùä õáå÷á íéúá N2 ìòå ïåùàøä õáå÷á íéúá N1 ìò âìã"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ".íéäæ íðéàù íéúáä ìë ìù ãå÷å éøåãéñ 'ñî âöä  -l    --verbose"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "                    .íéúá N øúåéä ìëì äååùä  -n N  --bytes=N"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
 msgstr "                       .úéðëúä úñøéâ úà âöä  -v  --version"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "   %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]] :ùåîéù ïôåà\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr ".úéáì úéá íéöá÷ éðù äååùä"
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr "      .íéöá÷äî ãçà ìëá âìãì ùé íäéìò íéúáä éøôñî íä SKIP2-å SKIP1"
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -588,278 +571,278 @@ msgstr ""
 "                     ,M 1,048,576, MB 1,000,000 ,K 1024 ,kB 1000,\n"
 "  .T, P, E, Z, Y øåáò äàìä ïëå ,G 1,073,741,824 ,GB 1,000,000,000"
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "             .éð÷ú èì÷ õåøòî àø÷ ,ïééåöî åðéà åà `-' åðéä FILE íà"
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "--bytes ïééôàî øåáò `%s' éåâù êøò"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "`%s' éøçà øñç èðîåâøà"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "`%s' éøçà øúåéî èðîåâøà"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s-å %s íéöá÷ä ïéá %s úéá ,%s äøåùî ìçä éðåù\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s-å %s íéöá÷ä ïéá %s úéá ,%s äøåùî ìçä %3o %s %3o %s éðåù\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: %s õáå÷ óåñ\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s-å %s íéöá÷ä ïéá %s úéá ,%s äøåùî ìçä éðåù\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s-å %s íéöá÷ä ïéá %s úéá ,%s äøåùî ìçä éðåù\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: %s õáå÷ óåñ\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr ""
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "`%s' éåâù øù÷ä êøåà"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "åæ úëøòîá èìôä ãåîéòá äëéîú ïéà"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "íéöá÷ úéååú øåáò -L éðééôàî éãî øúåé"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "`%s' éåâù äøåù áçåø"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "íéøúåñ äøåù áçåø éðééôàî"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "--horizon-lines ïééôàîá `%s' éåâù úåøåù øôñî"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "`%s' éåâù Tab áçåø"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "íéøúåñ Tab áçåø éðééôàî"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--to-file ïäå --from-file ïä úðééö"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "                   .ìéâø èîøåôá íééåðéù ÷ôä      --normal"
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "                   .íéðåù íéöá÷ä íà øåîà ÷ø  -q  --brief"
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "                        .íéäæ íéöá÷ ìò çååã  -s  --report-identical-files"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 #, fuzzy
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ".äøåùì (130 ç\"îøá) íéååú NUM øúåéä ìëì âöä  -w NUM  --width=NUM"
 
-#: src/diff.c:896
+#: src/diff.c:898
 #, fuzzy
 msgid "-e, --ed                      output an ed script"
 msgstr "             .ed êøåò øåáò úåàøåä úîéùø ÷ôä  -e  --ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 #, fuzzy
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "                    .RCS èîøåôá íééåðéù ÷ôä  -n  --rcs"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 #, fuzzy
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ".äøåùì (130 ç\"îøá) íéååú NUM øúåéä ìëì âöä  -w NUM  --width=NUM"
 
-#: src/diff.c:900
+#: src/diff.c:902
 #, fuzzy
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "         .úéìàîùä úà ÷ø âöä ,úåäæ úåøåùä íà  -l  --left-column"
 
-#: src/diff.c:901
+#: src/diff.c:903
 #, fuzzy
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr ""
 "                    .úåäæ úåøåù ììë âéöú ìà  -s  --suppress-common-lines"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 
-#: src/diff.c:908
+#: src/diff.c:910
 #, fuzzy
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "                .èìôá íéçååøì TAB éååú êåôä  -t  --expand-tabs"
 
-#: src/diff.c:909
+#: src/diff.c:911
 #, fuzzy
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "             .äøåùä éðôì TAB \"ò íé-TAB øùé  -T  --initial-tab"
 
-#: src/diff.c:910
+#: src/diff.c:912
 #, fuzzy
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "                  .(8 ç\"îøá) úåãåîò NUM ìë Tab  --tabsize=NUM"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "                .ãåîéò íùì `pr' êøã èìô áúð  -l  --paginate"
 
-#: src/diff.c:914
+#: src/diff.c:916
 #, fuzzy
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "            .éáéñøå÷ø ïôåàá úåé÷éú-úú äååùä  -r  --recursive"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 #, fuzzy
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "          .íé÷éø åéä åìéàë íéøñç íéöá÷á ìôè  -N  --new-file"
 
-#: src/diff.c:917
+#: src/diff.c:919
 #, fuzzy
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "  .íé÷éø åéä åìéàë íéøñç íéðåùàø íéöá÷á ìôè      --unidirectional-new-file"
 
-#: src/diff.c:918
+#: src/diff.c:920
 #, fuzzy
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ".íéöá÷ä úåîùá úåðè÷î úåìåãâ úåéúåà ìéãáú ìà  --ignore-file-name-case"
 
-#: src/diff.c:919
+#: src/diff.c:921
 #, fuzzy
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "   .íéöá÷ä úåîùá úåðè÷î úåìåãâ úåéúåà ìéãáú  --no-ignore-file-name-case"
 
-#: src/diff.c:920
+#: src/diff.c:922
 #, fuzzy
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "  .PAT úéðáúì íéîéàúî íäéúåîùù íéöá÷ ìò âìã  -x PAT  --exclude=PAT"
 
-#: src/diff.c:921
+#: src/diff.c:923
 #, fuzzy
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "FILE-á úåéðáúì íéîéàúî íäéúåîùù íéöá÷ ìò âìã -X FILE  --exclude-from=FILE"
 
-#: src/diff.c:922
+#: src/diff.c:924
 #, fuzzy
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "             .FILE õáå÷á úåé÷éú úàååùä ìçúä  -S FILE  --starting-file=FILE"
 
-#: src/diff.c:923
+#: src/diff.c:925
 #, fuzzy
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
@@ -867,7 +850,7 @@ msgid ""
 msgstr ""
 ".äé÷éú úåéäì ìåëé FILE1 .íéèðîåâøàä øàù ìëì FILE1 äååùä  --from-file=FILE1"
 
-#: src/diff.c:925
+#: src/diff.c:927
 #, fuzzy
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
@@ -875,96 +858,96 @@ msgid ""
 msgstr ""
 "   .äé÷éú úåéäì ìåëé FILE2 .FILE2-ì íéèðîåâøàä ìë äååùä  --to-file=FILE2"
 
-#: src/diff.c:928
+#: src/diff.c:930
 #, fuzzy
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ".íéöá÷ä ïëåúá úåðè÷î úåìåãâ úåéúåà ìéãáú ìà  -i  --ignore-case"
 
-#: src/diff.c:929
+#: src/diff.c:931
 #, fuzzy
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "             .íéçååøì TAB ïéá íéìãáäî íìòúä  -E  --ignore-tab-expansion"
 
-#: src/diff.c:930
+#: src/diff.c:932
 #, fuzzy
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "                         .íéçååøä ìëî íìòúä  -w  --ignore-all-space"
 
-#: src/diff.c:931
+#: src/diff.c:933
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "                .íéçååø úåîëá íéìãáäî íìòúä  -b  --ignore-space-change"
 
-#: src/diff.c:932
+#: src/diff.c:934
 #, fuzzy
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "                         .íéçååøä ìëî íìòúä  -w  --ignore-all-space"
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "            .úå÷éø íäéúåøåùù íééåðéùî íìòúä  -B  --ignore-blank-lines"
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 ".RE úéðáúì úåîéàúî íäéúåøåùù íééåðéùî íìòúä  -I RE --ignore-matching-lines=RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 #, fuzzy
 msgid "-a, --text                      treat all files as text"
 msgstr "                .èñ÷è éöá÷áë íéöá÷ä ìëá ìôè  -a  --text"
 
-#: src/diff.c:937
+#: src/diff.c:939
 #, fuzzy
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "              .èì÷ úøåù ìë óåñî CR éååú ÷ìñ      --strip-trailing-cr"
 
-#: src/diff.c:939
+#: src/diff.c:941
 #, fuzzy
 msgid "    --binary                    read and write data in binary mode"
 msgstr "                    .éøàðéá ïôåàá áåúëå àø÷      --binary"
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr "`#ifdef NAME'-á íééåðéù ãøôä ,áìåùî õáå÷ ÷ôä -D NAME  --ifdef=NAME"
 
-#: src/diff.c:943
+#: src/diff.c:945
 #, fuzzy
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "GFMT úøæòá GTYPE âåñî èì÷ úåöåá÷ èîøô êà ,ì\"ðë  --GTYPE-group-format=GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 #, fuzzy
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "               .LFMT úøæòá úåøåù èîøô êà ,ì\"ðë  --line-format=LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 #, fuzzy
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 ".LFMT úøæòá LTYPE âåñî èì÷ úåøåù èîøô êà ,ì\"ðë  --LTYPE-group-format=LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr "  .`changed' åà LTYPE åîë GTYPE .`unchanged' åà `new' ,`old' àåä LTYPE"
 
-#: src/diff.c:949
+#: src/diff.c:951
 #, fuzzy
 msgid ""
 "  GFMT (only) may contain:\n"
@@ -992,7 +975,7 @@ msgstr ""
 "                               F-1  E\n"
 "                               M+1  M"
 
-#: src/diff.c:961
+#: src/diff.c:963
 #, fuzzy
 msgid ""
 "  LFMT (only) may contain:\n"
@@ -1005,7 +988,7 @@ msgstr ""
 "       äøåùä óåñ åú èòîì äøåù ïëåú  %l\n"
 "èì÷ úøåù øåáò printf ïåðâñá úæåøçî  %[-][WIDTH][.[PREC]]{doxX}n"
 
-#: src/diff.c:965
+#: src/diff.c:967
 #, fuzzy
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
@@ -1019,238 +1002,238 @@ msgstr ""
 "                         C ããåá åú  %c'C'\n"
 "             OOO éìè÷åà ãå÷ ìòá åú  %c'\\OOO'"
 
-#: src/diff.c:971
+#: src/diff.c:973
 #, fuzzy
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "            .íééåðéùä úöåá÷ úà ïéè÷äì ìãúùä  -d  --minimal"
 
-#: src/diff.c:972
+#: src/diff.c:974
 #, fuzzy
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 ".íéöá÷ä íåéñå äìéçúá úåôúåùî úåøåù NUM øàùä          --horizon-lines=NUM"
 
-#: src/diff.c:973
+#: src/diff.c:975
 #, fuzzy
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr "  .íé÷çåøîå íéðè÷ íééåðéùå íéìåãâ íéöá÷ çðä  -H  --speed-large-files"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 #, fuzzy
 msgid "-v, --version            output version information and exit"
 msgstr "                       .úéðëúä úñøéâ úà âöä  -v  --version"
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 ".`FILE... DIR' åà `DIR FILE...' åà `DIR1 DIR2' åà `FILE1 FILE2' íä FILES"
 
-#: src/diff.c:983
+#: src/diff.c:985
 #, fuzzy
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "       .FILES ìò úåìáâî ïéà éæà ,--to-file åà --from-file ïééôàî ïåúð íà"
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr ""
 "                                   .éð÷úä èì÷ä õøòî àø÷ ,`-' àåä FILE íà"
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "%s [OPTION]... FILES   :ùåîéù ïôåà\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 #, fuzzy
 msgid "Compare FILES line by line."
 msgstr ".äøåù äøåù íéöá÷ éðù äååùä"
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "%s ïééôàî ìù íãå÷ êøò øúåñ `%s' êøò"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "èìô ïåðâñ ìù íéøúåñ íéðééôàî"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "`%s' éåâù øù÷ä êøåà"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "%s-á ÷ø àöîð %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "äé÷éúì `-' úååùäì úåøùôà ïéà"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "úåé÷éú øåáò -D ïééôàîá äëéîú ïéà"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "%s-å %s :úåäæ úåé÷éú-úú\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "%s %s-ì %s %s úååùäì ïúéð àì\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "äæî äæ íéðåù `%s'-å `%s' íéöá÷ä\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "íéäæ íðéä %s-å %s íéöá÷ä\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 #, fuzzy
 msgid "Randy Smith"
 msgstr ".Randy Smith é\"ò áúëð"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "íéøúåñ íéðééôàî"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "ãçà èì÷ õáå÷î øúåé øåáò `-' úðééö"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "äàéø÷á äì÷ú"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 #, fuzzy
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr "                .íéè÷éìôðå÷ ïîñ ,íééåðéùä ìë úà âöä  -A  --show-all"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 #, fuzzy
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr "MYFILE êåú ìà YOURFILE-ì OLDFILE-î âåæéî àìì íééåðéù -e  --ed"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 #, fuzzy
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "             .íéè÷éìôðå÷ ïîñ ,âåæéî àìì íééåðéù âöä  -E  --show-overlap"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 #, fuzzy
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "               .âåæéî àììå íéôôåç íðéàù íééåðéù âöä  -3  --easy-only"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 #, fuzzy
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "                                .íéôôåç íééåðéù âöä  -x  --overlap-only"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "            .ed úåãå÷ô íåéñá `q'-å `w' úåãå÷ô áåúë   -i"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 #, fuzzy
 msgid "-a, --text                  treat all files as text"
 msgstr "                .èñ÷è éöá÷áë íéöá÷ä ìëá ìôè  -a  --text"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 #, fuzzy
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "              .èì÷ úøåù ìë óåñî CR éååú ÷ìñ      --strip-trailing-cr"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 #, fuzzy
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "             .äøåùä éðôì TAB \"ò íé-TAB øùé  -T  --initial-tab"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 #, fuzzy
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "                 .íéöá÷ úàåùäì PROGRAM úéðëúá ùîúùä  --diff-program=PROGRAM"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 #, fuzzy
 msgid "-v, --version               output version information and exit"
 msgstr "                       .úéðëúä úñøéâ úà âöä  -v  --version"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "%s [OPTION]... MYFILE OLDFILE YOURFILE   :ùåîéù ïôåà\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr ".úéáì úéá íéöá÷ äùìù äååùä"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1264,45 +1247,45 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "diff éòè÷ èîøåôá äçéøî :úéîéðô äðëú úàéâù"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s é\"ò diff úìòôäá äì÷ú :"
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "process_diff úééö÷ðåôá éåðéù ìù éåâù âåñ :úéîéðô äðëú úàéâù"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "äéåâù íééåðéù úãøôä úæåøçî :éåðéù ìù éåâù èîøåô"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "äîìù äðéà äðåøçà äøåù :éåðéù ìù éåâù èîøåô"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "äàöîð àì `%s' úéðëú-úú"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "äøåù úìéçúá íééåâù íéååú :éåðéù ìù éåâù èîøåô"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "èìô éëøöì éåðéù ìù éåâù âåñ :úéîéðô äðëú úàéâù"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "÷îèöä èì÷ õáå÷"
 
@@ -1317,140 +1300,140 @@ msgid "%s: recursive directory loop"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 #, fuzzy
 msgid "Thomas Lord"
 msgstr ".Thomas Lord é\"ò áúëð"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 #, fuzzy
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "            .FILE-ì èìô ,úéáéè÷àøèðéà äìåòô  -o FILE  --output=FILE"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 #, fuzzy
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "    .úåðè÷å úåìåãâ úåéúåà ïéá íéìãáäî íìòúä  -i  --ignore-case"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 #, fuzzy
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "             .íéçååøì TAB ïéá íéìãáäî íìòúä  -E  --ignore-tab-expansion"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 #, fuzzy
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "                         .íéçååøä ìëî íìòúä  -w  --ignore-all-space"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "                .íéçååø úåîëá íéìãáäî íìòúä  -b  --ignore-space-change"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 #, fuzzy
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "                .øçà ïáì çèùå íéçååøî íìòúä  -W  --ignore-all-space"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 #, fuzzy
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "            .úå÷éø íäéúåøåùù íééåðéùî íìòúä  -B  --ignore-blank-lines"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 ".RE úéðáúì úåîéàúî íäéúåøåùù íééåðéùî íìòúä  -I RE --ignore-matching-lines=RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 #, fuzzy
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "              .èì÷ úøåù ìë óåñî CR éååú ÷ìñ      --strip-trailing-cr"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 #, fuzzy
 msgid "-a, --text                   treat all files as text"
 msgstr "                .èñ÷è éöá÷áë íéöá÷ä ìëá ìôè  -a  --text"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 #, fuzzy
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ".äøåùì (130 ç\"îøá) íéååú NUM øúåéä ìëì âöä  -w NUM  --width=NUM"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 #, fuzzy
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "         .úéìàîùä úà ÷ø âöä ,úåäæ úåøåùä íà  -l  --left-column"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 #, fuzzy
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr ""
 "                    .úåäæ úåøåù ììë âéöú ìà  -s  --suppress-common-lines"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 #, fuzzy
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "                .èìôá íéçååøì TAB éååú êåôä  -t  --expand-tabs"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 #, fuzzy
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "                  .(8 ç\"îøá) úåãåîò NUM ìë Tab  --tabsize=NUM"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 #, fuzzy
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "            .íééåðéùä úöåá÷ úà ïéè÷äì ìãúùä  -d  --minimal"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 #, fuzzy
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr "  .íé÷çåøîå íéðè÷ íééåðéùå íéìåãâ íéöá÷ çðä  -H  --speed-large-files"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 #, fuzzy
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "                 .íéöá÷ úàåùäì PROGRAM úéðëúá ùîúùä  --diff-program=PROGRAM"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 #, fuzzy
 msgid "-v, --version                output version information and exit"
 msgstr "                       .úéðëúä úñøéâ úà âöä  -v  --version"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "%s [OPTION]... FILE1 FILE2  :ùåîéù ïôåà\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 #, fuzzy
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ".äæ ãöá äæ íéöá÷ ïéá íééåðéù ìù âåæéî"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "éáéè÷àøèðéà ïôåàá éð÷ú èì÷ õåøò âæîì úåøùôà ïéà"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "úåé÷éú íðéä äàååùäì íéöá÷ä éðù"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 #, fuzzy
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
@@ -1486,6 +1469,10 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "--bytes ïééôàî øåáò `%s' éåâù êøò"
+
+#, fuzzy
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `--%s' ïééôàî\n"
 
index 526b621..b1528ae 100644 (file)
Binary files a/po/hr.gmo and b/po/hr.gmo differ
index cbe0a12..6a2775e 100644 (file)
--- a/po/hr.po
+++ b/po/hr.po
@@ -1,15 +1,16 @@
 # Translation of diffutils to Croatian.
 # Copyright © 2012 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
 #
+# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
+# Božidar Putanec <bozidarp@yahoo.com>, 2019, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.3-pre1\n"
+"Project-Id-Version: GNU diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2012-12-21 00:37+0100\n"
-"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 12:48+0200\n"
+"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
 "Language-Team: Croatian <lokalizacija@linux.hr>\n"
 "Language: hr\n"
 "MIME-Version: 1.0\n"
@@ -18,30 +19,29 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Gtranslator 2.91.5\n"
+"X-Generator: Poedit 3.0\n"
 
-#: lib/argmatch.c:134
-#, fuzzy, c-format
+#: lib/argmatch.c:132
+#, c-format
 msgid "invalid argument %s for %s"
-msgstr "neispravan %s%s argument „%s”"
+msgstr "nevaljani argument %s for %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
-msgstr ""
+msgstr "višeznačni argument %s za %s"
 
-#: lib/argmatch.c:154
-#, fuzzy
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
-msgstr "neispravan %s%s argument „%s”"
+msgstr "Valjani argumenti su:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programska greška"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
-msgstr "preljev stoga"
+msgstr "prelijevanje stȏga"
 
 #: lib/error.c:195
 msgid "Unknown system error"
@@ -61,11 +61,11 @@ msgstr "direktorij"
 
 #: lib/file-type.c:46
 msgid "symbolic link"
-msgstr "simbolička veza"
+msgstr "simbolička poveznica"
 
 #: lib/file-type.c:52
 msgid "message queue"
-msgstr "red poruka"
+msgstr "red (čekanja) poruka"
 
 #: lib/file-type.c:55
 msgid "semaphore"
@@ -77,63 +77,59 @@ msgstr "dijeljeni memorijski objekt"
 
 #: lib/file-type.c:61
 msgid "typed memory object"
-msgstr "tipizirani memorijski objekt"
+msgstr "nezavisni memorijski objekt"
 
 #: lib/file-type.c:66
 msgid "block special file"
-msgstr "posebna blokovska datoteka"
+msgstr "specijalna blokovska datoteka (blok uređaj)"
 
 #: lib/file-type.c:69
 msgid "character special file"
-msgstr "posebna znakovna datoteka"
+msgstr "(specijalna) znak datoteka (bajt uređaj)"
 
 #: lib/file-type.c:72
 msgid "contiguous data"
-msgstr ""
+msgstr "kontinuirani podaci"
 
 #: lib/file-type.c:75
 msgid "fifo"
-msgstr "fifo"
+msgstr "FIFO"
 
 #: lib/file-type.c:78
 msgid "door"
-msgstr ""
+msgstr "vrata"
 
 #: lib/file-type.c:81
-#, fuzzy
 msgid "multiplexed block special file"
-msgstr "posebna blokovska datoteka"
+msgstr "multipleksirana (specijalna) blok datoteka (blok-uređaj)"
 
 #: lib/file-type.c:84
-#, fuzzy
 msgid "multiplexed character special file"
-msgstr "posebna znakovna datoteka"
+msgstr "multipleksirana (specijalna) znak datoteka (bajt uređaj)"
 
 #: lib/file-type.c:87
 msgid "multiplexed file"
-msgstr ""
+msgstr "multipleksirana datoteka"
 
 #: lib/file-type.c:90
-#, fuzzy
 msgid "named file"
-msgstr "čudna datoteka"
+msgstr "imenovana datoteka"
 
 #: lib/file-type.c:93
-#, fuzzy
 msgid "network special file"
-msgstr "posebna blokovska datoteka"
+msgstr "(specijalna) mrežna datoteka (mrežni uređaj)"
 
 #: lib/file-type.c:96
 msgid "migrated file with data"
-msgstr ""
+msgstr "migrirana datoteka s podacima"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr ""
+msgstr "migrirana datoteka bez podataka"
 
 #: lib/file-type.c:102
 msgid "port"
-msgstr ""
+msgstr "port"
 
 #: lib/file-type.c:105
 msgid "socket"
@@ -141,46 +137,46 @@ msgstr "utičnica"
 
 #: lib/file-type.c:108
 msgid "whiteout"
-msgstr ""
+msgstr "whiteout"
 
 #: lib/file-type.c:110
 msgid "weird file"
 msgstr "čudna datoteka"
 
 #: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s: opcija „-W %s” je višeznačna\n"
+msgstr "%s: opcija „-%s%s“ nije jednoznačna\n"
 
 #: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s: opcija „%s” je višeznačna, mogućnosti:"
+msgstr "%s: opcija „%s%s“ nije jednoznačna; mogućnosti su:"
 
 #: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s: neprepoznata opcija „%c%s”\n"
+msgstr "%s: neprepoznata opcija „%s%s“\n"
 
 #: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s: opcija „%c%s” ne dozvoljava argument\n"
+msgstr "%s: opcija „%s%s“ ne dopušta argument\n"
 
 #: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s: opcija „--%s” zahtijeva argument\n"
+msgstr "%s: opcija „%s%s“ zahtijeva argument\n"
 
 #: lib/getopt.c:621
 #, c-format
 msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: neispravna opcija -- „%c”\n"
+msgstr "%s: nevaljana opcija -- „%c“\n"
 
 #: lib/getopt.c:636 lib/getopt.c:682
 #, c-format
 msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: opcija zahtijeva argument -- â\80\9e%câ\80\9d\n"
+msgstr "%s: opcija zahtijeva argument -- â\80\9e%câ\80\9c\n"
 
 #. TRANSLATORS:
 #. Get translations for open and closing quotation marks.
@@ -203,13 +199,13 @@ msgstr "%s: opcija zahtijeva argument -- „%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
-msgstr "â\80\9d"
+msgstr "â\80\9c"
 
 #: lib/regcomp.c:135
 msgid "Success"
@@ -217,60 +213,59 @@ msgstr "Uspjeh"
 
 #: lib/regcomp.c:138
 msgid "No match"
-msgstr "Nema poklapanja"
+msgstr "Nema podudaranja"
 
 #: lib/regcomp.c:141
 msgid "Invalid regular expression"
-msgstr "Neispravan regularni izraz"
+msgstr "Nevaljani regularni izraz"
 
 #: lib/regcomp.c:144
 msgid "Invalid collation character"
-msgstr "Neispravan znak razvrstavanja"
+msgstr "Nevaljani znak za razvrstavanje"
 
 #: lib/regcomp.c:147
 msgid "Invalid character class name"
-msgstr "Neispravno ime razreda znakova"
+msgstr "Nevaljano ime klase znakova"
 
 #: lib/regcomp.c:150
 msgid "Trailing backslash"
-msgstr "Obrnuta kosa crta na kraju"
+msgstr "Zaostala obratna kosa crta (backslash)"
 
 #: lib/regcomp.c:153
 msgid "Invalid back reference"
-msgstr "Neispravna povratna referenca"
+msgstr "Nevaljana povratna referencija"
 
 #: lib/regcomp.c:156
-#, fuzzy
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "Neuparena [ ili [^"
+msgstr "Nesparena [, [^, [:, [., ili [="
 
 #: lib/regcomp.c:159
 msgid "Unmatched ( or \\("
-msgstr "Neuparena ( ili \\("
+msgstr "Nesparena ( ili \\("
 
 #: lib/regcomp.c:162
 msgid "Unmatched \\{"
-msgstr "Neuparena \\{"
+msgstr "Nesparena \\{"
 
 #: lib/regcomp.c:165
 msgid "Invalid content of \\{\\}"
-msgstr "Neispravan sadržaj \\{\\}"
+msgstr "Nevaljani sadržaj u \\{\\}"
 
 #: lib/regcomp.c:168
 msgid "Invalid range end"
-msgstr "Neispravan kraj raspona"
+msgstr "Nevaljani kraj raspona"
 
 #: lib/regcomp.c:171
 msgid "Memory exhausted"
-msgstr "Memorija iscrpljena"
+msgstr "Nema dovoljno memorije"
 
 #: lib/regcomp.c:174
 msgid "Invalid preceding regular expression"
-msgstr "Neispravan prethodni regularni izraz"
+msgstr "Nevaljani prethodni regularni izraz"
 
 #: lib/regcomp.c:177
 msgid "Premature end of regular expression"
-msgstr "Preuranjen kraj regularnog izraza"
+msgstr "Prerani kraj regularnog izraza"
 
 #: lib/regcomp.c:180
 msgid "Regular expression too big"
@@ -278,61 +273,51 @@ msgstr "Regularni izraz je prevelik"
 
 #: lib/regcomp.c:183
 msgid "Unmatched ) or \\)"
-msgstr "Neuparena ) ili \\)"
+msgstr "Nesparena ) ili \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
-msgstr "Nedostaje prethodni regularni izraz"
+msgstr "Nema prethodnog regularnog izraza"
 
 #: lib/xalloc-die.c:34
 msgid "memory exhausted"
-msgstr "memorija iscrpljena"
+msgstr "nema dovoljno memorije"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "standardni ulaz"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "standardni izlaz"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "standardni izlaz za greške"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "nepoznat tok podataka"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
-msgstr "nisam uspio ponovo otvoriti %s s modom %s"
-
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "neispravan %s%s argument „%s”"
+msgstr "nije uspjelo ponovo otvoriti %s u načinu %s"
 
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "neispravan sufiks u %s%s argumentu „%s”"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s argument „%s” je prevelik"
+msgid "standard file descriptors"
+msgstr "standardni deskriptori datoteka"
 
 #: lib/version-etc.c:73
 #, c-format
 msgid "Packaged by %s (%s)\n"
-msgstr "Pakirao %s (%s)\n"
+msgstr "Spakirali %s (%s)\n"
 
 #: lib/version-etc.c:76
 #, c-format
 msgid "Packaged by %s\n"
-msgstr "Pakirao %s\n"
+msgstr "Spakirao %s\n"
 
 #. TRANSLATORS: Translate "(C)" to the copyright symbol
 #. (C-in-a-circle), if this symbol is available in the user's
@@ -341,37 +326,33 @@ msgstr "Pakirao %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licenca GPLv3+: GNU GPL inačica 3 ili novija <http://gnu.org/licenses/gpl."
-"html>.\n"
-"Ovo je slobodan softver: slobodno ga smijete mijenjati i dijeliti.\n"
-"NEMA JAMSTAVA, do krajnje mjere dozvoljene zakonom.\n"
-"\n"
+"Licencija:\n"
+"GPLv3+: GNU GPL inačica 3 ili kasnija <%s>\n"
+"Ovo je slobodan softver: slobodno ga mijenjajte i dijelite.\n"
+"NEMA JAMSTVA do granica dopuštenih zakonom.\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Napisao %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Napisali %s i %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Napisali %s, %s i %s.\n"
@@ -379,7 +360,7 @@ msgstr "Napisali %s, %s i %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -391,7 +372,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -403,7 +384,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -415,7 +396,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -427,7 +408,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -441,7 +422,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -455,7 +436,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -470,487 +451,525 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
-"Prijavite greške na %s.\n"
-"Prijavite greške prijevoda na <lokalizacija@linux.hr>.\n"
+"Prijavite programske greške (na engleskom, LC_ALL=C) na %s\n"
+"Prijavite pogreške u prijevodu na <lokalizacija@linux.hr>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Prijavite %s greške na %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
-msgstr "%s početna stranica: <%s>\n"
-
-#: lib/version-etc.c:253
-#, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s početna stranica: <http://www.gnu.org/software/%s/>\n"
+msgstr "Mrežna stranica za %s: <%s>\n"
 
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Općenita pomoć za korištenje GNU softvera: <http://www.gnu.org/gethelp/>\n"
+#: lib/version-etc.c:260
+#, c-format
+msgid "General help using GNU software: <%s>\n"
+msgstr "Općenita pomoć za korištenje GNU softvera: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
-msgstr "Datoteke %s i %s se razlikuju\n"
+msgstr "Datoteke %s i %s su različite\n"
 
 #: src/analyze.c:455
 #, c-format
 msgid "Binary files %s and %s differ\n"
 msgstr "Binarne datoteke %s i %s se razlikuju\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
-msgstr "Nema novog retka na kraju datoteke"
+msgstr "Nema znaka za kraj retka (LF) na kraju datoteke"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
-msgstr "Pokušajte „%s --help” za više informacija."
+msgstr "Pokušajte s „%s --help“ za pomoć i više informacija."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
-msgstr "neispravna --ignore-initial vrijednost „%s”"
+msgstr "nevaljana vrijednost „%s“ za --ignore-initial"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "opcije -l i -s nisu kompatibilne"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "pisanje nije uspjelo"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standardni izlaz"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
-msgstr "-b, --print-bytes          ispiši bajtove koji se razlikuju"
+msgstr "-b, --print-bytes          ispiše različite bajtove"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=BROJ         preskoči prvih BROJ bajtova oba ulaza"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
-"-i, --ignore-initial=BROJ1:BROJ2  preskoči prvih BROJ1 bajtova DATOTEKE1\n"
-"                                      i prvih BROJ2 bajtova DATOTEKE2"
+"-i, --ignore-initial=SKIP1:SKIP2  preskoči prvih SKIP1 bajtova DATOTEKE1\n"
+"                                      i prvih SKIP2 bajtova DATOTEKE2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
-"-l, --verbose              ispiši brojeve i vrijednosti bajtova koji se "
-"razlikuju"
+"-l, --verbose              pokaže poziciju i vrijednost različitih bajtova"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
-msgstr "-n, --bytes=BROJ           usporedi najviše BROJ bajtova"
+msgstr "-n, --bytes=BROJ           usporedi ne više od BROJ bajtova"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
-msgstr "-s, --quiet, --silent      izostavi sav normalan izlaz"
+msgstr ""
+"-s, --quiet, --silent      izostavi normalni izlaz (ispiše samo status "
+"izlaza)"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
-msgstr "    --help                 prikaži ovu pomoć i izađi"
+msgstr "    --help                 pokaže ovu pomoć i iziđe"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
-msgstr "-v, --version              ispiši informacije o inačici i izađi"
+msgstr "-v, --version              informacije o inačici ovog programa"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
-msgstr "Uporaba: %s [OPCIJA]... DATOTEKA1 [DATOTEKA2 [BROJ1 [BROJ2]]]\n"
+msgstr "Uporaba: %s [OPCIJA]... DATOTEKA1 [DATOTEKA2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Usporedi dvije datoteke bajt po bajt."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr ""
+"Neobvezne vrijednosti SKIP1 i SKIP2 specificiraju broj bajtova koje treba\n"
+"preskočiti od početka svake datoteke (zadano 0)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
-"Obavezni argumenti dugačkih opcija također su obavezni i za kratke opcije.\n"
+"Obvezni argumenti dugačkih opcija obvezni su također i za kratke opcije.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y."
 msgstr ""
+"Vrijednostima za SKIP mogu se dopisati sljedeći množitelji:\n"
+"kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
+"GB 1,000,000,000, G 1,073,741,824, itd. za T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
-msgstr "Ako DATOTEKA nije navedena ili je â\80\9e\80\9d, Ä\8ditaj standardni ulaz."
+msgstr "Ako DATOTEKA nije navedena ili je â\80\9e\80\9c, Ä\8dita standardni ulaz."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
-"Izlazno stanje je 0 ako su ulazi jednaki, 1 ako se razlikuju, 2 u slučaju "
-"greške."
+"Izlazni status je 0 ako su ulazi jednaki, 1 ako su različiti, 2 pri greški."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
-msgstr "neispravna --bytes vrijednost „%s”"
+msgstr "nevaljana vrijednost „%s“ za --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
-msgstr "nedostaje operand nakon „%s”"
+msgstr "nedostaje operand iza „%s“"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
-msgstr "operand viška „%s”"
+msgstr "suvišni operand „%s“"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
-msgstr ""
+msgstr "%s %s se razlikuju: bajt %s, redak %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
-msgstr ""
+msgstr "%s %s se razlikuju: bajt %s, redak %s je %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
-msgstr ""
+msgstr "cmp: kraj datoteke (EOF) u %s koji je prazan\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
-msgstr ""
+msgstr "cmp: kraj datoteke (EOF) u %s iza bajta %s, redak %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
-msgstr ""
+msgstr "cmp: kraj datoteke (EOF) u %s iza bajta %s, u retku %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
-msgstr ""
+msgstr "cmp: kraj datoteke (EOF) u %s iza bajta %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
-msgstr "neispravna duljina sadržaja „%s”"
+msgstr "nevaljana duljina konteksta „%s“"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
-msgstr "straničenje nije podržano na ovom računalu"
+msgstr "paginacija nije podržana na ovom računalu"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
-msgstr "previše opcija oznaka datoteka"
+msgstr "previše opcija datotečnih oznaka (label)"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
-msgstr "neispravna širina „%s”"
+msgstr "nevaljana širina „%s“"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
-msgstr "konfliktne opcije širine"
+msgstr "konfliktne opcije za širinu"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
-msgstr "neispravna duljina sadržaja „%s”"
+msgstr "nevaljana duljina „%s“ za horizon"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
-msgstr "neispravna širina „%s”"
+msgstr "nevaljana širina „%s“ za tab(ulator)"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
-msgstr "konfliktne opcije širine"
+msgstr "konfliktne opcije za širinu tab(ulatora)"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
-msgstr ""
+msgstr "specificirani su --from-file i --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
-msgstr "    --normal                  ispiši normalnu razliku (zadano)"
+msgstr "    --normal                  prikaže normalni diff (zadano)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
-msgstr "-q, --brief                   izvještaj samo kad se datoteke razlikuju"
+msgstr "-q, --brief                   izvijesti samo kad se datoteke razlikuju"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
-msgstr "-s, --report-identical-files  izvještaj samo kad su datoteke jednake"
+msgstr "-s, --report-identical-files  izvijesti kad su datoteke jednake"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
+"-c, -C NUM, --context[=BROJ]  pokaže BROJ (zadano 3) retka\n"
+"                                kopiranog konteksta"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
+"-u, -U NUM, --unified[=BROJ]  pokaže BROJ (zadano 3) unificiranog konteksta"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
-msgstr "-e, --ed                      ispiši ed skriptu"
+msgstr "-e, --ed                      generira i prikaže ed-script"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n, --rcs                     ispiši razliku u RCS obliku"
+msgstr "-n, --rcs                     prikaže diff u RCS formatu"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
-msgstr "-y, --side-by-side            ispiši u dva stupca"
+msgstr "-y, --side-by-side            prikaz u dva stupca"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
+"-W, --width=BROJ              prikaže ne više od BROJ (zadano 130)\n"
+"                                znakova po retku"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
+"    --left-column             pokaže samo lijevi stupac kad su redci jednaki"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
-msgstr ""
+msgstr "    --suppress-common-lines   ne prikazuje jednake retke"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
+"-p, --show-c-function         pokaže u kojoj C funkcije je svaka promjena"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
+"-F, --show-function-line=RE   pokaže najnoviji redak podudaran s RE (regexp)"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
+"    --label LABEL             koristi LABEL umjesto imena i vremenskog žiga\n"
+"                                datoteke (može se ponavljati)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
-msgstr "-t, --expand-tabs             pretvori tabulatore u praznine u izlazu"
+msgstr "-t, --expand-tabs             na izlazu proširi tab(ulatore) u razmake"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
+"-T, --initial-tab             poravna umetanjem tab(ulatora) na početak retka"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
+"    --tabsize=BROJ            tabulacija svakih BROJ (zadano 8) stupaca"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
+"    --suppress-blank-empty    izostavi razmak ili tab ispred\n"
+"                                praznih izlaznih redaka"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
-msgstr ""
+msgstr "-l, --paginate                proslijedi izlaz na paginaciju kroz „pr“"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
+"-r, --recursive                 rekurzivno uspoređuje sve poddirektorije"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
-msgstr "    --no-dereference            ne slijedi simboličke veze"
+msgstr "    --no-dereference            ne slijedi simboličke poveznice"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
-msgstr ""
-"-N, --new-file                  postupaj s odsutnim datotekama kao s praznim"
+msgstr "-N, --new-file                  tretira odsutne datoteke kao prazne"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
+"    --unidirectional-new-file   tretira samo datoteke odsutne\n"
+"                                  u prvom direktoriju kao prazne"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
-"    --ignore-file-name-case     zanemari veličinu slova pri uspoređivanju "
-"imena datoteka"
+"    --ignore-file-name-case     ignorira veličinu slova pri\n"
+"                                  uspoređivanju imena datoteka"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
-"    --no-ignore-file-name-case  ne zanemaruj veličinu slova pri "
-"uspoređivanju imena datoteka"
+"    --no-ignore-file-name-case  ne ignorira veličinu slova\n"
+"                                  pri uspoređivanju imena datoteka"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
-msgstr ""
+msgstr "-x, --exclude=UZORAK            izostavi datoteke podudarne s UZORKOM"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
+"-X, --exclude-from=DATOTEKA     izostavi datoteke podudarne s bilo kojim\n"
+"                                  uzorkom u DATOTECI"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
+"-S, --starting-file=DATOTEKA    pri uspoređivanju direktorija\n"
+"                                  započinje s DATOTEKOM"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
 msgstr ""
+"    --from-file=DATOTEKA1       usporedi DATOTEKU1 sa svim argumentima;\n"
+"                                  DATOTEKA1 može biti direktorij"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
+"    --to-file=DATOTEKA2         usporedi sve argumente s DATOTEKOM2;\n"
+"                                  DATOTEKA2 može biti direktorij"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
+"-i, --ignore-case               ignorira veličinu slova u sadržaju datoteka"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
+"-E, --ignore-tab-expansion      ignorira promjene nastale ekspanzijom "
+"tab(ova)"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
-msgstr ""
+msgstr "-Z, --ignore-trailing-space     ignorira bjeline na kraju retka"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
+"-b, --ignore-space-change       ignorira promjene u količini bijelog prostora"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
-msgstr ""
+msgstr "-w, --ignore-all-space          ignorira sav bijeli prostor"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
+"-B, --ignore-blank-lines        ignorira promjene nastale uklanjanjem\n"
+"                                  praznih redaka"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
+"-I, --ignore-matching-lines=RE  ignorira promjene nastale uklanjanjem "
+"redaka\n"
+"                                  podudarnih s RE (regex)"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
-msgstr ""
-"-a, --text                      postupaj sa svim datotekama kao s tekstualnim"
+msgstr "-a, --text                      tretira sve datoteke kao tekst"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
+"    --strip-trailing-cr         uklanja zaostali znak za Enter (CR) na ulazu"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
-msgstr "    --binary                    čitaj i piši podatke u binarnom načinu"
+msgstr "    --binary                    čita i piše podatke u binarnom načinu"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
+"-D, --ifdef=IME                 pokaže spojenu datoteku s prikazanim\n"
+"                                  razlikama u „#ifdef IME“"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
+"    --GTYPE-group-format=GFMT   ulazne grupe vrste GTYPE formatira s GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
-msgstr ""
+msgstr "    --line-format=LFMT          sve ulazne retke formatira s LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
+"    --LTYPE-line-format=LFMT    ulazne retke vrste LTYPE formatira s LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
+"  Gore navedene opcije formatiranja pružaju dodatne mogućnosti za "
+"oblikovanje\n"
+"    prikaza diff izlaza generaliziranjem opcije -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
+"  LTYPE je jedan od „old“, „new“ ili „unchanged“.\n"
+"  GTYPE je jedan od LTYPE ili „changed“."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -965,16 +984,32 @@ msgid ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
+"  GFMT može sadržavati (samo):\n"
+"    %<  retke iz DATOTEKE1\n"
+"    %>  retke iz DATOTEKE2\n"
+"    %=  jednake (zajedničke) retke DATOTEKE1 i DATOTEKE2\n"
+"    %[-][ŠIRINA][.[PREC]]{doxX}SLOVO  format za SLOVO u stilu printf\n"
+"      Sljedeća SLOVA su za novu grupu; ista, ali mala slova za staru grupu:\n"
+"        F  broj prvog retka\n"
+"        L  broj zadnjeg retka\n"
+"        N  broj redaka = L-F+1\n"
+"        E  F-1\n"
+"        M  L+1\n"
+"    %(A=B?T:E)  ako je A jednako B, onda T, inače E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
 "    %l  contents of line, excluding any trailing newline\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
+"  LFMT može sadržavati (samo):\n"
+"    %L  sadržaj retka\n"
+"    %l  sadržaj retka bez zaostalih newline (znak novog retka)\n"
+"    %[-][ŠIRINA][.[PREC]]{doxX} format broja ulaznog retka u stilu printf"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -982,220 +1017,246 @@ msgid ""
 "    %c'\\OOO'  the character with octal code OOO\n"
 "    C    the character C (other characters represent themselves)"
 msgstr ""
+"  Oba, GFMT i LFMT mogu sadržavati:\n"
+"    %%  %\n"
+"    %c'C'  jedan znak C\n"
+"    %c'\\OOO'  znak u oktalnom kodu OOO\n"
+"    C    znak C (ostali znakovi predstavljaju sami sebe)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
-msgstr ""
+msgstr "-d, --minimal            nastoji naći što manju količinu promjena"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
+"    --horizon-lines=BROJ  zadrži BROJ redaka zajednički prefiksu i sufiksu"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
+"    --speed-large-files  pretpostavlja da su datoteke velike s puno\n"
+"                           malih razbacanih promjena"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
+"    --color[=KAD]        oboji izlaz; KAD može biti 'never', 'always'\n"
+"                           ili 'auto'; samo --color znači --color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
+"    --palette=PALETA     boje koje će se koristiti s --color; PALETA je\n"
+"                           popis terminfo mogućnosti odvojenih dvotočkom"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
-msgstr "    --help               prikaži ovu pomoć i izađi"
+msgstr "    --help               pokaže ovu pomoć"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
-msgstr "-v, --version            ispiši informacije o inačici i izađi"
+msgstr "-v, --version            informacije o inačici ovog programa"
 
-#: src/diff.c:982
-#, fuzzy
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
-"DATOTEKE su â\80\9eDATOTEKA1 DATOTEKA2â\80\9d, â\80\9eDIR1 DIR2â\80\9d, â\80\9eDIR DATOTEKA...â\80\9d ili "
-"„DATOTEKA... DIR”."
+"DATOTEKE su â\80\9eDATOTEKA1 DATOTEKA2â\80\9c ili â\80\9eDIR1 DIR2â\80\9c ili â\80\9eDIR DATOTEKAâ\80\9c ili\n"
+" „DATOTEKA DIR“."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
+"Ako je dano --from-file ili --to-file, onda nema restrikcija na  DATOTEK(U/"
+"E)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
-msgstr "Ako je DATOTEKA â\80\9e\80\9d, Ä\8ditaj standardni ulaz."
+msgstr "Ako je DATOTEKA â\80\9e\80\9c, Ä\8dita standardni ulaz."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
-msgstr "Uporaba: %s [OPCIJA]... DATOTEKE\n"
+msgstr "Uporaba: %s [OPCIJA...] DATOTEKE\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Usporedi DATOTEKE redak po redak."
 
 # Ovdje trebam zamijeniti poredak... Pogledati kako se to radi.
-#: src/diff.c:1032
-#, fuzzy, c-format
+#: src/diff.c:1034
+#, c-format
 msgid "conflicting %s option value '%s'"
-msgstr "konfliktna vrijednost „%s” opcije „%s”"
+msgstr "konfliktna vrijednost „%2$s“ opcije %1$s"
 
 # Notes:
 # Add Note
 #
 # Format:
 # C
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
-msgstr "konfliktne opcije izlaznog stila"
+msgstr "konfliktne opcije za stil izlaza"
 
-#: src/diff.c:1061
-#, fuzzy, c-format
+#: src/diff.c:1063
+#, c-format
 msgid "invalid color '%s'"
-msgstr "neispravna širina „%s”"
+msgstr "nevaljana boja „%s“"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Samo u %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
-msgstr "ne mogu usporediti „-” s direktorijem"
+msgstr "nije moguće usporediti „-“ s direktorijem"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
-msgstr "opcija -D nije podržana s direktorijima"
+msgstr "opcija -D nije podržana za direktorije"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Uobičajeni poddirektoriji: %s i %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
-msgstr "Datoteka %s je %s, a datoteka %s je %s\n"
+msgstr "Datoteka %s je %s dok datoteka %s je %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
-msgstr "Simboličke veze %s i %s se razlikuju\n"
+msgstr "Simboličke poveznice %s i %s se razlikuju\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Datoteke %s i %s su identične\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "nekompatibilne opcije"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
-msgstr "â\80\9e\80\9d je navedeno za više od jedne ulazne datoteke"
+msgstr "â\80\9e\80\9c je navedena za više od jedne ulazne datoteke"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "čitanje nije uspjelo"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
+"-A, --show-all              pokaže sve promjene, konflikte u uglatim "
+"zagradama"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
+"-e, --ed                    generira ed-script koji uključujuje promjene od\n"
+"                                STARADATOTEKE do VAŠADATOTEKE u MOJADATOTEKA"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
-msgstr ""
+msgstr "-E, --show-overlap          kao -e plus konflikte u uglatim zagradama"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
+"-3, --easy-only             kao -e, ali uključi samo promjene koje se\n"
+"                                ne preklapaju"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
+"-x, --overlap-only          kao -e, ali uključi samo promjene koje se\n"
+"                                preklapaju"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
-msgstr ""
+msgstr "-X                          kao -x plus konflikte u uglatim zagradama"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
-msgstr ""
+msgstr "-i                          pripoji naredbe „w“ i „q“ u ed-scripts"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
+"-m, --merge                 prikaže trenutnu spojenu datoteku kao -A ako\n"
+"                                nijedna druga opcija nije dana"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
-msgstr ""
-"-a, --text                  postupaj sa svim datotekama kao s tekstualnim"
+msgstr "-a, --text                  tretira sve datoteke kao tekst"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
+"    --strip-trailing-cr     uklanja zaostali znak za Enter (CR) na ulazu"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
+"-T, --initial-tab           poravna umetanjem tab(ulatora) na početak retka"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
-msgstr ""
+msgstr "    --diff-program=PROGRAM  koristi PROGRAM za uspoređivanja datoteka"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
+"-L, --label=LABEL           koristi LABEL umjesto imena i vremenskog žiga\n"
+"                                datoteke (može se ponavljati)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
-msgstr "    --help                  prikaži ovu pomoć i izađi"
+msgstr "    --help                  pokaže ovu pomoć"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
-msgstr "-v, --version               ispiši informacije o inačici i izađi"
+msgstr "-v, --version               informacije o inačici ovog programa"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
-msgstr ""
+msgstr "Uporaba: %s [OPCIJA...] MOJADATOTEKA STARADATOTEKA VAŠADATOTEKA\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Usporedi tri datoteke redak po redak."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1208,53 +1269,63 @@ msgid ""
 "and output the actual merged file.  For unusual input, this is more\n"
 "robust than using ed.\n"
 msgstr ""
+"\n"
+"Zadani izlazni format je manje-više čitljiv prikaz promjena.\n"
+"\n"
+"Opcije -e, -E, -x, -X (i odgovarajuće duge opcije) generiraju ed-script\n"
+"umjesto standardnog izlaza.\n"
+"\n"
+"Opcija -m (--merge) čini da diff3 obavi interno spajanje, a izlazni "
+"rezultat\n"
+"je spojena datoteka. Za neuobičajeni ulaz to je pouzdanije od korištenja ed-"
+"a.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Izlazno stanje je 0 za uspjeh, 1 za neuspjeh, 2 u slučaju greške."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
-msgstr ""
+msgstr "*interna programska greška*: greška u formatu diff blokova"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff nije uspio: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
-msgstr "interna greška: neispravna diff vrsta u process_diff"
+msgstr "*interna greška*: nevaljana diff vrsta u process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
-msgstr ""
+msgstr "nevaljani diff format: nevaljani graničnik promjena"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
-msgstr "neispravan diff oblik, nepotpun posljednji redak"
+msgstr "nevaljani diff format: nepotpuni posljednji redak"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
-msgstr "podreÄ\91eni program â\80\9e%sâ\80\9d se ne može pozvati"
+msgstr "podreÄ\91eni program â\80\9e%sâ\80\9c nije (bilo) moguÄ\87e pozvati"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
-msgstr ""
+msgstr "nevaljani diff format: nevaljani znakovi na početku retka"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
-msgstr ""
+msgstr "*interna greška*:nevaljana diff vrsta je proslijeđena na izlaz"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "ulazna datoteka se smanjila"
 
 #: src/dir.c:156
 #, c-format
 msgid "cannot compare file names '%s' and '%s'"
-msgstr "ne mogu usporediti imena datoteka „%s” i „%s”"
+msgstr "nije moguće usporediti imena datoteka „%s“ i „%s“"
 
 #: src/dir.c:225
 #, c-format
@@ -1262,116 +1333,132 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekurzivna petlja direktorija"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
+"-o, --output=DATOTEKA        interaktivni rad; rezultat se sprema u DATOTEKU"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
-msgstr ""
+msgstr "-i, --ignore-case            ignorira veličinu slova"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
+"-E, --ignore-tab-expansion   ignorira promjene nastale ekspanzijom tab(ova)"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
-msgstr ""
+msgstr "-Z, --ignore-trailing-space  ignorira bjeline na kraju retka"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
+"-b, --ignore-space-change    ignorira promjene u količini bijelog prostora"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
-msgstr ""
+msgstr "-W, --ignore-all-space       ignorira sav bijeli prostor"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
+"-B, --ignore-blank-lines     ignorira promjene nastale uklanjanjem\n"
+"                                 praznih redaka"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
+"-I, --ignore-matching-lines=RE  ignorira promjene nastale uklanjanjem "
+"redaka\n"
+"                                    podudarnih s RE (regex)"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
+"    --strip-trailing-cr      uklanja zaostali znak za Enter (CR) na ulazu"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
-msgstr ""
-"-a, --text                   postupaj sa svim datotekama kao s tekstualnim"
+msgstr "-a, --text                   tretira sve datoteke kao tekst"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
+"-w, --width=NUM              ispiše ne više od BROJ (zadano 130)\n"
+"                                 znakova po retku"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
+"-l, --left-column            pokaže samo lijevi stupac kad su redci jednaki"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
-msgstr ""
+msgstr "-s, --suppress-common-lines  ne prikazuje jednake retke"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
-msgstr "-t, --expand-tabs            pretvori tabulatore u praznine u izlazu"
+msgstr "-t, --expand-tabs            na izlazu proširi tab(ulatore) u razmake"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
-msgstr ""
+msgstr "    --tabsize=NUM            tabulacija svakih BROJ (zadano 8) stupaca"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
-msgstr ""
+msgstr "-d, --minimal                nastoji naći što manju količinu promjena"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
+"-H, --speed-large-files      pretpostavlja da su datoteke velike s puno "
+"malih\n"
+"                                 razbacanih promjena"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
-msgstr ""
+msgstr "    --diff-program=PROGRAM   koristi PROGRAM za uspoređivanja datoteka"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
-msgstr "    --help                   prikaži ovu pomoć i izađi"
+msgstr "    --help                   pokaže ovu pomoć"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
-msgstr "-v, --version                ispiši informacije o inačici i izađi"
+msgstr "-v, --version                informacije o inačici ovog programa"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
-msgstr "Uporaba: %s [OPCIJA]... DATOTEKA1 DATOTEKA2\n"
+msgstr "Uporaba: %s [OPCIJA...] DATOTEKA1 DATOTEKA2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr ""
+"Interaktivno usporedi DATOTEKU1 s DATOTEKOM2, pokaže ih jednu pored druge\n"
+"s razlikama između njih."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
-msgstr "ne mogu interaktivno spojiti standardni ulaz"
+msgstr "nije moguće interaktivno spojiti standardni ulaz"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "obje datoteke za usporedbu su direktoriji"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1384,29 +1471,41 @@ msgid ""
 "v:\tVerbosely include common lines.\n"
 "q:\tQuit.\n"
 msgstr ""
+"ed:       Uređivanje — koristite obje verzije sa zaglavljima.\n"
+"eb:       Uređivanje — koristite obje verzije.\n"
+"el or e1: Uređivanje — koristite lijevu verziju.\n"
+"er or e2: Uređivanje — koristite desnu verziju.\n"
+"e:        Odbacite obje verzije, zatim uredite novu verziju.\n"
+"l or 1:   Koristi lijevu verziju.\n"
+"r or 2:   Koristi desnu verziju.\n"
+"s:        Umetne iste (zajedničke) retke, prešutno, bez poruke.\n"
+"v:        Umetne i prikaže iste (zajedničke) retke.\n"
+"q:        Iziđe (napusti ed).\n"
 
 #: src/util.c:662
-#, fuzzy, c-format
+#, c-format
 msgid "unrecognized prefix: %s"
-msgstr "%s: neprepoznata opcija „--%s”\n"
+msgstr "neprepoznati prefiks: %s"
 
 #: src/util.c:692
 #, c-format
 msgid "unparsable value for --palette"
-msgstr ""
+msgstr "nije moguće razabrati vrijednost za --palette"
 
-#, fuzzy
-#~ msgid "                           or 'auto' (the default)"
-#~ msgstr "    --normal                  ispiši normalnu razliku (zadano)"
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "nevaljani %s%s argument „%s“"
 
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s: opcija „--%s” ne dozvoljava argument\n"
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "nevaljani sufiks u %s%s argumentu „%s“"
 
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s: neprepoznata opcija „--%s”\n"
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s argument „%s“ je prevelik"
 
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s: opcija „-W %s” je višeznačna\n"
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Mrežna stranica za %s: <http://www.gnu.org/software/%s/>\n"
+
+#~ msgid "%s: option '--%s' doesn't allow an argument\n"
+#~ msgstr "%s: opcija „--%s” ne dozvoljava argument\n"
 
 #~ msgid "%s: option '-W %s' doesn't allow an argument\n"
 #~ msgstr "%s: opcija „-W %s” ne dozvoljava argument\n"
index ca1b496..23e843f 100644 (file)
Binary files a/po/hu.gmo and b/po/hu.gmo differ
index 96914c9..b5eab39 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,45 +1,45 @@
 # Hungarian traslation for diffutils.
-# Copyright (C) 2002, 2014, 2018 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2014, 2018, 2019 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 #
 # Gábor István <stive@mezobereny.hu>, 2002.
-# Andras Timar <timar@fsf.hu>, 2004.
-# Balázs Úr <urbalazs@gmail.com>, 2014, 2018.
+# András Timár <timar@fsf.hu>, 2004.
+# Balázs Úr <ur.balazs@fsf.hu>, 2014, 2018, 2019.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.5.25\n"
+"Project-Id-Version: diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-01-20 14:43+0100\n"
-"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2019-11-16 18:13+0100\n"
+"Last-Translator: Balázs Úr <ur.balazs@fsf.hu>\n"
 "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
 "Language: hu\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 1.2\n"
+"X-Generator: Lokalize 19.04.3\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "érvénytelen %s argumentum ehhez: %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "nem egyértelmű %s argumentum ehhez: %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Az érvényes argumentumok:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programhiba"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "veremtúlcsordulás"
 
@@ -199,11 +199,11 @@ msgstr "%s: a kapcsoló egy argumentumot igényel -- „%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -275,7 +275,7 @@ msgstr "A reguláris kifejezés túl nagy"
 msgid "Unmatched ) or \\)"
 msgstr "Pár nélküli ) vagy \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Nincs megelőző reguláris kifejezés"
 
@@ -283,41 +283,31 @@ msgstr "Nincs megelőző reguláris kifejezés"
 msgid "memory exhausted"
 msgstr "elfogyott a memória"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "szabványos bemenet"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "szabványos kimenet"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "szabványos hibakimenet"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "ismeretlen adatfolyam"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "%s újranyitása %s móddal meghiúsult"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "érvénytelen %s%s argumentum: „%s”"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s: a(z) „%s” argumentum túl nagy"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -336,37 +326,35 @@ msgstr "Csomagolta: %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
-"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata <http://gnu.org/licenses/"
+"A licenc GPLv3+: a GNU GPL 3. vagy újabb változata <https://gnu.org/licenses/"
 "gpl.html>\n"
 "Ez egy szabad szoftver, terjesztheti és/vagy módosíthatja.\n"
 "NINCS GARANCIA, a törvény által engedélyezett mértékig.\n"
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Írta: %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Írta: %s és %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Írta: %s, %s és %s.\n"
@@ -374,7 +362,7 @@ msgstr "Írta: %s, %s és %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -386,7 +374,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -398,7 +386,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -410,7 +398,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -422,7 +410,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -436,7 +424,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -450,7 +438,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -465,38 +453,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "A hibák a(z) %s címen jelenthetők.\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "A(z) %s hibái a(z) %s címen jelenthetők.\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "A(z) %s honlapja: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "A(z) %s honlapja: <http://www.gnu.org/software/%s/>.\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
-"Általános segítség a GNU szoftverek használatához: <http://www.gnu.org/"
+"Általános segítség a GNU szoftverek használatához: <https://www.gnu.org/"
 "gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "A(z) %s és a(z) %s fájlok különböznek\n"
@@ -506,55 +487,55 @@ msgstr "A(z) %s és a(z) %s fájlok különböznek\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "A(z) %s és a(z) %s bináris fájlok különböznek\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Nincs új sor a fájl végén"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "További információkért próbálja a(z) „%s --help” parancsot."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "érvénytelen --ignore-initial érték: „%s”"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "a -l és a -s kapcsolók összeférhetetlenek"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "az írás sikertelen"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "szabványos kimenet"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          eltérő bájtok kiírása"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=UGRÁS        az első UGRÁS bájt kihagyása mindkét "
 "bemeneten"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -563,38 +544,38 @@ msgstr ""
 "FÁJL2\n"
 "                                      első UGRÁS2 bájtjának kihagyása"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              a bájt számok és az eltérő bájt értékek kiírása"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=KORLÁT         legfeljebb KORLÁT bájt összehasonlítása"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      minden normál kimenet elfojtása"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 ezen súgó megjelenítése és kilépés"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              verzióinformációk kiírása és kilépés"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Használat: %s [KAPCSOLÓ]… FÁJL1 [FÁJL2 [UGRÁS1 [UGRÁS2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Két fájl összehasonlítása bájtról bájtra."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -602,14 +583,14 @@ msgstr ""
 "Az opcionális UGRÁS1 és UGRÁS2 megadja a minden egyes fájl elejéről "
 "kihagyandó bájtok számát (alapértelmezetten nulla)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "A hosszú kapcsolók kötelező argumentumai a rövid kapcsolókhoz is "
 "kötelezőek.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -619,142 +600,142 @@ msgstr ""
 "kB 1000, K 1024, MB 1.000.000, M 1.048.576,\n"
 "GB 1.000.000.000, G 1.073.741.824 és így tovább: T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Ha a FÁJL a „-” vagy hiányzik, akkor a szabványos bemenetről olvas."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "A kilépési állapotkód 0, ha a bemenetek azonosak; 1, ha különbözők; 2, ha\n"
 "hiba történt."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "érvénytelen --bytes érték: „%s”"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "hiányzó operandus a(z) „%s” után"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "extra operandus: „%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s eltér: byte: %s, sor: %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s eltér: byte %s, sor %s %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF ennél: %s, amely üres\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF ennél: %s, %s bájt és %s sor után\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF ennél: %s, %s bájt után a(z) %s. sorban\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF ennél: %s, %s bájt után\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "érvénytelen környezethossz: „%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "a tördelés nem támogatott ezen a gépen"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "túl sok fájlcímke-beállítás"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "érvénytelen szélesség: „%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "ütköző szélességbeállítások"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "érvénytelen munkaszinthossz: „%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "érvénytelen tabulátorméret: „%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "ütköző tabulátorméret beállítások"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "a --from-file és a --to-file is meg van adva"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  egy normál diff kimenet (az alapértelmezett)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   csak akkor jelent, ha a fájlok eltérnek"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  jelentés, ha a két fájl ugyanaz"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
@@ -762,53 +743,53 @@ msgstr ""
 "3)\n"
 "                                sorának kiírása"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U SZÁM, --unified[=SZÁM]  a egységesített környezet SZÁM\n"
 "                                (alapértelmezetten 3) sorának kiírása"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      egy ed parancsfájl kiírása"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     egy RCS formátumú diff kiírása"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            kimenet két oszlopban"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=SZÁM              legfeljebb SZÁM (alapértelmezetten 130)\n"
 "                                nyomtatási oszlop kiírása"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             a közös soroknak csak a bal oszlopának kiírása"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   ne írja ki a közös sorokat"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         jelenítse meg, mely C függvényben van változás"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RK   a legutóbbi RK-ra illeszkedő sor megjelenítése"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -816,25 +797,25 @@ msgstr ""
 "    --label CÍMKE             CÍMKE használata fájlnév és időbélyeg helyett\n"
 "                                (ismételhető)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             tabulátorok bővítése szóközökké a kimeneten"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             beigazítja a tabulátorokat egy tabulátor\n"
 "                                hozzáfűzésével"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=SZÁM            a tabulátor megáll minden SZÁMADIK\n"
 "                                (alapértelmezetten 8) nyomtatási oszlopnál"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -842,62 +823,62 @@ msgstr ""
 "kimeneti\n"
 "                                sorok előtt"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                kimenet átadása a „pr” parancsnak "
 "lapszámozáshoz"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 a talált alkönyvtár rekurzív összehasonlítása"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            ne kövesse a szimbolikus linkeket"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  a hiányzó fájlokat üresként kezelje"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   a hiányzó első fájlokat üresként kezelje"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     kis- és nagybetűk figyelmen kívül hagyása\n"
 "                                  fájlnevek összehasonlításakor"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  kis- és nagybetűk figyelembe vétele\n"
 "                                  fájlnevek összehasonlításakor"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=MINTA             a MINTÁRA illeszkedő fájlok kizárása"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FÁJL         a FÁJLBAN lévő bármely mintára illeszkedő\n"
 "                                  fájlok kizárása"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FÁJL        a FÁJLLAL kezdjen könyvtárak "
 "összehasonlítását"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -905,7 +886,7 @@ msgstr ""
 "    --from-file=FÁJL1           FÁJL1 összehasonlítása minden operandussal;\n"
 "                                  FÁJL1 lehet könyvtár is"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -914,81 +895,81 @@ msgstr ""
 "vel;\n"
 "                                  FÁJL2 lehet könyvtár is"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               kis- és nagybetű eltérések figyelmen kívül\n"
 "                                  hagyása a fájlok tartalmában"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      a tabulátorbővítés miatti változások "
 "mellőzése"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     a sorvégi üres helyek mellőzése"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       üres helyek számában lévő változások "
 "mellőzése"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          minden üres hely mellőzése"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        változások mellőzése, ahol a sorok üresek"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RK  változások mellőzése, ahol minden sor\n"
 "                                  illeszkedik az RK-ra"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      az összes fájl szövegként kezelése"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         a záró kocsi vissza levágása a bemenetről"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    adatok olvasása és írása bináris módon"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NÉV                 egyesített fájlkiírás a „#ifdef NÉV” diffs\n"
 "                                  használatával"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT   a GTYPE bemeneti csoportok formázása GFMT-vel"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          minden bemeneti sor formázása LFMT-vel"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT    az LTYPE bemeneti sorok formázása LFMT-vel"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -996,13 +977,13 @@ msgstr ""
 "  Ezek a formázási lehetőségek részletes vezérlést biztosítanak a diff\n"
 "    kimenetén, általánosítva: -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  Az LTYPE „old”, „new” vagy „unchanged”. A GTYPE értéke LTYPE vagy "
 "„changed”."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1031,7 +1012,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  ha A egyenlő B, akkor T, egyébként E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1044,7 +1025,7 @@ msgstr ""
 "    %[-][SZÉLESSÉG][.[PONTOSSÁG]]{doxX}n  printf-stílusú megadás a bemeneti\n"
 "      sor számához"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1058,33 +1039,34 @@ msgstr ""
 "    %c'\\OOO'  a OOO oktális kódú karakter\n"
 "    C    a C karakter (más karakterek saját magukat ábrázolják)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            igyekszik egy kisebb változási halmazt megtalálni"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=SZÁM  a közös előtag és utótag SZÁM sorának megtartása"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  nagy fájlokat és sok apró kis változást tételez fel"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=MIKOR]      a kimenet színezése; a MIKOR lehet „never” (soha),\n"
 "                           „always” (mindig), vagy „auto” (automatikus)\n"
 "                           (az alapértelmezett)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1094,21 +1076,21 @@ msgstr ""
 "                           a PALETTA a terminfo képességek kettősponttal\n"
 "                           elválasztott listája"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               ezen súgó megjelenítése és kilépés"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            verzióinformációk kiírása és kilépés"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "A FÁJLOK az alábbiak lehetnek „FÁJL1 FÁJL2” vagy „KÖNYVTÁR1 KÖNYVTÁR2” vagy\n"
 "„KÖNYVTÁR FÁJL” vagy „FÁJL KÖNYVTÁR”."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
@@ -1116,93 +1098,93 @@ msgstr ""
 "megszorítások\n"
 "a FÁJLOKRA."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Ha a FÁJL a „-”, akkor a szabványos bemenetről olvas."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Használat: %s [KAPCSOLÓ]… FÁJLOK\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "FÁJLOK összehasonlítása sorról sorra."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "ütköző %s kapcsoló érték: „%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "ütköző kimeneti stílus kapcsolók"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "érvénytelen szín: „%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Csak ebben: %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "a „-” nem hasonlítható össze egy könyvtárral"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "A -D kapcsoló könyvtáraknál nem támogatott"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Közös alkönyvtárak: %s és %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "A(z) %s fájl egy %s, viszont a(z) %s fájl egy %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "A(z) %s és a(z) %s szimbolikus linkek különböznek\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "A(z) %s és a(z) %s fájlok azonosak\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "összeférhetetlen kapcsolók"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "a „-” több mint egy bemeneti fájlhoz lett megadva"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "olvasás sikertelen"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              minden változás kiírása, zárójelbe téve az\n"
 "                              ütközéseket"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1211,12 +1193,12 @@ msgstr ""
 "                                tartalmazza a RÉGIFÁJL és ÖNFÁJLJA "
 "változásait"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          mint a -e, de zárójelbe teszi az ütközéseket"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1224,25 +1206,25 @@ msgstr ""
 "-3, --easy-only             mint a -e, de csak a nem átfedő változásokat\n"
 "                              tartalmazza"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          mint a -e, de csak az átfedő változásokat\n"
 "                              tartalmazza"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          mint a -x, de zárójelbe teszi az ütközéseket"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          „w” és „q” parancsok hozzáfűzése az ed\n"
 "                              parancsfájlokhoz"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1251,26 +1233,26 @@ msgstr ""
 "szerint,\n"
 "                                ha más kapcsoló nincs megadva"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  az összes fájl szövegként kezelése"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     a záró kocsi vissza levágása a bemenetről"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           beigazítja a tabulátorokat egy tabulátor\n"
 "                              hozzáfűzésével"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAM  a PROGRAM használata fájlok összehasonlításához"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1278,24 +1260,24 @@ msgstr ""
 "-L, --label=CÍMKE           CÍMKE használata fájlnév helyett\n"
 "                                (legfeljebb háromszor ismételhető)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  ezen súgó megjelenítése és kilépés"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               verzióinformációk kiírása és kilépés"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Használat: %s [KAPCSOLÓ]… SAJÁTFÁJL RÉGIFÁJL ÖNFÁJLJA\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Három fájl összehasonlítása sorról sorra."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1320,47 +1302,47 @@ msgstr ""
 "belsőleg történő elvégzéséhez, és az aktuális egyesített fájlt írja ki.\n"
 "Szokatlan bemenethez ez sokkal erőteljesebb az ed használatánál.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "A kilépési állapotkód 0, ha sikeres; 1, ha ütközés van; 2, ha hiba történt."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "belső hiba: zűrzavar az összehasonlítási blokkok formátumában"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: összehasonlítás sikertelen: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr ""
 "belső hiba: érvénytelen összehasonlítási típus a process_diff függvényben"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "érvénytelen összehasonlítási formátum; érvénytelen változáselválasztó"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "érvénytelen összehasonlítási formátum; befejezetlen utolsó sor"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "a(z) „%s” kisegítő programot nem sikerült meghívni"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "érvénytelen összehasonlítási formátum; helytelen sor eleji karakterek"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "belső hiba: érvénytelen összehasonlítási típus lett átadva kimenetnek"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "a bementi fájl összement"
 
@@ -1375,131 +1357,131 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekurzív könyvtárhurok"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=FÁJL            interaktív működés, kimenet küldése FÁJLBA"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            a kis- és nagybetűket azonosnak tekinti"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   a tabulátorbővítés miatti változások mellőzése"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  a sorvégi üres helyek mellőzése"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    üres helyek számában lévő változások mellőzése"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       minden üres hely mellőzése"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines     változások mellőzése, ahol a sorok üresek"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RK  változások mellőzése, ahol minden sor\n"
 "                                  illeszkedik az RK-ra"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      a záró kocsi vissza levágása a bemenetről"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   az összes fájl szövegként kezelése"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=SZÁM             legfeljebb SZÁM (alapértelmezetten 130)\n"
 "                               nyomtatási oszlop kiírása"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            a közös soroknak csak a bal oszlopának kiírása"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  ne írja ki a közös sorokat"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            tabulátorok bővítése szóközökké a kimeneten"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=SZÁM           a tabulátor megáll minden SZÁMADIK\n"
 "                               (alapértelmezetten 8) nyomtatási oszlopnál"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                igyekszik egy kisebb változási halmazt "
 "megtalálni"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      nagy fájlokat, sok apró kis változást tételez "
 "fel"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAM   a PROGRAM használata fájlok összehasonlításához"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   ezen súgó megjelenítése és kilépés"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                verzióinformációk kiírása és kilépés"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Használat: %s [KAPCSOLÓ]… FÁJL1 FÁJL2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "A FÁJL1 és FÁJL2 közötti különbségek egymás melletti egyesítése."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "nem sikerült interaktívan egyesíteni a szabványos bemenetet"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "mindkét összehasonlítandó fájl könyvtár"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1532,3 +1514,15 @@ msgstr "azonosítatlan előtag: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr "feldolgozhatatlan érték a --palette kapcsolónál"
+
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "érvénytelen %s%s argumentum: „%s”"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "érvénytelen utótag a(z) %s%s argumentumban: „%s”"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s: a(z) „%s” argumentum túl nagy"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "A(z) %s honlapja: <https://www.gnu.org/software/%s/>.\n"
index effbf20..2d7007e 100644 (file)
Binary files a/po/id.gmo and b/po/id.gmo differ
index 484f09d..cca6a8d 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 3.3-pre1\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2014-08-03 08:00+0700\n"
 "Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
 "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
@@ -18,26 +18,26 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, fuzzy, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumen %s%s tidak valid '%s'"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 #, fuzzy
 msgid "Valid arguments are:"
 msgstr "argumen %s%s tidak valid '%s'"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "kesalahan program"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "overflow stack"
 
@@ -201,11 +201,11 @@ msgstr "%s: pilihan -- '%c' membutuhkan sebuah argumen\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "'"
 
@@ -278,7 +278,7 @@ msgstr "Ekspresi reguler terlalu besar"
 msgid "Unmatched ) or \\)"
 msgstr "Tidak cocok ) atau \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Tidak ada ekspresi reguler sebelumnya"
 
@@ -286,41 +286,31 @@ msgstr "Tidak ada ekspresi reguler sebelumnya"
 msgid "memory exhausted"
 msgstr "kehabisan memori"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "aliran tidak dikenal"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "gagal untuk membuka kembali %s dengan mode %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argumen %s%s tidak valid '%s'"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "akhiran dalam argumen %s%s tidak valid '%s'"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s argumen '%s' terlalu besar"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -339,15 +329,13 @@ msgstr "Dibungkus oleh %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Lisensi GPLv3+: GNU GPL versi 3 atau selanjutnya <http://gnu.org/licenses/"
@@ -358,19 +346,19 @@ msgstr ""
 "berlaku.\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Ditulis oleh %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Ditulis oleh %s dan %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Ditulis oleh %s, %s, dan %s.\n"
@@ -378,7 +366,7 @@ msgstr "Ditulis oleh %s, %s, dan %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -390,7 +378,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -402,7 +390,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -414,7 +402,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -426,7 +414,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -440,7 +428,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -454,7 +442,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -469,37 +457,30 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Laporkan bugs ke: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Laporkan %s bugs ke: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s halaman rumah: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s halaman rumah: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 "Bantuan umum menggunakan perangkat lunak GNU: <http://www.gnu.org/gethelp>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Berkas %s dan %s berbeda\n"
@@ -509,53 +490,53 @@ msgstr "Berkas %s dan %s berbeda\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "File biner %s dan %s berbeda\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Tidak ada baris-baru di akhir dari berkas"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Coba '%s --help' untuk informasi lebih lanjut."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "tidak valid --ignore-initial nilai '%s'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "pilihan -l dan -s tidak kompatibel"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "gagal menulis"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standar keluaran"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b,  --print-bytes  Tampilkan byte yang berbeda."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i,  --ignore-initial=SKIP  Lewati SKIP byte pertama dari masukan."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -564,38 +545,38 @@ msgstr ""
 "byte pertama FILE2.\n"
 "                                      first SKIP2 bytes of FILE2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l,  --verbose  Keluarkan jumlah byte dan nilai semua byte yang berbeda."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n,  --bytes=LIMIT  Bandingkan paling banyak LIMIT byte."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      suppress all normal output"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 display this help and exit"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v,  --version  Tampilkan informasi versi."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Penggunaan: %s [PILIHAN]... BERKAS1 [BERKAS2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Bandingkan dua file byte per byte"
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -603,13 +584,13 @@ msgstr ""
 "SKIP1 dan SKIP2 adalah jumlah byte yang harus dilewati di tiap file.\n"
 "at the beginning of each file (zero by default)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -619,186 +600,186 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, dan seterusnya untuk T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Jika sebuah FILE adalah '-' atau tidak ada, baca input standar"
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Status keluar adalah 0 jika masukan sama, 1 jika berbeda, 2 jika bermasalah."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "nilai --byte tidak valid '%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "tidak ada operand setelah '%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "operand ekstra '%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s berbeda: byte %s, baris %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s berbeda: byte %s, baris %s adalah %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF pada %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s berbeda: byte %s, baris %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s berbeda: byte %s, baris %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF pada %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "panjang context tidak valid '%s'"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "paginasi tidak didukung pada host ini"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "terlalu banyak option label file"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "lebar tidak valid '%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "option lebar konflik"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "panjang horizon tidak valid '%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tabsize tidak valid '%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "option tabsize konflik"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file dan --to-file keduanya disebutkan"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "--normal  Output normal diff."
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q,  --brief  Tampilkan hanya apakah file berbeda."
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s,  --report-identical-files  Laporkan ketika dua file sama."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-w, NUM  --width=NUM  Output paling banyak NUM (baku 130) kolom cetakan."
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e,  --ed  Output adalah script ed."
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n,  --rcs  Output dalam format RCS diff."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            output in two columns"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr "-W,  --width=NUM  Output paling banyak NUM (baku 130) kolom cetakan."
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "  --left-column  Hanya tampilkan kolom kiri baris yang sama."
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "  --suppress-common-lines  Jangan tampilkan baris yang sama."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         show which C function each change is in"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   show the most recent line matching RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 #, fuzzy
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
@@ -807,74 +788,74 @@ msgstr ""
 "    --label LABEL             use LABEL instead of file name\n"
 "                                (can be repeated)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t,  --expand-tabs  Ekspansi tab ke spasi dalam output."
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T,  --initial-tab  Buat tab beraturan dg menambahkan sebuah tab."
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "--tabsize=NUM  Tab stop adalah setiap NUM (default 8) kolom cetakan."
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "--suppress-blank-empty Tekan spasi atau tab sebelum mengeluarkan baris "
 "kosong."
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l,  --paginate  Berikan output ke `pr' untuk di-paginate."
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r,  --recursive  Membandingkan subdirektori secara rekursif."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            don't follow symbolic links"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N,  --new-file  Perlakukan tiada file sebagai kosong."
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "--unidirectional-new-file  Anggap file tidak ada pertama sebagai kosong."
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr "--ignore-file-name-case  Abaikan case saat membandingkan nama file."
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "--no-ignore-file-name-case  Pertimbangkan case saat membandingkan nama file."
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x,  --exclude=PAT  Tanpa file yang cocok dengan PAT."
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X,  --exclude-from=FILE  Abaikan file yang cocok dengan pola dalam FILE"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S,  --starting-file=FILE  Mulai dengan FILE ketika membandingkan direktori."
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -883,7 +864,7 @@ msgstr ""
 "direktori.\n"
 "                                  FILE1 can be a directory"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -892,71 +873,71 @@ msgstr ""
 "direktori.\n"
 "                                  FILE2 can be a directory"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i,  --ignore-case  Abaikan beda case dalam isi file."
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E,  --ignore-tab-expansion  Abaikan perubahan akibat ekspansi tab."
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z,  --ignore-all-space  Abaikan seluruh white space."
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b,  --ignore-space-change  Abaikan perubahan sejumlah white space."
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w,  --ignore-all-space  Abaikan seluruh white space."
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B,  --ignore-blank-lines   Abaikan perubahan baris kosong."
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I,  --ignore-matching-lines=RE  Abaikan perubahan baris yang cocok dg RE."
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a,  --text  Perlakukan seluruh file sebagai teks."
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Hapus trailing carriage return pada input."
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary Baca dan tulis data dalam mode biner."
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D,  --ifdef=NAME  Output file merge untuk tampilkan `#ifdef NAME' diffs."
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "--GTYPE-group-format=GFMT Serupa, tapi format input kelompok GTYPE dg GFMT. "
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "--line-format=LFMT Serupa, tapi format seluruh baris input dg LFMT."
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "--LTYPE-line-format=LFMT Serupa, tapi format baris input LTYPE dg LFMT."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -964,13 +945,13 @@ msgstr ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE adalah 'old', 'new', atau 'unchanged'.  GTYPE adalah LTYPE atau "
 "'changed'."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -999,7 +980,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1011,7 +992,7 @@ msgstr ""
 "    %l  isi baris, tanpa baris baru\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec untuk nomor baris input"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1024,141 +1005,141 @@ msgstr ""
 "    %c'C'  karakter tunggal C\n"
 "    %c'\\OOO'  karakter dengan kode oktal OOO"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d,  --minimal  Usahakan mencari perubahan terkecil."
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "--horizon-lines=NUM Pertahankan NUM baris prefiks dan suffiks umum."
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "  --speed-large-files  Asumsikan file besar dan banyak sebaran perubahan "
 "kecil."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               display this help and exit"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v,  --version  Tampilkan informasi versi."
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FILES adalah 'FILE1 FILE2' atau 'DIR1 DIR2' atau 'DIR FILE...' atau 'FILE... "
 "DIR'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Bila --from-file atau --to-file diberikan, tidak ada batasan untuk FILES."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Jika sebuah file FILE adalah '-', baca standard input."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Penggunaan: %s [OPTION]... FILES\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Bandingkan file baris per baris"
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "Nilai option %s konflik dengan '%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "option gaya output konflik"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "lebar tidak valid '%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Hanya dalam %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "tidak dapat membandingkan '-' dg direktori"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D option tidak didukung dg direktori"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirektori sama: %s dan %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "File %s adalah %s sementara file %s adalah %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Berkas %s dan %s berbeda\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "File %s dan %s identik\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "option tidak kompatibel"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "'-' dispesifikasikan lebih dari satu file input"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "gagal membaca"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr "-A,  --show-all Output seluruh perubahan, konflik dalam tanda kurung."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1166,31 +1147,31 @@ msgstr ""
 "-e  --ed  Output perubahan tanpa dimerge dari OLDFILE ke YOURFILE ke dl "
 "MYFILE."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E,  --show-overlap  Output perubahan unmerge, konflik dl tanda kurung."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "-3,  --easy-only Output unmerged perubahan nonoverlap."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x,  --overlap-only  Tampilkan perubahan yang overlap."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          like -x, but bracket conflicts"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i  Tambah perintah 'w' dan 'q' ke script ed."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1198,23 +1179,23 @@ msgstr ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a,  --text  Perlakukan seluruh file sebagai teks."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Hapus trailing carriage return pada input."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T,  --initial-tab  Buat tab beraturan dg menambahkan sebuah tab."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAM  Gunakan PROGRAM untuk membandingkan file."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1222,24 +1203,24 @@ msgstr ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  display this help and exit"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v,  --version  Tampilkan informasi versi."
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Pemakaian: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Bandingkan tiga file baris per baris."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1263,46 +1244,46 @@ msgstr ""
 "and output the actual merged file.  For unusual input, this is more\n"
 "robust than using ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Status keluaran adalah 0 jika sukses, 1 jika konflik, 2 jika bermasalah."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "kesalahan internal: kacau dalam format blok diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff gagal: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "kesalahan internal: tipe diff tidak valid dalam process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "format diff tidak valid; separator perubahan tidak valid"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "format diff tidak valid; baris akhir tidak lengkap"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "program subsider '%s' tidak dipanggil"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "format diff tidak valid; karakter leading line tidak tepat"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "kesalahan internal: tipe diff tidak valid dimasukkan ke output"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "file input mengecil"
 
@@ -1317,118 +1298,118 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekursif loop direktori"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o,  --output=FILE  Operasi secara interaktif, kirim output ke FILE."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i,  --ignore-case  Abaikan huruf kapital dan huruf kecil."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E,  --ignore-tab-expansion  Abaikan perubahan akibat ekspansi tab."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z,  --ignore-trailling-space  Abaikan seluruh white space."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b,  --ignore-space-change  Abaikan perubahan sejumlah white space."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space  Abaikan seluruh white space."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B,  --ignore-blank-lines   Abaikan perubahan baris kosong."
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I,  --ignore-matching-lines=RE  Abaikan perubahan baris yang cocok dg RE."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "--strip-trailing-cr  Hapus trailing carriage return pada input."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a,  --text  Perlakukan seluruh file sebagai teks."
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr "-w,  --width=NUM  Output paling banyak NUM (baku 130) kolom cetakan."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l,  --left-column  Hanya tampilkan kolom kiri baris yang sama."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s,  --suppress-common-lines  Jangan tampilkan baris yang sama."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t,  --expand-tabs  Ekspansi tab ke spasi dalam output."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "--tabsize=NUM  Tab stop adalah setiap NUM (default 8) kolom cetakan."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d,  --minimal  Usahakan mencari perubahan terkecil."
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H,  --speed-large-files  Asumsikan file besar dan banyak sebaran perubahan "
 "kecil."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAM  Gunakan PROGRAM untuk membandingkan file."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   display this help and exit"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v,  --version  Tampilkan informasi versi."
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Pemakaian: %s [OPTION]... FILE1 FILE2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Merge side-by-side beda file."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "tidak dapat menggabung input standar secara interaktif"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "kedua file yang dibandingkan adalah direktori"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1462,6 +1443,19 @@ msgstr "%s: pilihan '--%s' tidak dikenal\n"
 msgid "unparsable value for --palette"
 msgstr ""
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "argumen %s%s tidak valid '%s'"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "akhiran dalam argumen %s%s tidak valid '%s'"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s argumen '%s' terlalu besar"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s halaman rumah: <http://www.gnu.org/software/%s/>\n"
+
 #, fuzzy
 #~ msgid "                           or 'auto' (the default)"
 #~ msgstr "--normal  Output normal diff."
index f89093d..59ad039 100644 (file)
Binary files a/po/it.gmo and b/po/it.gmo differ
index 76f008a..f9adda8 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 3.5.14\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2017-02-28 09:33+0000\n"
 "Last-Translator: Marco Colombo <m.colombo@ed.ac.uk>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
@@ -17,25 +17,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argomento \"%s\" di %s non valido"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argomento \"%s\" di %s ambiguo"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Argomenti validi sono:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "errore del programma"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "overflow dello stack"
 
@@ -196,11 +196,11 @@ msgstr "%s: l'opzione richiede un argomento -- \"%c\"\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "\""
 
@@ -272,7 +272,7 @@ msgstr "L'espressione regolare è troppo grande"
 msgid "Unmatched ) or \\)"
 msgstr ") o \\) non accoppiata"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Non c'è una espressione regolare precedente"
 
@@ -280,41 +280,31 @@ msgstr "Non c'è una espressione regolare precedente"
 msgid "memory exhausted"
 msgstr "memoria esaurita"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "stream sconosciuto"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "riapertura di %s in modalità %s non riuscita"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argomento \"%3$s\" di %1$s%2$s non valido"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "suffisso \"%3$s\" non valido nell'argomento di %1$s%2$s"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argomento \"%3$s\" di %1$s%2$s troppo grande"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -333,15 +323,13 @@ msgstr "Impacchettato da %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Licenza GPLv3+: GNU GPL versione 3 o successiva <http://gnu.org/licenses/gpl."
@@ -351,19 +339,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Scritto da %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Scritto da %s e %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Scritto da %s, %s, e %s.\n"
@@ -371,7 +359,7 @@ msgstr "Scritto da %s, %s, e %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -383,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -395,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -407,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -419,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -433,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -447,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -462,37 +450,30 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Segnalare i bug a: %s\n"
 "Segnalare gli errori di traduzione a: <tp@lists.linux.it>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Segnalare i bug di %s a: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s home page: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s home page: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr "Aiuto sull'uso di software GNU: <http://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "I file %s e %s sono diversi\n"
@@ -502,55 +483,55 @@ msgstr "I file %s e %s sono diversi\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "I file binari %s e %s sono diversi\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Manca newline alla fine del file"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Usare \"%s --help\" per maggiori informazioni."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "Valore \"%s\" non valido per --ignore-initial"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "le opzioni -l e -s sono incompatibili"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "scrittura non riuscita"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standard output"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes           Stampa i byte differenti"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SKIP   Salta i primi SKIP byte di entrambi gli input"
 
 # Lo strano allineamento è corretto
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -560,7 +541,7 @@ msgstr ""
 "                                SKIP2 byte di FILE2"
 
 # Lo strano allineamento della seconda riga è corretto.
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
@@ -568,33 +549,33 @@ msgstr ""
 "                                differenti"
 
 # Solitamente viene usato NUM quando si vuole specificare un numero.
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=NUM             Confronta al massimo NUM byte"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent       Sopprime tutto l'output normale"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                  Mostra questo aiuto ed esce"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr ""
 "-v, --version               Stampa le informazioni sulla versione ed esce"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Uso: %s [OPZIONE]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Confronta due file byte per byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -602,14 +583,14 @@ msgstr ""
 "I valori opzionali SKIP1 e SKIP2 indicano il numero di byte da saltare\n"
 "all'inizio di ogni file (zero se non indicato)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle "
 "corte.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -620,174 +601,174 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, e così via per T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Se un FILE è \"-\" o è mancante, legge lo standard input."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Il codice d'uscita è 0 se gli input sono identici, 1 se sono differenti, 2 "
 "quando si riscontrano dei problemi."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valore \"%s\" non valido per --bytes"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "operando mancante dopo \"%s\""
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "extra operando \"%s\""
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s differenza: byte %s, riga %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s differenza: byte %s, riga %s è %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF in %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s differenza: byte %s, riga %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s differenza: byte %s, riga %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF in %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "lunghezza di contesto \"%s\" non valida"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "paginazione non supportata su questo host"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "troppe opzioni di etichetta"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "larghezza \"%s\" non valida"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opzioni di larghezza in conflitto"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "lunghezza di orizzonte \"%s\" non valida"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "lunghezza di tabulazione \"%s\" non valida"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opzioni di lunghezza di tabulazione in conflitto"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file e --to-file specificati entrambi"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  Mostra una diff normale (predefinito)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   Segnala solo se i file sono diversi"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  Segnala quando due file sono identici"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   Mostra NUM righe di contesto copiato\n"
 "                                (predefinito 3)"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NUM, --unified[=NUM]   Mostra NUM righe di contesto unificato\n"
 "                                (predefinito 3)"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      Mostra uno script per ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     Mostra una diff in formato RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            Output in due colonne"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NUM               Mostra al massimo NUM colonne (predefinito 130)"
 
 # Lo strano allineamento della seconda riga è corretto.
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
@@ -795,24 +776,24 @@ msgstr ""
 "righe\n"
 "                                in comune"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   Non mostra le righe in comune"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         Mostra in quale funzione C si trova ogni\n"
 "                                differenza"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=ER   Mostra la riga più recente che corrisponde\n"
 "                                all'espressione regolare ER"
 
 # FIXME
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -821,90 +802,90 @@ msgstr ""
 "file\n"
 "                                (può essere ripetuta)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             Espande le tabulazioni in spazi nell'output"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             Allinea le tabulazioni usando una tabulazione"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             Stop di tabulazione ogni NUM colonne\n"
 "                                (predefinito 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    Rimuove spazi e tabulazioni prima di righe\n"
 "                                di output vuote"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                Passa l'output attraverso \"pr\" per "
 "impaginarlo"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive               Confronta ricorsivamente ogni sottodirectory\n"
 "                                incontrata"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            Non segue i collegamenti simbolici"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                Considera i file mancanti come vuoti"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file Considera i file mancanti in prima posizione\n"
 "                                come vuoti"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case   Ignora differenze in maiuscole e minuscole\n"
 "                                confrontando nomi di file"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case Considera differenze in maiuscole e "
 "minuscole\n"
 "                                confrontando nomi di file"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=MODELLO         Esclude i file che corrispondono al MODELLO"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FILE       Esclude i file che corrispondono a qualsiasi\n"
 "                                modello in FILE"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FILE      Comincia da FILE quando si confrontano "
 "directory"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -912,7 +893,7 @@ msgstr ""
 "    --from-file=FILE1         Confronta FILE1 con tutti gli operandi;\n"
 "                                FILE1 può essere una directory"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -920,7 +901,7 @@ msgstr ""
 "    --to-file=FILE2           Confronta tutti gli operandi con FILE2;\n"
 "                                FILE2 può essere una directory"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
@@ -928,47 +909,47 @@ msgstr ""
 "nel\n"
 "                                contenuto del file"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion    Ignora differenze causate dall'espansione\n"
 "                                delle tabulazioni"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space   Ignora gli spazi a fine riga"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change     Ignora differenze nel numero di spazi"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space        Ignora tutti gli spazi"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B, --ignore-blank-lines      Ignora differenze in righe vuote"
 
 # Lo strano allineamento della seconda riga è corretto
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=ER Ignora differenze che corrispondono\n"
 "                                all'espressione regolare ER"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                    Considera tutti i file come testo"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "     --strip-trailing-cr      Elimina i ritorni a capo a fine riga in input"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary  Legge e scrive in modalità binaria"
 
@@ -983,30 +964,30 @@ msgstr "    --binary  Legge e scrive in modalità binaria"
 # #endif /* NOME */
 # Testo comune.
 #
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOME              Mostra le differenze in un unico file usando\n"
 "                                \"#ifdef NOME\""
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT Simile, ma formatta i gruppi di input GTYPE\n"
 "                                con GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT        Formatta tutte le righe di input con LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT  Formatta le righe di input LTYPE con LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1014,12 +995,12 @@ msgstr ""
 "  Queste opzioni di formato forniscono un controllo preciso dell'output di\n"
 "    diff, generalizzando -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE è \"old\", \"new\", o \"unchanged\". GTYPE è LTYPE o \"changed\"."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1049,7 +1030,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  se A è uguale a B allora T, altrimenti E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1062,7 +1043,7 @@ msgstr ""
 "    %[-][LARGHEZZA][.[PREC]]{doxX}n  formato in stile printf del numero\n"
 "                                       di riga di input"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1076,32 +1057,32 @@ msgstr ""
 "    %c'\\OOO'  il carattere con codice ottale OOO\n"
 "    C         il carattere C (altri caratteri rappresentano se stessi)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal               Minimizza il numero di differenze"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=NUM     Mantiene NUM righe di prefisso e suffisso comune"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files     Assume file grandi e tante piccole differenze"
 
-#: src/diff.c:974
+#: src/diff.c:976
 #, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=QUANDO]        Colora l'output; QUANDO può essere \"never\", "
 "\"always\""
 
-#: src/diff.c:976
+#: src/diff.c:978
 #, fuzzy
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
@@ -1112,103 +1093,103 @@ msgstr ""
 "capabilities\n"
 "                                   separati da \":\""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help                  Mostra questo aiuto ed esce"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr ""
 "-v, --version               Stampa le informazioni sulla versione ed esce"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FILES sono \"FILE1 FILE2\" o \"DIR1 DIR2\" o \"DIR FILE\" o \"FILE DIR\"."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Se --from-file o --to-file sono usati, non ci sono restrizioni per FILES."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Se un FILE è \"-\", legge lo standard input."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Uso: %s [OPZIONE]... FILES\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Confronta i file riga per riga."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "conflitto nell'opzione %s: valore \"%s\""
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "opzioni di stile di output in conflitto"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "colore \"%s\" non valido"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Solo in %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "impossibile confrontare \"-\" con una directory"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "opzione -D non supportata con directory"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Sottodirectory in comune: %s e %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "File %s è un %s mentre file %s è un %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "I collegamenti simbolici %s e %s sono diversi\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "I file %s e %s sono identici\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opzioni incompatibili"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "\"-\" specificato per più di un file di input"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lettura fallita"
 
@@ -1227,7 +1208,7 @@ msgstr "lettura fallita"
 # .
 #
 # Lo strano allineamento della seconda riga è corretto.
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              Mostra tutte le differenze, tenendo separati\n"
@@ -1250,7 +1231,7 @@ msgstr ""
 # 'differenze'.
 #
 # Lo strano allineamento della seconda riga è corretto.
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1270,13 +1251,13 @@ msgstr ""
 # <<<<<<< file1
 # .
 #
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          Come -e, tenendo separati i conflitti"
 
 # Questa opzione, per i 3 file considerati, non produce niente.
 #
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1291,24 +1272,24 @@ msgstr ""
 # Questo è il file 3.
 # .
 #
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          Come -e, ma mostra solo i cambiamenti che si\n"
 "                                sovrappongono"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          Come -x, ma tiene separati i conflitti"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          Aggiunge i comandi \"w\" e \"q\" agli script per "
 "ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1316,25 +1297,25 @@ msgstr ""
 "-m, --merge                 Mostra il file combinato risultante, secondo -A\n"
 "                                se non è indicata nessun'altra opzione"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  Considera tutti i file come testo"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     Elimina i ritorni a capo a fine riga in input"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           Allinea le tabulazioni usando una tabulazione"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMMA Usa PROGRAMMA per confrontare i file"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1342,25 +1323,25 @@ msgstr ""
 "-L, --label=ETICHETTA       Usa ETICHETTA invece del nome del file\n"
 "                                (può essere repetuta fino a tre volte)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  Mostra questo aiuto ed esce"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr ""
 "-v, --version               Stampa le informazioni sulla versione ed esce"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Uso: %s [OPZIONE]... MIOFILE VECCHIOFILE TUOFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Confronta tre file riga per riga."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1388,48 +1369,48 @@ msgstr ""
 "robusto\n"
 "di ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Il codice d'uscita è 0 in caso di successo, 1 in caso di conflitto, 2 se "
 "sono\n"
 "stati riscontrati dei problemi."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "errore interno: problema nel formato dei blocchi di diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff fallita: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "errore interno: tipo di diff non valido in process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formato di diff non valido; separatore di modifica non valido"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formato di diff non valido; ultima riga incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "programma accessorio \"%s\" non può essere chiamato"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "formato di diff non valido; caratteri incorretti a inizio riga"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "errore interno: il tipo di diff passato all'output non è valido"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "il file di input è rimpicciolito"
 
@@ -1444,12 +1425,12 @@ msgid "%s: recursive directory loop"
 msgstr "%s: ciclo ricorsivo tra le directory"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
 # Lo strano allineamento della seconda riga è corretto.
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
@@ -1457,122 +1438,122 @@ msgstr ""
 "                                in FILE"
 
 # Questa traduzione corrisponde a quella usata sopra per diff.
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case           Ignora differenze in maiuscole e minuscole"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion  Ignora differenze causate dall'espansione\n"
 "                                delle tabulazioni"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space Ignora gli spazi a fine riga"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change   Ignora differenze nel numero di spazi"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space      Ignora tutti gli spazi"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines    Ignora differenze in righe vuote"
 
 # Lo strano allineamento della seconda riga è corretto
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=ER Ignora differenze che corrispondono\n"
 "                                all'espressione regolare ER"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     Elimina i ritorni a capo a fine riga in input"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                  Considera tutti i file come testo"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NUM             Mostra al massimo NUM colonne (predefinito 130)"
 
 # Lo strano allineamento della seconda riga è corretto.
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column           Mostra solo la colonna di sinistra per le righe\n"
 "                                in comune"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines Non mostra le righe in comune"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs           Espande le tabulazioni in spazi nell'output"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "--tabsize=NUM               Stop di tabulazione ogni NUM colonne\n"
 "                                (predefinito 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal               Minimizza il numero di differenze"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files     Assume file grandi e tante piccole differenze"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAMMA    Usa PROGRAMMA per confrontare i file"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                  Mostra questo aiuto ed esce"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr ""
 "-v, --version               Stampa le informazioni sulla versione ed esce"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Uso: %s [OPZIONE]... FILE1 FILE2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Mostra le differenze tra FILE1 e FILE2 fianco a fianco."
 
 # Tobia Conforto: impossibile combinare in modo interattivo da standard input
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "impossibile combinare in modo interattivo con lo standard input"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "entrambi i file da confrontare sono directory"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1606,6 +1587,19 @@ msgstr "prefisso non riconosciuto: %s"
 msgid "unparsable value for --palette"
 msgstr "valore di --palette non comprensibile"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "argomento \"%3$s\" di %1$s%2$s non valido"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "suffisso \"%3$s\" non valido nell'argomento di %1$s%2$s"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "argomento \"%3$s\" di %1$s%2$s troppo grande"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s home page: <http://www.gnu.org/software/%s/>\n"
+
 #~ msgid "                           or 'auto' (the default)"
 #~ msgstr "                               oppure \"auto\" (predefinito)"
 
index 5c0d6e4..6d010a8 100644 (file)
Binary files a/po/ja.gmo and b/po/ja.gmo differ
index 59fd542..2b39b4e 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -12,7 +12,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GNU diffutils 3.2\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2011-09-08 14:13+0900\n"
 "Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
 "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -23,26 +23,26 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, fuzzy, c-format
 msgid "invalid argument %s for %s"
 msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 #, fuzzy
 msgid "Valid arguments are:"
 msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "プログラムエラー"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "スタックオーバーフロー"
 
@@ -206,11 +206,11 @@ msgstr "%s: オプションには引数が必要です -- '%c'\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "'"
 
@@ -283,7 +283,7 @@ msgstr "正規表現が大きすぎます"
 msgid "Unmatched ) or \\)"
 msgstr ") または \\) が不一致です"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "以前に正規表現がありません"
 
@@ -291,41 +291,31 @@ msgstr "以前に正規表現がありません"
 msgid "memory exhausted"
 msgstr "メモリを使い果たしました"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "標準入力"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "標準出力"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "標準エラー出力"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "不明なストリーム"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "%s をモード %s で再度開くことに失敗しました"
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
-
-#: lib/xstrtol-error.c:68
-#, fuzzy, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "引数 `%3$s' に対して無効な接尾辞 %1$s%2$s です"
-
-#: lib/xstrtol-error.c:72
-#, fuzzy, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "引数 `%3$s' に対する %1$s%2$s が大きすぎます"
+#: lib/xstdopen.c:34
+#, c-format
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -344,15 +334,13 @@ msgstr "パッケージ作成者: %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "ライセンス GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
@@ -362,19 +350,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "作者 %s。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "作者 %s および %s。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "作者 %s、 %s、および %s。\n"
@@ -382,7 +370,7 @@ msgstr "作者 %s、 %s、および %s。\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -394,7 +382,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -406,7 +394,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -418,7 +406,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -430,7 +418,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -444,7 +432,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -458,7 +446,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -473,39 +461,32 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "バグを発見したら <%s> に報告して下さい。\n"
 "翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してくださ"
 "い。\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "%s のバグは <%s> に報告してください。\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s のホームページ: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 "GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "ファイル %s と %s は異なります\n"
@@ -515,54 +496,54 @@ msgstr "ファイル %s と %s は異なります\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "バイナリーファイル %s と%s は異なります\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "ファイル末尾に改行がありません"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr "詳しくは`%s --help'を実行してください。"
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "無効な --ignore-initial の値 `%s' です"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "オプション -l と -s は同時に指定できません"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "書き込みに失敗しました"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "標準出力"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          異なるバイトを表示する"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SKIP         両方の入力の先頭 SKIP バイトをスキップする"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -570,37 +551,37 @@ msgstr ""
 "-i, --ignore-initial=SKIP1:SKIP2  FILE1 の先頭 SKIP1 バイトと FILE2 の先頭\n"
 "                                      SKIP2 バイトをスキップする"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l, --verbose              バイト数および異なるバイトの値を出力する"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMIT          最大 LIMIT バイトを比較する"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      通常の表示をすべて抑止する"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 このメッセージを表示して終了する"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              バージョン情報を表示して終了する"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "使用法: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "2つのファイルをバイトごとに比較します。"
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -608,14 +589,14 @@ msgstr ""
 "オプションの SKIP1 と SKIP2 はそれぞれのファイルの先頭からスキップする\n"
 "バイト数を指定します(デフォルトは 0)。"
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "長い形式のオプションで必須の引数は、それに対応する短い形式のオプションでも同"
 "様に必須です。\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -625,192 +606,192 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824。また、 T, P, E, Z, Y も同様です。"
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "FILE が `-' または指定しない場合、標準入力から読み込みます。"
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "終了コードは、入力ファイルが同じ場合は 0、入力ファイルが異なる場合は 1、\n"
 "問題が発生したときは 2 になります。"
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "無効な --bytes の値 `%s' です。"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "`%s' の後に被演算子がありません"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "余分な被演算子 `%s' です。"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s 異なります: バイト %s、行 %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s 異なります: バイト %s、行 %s %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: %s でファイル終端 (EOF) に達しました\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s 異なります: バイト %s、行 %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s 異なります: バイト %s、行 %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: %s でファイル終端 (EOF) に達しました\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "無効な前後の行数 `%s' です"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "このホストではページ割付けをサポートしません"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "ファイル・ラベル・オプションが多すぎます"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "無効な幅 `%s' です"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "幅のオプションが競合しています"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "無効な横幅 `%s' です"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "無効なタブ幅 `%s' です"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "タブ幅のオプションが競合しています"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file および --to-file の両方が指定されています"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  通常の diff を出力する (デフォルト)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   ファイルが異なるかどうかのみ表示する"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  両方のファイルが同一であるかどうかのみ表示する"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   コンテキスト diff 形式で前後 NUM (デフォルト: "
 "3) 行を表示する"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NUM, --unified[=NUM]   ユニファイド diff 形式で前後 NUM (デフォルト: "
 "3) 行を表示する"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      ed スクリプトを出力する"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     RCS 形式の diff を出力する"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            出力を2列にする"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NUM               表示する列を最大 NUM (デフォルト: 130) 列にする"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "    --left-column             共通行は左側の列のみ表示する"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   共通行の出力を抑止する"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         変更がある C 関数を表示する"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   RE に一致する最も近い行を表示する"
 
-#: src/diff.c:905
+#: src/diff.c:907
 #, fuzzy
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
@@ -819,80 +800,80 @@ msgstr ""
 "    --label LABEL             ファイル名の代わりに LABEL を使用する\n"
 "                                (繰り返し指定できます)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             出力時にタブをスペースに展開する"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             タブで始まる行は、前にタブを置いてそろえる"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             タブ幅を NUM (デフォルト: 8) 列に設定する"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    空の出力行の前後ではスペースまたはタブを抑止す"
 "る"
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                ページ割り付けを行うために `pr' を通して出力す"
 "る"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive                 サブディレクトリーを再帰的に比較する"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  存在しないファイルを空ファイルとして扱う"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   存在しない最初のファイルを空ファイルとして扱"
 "う"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr "    --ignore-file-name-case     ファイル名の大文字と小文字を区別しない"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr "    --no-ignore-file-name-case  ファイル名の大文字と小文字を区別する"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=PAT               PAT に一致するファイルを除外する"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FILE         FILE 内のパターンに一致するファイルを除外する"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FILE        ディレクトリーを比較する時に FILE から始める"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -900,7 +881,7 @@ msgstr ""
 "    --from-file=FILE1           すべての被演算子と FILE1 を比較する\n"
 "                                  FILE1 はディレクトリーでもよい"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -908,57 +889,57 @@ msgstr ""
 "    --to-file=FILE2             すべての被演算子を FILE2 を比較する\n"
 "                                  FILE2 はディレクトリーでもよい"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               ファイル内容の比較時に大文字と小文字を区別し"
 "ない"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion      タブ展開によって発生する違いを無視する"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     行末にあるスペースを無視する"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       スペース数により生じる違いを無視する"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          すべてのスペースを無視する"
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        空白類文字だけの行により生じる違いを無視する"
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  RE と一致するすべての行の違いを無視する"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      すべてのファイルをテキストとして扱う"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         入力から CR (キャリッジリターン) を除去する"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    バイナリーモードでデータを読み書きする"
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
@@ -966,19 +947,19 @@ msgstr ""
 "-D, --ifdef=NAME                パッチ適用時に `#ifdef NAME' で併合されるよう"
 "に差分を出力する"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   GTYPE の入力グループを GFMT で整形する"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          すべての入力行を LFMT で整形する"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    LTYPE 入力行を LFMT で整形する"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -987,14 +968,14 @@ msgstr ""
 "に\n"
 "    見えるように制御するために提供されます。"
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE は `old'、`new'、または`unchanged'です。GTYPE は LTYPE または "
 "`changed' です。"
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1022,7 +1003,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  A と B が等しい場合は T、等しくない場合は E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1034,7 +1015,7 @@ msgstr ""
 "    %l  行末にあるすべての種類の改行文字を除いた行の内容\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf 書式の入力行"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1048,144 +1029,144 @@ msgstr ""
 "    %c'\\OOO'  八進数コード OOO\n"
 "    C    文字 C (他の文字も同様に表す)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            差分の大きさが最小となるように違いを検出する"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "    --horizon-lines=NUM  差分の前後にある共通部分を NUM 行保持する"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  巨大なファイルに小さな差分が分散していると仮定する"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               このヘルプを表示して終了する"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            バージョン情報を表示して終了する"
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FILES は `FILE1 FILE2'、`DIR1 DIR2' 、`DIR FILE...'、または `FILE... DIR' で"
 "す。"
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "--from-file または --to-file が与えられた場合、FILE に制限はありません。"
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr "FILE が `-' の場合、標準入力から読み込みます。"
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "使用法: %s [OPTION]... FILES\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "FILES を行ごとに比較します。"
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "%s オプションの値 `%s' が競合しています"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "出力形式オプションが競合しています"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "無効な前後の行数 `%s' です"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "%s のみに存在: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "`-' とディレクトリーは比較できません"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D オプションはディレクトリーにはサポートされません"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "共通のサブディレクトリー: %s と %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "ファイル %s は %s です。一方、ファイル %s は %s です\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "ファイル %s と %s は異なります\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "ファイル %s と %s は同一です\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "同時に指定できないオプションです"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "入力ファイルとして `-' が複数回指定されています"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "読み込みに失敗しました"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              競合をすべて括弧でくくり、変更をすべて出力する"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1194,11 +1175,11 @@ msgstr ""
 "                                スクリプトとして出力する\n"
 "                                "
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          -e と同様だが、競合を括弧でくくる"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1206,23 +1187,23 @@ msgstr ""
 "-3, --easy-only             -e と同様だが、3ファイル競合で無い部分のみ出力す"
 "る"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          -e と同様だが、3ファイル競合の部分のみ出力する"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          -x と同様だが、競合を括弧でくくる"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          ed スクリプトの後に `w' と `q' コマンドを追加する"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1230,23 +1211,23 @@ msgstr ""
 "-m, --merge                 他のオプションを指定していない場合、-A 従って\n"
 "                                実際に併合されたファイルを出力する"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  すべてのファイルをテキストとして扱う"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     入力から末尾のキャリッジリターンを除去する"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab           タブで始まる行は、前にタブを置いてそろえる"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  ファイル比較に PROGRAM を使用する"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1254,24 +1235,24 @@ msgstr ""
 "-L, --label=LABEL           ファイル名の代わりに LABEL を使用する\n"
 "                                (3回まで繰り返し指定できる)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  このヘルプを表示して終了する"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               バージョン情報を表示して終了する"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "3つのファイルを行ごとに比較します。"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1294,47 +1275,47 @@ msgstr ""
 "併合されたファイルを出力します。通常の入力としては、これは ed を使用す\n"
 "るより強固です。\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "終了コードは、成功した場合は 0、競合がある場合は 1、\n"
 "問題が発生したときは 2 になります。"
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "内部エラー: 差分ブロックの形式をうまく処理できませんでした"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff に失敗しました: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "内部エラー: process_diff 内に無効な差分型があります"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "無効な差分形式です。無効な変更区切りです"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "無効な差分形式です。最後の行が不完全です"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "下位プログラム `%s' が起動できません"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "無効な差分形式です。行の先頭文字が誤っています"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "内部エラー: 無効な差分型が出力に渡されました"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "入力ファイルが小さくなりました"
 
@@ -1349,123 +1330,123 @@ msgid "%s: recursive directory loop"
 msgstr "%s: ディレクトリーが再帰的にループしています"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=FILE            対話的に操作し、出力を FILE に送る"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            大文字と小文字を区別しない"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion   タブ展開によって発生する違いを無視する"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  行末にあるスペースを無視する"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    スペース数により生じる違いを無視する"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       すべてのスペースを無視する"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     空白類文字だけの行により生じる違いを無視する"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  RE と一致するすべての行の違いを無視する"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      入力から末尾のキャリッジリターンを除去する"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   すべてのファイルをテキストとして扱う"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NUM              表示する列を最大 NUM (デフォルト: 130) 列にする"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l, --left-column            共通行は左側の列のみ表示する"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  共通行の出力を抑止する"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            出力時にタブをスペースに展開する"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "    --tabsize=NUM            タブ幅を NUM (デフォルト: 8) 列に設定する"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                差分の大きさが最小となるように違いを検出する"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      巨大なファイルに小さな差分が分散していると仮定す"
 "る"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM   ファイル比較に PROGRAM を使用する"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   このヘルプを表示して終了する"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                バージョン情報を表示して終了する"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "使用法: %s [OPTION]... FILE1 FILE2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "FILE1 と FILE2 の差分を2段組で比較しながら併合します。"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "標準出力は対話的に併合できません"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "比較対象は両方ともディレクトリーです"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1500,6 +1481,22 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
+
+#, fuzzy
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "引数 `%3$s' に対して無効な接尾辞 %1$s%2$s です"
+
+#, fuzzy
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "引数 `%3$s' に対する %1$s%2$s が大きすぎます"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
+
+#, fuzzy
 #~ msgid "                           or 'auto' (the default)"
 #~ msgstr "    --normal                  通常の diff を出力する (デフォルト)"
 
index 1e2ef27..c5cf316 100644 (file)
Binary files a/po/lv.gmo and b/po/lv.gmo differ
index 2a5afda..c9b9dd1 100644 (file)
--- a/po/lv.po
+++ b/po/lv.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils-3.3-pre1\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2014-04-20 15:28+0300\n"
 "Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n"
 "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
@@ -21,26 +21,26 @@ msgstr ""
 "2);\n"
 "X-Generator: Lokalize 1.5\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, fuzzy, c-format
 msgid "invalid argument %s for %s"
 msgstr "nederīgs %s%s arguments “%s”"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 #, fuzzy
 msgid "Valid arguments are:"
 msgstr "nederīgs %s%s arguments “%s”"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programmas kļūda"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "steka pārplūšana"
 
@@ -204,11 +204,11 @@ msgstr "%s: opcijai nepieciešams arguments -- “%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -281,7 +281,7 @@ msgstr "Pārāk liela regulārā izteiksme"
 msgid "Unmatched ) or \\)"
 msgstr "Nav atbilstoša ) vai \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Nav iepriekšējas regulārās izteiksmes"
 
@@ -289,41 +289,31 @@ msgstr "Nav iepriekšējas regulārās izteiksmes"
 msgid "memory exhausted"
 msgstr "atmiņa izsmelta"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "nezināma straume"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "neizdevās atkārtoti atvērt %s režīmā %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "nederīgs %s%s arguments “%s”"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "nederīgs piedēklis %s%s argumentā “%s”"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s arguments “%s” ir pārāk liels"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -342,15 +332,13 @@ msgstr "Pakoja %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Licence GPLv3+: GNU GPL versija 3 vai vēlāka <http://gnu.org/licenses/gpl."
@@ -360,19 +348,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Sarakstīja %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Sarakstīja %s un %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Sarakstīja %s, %s un %s\n"
@@ -380,7 +368,7 @@ msgstr "Sarakstīja %s, %s un %s\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -392,7 +380,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -404,7 +392,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -416,7 +404,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -428,7 +416,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -442,7 +430,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -456,7 +444,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -471,38 +459,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Ziņojiet par kļūdām uz: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Ziņojiet %s kļūdas uz: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s mājas lapa: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s mājas lapa: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 "Vispārēja palīdzība, izmantojot GNU programmatūru: <http://www.gnu.org/"
 "gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Datnes %s un %s atšķiras\n"
@@ -512,54 +493,54 @@ msgstr "Datnes %s un %s atšķiras\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binārās datnes %s un %s atšķiras\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Nav jaunu rindu datnes beigās"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Lietojiet “%s --help”, lai uzzinātu vairāk."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "nederīga --ignore-initial vērtība “%s”"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "opcijas -l un -s nav savstarpēji saderīgas"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "rakstīšana neizdevās"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standarta izvade"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          drukāt atšķirīgos baitus"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=IZLAIST      izlaists pirmos IZLAIŽAMOS baitus ievadē"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -568,38 +549,38 @@ msgstr ""
 "baitus\n"
 "                                       un pirmos IZLAIST2 DATNE2 baitus"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              izvadīt baitu numurus un atšķirīgo baitu vērtības"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=ROBEŽA         salīdzināt līdz ROBEŽAs baitiem"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      nomākt visu parasto izvadi"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 parādīt šo palīdzību un iziet"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              izvada informāciju par versiju un iziet"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Izmantošana: %s [OPCIJAS]... DATNE1 [DATNE2 [IZLAIST1 [IZLAIST2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Salīdzināt divas datnes baitu pa baitam."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -607,13 +588,13 @@ msgstr ""
 "Neobligātie IZLAIST1 un IZLAIST2 norāda, cik baitus izlaist\n"
 "katras datnes sākumā (pēc noklusējuma nulle)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Parametri, kas ir obligāti garajām opcijām, ir obligāti arī īsajām opcijām.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -623,191 +604,191 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, un tā tālāk T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Ja DATNEI ir “-” vai tā nav, tad lasīt standarta ievadi."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Izejas status ir 0, ja ievads ir tāds pats, 1, ja tas ir atšķirīgs, 2, ja ir "
 "nepatikšanas."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "nederīga --bytes vērtība “%s”"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "trūkst operands pēc “%s”"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "papildu operands “%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s atšķiras: baits %s, rinda %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s atšķiras: baits %s, rinda %s ir %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF uz %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s atšķiras: baits %s, rinda %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s atšķiras: baits %s, rinda %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF uz %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "nederīgs konteksta garums “%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "lapošana netiek atbalstīta uz šī resursdatora"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "pārāk daudz datnes etiķešu opciju"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "nederīgs platums “%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "konfliktējošas platuma opcijas"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "nederīgs horizontālais garums “%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "nederīgs tabulācijas izmērs “%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "konfliktējošas tabulācijas izmēru opcijas"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file un --to-file abi norādīti"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  izvada parastu diff (noklusējuma)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   ziņot tikai, ja datnes atšķiras"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  ziņot, ja divas datnes ir vienādas"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   izvadīt NUM (noklus. 3) kopētā konteksta rindas"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NUM, --unified[=NUM]   izvadīt NUM (noklus. 3) vienotā konteksta "
 "rindas"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      izvada ed skriptu"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     izvada RCS formāta diff"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            izvade divās kolonnās"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NUM               izvada līdz NUM (noklusējuma 130) drukas "
 "kolonas"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             izvadīt tikai kreiso kolonu no kopējām rindām"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   neizvadīt kopējās rindas"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         rādīt, kurās C funkcijās ir izmaiņas"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   rādīt visnesenāko rindu, kas atbilst RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 #, fuzzy
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
@@ -816,24 +797,24 @@ msgstr ""
 "    --label ETIĶETE           izmantot ETIĶETI nevis datnes nosaukumu\n"
 "                                (var atkārtot)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             pārveidot tabulācijas par atstarpēm izvadē"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             pacelt tabulācijas rindu pirms tabulācijas"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             tabulāciju pietura ik NUM drukas "
 "kolonas                                          (noklusējuma ir 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -841,59 +822,59 @@ msgstr ""
 "tukšām\n"
 "                                izvades rindām."
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate                izlaist izvadi caur “pr”, lai to lapotu"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 rekursīvi salīdzina atrastās "
 "apakšdirektorijas"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            nerādīt simboliskās saites"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  trūkstošas datnes uzskatīt par tukšām"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   trūkstošas pirmās datnes uzskatīt par tukšām"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     ignorēt reģistru, salīdzinot datņu nosaukumus"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  neignorēt reģistru, salīdzinot datņu "
 "nosaukumus"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=ŠABLONS           izslēgt datnes, kuras atbilst ŠABLONAM"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=DATNE        izslēgt datnes, kuras atbilst jebkuram\n"
 "                                  šablonam DATNĒ"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=DATNE       sākt ar DATNI, kad salīdzina direktorijas"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -901,7 +882,7 @@ msgstr ""
 "    --from-file=DATNE1          salīdzina DANTE1 ar visiem operandiem;\n"
 "                                  DATNE1 var būt direktorija"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -909,73 +890,73 @@ msgstr ""
 "    --to-file=FILE2             salīdzina visus operandus ar DANTE2;\n"
 "                                  DATNE2 var būt direktorija"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               ignorē reģistra atšķirības datnes saturā"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      ignorēt izmaiņas dēļ tabulācijas izplešanās"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     ignorēt visas atstarpes rindu beigās"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       ignorēt izmaiņas dēļ atstarpēm"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignorēt visas atstarpes"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B, --ignore-blank-lines        ignorēt izmaiņas tukšajās rindās"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignorēt izmaiņas rindās, kuras sakrīt ar RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      uztvert visas datnes kā teksta datnes"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         noņemt atkārtojošos rakstatgriezi ievadē"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    lasīt un rakstīt datus binārajā režīmā"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOSAUKUMS           izvadīt sapludināto datni ar\n"
 "                                  “#ifdef NOSAUKUMS” diff"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   formatēt GTYPE ievades grupas ar GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          formatēt visas ievades rindas ar LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    formatēt LTYPE ievades rindām ar LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -983,12 +964,12 @@ msgstr ""
 "  Šīs formāta opcijas sniedz detalizētu kontroli pār diff izvadi,\n"
 "    vispārinot -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE ir “old”, “new” vai “unchanged”.  GTYPE ir LTYPE vai “changed”."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1015,7 +996,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1    %(A=B?T:E)  ja A vienāds ar B tad T citādi E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1028,7 +1009,7 @@ msgstr ""
 "    %[-][PLATUMS][.[PREC]]{doxX}n  printf-style specifikācija ievades rindu\n"
 "       numuriem"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1042,142 +1023,142 @@ msgstr ""
 "    %c'\\OOO'  rakstzīmi ar oktālo kodu OOO\n"
 "    C    rakstzīme C (vai citas rakstzīmes, kas attēlo pašas sevi)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            ļoti censties atrast mazāku izmaiņu kopu"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=NUM  uzturēt NUM rindas kopējiem prefiksiem un sufiksiem"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  pieņemt, ka datnes ir lielas ar daudz mazām izmaiņām"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               parādīt šo palīdzību un iziet"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            izvada informāciju par versiju un iziet"
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "DATNES ir “DATNE1 DATNE2” vai “DIREKTORIJA1 DIREKTORIJA2” vai\n"
 "“DIREKTORIJA DATNE...” vai “DATNE... DIREKTORIJA”"
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Ja ir doti --from-file vai --to-file, nav nekādu ierobežojumu uz DATNĒM."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Ja DATNE ir “-”, lasīt standarta ievadi."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Lietošana: %s [OPCIJAS]... DATNES\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Salīdzina DATNES rindu pa rindai."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "konfliktējoša %s opcijas vērtība “%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "konfliktējoša izvades stila opcijas"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "nederīgs platums “%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Tikai iekš %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "nevar salīdzināt “-” ar direktoriju"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D opcija nav atbalstīta ar direktorijām"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Kopējās apakšdirektorijas: %s un %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Datne %s ir %s kamēr datne %s ir %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Simboliskās saites %s un %s atšķiras\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Datnes %s un %s ir identiskas\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "savstarpēji nesaderīgas opcijas"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "“-” norādīts vairāk par vienu ievades datni"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lasīšana neizdevās"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              izvada visas izmaņas, ieliekot iekavās konfliktus"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1185,12 +1166,12 @@ msgstr ""
 "-e, --ed                    izvada ed skirpta iekļautās izmaiņas\n"
 "                            no VECĀSDATNES uz JŪSUDATNI iekš MANUDATNI."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          tāpat kā -e, bet ieliekot iekavās konfliktus"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1198,23 +1179,23 @@ msgstr ""
 "-3, --easy-only             līdzīgs -e, bet iekļauj tikai nepārklājošās "
 "izmaiņas"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          līdzīgs -e, bet iekļauj tikai pārklājošās "
 "izmaiņas"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          līdzīgs -x, bet ieliekot iekavās konfliktus"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          pievieno “w” un “q” komandas ed skriptā"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1222,24 +1203,24 @@ msgstr ""
 "-m, --merge                 izvada pašu sapludināto datni, vadoties pēc -A,\n"
 "                                ja nav dotu citu opciju"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  uztvert visas datnes kā teksta datnes"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     noņemt atkārtojošos rakstatgriezi ievadē"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab           pacelt tabulācijas rindu pirms tabulācijas"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMMA izmantot PROGRAMMU, lai salīdzinātu divas datnes"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1247,24 +1228,24 @@ msgstr ""
 "-L, --label=ETIĶETE         izmantot ETIĶETI nevis datnes nosaukumu\n"
 "                                (var atkārtot)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  parādīt šo palīdzību un iziet"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               izvada informāciju par versiju un iziet"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Izmantošana: %s [OPCIJAS]... MANADATNE VECĀDATNE JŪSUDATNE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Salīdzināt trīs datnes rindiņu pa rindiņai."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1290,47 +1271,47 @@ msgstr ""
 "sapludināto datni. Netipiskām ievadēm, šis ir vēl spēcīgāks paņēmiens, nekā\n"
 "ed izmantošana.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Izejas statuss ir 0, ja tas ir veiksmīgs, 1, ja ir konflikts, 2, ja ir "
 "nepatikšanas."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "iekšējā kļūda: sagāja grīstē diff bloku formāts"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff neizdevās:"
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "iekšējā kļūda: nederīgs diff veids iekš process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "nederīgs diff formāts; nederīgs izmaiņu atdalītājs"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "nederīgs diff formāts; nepilnīga pēdējā rinda"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "nevarēja izsaukt palīgprogrammu “%s”"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "nederīgs diff formāts; nederīgas rindas ievades rakstzīmes"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "iekšējā kļūda: nederīgs uz izvadi padotais diff veids"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "ievades datne saruka"
 
@@ -1345,17 +1326,17 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekursīvs direktorijas cikls"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=DATNE           darboties interaktīvi, izvadot izvadu uz DATNI"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
@@ -1363,110 +1344,110 @@ msgstr ""
 "ir\n"
 "                              viens un tas pats"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ignorēt izmaiņas dēļ tabulācijas izplešanās"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  ignorēt visas atstarpes rindu beigās"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    ignorēt izmaiņas dēļ atstarpēm"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignorēt visas atstarpes"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines     ignorēt izmaiņas tukšajās rindās"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignorēt izmaiņas rindās, kuras sakrīt ar RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     noņemt atkārtojošos rakstatgriezi ievadē"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   uztvert visas datnes kā teksta datnes"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NUM              izvada līdz NUM (noklusējuma 130) drukas kolonas"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            izvadīt tikai kreiso kolonu no kopējām rindām"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  neizvadīt kopējās rindas"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            pārveidot tabulācijas par atstarpēm izvadē"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM            tabulāciju pietura ik NUM drukas "
 "kolonas                                          (noklusējuma ir 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                ļoti censties atrast mazāku izmaiņu kopu"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      pieņemt, ka datnes ir lielas, daudz mazu izmaiņu"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAMMA izmantot PROGRAMMU, lai salīdzinātu divas datnes"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   parādīt šo palīdzību un iziet"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                izvada informāciju par versiju un iziet"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Lietošana: %s [OPCIJAS]... DATNE1 DATNE1\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Sānu-pie-sāna datņu DATNE1 un DATNE2 atšķirību sapludināšana."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "nevar interaktīvi sapludināt standarta ievadi"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "abas salīdzināmās datnes ir direktorijas"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1500,6 +1481,19 @@ msgstr "%s: neatpazīta opcija “--%s”\n"
 msgid "unparsable value for --palette"
 msgstr ""
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "nederīgs %s%s arguments “%s”"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "nederīgs piedēklis %s%s argumentā “%s”"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s arguments “%s” ir pārāk liels"
+
+#, fuzzy
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s mājas lapa: <http://www.gnu.org/software/%s/>\n"
+
 #, fuzzy
 #~ msgid "                           or 'auto' (the default)"
 #~ msgstr "    --normal                  izvada parastu diff (noklusējuma)"
index e8507ee..4088c28 100644 (file)
Binary files a/po/ms.gmo and b/po/ms.gmo differ
index f0465aa..0ab6b65 100644 (file)
--- a/po/ms.po
+++ b/po/ms.po
@@ -1,14 +1,14 @@
 # diffutils Bahasa Melayu (Malay) (ms).
-# Copyright (C) 2003, 2015, 2018 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2015, 2018, 2019, 2020, 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>, 2003, 2015, 2018.
+# Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>, 2003, 2015, 2018, 2019, 2020, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.5.25\n"
+"Project-Id-Version: diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-08-21 21:39+1000\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-06-26 20:09+0800\n"
 "Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@gmail.com>\n"
 "Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
 "Language: ms\n"
@@ -16,27 +16,27 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 2.1.1\n"
+"X-Generator: Poedit 3.0\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "hujah tidak sah %s bagi %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "hujah kabur %s bagi %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Hujah yang sah ialah:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "ralat program"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stack melimpah"
 
@@ -85,9 +85,8 @@ msgid "character special file"
 msgstr "fail khas aksara"
 
 #: lib/file-type.c:72
-#, fuzzy
 msgid "contiguous data"
-msgstr "IDENT: data tidak betul."
+msgstr "data berterusan"
 
 #: lib/file-type.c:75
 msgid "fifo"
@@ -110,25 +109,25 @@ msgstr "fail khas aksara"
 #: lib/file-type.c:87
 #, fuzzy
 msgid "multiplexed file"
-msgstr "Fail Baru"
+msgstr "  Fail: ..."
 
 #: lib/file-type.c:90
-#, fuzzy
 msgid "named file"
-msgstr "FAIL"
+msgstr "fail dinamakan"
 
 #: lib/file-type.c:93
 #, fuzzy
 msgid "network special file"
-msgstr "fail khas aksara"
+msgstr "Rangkaian tidak dapat dicapai."
 
 #: lib/file-type.c:96
+#, fuzzy
 msgid "migrated file with data"
-msgstr ""
+msgstr "fail dipindahkan tanpa data"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr ""
+msgstr "fail dipindahkan tanpa data"
 
 #: lib/file-type.c:102
 msgid "port"
@@ -202,11 +201,11 @@ msgstr "%s: pilihan memerlukan hujah -- '%c'\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "'"
 
@@ -239,9 +238,8 @@ msgid "Invalid back reference"
 msgstr "Rujukan belakang tidak sah"
 
 #: lib/regcomp.c:156
-#, fuzzy
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "( atau \\( tidak sepadan"
+msgstr "[, [^, [:, [., atau [= tidak sepadan"
 
 #: lib/regcomp.c:159
 msgid "Unmatched ( or \\("
@@ -279,7 +277,7 @@ msgstr "Regular expression terlalu besar"
 msgid "Unmatched ) or \\)"
 msgstr ") atau \\) tidak sepadan"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Tiada regular expression terdahulu"
 
@@ -287,52 +285,41 @@ msgstr "Tiada regular expression terdahulu"
 msgid "memory exhausted"
 msgstr "kehabisan memori"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
-#, fuzzy
+#: lib/xfreopen.c:37
 msgid "unknown stream"
-msgstr "<tidak diketahui>"
+msgstr "aliran tidak diketahui"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, fuzzy, c-format
 msgid "failed to reopen %s with mode %s"
-msgstr "mod %s kekal sebagai %04lo (%s)\n"
-
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "hujah tidak sah %s untuk %s"
-
-#: lib/xstrtol-error.c:68
-#, fuzzy, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "hujah tidak sah %s untuk %s"
+msgstr "%s tidak dapat dibuka semula: %s"
 
-#: lib/xstrtol-error.c:72
-#, fuzzy, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s: hujah terlalu panjang untuk %s escape"
+#: lib/xstdopen.c:34
+#, c-format
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, fuzzy, c-format
 msgid "Packaged by %s (%s)\n"
-msgstr "< %s ... %s > ? "
+msgstr "%s: %s.\n"
 
 #: lib/version-etc.c:76
 #, fuzzy, c-format
 msgid "Packaged by %s\n"
-msgstr "< %s ... %s > ? "
+msgstr "%s%s: %.*s (%s)\n"
 
 #. TRANSLATORS: Translate "(C)" to the copyright symbol
 #. (C-in-a-circle), if this symbol is available in the user's
@@ -341,15 +328,13 @@ msgstr "< %s ... %s > ? "
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "Lesen GPLv3+: GNU GPL vesri 3 atau selepasnya <http://gnu.org/licenses/gpl."
 "html>\n"
@@ -358,19 +343,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Ditulis oleh %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Ditulis oleh %s and %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Ditulis oleh %s, %s, and %s.\n"
@@ -378,7 +363,7 @@ msgstr "Ditulis oleh %s, %s, and %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -390,7 +375,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -402,7 +387,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -414,7 +399,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -426,7 +411,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -440,7 +425,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -454,7 +439,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -469,98 +454,89 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, fuzzy, c-format
-msgid ""
+msgid "Report bugs to: %s\n"
+msgstr ""
 "\n"
-"Report bugs to: %s\n"
-msgstr "Lapor pepijat ke %s.\n"
+"Lapor pepijat ke: %s\n"
 
-#: lib/version-etc.c:247
-#, fuzzy, c-format
+#: lib/version-etc.c:251
+#, c-format
 msgid "Report %s bugs to: %s\n"
-msgstr "Lapor pepijat ke %s.\n"
+msgstr "Lapor %s pepijat ke: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, fuzzy, c-format
 msgid "%s home page: <%s>\n"
-msgstr ""
-"// Dijana oleh %s.\n"
-"// Lapor pepijat ke <%s>.\n"
-"// Laman utama: <%s>.\n"
-"\n"
+msgstr "%s laman utama: <%s>.\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Laman web %s: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 "Bantuan umum menggunakan perisian GNU: <http://www.gnu.org/gethelp/>.\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Fail %s dan %s berbeza\n"
 
 #: src/analyze.c:455
-#, fuzzy, c-format
+#, c-format
 msgid "Binary files %s and %s differ\n"
-msgstr "Fail %s dan %s berbeza\n"
+msgstr "Fail binari %s dan %s berbeza\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Tiada baris baru pada penghujung fail"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
-#, fuzzy, c-format
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
+#, c-format
 msgid "Try '%s --help' for more information."
-msgstr "Cuba `%s --help' untuk lebih maklumat.\n"
+msgstr "Cuba '%s --help' untuk maklumat lanjut."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "nilai `%s' --ignore-initial tidak sah"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "pilihan -l dan -s tidak sepadan"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "gagal menulis"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "keluaran piawai"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes  Cetak byte berbeza."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i LANGKAU  --ignore-initial=LANGKAU  Langkau LANGKAU byte pertama masukan."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
@@ -569,41 +545,41 @@ msgstr ""
 "  Langkau LANGKAU1 byte pertama untuk FAIL1 dan LANGKAU2 byte pertama untuk "
 "FAIL2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l  --verbose  Keluarkan nombor byte dan nilai semua byte berbeza."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n HAD  --bytes=HAD  Banding paling banyak HAD byte."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      sekat semua keluaran normal"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 #, fuzzy
 msgid "    --help                 display this help and exit"
-msgstr "  -h, --help                 paparkan bantuan ini kemudian keluar\n"
+msgstr "      --help             paparkan bantuan ini kemudian keluar\n"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
-msgstr "Papar maklumat versi dan keluar"
+msgstr "-v, --version                papar maklumat versi dan keluar"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Penggunaan: %s [PILIHAN]... FAIL1 [FAIL2 [LANGKAU1 [LANGKAU2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Banding dua fail setiap byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
@@ -611,13 +587,13 @@ msgid ""
 msgstr ""
 "LANGKAU1 dan LANGKAU2 adalah jumlah byte untuk dilangkau dalam setiap fail."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Hujah wajib kepada pilihan panjang adalah wajib untuk pilihan pendek juga.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -627,428 +603,376 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, dan seterusnya untuk T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
-msgstr ""
-"\n"
-"Dengan tiada FAIL, atau bila FAIL adalah -, baca input piawai.\n"
+msgstr "Jika FAIL adalah `-' atau tiada, baca masukan piawai."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Status keluar adalah 0 jika masukan adalah sama, 1 jika berbeza, 2 jika "
 "bermasalah."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
-msgstr "bilangan byte tidak sah"
+msgstr "nilai --bytes `%s' tidak sah"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
-msgstr "\t\tTidak Selepas: %s\n"
+msgstr "operan hilang selepas `%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
-msgstr "Ekstra"
+msgstr "operan tambahan `%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s berbeza: byte %s, baris %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s berbeza: byte %s, baris %s adalah %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF pada %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s berbeza: byte %s, baris %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s berbeza: byte %s, baris %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "%s: EOF tidak dijangka selepas membaca %d/%d bins\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
-msgstr "Panjang stride tidak sah"
+msgstr "panjang konteks `%s' tidak sah"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "pagination tidak disokong pada hos ini"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "terlalu banyak pilihan label fail"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
-msgstr "lebar baris tidak sah: %s"
+msgstr "lebar `%s' tidak sah"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "pilihan lebar berkonflik"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
-msgstr "Panjang stride tidak sah"
+msgstr "panjang horizon `%s' tidak sah"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "saiz tab `%s' tidak sah"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "pilihan saiz tab berkonflik"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "--from-file dan --to-file kedua-duanya dinyatakan"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
-msgstr "-s, --quiet, --silent      sekat semua keluaran normal"
+msgstr "--normal  Keluarkan diff normal."
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  Keluaran hanya jika fail berbeza."
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  Lapor apabila dua fail adalah sama."
 
-#: src/diff.c:894
-#, fuzzy
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
-"-c  -C NOM  --context[=NOM]  Keluarkan NOM (default 3) baris konteks yang "
-"disalin.\n"
-"-u  -U NOM  --unified[=NOM]  Keluarkan NOM (default 3) baris konteks "
-"tergabung.\n"
-"  --label LABEL  Guna LABEL selain daripada nama fail.\n"
-"  -p  --show-c-function  Papar fungsi C yang mana dalam setiap perubahan.\n"
-"  -F RE  --show-function-line=RE  Papar baris terbaru sepadan RE."
+"-c, -C NUM, --context[=NUM]   keluarkan NUM (default 3) baris konteks yang "
+"disalin"
 
-#: src/diff.c:895
-#, fuzzy
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
-"-c  -C NOM  --context[=NOM]  Keluarkan NOM (default 3) baris konteks yang "
-"disalin.\n"
-"-u  -U NOM  --unified[=NOM]  Keluarkan NOM (default 3) baris konteks "
-"tergabung.\n"
-"  --label LABEL  Guna LABEL selain daripada nama fail.\n"
-"  -p  --show-c-function  Papar fungsi C yang mana dalam setiap perubahan.\n"
-"  -F RE  --show-function-line=RE  Papar baris terbaru sepadan RE."
+"-u, -U NUM, --unified[=NUM]   keluarkan NUM (default 3) baris konteks "
+"tergabung"
 
-#: src/diff.c:896
-#, fuzzy
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
-msgstr "-e  --ed  Keluarkan skrip ed."
+msgstr "-e, --ed                      keluarkan skrip ed"
 
-#: src/diff.c:897
-#, fuzzy
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n  --rcs  Keluarkan diff format RCS."
+msgstr "-n, --rcs                     keluarkan diff format RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            keluaran dalam dua lajur"
 
-#: src/diff.c:899
-#, fuzzy
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
-"-w NOM  --width=NOM  Keluarkan paling banyak NOM (default 130) lajur cetakan."
+"-W, --width=NUM               keluarkan paling banyak NUM (default 130) "
+"lajur cetakan"
 
-#: src/diff.c:900
-#, fuzzy
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
-msgstr "-l  --left-column  Keluarkan hanya lajur kiri baris yang sama."
+msgstr ""
+"    --left-column             keluarkan hanya lajur kiri baris yang sama"
 
-#: src/diff.c:901
-#, fuzzy
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
-msgstr "-s  --suppress-common-lines  Jangan keluarkan baris sama."
+msgstr "    --suppress-common-lines   jangan keluarkan baris sama"
 
-#: src/diff.c:903
-#, fuzzy
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
-"-c  -C NOM  --context[=NOM]  Keluarkan NOM (default 3) baris konteks yang "
-"disalin.\n"
-"-u  -U NOM  --unified[=NOM]  Keluarkan NOM (default 3) baris konteks "
-"tergabung.\n"
-"  --label LABEL  Guna LABEL selain daripada nama fail.\n"
-"  -p  --show-c-function  Papar fungsi C yang mana dalam setiap perubahan.\n"
-"  -F RE  --show-function-line=RE  Papar baris terbaru sepadan RE."
+"-p, --show-c-function         papar fungsi C yang mana dalam setiap perubahan"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   papar baris paling terkini sepadan RE"
 
-#: src/diff.c:905
-#, fuzzy
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
-msgstr "-L LABEL  --label=LABEL  Guna LABEL selain daripada nama fail."
+msgstr ""
+"    --label LABEL             guna LABEL berbanding nama fail dan capmasa\n"
+"                                (boleh diulang)"
 
-#: src/diff.c:908
-#, fuzzy
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
-msgstr "-t  --expand-tabs  Kembang tab kepada ruang dalam keluaran."
+msgstr "-t, --expand-tabs             kembang tab kepada ruang dalam keluaran"
 
-#: src/diff.c:909
-#, fuzzy
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab  Jadikan tab sebaris dengan menambah awalan tab."
+msgstr ""
+"-T, --initial-tab             jadikan tab sebaris dengan menambah awalan tab"
 
-#: src/diff.c:910
-#, fuzzy
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
-msgstr "--tabsize=NOM  Hentian tab setial NOM (default 8) lajur cetakan."
+msgstr ""
+"    --tabsize=NUM             hentian tab setiap NUM (default 8) lajur "
+"cetakan"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    sekat ruang atau tab sebelum baris keluaran "
 "kosong"
 
-#: src/diff.c:912
-#, fuzzy
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
-msgstr "-l  --paginate  Salur keluaran menerusi `pr' untuk paginate."
+msgstr ""
+"-l, --paginate                salur keluaran menerusi 'pr' untuk paginate"
 
-#: src/diff.c:914
-#, fuzzy
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
-"-r  --recursive  Banding berulang-ulang sebarang subdirektori yang dijumpai."
+"-r, --recursive                 banding berulang-ulang sebarang subdirektori "
+"yang dijumpai"
 
-#: src/diff.c:915
-#, fuzzy
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
-msgstr "Jangan ikut pautan simbolik, tulisemula"
+msgstr "    --no-dereference            jangan ikut pautan simbolik"
 
-#: src/diff.c:916
-#, fuzzy
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
-msgstr "-N  --new-file  Anggap fail tidak wujud sebagai kosong."
+msgstr "-N, --new-file                  anggap fail tidak wujud sebagai kosong"
 
-#: src/diff.c:917
-#, fuzzy
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
-msgstr "--unidirectional-new-file  Anggap fail tidak wujud sebagai kosong."
+msgstr "    --unidirectional-new-file   anggap fail tidak wujud sebagai kosong"
 
-#: src/diff.c:918
-#, fuzzy
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
-msgstr "--ignore-file-name-case  Abai case apabila membanding nama fail."
+msgstr "    --ignore-file-name-case     abai case apabila membanding nama fail"
 
-#: src/diff.c:919
-#, fuzzy
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
-"--no-ignore-file-name-case  Ambil kira case ketika membanding nama fail."
+"    --no-ignore-file-name-case  ambil kira case ketika membanding nama fail"
 
-#: src/diff.c:920
-#, fuzzy
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
-msgstr "-x PAT  --exclude=PAT  Asing fail yang sepadan PAT."
+msgstr "-x, --exclude=PAT               asingkan fail yang sepadan PAT"
 
-#: src/diff.c:921
-#, fuzzy
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
-"-X FAIL  --exclude-from=FAIL  Asing fail yang sepadan sebarang corak dalam "
-"FAIL."
+"-X, --exclude-from=FILE         asingkan fail yang sepadan sebarang corak "
+"dalam FAIL"
 
-#: src/diff.c:922
-#, fuzzy
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
-"-S FAIL  --starting-file=FAIL  Mula dengan FAIL apabila membanding direktori."
+"-S, --starting-file=FILE        mula dengan FAIL apabila membanding direktori"
 
-#: src/diff.c:923
-#, fuzzy
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
 msgstr ""
-"--from-file=FAIL1  Banding FAIL1 kepada semua operan.  FAIL1 boleh jadi "
-"direktori."
+"    --from-file=FILE1           banding FAIL1 kepada semua operan;\n"
+"                                  FAIL1 boleh jadi direktori"
 
-#: src/diff.c:925
-#, fuzzy
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
-"--to-file=FAIL2  Banding semua operan kepada FAIL2.  FAIL2 boleh jadi "
-"direktori."
+"    --to-file=FILE2             banding semua operan ke FAIL2;\n"
+"                                  FAIL2 boleh jadi direktori"
 
-#: src/diff.c:928
-#, fuzzy
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
-msgstr "-i  --ignore-case  Abai perbezaan case dalam kandungan fail."
+msgstr ""
+"-i, --ignore-case               abai perbezaan huruf besar kecil dalam "
+"kandungan fail"
 
-#: src/diff.c:929
-#, fuzzy
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
-msgstr ""
-"-E  --ignore-tab-expansion  Abai perubahan diakibatkan oleh pengembangan tab."
+msgstr "-E, --ignore-tab-expansion      abai perubahan akibat pengembangan tab"
 
-#: src/diff.c:930
-#, fuzzy
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
-msgstr "-w  --ignore-all-space  Abai semua ruang putih."
+msgstr ""
+"-Z, --ignore-trailing-space     abai semua ruang putih pada penghujung baris"
 
-#: src/diff.c:931
-#, fuzzy
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
-msgstr "-b  --ignore-space-change  Abai perubahan dalam jumlah ruang putih."
+msgstr ""
+"-b, --ignore-space-change       abai perubahan dalam jumlah ruang putih"
 
-#: src/diff.c:932
-#, fuzzy
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
-msgstr "-w  --ignore-all-space  Abai semua ruang putih."
+msgstr "-w, --ignore-all-space          abai semua ruang putih"
 
-#: src/diff.c:933
-#, fuzzy
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
-"-B  --ignore-blank-lines  Abai perubahan dimana baris adalah kesemuanya "
-"kosong."
+"-B, --ignore-blank-lines        abai perubahan dimana baris adalah "
+"kesemuanya kosong"
 
-#: src/diff.c:934
-#, fuzzy
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
-"-I RE  --ignore-matching-lines=RE  Abai perubahan dimana baris semua sepadan "
-"RE."
+"-I, --ignore-matching-lines=RE  abai perubahan dimana semua baris sepadan RE"
 
-#: src/diff.c:936
-#, fuzzy
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
-msgstr "-a  --text  Layan semua fail sebagai teks."
+msgstr "-a, --text                      layan semua fail sebagai teks"
 
-#: src/diff.c:937
-#, fuzzy
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
-msgstr "--strip-trailing-cr  Buang enter penghujung pada masukan."
+msgstr "    --strip-trailing-cr         buang enter penghujung pada masukan"
 
-#: src/diff.c:939
-#, fuzzy
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
-msgstr "--binary  Baca dan tulis data dalam mod binari."
+msgstr "    --binary                    baca dan tulis data dalam mod perduaan"
 
-#: src/diff.c:942
-#, fuzzy
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
-"-D NAMA  --ifdef=NAMA  Keluarkan fail tergabung untuk menunjukkan perbezaa "
-"`#ifdef NAMA'."
+"-D, --ifdef=NAME                keluarkan fail tergabung dengan diff '#ifdef "
+"NAME'"
 
-#: src/diff.c:943
-#, fuzzy
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
-"--GTYPE-group-format=GFMT  Hampir sama, tetapi format masukan GTYPE "
-"dikumpulkan dengan GFMT."
+"    --GTYPE-group-format=GFMT   format masukan GTYPE dikumpulkan dengan GFMT"
 
-#: src/diff.c:944
-#, fuzzy
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
-msgstr ""
-"--line-format=LFMT  Hampir sama, tetapi format semua baris masukan dengan "
-"LFMT."
+msgstr "    --line-format=LFMT          format semua baris masukan dengan LFMT"
 
-#: src/diff.c:945
-#, fuzzy
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
-msgstr ""
-"--LTYPE-line-format=LFMT  Hampir sama, tetapi format baris masukan LTYPE "
-"dengan LFMT."
+msgstr "    --LTYPE-line-format=LFMT    format baris masukan LTYPE dengan LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
-#, fuzzy
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
-"  LTYPE adalah `old', `new', atau `unchanged'.  GTYPE adalah LTYPE atau "
-"`changed'."
+"  LTYPE adalah 'old', 'new', atau 'unchanged'.  GTYPE adalah LTYPE atau "
+"'changed'."
 
-#: src/diff.c:949
-#, fuzzy
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1063,7 +987,7 @@ msgid ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
-"  GFMT boleh mengandungi:\n"
+"  GFMT (sahaja) mungkin mengandungi:\n"
 "    %<  baris dari FAIL1\n"
 "    %>  baris dari FAIL2\n"
 "    %=  baris yang sama pada FAIL1 dan FAIL2\n"
@@ -1074,23 +998,22 @@ msgstr ""
 "        L  nombor baris terakhir\n"
 "        N  jumlah baris = L-F+1\n"
 "        E  F-1\n"
-"        M  L+1"
+"        M  L+1\n"
+"    %(A=B?T:E)  jika A sama dengan B maka T selainnya E"
 
-#: src/diff.c:961
-#, fuzzy
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
 "    %l  contents of line, excluding any trailing newline\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
-"  LFMT boleh mengandungi:\n"
+"  LFMT (sahaja) mungkin mengandungi:\n"
 "    %L  kandungan baris\n"
 "    %l  kandungan baris, tidak termasuk baris baru dipenghujung\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  spec gaya-printf untuk nombor baris masukan"
 
-#: src/diff.c:965
-#, fuzzy
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1098,246 +1021,228 @@ msgid ""
 "    %c'\\OOO'  the character with octal code OOO\n"
 "    C    the character C (other characters represent themselves)"
 msgstr ""
-"  Sama ada GFMT atau LFMT boleh mengandungi:\n"
+"  Kedua-dua GFMT atau LFMT mungkin mengandungi:\n"
 "    %%  %\n"
 "    %c'C'  satu aksara C\n"
-"    %c'\\OOO'  aksara dengan kod oktal OOO"
+"    %c'\\OOO'  aksara dengan kod oktal OOO\n"
+"    C    aksara C (aksara lain mewakili diri mereka sendiri)"
 
-#: src/diff.c:971
-#, fuzzy
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
-msgstr "-d  --minimal  Cuba cari dengan tekun set perbezaan yang kecil."
+msgstr ""
+"-d, --minimal            cuba cari dengan tekun set perbezaan yang kecil"
 
-#: src/diff.c:972
-#, fuzzy
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
-msgstr "--horizon-lines=NOM  Pastikan NOM baris prefix dan suffix sama."
+msgstr "    --horizon-lines=NUM  simpan NUM baris prefix dan suffix sama"
 
-#: src/diff.c:973
-#, fuzzy
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
-"--speed-large-files  Anggap fail besar dan banyak perubahan kecil tersebar."
+"    --speed-large-files  anggap fail besar dan banyak perubahan kecil "
+"bertaburan"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
-#, fuzzy
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
-msgstr "  -h, --help                 paparkan bantuan ini kemudian keluar\n"
+msgstr "    --help               paparkan bantuan ini dan keluar"
 
-#: src/diff.c:980
-#, fuzzy
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
-msgstr "Papar maklumat versi dan keluar"
+msgstr "-v, --version            papar maklumat versi dan keluar"
 
-#: src/diff.c:982
-#, fuzzy
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
-"FAIL-FAIL adalah `FAIL1 FAIL2' atau `DIR1 DIR2' atau `DIR FAIL...' atau "
-"`FAIL... DIR'."
+"FAIL-FAIL adalah 'FAIL1 FAIL2' atau 'DIR1 DIR2' atau 'DIR FAIL' atau 'FAIL "
+"DIR'."
 
-#: src/diff.c:983
-#, fuzzy
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
-msgstr "%s: Tak dapat ekstrak -- fail bersambung dari volum lain"
+msgstr "Jika --from-file atau --to-file diberikan, tiada sekatan ke atas FAIL."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
-#, fuzzy
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
-msgstr ""
-"\n"
-"Dengan tiada FAIL, atau bila FAIL adalah -, baca input piawai.\n"
+msgstr "Jika FAIL adalah '-', baca masukan piawai."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Penggunaan: %s [PILIHAN]... FAIL\n"
 
-#: src/diff.c:995
-#, fuzzy
+#: src/diff.c:997
 msgid "Compare FILES line by line."
-msgstr "Banding tiga fail tiap-tiap baris."
+msgstr "Banding FAIL setiap baris."
 
-#: src/diff.c:1032
-#, fuzzy, c-format
+#: src/diff.c:1034
+#, c-format
 msgid "conflicting %s option value '%s'"
-msgstr "keluaran berkonflik kepada fail %s"
+msgstr "nilai pilihan %s bercanggah '%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "pilihan gaya keluaran berkonflik"
 
-#: src/diff.c:1061
-#, fuzzy, c-format
+#: src/diff.c:1063
+#, c-format
 msgid "invalid color '%s'"
-msgstr "Sintaks \"%s\" tidak mempunyai arahan warna"
+msgstr "warna '%s' tidak sah"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Hanya dalam %s: %s\n"
 
-#: src/diff.c:1251
-#, fuzzy
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
-msgstr "tidak dapat menutup direktori `%s'"
+msgstr "tidak dapat membandingkan '-' kepada direktori"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "pilihan -D tidak disokong dengan direktori"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirektori umum: %s dan %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Fail %s adalah %s manakala fail %s adalah %s\n"
 
-#: src/diff.c:1373
-#, fuzzy, c-format
+#: src/diff.c:1375
+#, c-format
 msgid "Symbolic links %s and %s differ\n"
-msgstr "Fail %s dan %s berbeza\n"
+msgstr "Pautan simbolik %s dan %s berbeza\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Fail %s dan %s adalah serupa\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "pilihan tidak sepadan"
 
-#: src/diff3.c:391
-#, fuzzy
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
-msgstr "Amaran: fail sumber %s dinyatakan lebih drpd sekali"
+msgstr "'-' dinyatakan untuk lebih daripada satu fail masukan"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "gagal membaca"
 
-#: src/diff3.c:475
-#, fuzzy
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
-msgstr "-A  --show-all  Keluarkan semua perubahan, kurungkan konflik."
+msgstr ""
+"-A, --show-all              keluarkan semua perubahan, kurungkan konflik"
 
-#: src/diff3.c:477
-#, fuzzy
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
-"-e  --ed  Keluarkan perubahan tidak digabung daripada OLDFILE ke YOURFILE "
-"kedalam MYFILE."
+"-e, --ed                    keluarkan skrip ed menggabungkan perubahan\n"
+"                                daripada OLDFILE ke YOURFILE ke dalam MYFILE"
 
-#: src/diff3.c:479
-#, fuzzy
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
-msgstr ""
-"-E  --show-overlap  Keluarkan perubahan tidak digabung, kurungkan konflik."
+msgstr "-E, --show-overlap          seperti -e, tetapi kurungkan konflik"
 
-#: src/diff3.c:480
-#, fuzzy
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
-"-3  --easy-only  Keluarkan perubahan tidak digabung dan tidak bertindih."
+"-3, --easy-only             seperti -e, tetapi hanya menggabungkan perubahan "
+"tidak bertindih"
 
-#: src/diff3.c:481
-#, fuzzy
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
-msgstr "-x  --overlap-only  Keluarkan perubahan bertindih."
+msgstr ""
+"-x, --overlap-only          seperti -e, tetapi hanya menggabungkan perubahan "
+"bertindih"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
-msgstr ""
+msgstr "-X                          seperti -x, tetapi kurungkan konflik"
 
-#: src/diff3.c:483
-#, fuzzy
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
-msgstr "-i  Tambah arahan `w' dan `q' kepada skrip ed."
+msgstr "-i                          tambah arahan 'w' dan 'q' kepada skrip ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
-#, fuzzy
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
-msgstr "-a  --text  Layan semua fail sebagai teks."
+msgstr "-a, --text                  layan semua fail sebagai teks"
 
-#: src/diff3.c:489
-#, fuzzy
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
-msgstr "--strip-trailing-cr  Buang enter penghujung pada masukan."
+msgstr "    --strip-trailing-cr     buang enter penghujung pada masukan"
 
-#: src/diff3.c:490
-#, fuzzy
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab  Jadikan tab sebaris dengan menambah awalan tab."
+msgstr ""
+"-T, --initial-tab           jadikan tab sebaris dengan menambah awalan tab"
 
-#: src/diff3.c:491
-#, fuzzy
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
-msgstr "--diff-program=PROGRAM  Guna PROGRAM untuk membanding fail."
+msgstr "    --diff-program=PROGRAM  guna PROGRAM untuk membanding fail"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
-#, fuzzy
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
-msgstr "  -h, --help                 paparkan bantuan ini kemudian keluar\n"
+msgstr "    --help                  paparkan bantuan ini dan keluar"
 
-#: src/diff3.c:496
-#, fuzzy
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
-msgstr "Papar maklumat versi dan keluar"
+msgstr "-v, --version                papar maklumat versi dan keluar"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Penggunaan: %s [PILIHAN]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Banding tiga fail tiap-tiap baris."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1351,195 +1256,183 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Status keluar adalah 0 jika berjaya, 1 jika konflik, 2 jika bermasalah."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "ralat dalaman: kerosakan dalam format blok diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff gagal: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "ralat dalaman: jenis diff tidak sah dalam process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "format diff tidak sah; pengasing perbezaan tidak sah"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "format diff tidak sah; baris akhir tidak lengkap"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
-#, fuzzy, c-format
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
+#, c-format
 msgid "subsidiary program '%s' could not be invoked"
-msgstr "program subsidiari '%s' terganggu"
+msgstr "program subsidiari '%s' tidak dapat dilaksanakan"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "format diff tidak sah; aksara awal baris tidak betul"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "ralat dalaman: jenis diff tidak sah diberikan kepada keluaran"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "fail masukan mengecil"
 
 #: src/dir.c:156
-#, fuzzy, c-format
+#, c-format
 msgid "cannot compare file names '%s' and '%s'"
-msgstr "tak boleh banding nama fail %s dan %s"
+msgstr "tidak dapat membandingkan fail bernama '%s' dan '%s'"
 
 #: src/dir.c:225
-#, fuzzy, c-format
+#, c-format
 msgid "%s: recursive directory loop"
-msgstr "tak boleh menindih direktori %s dengan direktori"
+msgstr "%s: gelungan direktori berulang"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
-#, fuzzy
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
-"-o FAIL  --output=FAIL  Operasi secara interaktif, hantar keluaran ke FAIL."
+"-o, --output=FILE            operasi secara interaktif, hantar keluaran ke "
+"FAIL"
 
-#: src/sdiff.c:175
-#, fuzzy
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
-msgstr "-i  --ignore-case  Anggap huruf besar dan kecil sebagai sama."
+msgstr "-i, --ignore-case            anggap huruf besar dan kecil sebagai sama"
 
-#: src/sdiff.c:176
-#, fuzzy
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
-"-E  --ignore-tab-expansion  Abai perubahan diakibatkan oleh pengembangan tab."
+"-E, --ignore-tab-expansion   abai perubahan diakibatkan oleh pengembangan tab"
 
-#: src/sdiff.c:177
-#, fuzzy
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
-msgstr "-w  --ignore-all-space  Abai semua ruang putih."
+msgstr ""
+"-Z, --ignore-trailing-space  abai semua ruang putih pada penghujung baris"
 
-#: src/sdiff.c:178
-#, fuzzy
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
-msgstr "-b  --ignore-space-change  Abai perubahan dalam jumlah ruang putih."
+msgstr "-b, --ignore-space-change    abai perubahan dalam jumlah ruang putih"
 
-#: src/sdiff.c:179
-#, fuzzy
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
-msgstr "-w  --ignore-all-space  Abai semua ruang putih."
+msgstr "-W, --ignore-all-space       abai semua ruang putih"
 
-#: src/sdiff.c:180
-#, fuzzy
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
-"-B  --ignore-blank-lines  Abai perubahan dimana baris adalah kesemuanya "
-"kosong."
+"-B, --ignore-blank-lines     abai perubahan dimana baris adalah kesemuanya "
+"kosong"
 
-#: src/sdiff.c:181
-#, fuzzy
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
-"-I RE  --ignore-matching-lines=RE  Abai perubahan dimana baris semua sepadan "
-"RE."
+"-I, --ignore-matching-lines=RE  abai perubahan dimana baris semua sepadan RE"
 
-#: src/sdiff.c:182
-#, fuzzy
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
-msgstr "--strip-trailing-cr  Buang enter penghujung pada masukan."
+msgstr "    --strip-trailing-cr      buang enter penghujung pada masukan"
 
-#: src/sdiff.c:183
-#, fuzzy
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
-msgstr "-a  --text  Layan semua fail sebagai teks."
+msgstr "-a, --text                   layan semua fail sebagai teks"
 
-#: src/sdiff.c:185
-#, fuzzy
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
-"-w NOM  --width=NOM  Keluarkan paling banyak NOM (default 130) lajur cetakan."
+"-w, --width=NUM              keluarkan paling banyak NUM (default 130) lajur "
+"cetakan"
 
-#: src/sdiff.c:186
-#, fuzzy
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
-msgstr "-l  --left-column  Keluarkan hanya lajur kiri baris yang sama."
+msgstr ""
+"-l, --left-column            keluarkan hanya lajur kiri baris yang sama"
 
-#: src/sdiff.c:187
-#, fuzzy
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
-msgstr "-s  --suppress-common-lines  Jangan keluarkan baris sama."
+msgstr "-s, --suppress-common-lines  jangan keluarkan baris sama"
 
-#: src/sdiff.c:189
-#, fuzzy
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
-msgstr "-t  --expand-tabs  Kembang tab kepada ruang dalam keluaran."
+msgstr "-t, --expand-tabs            kembang tab kepada ruang dalam keluaran"
 
-#: src/sdiff.c:190
-#, fuzzy
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
-msgstr "--tabsize=NOM  Hentian tab setial NOM (default 8) lajur cetakan."
+msgstr ""
+"    --tabsize=NUM            hentian tab setiap NUM (default 8) lajur cetakan"
 
-#: src/sdiff.c:192
-#, fuzzy
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
-msgstr "-d  --minimal  Cuba cari dengan tekun set perbezaan yang kecil."
+msgstr ""
+"-d, --minimal                cuba cari dengan tekun set perbezaan yang kecil"
 
-#: src/sdiff.c:193
-#, fuzzy
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
-"-H  --speed-large-files  Anggap fail besar dan banyak perubahan kecil "
-"tersebar."
+"-H, --speed-large-files      anggap fail besar, banyak perubahan kecil "
+"bertaburan"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM   guna PROGRAM untuk membanding fail"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   paparkan bantuan ini dan keluar"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                papar maklumat versi dan keluar"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Penggunaan: %s [PILIHAN]... FAIL1 FAIL2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Gabung bersebelahan bagi perbezaaan antara FAIL1 dan FAIL2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "tidak dapat menggabung masukan piawai secara interaktif"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "kedua-dua fail yang akan dibanding adalah direktori"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1573,3 +1466,20 @@ msgstr "prefix tidak dikenali: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr ""
+
+#, fuzzy, c-format
+#~| msgid "invalid --bytes value `%s'"
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "hujah tidak sah %s bagi %s"
+
+#, fuzzy, c-format
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "hujah tidak sah %s untuk %s"
+
+#, fuzzy, c-format
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "kod bagi token %s terlalu besar"
+
+#, c-format
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Laman web %s: <https://www.gnu.org/software/%s/>\n"
index d23ed38..c476bc2 100644 (file)
Binary files a/po/nb.gmo and b/po/nb.gmo differ
index 38b3304..d5dddd8 100644 (file)
--- a/po/nb.po
+++ b/po/nb.po
@@ -2,42 +2,43 @@
 # Copyright (C) 2016 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Åka Sikrom <a4@hush.com>, 2017-2018.
+# Johnny A. Solbu <johnny@solbu.net>, 2021
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils-3.6.17\n"
+"Project-Id-Version: diffutils-3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-29 20:49+0100\n"
-"Last-Translator: Åka Sikrom <a4@hush.com>\n"
-"Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 14:10+0200\n"
+"Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n"
+"Language-Team: Norwegian Bokmaal <l10n-no@lister.huftis.org>\n"
 "Language: nb\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.0.6\n"
+"X-Generator: Poedit 2.2.3\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumentet %s er ugyldig for %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumentet %s er flertydig for %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Følgende argumenter kan brukes:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programfeil"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stabel er full"
 
@@ -197,11 +198,11 @@ msgstr "%s: valget -- «%c» krever et argument\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "«"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "»"
 
@@ -273,7 +274,7 @@ msgstr "Regulært uttrykk er for stort"
 msgid "Unmatched ) or \\)"
 msgstr "Ingen treff på «)» eller «\\)»"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Intet tidligere regulært uttrykk"
 
@@ -281,41 +282,31 @@ msgstr "Intet tidligere regulært uttrykk"
 msgid "memory exhausted"
 msgstr "minnet er fullt"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "std.innkanal"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "std.utkanal"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "std.feilkanal"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "ukjent strøm"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "klarte ikke å åpne %s på nytt med modus %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "%s%s-argumentet «%s» er ugyldig"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "ugyldig suffiks i %s%s-argument «%s»"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s-argumentet «%s» er for stort"
+msgid "standard file descriptors"
+msgstr "standard filbeskrivelser"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,36 +325,33 @@ msgstr "Pakket av %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Lisens GPLv3+: GNU GPL versjon 3 eller senere <http://gnu.org/licenses/gpl."
-"html>.\n"
+"Lisens GPLv3+: GNU GPL versjon 3 eller senere <%s>.\n"
 "Dette er fri programvare. Du kan endre og dele den videre.\n"
 "Det stilles INGEN GARANTI, i den grad dette tillates av gjeldende lovverk.\n"
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Skrevet av %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Skrevet av %s og %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Skrevet av %s, %s og %s.\n"
@@ -371,7 +359,7 @@ msgstr "Skrevet av %s, %s og %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -383,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -395,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -407,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -419,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -433,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -447,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -462,37 +450,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Rapporter programfeil til: %s\n"
-"Rapporter oversettelsesfeil til: <i18n-no@lister.ping.uio.no>\n"
+"Rapporter oversettelsesfeil til: <l10n-no@lister.huftis.org>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Rapporter programfeil i %s til: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Nettside for %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Nettside for %s: <http://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Generell hjelp til bruk av GNU-programvare: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Generell hjelp til bruk av GNU-programvare: <http://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Filene %s og %s er ulike\n"
@@ -502,55 +482,55 @@ msgstr "Filene %s og %s er ulike\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binærfilene %s og %s er ulike\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Intet linjeskift i slutten av fila"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Prøv «%s --help» for ytterligere informasjon."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "«%s» er en ugyldig verdi for «--ignore-initial»"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "valgene «-l» og «-s» kan ikke brukes samtidig"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "skriving mislyktes"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standardutdata"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          skriv ut byte som er ulike"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=ANT         hopp over første valgt ANTall byte begge "
 "FILer"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -558,38 +538,38 @@ msgstr ""
 "-i, --ignore-initial=ANT1:ANT2  hopp over første valgt ANT1 byte i FIL1 og\n"
 "                                      ANT2 byte i FIL2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              skriv ut byte-nummer og avvikende byte-verdier"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=ANT          ikke sammenlikn flere enn valgt ANTall byte"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      ikke skriv ut vanlig utdata"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 vis denne hjelpeteksten og avslutt"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              skriv ut versjonsinformasjon og avslutt"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Bruk: %s [VALG] … FIL1 [FIL2 [ANT1 [ANT2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Sammenlikn to filer byte for byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -597,14 +577,14 @@ msgstr ""
 "Du kan hoppe over valgfritt ANT1 og ANT2 byte i begynnelsen\n"
 "av henholdsvis første og andre fil (standard er null)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Argumenter som er obligatoriske for lange valg, er også obligatoriske for "
 "korte valg.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -614,194 +594,194 @@ msgstr ""
 "kB (1000), K (1024), MB (1 000 000), M (1 048 576),\n"
 "GB (1 000 000 000), G (1 073 741 824), og så videre (T, P, E, Z, Y)."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Hvis FIL er tom eller «-», leser programmet standard inndata."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Avsluttende status er 0 hvis inndata er like, 1 hvis ulike og 2 hvis det "
 "oppstår problemer."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "«%s» er en ugyldig verdi for «--bytes»"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "operand mangler etter «%s»"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "ekstra operand «%s»"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s er ulike: byte %s, linje %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s er ulike: byte %s, linje %s er %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF på %s, som er tom\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF på %s etter byte %s, linje %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF på %s etter byte %s, på linje %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF på %s etter byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "«%s» er en ugyldig kontekstlengde"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "sidedeling støttes ikke på denne verten"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "for mange filetikett-valg"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "«%s» er en ugyldig bredde"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "breddevalg i konflikt"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "«%s» er en ugyldig horisontlengde"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "«%s» er en ugyldig tabulatorstørrelse"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "tabulatorvalg i konflikt"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "du har valgt både «--from-file» og «--to-file»"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  skriv ut en normal diff (dette er standard)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   bare rapporter når filer er ulike"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  rapporter når to filer er like"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C ANT, --context[=ANT]   skriv ut valgt ANTall linjer med kopiert "
 "kontekst (standard: 3)"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U ANT, --unified[=ANT]   skriv ut valgt ANTall linjer med sammenslått "
 "kontekst (standard: 3)"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      skriv ut et ed-skript"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     skriv ut diff i RCS-format"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            skriv ut i to kolonner"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=ANT               skriv ut maks valgt ANTall kolonner (standard: "
 "130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             bare skriv ut venstre kolonne med felles linjer"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   ikke skriv ut felles linjer"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         vis hvilken C-funksjon hver endring ligger i"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   vis nyeste linje som samsvarer med RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -810,84 +790,84 @@ msgstr ""
 "tidsstempel\n"
 "                                (dette kan gjentas)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             utvid tabulatorer til mellomrom på utskrift"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             still opp tabulatorer ved å legge til en "
 "tabulator først"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             tabulatorer stopper for hvert valgte "
 "utskriftskolonne-NUMmer (standard: 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    ikke skriv ut mellomrom eller tabulator før "
 "tomme linjer"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate                del utdata i sider via «pr»"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive                 sammenlikn evt. undermapper rekursivt"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            ikke følg symbolske lenker"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  behandle fraværende filer som tomme"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "    --unidirectional-new-file   behandle fraværende førstefil som tom"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     skill mellom store og små bokstaver ved "
 "sammenlikning av filnavn"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  skill mellom store og små bokstaver ved "
 "sammenlikning av filnavn"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=MØN               utelat filer som samsvarer med valgt MØNster"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FIL         utelat filer som samsvarer med mønster(e) i "
 "valgt FIL"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=FIL        begynn med valgt FIL ved sammenlikning av "
 "mapper"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -895,7 +875,7 @@ msgstr ""
 "    --from-file=FIL1           sammenlikn FIL1 med alle operand-er\n"
 "                                  (FIL1 kan være en mappe)"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -903,78 +883,78 @@ msgstr ""
 "    --to-file=FIL2             sammenlikn alle operand-er med FIL2\n"
 "                                  (FIL2 kan være en mappe)"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               ikke skill mellom små og store bokstaver i "
 "fil-innhold"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      ignorer endringer som skyldes tabulator-"
 "utvidelse"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     ignorer blanktegn i slutten av linjer"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       ignorer endringer i antall blanktegn"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignorer alle blanktegn"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        ignorer endringer når alle linjer er tomme"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignorer endringer når alle linjer samsvarer "
 "med RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      behandle filer som tekst"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         fjern etterfølgende linjeskift-tegn fra "
 "inndata"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    les og skriv data i binærmodus"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAVN                skriv ut sammenslått fil med ulikheter i "
 "«#ifdef NAVN»"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   formater GTYPE-inndatagrupper med GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          formater inndatalinjer med LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    formater LTYPE-inndatalinjer med LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -982,13 +962,13 @@ msgstr ""
 "  Disse formatvalgene gjør det mulig å detaljstyre utdata\n"
 "    fra diff, og generaliserer -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE er enten «old», «new» eller «unchanged». GTYPE er enten LTYPE eller "
 "«changed»."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1018,7 +998,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  hvis A er lik B, så T eller E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1031,7 +1011,7 @@ msgstr ""
 "    %[-][BREDDE][.[PREC]]{doxX}n  spesifikasjon av inndata-linjenummer i "
 "printf-stil"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1045,30 +1025,31 @@ msgstr ""
 "    %c'\\OOO'  tegnet med oktalkode OOO\n"
 "    C    tegnet C (andre tegn representerer seg selv)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            prøv hardt å finne en mindre rekke endringer"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ANT  behold valgt ANTall linjer av felles pre- og suffiks"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr "    --speed-large-files  forvent store filer og små, spredte endringer"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=NÅR]         fargelegg utdata. NÅR kan være «never» (aldri),\n"
-"                           «always» eller «auto» (standard)"
+"    --color[=NÅR]         fargelegg utdata. NÅR er «never» (aldri), «always» "
+"eller\n"
+"                           «auto»; kun --color betyr --color=«auto»"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1078,112 +1059,112 @@ msgstr ""
 "                           PALETT er en kolon-delt liste over terminfo-"
 "muligheter"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               vis denne hjelpeteksten og avslutt"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            vis versjonsinformasjon og avslutt"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr "FILER er «FIL1 FIL2», «MAPPE1 MAPPE2», «MAPPE FIL» eller «FIL MAPPE»."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Programmet bruker ingen restriksjoner på FIL(er) hvis «--from-file» eller «--"
 "to-file» er valgt."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Programmet leser fra standard inndata hvis FIL er «-»."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Bruk: %s [VALG] … FILER\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Sammenlikn FILER linje for linje."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "valget %s er i konflikt med verdien «%s»"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "utdata-stilvalg er i konflikt med hverandre"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "«%s» er en ugyldig farge"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Bare i %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "du kan ikke sammenlikne «-» med en mappe"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "valget «-D» støttes ikke for mapper"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Felles undermapper: %s og %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Fila %s er en %s, og fila %s er en %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "De symbolske lenkene %s og %s er ulike\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Filene %s og %s er identiske\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "gjeldende valg kan ikke brukes samtidig"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "«-» er valgt for flere enn én inndatafil"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lesing mislyktes"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              skriv ut alle endringer, med konflikter i "
 "parentes"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1191,12 +1172,12 @@ msgstr ""
 "-e, --ed                    skriv ut ed-skript med endringer\n"
 "                                mellom GAMMELFIL og NYFIL til FIL"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          likner «-e», men viser konflikter i parentes"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1204,24 +1185,24 @@ msgstr ""
 "-3, --easy-only             likner «-e», men tar ikke med endringer som "
 "overlapper hverandre"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          likner «-e», men tar bare med endringer som "
 "overlapper hverandre"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          likner «-x», men viser også konflikter i parentes"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          legg til kommandoene «w» og «q» i ed-skript"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1229,26 +1210,26 @@ msgstr ""
 "-m, --merge                 skriv ut sammenslått fil ihht. «-A»,\n"
 "                                med mindre noe annet er valgt"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  behandle filer som tekst"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     fjern etterfølgende linjeskift-tegn fra inndata"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           still opp tabulatorer på rekke ved å legge til "
 "en ekstra tab foran"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  bruk valgt PROGRAM til å sammenlikne filer"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1256,24 +1237,24 @@ msgstr ""
 "-L, --label=ETIKETT           bruk valgt ETIKETT i stedet for filnavn\n"
 "                                (dette kan gjentas opptil tre ganger)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  vis denne hjelpeteksten og avslutt"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               vis versjonsinformasjon og avslutt"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Usage: %s [VALG] … FIL GAMMELFIL NYFIL\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Sammenlikn tre filer, linje for linje."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1297,47 +1278,47 @@ msgstr ""
 "og skrive ut sammenslått fil. Dette er sikrere for behandling av\n"
 "uvanlig inndata enn å bruke ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Avsluttende status er 0 hvis alt er i orden, 1 ved konflikter og 2 ved "
 "problemer."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "intern feil: rot i diff-blokkformat"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff mislyktes: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "intern feil: ugyldig diff-type i process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "ugyldig diff-format. Ugyldig endringsskilletegn"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "ugyldig diff-format. Siste linje er ufullstendig"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "klarte ikke å starte hjelpeprogrammet «%s»"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "ugyldig diff-format. Feil ledende linjetegn"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "intern feil: ugyldig diff-type sendt til utdata"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "inndata-fila er krympet"
 
@@ -1352,129 +1333,129 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekursiv mappesløyfe"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=FIL            jobb interaktivt, og send utdata til FIL"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            ikke skill mellom store og små bokstaver"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ikke regn tabulator-forskjeller som endringer"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  ignorer blanktegn i slutten av linjer"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    ikke regn ulikt antall blanktegn som endringer"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignorer alle blanktegn"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     ignorer endringer hvis linjer er fullstendig "
 "tomme"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignorer endringer hvis linjer samsvarer med "
 "RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      fjern etterfølgende linjeskift-tegn fra inndata"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   behandle filer som tekst"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=ANT              ikke skriv ut flere enn valgt ANTall kolonner "
 "(standard: 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            bare skriv ut venstre kolonne med felles linjer"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  ikke skriv ut felles linjer"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            utvid tabulatorer til mellomrom i utdata"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM            tabulatorer slutter ved hvert valgte "
 "kolonneNUMmer (standard: 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                prøv hardt å finne små endringer"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      forvent store filer med små, spredte endringer"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROGRAM   bruk valgt PROGRAM til å sammenlikne filer"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   vis denne hjelpeteksten og avslutt"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                vis versjonsinformasjon og avslutt"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Bruk: %s [VALG] … FIL1 FIL2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Sammenslåing av forskjeller mellom FIL1 og FIL2, side ved side."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "du kan ikke slå sammen standard inndata interaktivt"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "begge filer som skal sammenliknes er mapper"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1508,6 +1489,18 @@ msgstr "ukjent prefiks: %s"
 msgid "unparsable value for --palette"
 msgstr "«--palette» har uforståelig verdi"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "%s%s-argumentet «%s» er ugyldig"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "ugyldig suffiks i %s%s-argument «%s»"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s-argumentet «%s» er for stort"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Nettside for %s: <http://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: valget «--%s» tillater ikke argumenter\n"
 
index d90edeb..4284b47 100644 (file)
Binary files a/po/nl.gmo and b/po/nl.gmo differ
index f12ab1c..bac316f 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,17 +1,17 @@
 # Dutch translations for GNU diffutils.
-# Copyright (C) 2018 Free Software Foundation, Inc.
+# Copyright (C) 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 #
 # «We know things, but when they bother us we suddenly forget we knew them.»
 #
-# Benno Schulenberg <benno@vertaalt.nl>, 2007, 2008, 2010, 2011, 2012, 2017, 2018.
+# Benno Schulenberg <benno@vertaalt.nl>, 2007, 2008, 2010, 2011, 2012, 2017, 2018, 2021.
 # Elros Cyriatan <cyriatan@fastmail.fm>, 2004.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils-3.6.17\n"
+"Project-Id-Version: diffutils-3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 14:08+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-22 09:32+0200\n"
 "Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
 "Language-Team: Dutch <vertaling@vrijschrift.org>\n"
 "Language: nl\n"
@@ -21,25 +21,25 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ongeldig argument %s van %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument %s van %s is niet eenduidig"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Geldige argumenten zijn:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programmafout"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stack-overloop"
 
@@ -199,11 +199,11 @@ msgstr "%s: optie vereist een argument -- '%c'\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "‘"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "’"
 
@@ -276,7 +276,7 @@ msgstr "Reguliere expressie is te groot"
 msgid "Unmatched ) or \\)"
 msgstr "Ongepaarde ) of \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Geen eerdere reguliere expressie"
 
@@ -284,41 +284,31 @@ msgstr "Geen eerdere reguliere expressie"
 msgid "memory exhausted"
 msgstr "onvoldoende geheugen beschikbaar"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "standaardinvoer"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "standaarduitvoer"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "standaardfoutuitvoer"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "onbekende gegevensstroom"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "opnieuw openen van '%s' met modus %s is mislukt"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "ongeldig argument '%3$s' van %1$s%2$s"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "ongeldig achtervoegsel in argument '%3$s' van %1$s%2$s"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argument '%3$s' van %1$s%2$s is te groot"
+msgid "standard file descriptors"
+msgstr "standaard bestandsdescriptors"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -337,37 +327,34 @@ msgstr "In pakketvorm gebracht door %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
 "Dit is vrije software: u mag het vrijelijk wijzigen en verder verspreiden.\n"
 "De precieze licentie is GPL-3+: GNU General Public License versie 3 of "
 "later.\n"
-"Zie https://gnu.org/licenses/gpl.html voor de volledige (Engelse) tekst.\n"
+"Zie <%s> voor de volledige (Engelse) tekst.\n"
 "Deze software kent GEEN GARANTIE, voor zover de wet dit toestaat.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Geschreven door %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Geschreven door %s en %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Geschreven door %s, %s en %s.\n"
@@ -375,7 +362,7 @@ msgstr "Geschreven door %s, %s en %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -387,7 +374,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -399,7 +386,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -411,7 +398,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -423,7 +410,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -437,7 +424,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -451,7 +438,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -466,39 +453,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Rapporteer gebreken in het programma aan <%s>;\n"
 "meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 "Rapporteer gebreken in het programma '%s' aan <%s>;\n"
 "meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Webpagina van %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Webpagina van %s: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Algemene hulp bij gebruik van GNU-software: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Algemene hulp bij gebruik van GNU-software: <https://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Bestanden %s en %s zijn verschillend\n"
@@ -508,55 +487,55 @@ msgstr "Bestanden %s en %s zijn verschillend\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binaire bestanden %s en %s zijn verschillend\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Geen regeleindeteken (LF) aan einde van bestand"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Typ '%s --help' voor meer informatie."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "ongeldige waarde '%s' voor '--ignore-initial'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "opties '-l' en '-s' gaan niet samen"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "schrijven is mislukt"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standaarduitvoer"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes        de bytes tonen die verschillen"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=OVERSLAAN    de eerste OVERSLAAN bytes van\n"
 "                                    beide invoeren overslaan"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -564,41 +543,41 @@ msgstr ""
 "-i, --ignore-initial=OVS1:OVS2    de eerste OVS1 bytes van BESTAND1 en de\n"
 "                                    eerste OVS2 bytes van BESTAND2 overslaan"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose            bytenummers en -waarden tonen van bytes die "
 "verschillen"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=AANTAL       maximaal dit AANTAL bytes vergelijken"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent    alle gewone uitvoer onderdrukken"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help               deze hulptekst tonen en stoppen"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version            programmaversie tonen en stoppen"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr ""
 "Gebruik:  %s [OPTIE...] BESTAND1 [BESTAND2 [OVERSLAAN1 [OVERSLAAN2]]]\n"
 "\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Twee bestanden byte-voor-byte vergelijken."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -607,14 +586,14 @@ msgstr ""
 "dat\n"
 "aan het begin van elk bestand moet worden overgeslagen (standaard nul)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "(Een verplicht argument bij een lange optie geldt ook voor de korte vorm.)\n"
 "\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -625,195 +604,195 @@ msgstr ""
 "  kB 1000,  K 1024,  MB 1.000.000,  M 1.048.576,\n"
 "  GB 1.000.000.000,  G 1.073.741.824,  enzovoort voor T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr ""
 "Als een BESTAND ontbreekt of '-' is, wordt er van standaardinvoer gelezen."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "De afsluitwaarde is 0 als de invoeren gelijk zijn, 1 als ze verschillen,\n"
 "en 2 bij problemen."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "ongeldige waarde '%s' voor '--bytes'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "ontbrekend argument na '%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "overtollig argument '%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s verschillen: byte %s, regel %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s verschillen: byte %s, regel %s, is %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: einde-van-bestand in %s dat leeg is\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: einde-van-bestand in %s na byte %s, regel %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: einde-van-bestand in %s na byte %s, in regel %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: einde-van-bestand in %s na byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "ongeldige contextlengte '%s'"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "het in pagina's indelen is op deze computer niet mogelijk"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "te veel bestandslabel-opties"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "ongeldige breedte '%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "conflicterende breedte-opties"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "ongeldige horizonlengte '%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "ongeldige tabgrootte '%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "conflicterende tabgrootte-opties"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "zowel '--from-file' als '--to-file' zijn opgegeven"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal               een gewone diff produceren (standaard)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                alleen aangeven of bestanden verschillen"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files    vermelden of twee bestanden hetzelfde zijn"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C AANTAL, --context[=AANTAL]    dit AANTAL regels (standaard 3) van\n"
 "                                       gekopieerde context tonen"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U AANTAL, --unified[=AANTAL]    dit AANTAL regels (standaard 3) van\n"
 "                                       geünificeerde context tonen"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                   een ed-script produceren"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                  een diff in RCS-opmaak produceren"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side         het resultaat weergeven in twee kolommen"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=AANTAL         maximaal dit AANTAL kolommen tonen (standaard 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column          bij gelijke regels alleen de linkerkolom tonen"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines    de gelijke regels onderdrukken"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function      vermelden in welke C-functie elke wijziging is"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE    recentste regel overeenkomend met RE tonen"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -822,86 +801,86 @@ msgstr ""
 "plus\n"
 "                             tijdsstempel (mag herhaald worden)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs          tabs uitschrijven naar spaties in uitvoer"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab          tabs uitlijnen door invoegen van tab aan het begin"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=AANTAL       tab-stops op elke AANTAL posities (standaard 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    spatie of tab onderdrukken voor lege uitregels"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate             de uitvoer door 'pr' halen om deze in pagina's\n"
 "                             in te delen"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive            recursief elke gevonden submap vergelijken"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference       symbolische koppelingen niet volgen"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file             afwezige bestanden als leeg behandelen"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file    alleen bestanden die afwezig zijn in de\n"
 "                                   eerste map als leeg behandelen"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case    verschil tussen hoofd- en kleine letters "
 "negeren\n"
 "                                 bij vergelijken van bestandsnamen"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case    onderscheid maken tussen hoofd- en kleine\n"
 "                                    letters bij vergelijken van bestandsnamen"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=PATROON      bestanden uitsluiten als ze overeenkomen met "
 "PATROON"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=BESTAND    bestanden uitsluiten die overeenkomen met\n"
 "                                een patroon in BESTAND"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=BESTAND    beginnen met BESTAND bij vergelijken van "
 "mappen"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -909,7 +888,7 @@ msgstr ""
 "    --from-file=BESTAND1    BESTAND1 met alle argumenten vergelijken;\n"
 "                              BESTAND1 mag een map zijn"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -917,88 +896,88 @@ msgstr ""
 "    --to-file=BESTAND2    alle argumenten met BESTAND2 vergelijken;\n"
 "                            BESTAND2 mag een map zijn"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case          verschil tussen hoofd- en kleine letters\n"
 "                             negeren in bestandsinhoud"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion    omzettingen van tabs in spaties negeren"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space   witruimte aan einde van regel negeren"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change     wijzigingen in hoeveelheid witruimte negeren"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space        alle witruimte negeren"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines      wijzigingen waarvan alle regels leeg zijn "
 "negeren"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  wijzigingen waarvan alle regels "
 "overeenkomen\n"
 "                                  met reguliere expressie RE negeren"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                 alle bestanden als tekst behandelen"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr    Enter-tekens (CR's) aan einde van regels weglaten"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary               gegevens in binaire modus lezen en schrijven"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAAM           samengevoegd bestand tonen om verschillen in\n"
 "                             '#ifdef NAAM' te laten zien"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GSOORT-group-format=GOPMAAK    iets dergelijks, maar dan invoergroepen "
 "van\n"
 "                                       soort GSOORT opmaken met GOPMAAK"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LOPMAAK    iets dergelijks, maar dan alle invoerregels "
 "opmaken\n"
 "                               met LOPMAAK"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LSOORT-line-format=LOPMAAK    iets dergelijks, maar dan invoerregels "
 "van\n"
 "                                      soort LSOORT opmaken met LOPMAAK"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1006,13 +985,13 @@ msgstr ""
 "  Deze opmaakopties bieden een fijnafregeling van de uitvoer aan,\n"
 "    een generalisatie van de optie '-d/--ifdef'."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LSOORT is 'old' (oud), 'new' (nieuw), of 'unchanged' (ongewijzigd);\n"
 "    GSOORT is LSOORT of 'changed' (gewijzigd)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1042,7 +1021,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?Z:V)  als A gelijk is aan B, dan Z anders V"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1055,7 +1034,7 @@ msgstr ""
 "    %[-][BREEDTE][.[PREC]]{doxX}n  specificatie in printf-stijl voor\n"
 "                                   invoerregelnummer"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1069,20 +1048,20 @@ msgstr ""
 "    %c'\\OOO'  het teken met octaalcode OOO\n"
 "    C         het teken C (andere tekens representeren zichzelf)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal              moeite doen om een kleinere verzameling "
 "wijzigingen\n"
 "                             te vinden"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=AANTAL    dit AANTAL regels met identieke kop en staart\n"
 "                                bij vergelijkingsproces meenemen"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
@@ -1090,17 +1069,18 @@ msgstr ""
 "verspreide\n"
 "                             kleine wijzigingen"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=WANNEER]      de uitvoer kleuren; WANNEER is "
 "'always' (altijd),\n"
-"                             'never' (nooit), of 'auto' (standaard)"
+"                             'never' (nooit), of 'auto' (doelafhankelijk);\n"
+"                             een kale '--color' betekent '--color=auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1111,115 +1091,115 @@ msgstr ""
 "door\n"
 "                             dubbelepunten"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help                 deze hulptekst tonen en stoppen"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version              programmaversie tonen en stoppen"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "BESTANDEN is 'BESTAND1 BESTAND2' of 'MAP1 MAP2' of\n"
 "             'MAP BESTAND...' of 'BESTAND... MAP'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Als '--from-file' of '--to-file' gegeven is, mag BESTANDEN van alles zijn."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Als een BESTAND '-' is, wordt er van standaardinvoer gelezen."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr ""
 "Gebruik:  %s [OPTIE...] BESTANDEN\n"
 "\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Bestanden regel-voor-regel vergelijken."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "conflicterende waarde '%2$s' van optie %1$s"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "conflicterende uitvoerstijl-opties"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "ongeldige kleur '%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Alleen in %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "kan '-' niet met een map vergelijken"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "optie '-D' is niet mogelijk bij mappen"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Gemeenschappelijke submappen: %s en %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Bestand %s is een %s terwijl bestand %s een %s is\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Symbolische koppelingen %s en %s zijn verschillend\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Bestanden %s en %s zijn identiek\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "niet-samengaande opties"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "'-' opgegeven voor meer dan één invoerbestand"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "lezen is mislukt"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all             alle wijzigingen tonen, met rechte haken om de "
 "conflicten"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1227,12 +1207,12 @@ msgstr ""
 "-e, --ed                   een ed-script produceren die de wijzigingen van\n"
 "                             OUDBESTAND naar UWBESTAND in MIJNBESTAND maakt"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap         als '-e' maar met rechte haken om de conflicten"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1240,25 +1220,25 @@ msgstr ""
 "-3, --easy-only            als '-e' maar alleen met niet-overlappende "
 "wijzigingen"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only         als '-e' maar met alleen de overlappende "
 "wijzigingen"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                         als '-x' maar met rechte haken om de conflicten"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                         opdrachten 'w' en 'q' toevoegen aan einde van ed-"
 "scripts"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1266,27 +1246,27 @@ msgstr ""
 "-m, --merge                het feitelijk samengevoegde bestand tonen\n"
 "                             volgens '-A' zonder andere opties"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                 alle bestanden als tekst behandelen"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr    Enter-tekens (CR's) aan einde van regels weglaten"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab          tabs uitlijnen door invoegen van tab aan het begin"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PROG    dit programma gebruiken om bestanden te "
 "vergelijken"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1294,26 +1274,26 @@ msgstr ""
 "-L, --label=LABEL          dit LABEL gebruiken in plaats van bestandsnaam\n"
 "                             (mag maximaal driemaal herhaald worden)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                 deze hulptekst tonen en stoppen"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version              programmaversie tonen en stoppen"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr ""
 "Gebruik:  %s [OPTIE]... MIJNBESTAND OUDBESTAND UWBESTAND\n"
 "\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Drie bestanden regel-voor-regel vergelijken."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1339,46 +1319,46 @@ msgstr ""
 "robuuster\n"
 "dan het gebruik van 'ed'.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "De afsluitwaarde is 0 bij succes, 1 bij conflicten, en 2 bij problemen."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "*interne programmafout*: opmaak van diff-blokken is verhaspeld"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff is mislukt: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "*interne programmmafout*: ongeldig soort diff in process_diff()"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "ongeldige diff-opmaak: ongeldig scheidingsteken voor veranderingen"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "ongeldige diff-opmaak: incomplete laatste regel"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "hulpprogramma '%s' kan niet worden aangeroepen"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "ongeldige diff-opmaak: onjuiste tekens aan begin van regel"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "*interne programmafout*: ongeldig soort diff naar uitvoer gestuurd"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "invoerbestand is gekrompen"
 
@@ -1393,97 +1373,97 @@ msgid "%s: recursive directory loop"
 msgstr "%s: oneindige lus in de mappen"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=BESTAND       interactief werken; het resultaat opslaan in "
 "BESTAND"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case             hoofd- en kleine letters als hetzelfde zien"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion    omzettingen van tabs in spaties negeren"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space   witruimte aan einde van regel negeren"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change     wijzigingen in hoeveelheid witruimte negeren"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space        alle witruimte negeren"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines      wijzigingen waarvan alle regels leeg zijn "
 "negeren"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  wijzigingen waarvan alle regels "
 "overeenkomen\n"
 "                                  met reguliere expressie RE negeren"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr    Enter-tekens (CR's) aan einde van regels weglaten"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                 alle bestanden als tekst behandelen"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=AANTAL         maximaal dit AANTAL kolommen tonen (standaard 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column          bij gelijke regels alleen de linkerkolom tonen"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines   de gelijke regels onderdrukken"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs          tabs uitschrijven naar spaties in uitvoer"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=AANTAL       tab-stops op elke AANTAL posities (standaard 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal              moeite doen om een kleinere verzameling "
 "wijzigingen\n"
 "                             te vinden"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
@@ -1491,40 +1471,40 @@ msgstr ""
 "verspreide\n"
 "                             kleine wijzigingen"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=PRGRM   dit programma gebruiken om bestanden te "
 "vergelijken"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                 deze hulptekst tonen en stoppen"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version              programmaversie tonen en stoppen"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr ""
 "Gebruik:  %s [OPTIE...] BESTAND1 BESTAND2\n"
 "\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Twee bestanden en hun verschillen naast elkaar weergeven."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "kan standaardinvoer niet interactief samenvoegen"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "de te vergelijken bestanden zijn allebei mappen"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1558,6 +1538,18 @@ msgstr "niet-herkend voorvoegsel: %s"
 msgid "unparsable value for --palette"
 msgstr "onbegrepen waarde bij '--palette'"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "ongeldig argument '%3$s' van %1$s%2$s"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "ongeldig achtervoegsel in argument '%3$s' van %1$s%2$s"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "argument '%3$s' van %1$s%2$s is te groot"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Webpagina van %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "-i SKIP1:SKIP2  --ignore-initial=SKIP1:SKIP2"
 #~ msgstr "-i OVERSLAAN1:OVERSLAAN2  --ignore-initial=OVERSLAAN1:OVERSLAAN2"
 
index 25d2855..78cc54d 100644 (file)
Binary files a/po/pl.gmo and b/po/pl.gmo differ
index 7c67cca..6bc92c6 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,17 +1,17 @@
 # Polish translations for the GNU diffutils messages
-# Copyright (C) 1996, 2002, 2004, 2009, 2010, 2011, 2012, 2017 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2002, 2004, 2009, 2010, 2011, 2012, 2017, 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Rafał Maszkowski <rzm@icm.edu.pl> 1996, 2002, 2004, 2009-2012, 2017
+# Rafał Maszkowski <rzm@icm.edu.pl> 1996, 2002, 2004, 2009-2012, 2017, 2021
 # Contributions:
 # Paweł Krawczyk <kravietz@pipeta.chemia.pk.edu.pl>, 1996.
 # 23 corrections - Jakub Bogusz <qboosh@pld-linux.org>, 2004.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.5.25\n"
+"Project-Id-Version: GNU diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2017-05-09 14:30+0200\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 18:00+0200\n"
 "Last-Translator: Rafał Maszkowski <rzm@icm.edu.pl>\n"
 "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
 "Language: pl\n"
@@ -20,25 +20,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8-bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argument %s błędny w kontekście %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argument %s błędny w kontekście %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Prawidłowe argumenty to:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "błąd programu"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "przepełnienie stosu"
 
@@ -198,11 +198,11 @@ msgstr "%s: opcja wymaga argumentu -- „%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -274,7 +274,7 @@ msgstr "Wyrażenia regularne jest za duże"
 msgid "Unmatched ) or \\)"
 msgstr "Nie sparowany ) lub \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Brak poprzedniego wyrażenia regularnego"
 
@@ -282,41 +282,31 @@ msgstr "Brak poprzedniego wyrażenia regularnego"
 msgid "memory exhausted"
 msgstr "brak pamięci"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "standardowe wejście"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "standardowe wyjście"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "standardowe wyjście błędu"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "nieznany strumień"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "nie udało się ponownie otworzyć %s z uprawnieniami %s"
 
-#: lib/xstrtol-error.c:63
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "błędny argument %s%s: „%s”"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "błędny przyrostek argumentu %s%s: „%s”"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argument %s%s „%s” jest za duży"
+msgid "standard file descriptors"
+msgstr "standardowe deskryptory pliku"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -335,37 +325,32 @@ msgstr "Pakowane przez %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licencja GPLv3+: GNU GPL wersja 3 albo późniejsza http://gnu.org/licenses/"
-"gpl.html\n"
+"Licencja GPLv3+: GNU GPL wersja 3 albo późniejsza %s\n"
 "To jest wolne oprogramowanie: masz prawo je zmieniać i rozpowszechniać.\n"
 "Autorzy nie dają ŻADNYCH GWARANCJI w granicach dozwolonych prawem.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Autor: %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Autorzy: %s i %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Autorzy: %s, %s i %s.\n"
@@ -373,7 +358,7 @@ msgstr "Autorzy: %s, %s i %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +370,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +382,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +394,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +406,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +420,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +434,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,37 +449,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"O błędach programu poinformuj %s\n"
-"O błędach tłumaczenia poinformuj translation-team-pl@lists.sourceforge.net\n"
+msgid "Report bugs to: %s\n"
+msgstr "O błędach programu poinformuj: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Raporty o błędach %s wysyłaj do %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "strona domowa %s: %s\n"
 
-#: lib/version-etc.c:253
-#, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "strona domowa %s: http://www.gnu.org/software/%s/\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Pomoc w używaniu oprogramowania GNU: http://www.gnu.org/gethelp/\n"
+#: lib/version-etc.c:260
+#, c-format
+msgid "General help using GNU software: <%s>\n"
+msgstr "Pomoc w używaniu oprogramowania GNU: %s\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Pliki %s i %s różnią się\n"
@@ -504,53 +479,53 @@ msgstr "Pliki %s i %s różnią się\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Binarne pliki %s i %s różnią się\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Brak znaku nowej linii na końcu pliku"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Napisz „%s --help” żeby dowiedzieć się więcej."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "błędna wartość --ignore-initial „%s”"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "sprzeczne opcje -l i -s"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "zapis nieudany"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standardowe wyjście"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          wypisanie różniących się bajtów"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i, --ignore-initial=OMIŃ         przeskoczenie pierwszych OMIŃ bajtów"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -558,39 +533,39 @@ msgstr ""
 "--ignore-initial=OMIŃ1:OMIŃ2  przeskoczenie pierwszych OMIŃ1 bajtów\n"
 "                                      PLIKU1 i OMIŃ2 bajtów PLIKU2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-I  --verbose              wypisanie położeń i kodów wszystkich różniących "
 "się bajtów"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n , --bytes=LIMIT         porównanie najwyżej LIMIT bajtów"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      wyłączenie wszystkich zwykłych komunikatów"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 wypisanie tej pomocy i zakończenie"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version              wypisanie informacji o wersji i zakończenie"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Składnia: %s [OPCJA]... PLIK1 [PLIK2 [OMIŃ1 [OMIŃ2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Porównanie plików bajt po bajcie."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -598,12 +573,12 @@ msgstr ""
 "Opcjonalne argumenty OMIŃ1 i OMIŃ2 to liczby bajtów do pominięcia na\n"
 "początku każdego z plików (domyślnie zero)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr "Obowiązkowe argumenty długich opcji są obowiązkowe też dla krótkich.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -613,195 +588,195 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, i tak dalej dla T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Jeżeli PLIK to „-” lub go brak, czytane jest standardowe wejście."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Status wyjściowy ma wartość 0 gdy pliki wejściowe są takie same, 1 - jeżeli\n"
 "różne, 2 - jeżeli są problemy."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "błędna wartość --bytes „%s”"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "brakujący argument po „%s”"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "nadmiarowy argument „%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s różnią się: bajt %s, linia %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s różnią się: bajt %s, linia %s zawiera %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF w %s, który jest pusty\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF w %s, po bajcie %s, linii %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF w %s, po bajcie %s, w linii %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF w %s, po bajcie %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "błędna długość kontekstu „%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "stronicowanie nie jest możliwe na tej maszynie"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "za dużo opcji etykietowania plików"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "błędna szerokość „%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "sprzeczne opcje szerokości"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "błędna długość horyzontu „%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "błędny rozmiar tabulacji „%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "sprzeczne opcje rozmiarów TAB-a"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "równocześnie podane --from-file i --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "--normal                      wynik w postaci zwykłego diff-a (domyślnie)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q  --brief                   wypisanie wyniku tylko gdy pliki się różnią"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  informowanie gdy dwa pliki są takie same"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=ILE]   wypisanie ILU (domyślnie 3) linii kontekstu"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "--u, -U ILE, --unified=ILE    wypisanie najwyżej ILE (domyślnie 3)\n"
 "                                linii kontekstu w trybie unified"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed                      wynik w postaci poleceń ed-a"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs                     wynik w postaci diff-a z RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            wyniki w dwóch kolumnach"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=ILE               wypisanie najwyżej ILE (domyślnie 130) kolumn"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             wypisanie tylko lewej kolumny dla wspólnych "
 "linii"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   bez wypisania wspólnych linii"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         podanie w jakiej funkcji C są zmiany"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=WYRREG  wypisanie ostatniej linii pasującej do "
 "WYRREG"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -810,83 +785,83 @@ msgstr ""
 "znacznika\n"
 "                                czasu (może być powtarzane)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs             rozwinięcie TAB-ów w spacje w wyniku"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T  --initial-tab             wyrównanie linii przez użycie TAB-ów"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "    --tabsize=ILE             TAB-y co ILE (domyślnie 8) kolumn"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    bez wypisywania spacji i znaków TAB przed\n"
 "                                pustymi liniami"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-I  --paginate                przepuszczenie wyniku przez „pr” żeby go "
 "stronnicować"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r  --recursive                 porównanie podkatalogów rekurencyjnie"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 "    --no-dereference            bez podążania za dowiązaniami symbolicznymi"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N  --new-file                  traktowanie brakujących plików jak pustych"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   traktowanie brakujących pierwszych plików\n"
 "                                 w pierwszym zestawie jako pustych"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-space-change       zignorowanie wielkości liter przy\n"
 "                                  porównywaniu nazw plików"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  uwzględnianie wielkości liter przy\n"
 "                                  porównywaniu nazw plików"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=WZÓR              wykluczenie plików pasujących do WZORU"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=PLIK         pominięcie plików pasujących do wzorców w "
 "PLIKU"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=PLIK       zacznij od PLIKU przy porównywaniu katalogów"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -894,7 +869,7 @@ msgstr ""
 "    --from-file=PLIK1           porównanie PLIKU1 z wszystkimi\n"
 "                                  argumentami; PLIK1 może być katalogiem"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -902,85 +877,85 @@ msgstr ""
 "    --to-file=PLIK2             porównanie wszystkich argumentów\n"
 "                                  z PLIKIEM2; PLIK2 może być katalogiem"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i  --ignore-case               ignorowanie różnic między wielkimi i małymi "
 "literami"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion      zignorowanie zmian spowodowanych\n"
 "                                  rozwinięciem TAB-ów"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z  --ignore-trailing-space     ignorowanie znaków odstępu na końcu linii"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change       Zignorowanie zmian ilości znaków odstępu"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space          zignorowanie znaków odstępu"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines        zignorowanie zmian liczby pustych linii"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  zignorowanie zmian w liniach pasujących\n"
 "                                  do RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text                      traktowanie plików jako tekstowych"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr             pominięcie znaków nowej linii na wejściu"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary                        czytanie i zapisywanie danych binarnie"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAZWA               wypisanie połączonego pliku dla pokazania\n"
 "                                  różnic w „#ifdef NAZWA”"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=FMTG   użyciem FMTF do sformatowania grup\n"
 "                                  wejściowych typu GTYPE"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          podobnie, ale z użyciem LFMT do\n"
 "                                  sformatowania linii wejściowych"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=FMTL    użycie FMTL do sformatowania linii\n"
 "                                  wejściowych typu LTYPE"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -988,13 +963,13 @@ msgstr ""
 "  Te opcje formatowania dają dokładną kontrolę nad wynikami diff-a,\n"
 "    są uogólnieniem -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "TYPL to „old” (stary), „new” (nowy) albo „unchanged” (nie zmieniony).\n"
 "TYPG to TYPL albo „changed” (zmieniony)."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1022,7 +997,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1    %(A=B?T:E)  jeżeli A równa się B, to T, jeżeli nie, to E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1034,7 +1009,7 @@ msgstr ""
 "    %l  zawartość linii z wyłączeniem znaku nowej linii\n"
 "    %[-][SZER][.[DOKŁ]]{doxX}n  specyfikację numeru linii w stylu printf"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1048,34 +1023,34 @@ msgstr ""
 "    %c'\\OOO'  znak o kodzie ósemkowym OOO\n"
 "    Z    znak Z (inne znaki reprezentują same siebie)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d  --minimal            usiłowanie znalezienia mniejszego zbioru zmian"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ILE  zostawienie ILE linii wspólnego przedrostka i "
 "przyrostka"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  założenie: duże pliki i rozrzucone małe zmiany"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=KIEDY]      kolorowe wyniki; KIEDY to „never” (nigdy), "
 "„always”\n"
 "                           (zawsze) albo „auto” (wartość domyślna)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1085,113 +1060,113 @@ msgstr ""
 "                           PALETA jest listą oddzielonych dwukropkami\n"
 "                           właściwości terminfo"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               wypisanie tej pomocy i zakończenie"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version            wypisanie informacji o wersji i zakończenie"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "PLIKI to „PLIK1 PLIK2” albo „KATALOG1 KATALOG2” albo „KATALOG PLIK” albo\n"
 "„PLIK KATALOG”."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Jeżeli użyta jest opcja --from-file albo --to-file, nie ma ograniczeń co do\n"
 "PLIKU/ÓW."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Jeżeli PLIK to „-”, czytane jest standardowe wejście."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Składnia: %s [OPCJA]... PLIKI\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Porównanie PLIKÓW kolejnymi liniami."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "sprzeczna wartość opcji %s: „%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "sprzeczne opcje stylu wyniku"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "błędny kolor „%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Tylko w %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "nie można porównać „-” z katalogiem"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "opcja -D nie działa dla katalogów"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Wspólne podkatalogi: %s i %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Plik %s jest %s, podczas gdy plik %s jest %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Dowiązania symboliczne %s i %s różnią się\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Pliki %s i %s są identyczne\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "niezgodne opcje"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "„-” podany dla więcej niż jednego pliku wejściowego"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "nieudany odczyt"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A  --show-all              wypisanie wszystkich zmian, konflikty w nawiasach"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1199,31 +1174,31 @@ msgstr ""
 "-e  --ed                    wypisanie niezłączonych zmian między\n"
 "                                  STARY_PLIK a NOWY_PLIK do MÓJ_PLIK"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E  --show-overlap          jak -e, ale z konfliktami w nawiasach"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 "-3  --easy-only             jak -e, ale z tylko z nienachodzącymi zmianami"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x  --overlap-only          jak -e, ale tylko z nachodzącymi zmianami"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          jak -x, ale z konfliktami w nawiasach"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          dodanie poleceń „w” i „q” do skryptu ed-a"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1231,23 +1206,23 @@ msgstr ""
 "-m, --merge                 wypisanie połączonego pliku zgodnie z -A,\n"
 "                                jeżeli nie było innych opcji"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text                  traktowanie plików jako tekstowych"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "--strip-trailing-cr         pominięcie znaków nowej linii na wejściu"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T  --initial-tab           wyrównanie linii przez użycie TAB-ów"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAM      użycie PROGRAMU do porównania plików"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1255,25 +1230,25 @@ msgstr ""
 "-L, --label=ETYKIETA        użycie ETYKIETY zamiast nazwy pliku\n"
 "                                (może być powtarzane do trzech razy)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  wypisanie tej pomocy i zakończenie"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr ""
 "-v  --version               wypisanie informacji o wersji i zakończenie"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Składnia: %s [OPCJA]... MÓJ_PLIK STARY_PLIK TWÓJ_PLIK\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Porównanie trzech plików linia po linii."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1297,47 +1272,47 @@ msgstr ""
 "różnice i wypisuje połączony plik. Przy nietypowych danych wejściowych\n"
 "jest to bardziej elastyczne niż użycie ed-a.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Status wyjściowy ma wartość 0 gdy polecenie wykonało się z prawidłowym\n"
 "wynikiem, 1 - jeżeli są konflikty, 2 - jeżeli są problemy."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "bład wewnętrzny: spieprzony format bloków diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff nie zadziałał: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "błąd wewnętrzny: błędny typ diff w process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "błędny format diff; błędny separator zmian"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "błędny format diff; niekompletna ostatnia linia"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "nie mógł być wywołany program pomocniczy „%s”"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "błędny format diff; nieprawidłowe znaki na początku linii"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "błąd wenwętrzny: błędny typ diff-a przekazany na wyjście"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "plik wejściowy się zmniejszył"
 
@@ -1352,127 +1327,127 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekurencyjne zapętlenie katalogów"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=PLIK            tryb interakcyjny, wyniki wysyłane do PLIKU"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i  --ignore-case            traktowanie małych i wielkich liter tak samo"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion   zignorowanie zmian spowodowanych rozwinięciem\n"
 "                               TAB-ów"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z  --ignore-trailing-space  ignorowanie znaków odstępu na końcu linii"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change    zignorowanie zmian ilości znaków odstępu"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space       ignorowanie wszystkich znaków odstępu"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B  --ignore-blank-lines     zignorowanie zmian liczby pustych linii"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  zignorowanie zmian w liniach pasujących\n"
 "                                  do RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "--strip-trailing-cr          pominięcie znaków nowej linii na wejściu"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text                   traktowanie plików jako tekstowych"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w ILE  --width=ILE          wypisanie najwyżej ILE (domyślnie 130) kolumn"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-I  --left-column            wypisanie tylko lewej kolumny dla wspólnych "
 "linii"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  bez wypisania wspólnych linii"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs            rozwinięcie TAB-ów w spacje w wyniku"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "    --tabsize=ILE            TAB-y co ILE (domyślnie 8) kolumn"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d  --minimal                usiłowanie znalezienia mniejszego zbioru zmian"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H  --speed-large-files      założenie: duże pliki i rozrzucone małe zmiany"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  użycie PROGRAMU do porównania plików"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   wypisanie tej pomocy i zakończenie"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr ""
 "-v  --version                wypisanie informacji o wersji i zakończenie"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Składnia: %s [OPCJA]... PLIK1 PLIK2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Interaktywne łączenie różnic między PLIKIEM1 a PLIKIEM2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "nie mogę interakcyjnie łączyć standardowego wejścia"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "oba mające być porównane pliki to katalogi"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
index 7305182..7720782 100644 (file)
Binary files a/po/pt.gmo and b/po/pt.gmo differ
index 60e94e6..152f6ee 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -1,15 +1,15 @@
 # Portuguese (Portugal) translation for the diffutils package.
 # Copyright (C) 2018 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Pedro Albuquerque <palbuquerque73@gmail.com>, 2018.
+# Pedro Albuquerque <pmra@protonmail.com>, 2018, 2019, 2020, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: GNU diffutils 3.6.17\n"
+"Project-Id-Version: GNU diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 08:29+0000\n"
-"Last-Translator: Pedro Albuquerque <palbuquerque73@gmail.com>\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-23 07:11+0100\n"
+"Last-Translator: Pedro Albuquerque <pmra@protonmail.com>\n"
 "Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
 "Language: pt\n"
 "MIME-Version: 1.0\n"
@@ -17,27 +17,27 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Gtranslator 2.91.7\n"
+"X-Generator: Poedit 2.3\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumento %s inválido para %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumento %s ambíguo para %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Os argumentos válidos são:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "erro de programa"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "transporte da pilha"
 
@@ -197,11 +197,11 @@ msgstr "%s: opção requer um argumento -- \"%c\"\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "\""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "\""
 
@@ -271,9 +271,9 @@ msgstr "Expressão regular muito grande"
 
 #: lib/regcomp.c:183
 msgid "Unmatched ) or \\)"
-msgstr ") or \\) sem par"
+msgstr ") ou \\) sem par"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Sem expressão regular anterior"
 
@@ -281,41 +281,31 @@ msgstr "Sem expressão regular anterior"
 msgid "memory exhausted"
 msgstr "memória esgotada"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "fluxo desconhecido"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "falha ao reabrir %s com modo %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "Argumento \"%s\" de %s%s inválido"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "sufixo inválido no argumento \"%s\" de %s%s"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argumento \"%s\" de %s%s muito grande"
+msgid "standard file descriptors"
+msgstr "descritores de ficheiro padrão"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,36 +324,32 @@ msgstr "Empacotado por %s\n"
 msgid "(C)"
 msgstr "(©)"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licença GPLv3+: GNU GPL versão 3 ou posterior <https://gnu.org/licenses/gpl."
-"html>\n"
+"Licença GPLv3+: GNU GPL versão 3 ou posterior <%s>\n"
 "Este é um programa grátis: pode alterá-lo e redistribuí-lo.\n"
 "Não há QUALQUER GARANTIA, até ao limite da Lei.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Escrito por %s\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Escrito por %s e %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Escrito por %s, %s e %s.\n"
@@ -371,7 +357,7 @@ msgstr "Escrito por %s, %s e %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -383,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -395,7 +381,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -407,7 +393,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -419,7 +405,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -433,7 +419,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -447,7 +433,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -462,35 +448,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Reportar erros a: %s\n"
+msgid "Report bugs to: %s\n"
+msgstr "Reportar erros a: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Reportar %s erros a: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Página inicial %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Página inicial %s: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Ajuda geral para usar programas GNU: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Ajuda geral para usar programas GNU: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Ficheiros %s e %s diferem\n"
@@ -500,55 +478,55 @@ msgstr "Ficheiros %s e %s diferem\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Ficheiros binários %s e %s diferem\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Sem newline no fim do ficheiro"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Tente \"%s --help\" para mais informação."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "valor --ignore-initial \"%s\" inválido"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "as opções -l e -s são incompatíveis"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "falha de escrita"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "a saída padrão"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          imprime bytes diferentes"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=NÚM          salta os primeiros NÚM bytes de ambas as "
 "entradas"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -556,39 +534,39 @@ msgstr ""
 "-i, --ignore-initial=NÚM1:NÚM2    salta os primeiros NÚM1 bytes de FICH1 e\n"
 "                                      os primeiros NÚM2 bytes de FICH2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              imprime números de byte e valores de byte "
 "diferentes"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMITE         compara no máximo LIMITE bytes"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      suprime toda a saída normal"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 mostra esta ajuda e sai"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              mostra informação da versão e sai"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Uso: %s [OPÇÃO]... FICH1 [FICH2 [NÚM1 [NÚM2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
-msgstr "compara dois ficheiros byte a byte"
+msgstr "Comparar dois ficheiros byte a byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -596,14 +574,14 @@ msgstr ""
 "Os NÚM1 e NÚM2 opcionais especificam o número de bytes a saltar\n"
 "no início de cada ficheiro (0 por predefinição)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Argumentos obrigatórios para opções longas também são obrigatórios para "
 "opções curtas.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -614,196 +592,196 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824 e assim por diante para T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Se um dos FICH for \"-\" ou omisso, lê a entrada padrão."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "O estado de saída é 0 se as entradas forem iguais, 1 se forem diferentes, 2 "
 "se houver problemas."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valor --bytes \"%s\" inválido"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "operando em falta após \"%s\""
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "operando extra \"%s\""
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s diferem: byte %s, linha %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s diferem: byte %s, linha %s é %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF em %s que está vazio\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF em %s após o byte %s, linha %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF em %s após o byte %s, na linha %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF em %s após o byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "tamanho de contexto inválido \"%s\""
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "paginação não suportada neste anfitrião"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "demasiadas opções de etiquetas de ficheiro"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "largura \"%s\" inválida"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opções de largura em conflito"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "tamanho horizontal \"%s\" inválido"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tamanho de tabulação \"%s\" inválido"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opções de tabulação em conflito"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "ambas as opções --from-file e --to-file especificadas"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  imprime uma diferenciação normal (predefinição)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   só reporta quando os ficheiros diferem"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  reporta quando os dois ficheiros forem iguais"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NÚM, --context[=NÚM]   imprime NÚM (predefinido como 3) linhas de "
 "contexto copiado"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NÚM, --unified[=NÚM]   imprime NÚM (predefinido como 3) linhas de "
 "contexto unificado"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      imprime um script ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     imprime uma diferenciação de formato RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            imprime em duas colunas"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NÚM               imprime no máximo NÚM (predefinido como 130) "
 "colunas"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             imprime só a coluna esquerda de linhas comuns"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   não imprime linhas comuns"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         mostra em que função C está cada alteração"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE   mostra a linha mais recente correspondente a RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -812,82 +790,82 @@ msgstr ""
 "carimbo\n"
 "                                (pode ser repetida)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             expande tabulações para espaços na saída"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab             alinha tabulações prepondo tabulações"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NUM             tabulações a cada NÚM (predefinido como 8) "
 "colunas"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    suprime espaços ou tabulações antes de linhas "
 "de saída vazias"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate                passa a saída por \"pr\" para a paginar"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 compara recursivamente todas as sub-pastas "
 "encontradas"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            não segue ligações simbólicas"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  trata ficheiros ausentes como vazios"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   trata primeiros ficheiros ausentes como "
 "vazios"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     ignora maiúsculas ao comparar nomes de "
 "ficheiro"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  considera maiúsculas ao comparar nomes de "
 "ficheiro"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=PADRÃO            exclui ficheiros que cumpram PADRÃO"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FICH         exclui ficheiros que cumpram qualquer padrão "
 "em FICH"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr "-S, --starting-file=FICH        começa com FICH ao comparar pastas"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -895,7 +873,7 @@ msgstr ""
 "    --from-file=FICH1           compara FICH1 a todos os operandos;\n"
 "                                  FICH1 pode ser uma pasta"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -903,83 +881,83 @@ msgstr ""
 "    --to-file=FICH2             compara todos os operandos a FICH2;\n"
 "                                  FICH2 pode ser uma pasta"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               ignora diferenças de maiúsculas no conteúdo "
 "dos ficheiros"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      ignora alterações devidas a expansão de "
 "tabulações"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     ignora espaços no final das linhas"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       ignora alterações na quantidade de espaço em "
 "branco"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignora todos os espaços em branco"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        ignora alterações onde as linhas estejam "
 "todas em branco"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignora alterações onde as linhas coincidam "
 "com RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      trata todos os ficheiros como texto"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         remove os carriage return finais na entrada"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    lê e escreve dados em modo binário"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOME                imprime o ficheiro unido com diferenciação "
 "\"#ifdef NOME\""
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --TIPOG-group-format=FMTG   formata grupos de entrada TIPOG com FMTG"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=FMTL          formata todas as linhas de entrada com FMTL"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --TIPOL-line-format=FMTL    formata linhas de entrada TIPOL com FMTL"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -987,12 +965,12 @@ msgstr ""
 "  Estas opções de formato fornecem um controlo preciso sobre a saída\n"
 "    da diferenciação, generalizando -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  TIPOL é \"old\", \"new\" ou \"unchanged\". TIPOG é TIPOL ou \"changed\"."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1021,7 +999,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  se A igual a B então T senão E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1034,7 +1012,7 @@ msgstr ""
 "    %[-][LARG][.[PREC]]{doxX}n especificação estilo printf para número de "
 "linha de entrada"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1048,34 +1026,34 @@ msgstr ""
 "    %c\"\\OOO\"  o carácter com código octal OOO\n"
 "    C    o carácter C (outros caracteres representam-se a si mesmos)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            tenta arduamente encontrar um conjunto de "
 "alterações mais pequeno"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "    --horizon-lines=NÚM  mantém NÚM linhas dos prefixo e sufixo comuns"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  presume ficheiros grandes e muitas alterações "
 "pequenas espalhadas"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=QUANDO]     dá cor à saída; QUANDO pode ser \"never\", \"always"
-"\",\n"
-"                           ou \"auto\" (a predefinição)"
+"    --color[=QUANDO]     colorir a saída; QUANDO pode ser \"never\", \"always"
+"\" ou \"auto\"\n"
+"                           --color significa --color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1086,114 +1064,114 @@ msgstr ""
 "                           uma lista separada por vírgulas de capacidades "
 "terminfo"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               mostra esta ajuda e sai"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            mostra informação da versão e sai"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FICHEIROS são \"FICH1 FICH2\" ou \"PST1 PST2\" or \"PST FICH\" ou \"FICH PST"
 "\"."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Se --from-file ou --to-file forem indicados, não há restrições em "
 "FICHEIRO(s)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Se FICHEIRO for \"-\", lê a entrada padrão."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Uso: %s [OPÇÃO]... FICHEIROS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
-msgstr "compara FICHEIROS linha a linha."
+msgstr "Comparar FICHEIROS linha a linha."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "valor \"%s\" da opção %s em conflito"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "opções de estilo da saída em conflito"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "cor \"%s\" inválida"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Só em %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "impossível comparar \"-\" a uma pasta"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "opção -D não suportada em pastas"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Pastas comuns: %s e %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "O ficheiro %s é %s enquanto o ficheiro %s é %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "As ligações simbólicas %s e %s diferem\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Os ficheiros %s e %s são idênticos\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opções incompatíveis"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "\"-\" especificado para mais de um ficheiro de entrada"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "read falhou"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              imprime todas as alterações, conflitos entre "
 "chavetas"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1201,11 +1179,11 @@ msgstr ""
 "-e, --ed                    imprime um script ed incorporando as alterações\n"
 "                                de FICHVELHO para SEUFICH para MEUFICH"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          como -e, mas com conflitos entre chavetas"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1213,22 +1191,22 @@ msgstr ""
 "-3, --easy-only             como -e, mas incorpora só alterações que não se "
 "sobreponham"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          como -e, mas incorpora só alterações que se "
 "sobreponham"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          como -x, mas com conflitos entre chavetas"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          anexa comandos \"w\" e \"q\" a scripts ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1236,23 +1214,23 @@ msgstr ""
 "-m, --merge                 imprime o ficheiro unido real, de acordo com\n"
 "                                -A se nenhuma outra opção for indicada"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  trata todos os ficheiros como texto"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     remove carriage return finais na entrada"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab           alinha tabulações prepondo tabulações"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMA usa PROGRAMA para comparar ficheiros"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1260,24 +1238,24 @@ msgstr ""
 "-L, --label=ETIQUETA        usa ETIQUETA em vez do nome de ficheiro\n"
 "                                (pode ser repetida até três vezes)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  mostra esta ajuda e sai"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               mostra informação da versão e sai"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Uso: %s [OPÇÃO]... MEUFICH FICHVELHO SEUFICH\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
-msgstr "compara três ficheiros linha a linha."
+msgstr "Comparar três ficheiros linha a linha."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1302,47 +1280,47 @@ msgstr ""
 "e imprima o ficheiro unido real. Para entradas incomuns, isto é mais\n"
 "robusto do que usar o ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "O estado de saída é 0 se tiver sucesso, 1 para conflitos, 2 se houver "
 "problemas."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "erro interno: confusão no formato de blocos de diferença"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff falhou: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "erro interno: tipo de diff inválido em process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formato de diff inválido; separador de alterações inválido"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formato de diff inválido; última linha incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "impossível chamar o programa subsidiário \"%s\""
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "formato de diff inválido; caracteres iniciais de linha incorrectos"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "erro interno: tipo de diff inválido passado à saída"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "ficheiro de entrada encolhido"
 
@@ -1357,136 +1335,136 @@ msgid "%s: recursive directory loop"
 msgstr "%s: ciclo de pasta recursiva"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=FILE            opera interactivamente, enviando a saída para "
 "FICH"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case            considera maiúsculas e minúsculas como sendo "
 "iguais"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ignora alterações devidas a expansão de "
 "tabulações"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  ignora espaços no final das linhas"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    ignora alterações na quantidade de espaço em "
 "branco"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignora todo o espaço em branco"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     ignora alterações cujas linhas estejam todas em "
 "branco"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ignora alterações cujas linhas coincidam com "
 "RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      remove carriage return finais na entrada"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   trata todos os ficheiros como texto"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NUM              imprime no máximo NÚM (predefinido como 130) "
 "colunas"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            imprime só a coluna esquerda de linhas comuns"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  não imprime linhas comuns"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            expande tabulações para espaços na saída"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NÚM            tabulações a cada NÚM (predefinido como 8) "
 "colunas"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                tenta arduamente encontrar um conjunto de "
 "alterações mais pequeno"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      presume ficheiros grandes, muitas alterações "
 "pequenas espalhadas"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMA  usa PROGRAMA para comparar ficheiros"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   mostra esta ajuda e sai"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                imprime informação da versão e sai"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Uso: %s [OPÇÃO]... FICHEIRO1 FICHEIRO2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "União lado-a-lado de diferenças entre FICHEIRO1 e FICHEIRO2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "impossível unir interactivamente a entrada padrão"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "ambos os ficheiros a comparar são pastas"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1520,3 +1498,15 @@ msgstr "prefixo não reconhecido: %s"
 #, c-format
 msgid "unparsable value for --palette"
 msgstr "valor não analisável para --palette"
+
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "Argumento \"%s\" de %s%s inválido"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "sufixo inválido no argumento \"%s\" de %s%s"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "argumento \"%s\" de %s%s muito grande"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Página inicial %s: <https://www.gnu.org/software/%s/>\n"
index 365eb08..981d47d 100644 (file)
Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ
index 1a7a7c0..242643d 100644 (file)
@@ -1,15 +1,16 @@
 # Brazilian Portuguese translations for diffutis package
 # Traduções em português brasileiro para o pacote diffutils
-# Copyright (C) 2018 Free Software Foundation, Inc.
+# Copyright (C) 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Halley Pacheco de Oliveira <halleypo@ig.com.br>, 2002.
-# Rafael Fontenelle <rafaelff@gnome.org>, 2016-2018.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2016-2021.
+#
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-27 15:06-0200\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 05:51-0300\n"
 "Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
 "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
 "net>\n"
@@ -17,29 +18,29 @@ msgstr ""
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Virtaal 1.0.0-beta1\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+"X-Generator: Gtranslator 40.0\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "argumento inválido para %s: %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "argumento ambíguo %s para %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Argumentos válidos são:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "erro do programa"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "estouro de pilha"
 
@@ -199,11 +200,11 @@ msgstr "%s: a opção exige um argumento -- \"%c\"\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -275,7 +276,7 @@ msgstr "Expressão regular grande demais"
 msgid "Unmatched ) or \\)"
 msgstr ") ou \\) sem correspondente"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Nenhuma expressão regular anterior"
 
@@ -283,41 +284,31 @@ msgstr "Nenhuma expressão regular anterior"
 msgid "memory exhausted"
 msgstr "memória esgotada"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "entrada padrão (stdin)"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "saída padrão (stdout)"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "erro padrão (stderr)"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "fluxo desconhecido"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "falha ao reabrir %s com modo %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "argumento inválido para %s%s: \"%s\""
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "sufixo inválido no argumento para %s%s: \"%s\""
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argumento grande demais para %s%s: \"%s\""
+msgid "standard file descriptors"
+msgstr "descritores de arquivo padrão"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -336,36 +327,32 @@ msgstr "Empacotado por %s\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licença GPLv3+: GNU GPL versão 3 ou posterior <https://gnu.org/licenses/gpl."
-"html>\n"
+"Licença GPLv3+: GNU GPL versão 3 ou posterior <%s>.\n"
 "Este é um software livre: você é livre para alterá-lo e redistribuí-lo.\n"
 "NÃO HÁ QUALQUER GARANTIA, na máxima extensão permitida em lei.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Escrito por %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Escrito por %s e %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Escrito por %s, %s e %s.\n"
@@ -373,7 +360,7 @@ msgstr "Escrito por %s, %s e %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +372,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +384,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +396,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +408,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +422,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +436,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,37 +451,30 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "Relate erros para: %s\n"
-"Relate erros de tradução para <http://ldpbr-translation@lists.sourceforge."
-"net>\n"
+"Relate erros de tradução para <http://translationproject.org/team/pt_BR."
+"html>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Relate os erros do %s para: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Página do %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Página do %s: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Ajuda em geral no uso de software GNU: <%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Ajuda geral no uso de software GNU: <https://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Os arquivos %s e %s são diferentes\n"
@@ -504,54 +484,54 @@ msgstr "Os arquivos %s e %s são diferentes\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Os arquivos binários %s e %s são diferentes\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Nenhum caractere de nova linha no final do arquivo"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Tente \"%s --help\" para mais informações."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "valor inválido --ignore-initial \"%s\""
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "as opções -l e -s são incompatíveis"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "erro de escrita"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "saída padrão"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          imprime os bytes diferentes"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SALTO        ignora os primeiros SALTO bytes da entrada"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -561,39 +541,39 @@ msgstr ""
 "ARQUIVO1\n"
 "                                    e os primeiros SALTO2 bytes do ARQUIVO2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              emite os números de bytes e os valores de\n"
 "                             todos os bytes diferentes"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LIMITE         compara no máximo LIMITE bytes"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      suprime todas saídas normais"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 mostra esta ajuda e sai"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              mostra informação sobre a versão e sai"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Uso: %s [OPÇÃO]... ARQUIVO1 [ARQUIVO2 [SALTO1 [SALTO2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Compara dois arquivos byte por byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -601,13 +581,13 @@ msgstr ""
 "Os argumentos opcionais SALTO1 e SALTO2 especificam o número de\n"
 "bytes para ignorar no começo de cada arquivo (zero por padrão)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Argumentos obrigatórios para opções longas também o são para opções curtas.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -619,196 +599,196 @@ msgstr ""
 "GB 1,000,000,000, G 1,073,741,824,\n"
 "e assim por diante para T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Se ARQUIVO for igual a \"-\" ou for omitido, ler da entrada padrão."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Status de saída é 0 se as entradas forem iguais, 1 se diferente e 2 se "
 "problema."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valor inválido --bytes \"%s\""
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "faltando operando após \"%s\""
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "operando extra \"%s\""
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s e %s são diferentes: byte %s, linha %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s e %s são diferentes: byte %s, linha %s é %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: Fim de arquivo (EOF) em %s que está vazio\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: Fim de arquivo (EOF) em %s após byte %s, linha %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: Fim de arquivo (EOF) em %s após byte %s, na linha %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: Fim de arquivo (EOF) em %s após byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "o comprimento do contexto não é válido \"%s\""
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "sem suporte a paginação neste computador"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "número excessivo de opções de rótulo de arquivo"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "largura inválida \"%s\""
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opções de largura conflitantes"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "comprimento do horizonte inválido \"%s\""
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "tamanho de tabulação inválido \"%s\""
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opções de tamanho de tabulação conflitantes"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "ambos --from-file e --to-file especificados"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  cria um diff no formato normal (padrão)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q, --brief                   indica apenas se os arquivos forem diferentes"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  indica quando dois arquivos forem o idênticos"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NÚM, --context[=NÚM]   cria NÚM (padrão 3) linhas de contexto copiado"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U NÚM, --unified[=NÚM]   cria NÚM (padrão 3) linhas de contexto "
 "unificado"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      cria um script para o editor ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     cria um diff no formato RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            cria em duas colunas"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=NÚM               limita a saída a NÚM colunas por linha (padrão "
 "130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             emite apenas a coluna da esquerda das linhas\n"
 "                                idênticas"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   não exibe as linhas idênticas"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         mostra em qual função C está cada alteração"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=ER   mostra a linha mais recente correspondendo à ER"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -816,89 +796,89 @@ msgstr ""
 "    --label RÓTULO            usa RÓTULO ao invés do nome do arquivo e\n"
 "                                carimbo de tempo (pode ser repetido)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             expande as tabulações para espaços na saída"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             alinha tabulações introduzindo uma\n"
 "                                tabulação no início"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NÚM             paradas de tabulação a cada NÚM colunas\n"
 "                                (padrão=8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    suprime espaço ou tabulação antes de linhas\n"
 "                                vazias na saída"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                passa a saída por meio de \"pr\" para paginá-la"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 compara recursivamente os subdiretórios\n"
 "                                  encontrados"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            não interpreta links simbólicos"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr ""
 "-N, --new-file                  considera os arquivos ausentes como vazios"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   considera os primeiros arquivos ausentes\n"
 "                                  como vazios"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     não faz distinção entre letras maiúsculas e\n"
 "                                  minúsculas nos nomes dos arquivos"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  faz distinção entre letras maiúsculas e\n"
 "                                  minúsculas nos nomes dos arquivos"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=PADRÃO            exclui arquivos correspondendo a PADRÃO"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=ARQUIVO      exclui arquivos com correspondam a qualquer\n"
 "                                  padrão contido em ARQUIVO"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=ARQUIVO     inicia por ARQUIVO ao comparar diretórios"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -906,7 +886,7 @@ msgstr ""
 "    --from-file=ARQUIVO1        compara ARQUIVO1 com todos os operandos;\n"
 "                                  ARQUIVO1 pode ser um diretório"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -914,25 +894,25 @@ msgstr ""
 "    --to-file=ARQUIVO2          compara todos os operandos com ARQUIVO2;\n"
 "                                  ARQUIVO2 pode ser um diretório"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               não faz distinção entre letras maiúsculas e\n"
 "                                  minúsculas no conteúdo do arquivo"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      ignora as diferenças causadas pela expansão\n"
 "                                  da tabulação"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space     ignora espaços em branco no fim das linhas"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
@@ -940,59 +920,59 @@ msgstr ""
 "espaços\n"
 "                                  em branco"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          ignora todos os espaços em branco"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        ignora diferenças onde as linhas estão vazias"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=ER  ignora as diferenças nas linhas que\n"
 "                                  correspondem à expressão regular ER"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      trata todos os arquivos como texto"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         remove o caractere de retorno de carro\n"
 "                                  (CR) ao final da linha na entrada"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    lê e escreve os dados em modo binário"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NOME                exibe o arquivo mesclado incluindo\n"
 "                                  \"#ifndef NOME\" nas diferenças"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT   formata grupos de entrada GTYPE com GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          formata todas as linhas de entrada com LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT    formata linhas de entrada LTYPE com LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1000,13 +980,13 @@ msgstr ""
 "  Essa opções de formatação fornece um controle refinado sobre a saída\n"
 "    das diferenças, generalizando -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE pode ser \"old\", \"new\" ou \"unchanged\". GTYPE é LTYPE ou "
 "\"changed\"."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1037,7 +1017,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  se A igual B, então T; senão E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1050,7 +1030,7 @@ msgstr ""
 "    %[-][LARGURA][.[PREC]]{doxX}n  especificação estilo printf() do número\n"
 "                                   da linha da utilizando"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1064,35 +1044,36 @@ msgstr ""
 "    %c'\\OOO'  o caractere com código octal OOO\n"
 "    C    o caractere C (outros caracteres representam a si próprios)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            se esforça para localizar o menor conjunto\n"
 "                           de diferenças"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=NÚM  mantém NÚM linhas de prefixo e sufixo idênticos"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  assume arquivos grandes e muitas alterações\n"
 "                           pequenas espalhadas"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=QUANDO]     colore a saída; QUANDO pode ser \"never\", \"always"
 "\",\n"
-"                           ou \"auto\" (o padrão)"
+"                           ou \"auto\"; só --color resulta em --color=\"auto"
+"\""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1102,113 +1083,113 @@ msgstr ""
 "                           PALETA é uma lista de capacidades de terminfo\n"
 "                           separadas por caractere de dois pontos"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               mostra esta ajuda e sai"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            mostra as informações da versão e sai"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ARQUIVOS são \"ARQUIVO1 ARQUIVO2\", \"DIR1 DIR2\", \"DIR ARQUIVO\" ou "
 "\"ARQUIVO DIR\"."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Se --from-file ou --to-file for especificado, não há restrição em ARQUIVO(s)."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Se um ARQUIVO for igual a \"-\", lê da entrada padrão."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Uso: %s [OPÇÃO]... ARQUIVOS\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Compara ARQUIVOS linha por linha."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "opção %s com valor conflitante \"%s\""
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "opções conflitantes de estilo de saída"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "cor inválida \"%s\""
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Somente em %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "não é possível comparar \"-\" com um diretório"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "Sem suporte à opção -D com diretórios"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdiretórios idênticos: %s e %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "O arquivo %s é %s, enquanto o arquivo %s é %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Os links simbólicos %s e %s são diferentes\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Os aquivos %s e %s são idênticos\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opções incompatíveis"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "\"-\" especificado para mais de um arquivo de entrada"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "falha de leitura"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              exibe todas as diferenças, com os conflitos\n"
 "                              entre parênteses"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1217,13 +1198,13 @@ msgstr ""
 "                              diferenças entre ARQUIVO1 e ARQUIVO2\n"
 "                              em ARQUIVO3"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          similar a -e, mas exibe conflitos entre "
 "parênteses"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1232,7 +1213,7 @@ msgstr ""
 "alterações\n"
 "                              que não se sobreponham"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
@@ -1240,17 +1221,17 @@ msgstr ""
 "alterações\n"
 "                              que se sobrepõem"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          similar a -x, mas exibe conflitos entre parentes"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          anexa os comandos \"w\" e \"q\" aos scripts de ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1258,27 +1239,27 @@ msgstr ""
 "-m, --merge                 emite arquivo mesclado atual, conforme\n"
 "                              -A se nenhuma outra opções for fornecida"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  trata todos os arquivos como texto"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     remove o caractere de retorno de carro\n"
 "                              (CR) ao final da linha na entrada"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           alinha tabulações introduzindo uma\n"
 "                              tabulação no início."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMA  usa o PROGRAMA para comparar os arquivos"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1286,24 +1267,24 @@ msgstr ""
 "-L, --label RÓTULO          usa RÓTULO ao invés do nome do arquivo\n"
 "                                (pode ser repetido até três vezes)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  mostra esta ajuda e sai"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               mostra informação da versão e sai"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Uso: %s [OPÇÃO]... ARQUIVO1 ARQUIVO2 ARQUIVO3\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Compara três arquivos linha por linha."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1327,45 +1308,45 @@ msgstr ""
 "internalmente e emite o arquivo mesclado atual. Para entradas incomuns,\n"
 "isto é mais robusto do que usar o ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Status de saída é 0 se houver sucesso, 1 se conflitos e 2 se problema."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "erro interno: confusão no formato dos blocos diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff falhou: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "erro interno: tipo de diff inválido em process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "formato de diff inválido; separador de diferença inválido"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "formato de diff inválido; última linha incompleta"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "o programa subsidiário \"%s\" não pôde ser invocado"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "formato de diff inválido; caracteres incorretos na linha de início"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "erro interno: tipo de diff inválido passado para a saída"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "o arquivo de entrada diminuiu"
 
@@ -1380,140 +1361,140 @@ msgid "%s: recursive directory loop"
 msgstr "%s: loop de diretório recursivo"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=ARQUIVO         age interativamente, enviando a saída para "
 "ARQUIVO"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i, --ignore-case            não faz distinção entre letras maiúsculas\n"
 "                              e minúsculas"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ignorar as diferenças causadas pela expansão\n"
 "                               da tabulação"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  ignora espaços em branco no fim das linhas"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change    ignora as diferenças na quantidade de espaços\n"
 "                               em branco"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignora todos os espaços em branco"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     ignora diferenças onde as linhas estão vazias"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=ER  ignora as diferenças em linhas que "
 "correspondem\n"
 "                                  à Expressão Regular"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      remove o caractere de retorno de carro\n"
 "                               (CR) ao final da linha na entrada"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   trata todos os arquivos como texto"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=NÚM              emite no máximo NÚM (padrão 130) colunas linhas"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            emite apenas a coluna da esquerda das linhas\n"
 "                               idênticas"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  não emite as linhas idênticas"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            expande as tabulações para espaços na saída"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=NÚM            paradas de tabulação a cada NÚM colunas\n"
 "                               (padrão=8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                se esforça para localizar o menor conjunto\n"
 "                               de diferenças"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      assume arquivos grandes e muitas alterações\n"
 "                               pequenas espalhadas"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAMA  usa o PROGRAMA para comparar os arquivos"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   mostra esta ajuda e sai"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                mostra informação da versão e sai"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Uso: %s [OPÇÃO]... ARQUIVO1 ARQUIVO2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Mesclagem lado a lado das diferenças entre ARQUIVO1 e ARQUIVO2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "não foi possível mesclar interativamente a entrada padrão"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "os dois arquivos a serem comparados são diretórios"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1547,6 +1528,18 @@ msgstr "prefixo desconhecido: %s"
 msgid "unparsable value for --palette"
 msgstr "valor não analisável para --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "argumento inválido para %s%s: \"%s\""
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "sufixo inválido no argumento para %s%s: \"%s\""
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "argumento grande demais para %s%s: \"%s\""
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Página do %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: a opção \"--%s\" não permite um argumento\n"
 
index e5e4154..e9ea49d 100644 (file)
Binary files a/po/ro.gmo and b/po/ro.gmo differ
index 0ae0b1c..c911b55 100644 (file)
--- a/po/ro.po
+++ b/po/ro.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 2.8.3\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2003-08-22 08:43+0300\n"
 "Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -17,25 +17,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr ""
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr ""
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "eroare de program"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stivã plinã(overflow)"
 
@@ -200,11 +200,11 @@ msgstr "%s: op
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr ""
 
@@ -277,7 +277,7 @@ msgstr "Expresie normal
 msgid "Unmatched ) or \\)"
 msgstr ") or \\) nedeschise"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Nu a existat nici o expresie normalã antecedentã"
 
@@ -285,41 +285,31 @@ msgstr "Nu a existat nici o expresie normal
 msgid "memory exhausted"
 msgstr "memorie plinã"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr ""
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr ""
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr ""
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 #, fuzzy
 msgid "unknown stream"
 msgstr "Eroare de sistem necunoscutã"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr ""
 
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "valoare --bytes invalidã `%s'"
-
-#: lib/xstrtol-error.c:68
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
@@ -339,30 +329,29 @@ msgstr ""
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, fuzzy, c-format
 msgid "Written by %s.\n"
 msgstr "Scris de Thomas Lord."
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, fuzzy, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Scris de Randy Smith."
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, fuzzy, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Scris de Randy Smith."
@@ -370,7 +359,7 @@ msgstr "Scris de Randy Smith."
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -380,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -390,7 +379,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -400,7 +389,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -410,7 +399,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +410,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -432,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -444,33 +433,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Fiºierele %s ºi %s diferã\n"
@@ -480,56 +463,56 @@ msgstr "Fi
 msgid "Binary files %s and %s differ\n"
 msgstr "Fiºierele binare %s ºi %s diferã\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Nici un element de linie nouã la sfârºitul fiºierului"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr ""
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, fuzzy, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Încercaþi  `%s --help' pentru mai multe informaþii."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, fuzzy, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "invalid --se ignorã valoarea iniþialã `%s'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "opþiunile -l ºi -s sunt incompatibile"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "scriere eºuatã"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "ieºire(output) standard"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 #, fuzzy
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes  Tipãreºte octeþii diferiþi."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 #, fuzzy
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i OMIS  --ignore-initial=OMIS  Omite primii octeþi OMISi din intrare(input)."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 #, fuzzy
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
@@ -537,41 +520,41 @@ msgid ""
 msgstr ""
 "  Omite primii OMIS1 octeþi din FIªIER1 ºi primii OMIS2 octeþi din FIªIER2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 #, fuzzy
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l  --verbose  Tipãreºte numerele octeþilor ºi valorile octeþilor diferiþi."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 #, fuzzy
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n LIMITà --bytes=LIMITà Comparã cel mult LIMITàocteþi."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr ""
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 #, fuzzy
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version  Tipãreºte informaþii despre versiune."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Folosire: %s [OPÞIUNE]... FIªIER1 [FIªIER2 [OMIS1 [OMIS2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Comparã douã fiºiere octet cu octet."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 #, fuzzy
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
@@ -579,12 +562,12 @@ msgid ""
 msgstr ""
 "OMIS1 ºi OMIS2 sunt numerele de octeþi care sã fie omiºi din fiecare fiºier."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -594,213 +577,213 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, ºi aºa mai departe pentru T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 #, fuzzy
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr ""
 "Dacã un FIªIER este `-' sau lipseºte, se citeºte intrarea(input) standard."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, fuzzy, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "valoare --bytes invalidã `%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, fuzzy, c-format
 msgid "missing operand after '%s'"
 msgstr "lipseºte operandul dupã `%s'"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, fuzzy, c-format
 msgid "extra operand '%s'"
 msgstr "operand în plus(extra) `%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s diferã: octetul %s, linia %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s diferã: octetul %s, linia %s este %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, fuzzy, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF în %s\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "%s %s diferã: octetul %s, linia %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "%s %s diferã: octetul %s, linia %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, fuzzy, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF în %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr ""
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, fuzzy, c-format
 msgid "invalid context length '%s'"
 msgstr "lungime invalidã de context `%s'"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "paginaþie nesuportatã de acest host"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "prea multe opþiuni de etichete fiºier"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, fuzzy, c-format
 msgid "invalid width '%s'"
 msgstr "lungime invalidã `%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "opþiuni de lungime în conflict"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, fuzzy, c-format
 msgid "invalid horizon length '%s'"
 msgstr "lungime de orizont invalidã `%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, fuzzy, c-format
 msgid "invalid tabsize '%s'"
 msgstr "mãrime tab invalidã `%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "opþiuni mãrime tab în conflict"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr " --from-file ºi --to-file sunt specificate împreunã"
 
-#: src/diff.c:891
+#: src/diff.c:893
 #, fuzzy
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "--normal  Afiºeazã un diff normal."
 
-#: src/diff.c:892
+#: src/diff.c:894
 #, fuzzy
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief  Afiºeazã doar dacã fiºierele diferã."
 
-#: src/diff.c:893
+#: src/diff.c:895
 #, fuzzy
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s  --report-identical-files  Raporteazã când douã fiºiere sunt asemãnãtoare."
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 
-#: src/diff.c:895
+#: src/diff.c:897
 #, fuzzy
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-w NUM  --width=NUM  Afiºeazã cel mult NUM (implicit 130) coloane tipãrite."
 
-#: src/diff.c:896
+#: src/diff.c:898
 #, fuzzy
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed  Afiºeazã un script ed."
 
-#: src/diff.c:897
+#: src/diff.c:899
 #, fuzzy
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs  Afiºeazã un diff în format RCS."
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr ""
 
-#: src/diff.c:899
+#: src/diff.c:901
 #, fuzzy
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w NUM  --width=NUM  Afiºeazã cel mult NUM (implicit 130) coloane tipãrite."
 
-#: src/diff.c:900
+#: src/diff.c:902
 #, fuzzy
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "-l  --left-column  Afiºeazã doar coloana din stânga a liniilor comune."
 
-#: src/diff.c:901
+#: src/diff.c:903
 #, fuzzy
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "-s  --suppress-common-lines  Nu afiºa liniile comune."
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
 
-#: src/diff.c:908
+#: src/diff.c:910
 #, fuzzy
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Schimbã tab-urile în spaþii la ieºire(output)."
 
-#: src/diff.c:909
+#: src/diff.c:911
 #, fuzzy
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T  --initial-tab  Aliniazã tab-urile adãugând în faþã un tab."
 
-#: src/diff.c:910
+#: src/diff.c:912
 #, fuzzy
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
@@ -808,56 +791,56 @@ msgstr ""
 "--tabsize=NUM  Opririle tab-ului vor fi la fiecare NUM (implicit 8) coloane "
 "tipãrite."
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 
-#: src/diff.c:912
+#: src/diff.c:914
 #, fuzzy
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l  --paginate  Trimite ieºirea(output) prin `pr' pentru a fi paginatã."
 
-#: src/diff.c:914
+#: src/diff.c:916
 #, fuzzy
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r  --recursive  Comparã recursiv orice subdirector întâlnit."
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 
-#: src/diff.c:916
+#: src/diff.c:918
 #, fuzzy
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file  Trateazã fiºierele lipsã ca vide."
 
-#: src/diff.c:917
+#: src/diff.c:919
 #, fuzzy
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "--unidirectional-new-file  Trateazã primele fiºiere lipsã ca vide."
 
-#: src/diff.c:918
+#: src/diff.c:920
 #, fuzzy
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "--ignore-file-name-case  Ignorã cazul când se comparã numele de fiºiere."
 
-#: src/diff.c:919
+#: src/diff.c:921
 #, fuzzy
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "--no-ignore-file-name-case  Ia în calcul cazul atunci când se comparã numele "
 "de fiºiere."
 
-#: src/diff.c:920
+#: src/diff.c:922
 #, fuzzy
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x TIP  --exclude=TIP  Exclude fiºierele care se potrivesc TIParului."
 
-#: src/diff.c:921
+#: src/diff.c:923
 #, fuzzy
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
@@ -865,7 +848,7 @@ msgstr ""
 "-X FIªIER  --exclude-from=FIªIER  Exclude fiºierele care se potrivesc "
 "oricãrui tipar din FIªIER."
 
-#: src/diff.c:922
+#: src/diff.c:924
 #, fuzzy
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
@@ -873,7 +856,7 @@ msgstr ""
 "-S FIªIER  --starting-file=FIªIER  Începe cu FIªIER în compararea "
 "directoarelor."
 
-#: src/diff.c:923
+#: src/diff.c:925
 #, fuzzy
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
@@ -882,7 +865,7 @@ msgstr ""
 "--from-file=FIªIER1  Comparã FIªIER1 cu toþi operanzii.  FIªIER1 poate fi "
 "director."
 
-#: src/diff.c:925
+#: src/diff.c:927
 #, fuzzy
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
@@ -891,37 +874,37 @@ msgstr ""
 "--to-file=FIªIER2  Comparã toþi operanzii cu FIªIER2.  FIªIER2 poate fi "
 "director."
 
-#: src/diff.c:928
+#: src/diff.c:930
 #, fuzzy
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i  --ignore-case  Ignorã diferenþele de caz din conþinutul fiºierului."
 
-#: src/diff.c:929
+#: src/diff.c:931
 #, fuzzy
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignorã schimbãrile produse de modificarea tab-"
 "ului."
 
-#: src/diff.c:930
+#: src/diff.c:932
 #, fuzzy
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignorã tot spaþiul vid."
 
-#: src/diff.c:931
+#: src/diff.c:933
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Ignorã schimbãrile din spaþiul vid."
 
-#: src/diff.c:932
+#: src/diff.c:934
 #, fuzzy
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space  Ignorã tot spaþiul vid."
 
-#: src/diff.c:933
+#: src/diff.c:935
 #, fuzzy
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
@@ -929,31 +912,31 @@ msgstr ""
 "-B  --ignore-blank-lines  Ignorã schimbãrile unde toate liniile sunt "
 "goale(blank)."
 
-#: src/diff.c:934
+#: src/diff.c:936
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I RE  --ignore-matching-lines=RE  Ignorã schimbãrile la toate liniile care "
 "se potrivesc RE-ului."
 
-#: src/diff.c:936
+#: src/diff.c:938
 #, fuzzy
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text  Trateazã toate fiºierele ca text."
 
-#: src/diff.c:937
+#: src/diff.c:939
 #, fuzzy
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminã returul de car(carriage return) final la "
 "intrare(input)."
 
-#: src/diff.c:939
+#: src/diff.c:941
 #, fuzzy
 msgid "    --binary                    read and write data in binary mode"
 msgstr "--binary  Citeºte ºi scrie date în mod binar."
 
-#: src/diff.c:942
+#: src/diff.c:944
 #, fuzzy
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
@@ -961,38 +944,38 @@ msgstr ""
 "-D NUME  --ifdef=NUME  Afiºeazã fiºierul rezultat(merged) pentru a arãta "
 "diff-urile`#ifdef NAME'."
 
-#: src/diff.c:943
+#: src/diff.c:945
 #, fuzzy
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "--GTYPE-group-format=GFMT  Similar, dar formatul de intrare GTYPE se "
 "grupeazã cu GFMT."
 
-#: src/diff.c:944
+#: src/diff.c:946
 #, fuzzy
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "--line-format=LFMT  Similar, dar formateazã toate liniile cu LFMT."
 
-#: src/diff.c:945
+#: src/diff.c:947
 #, fuzzy
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "--LTYPE-line-format=LFMT  Similar, dar formateazã liniile de intrare LTYPE "
 "cu LFMT."
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr ""
 
-#: src/diff.c:948
+#: src/diff.c:950
 #, fuzzy
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE este `old', `new', sau `unchanged'.  GTYPE este LTYPE sau `changed'."
 
-#: src/diff.c:949
+#: src/diff.c:951
 #, fuzzy
 msgid ""
 "  GFMT (only) may contain:\n"
@@ -1022,7 +1005,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1"
 
-#: src/diff.c:961
+#: src/diff.c:963
 #, fuzzy
 msgid ""
 "  LFMT (only) may contain:\n"
@@ -1036,7 +1019,7 @@ msgstr ""
 "    %[-][WIDTH][.[PREC]]{doxX}n  specificaþii  stil printf-pentru "
 "introducerea numãrului de linie"
 
-#: src/diff.c:965
+#: src/diff.c:967
 #, fuzzy
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
@@ -1050,18 +1033,18 @@ msgstr ""
 "    %c'C'  caracterul singular C\n"
 "    %c'\\OOO'  caracterul cu codul octal OOO"
 
-#: src/diff.c:971
+#: src/diff.c:973
 #, fuzzy
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d  --minimal  Încearcã din greu sã gãseºti un set mai mic de schimbãri"
 
-#: src/diff.c:972
+#: src/diff.c:974
 #, fuzzy
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "--horizon-lines=NUM  Reþine NUM linii de prefix ºi sufix comun."
 
-#: src/diff.c:973
+#: src/diff.c:975
 #, fuzzy
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
@@ -1069,37 +1052,37 @@ msgstr ""
 "-H  --speed-large-files  Presupune fiºiere mari ºi multe modificãri mici "
 "împrãºtiate."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 
-#: src/diff.c:980
+#: src/diff.c:982
 #, fuzzy
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version  Tipãreºte informaþii despre versiune."
 
-#: src/diff.c:982
+#: src/diff.c:984
 #, fuzzy
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FIªIEREle sunt `FIªIER1 FIªIER2' sau `DIR1 DIR2' sau `DIR FIªIER...' or "
 "`FIªIER... DIR'."
 
-#: src/diff.c:983
+#: src/diff.c:985
 #, fuzzy
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
@@ -1107,97 +1090,97 @@ msgstr ""
 "Dacã --from-file sau --to-file sunt precizate, nu existã restricþii pe "
 "FIªIERE."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 #, fuzzy
 msgid "If a FILE is '-', read standard input."
 msgstr "Dacã FIªIER este `-', se citeºte intrarea(input) standard."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Folosire: %s [OPÞIUNE]... FIªIERE\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 #, fuzzy
 msgid "Compare FILES line by line."
 msgstr "Comparã fiºierele linie cu linie."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, fuzzy, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "Existã un conflict cu %s în valoarea opþiunii `%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "Conflict în opþiunile stilului de afiºare(output)"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, fuzzy, c-format
 msgid "invalid color '%s'"
 msgstr "lungime invalidã de context `%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Doar în %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 #, fuzzy
 msgid "cannot compare '-' to a directory"
 msgstr "nu se poate compara `-' cu un director"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "opþiunea -D nu este compatibilã cu directoarele"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Subdirectoare comune: %s ºi %s.\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Fiºierul %s este un %s pe când fiºierul %s este un %s.\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, fuzzy, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Fiºierele %s ºi %s diferã\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Fiºierele %s ºi %s sunt identice\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 #, fuzzy
 msgid "Randy Smith"
 msgstr "Scris de Randy Smith."
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "opþiuni incompatibile"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 #, fuzzy
 msgid "'-' specified for more than one input file"
 msgstr "`-' specificat pentru mai mult de un fiºier de intrare(input)"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "citire eºuatã"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 #, fuzzy
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr "-A  --show-all  Afiºeazã toate modificãrile, conflictele de paranteze."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 #, fuzzy
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
@@ -1206,14 +1189,14 @@ msgstr ""
 "-e  --ed  Trimite(output) modificãrile nerezultate(unmerged) de la "
 "FIªIER_VECHI la  FIªIERUL_VOSTRU în FIªIERUL_MEU.."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 #, fuzzy
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E  --show-overlap  Afiºeazã modificãrile nerezultate(unmerged), conflictele "
 "de paranteze."
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 #, fuzzy
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
@@ -1222,74 +1205,74 @@ msgstr ""
 "-3  --easy-only  Afiºeazã schimbãrile nesuprapuse(nonoverlapping) ºi "
 "nerezultate(unmerged)."
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 #, fuzzy
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x  --overlap-only  Afiºeazã toate schimbãrile de suprapunere."
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 #, fuzzy
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i  Adaugã comenzile `w' ºi `q' la scripturile ed."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 #, fuzzy
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text  Trateazã toate fiºierele ca text."
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 #, fuzzy
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminã returul de car(carriage return) final la "
 "intrare(input)."
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 #, fuzzy
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T  --initial-tab  Aliniazã tab-urile adãugând în faþã un tab."
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 #, fuzzy
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAM  Foloseºte PROGRAM pentru a compara fiºierele."
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 #, fuzzy
 msgid "-v, --version               output version information and exit"
 msgstr "-v  --version  Tipãreºte informaþii despre versiune."
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Folosire: %s [OPÞIUNE]... FIªIERUL_MEU FIªIER_VECHI FIªIERUL_TÃU\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Comparã trei fiºiere linie cu linie"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1303,45 +1286,45 @@ msgid ""
 "robust than using ed.\n"
 msgstr ""
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "eroare internã: zãpãcealã în formatul blocurilor diff"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff eºuat: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "eroare internã: tip diff invalid în process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "format diff invalid; separator de modificare invalid"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "format diff invalid; ultimã-linie incompletã"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, fuzzy, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "programul subsidiar `%s' nu a fost gãsit"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "format diff invalid; caractere precedente liniei incorecte"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "eroare internã: tip invalid de diff trimis spre ieºire(output)"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "fiºier de intrare(input) micºorat"
 
@@ -1356,12 +1339,12 @@ msgid "%s: recursive directory loop"
 msgstr ""
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 #, fuzzy
 msgid "Thomas Lord"
 msgstr "Scris de Thomas Lord."
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 #, fuzzy
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
@@ -1369,86 +1352,86 @@ msgstr ""
 "-o FIªIER  --output=FIªIER  Opereazã interactiv, trimiþând outputul spre "
 "FIªIER."
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 #, fuzzy
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr ""
 "-i  --ignore-case  Considerã majusculele ºi minusculele ca fiind aceleaºi."
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 #, fuzzy
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion  Ignorã schimbãrile produse de modificarea tab-"
 "ului."
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 #, fuzzy
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-w  --ignore-all-space  Ignorã tot spaþiul vid."
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 #, fuzzy
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change  Ignorã schimbãrile din spaþiul vid."
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 #, fuzzy
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space  Ignorã tot spaþiul gol."
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 #, fuzzy
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines  Ignorã schimbãrile unde toate liniile sunt "
 "goale(blank)."
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 #, fuzzy
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I RE  --ignore-matching-lines=RE  Ignorã schimbãrile la toate liniile care "
 "se potrivesc RE-ului."
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 #, fuzzy
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "--strip-trailing-cr  Eliminã returul de car(carriage return) final la "
 "intrare(input)."
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 #, fuzzy
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text  Trateazã toate fiºierele ca text."
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 #, fuzzy
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w NUM  --width=NUM  Afiºeazã cel mult NUM (implicit 130) coloane tipãrite."
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 #, fuzzy
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l  --left-column  Afiºeazã doar coloana din stânga a liniilor comune."
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 #, fuzzy
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  Nu afiºa liniile comune."
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 #, fuzzy
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs  Schimbã tab-urile în spaþii la ieºire(output)."
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 #, fuzzy
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
@@ -1456,13 +1439,13 @@ msgstr ""
 "--tabsize=NUM  Opririle tab-ului vor fi la fiecare NUM (implicit 8) coloane "
 "tipãrite."
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 #, fuzzy
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d  --minimal  Încearcã din greu sã gãseºti un set mai mic de schimbãri"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 #, fuzzy
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
@@ -1470,39 +1453,39 @@ msgstr ""
 "-H  --speed-large-files  Presupune fiºiere mari ºi multe modificãri mici "
 "împrãºtiate."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 #, fuzzy
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "--diff-program=PROGRAM  Foloseºte PROGRAM pentru a compara fiºierele."
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 #, fuzzy
 msgid "-v, --version                output version information and exit"
 msgstr "-v  --version  Tipãreºte informaþii despre versiune."
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Folosire: %s [OPÞIUNE]... FIªIER1 FIªIER2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 #, fuzzy
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Analizã pas cu pas a diferenþelor de fiºiere."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "nu poate rezulta(merge) interactiv intrarea(input) standard"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "ambele fiºiere de comparat sunt directoare"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 #, fuzzy
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
@@ -1539,6 +1522,10 @@ msgid "unparsable value for --palette"
 msgstr ""
 
 #, fuzzy
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "valoare --bytes invalidã `%s'"
+
+#, fuzzy
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: opþiunea `--%s' nu permite parametri\n"
 
index 60ee907..ba573a2 100644 (file)
Binary files a/po/ru.gmo and b/po/ru.gmo differ
index b3525b2..dcd40b1 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -3,13 +3,13 @@
 # This file is distributed under the same license as the diffutils package.
 #
 # Oleg S. Tihonov <ost@tatnipi.ru>, 1998, 2001, 2002, 2005, 2007.
-# Yuri Kozlov <yuray@komyakino.ru>, 2017, 2018.
+# Yuri Kozlov <yuray@komyakino.ru>, 2017, 2018, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 05:11+0300\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-22 12:14+0300\n"
 "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
 "Language-Team: Russian <gnu@d07.ru>\n"
 "Language: ru\n"
@@ -19,27 +19,27 @@ msgstr ""
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Lokalize 2.0\n"
+"X-Generator: Lokalize 20.12.0\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "неверный аргумент %s для %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "двусмысленный аргумент %s для %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Допустимые аргументы:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "ошибка программы"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "переполнение стека"
 
@@ -199,11 +199,11 @@ msgstr "%s: для параметра требуется аргумент — «
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "?"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "?"
 
@@ -275,7 +275,7 @@ msgstr "Регулярное выражение слишком велико"
 msgid "Unmatched ) or \\)"
 msgstr "Непарная ) или \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Регулярное выражение не было задано раньше"
 
@@ -283,41 +283,31 @@ msgstr "Регулярное выражение не было задано ра
 msgid "memory exhausted"
 msgstr "память исчерпана"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "стандартный ввод"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "стандартный вывод"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "стандартный поток ошибок"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "неизвестный поток"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "не удалось повторно открыть %s в режиме %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "неверный аргумент %s%s в ?%s?"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "неверный суффикс в %s%s аргументе ?%s?"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "аргумент %s%s слишком велик для ?%s?"
+msgid "standard file descriptors"
+msgstr "стандартные файловые дескрипторы"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -336,36 +326,32 @@ msgstr "Упакован %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Лицензия GPLv3+: GNU GPL версии 3 или новее <https://gnu.org/licenses/gpl."
-"html>\n"
-"Это свободное ПО: вы можете продавать и распространять его.\n"
-"Нет НИКАКИХ ГАРАНТИЙ до степени, разрешённой законом.\n"
-"\n"
+"Лицензия GPLv3+: GNU GPL версии 3 или новее <%s>.\n"
+"Это свободное ПО: вы можете изменять и распространять его.\n"
+"Нет НИКАКИХ ГАРАНТИЙ в пределах действующего законодательства.\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Автор программы ? %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Авторы программы ? %s и %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Авторы программы ? %s, %s и %s.\n"
@@ -373,7 +359,7 @@ msgstr "Авторы программы ? %s, %s и %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,35 +450,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Об ошибках сообщайте по адресу <%s>\n"
+msgid "Report bugs to: %s\n"
+msgstr "Об ошибках сообщайте по адресу: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Об ошибках в %s сообщайте по адресу %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Домашняя страница %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Домашняя страница %s: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Справка по работе с программами GNU: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Справка по работе с программами GNU: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Файлы %s и %s различаются\n"
@@ -502,53 +480,53 @@ msgstr "Файлы %s и %s различаются\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Двоичные файлы %s и %s различаются\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "В конце файла нет новой строки"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Торбьёрн Гронлунд (Torbjorn Granlund)"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "Дэвид Маккензи (David MacKenzie)"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "По команде ?%s --help? можно получить дополнительную информацию."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "недопустимое для --ignore-initial  значение ?%s?"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "ключи -l и -s несовместимы"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "ошибка при записи"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "стандартный вывод"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes       выводить различающиеся байты"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i, --ignore-initial=Н  пропустить первые Н байт ввода"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -557,38 +535,38 @@ msgstr ""
 "                        пропустить первые Н1 байт файла ФАЙЛ1\n"
 "                        и первые Н2 байт файла ФАЙЛ2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l,  --verbose          выводить номера и значения всех различающихся байт"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=Н      сравнивать не более Н байт"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent   не показывать обычные сообщения"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help              показать эту справку и выйти"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version           показать информацию о версии и выйти"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Использование: %s [КЛЮЧ]? ФАЙЛ1 [ФАЙЛ2 [Н1 [Н2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Побайтово сравнивает два файла."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -596,13 +574,13 @@ msgstr ""
 "Необязательные Н1 и Н2 ? это число байт, которые следует пропустить\n"
 "в каждом файле (по умолчанию 0)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Аргументы, обязательные для длинных параметров, обязательны и для коротких.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -612,199 +590,199 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, и так далее для T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Если ФАЙЛ не задан или задан как ?-?, то читается стандартный ввод."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Выходной статус равен 0, если входные файлы идентичны, 1 ? если\n"
 "различаются, и 2 в случае неполадок."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "недопустимое значение --bytes ?%s?"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "пропущен операнд после ?%s?"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "лишний операнд ?%s?"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s различаются: байт %s, строка %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s различаются: байт %s, строка %s равен %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF в %s, который пуст\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF в %s после байта %s, строка %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF в %s после байта %s в строке %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF в %s после байта %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Поль Эггерт (Paul Eggert)"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Майк Гертель (Mike Haertel)"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "Дэвид Хейз (David Hayes)"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Ричард Столлман (Richard Stallman)"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Лен Тауэр (Len Tower)"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "недопустимая длина контекста ?%s?"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "разбиение на страницы не поддерживается на данной машине"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "слишком много ключей задающих метки файлов"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "недопустимая ширина ?%s?"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "противоречивые ключи задания ширины"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "недопустимая длина горизонта ?%s?"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "недопустимая ширина табуляции ?%s?"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "противоречивые ключи задания ширины табуляции"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "необходимо задать как --from-file, так и --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal            выводить в обычном формате diff (по умолчанию)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief             напечатать только различаются ли файлы"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files\n"
 "                        сообщать об одинаковых файлах"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C Н, --context[=Н] выводить по Н (по умолчанию 3) строк\n"
 "                        копируемого контекста"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U Н, --unified[=Н] выводить по Н (по умолчанию 3) строк\n"
 "                        объединенного контекста"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                выводить как сценарий ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs               выводить в формате RCS diff"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side      выводить в две колонки"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=Н           выводить не более Н знаков в строке\n"
 "                        (по умолчанию 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "    --left-column       выводить только левую колонку общих строк"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr ""
 "    --suppress-common-lines\n"
 "                        не выводить общие строки"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function   отображать в какой функции Си находится\n"
 "                        каждое изменение"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE\n"
 "                        отображать последнюю совпавшую с RE строку"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -812,24 +790,24 @@ msgstr ""
 "    --label МЕТКА       использовать МЕТКУ вместо имени файла и времени\n"
 "                        (может повторяться)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs       раскрывать при выводе символы табуляции в пробелы"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab       выравнивать строки, добавляя в начало символ "
 "табуляции"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=Н         табуляция через каждые Н знаков (по умолчанию 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -837,61 +815,61 @@ msgstr ""
 "                        не вставлять пробел или табуляцию перед\n"
 "                        выводом пустых строк"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate          направить вывод в pr для разбиения на страницы"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive         рекурсивно сравнивать подкаталоги"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference    не переходить по символьным ссылкам"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file          воспринимать несуществующие файлы как пустые"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file\n"
 "                        воспринимать несуществующие первые файлы как пустые"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case\n"
 "                        игнорировать регистр в именах файлов"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case\n"
 "                        учитывать регистр в именах файлов"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=ОБРАЗЕЦ   исключить файлы, чьи имена совпадают с ОБРАЗЦОМ"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=ФАЙЛ исключить файлы с именами, совпадающими\n"
 "                        с любым образцом из ФАЙЛА"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=ФАЙЛ\n"
 "                        при сравнении каталогов начать с ФАЙЛА"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -899,7 +877,7 @@ msgstr ""
 "    --from-file=ФАЙЛ1   сравнить ФАЙЛ1 со всеми операндами;\n"
 "                        ФАЙЛ1 может быть каталогом"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -907,88 +885,88 @@ msgstr ""
 "    --to-file=ФАЙЛ2     сравнить все операнды с ФАЙЛОМ2;\n"
 "                        ФАЙЛ2 может быть каталогом"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i, --ignore-case       игнорировать регистр в содержимом файла"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion\n"
 "                        игнорировать изменения, вызванные раскрытием "
 "табуляции"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space\n"
 "                        игнорировать пробельные символы в конце строки"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change\n"
 "                        игнорировать изменения количества пробельных символов"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space  игнорировать все пробельные символы"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines\n"
 "                        игнорировать изменения количества пустых строк"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE\n"
 "                        игнорировать изменения строк, совпадающих с RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text              считать все файлы текстовыми"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr удалять из ввода завершающий возврат каретки"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary            читать и записывать файлы в двоичном режиме"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=ИМЯ         выводить заплаты, использующие конструкцию ?#ifdef "
 "ИМЯ?"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT\n"
 "                        форматировать входные группы типа GTYPE\n"
 "                        в соответствии GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT  форматировать все входные строки в соответствии с "
 "LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT\n"
 "                        форматировать входные строки типа LTYPE\n"
 "                        в соответствии LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -996,13 +974,13 @@ msgstr ""
 "Параметры форматирования предоставляют точный контроль над конечным diff\n"
 "обобщающими -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE может быть ?old?, ?new? или ?unchanged?.\n"
 "  Значение GTYPE те же или ?changed?."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1031,7 +1009,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  если A равно B, то T, иначе E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1043,7 +1021,7 @@ msgstr ""
 "    %l  содержимое строки, исключая все конечные символы новой строки\n"
 "    %[-][ШИРИНА][.[ТОЧН]]{doxX}n  формат номера входной строки в стиле printf"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1057,32 +1035,32 @@ msgstr ""
 "    %c'\\OOO'  символ в восьмеричным коде OOO\n"
 "    C    символ C (символы, представляющие сами себя)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal           пытаться найти наименьший набор изменений"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=Н   оставлять Н общих строк до и после различающихся"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files предполагать, что файлы большие и есть много\n"
 "                        разбросанных мелких изменений"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=КОГДА]     вывод в цвете; КОГДА может быть «never», «always»\n"
-"                        или «auto» (по умолчанию)"
+"                        или «auto»; без уточнения используется --color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1091,112 +1069,112 @@ msgstr ""
 "    --palette=ПАЛИТРА   набор цветов при активном --color; ПАЛИТРА это\n"
 "                        список свойств terminfo через двоеточие"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help              показать эту справку и выйти"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version           показать информацию о версии и выйти"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ФАЙЛЫ это ?ФАЙЛ1 ФАЙЛ2?, ?КАТАЛОГ1 КАТАЛОГ2?, ?КАТАЛОГ ФАЙЛ??\n"
 "или ?ФАЙЛ? КАТАЛОГ?."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr "Если задан --from-file или --to-file, то на ФАЙЛЫ нет ограничений."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Если ФАЙЛ задан как ?-?, читает стандартный ввод."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Использование: %s [КЛЮЧ]? ФАЙЛЫ\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Построчно сравнивает ФАЙЛЫ."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "противоречивое значение %s для ключа ?%s?"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "противоречивые ключи задания стиля вывода"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "неправильное указание цвета ?%s?"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Только в %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "невозможно сравнить ?-? с каталогом"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "ключ -D не поддерживается для каталогов"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Общие подкаталоги: %s и %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Файл %s это %s, тогда как файл %s ? %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Символические ссылки %s и %s различаются\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Файлы %s и %s идентичны\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Рэнди Смит (Randy Smith)"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "несовместимые ключи"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "?-? задан для более одного входного файла"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "ошибка чтения"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all          выводить все изменения, заключая конфликтные\n"
 "                        места в скобки"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1204,30 +1182,30 @@ msgstr ""
 "-e, --ed                вывести сценарий ed, изменяющий\n"
 "                        СТАРЫЙ_ФАЙЛ из ВАШ_ФАЙЛ, в МОЙ_ФАЙЛ"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap      как -e плюс конфликты в скобках"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr "-3, --easy-only         как -e, но только непересекающиеся изменения"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x, --overlap-only      как -e, но только перекрывающиеся изменения"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                      как -x плюс конфликты в скобках"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                      добавить команды ?w? и ?q? в сценарий ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1235,27 +1213,27 @@ msgstr ""
 "-m, --merge             выводить объединенный файл согласно\n"
 "                        -A, если не указаны другие параметры"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text              считать все файлы текстовыми"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr удалять из ввода завершающий возврат каретки"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab       выравнивать строки, добавляя в начало символ "
 "табуляции"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=ПРОГРАММА\n"
 "                        для сравнения файлов использовать ПРОГРАММУ"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1263,24 +1241,24 @@ msgstr ""
 "-L, --label=МЕТКА       использовать МЕТКУ вместо имени файла\n"
 "                        (может повторяться до трёх раз)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help              показать эту справку и выйти"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version           показать информацию о версии и выйти"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Использование: %s [КЛЮЧ]? МОЙ_ФАЙЛ СТАРЫЙ_ФАЙЛ ВАШ_ФАЙЛ\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Построчно сравнивает три файла."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1303,47 +1281,47 @@ msgstr ""
 "и выводить уже объединённый файл. Для необычного ввода это более\n"
 "разумно, чем использование ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Выходной статус равен 0 в случае успеха, 1 в случае конфликтов и 2 в\n"
 "случае неполадок."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "внутренняя ошибка: поврежденный формат блоков заплаты"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: ошибка при поиске различий: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "внутренняя ошибка: неверный тип заплаты в функции process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "неверный формат заплаты; неверный разделитель изменения"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "неверный формат заплаты; неполная последняя строка"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "не удалось запустить вспомогательную программу ?%s?"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "неверный формат заплаты; неправильные первые символы строки"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "внутренняя ошибка: на выход передан неверный тип заплаты"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "входной файл уменьшился"
 
@@ -1358,136 +1336,136 @@ msgid "%s: recursive directory loop"
 msgstr "%s: каталоги зациклены"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Томас Лорд (Thomas Lord)"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=ФАЙЛ       работать интерактивно, записывая вывод в ФАЙЛ"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case       игнорировать регистр символов"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion\n"
 "                        игнорировать изменения, вызванные раскрытием "
 "табуляции"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space\n"
 "                        игнорировать пробельные символы в конце строки"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change\n"
 "                        игнорировать изменения количества пробельных символов"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space  игнорировать все пробельные символы"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines\n"
 "                        игнорировать изменения количества пустых строк"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE\n"
 "                        игнорировать изменения строк, совпадающих с RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr удалять из ввода завершающий возврат каретки"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text              считать все файлы текстовыми"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=Н           выводить не более Н знаков в строке\n"
 "                        (по умолчанию 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "--left-column           выводить только левую колонку общих строк"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr ""
 "--suppress-common-lines\n"
 "                        не выводить общие строки"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs       раскрывать при выводе символы табуляции в пробелы"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=Н         табуляция через каждые Н знаков (по умолчанию 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal           пытаться найти наименьший набор изменений"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files предполагать, что файлы большие и есть много\n"
 "                        разбросанных мелких изменений"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=ПРОГРАММА\n"
 "                        для сравнения файлов использовать ПРОГРАММУ"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help              показать эту справку и выйти"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version           показать информацию о версии и выйти"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Использование: %s [КЛЮЧ]? ФАЙЛ1 ФАЙЛ2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Интерактивно объединяет различия между ФАЙЛОМ1 и ФАЙЛОМ2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "невозможно интерактивно объединить стандартный ввод"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "оба сравниваемых файла ? каталоги"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1521,6 +1499,18 @@ msgstr "неизвестный префикс: %s"
 msgid "unparsable value for --palette"
 msgstr "невозможно разобрать значение --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "неверный аргумент %s%s в ?%s?"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "неверный суффикс в %s%s аргументе ?%s?"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "аргумент %s%s слишком велик для ?%s?"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Домашняя страница %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: у параметра ?--%s? не может быть аргумента\n"
 
@@ -1629,7 +1619,3 @@ msgstr "невозможно разобрать значение --palette"
 
 #~ msgid "subsidiary program `%s' failed"
 #~ msgstr "дочерняя программа `%s' завершилась ошибкой"
-
-#~ msgid "subsidiary program `%s' failed (exit status %d)"
-#~ msgstr ""
-#~ "вспомогательная программа `%s' завершилась неуспешно (выходной статус %d) "
index c1e8d60..3794688 100644 (file)
Binary files a/po/sr.gmo and b/po/sr.gmo differ
index 090259f..4cc8d7e 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,14 +1,14 @@
 # Serbian translation of `diffutils'.
-# Copyright © 2004 Free Software Foundation, Inc.
+# Copyright © 2020 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
 # Aleksandar Jelenak <jelenak@netlinkplus.net>, 2004.
-# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2013—2017.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2013—2020.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.5.25\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2017-06-18 08:29+0200\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-26 10:13+0200\n"
 "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
 "Language-Team: Serbian <(nothing)>\n"
 "Language: sr\n"
@@ -19,25 +19,25 @@ msgstr ""
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "неисправан аргумент „%s“ за „%s“"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "нејасан аргумент „%s“ за „%s“"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Исправни аргументи су:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "грешка програма"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "стек препуњен"
 
@@ -197,11 +197,11 @@ msgstr "%s: опција захтева аргумент -- „%c“\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "„"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "“"
 
@@ -273,7 +273,7 @@ msgstr "Регуларан израз је исувише велики"
 msgid "Unmatched ) or \\)"
 msgstr "Неупарено ) или \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Нема претходног регуларног израза"
 
@@ -281,41 +281,31 @@ msgstr "Нема претходног регуларног израза"
 msgid "memory exhausted"
 msgstr "меморија је исцрпљена"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "стдулаз"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "стдизлаз"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "стдгрешка"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "непознат ток"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "нисам успео да поново отворим „%s“ са режимом %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "неисправан %s%s аргумент „%s“"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "неисправан суфикс у %s%s аргументу „%s“"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s аргумент „%s“ је превелик"
+msgid "standard file descriptors"
+msgstr "стандардни описници датотека"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,37 +324,32 @@ msgstr "Запаковао је %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
-#, fuzzy
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Дозвола ОЈЛв3+: Гнуова ОЈЛ издање 3 или касније <http://gnu.org/licenses/gpl."
-"html>.\n"
+"Дозвола ОЈЛв3+: Гнуова ОЈЛ издање 3 или новије <%s>.\n"
 "Ово је слободан софтвер: слободни сте да га мењате и расподељујете.\n"
 "Нема НИКАКВЕ ГАРАНЦИЈЕ, у обиму допуштеном законом.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Написао: %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Написали: %s и %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Написали: %s, %s и %s.\n"
@@ -372,7 +357,7 @@ msgstr "Написали: %s, %s и %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -384,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -396,7 +381,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -408,7 +393,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -420,7 +405,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -434,7 +419,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -448,7 +433,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -463,36 +448,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Грешке пријавите на: %s\n"
+msgid "Report bugs to: %s\n"
+msgstr "Грешке пријавите на: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Грешке програма „%s“ пријавите на: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s матична страница: <%s>\n"
 
-#: lib/version-etc.c:253
-#, fuzzy, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s матична страница: <http://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-#, fuzzy
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "Општа помоћ користећи ГНУ софтвер: <http://www.gnu.org/gethelp/>\n"
+#: lib/version-etc.c:260
+#, c-format
+msgid "General help using GNU software: <%s>\n"
+msgstr "Општа помоћ за коришћење ГНУ софтвера: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Датотеке „%s“ и „%s“ су различите\n"
@@ -502,95 +478,95 @@ msgstr "Датотеке „%s“ и „%s“ су различите\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Бинарне датотеке %s и %s различите\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Без новог реда на крају датотеке"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Торбјорн Гранлунд"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "Дејвид Мек Кензи"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Покушајте „%s --help“ за више информација."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "неисправна „--ignore-initial“ вредност „%s“"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "опције -l и -s не иду заједно"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "записивање није успело"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "стандардни излаз"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr ""
 "-b  --print-bytes                   исписује бајтове који се разликују."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i БРОЈ  --ignore-initial=БРОЈ      изоставља првих БРОЈ бајтова улаза."
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
 msgstr ""
 "  изоставља првих БРОЈ1 бајтова ДАТОТЕКЕ1 и првих БРОЈ2 бајтова ДАТОТЕКЕ2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l  --verbose                       исписује редни број и вредност бајтова "
 "који се разликују."
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr ""
 "-n ОГРАНИЧЕЊЕ  --bytes=ОГРАНИЧЕЊЕ   пореди до највише ОГРАНИЧЕЊЕ бајтова."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent               потискује све обичне излазе"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                          приказује ову помоћ и излази"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version                       исписује податке о издању."
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Употреба: %s [ОПЦИЈА]... ДАТОТЕКА1 [ДАТОТЕКА2 [БРОЈ1 [БРОЈ2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Поредите две датотеке бајт по бајт."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -598,13 +574,13 @@ msgstr ""
 "Изборни БРОЈ1 и БРОЈ2 су бројеви бајтова за изостављање на почетку\n"
 "сваке датотеке (подразумева се нула)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Обавезни аргументи за дуге опције су обавезни и за кратке опције такође.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -615,191 +591,191 @@ msgstr ""
 "1,073,741,824,\n"
 "итд. за T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Чита стандардни улаз ако ДАТОТЕКА недостаје или је „-“."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "Излазно стање је 0 ако су улази исти, 1 за различите, 2 за грешку."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "неисправна --bytes вредност „%s“"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "недостаје оператор после „%s“"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "вишак оператор „%s“"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s се разликују: бајт %s, ред %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s се разликују: бајт %s, ред %s је %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: крај датотеке на %s које је празно\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: крај датотеке на %s након бајта %s, %s. ред\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: крај датотеке на %s након бајта %s, у %s. реду\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: крај датотеке на %s након бајта %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Пол Егерт"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Мајк Хартел"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "Дејвид Хејес"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Ричард Столман"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Лен Тауер"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "неисправна дужина склопа „%s“"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "прелом страна није подржан на овом рачунару"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "исувише опција за ознаку датотеке"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "неисправна дужина „%s“"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "сукобљене опције ширине"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "неисправна дужина видокруга „%s“"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "неисправна величина табулатора „%s“"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "сукобљене опције величине табулатора"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "„--from-file“ и „--to-file“ су наведени оба"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  исписује обичне разлике (основно)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q  --brief                   исписује само када се датотеке разликују"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  извештава када су две датотеке исте"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C БРОЈ, --context[=БРОЈ] исписује БРОЈ (почетно 3) редова умноженог "
 "склопа"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-w БРОЈ  --width=БРОЈ         исписује БРОЈ (почетно 3) редова обједињеног "
 "склопа"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e  --ed                      исписује ед спис"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n  --rcs                     исписује РЦС запис разлика"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            исписује у две колоне"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-w БРЈ  --width=БРЈ           исписује на највише БРЈ (почетно 130) колона"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "-l  --left-column             исписује само леву колону заједничких редова"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "-s  --suppress-common-lines   не приказује заједничке редове"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         приказује у којој Ц функцији је свака промена"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=РИ   приказује најскорији ред који одговара РИ"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -808,82 +784,82 @@ msgstr ""
 "временске ознаке\n"
 "                                (може да се понавља)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t  --expand-tabs             развија табулаторе у размаке за излаз"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab             поравнава табулаторе додајући један табулатор."
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "--tabsize=БРЈ                 величина табулатора је БРЈ (почетно 8) колона"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "--suppress-blank-empty        потискује размак или табулатор пре празних "
 "редова излаза"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l  --paginate                пропушта излаз кроз „pr“ за прелом"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r  --recursive                 дубински упоређује све пронађене "
 "поддиректоријуме"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            не прати симболичке везе"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file                  сматра празним недостајуће датотеке"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   сматра празним прве недостајуће датотеке"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     занемарује словну величину поређујући назива "
 "датотека"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  урачунава словну величину поређујући називе "
 "датотека"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=ОБР               искључује датотеке које поклапају ОБР"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=ТЕКА         искључује датотеке које поклапа било који "
 "образац у ТЕКА"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=ТЕКА        почиње од ТЕКА при поређењу директоријума"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -891,7 +867,7 @@ msgstr ""
 "    --from-file=ТЕКА1           упоређује ТЕКУ1 са свим оперантима. ТЕКА1 "
 "може бити директоријум"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -899,75 +875,75 @@ msgstr ""
 "    --to-file=ТЕКА2             упоређује све операнте са ТЕКОМ2. ТЕКА2 може "
 "бити директоријум"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i  --ignore-case               занемарује словну величину у склопу датотека"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion      занемарује промене услед развијања табулатора"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     занемарује размак на крају реда"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change       занемарује промене због количине празног "
 "простора"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space          занемарује све празне просторе"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines        занемарује промене услед празних редова"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=РИ  занемарује промене чији редови поклапају РИ"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a  --text                      сматра све датотеке као текст"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr         огољава пратеће <CR> на улазу"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    чита и пише податке у бинарном режиму"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=НАЗИВ               исписује стопљену датотеку да прикаже "
 "„#ifdef НАЗИВ“ разлике"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=ГОБЛ   обликује GTYPE улазне групе са ГОБЛ"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=РОБЛ          обликује све улазне редове са РОБЛ"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=РОБЛ    обликује LTYPE улазне редове са РОБЛ"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -975,12 +951,12 @@ msgstr ""
 "  Ове опције записа обезбеђује фино подешено управљање преко излаза\n"
 "    различника, генерализујући -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE је „old“, „new“, или „unchanged“. GTYPE је LTYPE или „changed“."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1008,7 +984,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  ако је А исто као Б онда Т супротно Е"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1020,7 +996,7 @@ msgstr ""
 "    %l  садржај реда, изузев пратећих знакова за нови ред\n"
 "    %[-][ШИРН][.[ТАЧН]]{doxX}n  printf-стил за улазни број реда"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1034,32 +1010,32 @@ msgstr ""
 "    %c'\\OOO'  знак са окталним кодом OOO\n"
 "    З         знак З (други знаци представљају сами себе)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal            труди се да нађе мањи скуп промена"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=БРЈ  чува БРЈ редова заједничког префикса и суфикса"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  за велике датотеке са много раштрканих малих измена"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=КАДА]       обојава излаз; КАДА може бити „never“ (никада), "
-"„always“ (увек),\n"
-"                           или „auto“ (подразумевано)"
+"„always“ (увек), или „auto“ (подразумевано);\n"
+"                         обична „--color“ значи „--color='auto'“"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1070,112 +1046,112 @@ msgstr ""
 "                          списак могућности података термина раздвојен "
 "двотачком"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               приказује ову помоћ и излази"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v  --version            исписује податке о издању"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ДАТОТЕКЕ су „ТЕКА1 ТЕКА2“ или „ДИР1 ДИР2“ или „ДИР ТЕКА“ или „ТЕКА ДИР“."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Нема ограничења за ДАТОТЕКЕ ако је задато „--from-file“ или „--to-file“."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Ако је ДАТОТЕКА „-“, чита стандардни улаз."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Употреба: %s [ОПЦИЈА]... ДАТОТЕКЕ\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Поредите ДАТОТЕКЕ ред по ред."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "сукоб вредности „%s“ опције „%s“"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "сукобљене опције излазног стила"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "неисправна боја „%s“"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Само у %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "не могу поредити „-“ са директоријумом"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "опција „-D“ није подржана за директоријуме"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Заједнички поддиректоријуми: %s и %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Датотека „%s“ је „%s“ док је датотека „%s“ „%s“\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Симболичке везе „%s“ и „%s“ су различите\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Датотеке „%s“ и „%s“ се истоветне\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Ренди Смит"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "несагласне опције"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "„-“ је наведено за више од једне улазне датотеке"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "читање није успело"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A  --show-all              исписује све промене, означавајући сукобе "
 "заградама"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1183,31 +1159,31 @@ msgstr ""
 "-e  --ed                    исписује неспојене промене између СТАРАТЕКА и "
 "ТВОЈАТЕКА у МОЈАТЕКА"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E  --show-overlap          као -e, означавајући сукобе заградама"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 "-3  --easy-only             као -e, али обједињује непреклопљене промене"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x, --overlap-only          као -e, али обједињује преклопљене промене"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          као -x, означавајући сукобе заградама"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          придодаје „w“ и „q“ наредбе ед списима"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1215,24 +1191,24 @@ msgstr ""
 "-m, --merge                 исписује тренутну стопљену датотеку, у складу\n"
 "                                са -A ако нису дате друге опције"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text                  сматра све датотеке као текст"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     огољава пратеће <CR> на улазу"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab           поравнава табулаторе додајући један табулатор"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=ПРОГРАМ  користи ПРОГРАМ за поређење датотека"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1240,24 +1216,24 @@ msgstr ""
 "-L, --label=ОЗНАКА          користи ОЗНАКУ уместо назива датотеке\n"
 "                                (може да се понови до три пута)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  приказује ову помоћ и излази"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               исписује податке о издању и излази"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Употреба: %s [ОПЦИЈА]... МОЈАТЕКА СТАРАТЕКА ТВОЈАТЕКА\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Поредите три датотеке ред по ред."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1280,45 +1256,45 @@ msgstr ""
 "и да испише тренутно стопљену датотеку.  За необичан улаз, ово је много\n"
 "рогпадније него употреба еда.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Излазно стање је 0 за успех, 1 за сукобе, 2 за грешку."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "унутрашња грешка: зез у запису блокова разлика"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: разлике нису успеле: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "унутрашња грешка: неисправна врста разлика у „process_diff“"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "неисправан запис разлика; неисправан раздвојник измена"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "неисправан облик разлика; непотпун задњи ред"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "помоћни програм „%s“ не може бити покренут"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "неисправан запис разлика; нетачни водећи знакови реда"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "унутрашња грешка: неисправна врста разлика прослеђена излазу"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "улазна датотека се скупила"
 
@@ -1333,124 +1309,124 @@ msgid "%s: recursive directory loop"
 msgstr "%s: дубинска петља кроз директоријуме"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Томас Лорд"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=ТЕКА            ради међудејствено, шаљући излаз у ТЕКА"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i  --ignore-case            сматра истим велика и мала слова"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion   занемарује промене услед развијања табулатора"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  занемарује размак на крају реда"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr ""
 "-b  --ignore-space-change    занемарује промене због количине празног "
 "простора"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space       занемарује све размаке"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B  --ignore-blank-lines     занемарује промене услед празних редова"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=РИ  занемарује промене чији редови поклапају РИ"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      огољава пратеће <CR> на улазу"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text                   сматра све датотеке као текст"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=БРОЈ             исписује на највише БРОЈ (почетно 130) колона"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l  --left-column            исписује само леву колону заједничких редова"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  не приказује заједничке редове"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t  --expand-tabs            развија табулаторе у размаке за излаз"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=БРОЈ           величина табулатора је БРОЈ (почетно 8) колона"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d  --minimal                труди се да нађе мањи скуп промена"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H  --speed-large-files      за велике датотеке са много раштрканих малих "
 "измена"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=ПРОГРАМ   користи ПРОГРАМ за поређење датотека"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   приказује ову помоћ и излази"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v  --version                исписује податке о издању"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Употреба: %s [ОПЦИЈА]... ДАТОТЕКА1 ДАТОТЕКА2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Упоредно стапање разлика између ДАТОТЕКЕ1 и ДАТОТЕКЕ2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "не могу интерактивно уклопити стандардни улаз"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "обе датотеке за поређење су директоријуми"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1484,6 +1460,18 @@ msgstr "непознат префикс: %s"
 msgid "unparsable value for --palette"
 msgstr "необрадива вредност за „--palette“"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "неисправан %s%s аргумент „%s“"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "неисправан суфикс у %s%s аргументу „%s“"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s аргумент „%s“ је превелик"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s матична страница: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: опција „--%s“ не дозвољава аргумент\n"
 
index 29367aa..03460c7 100644 (file)
Binary files a/po/sv.gmo and b/po/sv.gmo differ
index d5374c3..2392a48 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,16 +1,16 @@
 # Swedish messages for diffutils.
-# Copyright © 1996, 2001, 2002, 2004, 2006, 2010, 2011, 2012, 2017, 2018 Free Software Foundation, Inc.
+# Copyright © 1996, 2001, 2002, 2004, 2006, 2010, 2011, 2012, 2017, 2018, 2021 Free Software Foundation, Inc.
 # This file is distributed under the same license as the diffutils package.
-# Göran Uddeborg <goeran@uddeborg.se>, 1996, 2001, 2002, 2004, 2006, 2010, 2011, 2012, 2017, 2018.
+# Göran Uddeborg <goeran@uddeborg.se>, 1996, 2001, 2002, 2004, 2006, 2010, 2011, 2012, 2017, 2018, 2021.
 #
-# $Revision: 1.50 $
+# $Revision: 1.52 $
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 13:31+0100\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 11:16+0200\n"
 "Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
 "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
 "Language: sv\n"
@@ -19,25 +19,25 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "ogiltigt argument %s till %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "tvetydigt argument %s till %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Giltiga argument är:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "programfel"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stackspill"
 
@@ -197,11 +197,11 @@ msgstr "%s: flaggan behöver ett argument – ”%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "”"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -273,7 +273,7 @@ msgstr "För stort reguljäruttryck"
 msgid "Unmatched ) or \\)"
 msgstr "Oparad ) eller \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Inget föregående reguljäruttryck"
 
@@ -281,41 +281,31 @@ msgstr "Inget föregående reguljäruttryck"
 msgid "memory exhausted"
 msgstr "minnet slut"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "standard in"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "standard ut"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "standard fel"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "okänd ström"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "kunde inte öppna om %s i läge %s"
 
-#: lib/xstrtol-error.c:63
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "ogiltigt argument till %s%s ”%s”"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "ogiltigt suffix i argument till %s%s ”%s”"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "argument till %s%s ”%s” är för stort"
+msgid "standard file descriptors"
+msgstr "standardfilbeskrivare"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -334,36 +324,32 @@ msgstr "Paketerat av %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Licens GPLv3+: GNU GPL version 3 eller senare <https://gnu.org/licenses/gpl."
-"html>.\n"
+"Licens GPLv3+: GNU GPL version 3 eller senare <%s>.\n"
 "Detta är fri programvara: du får fritt ändra och vidaredistribuera den.\n"
 "Det finns INGEN GARANTI, så långt lagen tillåter.\n"
-"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Skrivet av %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Skrivet av %s och %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Skrivet av %s, %s och %s.\n"
@@ -371,7 +357,7 @@ msgstr "Skrivet av %s, %s och %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -383,7 +369,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -395,7 +381,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -407,7 +393,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -419,7 +405,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -433,7 +419,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -447,7 +433,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -462,37 +448,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
-"Rapportera fel till %s\n"
-"Rapportera synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
+"Rapportera fel till: %s\n"
+"Rapportera synpunkter på översättningen till: <tp-sv@listor.tp-sv.se>.\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Rapportera %s-fel till: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s hemsida: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s hemsida: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"Allmän hjälp med att använda GNU-program: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "Allmän hjälp med att använda GNU-program: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Filerna %s och %s skiljer\n"
@@ -502,54 +480,54 @@ msgstr "Filerna %s och %s skiljer\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "De binära filerna %s och %s skiljer\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Ingen nyrad vid filslut"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjörn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Försök med ”%s --help” för mer information."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "ogiltigt --ignore-initial-värde ”%s”"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "flaggorna -l och -s är motstridiga"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "skrivning misslyckades"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standard ut"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          skriv ut byte som skiljer"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i,  --ignore-initial=HOPP        hoppa över de första HOPP byte indata"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -558,39 +536,39 @@ msgstr ""
 "och\n"
 "                                      de HOPP2 första byten i FIL2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              skriv ut bytenummer och värde för alla skiljande "
 "byte"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=GRÄNS          jämför högst GRÄNS byte"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      undertryck all normal utskrift"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 visa denna hjälp och avsluta"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v  --version              visa versionsinformation och avsluta"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Användning: %s [FLAGGA]... FIL1 [FIL2 [HOPP1 [HOPP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Jämför två filer byte för byte."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -598,14 +576,14 @@ msgstr ""
 "De valfria HOPP1 och HOPP2 anger antalet byte att hoppa över\n"
 "i början varje fil (noll som standard)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Obligatoriska argument till långa flaggor är obligatoriska även för de "
 "korta.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -615,190 +593,190 @@ msgstr ""
 "kB 1000, K 1024, MB 1 000 000, M 1 048 576\n"
 "GB 1 000 000 000, G 1 073 741 824, och så vidare för T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Om FIL är ”-” eller utelämnats, läs standard in."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "Slutsstatus är 0 om indata är lika, 1 om olika, 2 vid problem."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "ogiltigt --bytes-värde ”%s”"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "saknad operand efter ”%s”"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "extra operand ”%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s skiljer: byte %s, rad %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s skiljer: byte %s, rad %s är %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: EOF i %s som är tom\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF i %s efter byte %s, rad %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF i %s efter byte %s, på rad %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF i %s efter byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "ogiltig omgivningslängd ”%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "sidvisning stödjs ej på denna värd"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "för många etikettflaggor"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "ogiltig bredd ”%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "konflikt mellan breddflaggor"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "ogiltig horisontlängd ”%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "ogiltigt tabulatorsteg ”%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "konflikt mellan tabulatorflaggor"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "både --from-file och --to-file angavs"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  skriv ut en normal diff (standard)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   rapportera endast när filer skiljer sig"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  rapportera om två filer är lika"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C ANT, --context[=ANT]   skriv ANT (3 som standard) rader kopia av "
 "sammanhang"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U ANT, --unified[=ANT]   skriv ut ANT (3 som standard) rader med\n"
 "                                 sammanslagen omgivning"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      skriv ut ett ed-skript"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     skriv ut skillnader i RCS-format"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            skriv ut i två kolumner"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=ANT               skriv ut högst ANT (130 som standard) kolumner"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             skriv ut endast vänstra kolumnen av gemensamma "
 "rader"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   skriv inte ut gemensamma rader"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         visa vilken C-funktion varje rad finns i"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RU   visa den senaste raden som matchar RU"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -806,23 +784,23 @@ msgstr ""
 "    --label ETIKETT           använd ETIKETT istället för filnamn och\n"
 "                                tidsstämpel (kan upprepas)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             expandera tabulatorer till blanksteg i utdata"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             justera tabulatorer genom att skjuta in en"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=N               tabulatorstopp var N:e (8 som standard) kolumn"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -830,54 +808,54 @@ msgstr ""
 "tomma\n"
 "                                utrader"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate                skicka utdata till ”pr” för paginering"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 jämför underkataloger som hittas rekursivt"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            följ inte symboliska länkar"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  behandla saknade filer som tomma"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "    --unidirectional-new-file   behandla saknade förstafiler som tomma"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     bortse från skiftläge när filnamn jämförs"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  ta hänsyn till skiftläge när filnamn jämförs"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=MNS               ta inte med filer som matchar MNS"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=FIL         uteslut filer som matchar något mönster i FIL"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr "-S, --starting-file=FIL        börja med FIL när kataloger jämförs"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -885,7 +863,7 @@ msgstr ""
 "    --from-file=FIL1            jämför FIL1 med alla operander;\n"
 "                                  FIL1 kan vara en katalog"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -893,79 +871,79 @@ msgstr ""
 "    --to-file=FIL2              jämför alla operander med FIL2;\n"
 "                                  FIL2 kan vara en katalog"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               bortse från skillnader i skiftläge i "
 "filinnehåll"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      bortse från ändringar på grund av tab-"
 "expansion"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space     ignorera alla blanktecken i slutet av raden"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       bortse från ändringar i antalet blanka"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          bortse från alla blanktecken"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        bortse från ändringar där raderna är helt "
 "blanka"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RU  bortse från ändringar där alla rader matchar "
 "RU"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      behandla alla filer som text"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         tag bort avslutande vagnreturer i indata"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    läs och skriv data binärt"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=NAMN                skriv sammanslagen fil med skillnader inom\n"
 "                                  ”#ifdef NAMN”"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYP-group-format=GFMT    formatera GTYP-ingrupper med GFMT"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=RFMT          formatera alla inrader med RFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --RTYP-line-format=RFMT     formatera RTYP-inrader med RFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -973,12 +951,12 @@ msgstr ""
 "  Dessa formatflaggor gör det möjligt att finjustera utskriften från\n"
 "    diff, generaliserande -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  RTYP är ”old”, ”new” eller ”unchanged”.  GTYP är RTYP eller ”changed”."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1006,7 +984,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  om A är lika med B då T annars E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1018,7 +996,7 @@ msgstr ""
 "    %l  radinnehåll exklusive avslutande nyrad\n"
 "    %[-][BREDD][.[PREC]]{doxX}n  printf-stil spec. för inradnummer"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1032,32 +1010,33 @@ msgstr ""
 "    %c'\\OOO'  tecknet med oktalkod OOO\n"
 "    T    tecknet T (övriga tecken representerar sig själva)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal            arbeta hårt för att hitta en mindre mängd av "
 "ändringar"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ANT  spara ANT rader av gemensamt prefix och suffix"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr "    --speed-large-files  antag stora filer och små spridda ändringar"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"    --color[=NÄR]        färglägg utdata; NÄR kan vara ”never”, ”always”,\n"
-"                           eller ”auto” (standard)"
+"    --color[=NÄR]        färgad utdata; NÄR kan vara ”never”, ”always” "
+"eller\n"
+"                           ”auto”; bara --color betyder --color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1067,113 +1046,113 @@ msgstr ""
 "är\n"
 "                           en kolonseparerad lista av terminfoförmågor"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               visa denna hjälp och avsluta"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            visa versionsinformation och avsluta"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "FILER är ”FIL1 FIL2” eller ”KAT1 KAT2” eller ”KAT FIL” eller ”FIL KAT”."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Om --from-file eller --to-file är angivet finns det inga begränsningar\n"
 "på FILER."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Om en FIL är ”-”, läs standard in."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Användning: %s [FLAGGA]... FILER\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Jämför FILER rad för rad."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "motstridigt %s-flaggsvärde ”%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "motstridig utmatningsstilsflagga"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "ogiltig färg ”%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Endast i %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "kan inte jämföra ”-” med en katalog"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "flaggan -D stödjs ej för kataloger"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Lika underkataloger: %s och %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Filen %s är %s medan filen %s är %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "De symboliska länkarna %s och %s skiljer\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Filerna %s och %s är lika\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "oförenliga flaggor"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "”-” angivet för mer än en infil"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "läsning misslyckades"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              skriv alla ändringar med markering runt "
 "konflikter"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1181,12 +1160,12 @@ msgstr ""
 "-e, --ed                    skriv ut ett ed-skript som innehåller ändringar\n"
 "                                från GAMMALFIL till DINFIL i MINFIL"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          som -e, men med markeringar runt konflikter"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1194,22 +1173,22 @@ msgstr ""
 "-3, --easy-only             som -e, men tag endast med ej överlappande "
 "ändringar"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          som -e, men tag endast med överlappande ändringar"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          som -x, men skriv klamrar om konflikter"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          lägg till ”w”- och ”q”-kommandon till ed-skript"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1217,25 +1196,25 @@ msgstr ""
 "-m, --merge                 skriv ut en faktiskt sammanslagen fil, enligt\n"
 "                                -A om inga andra flaggor ges"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  betrakta alla filer som text"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     tag bort avslutande vagnreturer i indata"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           justera tabulatorer genom att skjuta in en "
 "tabulator"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM  använd PROGRAM för att jämföra filer"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1243,24 +1222,24 @@ msgstr ""
 "-L, --label=ETIKETT         använd ETIKETT istället för filnamn\n"
 "                                (kan upprepas upp till tre gånger)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  visa denna hjälp och avsluta"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               visa versionsinformation och avsluta"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Användning: %s [FLAGGA]... MINFIL GAMMALFIL DINFIL\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Jämför tre filer rad för rad."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1286,45 +1265,45 @@ msgstr ""
 "och skriva ut den faktiskt sammanslagna filen.  För ovanlig indata är detta\n"
 "mer robust än att använda ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "Slutstatus är 0 om allt bra, 1 vid konflikt, 2 vid problem."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "internt fel: trasigt format i diff-block"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff misslyckades: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "internt fel: ogiltig diff-typ i process_diff"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "ogiltigt diff-format; ogiltig ändringsseparator"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "ogiltigt diff-format; ofullständig sista rad"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "underprogram ”%s” kunde inte startas"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "ogiltigt diff-format; felaktiga starttecken på rad"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "internt fel: ogiltig diff-typ utskickad"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "infilen krympte"
 
@@ -1339,128 +1318,128 @@ msgid "%s: recursive directory loop"
 msgstr "%s: rekursiv katalogslinga"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=FIL             kör interaktivt, med utdata till FIL"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            betrakta versaler och gemena som lika"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   ignorera ändringar på grund av "
 "tabulatorexpansion"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr ""
 "-Z, --ignore-trailing-space  ignorera alla blanktecken i slutet av raden"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    ignorera ändringar i antalet blanka"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       ignorera alla blanktecken"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     ignorera ändringar i form av enbart blanka rader"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RU  bortse från ändringar vars alla rader "
 "matchar RU"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr      tag bort avslutande vagnreturer i indata"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   behandla alla filer som text"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=ANT              skriv ut högst ANT (130 som standard) kolumner"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            skriv endast ut gemensamma raders vänstra kolumn"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  skriv inte ut gemensamma rader"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            expandera tabulatorer till blanksteg i utdata"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=N              tabulatorstopp var N:e (8 som standard) kolumn"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr ""
 "-d, --minimal                arbeta hårt för att hitta en mindre mängd "
 "ändringar"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      antag stora filer och små spridda ändringar"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=PROGRAM   använd PROGRAM för att jämföra filer"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   visa denna hjälp och avsluta"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                visa versionsinformation och avsluta"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Användning: %s [FLAGGA]... FIL1 FIL2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Sammanslagning sida-vid-sida av skillnader mellan FIL1 och FIL2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "kan inte slå samman standard in interaktivt"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "båda filerna som skall jämföras är kataloger"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
index b900bed..f44fd4b 100644 (file)
Binary files a/po/tr.gmo and b/po/tr.gmo differ
index eeeea57..961d591 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -4,42 +4,42 @@
 # This file is distributed under the same license as the diffutils package.
 # Deniz Akkus Kanca <deniz@arayan.com>, 2001.
 # Volkan Gezer <vlkngzr@gmail.com>, 2013.
-# Mehmet Kececi <mkececi@mehmetkececi.com>, 2017, 2018.
+# Mehmet Kececi <mkececi@mehmetkececi.com>, 2017, 2018, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-27 18:51+0300\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 14:22+0300\n"
 "Last-Translator: Mehmet Kececi <mkececi@mehmetkececi.com>\n"
-"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"Language-Team: Turkish <gnome-turk@gnome.org>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Virtaal 0.7.1\n"
+"X-Generator: Poedit 3.0\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "%s için geçersiz bağımsız değişken %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "%s için belirsiz bağımsız değişkeni %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Geçerli argümanlar şunlardır:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "yazılım hatası"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "yığıt taşması"
 
@@ -199,11 +199,11 @@ msgstr "%s: seçenek bir argümanla kullanılır -- %c\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "'"
 
@@ -275,7 +275,7 @@ msgstr "Düzenli ifade çok büyük"
 msgid "Unmatched ) or \\)"
 msgstr ") ya da  \\) eşleşmiyor"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Daha önce düzenli ifade yok"
 
@@ -283,41 +283,31 @@ msgstr "Daha önce düzenli ifade yok"
 msgid "memory exhausted"
 msgstr "bellek tükendi"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "bilinmeyen akış"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "%s, %s kipinde yeniden açılamadı"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "Geçersiz %s%s argümanı '%s'"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "%s%s içinde '%s' argümanı için geçersiz son ek"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s argümanı '%s' çok uzun"
+msgid "standard file descriptors"
+msgstr "standart dosya tanımlayıcıları"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -336,39 +326,35 @@ msgstr "%s tarafından paketlenmiş\n"
 msgid "(C)"
 msgstr "(C)"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Lisans GPLv3+: GNU GPL sürüm 3 veya sonrası <https://gnu.org/licenses/gpl."
-"html>.\n"
+"Lisans GPLv3+: GNU GPL sürüm 3 veya sonrası <%s>.\n"
 "Bu ücretsiz bir yazılımdır: değiştirmekte ve tekrar dağıtmakta özgürsünüz.\n"
 "İzin verilen yasalar kapsamında hiçbir GARANTİSİ BULUNMAMAKTADIR.\n"
-"\n"
 
 #  TRANSLATORS: %s denotes an author name.
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "%s tarafından yazılmıştır.\n"
 
 #  TRANSLATORS: Each %s denotes an author name.
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "%s ve %s tarafından yazılmıştır.\n"
 
 #  TRANSLATORS: Each %s denotes an author name.
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "%s, %s ve %s tarafından yazılmıştır.\n"
@@ -379,7 +365,7 @@ msgstr "%s, %s ve %s tarafından yazılmıştır.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -394,7 +380,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -425,7 +411,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -441,7 +427,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -458,7 +444,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -475,7 +461,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -491,37 +477,27 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Hataları şuraya bildirin: %s\n"
+msgid "Report bugs to: %s\n"
+msgstr "Hataları şuraya bildirin: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "%s hatalarını şuraya bildirin: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s ana sayfası: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s ana sayfası: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
-"GNU yazılımı kullanımı hakkında genel yardım: <https://www.gnu.org/gethelp/"
-">\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "GNU yazılımı kullanımı hakkında genel yardım: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "%s ve %s dosyaları birbirinden farklı\n"
@@ -531,54 +507,54 @@ msgstr "%s ve %s dosyaları birbirinden farklı\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "İkili %s ve %s birbirinden farklı\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
-msgstr "Dosya sonunda yenisatır yok."
+msgstr "Dosya sonunda yenisatır yok"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Daha fazla bilgi için `%s --help' komutunu deneyin."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "geçersiz --ignore-initial değeri '%s'"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "-l ve -s seçenekleri beraber kullanılamaz"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "yazma başarısız oldu"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "standart çıktı"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          bayt farklarını çıktılar"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
-"-i, --ignore-initial=ATLA         İki girdinin de ilk ATLA baytını atlar."
+"-i, --ignore-initial=ATLA         İki girdinin de ilk ATLA baytını atlar"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -586,39 +562,39 @@ msgstr ""
 "-i, --ignore-initial=ATLA1:ATLA2  DOSYA1'in ilk ATLA1 baytını ve\n"
 "                                      DOSYA2'nin ilk ATLA2 baytını atlar"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l,  --verbose              bütün farklı baytların numaralarını ve "
 "değerlerini göster"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=LİMİT              en fazla LİMİT baytı karşılaştırır"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      tüm normal çıktıları gizle"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 bu yardım metnini göster ve çık"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              sürüm bilgisini gösterir"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Kullanım: %s [SEÇENEK]... DOSYA1 [DOSYA2 [ATLA1 [ATLA2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "İki dosyayı bayt bayt karşılaştırır."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -626,14 +602,14 @@ msgstr ""
 "İsteğe bağlı ATLA1 ve ATLA2, her dosyanın başından atlanacak\n"
 "(öntanımlı olarak sıfır) bayt sayısını belirtir."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Uzun seçenekler için zorunlu olan argümanlar, kısa seçenekler için de "
 "zorunludur.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -643,192 +619,192 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, ve T, P, E, Z, Y için devam eder."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Eğer DOSYA `-' ise veya yoksa, standart girdi okunur."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "Girdiler aynı ise çıkış durumu 0, farklı ise 1, sorun var ise 2 olur."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "geçersiz --bytes değeri `%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "`%s'den sonra işlenen eksik"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "fazla işlenen `%s'"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s farklı: bayt %s, satır %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s farklı: bayt %s, satır %s: %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: %s'da EOF (dosya sonu) boş\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: EOF üzerinde %s sonrası byte %s, satır %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: EOF üzerinde %s sonrası byte %s, satır %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: EOF üzerinde %s sonrası byte %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "`%s' bağlam uzunluğu geçersiz"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "sayfalama bu makina üzerinde desteklenmiyor"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "çok fazla dosya etiket seçeneği"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "geçersiz genişlik `%s'"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "çelişkili genişlik seçenekleri"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "geçersiz ufuk uzunluğu `%s'"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "geçersiz sekme genişliği `%s'"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "çelişkili genişlik seçenekleri"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "hem --from-file hem de --to-file belirtilmiş"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  normal bir diff çıktılar (öntanımlı)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   yalnızca dosyalar farklı ise göster"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr ""
 "-s, --report-identical-files  iki dosyanın birbirinin aynısı ise göster"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C SAYI, --context[=SAYI]   kopyalanan bağlamı SAYI satırınca (öntanımlı "
 "3) bastırır"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U SAYI, --unified[=SAYI]   birleşik bağlamın SAYI (öntanımlı 3) "
 "satırınca çıktı gösterir"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      bir ed betiği çıktılar"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     RCS biçeminde diff çıktılar"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            iki sütunda çıktı göster"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=SAYI               satır başına en fazla SAYI kadar karakter "
 "çıktılar (öntanımlı 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             ortak satırları yalnızca sol sütunda çıktılar"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   ortak satırlayı gösterme"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         içinde değişen her C işlevini göster"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=DÜZİF   DÜZİF ile eşleşen en yakın satırı göster"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -836,85 +812,85 @@ msgstr ""
 "    --label ETİKET             dosya adı yerine ETİKET kullan\n"
 "                                (tekrarlanabilir)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             çıktıda sekmeleri boşluk haline getir"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             başlarına bir sekme ilave ederek sekmelerin "
 "hizalanmasını sağla"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
-"    --tabsize=SAYI             sekmeler SAYI sütun genişliğine (öntanımlı 8) "
-"ayarlanır."
+"    --tabsize=SAYI             sekmeler SAYI sütun genişliğine (varsalılan "
+"8) ayarlanır"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    boş çıktı satırlarından önce boşluk veya "
 "sekmeyi gözardı et"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                çıktıyı 'pr' komutundan geçirerek sayfala"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 çevrimli olarak bulunan bütün alt dizinleri "
 "karşılaştır"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            sembolik bağlantıları takip etme"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  var olmayan dosyaları boş varsay"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "    --unidirectional-new-file   var olmayan birinci dosyayı boş varsay"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     dosya isimlerinde büyük/küçük harf "
 "farklarını yoksay"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  dosya isimlerinde büyük/küçük harf farkını "
 "göz önüne al"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x, --exclude=KALIP               KALIP'a uyan dosyaları işleme dahil etme"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=DOSYA         DOSYA'da bulunan kalıplara uyan dosyaları "
 "işlem dışı tut"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=DOSYA        dizinleri karşılaştırırken DOSYA'dan başla"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -922,7 +898,7 @@ msgstr ""
 "    --from-file=DOSYA1           DOSYA1'i bütün işlenenlerle karşılaştır;\n"
 "                                  DOSYA1 bir dizin olabilir"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -930,82 +906,82 @@ msgstr ""
 "    --to-file=DOSYA2           DOSYA2'yi bütün işlenenlerle karşılaştır;\n"
 "                                  DOSYA2 bir dizin olabilir"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               dosya içeriğinde büyük/küçük harf farklarını "
 "yoksay"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion      sekmelerin açılmasından doğan farkları yoksay"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     bütün satır sonu boşluklarını yoksay"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       boşluk miktarındaki değişiklikleri yoksay"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          bütün boşlukları yoksay"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines        satırları boş olan değişiklikleri dikkate "
 "alma"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=DÜZİF  satırları DÜZİF kalıbına uyan farkları "
 "yok say"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      bütün dosyaları metin olarak işle"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         girdiden en sonda sarkan satır başını soy"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    veriyi ikilik kipte yaz ve oku"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=İSİM                '#ifdef İSİM' farklarını gösteren "
-"harmanlanmış dosya çıktıla."
+"harmanlanmış dosya çıktıla"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --GTYPE-group-format=GFMT   GTYPE girdi gruplarını GFMT ile biçimlendir"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          tüm girdi satırlarını LFMT ile biçimlendir"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --LTYPE-line-format=LFMT    tüm LTYPE girdi satırlarını LFMT ile "
 "biçimlendir"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1014,13 +990,13 @@ msgstr ""
 "grained control over the output\n"
 "    tanecik denetimi sağlar. -D/--ifdef genelleştirmesi yapar."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE 'old', 'new' veya 'unchanged' olabilir.  GTYPE, LTYPE veya "
 "'changed'dir."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1049,7 +1025,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  eğer A eşittir B ise T değilse E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1062,7 +1038,7 @@ msgstr ""
 "    %[-][GENİŞLİK][.[KESİNLİK]]{doxX}n  girdi satır sayısı için printf tarzı "
 "biçem"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1076,149 +1052,149 @@ msgstr ""
 "    %c'\\OOO'  Sekizlik kodu OOO olan karakter\n"
 "    C    C karakteri (diğer karakterler kendilerini temsil eder)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            daha küçük bir fark kümesi bulmaya çalış"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "    --horizon-lines=SAYI  ortak ön ek ve son eklerin SAYI satırını tut"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  büyük dosyalar ve çok sayıda dağınık küçük farklar "
 "olduğunu varsay"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
-"--color[=WHEN]       renklendirme çıktısı; WHEN (Ne zaman) olabilir 'asla', "
-"'devmalı',\n"
-"                           veya 'oto' (varsayılan)"
+"    --color[=WHEN]       renklendirme çıktısı; WHEN (Ne zaman) olabilir "
+"'asla', 'devamlı' veya 'oto';\n"
+"                           düz --color anlamı --color='oto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
-"--palette=PALETTE    renkler kullanıldığında --color aktiftir; PALET\n"
+"    --palette=PALETTE    renkler kullanıldığında --color aktiftir; PALET\n"
 "                           bir virgülle ayrılmış terminfo yetenekleri "
 "listelenmiştir"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help                 bu yardım metnini göster ve çık"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            sürüm bilgisini göster ve çık"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "`DOSYA1 DOSYA2' veya `DİZİN1 DİZİN2' veya `DİZİN DOSYA' veya `DOSYA DİZİN' "
 "DOSYAlARdır."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Eğer --from-file veya --to-file kullanılmışsa, DOSYAlar üzerinde kısıtlama "
 "yoktur."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Eğer bir DOSYA `-' ise, standart girdi okunur."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Kullanım: %s [SEÇENEK]... DOSYAlar\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "DOSYAları satır satır karşılaştırır."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "çelişkili %s seçeneği değeri: '%s'"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "çelişkili çıktı tarz seçenekleri"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "geçersiz renk '%s'"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Yalnızca %s'da: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "'-', bir dizinle karşılaştırılamaz"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
-msgstr "-D seçenek dizinler için kullanılamaz."
+msgstr "-D seçenek dizinler için kullanılamaz"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Ortak alt dizinler: %s ve %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "%s dosyası, bir %s, halbuki %s dosyası bir %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "%s ve %s sembolik bağlantıları birbirinden farklı\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "%s ve %s dosyaları birbirinin aynı\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "uyumsuz seçenekler"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "'-' birden fazla girdi dosyası için belirtilmiş"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "okuma başarısız oldu"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              bütün değişiklikleri çıktıla, çakışmaları köşeli "
 "parantez içine al"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1227,13 +1203,13 @@ msgstr ""
 "harmanlanmamış\n"
 "                                ed betiklerini BENİMDOSYA'ya çıktıla"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          -e'ye benzer, fakat çakışmaları parantez içine "
 "alır"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1241,25 +1217,25 @@ msgstr ""
 "-3, --easy-only             -e gibi, fakat sadece örtüşmeyen değişiklikleri "
 "birleştir"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          -e gibi, fakat sadece örtüşen değişiklikleri "
 "birleştir"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          -x gibi ancak çakışmaları parantez içine alır"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          ed betiklerinin sonuna `w' ve `q' komutlarını "
 "ekle"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1267,26 +1243,26 @@ msgstr ""
 "-m, --merge                 asıl birleştirilmiş dosyayı, başka bir seçenek\n"
 "                                verilmediyse -A ya göre gösterir"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  bütün dosyaları metin olarak işle"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     girdiden en sonda sarkan satır başını soy"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           başlarına bir sekme ilave ederek sekmelerin "
 "hizalanmasını sağla"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=YAZILIM  dosyaları karşılaştırmak için YAZILIM'ı kullan"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1294,24 +1270,24 @@ msgstr ""
 "-L, --label=ETİKET           dosya adı yerine ETİKET kullan\n"
 "                                (üç defaya kadar tekrarlanabilir)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                 bu yardım metnini göster ve çık"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               sürüm bilgisini göster ve çık"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Kullanım: %s [SEÇENEK]... BENİMDOSYA ESKİDOSYA SİZİNDOSYA\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Üç dosyayı satır satır karşılaştırır."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1334,47 +1310,47 @@ msgstr ""
 "yapmasına neden olur ve asıl birleştirilen dosya çıkarılır. Alışılmadık\n"
 "girdiler için, bu ed kullanımından daha dayanıklıdır.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Eğer işleme başarılı ise çıkış durumu 0, çelişkiler var ise 1,\n"
 "sorun var ise 2 olur."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "iç hata: diff blokları biçemlemesinde hata oluştu"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff başarısız oldu: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "iç hata: process_diff işlevi içinde geçersiz diff türü"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "geçersiz diff biçemi; geçersiz fark ayracı"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "geçersiz diff biçemi; tamamlanmamış son satır"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "alt yazılım '%s' çalıştırılamadı"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "geçersiz diff biçemi; geçersiz satır başı karakterleri"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "iç hata: çıktıya geçersiz diff türü geçirildi"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "girdi dosyası küçüldü"
 
@@ -1389,131 +1365,131 @@ msgid "%s: recursive directory loop"
 msgstr "%s: iç dizin döngüsü"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=DOSYA            etkileşimli olarak çalış, çıktıyı DOSYA'ya "
 "yönlendir"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            büyük harf/küçük harf farkı gözetme"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E, --ignore-tab-expansion   sekmelerin açılmasından doğan farkları yoksay"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  bütün satır sonu boşluklarını yoksay"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    boşluk miktarındaki değişiklikleri yoksay"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       bütün boşlukları yoksay"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B, --ignore-blank-lines     satırları boş olan değişiklikleri dikkate alma"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=DÜZİF  satırları DÜZİF kalıbına uyan farkları "
 "yoksay"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         girdiden en sonda sarkan satır başını soy"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                  bütün dosyaları metin olarak işle"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=SAYI               satır başına en fazla SAYI kadar karakter "
 "çıktılar (öntanımlı 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-W, --width=SAYI               satır başına en fazla SAYI kadar karakter "
 "çıktılar (öntanımlı 130)"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  ortak satırlayı gösterme"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             çıktıda sekmeleri boşluk haline getir"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=SAYI            sekmeleri SAYI sütun genişliğine (öntanımlı 8) "
 "ayarla"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal            daha küçük bir fark kümesi bulmaya çalış"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      büyük dosyalar ve çok sayıda dağınık küçük "
 "farklar olduğunu varsay"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=YAZILIM  dosyaları karşılaştırmak için YAZILIM'ı kullan"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                 bu yardım metnini göster ve çık"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version            sürüm bilgisini göster ve çık"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Kullanım: %s [SEÇENEK]... DOSYA1 DOSYA2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "DOSYA1 vey DOSYA2 arasındaki farkları yan yana birleştir."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "interaktif olarak standart girdi harmanlanamaz"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "karşılaştırılacak her iki dosya da dizin"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1547,6 +1523,18 @@ msgstr "tanınmamış önek: %s"
 msgid "unparsable value for --palette"
 msgstr "--palette için ayrıştırılamayan değer"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "Geçersiz %s%s argümanı '%s'"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "%s%s içinde '%s' argümanı için geçersiz son ek"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s argümanı '%s' çok uzun"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s ana sayfası: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: `--%s' seçeneği argümansız kullanılır\n"
 
index f9a1da5..24136ff 100644 (file)
Binary files a/po/uk.gmo and b/po/uk.gmo differ
index 699d40a..ade96c8 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -3,42 +3,42 @@
 # This file is distributed under the same license as the diffutils package.
 #
 # Maxim V. Dziumanenko <dziumanenko@gmail.com>, 2006.
-# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2012, 2017, 2018.
+# Yuri Chornoivan <yurchor@ukr.net>, 2011, 2012, 2017, 2018, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-27 13:46+0200\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 12:05+0300\n"
 "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
-"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
+"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
 "Language: uk\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Lokalize 2.0\n"
+"X-Generator: Lokalize 20.12.0\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "некоректний аргумент %s до %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "неоднозначний аргумент %s до %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Список коректних аргументів:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "помилка програми"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "переповнення стеку"
 
@@ -198,11 +198,11 @@ msgstr "%s: до параметра слід додати аргумент — 
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "`"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "'"
 
@@ -274,7 +274,7 @@ msgstr "Регулярний вираз надто великий"
 msgid "Unmatched ) or \\)"
 msgstr "Непарна ) чи \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Регулярний вираз не було вказано раніше"
 
@@ -282,41 +282,31 @@ msgstr "Регулярний вираз не було вказано раніш
 msgid "memory exhausted"
 msgstr "пам’ять вичерпано"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "stdin"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "stdout"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "stderr"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "невідомий потік даних"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "не вдалося повторно відкрити %s у режимі %s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "некоректний аргумент %s%s — «%s»"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "некоректний суфікс у аргументі %s%s «%s»"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s, аргумент «%s» є занадто об'ємним"
+msgid "standard file descriptors"
+msgstr "стандартні дескриптори файлів"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -335,37 +325,34 @@ msgstr "Пакування виконано %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, "
-"<https://gnu.org/licenses/gpl.html>\n"
+"Умови ліцензування викладено у GPLv3+: GNU GPL версії 3 або новішій, <%s>\n"
 "Це вільне програмне забезпечення: ви можете вільно змінювати і поширювати "
 "його.\n"
 "Вам не надається ЖОДНИХ ГАРАНТІЙ, окрім гарантій передбачених "
 "законодавством.\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Автор програми -- %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Автори програми -- %s та %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Автори програми -- %s, %s та %s.\n"
@@ -373,7 +360,7 @@ msgstr "Автори програми -- %s, %s та %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +372,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +384,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +396,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +408,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +422,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +436,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,37 +451,29 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
-msgstr ""
-"\n"
-"Про вади повідомляйте за такою адресою: %s\n"
+msgid "Report bugs to: %s\n"
+msgstr "Повідомляйте про вади на адресу: %s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Про вади у %s повідомляйте за такою адресою: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Домашня сторінка %s: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Домашня сторінка %s: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
-"Ð\97агалÑ\8cна Ð´Ð¾Ð²Ñ\96дка Ð· Ð¿Ñ\80огÑ\80амного Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ\87еннÑ\8f GNU: <https://www.gnu.org/"
-"gethelp/>\n"
+"Ð\97агалÑ\8cна Ð´Ð¾Ð²Ñ\96дкова Ñ\96нÑ\84оÑ\80маÑ\86Ñ\96Ñ\8f Ñ\89одо Ð²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82аннÑ\8f Ð¿Ñ\80огÑ\80амного Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ\87еннÑ\8f "
+"GNU: <%s>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Файли %s та %s відрізняються\n"
@@ -504,55 +483,55 @@ msgstr "Файли %s та %s відрізняються\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Двійкові файли %s та %s відрізняються\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Наприкінці файла немає нового рядка"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Спробуйте «%s --help» для отримання докладнішого опису."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "неприпустиме значення --ignore-initial «%s»"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "параметри -l та -s несумісні"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "запис невдалий"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "стандартний вивід"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          вивести байти, що відрізняються."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=Н            пропустити перші Н байтів у обох потоках "
 "вхідних даних"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -560,42 +539,42 @@ msgstr ""
 "-i, --ignore-initial=Н1:Н2        пропустити перші Н1 байтів у ФАЙЛ1 і\n"
 "                                      перші Н2 байтів у ФАЙЛ2"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l  --verbose              вивести номери та значення усіх різних байтів"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr ""
 "-n, --bytes=МЕЖА           порівнювати не більше вказаної кількості байтів."
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      не показувати всі звичайні повідомлення"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr ""
 "    --help                 показати це довідкове повідомлення і завершити "
 "роботу"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr ""
 "-v, --version              показати дані щодо версії і завершити роботу"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Використання: %s [ПАРАМЕТР]... ФАЙЛ1 [ФАЙЛ2 [Н1 [Н2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "Порівнює два файли по байтах."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -603,14 +582,14 @@ msgstr ""
 "Додаткові аргументи Н1 та Н2 визначають кількість байтів, які слід\n"
 "пропустити на початку кожного файла (типово байти не пропускаються)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr ""
 "Обов’язкові аргументи для довгих форм запису параметрів є обов’язковими і "
 "для скорочених форм.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -620,201 +599,201 @@ msgstr ""
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
 "GB 1,000,000,000, G 1,073,741,824, і так далі для T, P, E, Z, Y."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr ""
 "Якщо ФАЙЛ не вказано або вказано як «-», дані буде прочитано зі стандартного "
 "потоку введення."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Код завершення дорівнює 0, якщо вхідні файли ідентичні, 1 -- якщо\n"
 "відрізняються, та 2 при виникненні помилок."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "некоректне значення --bytes «%s»"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "пропущено операнд після «%s»"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "зайвий операнд «%s»"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s відрізняються: байт %s, рядок %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s відрізняються: байт %s, рядок %s дорівнює %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: кінець файла у %s, який є порожнім\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: кінець файла у %s після байта %s, рядок %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: кінець файла у %s після байта %s, у рядку %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: кінець файла у %s після байта %s\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "некоректна довжина контексту «%s»"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "розбиття на сторінки не підтримується на цій машині"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "надто багато параметрів, що вказують позначки файлів"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "некоректна ширина «%s»"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "суперечливі параметри визначення ширини"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "некоректна довжина горизонту «%s»"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "неприпустима ширина табуляції «%s»"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "суперечливі параметри визначення ширини табуляції"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "необхідно вказати як --from-file, так і --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  вивести дані у форматі звичайного diff (типово)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   сповіщати лише про різні файли"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s  --report-identical-files  сповіщати про однакові файли"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C КТЬ, --context[=КТЬ]   вивести КТЬ (типово 3) рядки скопійованого "
 "контексту"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U ЧИСЛО, --unified[=ЧИСЛО] вивести ЧИСЛО (типово 3) рядків спільного "
 "контексту"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      вивести дані у форматі запису ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr ""
 "-n, --rcs                     виводити у форматі diff систем керування "
 "версіями"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            вивести дані у два стовпчики"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=ЧИСЛО             виводити текст не більше ніж у ЧИСЛО (типово "
 "130) позицій у рядок"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             виводити спільні рядки лише у ліву колонку"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   не виводити однакові рядки"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         показати дані щодо функцій C у яких виявлено "
 "кожну зі змін"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr ""
 "-F, --show-function-line=RE   показати останній рядок, що відповідає "
 "формальному виразу RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -823,75 +802,75 @@ msgstr ""
 "часової позначки\n"
 "                                (можна використовувати декілька разів)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t  --expand-tabs             замінювати символи табуляції пробілами у виводі"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab             вирівнювати табуляцію символами табуляції"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ЧИСЛО           табуляція кожні ЧИСЛО позицій виведення "
 "(типово 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
 "    --suppress-blank-empty    не показувати пробіли або табуляції перед "
 "порожніми рядками"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l  --paginate                спрямувати дані до «pr» для розбиття на "
 "сторінки."
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 рекурсивно порівняти всі знайдені підкаталоги"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr ""
 "    --no-dereference            не переходити за символічними посиланнями"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  вважати незнайдені файли порожніми"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr ""
 "    --unidirectional-new-file   вважати незнайдені у першому джерелі файли "
 "порожніми"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     ігнорувати регістр назв файлів під час "
 "порівняння"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  враховувати регістр символів назв файлів"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr ""
 "-x --exclude=ЗРАЗОК             виключити файли, назви яких відповідають "
 "ЗРАЗКУ"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
@@ -899,13 +878,13 @@ msgstr ""
 "зразкам\n"
 "                                 з файла."
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=ФАЙЛ        починати порівняння каталогів на файлі ФАЙЛ"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -913,7 +892,7 @@ msgstr ""
 "    --from-file=ФАЙЛ1           порівняти ФАЙЛ1 з усіма операндами;\n"
 "                                  ФАЙЛ1 може бути каталогом"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -921,84 +900,84 @@ msgstr ""
 "    --to-file=ФАЙЛ2             порівняти всі операнди з ФАЙЛОМ "
 "2;                                   ФАЙЛ2 може бути каталогом."
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i  --ignore-case               ігнорувати регістр літер у вмісті файлів"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion      ігнорувати зміни, викликані заміною "
 "табуляції пробілами"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     ігнорувати пробіли наприкінці рядка"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change       ігнорувати зміни у кількості пробілів"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w  --ignore-all-space          ігнорувати усі пробіли"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines        ігнорувати зміни кількості порожніх рядків"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ігнорувати зміни, які відповідають "
 "формальному виразу RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      вважати всі файли текстовими"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         вилучити з виведених даних всі завершальні "
 "символи нового рядка"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    читати та записувати файли у двійковій формі"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=НАЗВА               виводити diff-блоки, що використовують "
 "конструкцію «#ifdef НАЗВА»."
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr ""
 "    --ГТИП-group-format=ГФМТ    форматувати вхідні групи типу ГТИП\n"
 "                                  у відповідності до формату ГФМТ."
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=СФМТ          форматувати всі вхідні рядки за допомогою "
 "СФМТ."
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr ""
 "    --CТИП-group-format=СФМТ     форматувати вхідні рядки типу СТИП\n"
 "                                   у відповідності до формату СФМТ"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -1006,12 +985,12 @@ msgstr ""
 "  За допомогою цих параметрів форматування можна точно налаштувати\n"
 "    вивід diff, з узагальненням -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  СТИП може бути «old», «new» чи «unchanged», ГТИП — те саме або «changed»."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1039,7 +1018,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  якщо A дорівнює B, T, інакше E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1051,7 +1030,7 @@ msgstr ""
 "    %l  вміст рядка без символу нового рядка наприкінці\n"
 "    %[-][ШИРИНА][.[ТОЧН]]{doxX}n  формат номеру вхідного рядка у стилі printf"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1065,33 +1044,33 @@ msgstr ""
 "    %c'\\OOO'  один символ з вісімковим кодом OOO\n"
 "    C    символ C (інші символи не оброблятимуться)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d  --minimal            намагатись знайти найменший набір змін"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr ""
 "    --horizon-lines=ЧИСЛО  зберегти ЧИСЛО спільних рядків, до та після різних"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  вважати файли великими з багатьма розкиданими\n"
 "                           дрібними змінами."
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=КОЛИ]       розфарбовувати виведення; значенням КОЛИ може бути "
-"«never», «always»,\n"
-"                           або «auto» (типовий варіант)"
+"'never', 'always',\n"
+"                           або 'auto'; просто --color означає --color='auto'"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1102,116 +1081,116 @@ msgstr ""
 "                           ПАЛІТРА — відокремлений двокрапками список "
 "можливостей terminfo"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr ""
 "    --help               показати це довідкове повідомлення і завершити "
 "роботу"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            показати дані щодо версії і завершити роботу"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "ФАЙЛИ — це «ФАЙЛ1 ФАЙЛ2», чи «КАТАЛОГ1 КАТАЛОГ2», чи «КАТАЛОГ ФАЙЛ»,\n"
 "чи «ФАЙЛ КАТАЛОГ»."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr "Якщо вказано --from-file чи --to-file, на ФАЙЛИ обмежень немає."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr ""
 "Якщо ФАЙЛ вказано як «-», дані буде прочитано зі стандартного потоку "
 "введення."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Використання: %s [КЛЮЧ]... ФАЙЛИ\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "Порівнює два файли за рядками."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "суперечливі значення %s для ключа «%s»"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "суперечливі ключі визначення стилю виводу"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "некоректний колір «%s»"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Лише у %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "не можна порівнювати «-» з каталогом"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D параметр не підтримується для каталогів"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Спільні підкаталоги: %s та %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Файл %s це %s, тоді як файл %s -- %s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Символічні посилання %s і %s є різними\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Файли %s та %s ідентичні\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "несумісні ключі"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "«-» вказано для більш ніж одного вхідного файла"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "помилка читання"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A  --show-all              вивести всі зміни, беручи конфліктні місця у "
 "дужки."
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1219,13 +1198,13 @@ msgstr ""
 "-e  --ed                    вивести необ'єднані зміни у СТАРОМУ-ФАЙЛІ\n"
 "                              порівняно з ВАШИМ-ФАЙЛОМ до МОГО-ФАЙЛА."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E  --show-overlap          подібно до -e, але з взяттям конфліктних місць у "
 "дужки"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1233,25 +1212,25 @@ msgstr ""
 "-3, --easy-only             подібно до -e, але включити лише зміни без "
 "перекриття"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          подібно до -e, але включати лише зміни з "
 "перекриттям"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          подібно до -x, але з взяттям розбіжностей у дужки"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          дописувати команди «w» і «q» в кінець сценарію "
 "ed."
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1260,28 +1239,28 @@ msgstr ""
 "до\n"
 "                                -A, якщо не вказано інших параметрів"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  вважати всі файли текстовими"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     вилучити з виведених даних всі завершальні "
 "символи нового рядка"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T  --initial-tab           вирівнювати табуляцію додаючи на початок символ "
 "табуляції"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=ПРОГРАМА використовувати для порівняння вказану ПРОГРАМУ"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1289,27 +1268,27 @@ msgstr ""
 "-L, --label=МІТКА           використовувати МІТКУ замість назви файла\n"
 "                                (можна використовувати не більше трьох разів)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr ""
 "    --help                  показати це довідкове повідомлення і завершити "
 "роботу"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr ""
 "-v, --version               показати дані щодо версії і завершити роботу"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Використання: %s [КЛЮЧ]... МІЙ-ФАЙЛ СТАРИЙ-ФАЙЛ ВАШ-ФАЙЛ\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "Порівняння трьох файлів рядками."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1333,48 +1312,48 @@ msgstr ""
 "diff3 з виводом їх до об’єднаного файла. Для нетипових вхідних даних\n"
 "такий варіант працює краще за варіант з використанням ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Код завершення дорівнює 0 при нормальному завершенні, 1 при конфліктах\n"
 " та 2 при несправностях."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "внутрішня помилка: пошкоджений формат diff-блоків"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: помилка при пошуку відмінностей: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr ""
 "внутрішня помилка: неправильний тип diff-блоку у функції `process_diff'"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "неправильний формат diff-файла; неправильний розділювач змін"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "неправильний формат diff-файла; неповний останній рядок"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "не вдається запустити допоміжну програму «%s»"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "неправильний diff-формат; неправильні перші символи рядка"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "внутрішня помилка: на вхід подано неправильний тип diff-файла"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "вхідний файл зменшився"
 
@@ -1389,135 +1368,135 @@ msgid "%s: recursive directory loop"
 msgstr "%s: зациклення рекурсивного проходу каталогів"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=ФАЙЛ            інтерактивний режим із записом виводу до ФАЙЛА"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i  --ignore-case            ігнорувати регістр літер"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr ""
 "-E  --ignore-tab-expansion   ігнорувати зміни, викликані заміною табуляції "
 "пробілами"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  ігнорувати пробіли наприкінці рядка"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b  --ignore-space-change    ігнорувати зміни у кількості пробілів"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W  --ignore-all-space       ігнорувати усі пробіли"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr ""
 "-B  --ignore-blank-lines     ігнорувати зміни кількості порожніх рядків"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  ігнорувати зміни, які відповідають "
 "формальному виразу RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      вилучити з виведених даних всі завершальні "
 "символи нового рядка"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   вважати всі файли текстовими"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=ЧИСЛО            виводити текст не більше ніж у ЧИСЛО (типово "
 "130) позицій у рядок"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, -left-column             виводити спільні рядки лише у ліву колонку"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s  --suppress-common-lines  не виводити спільні рядки"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t  --expand-tabs             замінювати символи табуляції пробілами у виводі"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=ЧИСЛО          табуляція кожні ЧИСЛО позицій виведення (типово "
 "8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d  --minimal                намагатись знайти найменший набір змін"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, -speed-large-files       вважати файли великими з багатьма розкиданими\n"
 "                               дрібними змінами."
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=ПРОГРАМА  використовувати для порівняння вказану ПРОГРАМУ"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr ""
 "    --help                   показати це довідкове повідомлення і завершити "
 "роботу"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr ""
 "-v, --version                показати дані щодо версії і завершити роботу"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Використання: %s [КЛЮЧ]... ФАЙЛ1 ФАЙЛ2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Паралельне об’єднання файлів ФАЙЛ1 і ФАЙЛ2."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "не можна інтерактивно об'єднувати стандартний потік вводу"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "обидва файли, що порівнюються є каталогами"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1551,6 +1530,18 @@ msgstr "невідомий префікс: %s"
 msgid "unparsable value for --palette"
 msgstr "непридатне до обробки значення для --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "некоректний аргумент %s%s — «%s»"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "некоректний суфікс у аргументі %s%s «%s»"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s, аргумент «%s» є занадто об'ємним"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Домашня сторінка %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: додавання аргументів до параметра «--%s» не передбачено\n"
 
index cd01a4c..f8b8965 100644 (file)
Binary files a/po/vi.gmo and b/po/vi.gmo differ
index fc85efd..e38e45b 100644 (file)
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
 "PO-Revision-Date: 2018-12-28 13:56+0700\n"
 "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
 "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
@@ -22,25 +22,25 @@ msgstr ""
 "X-Generator: Gtranslator 2.91.7\n"
 "X-Poedit-SourceCharset: UTF-8\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "tham số %s cho %s không hợp lệ"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "tham số %s không rõ ràng với %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "Các tham số hợp lệ là:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "lỗi chương trình"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "stack bị tràn"
 
@@ -200,11 +200,11 @@ msgstr "%s: tùy chọn yêu cầu một đối số -- “%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -276,7 +276,7 @@ msgstr "Biểu thức chính quy quá lớn"
 msgid "Unmatched ) or \\)"
 msgstr "Chưa khớp ) hay \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "Không có biểu thức chính quy đi trước"
 
@@ -284,41 +284,31 @@ msgstr "Không có biểu thức chính quy đi trước"
 msgid "memory exhausted"
 msgstr "hết bộ nhớ rồi"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "đầu vào tiêu chuẩn"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "đầu ra tiêu chuẩn"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "đầu lỗi tiêu chuẩn"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "không nhận ra luồng"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "lỗi mở lại %s với chế độ %s"
 
-#: lib/xstrtol-error.c:63
+#: lib/xstdopen.c:34
 #, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "đối số %s%s không hợp lệ “%s”"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "gặp hậu tố không hợp lệ trong %s%s đối số “%s”"
-
-#: lib/xstrtol-error.c:72
-#, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s%s nhận đối số “%s” là quá lớn"
+msgid "standard file descriptors"
+msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
@@ -337,14 +327,13 @@ msgstr "Gói đóng bởi %s\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
 "\n"
 "Giấy phép GPL pb3+ : Giấy phép Công cộng GNU phiên bản 3 hay sau <https://"
@@ -354,19 +343,19 @@ msgstr ""
 "\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "Tác giả: %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "Tác giả: %s và %s.\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "Tác giả: %s, %s, và %s.\n"
@@ -374,7 +363,7 @@ msgstr "Tác giả: %s, %s, và %s.\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -386,7 +375,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -398,7 +387,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -410,7 +399,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -422,7 +411,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -436,7 +425,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -450,7 +439,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -465,37 +454,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
 "\n"
 "Thông báo lỗi nào cho: %s\n"
 "Thông báo lỗi dịch nào cho: <http://translationproject.org/team/vi.html>\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr "Thông báo lỗi %s nào cho: %s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "Trang chủ %s: <%s>\n"
 
-#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "Trang chủ %s: <https://www.gnu.org/software/%s/>\n"
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
+#: lib/version-etc.c:260
+#, fuzzy, c-format
+msgid "General help using GNU software: <%s>\n"
 msgstr ""
 "Trợ giúp chung về cách sử dụng phần mềm GNU: <https://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "Hai tập tin %s và %s là khác nhau.\n"
@@ -505,56 +488,56 @@ msgstr "Hai tập tin %s và %s là khác nhau.\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "Hai tập tin nhị phân %s và %s khác nhau\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "Không có ký tự dòng mới tại kêt thức tập tin."
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "Hãy chạy lệnh “%s --help” để xem thông tin thêm."
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr ""
 "giá trị của tùy chọn --ignore-initial (bỏ qua giá trị đầu) “%s” không hợp lệ"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "hai tùy chọn -l và -s không tương thích với nhau"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "không ghi được"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "thiết bị xuất chuẩn"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b, --print-bytes          in ra những byte khác nhau."
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr ""
 "-i, --ignore-initial=SỐ           bỏ qua SỐ byte khởi đầu của dữ liệu nhập"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -562,38 +545,38 @@ msgstr ""
 "-i, --ignore-initial=SỐ1:SỐ2      bỏ qua SỐ1 byte đầu của TẬP-TIN1 và\n"
 "                                      SỐ2 byte đầu của TẬP-TIN2."
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr ""
 "-l, --verbose              xuất số byte và giá trị của tất cả byte khác nhau"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=SỐ             so sánh tối đa SỐ byte"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      loại bỏ tất cả các kết xuất thông thường"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 hiển thị trợ giúp này rồi thoát"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              đưa ra thông tin phiên bản rồi thoát"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "Cách dùng: %s [TÙY_CHỌN]… TẬP_TIN1 [TẬP_TIN2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "So sánh mỗi byte trong hai tập tin."
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
@@ -601,12 +584,12 @@ msgstr ""
 "Tùy chọn SKIP1 và SKIP2 chỉ định số byte sẽ được bỏ qua\n"
 "tại vị trí bắt đầu của mỗi tập tin (số không là mặc định)."
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr "Tùy chọn dài yêu cầu đối số thì tùy chọn ngắn cũng vậy.\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -618,201 +601,201 @@ msgstr ""
 "GB x 1,000,000,000\tG x 1,073,741,824\n"
 "tương tự với T, P, E, Z, Y v.v."
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "Nếu TẬP-TIN là “-”, hay bỏ trống, thì đọc từ đầu vào tiêu chuẩn."
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr ""
 "Trạng thái thoát là số 0 nếu hai đầu vào bằng nhau, số 1 nếu là khác nhau và "
 "số 2 nếu gặp lỗi."
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "giá trị cho tùy chọn --bytes “%s” không hợp lệ"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "thiếu toán hạng sau “%s”"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "toán hạng bổ xung “%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s có khác nhau: byte %s, dòng %s\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s có khác nhau: byte %s, dòng %s là %3o %s %3o %s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp: gặp kết thức tập tin trên %s cái mà trống rỗng\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp: gặp kết thức tập tin trên %s sau byte %s, dòng %s\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp: gặp kết thức tập tin trên %s sau byte %s, ở dòng %s\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp: gặp kết thức tập tin trên %s sau byte %s\n"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "Richard Stallman"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "độ dài ngữ cảnh không hợp lệ “%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "máy chủ này không hỗ trợ dàn trang"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "quá nhiều tùy chọn nhãn tập tin"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "độ rộng không hợp lệ “%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "nhiều tùy chọn độ rộng xung đột với nhau"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "độ dài chiều đứng không hợp lệ “%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "cỡ ký tự tab không hợp lệ “%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "nhiều tùy chọn cỡ ký tự tab xung đột với nhau"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr ""
 "ghi rõ cả hai tùy chọn --from-file (từ tập tin) và --to-file (vào tập tin) "
 "đều"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr ""
 "    --normal                  xuất ra định dạng diff thông thường (mặc định)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr ""
 "-q, --brief                   chỉ báo cáo nếu những tập tin khác với nhau"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  báo cáo khi có hai tập tin bằng nhau"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C SỐ, --context[=SỐ]     xuất ra SỐ (mặc định là 3) dòng của ngữ cảnh"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr ""
 "-u, -U SỐ, --unified[=SỐ]     xuất ra SỐ (mặc định là 3) dòng của ngữ cảnh\n"
 "                                hợp nhất"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      xuất tập lệnh loại ed"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr ""
 "-n, --rcs                     xuất dữ liệu khác biệt sử dụng định dạng RCS"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            xuất ra theo định dạng hai cột"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr ""
 "-W, --width=SỐ                xuất tối đa SỐ cột đã in ra (mặc định là 130)"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr ""
 "    --left-column             kết xuất chỉ cột bên trái của các dòng chung"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   không kết xuất các dòng chung nhau"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr ""
 "-p, --show-c-function         hiển thị cái mà từng hàm C thay đổi ở trong đó"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=RE   hiển thị những dòng gần nhất khớp với RE"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -821,27 +804,27 @@ msgstr ""
 "gian\n"
 "                                (có thể được lặp lại)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs             mở rộng ký tự tab ra ký tự khoảng cách khi "
 "kết\n"
 "                                xuất"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab             sắp xếp tất cả ký tự tab bằng cách thêm\n"
 "                                một tab vào trước"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=SỐ              định khoảng cách tab sau mỗi SỐ cột đã in ra\n"
 "                                (mặc định là 8)"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr ""
@@ -849,59 +832,59 @@ msgstr ""
 "kết\n"
 "                                xuất trống"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr ""
 "-l, --paginate                chuyển dữ liệu kết xuất qua “pr” để dàn trang "
 "nó"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr ""
 "-r, --recursive                 so sánh đệ qui mọi thư mục con đã tìm thấy"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            không theo liên kết mềm"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N  --new-file                  coi tập tin vắng mặt là trống"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "    --unidirectional-new-file   coi tập tin đầu mà vắng mặt là trống"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr ""
 "    --ignore-file-name-case     bỏ qua chữ HOA/thường khi so sánh\n"
 "                                  các tên tập tin"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr ""
 "    --no-ignore-file-name-case  phân biệt HOA/thường khi so sánh tên tập tin"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=MẪU               loại trừ các tập tin khớp với MẪU ấy"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr ""
 "-X, --exclude-from=TẬP_TIN      loại trừ mọi tập tin khớp với bất cứ mẫu nào "
 "trong TẬP TIN ấy"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr ""
 "-S, --starting-file=TẬP_TIN     bắt đầu với TẬP TIN khi so sánh nhiều thư mục"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -909,7 +892,7 @@ msgstr ""
 "    --from-file=TẬP_TIN1        so TẬP TIN 1 với tất cả toán hạng;\n"
 "                                  TẬP TIN 1 có thể là thư mục"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -917,76 +900,76 @@ msgstr ""
 "    --to-file=TẬP_TIN2          So tất cả toán hạng với TẬP TIN 2;\n"
 "                                  TẬP TIN 2 có thể là thư mục"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr ""
 "-i, --ignore-case               không phân biệt chữ HOA/thường trong nội\n"
 "                                  dung tập tin"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion      bỏ qua mọi thay đổi do mở rộng tab"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     bỏ qua tất cả dấu cách ở cuối dòng"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr ""
 "-b, --ignore-space-change       bỏ qua thay đổi gây ra bởi nhóm dấu cách"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          bỏ qua tất cả dấu cách"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B, --ignore-blank-lines        bỏ qua thay đổi do dòng trống"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  bỏ qua thay đổi do mà mọi dòng khớp với RE"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      xử lý mọi tập tin là văn bản thường"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr         cắt bỏ ký tự về đầu dòng (cr) theo sau khi gõ"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr ""
 "    --binary                    đọc và ghi dữ liệu trong chế độ nhị phân"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=TÊN                 kết xuất tập tin đã trộn với khác biệt "
 "“#ifdef TÊN”"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   định dạng nhập GTYPE với GFMT "
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr ""
 "    --line-format=LFMT          định dạng tất cảc các dòng vào với LFMT"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    định dạng nhập LTYPE với LFMT"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
@@ -994,13 +977,13 @@ msgstr ""
 "  Nhưng tùy chọn đó điểu khiển kết xuất ra định dạng diff\n"
 "    đẹp hơn, khái quát hóa -D/--ifdef."
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE là “cũ”, “mới”, hoặc “chưa thay đổi”. GTYPE là LTYPE hoặc “thay đổi "
 "rồi”."
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -1027,7 +1010,7 @@ msgstr ""
 "        E  F-1\n"
 "        M  L+1    %(A=B?T:E)  nếu A bằng B thì T nếu không thì E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -1039,7 +1022,7 @@ msgstr ""
 "    %l  nội dung của dòng, loại trừ ký tự dòng mới nào đi theo\n"
 "    %[-][Đ_RỘNG][.[PREC]]{doxX}n đặc tả dạng printf cho số dòng đầu vào"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1053,30 +1036,31 @@ msgstr ""
 "    %c'\\OOO'  ký tự có mã bát phân OOO\n"
 "    C      ký tự C (các ký tự khác đại diện cho chính chúng)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            cố tìm một thay đổi nhỏ"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
 msgstr "    --horizon-lines=SỐ   giữ SỐ dòng của tiền tố và hậu tố chung"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr ""
 "    --speed-large-files  giả định tập tin lớn và nhiều thay đổi nhỏ rải rác"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=WHEN]       tô màu kết xuất; WHEN có thể là 'never', 'always',\n"
 "                           hay 'auto' (mặc định)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1087,115 +1071,115 @@ msgstr ""
 "                           danh sách terminfo capabilities ngăn cách bằng "
 "dấu phẩy"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               hiển thị trợ giúp này rồi thoát"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            đưa ra thông tin phiên bản rồi thoát"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "CÁC TẬP TIN là “TẬP_TIN1 TẬP_TIN2” hoặc “THƯ_MỤC1 THƯ_MỤC2” hoặc “THƯ_MỤC "
 "TẬP_TIN” hay “TẬP_TIN THƯ_MỤC”."
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr ""
 "Nếu đưa ra tùy chọn --from-file (từ tập tin) hay --to-file (vào tập tin) thì "
 "không có giới hạn TẬP TIN."
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "Nếu TẬP-TIN là “-”, thì đọc từ đầu vào tiêu chuẩn."
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "Cách dùng: %s [TÙY_CHỌN]… CÁC_TẬP_TIN\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "So sánh các TẬP-TIN theo từng dòng."
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "tùy chọn %s xung đột, giá trị “%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "nhiều tùy chọn điều khiển định dạng xuất xung đột với nhau"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "màu không hợp lệ “%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "Chỉ trong %s: %s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "không thể so sánh “-” với một thư mục"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "không hỗ trợ tùy chọn -D với thư mục"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "Thư mục con chung: %s và %s\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "Tập tin %s là một %s trong khi tập tin %s là một %s.\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "Hai liên kết mềm %s và %s là khác nhau\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "Cả %s và %s là cùng một tập tin\n"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "nhiều tùy chọn không tương thích với nhau"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "đã chỉ ra “-” cho nhiều hơn một tập tin đầu vào"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "đọc gặp lỗi"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr ""
 "-A, --show-all              kết xuất tất cả thay đổi, đặt mọi xung đột trong "
 "ngoặc đơn"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1204,12 +1188,12 @@ msgstr ""
 "                                từ TẬP_TIN_CŨ thành TẬP_TIN_CỦA_BẠN vào "
 "TẬP_TIN_TÔI."
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr ""
 "-E, --show-overlap          giống -e, nhưng đặt xung đột trong ngoặc đơn"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
@@ -1217,24 +1201,24 @@ msgstr ""
 "-3, --easy-only             giống -e, nhưng chỉ sát nhập những thay đổi "
 "không chồng lấp"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr ""
 "-x, --overlap-only          giống -e, nhưng chỉ sát nhập những thay đổi bị "
 "chồng lấp"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr ""
 "-X                          giống -x, nhưng đặt xung đột trong ngoặc đơn"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr ""
 "-i                          nối thêm hai lệnh “w” và “q” vào văn lệnh ed"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1244,27 +1228,27 @@ msgstr ""
 "                                tùy chọn -A nếu như không có tùy chọn khác "
 "được chỉ ra"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a, --text                  coi mọi tập tin là văn bản thường"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr     cắt bỏ ký tự về đầu dòng (cr) theo sau khi nhập"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr ""
 "-T, --initial-tab           tạo khoảng tab cho dòng bằng cách thêm một tab "
 "vào trước"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=CHƯƠNG_TRÌNH  dùng CHƯƠNG_TRÌNH để so sánh các tập tin"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1272,24 +1256,24 @@ msgstr ""
 "-L, --label=NHÃN            sử dụng NHÃN thay vì tên tập tin\n"
 "                                (có thể lặp lại đến ba lần)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                  hiển thị trợ giúp này rồi thoát"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               đưa ra thông tin phiên bản rồi thoát"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "Cách dùng: %s [TÙY_CHỌN]… TẬP_TIN_TÔI TẬP_TIN_CŨ TẬP_TIN_BẠN\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "So sánh ba tập tin từng dòng một."
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1315,49 +1299,49 @@ msgstr ""
 "và kết xuất là tập tin đã được trộn.  Với kiểu đầu vào ít dùng, đây là cách\n"
 "hợp lý hơn sử dụng ed.\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr ""
 "Trạng thái thoát là số 0 nếu thành công, số 1 nếu có xung đột nào và số 2 "
 "nếu gặp lỗi."
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "gặp lỗi nội bộ: không định dạng khối khác biệt được."
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s: diff gặp lỗi: "
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr ""
 "gặp lỗi nội bộ: loại khác biệt không hợp lệ trong process_diff (xử lý khác "
 "biệt)"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "khuôn dạng diff không hợp lệ; ký tự ngăn cách thay đổi không hợp lê"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "khuôn dạng diff không hợp lệ; chưa xong dòng cuối cùng"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "không gọi được chương trình phụ trợ “%s”"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "khuôn dạng khác biệt không hợp lệ; ký tự đi trước dòng là không đúng"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "gặp lỗi nội bộ: kiểu diff không hợp lệ được chuyển qua cho kết xuất"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "tập tin đầu vào co lại"
 
@@ -1373,129 +1357,129 @@ msgstr "%s: vòng lặp thư mục đệ quy"
 
 # Tên họ
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr ""
 "-o, --output=TẬP_TIN         Thực hiện một cách tương tác, gửi kết xuất ra "
 "TẬP-TIN"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            coi chữ HOA và thường là như nhau"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion   bỏ qua mọi thay đổi do mở rộng tab"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  bỏ qua tất cả dấu cách ở cuối dòng"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    bỏ qua thay đổi gây ra bởi nhóm dấu cách"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       bỏ qua tất cả dấu cách"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines     bỏ qua thay đổi do đó là dòng trống"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=RE  bỏ qua thay đổi do mà mọi dòng khớp với RE"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr ""
 "    --strip-trailing-cr      cắt bỏ ký tự về đầu dòng (cr) theo sau khi gõ"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a, --text                   coi mọi tập tin là văn bản thường"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr ""
 "-w, --width=SỐ               kết xuất nhiểu nhất là SỐ cột (mặc định là 130)"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr ""
 "-l, --left-column            kết xuất chỉ cột bên trái của các dòng chung "
 "nhau"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  không kết xuất các dòng chung nhau"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr ""
 "-t, --expand-tabs            khai triển ký tự tab thành các khoảng trắng\n"
 "                               khi kết xuất"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr ""
 "    --tabsize=SỐ             điểm đừng tab sau mỗi SỐ cột đã in ra (mặc định "
 "là 8)"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                cố tìm một thay đổi nhỏ"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      giả sử tập tin lớn, nhiều thay đổi nhỏ rải rác"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr ""
 "    --diff-program=CHƯƠNG_TRÌNH sử dụng CHƯƠNG_TRÌNH ấy để so sánh các tập "
 "tin"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   hiển thị trợ giúp này rồi thoát"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                đưa ra thông tin phiên bản rồi thoát"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "Cách dùng: %s [TÙY_CHỌN]… TẬP_TIN1 TẬP_TIN2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "Hòa trộn những khác biệt TẬP_TIN1 VÀ TẬP_TIN2 cạnh nhau."
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "không hợp nhất được dữ liệu gõ chuẩn một cách tương tác"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "cả hai tập tin dùng để so sánh đều là thư mục"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1529,6 +1513,18 @@ msgstr "không hiểu tiền tố: %s"
 msgid "unparsable value for --palette"
 msgstr "không thể phân tích giá trị cho --palette"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "đối số %s%s không hợp lệ “%s”"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "gặp hậu tố không hợp lệ trong %s%s đối số “%s”"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s nhận đối số “%s” là quá lớn"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "Trang chủ %s: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s: tùy chọn “--%s” không cho phép đối số\n"
 
index eb44675..42ded42 100644 (file)
Binary files a/po/zh_CN.gmo and b/po/zh_CN.gmo differ
index 05cbef6..ae38434 100644 (file)
@@ -4,14 +4,14 @@
 # Yingxin Zhou <eerd003@dlut.edu.cn>, 2004.
 # Anthony Fok <foka@debian.org>, 2013.
 # Mingye Wang (Arthur2e5) <arthur200126@gmail.com>, 2016.
-# Boyuan Yang <073plan@gmail.com>, 2018.
+# Boyuan Yang <073plan@gmail.com>, 2018, 2021.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 3.6.17\n"
+"Project-Id-Version: diffutils 3.7.41\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2018-12-28 13:39+0800\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-07-20 13:48-0400\n"
 "Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
 "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
 "Language: zh_CN\n"
@@ -19,27 +19,27 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
-"X-Generator: Poedit 2.2\n"
+"X-Generator: Poedit 2.4.2\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
 msgstr "无效的参数 %s 对于 %s"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
 msgstr "有歧义的参数 %s 对于 %s"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
 msgstr "有效的参数为:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "程序错误"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
 msgstr "栈溢出"
 
@@ -199,11 +199,11 @@ msgstr "%s:选项需要一个参数 -- “%c”\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
 msgstr "“"
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
 msgstr "”"
 
@@ -229,7 +229,7 @@ msgstr "无效的字符种类名称"
 
 #: lib/regcomp.c:150
 msgid "Trailing backslash"
-msgstr "末端有多余的反斜"
+msgstr "末端有多余的反斜"
 
 #: lib/regcomp.c:153
 msgid "Invalid back reference"
@@ -265,7 +265,7 @@ msgstr "无效的前导正则表达式"
 
 #: lib/regcomp.c:177
 msgid "Premature end of regular expression"
-msgstr "æ­£å\88\99表达å¼\8fè¿\87æ\97±结束"
+msgstr "æ­£å\88\99表达å¼\8fè¿\87æ\97©结束"
 
 #: lib/regcomp.c:180
 msgid "Regular expression too big"
@@ -275,7 +275,7 @@ msgstr "正则表达式过大"
 msgid "Unmatched ) or \\)"
 msgstr "没有匹配的 ) 或 \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
 msgstr "之前没有任何正则表达式"
 
@@ -283,41 +283,31 @@ msgstr "之前没有任何正则表达式"
 msgid "memory exhausted"
 msgstr "内存耗尽"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
 msgstr "标准输入"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
 msgstr "标准输出"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
 msgstr "标准错误"
 
-#: lib/xfreopen.c:38
+#: lib/xfreopen.c:37
 msgid "unknown stream"
 msgstr "未知流"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
 msgstr "未能以模式 %2$s 重打开 %1$s"
 
-#: lib/xstrtol-error.c:63
-#, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "无效的 %s%s 参数 “%s”"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr "在 %s%s 的参数 “%s” 中有无效的后缀"
-
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
-msgstr "%s %s 参数 “%s” 太大"
+msgid "standard file descriptors"
+msgstr "标准文件描述符"
 
 #: lib/version-etc.c:73
 #, c-format
@@ -336,36 +326,32 @@ msgstr "由 %s 打包\n"
 msgid "(C)"
 msgstr "©"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
-"\n"
-"许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<https://gnu.org/licenses/"
-"gpl.html>。\n"
+"许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本 <%s>。\n"
 "本软件是自由软件:您可以自由修改和重新发布它。\n"
-"在法律允许的范围内没有其他保证。\n"
-"\n"
+"在法律允许的范围内没有其他质保。\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "作者:%s。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "作者:%s 和 %s。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
 msgstr "作者:%s、%s 和 %s。\n"
@@ -373,7 +359,7 @@ msgstr "作者:%s、%s 和 %s。\n"
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -385,7 +371,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -397,7 +383,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -409,7 +395,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -421,7 +407,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -435,7 +421,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -449,7 +435,7 @@ msgstr ""
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
@@ -464,38 +450,31 @@ msgstr ""
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
+#: lib/version-etc.c:249
 #, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+msgid "Report bugs to: %s\n"
 msgstr ""
-"\n"
 "报告程序错误到: %s\n"
 "报告翻译错误到: https://translationproject.org/teams/zh_CN.html\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
 msgstr ""
 "报告 %1$s 程序错误到: %2$s\n"
 "报告 %1$s 翻译错误到: https://translationproject.org/teams/zh_CN.html\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
 msgstr "%s 主页: <%s>\n"
 
-#: lib/version-etc.c:253
+#: lib/version-etc.c:260
 #, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr "%s 主页: <https://www.gnu.org/software/%s/>\n"
+msgid "General help using GNU software: <%s>\n"
+msgstr "使用 GNU 软件的通用帮助:<%s>\n"
 
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr "使用 GNU 软件的通用帮助:<https://www.gnu.org/gethelp/>\n"
-
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "文件 %s 和 %s 不同\n"
@@ -505,53 +484,53 @@ msgstr "文件 %s 和 %s 不同\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "二进制文件 %s 和 %s 不同\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "文件尾没有换行符"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
 msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
 #, c-format
 msgid "Try '%s --help' for more information."
 msgstr "请尝试 “%s --help”,以获得更多信息。"
 
-#: src/cmp.c:137
+#: src/cmp.c:138
 #, c-format
 msgid "invalid --ignore-initial value '%s'"
 msgstr "无效的 --ignore-initial 值 “%s”"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "选项 -l 和 -s 不兼容"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "写入失败"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "标准输出"
 
-#: src/cmp.c:161
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
 msgstr "-b  --print-bytes          打印出内容相异的字节"
 
-#: src/cmp.c:162
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
 msgstr "-i, --ignore-initial=SKIP         两个输入内容都略过前 SKIP 字节"
 
-#: src/cmp.c:163
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
@@ -560,48 +539,48 @@ msgstr ""
 "2>\n"
 "                                    的前 <跳2> 个字节"
 
-#: src/cmp.c:165
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
 msgstr "-l, --verbose              输出所有相异字节的字节数和内容"
 
-#: src/cmp.c:166
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
 msgstr "-n, --bytes=限制           最多比较给定字节数的数据"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
 msgstr "-s, --quiet, --silent      禁止所有正常输出"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
 msgstr "    --help                 显示此帮助信息并退出"
 
-#: src/cmp.c:169
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
 msgstr "-v, --version              输出版本信息并退出"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "用法: %s [选项]... 文件1 [文件2 [跳1 [跳2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "逐字节比较两个文件。"
 
-#: src/cmp.c:182
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
 msgstr "<跳1> 和 <跳2> 分别是每个文件要略过的字节数。"
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
 msgstr "长选项的必需参数也是相应短选项的必需参数。\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -612,184 +591,184 @@ msgstr ""
 "G=107,374,182,\n"
 "还有 T、P、E、Z、Y,如此类推。"
 
-#: src/cmp.c:194
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
 msgstr "如果文件是 “-” 或没给出,则从标准输入读入内容。"
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "如果输入相同,则退出状态为 0;1 表示输入不同;2 表示有错误产生。"
 
-#: src/cmp.c:240
+#: src/cmp.c:243
 #, c-format
 msgid "invalid --bytes value '%s'"
 msgstr "无效的 --bytes 值 `%s'"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
 #, c-format
 msgid "missing operand after '%s'"
 msgstr "操作数 “%s” 后缺少参数"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
 #, c-format
 msgid "extra operand '%s'"
 msgstr "多余的操作数 “%s”"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s 不同:第 %s 字节,第 %s 行\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%1$s %2$s 不同:第 %4$s 行,第 %3$s 字节为 %5$3o %6$s %7$3o %8$s\n"
 
-#: src/cmp.c:571
+#: src/cmp.c:580
 #, c-format
 msgid "cmp: EOF on %s which is empty\n"
 msgstr "cmp:%s 已结束且为空\n"
 
-#: src/cmp.c:585
+#: src/cmp.c:594
 #, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
 msgstr "cmp:%s 在 %s 字节 %s 行后结束\n"
 
-#: src/cmp.c:586
+#: src/cmp.c:595
 #, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
 msgstr "cmp:%s 在 %s 字节 %s 行中结束\n"
 
-#: src/cmp.c:592
+#: src/cmp.c:601
 #, c-format
 msgid "cmp: EOF on %s after byte %s\n"
 msgstr "cmp:%s 在 %s 字节后结束\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
 msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
 msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
 msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
 msgstr "理查德·斯托曼"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
 msgstr "Len Tower"
 
-#: src/diff.c:353
+#: src/diff.c:355
 #, c-format
 msgid "invalid context length '%s'"
 msgstr "无效的上下文长度“%s”"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "此系统不支持分页"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "过多的文件标号选项"
 
-#: src/diff.c:528
+#: src/diff.c:530
 #, c-format
 msgid "invalid width '%s'"
 msgstr "无效的宽度“%s”"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "宽度选项冲突"
 
-#: src/diff.c:557
+#: src/diff.c:559
 #, c-format
 msgid "invalid horizon length '%s'"
 msgstr "无效的水平长度 “%s”"
 
-#: src/diff.c:613
+#: src/diff.c:615
 #, c-format
 msgid "invalid tabsize '%s'"
 msgstr "无效的制表符宽度 “%s”"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "制表符长度选项冲突"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "同时指定了选项 --from-file 和 --to-file"
 
-#: src/diff.c:891
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
 msgstr "    --normal                  以正常的 diff 方式输出 (默认)"
 
-#: src/diff.c:892
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
 msgstr "-q, --brief                   只有在文件不同时报告"
 
-#: src/diff.c:893
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
 msgstr "-s, --report-identical-files  当两个一样时仍然显示结果"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
 msgstr ""
 "-c, -C NUM, --context[=NUM]   同时输出 NUM 行(默认为 3 行)的复制上下文内容"
 
-#: src/diff.c:895
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
 msgstr "-u, -U 数量, --unified[=数量] 输出 <数量>(默认为 3)行一致化上下文"
 
-#: src/diff.c:896
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
 msgstr "-e, --ed                      以 ed script 方式输出"
 
-#: src/diff.c:897
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
 msgstr "-n, --rcs                     以 RCS diff 格式输出"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
 msgstr "-y, --side-by-side            以两栏的格式输出"
 
-#: src/diff.c:899
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
 msgstr "-W, --width=数量              每行显示最多 <数量>(默认 130)个字符"
 
-#: src/diff.c:900
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
 msgstr "    --left-column             当有两行相同时只显示左边栏的一行"
 
-#: src/diff.c:901
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
 msgstr "    --suppress-common-lines   当有两行相同时不显示"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
 msgstr "-p, --show-c-function         显示每个变更位于哪个 C 函数中"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
 msgstr "-F, --show-function-line=正则 显示匹配给定<正则>表达式的最近一行"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
@@ -797,68 +776,68 @@ msgstr ""
 "    --label 标签              使用给定<标签>替代文件名和时间戳\n"
 "                                (可以重复)"
 
-#: src/diff.c:908
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
 msgstr "-t, --expand-tabs             将输出中的 tab 转换成空格"
 
-#: src/diff.c:909
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
 msgstr "-T, --initial-tab             每行先加上 tab 字符,使 tab 字符可以对齐"
 
-#: src/diff.c:910
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
 msgstr "    --tabsize=数字           TAB 格的宽度,默认为 8 个打印列宽"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
 msgstr "    --suppress-blank-empty    在空的输出行之前去除空白或制表符"
 
-#: src/diff.c:912
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
 msgstr "-l, --paginate                将输出送至 “pr” 指令来分页"
 
-#: src/diff.c:914
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
 msgstr "-r, --recursive                 连同所有子目录一起比较"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
 msgstr "    --no-dereference            不要跟随符号链接"
 
-#: src/diff.c:916
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
 msgstr "-N, --new-file                  不存在的文件以空文件方式处理"
 
-#: src/diff.c:917
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
 msgstr "    --unidirectional-new-file   若第一文件不存在,以空文件处理"
 
-#: src/diff.c:918
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
 msgstr "    --ignore-file-name-case     忽略文件名大小写的区别"
 
-#: src/diff.c:919
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
 msgstr "    --no-ignore-file-name-case  不忽略文件名大小写的区别"
 
-#: src/diff.c:920
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
 msgstr "-x, --exclude=模式              排除匹配 <模式> 的文件"
 
-#: src/diff.c:921
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
 msgstr "-X, --exclude-from=文件         排除所有匹配在<文件>中列出的模式的文件"
 
-#: src/diff.c:922
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
 msgstr "-S, --starting-file=文件        当比较目录時,由<文件>开始比较"
 
-#: src/diff.c:923
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
@@ -866,7 +845,7 @@ msgstr ""
 "    --from-file=文件1           将<文件1>和操作数中的所有文件/目录作比较;\n"
 "                                  <文件1>可以是目录"
 
-#: src/diff.c:925
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
@@ -874,82 +853,82 @@ msgstr ""
 "    --to-file=文件2             将操作数中的所有文件/目录和<文件2>作比较;\n"
 "                                  <文件2>可以是目录"
 
-#: src/diff.c:928
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
 msgstr "-i, --ignore-case               忽略文件内容大小写的区别"
 
-#: src/diff.c:929
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion      忽略由制表符宽度造成的差异"
 
-#: src/diff.c:930
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space     忽略每行末端的空格"
 
-#: src/diff.c:931
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change       忽略由空格数不同造成的差异"
 
-#: src/diff.c:932
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
 msgstr "-w, --ignore-all-space          忽略所有空格"
 
-#: src/diff.c:933
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
 msgstr "-B, --ignore-blank-lines        忽略任何因空行而造成的差异"
 
-#: src/diff.c:934
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=正则 若某行完全匹配 <正则>,则忽略由该行造成的差"
 "异"
 
-#: src/diff.c:936
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
 msgstr "-a, --text                      所有文件都以文本方式处理"
 
-#: src/diff.c:937
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr         去除输入内容每行末端的回车(CR)字符"
 
-#: src/diff.c:939
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
 msgstr "    --binary                    以二进制方式读写数据"
 
-#: src/diff.c:942
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
 msgstr ""
 "-D, --ifdef=名称                输出的内容以 ‘#ifdef <名称>’ 方式标明差异"
 
-#: src/diff.c:943
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
 msgstr "    --GTYPE-group-format=GFMT   以 GFMT 格式处理 GTYPE 输入行组"
 
-#: src/diff.c:944
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
 msgstr "    --line-format=LFMT          以 LFMT 格式处理每一行资料"
 
-#: src/diff.c:945
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
 msgstr "    --LTYPE-line-format=LFMT    以 LFMT 格式处理 LTYPE 输入的行"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
 msgstr "  这些格式化选项提供对 diff 输出的精细控制,从而泛化 -D/--ifdef。"
 
-#: src/diff.c:948
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
 "  LTYPE 可以是 “old”、“new” 或 “unchanged”。GTYPE 可以是 LTYPE 的选择\n"
 "  或是 “changed”。"
 
-#: src/diff.c:949
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -977,7 +956,7 @@ msgstr ""
 "        M  L+1\n"
 "    %(A=B?T:E)  如果 A 等于 B 那么 T 否则 E"
 
-#: src/diff.c:961
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
@@ -989,7 +968,7 @@ msgstr ""
 "    %l  该行的内容,但不包括结束的换行符\n"
 "    %[-][宽度][.[精确度]]{doxX}n  以 printf 格式表示的输入行号"
 
-#: src/diff.c:965
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1003,29 +982,30 @@ msgstr ""
 "    %c'\\OOO'  八进制码 OOO 所代表的字符\n"
 "    C         字符 C(处上述转义外的其他字符代表它们自身)"
 
-#: src/diff.c:971
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
 msgstr "-d, --minimal            尽可能找出最小的差异集"
 
-#: src/diff.c:972
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
-msgstr "    --horizon-lines=数量 保持<数量>行的一致前后缀"
+msgstr "    --horizon-lines=数量 保持指定行数的一致前后缀"
 
-#: src/diff.c:973
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
 msgstr "    --speed-large-files  假设文件十分大而且文件中含有许多微小的差异"
 
-#: src/diff.c:974
+#: src/diff.c:976
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
 "    --color[=何时]       给输出上色;“何时”可以是“never”(从不)、\n"
-"                           “always”(总是)或“auto”(自动,默认)"
+"                           “always”(总是)或“auto”(自动,默认);\n"
+"                           仅指定 --color 与 --color='auto' 效果相同"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
@@ -1036,110 +1016,110 @@ msgstr ""
 "                           一个冒号分隔的列表以提供 terminfo capabilities 信"
 "息"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
 msgstr "    --help               显示此帮助信息并退出"
 
-#: src/diff.c:980
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
 msgstr "-v, --version            输出版本信息并退出"
 
-#: src/diff.c:982
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
 "<文件列表> 的格式可以是“文件1 文件2”、“目录1 目录2”、“目录 文件”或\n"
 "    “文件 目录”。"
 
-#: src/diff.c:983
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
 msgstr "如果使用 --from-file 或 --to-file 选项,<文件名> 的格式则不受限制。"
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
 msgstr "如果 FILE 是 “-”,则由标准输入读取内容。"
 
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "用法:%s [选项]... 文件列表\n"
 
-#: src/diff.c:995
+#: src/diff.c:997
 msgid "Compare FILES line by line."
 msgstr "逐行比较<各文件>。"
 
-#: src/diff.c:1032
+#: src/diff.c:1034
 #, c-format
 msgid "conflicting %s option value '%s'"
 msgstr "互相冲突的 %s 选项,参数值为 “%s”"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "互相冲突的输出风格选项"
 
-#: src/diff.c:1061
+#: src/diff.c:1063
 #, c-format
 msgid "invalid color '%s'"
 msgstr "无效的颜色“%s”"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "只在 %s 存在:%s\n"
 
-#: src/diff.c:1251
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
 msgstr "“-” 无法与目录作比较"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D 选项不支持目录使用"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "%s 和 %s 有共同的子目录\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "文件 %s 是%s而文件 %s 是%s\n"
 
-#: src/diff.c:1373
+#: src/diff.c:1375
 #, c-format
 msgid "Symbolic links %s and %s differ\n"
 msgstr "软链接 %s 和 %s 不同\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
-msgstr "æª\94æ¡\88 %s 和 %s 相同\n"
+msgstr "æ\96\87件 %s 和 %s 相同\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
 msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "不兼容的选项"
 
-#: src/diff3.c:391
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
 msgstr "“-”作输入文件不可多于一处"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "读取时失败"
 
-#: src/diff3.c:475
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
 msgstr "-A, --show-all              输出所有要更改的部份,并括上互相冲突的地方"
 
-#: src/diff3.c:477
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
@@ -1148,31 +1128,31 @@ msgstr ""
 "可将此\n"
 "                              改变应用至 <我的文件> 的 ed 脚本"
 
-#: src/diff3.c:479
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
 msgstr "-E, --show-overlap          类似 -e,但括上互相冲突的地方"
 
-#: src/diff3.c:480
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
 msgstr ""
 "-3, --easy-only             类似 -e,但只输出未合并而且不重叠的更改部份"
 
-#: src/diff3.c:481
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
 msgstr "-x, --overlap-only          类似 -e,但只输出重叠的更改部份"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
 msgstr "-X                          类似 -x,但括上互相冲突的地方"
 
-#: src/diff3.c:483
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
 msgstr "-i                          在 ed script 中附加‘w’和‘q’命令"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
@@ -1180,23 +1160,23 @@ msgstr ""
 "-m, --merge                 输出实际的合并后文件,若没有给出其它选项则\n"
 "                                根据 -A 操作"
 
-#: src/diff3.c:488
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
 msgstr "-a  --text                  所有文件都以文本方式处理"
 
-#: src/diff3.c:489
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     去除输入内容每行末端的回车(CR)字符"
 
-#: src/diff3.c:490
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
 msgstr "-T  --initial-tab           每行先加上 tab 字符,使 tab 字符可以对齐"
 
-#: src/diff3.c:491
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
 msgstr "    --diff-program=程序     用<程序>来比较文件"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
@@ -1204,24 +1184,24 @@ msgstr ""
 "-L, --label=标签            使用指定<标签>而非文件名\n"
 "                                (可以重复最多三次)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
 msgstr "    --help                 显示此帮助信息并退出"
 
-#: src/diff3.c:496
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
 msgstr "-v, --version               输出版本信息并退出"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "用法:%s [选项]... 我的文件 旧文件 你的文件\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "逐行比较三个文件。"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1243,45 +1223,45 @@ msgstr ""
 "另外,-m (--merge) 选项将使得 diff3 在内部完成合并并输出实际的已合并文件。\n"
 "对那些不常见的输入来说,使用它来处理通常比使用 ed 更稳健。\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "退出状态为 0 表示成功,1 表示冲突,2 表示有错误发生。"
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "内部错误:diff 区段的格式出错"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s:diff 失败:"
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "内部错误:process_diff 中的 diff 类型无效"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "无效的 diff 格式;表示内容改变的分隔字符串无效"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "无效的 diff 格式;最后一行不完整"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
 #, c-format
 msgid "subsidiary program '%s' could not be invoked"
 msgstr "无法调用辅助程序 “%s”"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "无效的 diff 格式;错误的行前导字符"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "内部错误:传递给输出的 diff 类型无效"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "输入文件缩小"
 
@@ -1296,118 +1276,118 @@ msgid "%s: recursive directory loop"
 msgstr "%s:递归目录循环"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
 msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
 msgstr "-o, --output=文件            交互式操作,并将结果写入至<文件>"
 
-#: src/sdiff.c:175
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
 msgstr "-i, --ignore-case            忽略大小写的区别"
 
-#: src/sdiff.c:176
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
 msgstr "-E, --ignore-tab-expansion   忽略由制表符宽度造成的差异"
 
-#: src/sdiff.c:177
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
 msgstr "-Z, --ignore-trailing-space  忽略行末的空格字符"
 
-#: src/sdiff.c:178
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
 msgstr "-b, --ignore-space-change    忽略由空格数不同造成的差异"
 
-#: src/sdiff.c:179
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
 msgstr "-W, --ignore-all-space       忽略所有空白字符"
 
-#: src/sdiff.c:180
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
 msgstr "-B, --ignore-blank-lines     忽略任何因空行而造成的差异"
 
-#: src/sdiff.c:181
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
 msgstr ""
 "-I, --ignore-matching-lines=正则 若某行完全匹配 <正则>,则忽略由该行造成的差"
 "异"
 
-#: src/sdiff.c:182
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
 msgstr "    --strip-trailing-cr     去除输入内容每行末端的回车(CR)字符"
 
-#: src/sdiff.c:183
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
 msgstr "-a  --text                  所有文件都以文本方式处理"
 
-#: src/sdiff.c:185
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
 msgstr "-W, --width=数量              每行显示最多 <数量>(默认 130)个字符"
 
-#: src/sdiff.c:186
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
 msgstr "-l, --left-column            当有两行相同时只显示左栏的一行"
 
-#: src/sdiff.c:187
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
 msgstr "-s, --suppress-common-lines  当有两行相同时不显示"
 
-#: src/sdiff.c:189
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
 msgstr "-t, --expand-tabs            将输出中的 tab 转换成空格"
 
-#: src/sdiff.c:190
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
 msgstr "    --tabsize=数字           TAB 格的宽度,默认为 8 个打印列宽"
 
-#: src/sdiff.c:192
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
 msgstr "-d, --minimal                尽可能找出最小的差异集"
 
-#: src/sdiff.c:193
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
 msgstr ""
 "-H, --speed-large-files      假设文件十分大而且文件中含有许多微小的差异"
 
-#: src/sdiff.c:194
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
 msgstr "    --diff-program=程序      用<程序>来比较文件"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
 msgstr "    --help                   显示此帮助信息并退出"
 
-#: src/sdiff.c:197
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
 msgstr "-v, --version                输出版本信息并退出"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "用法:%s [选项]... 文件1 文件2\n"
 
-#: src/sdiff.c:208
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
 msgstr "以并排方式合并文件之间的差异。"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "不允许以交互方式合并标准输入的内容"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "两个要被比较的文件都是目录"
 
-#: src/sdiff.c:818
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1441,6 +1421,18 @@ msgstr "无法识别的前缀:%s"
 msgid "unparsable value for --palette"
 msgstr "--palette 的值无法解析"
 
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "无效的 %s%s 参数 “%s”"
+
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "在 %s%s 的参数 “%s” 中有无效的后缀"
+
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s %s 参数 “%s” 太大"
+
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s 主页: <https://www.gnu.org/software/%s/>\n"
+
 #~ msgid "%s: option '--%s' doesn't allow an argument\n"
 #~ msgstr "%s:选项 “--%s” 不接受参数\n"
 
index 2313b9c..6fbadcb 100644 (file)
Binary files a/po/zh_TW.gmo and b/po/zh_TW.gmo differ
index 158ac99..d90183a 100644 (file)
@@ -1,54 +1,58 @@
 # traditional Chinese translation of diffutils.
 # Copyright (C) 2002, 2005 Free Software Foundation, Inc.
-# Abel Cheung <maddog@linux.org.hk>, 2002, 2005.
+# This file is distributed under the same license as the diffutils package.
 #
+# Abel Cheung <maddog@linux.org.hk>, 2002, 2005.
+# pan93412 <pan93412@gmail.com>, 2019, 2021.
 msgid ""
 msgstr ""
-"Project-Id-Version: diffutils 2.8.7\n"
+"Project-Id-Version: diffutils 3.6.17\n"
 "Report-Msgid-Bugs-To: bug-diffutils@gnu.org\n"
-"POT-Creation-Date: 2018-12-31 17:45-0800\n"
-"PO-Revision-Date: 2005-04-01 14:31+0800\n"
-"Last-Translator: Abel Cheung <maddog@linux.org.hk>\n"
-"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"POT-Creation-Date: 2021-08-01 18:56-0700\n"
+"PO-Revision-Date: 2021-05-09 20:53+0800\n"
+"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
 "Language: zh_TW\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 2.4.3\n"
 
-#: lib/argmatch.c:134
+#: lib/argmatch.c:132
 #, c-format
 msgid "invalid argument %s for %s"
-msgstr ""
+msgstr "傳入 %2$s 之參數 %1$s 無效"
 
-#: lib/argmatch.c:135
+#: lib/argmatch.c:133
 #, c-format
 msgid "ambiguous argument %s for %s"
-msgstr ""
+msgstr "傳入 %2$s 之參數 %1$s 不明確"
 
-#: lib/argmatch.c:154
+#: lib/argmatch.c:152 lib/argmatch.h:223
 msgid "Valid arguments are:"
-msgstr ""
+msgstr "有效的參數為:"
 
-#: lib/c-stack.c:208 lib/c-stack.c:301
+#: lib/c-stack.c:187
 msgid "program error"
 msgstr "程式錯誤"
 
-#: lib/c-stack.c:209 lib/c-stack.c:302
+#: lib/c-stack.c:188
 msgid "stack overflow"
-msgstr "堆疊溢"
+msgstr "堆疊溢"
 
 #: lib/error.c:195
 msgid "Unknown system error"
-msgstr "不明的系統錯誤"
+msgstr "未知系統錯誤"
 
 #: lib/file-type.c:40
 msgid "regular empty file"
-msgstr "普通空白檔案"
+msgstr "一般空白檔案"
 
 #: lib/file-type.c:40
 msgid "regular file"
-msgstr "普通檔案"
+msgstr "一般檔案"
 
 #: lib/file-type.c:43
 msgid "directory"
@@ -64,15 +68,15 @@ msgstr "訊息佇列"
 
 #: lib/file-type.c:55
 msgid "semaphore"
-msgstr "semaphore"
+msgstr "旗號"
 
 #: lib/file-type.c:58
 msgid "shared memory object"
-msgstr "å\88\86享è¨\98æ\86物件"
+msgstr "å\85±ç\94¨è¨\98æ\86¶é«\94物件"
 
 #: lib/file-type.c:61
 msgid "typed memory object"
-msgstr "å\88\86é¡\9eè¨\98æ\86物件"
+msgstr "å\85·é¡\9eå\9e\8bè¨\98æ\86¶é«\94物件"
 
 #: lib/file-type.c:66
 msgid "block special file"
@@ -84,7 +88,7 @@ msgstr "字元特殊檔案"
 
 #: lib/file-type.c:72
 msgid "contiguous data"
-msgstr ""
+msgstr "連續資料"
 
 #: lib/file-type.c:75
 msgid "fifo"
@@ -92,43 +96,39 @@ msgstr "fifo"
 
 #: lib/file-type.c:78
 msgid "door"
-msgstr ""
+msgstr "門 (door)"
 
 #: lib/file-type.c:81
-#, fuzzy
 msgid "multiplexed block special file"
-msgstr "å\8d\80å¡\8aç\89¹æ®\8aæª\94æ¡\88"
+msgstr "å¤\9aå·¥å\8d\80å¡\8aç\89¹æ®\8aæª\94"
 
 #: lib/file-type.c:84
-#, fuzzy
 msgid "multiplexed character special file"
-msgstr "å­\97å\85\83ç\89¹æ®\8aæª\94æ¡\88"
+msgstr "å¤\9aå·¥å­\97å\85\83ç\89¹æ®\8aæª\94"
 
 #: lib/file-type.c:87
 msgid "multiplexed file"
-msgstr ""
+msgstr "多工檔案"
 
 #: lib/file-type.c:90
-#, fuzzy
 msgid "named file"
-msgstr "不尋常的檔案"
+msgstr "命名檔案"
 
 #: lib/file-type.c:93
-#, fuzzy
 msgid "network special file"
-msgstr "區塊特殊檔案"
+msgstr "網路特殊檔案"
 
 #: lib/file-type.c:96
 msgid "migrated file with data"
-msgstr ""
+msgstr "移轉檔(含資料)"
 
 #: lib/file-type.c:99
 msgid "migrated file without data"
-msgstr ""
+msgstr "移轉檔(不含資料)"
 
 #: lib/file-type.c:102
 msgid "port"
-msgstr ""
+msgstr "連線埠"
 
 #: lib/file-type.c:105
 msgid "socket"
@@ -136,46 +136,46 @@ msgstr "socket"
 
 #: lib/file-type.c:108
 msgid "whiteout"
-msgstr ""
+msgstr "whiteout"
 
 #: lib/file-type.c:110
 msgid "weird file"
-msgstr "不尋常的檔案"
+msgstr "不正常檔案"
 
 #: lib/getopt.c:278
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous\n"
-msgstr "%s:選項‘%s’是不明確的\n"
+msgstr "%s:「%s%s」選項不明確\n"
 
 #: lib/getopt.c:284
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' is ambiguous; possibilities:"
-msgstr "%s:選項‘%s’是不明確的\n"
+msgstr "%s:「%s%s」選項不明確;可能是:"
 
 #: lib/getopt.c:319
-#, fuzzy, c-format
+#, c-format
 msgid "%s: unrecognized option '%s%s'\n"
-msgstr "%s:無法識別的選項‘%c%s’\n"
+msgstr "%s:無法識別「%s%s」選項\n"
 
 #: lib/getopt.c:345
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' doesn't allow an argument\n"
-msgstr "%s:選項‘%c%s’不可配合參數使用\n"
+msgstr "%s:「%s%s」選項不接受參數\n"
 
 #: lib/getopt.c:360
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option '%s%s' requires an argument\n"
-msgstr "%s:選項‘%s’需要參數\n"
+msgstr "%s:「%s%s」選項需要參數\n"
 
 #: lib/getopt.c:621
-#, fuzzy, c-format
+#, c-format
 msgid "%s: invalid option -- '%c'\n"
-msgstr "%s:無效的選項 ─ %c\n"
+msgstr "%s:無效選項 -- '%c'\n"
 
 #: lib/getopt.c:636 lib/getopt.c:682
-#, fuzzy, c-format
+#, c-format
 msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s:選項需要參數 ─ %c\n"
+msgstr "%s:選項需要參數 -- '%c'\n"
 
 #. TRANSLATORS:
 #. Get translations for open and closing quotation marks.
@@ -198,13 +198,13 @@ msgstr "%s:選項需要參數 ─ %c\n"
 #. If you don't know what to put here, please see
 #. <https://en.wikipedia.org/wiki/Quotation_marks_in_other_languages>
 #. and use glyphs suitable for your language.
-#: lib/quotearg.c:362
+#: lib/quotearg.c:355
 msgid "`"
-msgstr ""
+msgstr ""
 
-#: lib/quotearg.c:363
+#: lib/quotearg.c:356
 msgid "'"
-msgstr ""
+msgstr ""
 
 #: lib/regcomp.c:135
 msgid "Success"
@@ -212,56 +212,55 @@ msgstr "成功"
 
 #: lib/regcomp.c:138
 msgid "No match"
-msgstr "沒有符合的字串"
+msgstr "無符合項目"
 
 #: lib/regcomp.c:141
 msgid "Invalid regular expression"
-msgstr "不正確的正規表示式"
+msgstr "正規表示式無效"
 
 #: lib/regcomp.c:144
 msgid "Invalid collation character"
-msgstr "無效的 collation 字元"
+msgstr "定序字元無效"
 
 #: lib/regcomp.c:147
 msgid "Invalid character class name"
-msgstr "無效的字元種類名稱"
+msgstr "字元類型名稱無效"
 
 #: lib/regcomp.c:150
 msgid "Trailing backslash"
-msgstr "末端有多餘的反斜號"
+msgstr "末尾反斜線"
 
 #: lib/regcomp.c:153
 msgid "Invalid back reference"
-msgstr "無效的 back reference"
+msgstr "向後參考無效"
 
 #: lib/regcomp.c:156
-#, fuzzy
 msgid "Unmatched [, [^, [:, [., or [="
-msgstr "沒有對應的 [ 或 [^"
+msgstr "不對稱的 [、[^、[:、[. 或 [="
 
 #: lib/regcomp.c:159
 msgid "Unmatched ( or \\("
-msgstr "沒有對應的 ( 或 \\("
+msgstr "不對稱的 ( 或 \\("
 
 #: lib/regcomp.c:162
 msgid "Unmatched \\{"
-msgstr "沒有對應的 \\{"
+msgstr "不對稱的 \\{"
 
 #: lib/regcomp.c:165
 msgid "Invalid content of \\{\\}"
-msgstr "\\{\\} 中內容無效"
+msgstr "\\{\\} 中內容無效"
 
 #: lib/regcomp.c:168
 msgid "Invalid range end"
-msgstr "ç¯\84å\9c\8dæ\9c«ç«¯å­\97å\85\83無效"
+msgstr "çµ\90æ\9d\9fç¯\84å\9c\8d無效"
 
 #: lib/regcomp.c:171
 msgid "Memory exhausted"
-msgstr "記憶體盡"
+msgstr "記憶體盡"
 
 #: lib/regcomp.c:174
 msgid "Invalid preceding regular expression"
-msgstr "之前的正規表示式無效"
+msgstr "前置正規表示式無效"
 
 #: lib/regcomp.c:177
 msgid "Premature end of regular expression"
@@ -273,219 +272,208 @@ msgstr "正規表示式過長"
 
 #: lib/regcomp.c:183
 msgid "Unmatched ) or \\)"
-msgstr "沒有對應的 ) 或 \\)"
+msgstr "不對稱的 ) 或 \\)"
 
-#: lib/regcomp.c:688
+#: lib/regcomp.c:676
 msgid "No previous regular expression"
-msgstr "之前沒有任何正規表示式"
+msgstr "沒有上一個正規表示式"
 
 #: lib/xalloc-die.c:34
 msgid "memory exhausted"
-msgstr "記憶體盡"
+msgstr "記憶體盡"
 
-#: lib/xfreopen.c:35
+#: lib/xfreopen.c:34
 msgid "stdin"
-msgstr ""
+msgstr "標準輸入"
 
-#: lib/xfreopen.c:36
+#: lib/xfreopen.c:35
 msgid "stdout"
-msgstr ""
+msgstr "標準輸出"
 
-#: lib/xfreopen.c:37
+#: lib/xfreopen.c:36
 msgid "stderr"
-msgstr ""
+msgstr "標準錯誤"
 
-#: lib/xfreopen.c:38
-#, fuzzy
+#: lib/xfreopen.c:37
 msgid "unknown stream"
-msgstr "不明的系統錯誤"
+msgstr "未知串流"
 
-#: lib/xfreopen.c:39
+#: lib/xfreopen.c:38
 #, c-format
 msgid "failed to reopen %s with mode %s"
-msgstr ""
-
-#: lib/xstrtol-error.c:63
-#, fuzzy, c-format
-msgid "invalid %s%s argument '%s'"
-msgstr "無效的 --bytes 值 ‘%s’"
-
-#: lib/xstrtol-error.c:68
-#, c-format
-msgid "invalid suffix in %s%s argument '%s'"
-msgstr ""
+msgstr "無法使用 %2$s 模式重開啟 %1$s"
 
-#: lib/xstrtol-error.c:72
+#: lib/xstdopen.c:34
 #, c-format
-msgid "%s%s argument '%s' too large"
+msgid "standard file descriptors"
 msgstr ""
 
 #: lib/version-etc.c:73
 #, c-format
 msgid "Packaged by %s (%s)\n"
-msgstr ""
+msgstr "由 %s (%s) 打包\n"
 
 #: lib/version-etc.c:76
 #, c-format
 msgid "Packaged by %s\n"
-msgstr ""
+msgstr "由 %s 打包\n"
 
 #. TRANSLATORS: Translate "(C)" to the copyright symbol
 #. (C-in-a-circle), if this symbol is available in the user's
 #. locale.  Otherwise, do not translate "(C)"; leave it as-is.
 #: lib/version-etc.c:83
 msgid "(C)"
-msgstr ""
+msgstr "(C)"
 
-#: lib/version-etc.c:85
+#. TRANSLATORS: The %s placeholder is the web address of the GPL license.
+#: lib/version-etc.c:88
+#, fuzzy, c-format
 msgid ""
-"\n"
-"License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl."
-"html>.\n"
+"License GPLv3+: GNU GPL version 3 or later <%s>.\n"
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n"
-"\n"
 msgstr ""
+"\n"
+"GPLv3+ 授權條款:GNU GPL 第 3 版或更新版本 <https://gnu.org/licenses/gpl."
+"html>。\n"
+"這是自由軟體:您可隨意變更及重散佈。\n"
+"在法律允許的範圍內沒有任何保障。\n"
+"\n"
 
 #. TRANSLATORS: %s denotes an author name.
-#: lib/version-etc.c:102
+#: lib/version-etc.c:105
 #, c-format
 msgid "Written by %s.\n"
 msgstr "由 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:106
+#: lib/version-etc.c:109
 #, c-format
 msgid "Written by %s and %s.\n"
 msgstr "由 %s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
-#: lib/version-etc.c:110
+#: lib/version-etc.c:113
 #, c-format
 msgid "Written by %s, %s, and %s.\n"
-msgstr "由 %s%s 和 %s 編寫。\n"
+msgstr "由 %s%s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:117
+#: lib/version-etc.c:120
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "and %s.\n"
 msgstr ""
-"由 %s, %s, %s\n"
+"由 %s、%s、%s\n"
 "和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:124
+#: lib/version-etc.c:127
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, and %s.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
+"由 %s、%s、%s、\n"
 "%s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:131
+#: lib/version-etc.c:134
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, %s, and %s.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
-"%s%s 和 %s 編寫。\n"
+"由 %s、%s、%s、\n"
+"%s%s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:139
+#: lib/version-etc.c:142
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, %s, %s, and %s.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
-"%s, %s, %s 和 %s 編寫。\n"
+"由 %s、%s、%s、%s、\n"
+"%s%s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:147
+#: lib/version-etc.c:150
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, %s, %s, %s,\n"
 "and %s.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
-"%s, %s, %s, %s\n"
-"和 %s 編寫。\n"
+"由 %s、%s、%s、%s、\n"
+"%s、%s、%s 和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:156
+#: lib/version-etc.c:159
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, %s, %s, %s,\n"
 "%s, and %s.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
-"%s, %s, %s, %s,\n"
-"%s 和 %s 編寫。\n"
+"由 %s、%s、%s、%s、\n"
+"%s、%s、%s、%s\n"
+"和 %s 編寫。\n"
 
 #. TRANSLATORS: Each %s denotes an author name.
 #. You can use line breaks, estimating that each author name occupies
 #. ca. 16 screen columns and that a screen line has ca. 80 columns.
-#: lib/version-etc.c:167
+#: lib/version-etc.c:170
 #, c-format
 msgid ""
 "Written by %s, %s, %s,\n"
 "%s, %s, %s, %s,\n"
 "%s, %s, and others.\n"
 msgstr ""
-"由 %s, %s, %s,\n"
-"%s, %s, %s, %s,\n"
-"%s 和 %s 等等編寫。\n"
+"由 %s、%s、%s、%s、\n"
+"%s、%s、%s、%s\n"
+"和 %s 等人編寫。\n"
 
 #. TRANSLATORS: The placeholder indicates the bug-reporting address
 #. for this package.  Please add _another line_ saying
 #. "Report translation bugs to <...>\n" with the address for translation
 #. bugs (typically your translation team's web or email address).
-#: lib/version-etc.c:245
-#, c-format
-msgid ""
-"\n"
-"Report bugs to: %s\n"
+#: lib/version-etc.c:249
+#, fuzzy, c-format
+msgid "Report bugs to: %s\n"
 msgstr ""
+"\n"
+"請回報臭蟲至:%s\n"
 
-#: lib/version-etc.c:247
+#: lib/version-etc.c:251
 #, c-format
 msgid "Report %s bugs to: %s\n"
-msgstr ""
+msgstr "請將 %s 的臭蟲匯報至:%s\n"
 
-#: lib/version-etc.c:251
+#: lib/version-etc.c:255 lib/version-etc.c:257
 #, c-format
 msgid "%s home page: <%s>\n"
-msgstr ""
+msgstr "%s 首頁:<%s>\n"
 
-#: lib/version-etc.c:253
-#, c-format
-msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
-msgstr ""
-
-#: lib/version-etc.c:256
-msgid "General help using GNU software: <https://www.gnu.org/gethelp/>\n"
-msgstr ""
+#: lib/version-etc.c:260
+#, fuzzy, c-format
+msgid "General help using GNU software: <%s>\n"
+msgstr "使用 GNU 軟體的一般說明:<https://www.gnu.org/gethelp/>\n"
 
-#: src/analyze.c:454 src/diff.c:1404
+#: src/analyze.c:454 src/diff.c:1406
 #, c-format
 msgid "Files %s and %s differ\n"
 msgstr "檔案 %s 與 %s 不同\n"
@@ -495,107 +483,104 @@ msgstr "檔案 %s 與 %s 不同\n"
 msgid "Binary files %s and %s differ\n"
 msgstr "二元碼檔 %s 與 %s 不同\n"
 
-#: src/analyze.c:706 src/diff3.c:1465 src/util.c:1254
+#: src/analyze.c:706 src/diff3.c:1470 src/util.c:1254
 msgid "No newline at end of file"
 msgstr "檔案末沒有 newline 字元"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:44
+#: src/cmp.c:45
 msgid "Torbjorn Granlund"
 msgstr "Torbjorn Granlund"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/cmp.c:45
+#: src/cmp.c:46
 msgid "David MacKenzie"
-msgstr ""
+msgstr "David MacKenzie"
 
-#: src/cmp.c:119 src/diff.c:877 src/diff3.c:462 src/sdiff.c:159
-#, fuzzy, c-format
+#: src/cmp.c:120 src/diff.c:879 src/diff3.c:467 src/sdiff.c:160
+#, c-format
 msgid "Try '%s --help' for more information."
-msgstr "請嘗試‘%s --help’來獲取更多資訊。"
+msgstr "請嘗試「%s --help」取得更多資訊。"
 
-#: src/cmp.c:137
-#, fuzzy, c-format
+#: src/cmp.c:138
+#, c-format
 msgid "invalid --ignore-initial value '%s'"
-msgstr "無效的 --ignore-initial 值 ‘%s’"
+msgstr "--ignore-initial 值「%s」無效"
 
-#: src/cmp.c:147
+#: src/cmp.c:148
 #, c-format
 msgid "options -l and -s are incompatible"
 msgstr "-l 和 -s 選項不兼容"
 
-#: src/cmp.c:155 src/diff.c:885 src/diff3.c:469 src/sdiff.c:167 src/sdiff.c:315
-#: src/sdiff.c:322 src/sdiff.c:874 src/util.c:852 src/util.c:952 src/util.c:959
+#: src/cmp.c:156 src/diff.c:887 src/diff3.c:474 src/sdiff.c:168 src/sdiff.c:316
+#: src/sdiff.c:323 src/sdiff.c:876 src/util.c:852 src/util.c:952 src/util.c:959
 msgid "write failed"
 msgstr "寫入失敗"
 
-#: src/cmp.c:157 src/diff.c:887 src/diff.c:1469 src/diff3.c:471 src/sdiff.c:169
+#: src/cmp.c:158 src/diff.c:889 src/diff.c:1471 src/diff3.c:476 src/sdiff.c:170
 msgid "standard output"
 msgstr "標準輸出"
 
-#: src/cmp.c:161
-#, fuzzy
+#: src/cmp.c:162
 msgid "-b, --print-bytes          print differing bytes"
-msgstr "-b  --print-bytes        印出相異位置的位元組。"
+msgstr "-b, --print-bytes          輸出相異位置的位元組"
 
-#: src/cmp.c:162
-#, fuzzy
+#: src/cmp.c:163
 msgid "-i, --ignore-initial=SKIP         skip first SKIP bytes of both inputs"
-msgstr "-i SKIP  --ignore-initial=SKIP  略過輸入資料的最初 SKIP 個位元組。"
+msgstr "-i, --ignore-initial=SKIP         跳過兩個輸入資料的開頭 SKIP 位元組。"
 
-#: src/cmp.c:163
-#, fuzzy
+#: src/cmp.c:164
 msgid ""
 "-i, --ignore-initial=SKIP1:SKIP2  skip first SKIP1 bytes of FILE1 and\n"
 "                                      first SKIP2 bytes of FILE2"
-msgstr "  略過 FILE1 的最初 SKIP1 個位元組和 FILE2 的最初 SKIP2 個位元組。"
+msgstr ""
+"-i, --ignore-initial=SKIP1:SKIP2  跳過 <檔案1> 的最初 SKIP1 位元組,及\n"
+"                                      <檔案2> 的最初 SKIP2 位元組"
 
-#: src/cmp.c:165
-#, fuzzy
+#: src/cmp.c:166
 msgid ""
 "-l, --verbose              output byte numbers and differing byte values"
-msgstr "-l  --verbose            顯示兩者所有相異的位置和它們的位元組數值。"
+msgstr "-l, --verbose              輸出位元數及不同的位元值"
 
-#: src/cmp.c:166
-#, fuzzy
+#: src/cmp.c:167
 msgid "-n, --bytes=LIMIT          compare at most LIMIT bytes"
-msgstr "-n LIMIT  --bytes=LIMIT  最多比較 LIMIT 個位元組。"
+msgstr "-n, --bytes=LIMIT          最多比較 LIMIT 個位元組"
 
-#: src/cmp.c:167
+#: src/cmp.c:168
 msgid "-s, --quiet, --silent      suppress all normal output"
-msgstr ""
+msgstr "-s, --quiet, --silent      隱藏所有一般輸出"
 
-#: src/cmp.c:168
+#: src/cmp.c:169
 msgid "    --help                 display this help and exit"
-msgstr ""
+msgstr "    --help                 顯示此說明後離開"
 
-#: src/cmp.c:169
-#, fuzzy
+#: src/cmp.c:170
 msgid "-v, --version              output version information and exit"
-msgstr "-v  --version            顯示版本資訊。"
+msgstr "-v, --version              輸出版本資訊後離開"
 
-#: src/cmp.c:178
+#: src/cmp.c:179
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"
 msgstr "用法:%s [選項]... 檔案1 [檔案2 [SKIP1 [SKIP2]]]\n"
 
-#: src/cmp.c:180
+#: src/cmp.c:181
 msgid "Compare two files byte by byte."
 msgstr "比較兩個檔案的每一個位元組。"
 
-#: src/cmp.c:182
-#, fuzzy
+#: src/cmp.c:183
 msgid ""
 "The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
 "at the beginning of each file (zero by default)."
-msgstr "SKIP1 和 SKIP2 是每個檔案會略過的位元組數目。"
+msgstr ""
+"選用的 SKIP1 及 SKIP2 指定了要在每個檔案開頭略過的\n"
+"位元組數目 (0 為預設值)。"
 
-#: src/cmp.c:185 src/diff.c:997 src/diff3.c:509 src/sdiff.c:210
+#: src/cmp.c:186 src/diff.c:999 src/diff3.c:514 src/sdiff.c:211
 msgid ""
 "Mandatory arguments to long options are mandatory for short options too.\n"
-msgstr ""
+msgstr "長選項的必選參數,對短選項亦然。\n"
 
-#: src/cmp.c:191
+#: src/cmp.c:192
 msgid ""
 "SKIP values may be followed by the following multiplicative suffixes:\n"
 "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
@@ -605,379 +590,342 @@ msgstr ""
 "kB=1000、K=1024、MB=1000000、M=1048576、GB=1000000000、G=1073741824,\n"
 "還有 T、P、E、Z、Y 如此類推。"
 
-#: src/cmp.c:194
-#, fuzzy
+#: src/cmp.c:195
 msgid "If a FILE is '-' or missing, read standard input."
-msgstr "如果檔案是‘-’或沒有指定,則由標準輸入讀入資料。"
+msgstr "如果檔案是「-」或沒有指定,則由標準輸入讀入資料。"
 
-#: src/cmp.c:195 src/diff.c:985 src/sdiff.c:220
+#: src/cmp.c:196 src/diff.c:987 src/sdiff.c:221
 msgid "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
 msgstr "如果兩邊內容一樣,回傳值是 0;1 代表兩邊內容不相同,2 代表有錯誤。"
 
-#: src/cmp.c:240
-#, fuzzy, c-format
+#: src/cmp.c:243
+#, c-format
 msgid "invalid --bytes value '%s'"
-msgstr "無效的 --bytes 值 ‘%s’"
+msgstr "無效的 --bytes 值「%s」"
 
-#: src/cmp.c:266 src/diff.c:795 src/diff3.c:356 src/sdiff.c:565
-#, fuzzy, c-format
+#: src/cmp.c:269 src/diff.c:797 src/diff3.c:361 src/sdiff.c:567
+#, c-format
 msgid "missing operand after '%s'"
-msgstr "‘%s’後缺少了參數"
+msgstr "「%s」後缺少了參數"
 
-#: src/cmp.c:278 src/diff.c:797 src/diff3.c:358 src/sdiff.c:567
-#, fuzzy, c-format
+#: src/cmp.c:281 src/diff.c:799 src/diff3.c:363 src/sdiff.c:569
+#, c-format
 msgid "extra operand '%s'"
-msgstr "多餘的參數‘%s’"
+msgstr "多餘的參數「%s」"
 
-#: src/cmp.c:498
+#: src/cmp.c:507
 #, c-format
 msgid "%s %s differ: byte %s, line %s\n"
 msgstr "%s %s 不同:第 %s 位元組,第 %s 行\n"
 
-#: src/cmp.c:514
+#: src/cmp.c:523
 #, c-format
 msgid "%s %s differ: byte %s, line %s is %3o %s %3o %s\n"
 msgstr "%s %s 不同:第 %s 行,第 %s 位元組為 %3o %s %3o %s\n"
 
-#: src/cmp.c:571
-#, fuzzy, c-format
+#: src/cmp.c:580
+#, c-format
 msgid "cmp: EOF on %s which is empty\n"
-msgstr "cmp:%s 已結束\n"
+msgstr "cmp:有 EOF 在空白的 %s 上\n"
 
-#: src/cmp.c:585
-#, fuzzy, c-format
+#: src/cmp.c:594
+#, c-format
 msgid "cmp: EOF on %s after byte %s, line %s\n"
-msgstr "%s %s ä¸\8då\90\8cï¼\9a第 %s ä½\8då\85\83çµ\84ï¼\8c第 %s è¡\8c\n"
+msgstr "cmpï¼\9aæ\9c\89 EOF å\9c¨ %s ç\9a\84第 %s ä½\8då\85\83çµ\84ï¼\8c第 %s è¡\8cå¾\8c\n"
 
-#: src/cmp.c:586
-#, fuzzy, c-format
+#: src/cmp.c:595
+#, c-format
 msgid "cmp: EOF on %s after byte %s, in line %s\n"
-msgstr "%s %s 不同:第 %s 位元組,第 %s 行\n"
+msgstr "cmp:有 EOF 在 %s 的第 %s 位元組後,在第 %s 行\n"
 
-#: src/cmp.c:592
-#, fuzzy, c-format
+#: src/cmp.c:601
+#, c-format
 msgid "cmp: EOF on %s after byte %s\n"
-msgstr "cmp:%s 已結束\n"
+msgstr "cmp:有 EOF 在 %s 的第 %s 位元組後\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:50
+#: src/diff.c:51
 msgid "Paul Eggert"
-msgstr ""
+msgstr "Paul Eggert"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:51
+#: src/diff.c:52
 msgid "Mike Haertel"
-msgstr ""
+msgstr "Mike Haertel"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:52
+#: src/diff.c:53
 msgid "David Hayes"
-msgstr ""
+msgstr "David Hayes"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:53
+#: src/diff.c:54
 msgid "Richard Stallman"
-msgstr ""
+msgstr "Richard Stallman"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff.c:54
+#: src/diff.c:55
 msgid "Len Tower"
-msgstr ""
+msgstr "Len Tower"
 
-#: src/diff.c:353
-#, fuzzy, c-format
+#: src/diff.c:355
+#, c-format
 msgid "invalid context length '%s'"
-msgstr "無效的上下文行數‘%s’"
+msgstr "無效的上下文長度「%s」"
 
-#: src/diff.c:436
+#: src/diff.c:438
 #, c-format
 msgid "pagination not supported on this host"
 msgstr "此系統不支援分頁"
 
-#: src/diff.c:451 src/diff3.c:336
+#: src/diff.c:453 src/diff3.c:341
 #, c-format
 msgid "too many file label options"
 msgstr "太多有關檔案標籤的選項"
 
-#: src/diff.c:528
-#, fuzzy, c-format
+#: src/diff.c:530
+#, c-format
 msgid "invalid width '%s'"
-msgstr "無效的寬度‘%s’"
+msgstr "無效的寬度「%s」"
 
-#: src/diff.c:532
+#: src/diff.c:534
 msgid "conflicting width options"
 msgstr "出現互相抵觸的寬度選項"
 
-#: src/diff.c:557
-#, fuzzy, c-format
+#: src/diff.c:559
+#, c-format
 msgid "invalid horizon length '%s'"
-msgstr "無效的水平長度 ‘%s’"
+msgstr "無效的水平長度「%s」"
 
-#: src/diff.c:613
-#, fuzzy, c-format
+#: src/diff.c:615
+#, c-format
 msgid "invalid tabsize '%s'"
-msgstr "無效的定位字元寬度 ‘%s’"
+msgstr "無效的定位字元寬度「%s」"
 
-#: src/diff.c:617
+#: src/diff.c:619
 msgid "conflicting tabsize options"
 msgstr "出現互相抵觸的定位字元寬度選項"
 
-#: src/diff.c:772
+#: src/diff.c:774
 msgid "--from-file and --to-file both specified"
 msgstr "同時指定了 --from-file 及 --to-file 選項"
 
-#: src/diff.c:891
-#, fuzzy
+#: src/diff.c:893
 msgid "    --normal                  output a normal diff (the default)"
-msgstr "--normal     以正常的 diff 方式輸出。"
+msgstr "    --normal                  輸出一般 diff (預設值)"
 
-#: src/diff.c:892
-#, fuzzy
+#: src/diff.c:894
 msgid "-q, --brief                   report only when files differ"
-msgstr "-q  --brief  只顯示檔案是否不同。"
+msgstr "-q, --brief                   僅在檔案不同時回報"
 
-#: src/diff.c:893
-#, fuzzy
+#: src/diff.c:895
 msgid "-s, --report-identical-files  report when two files are the same"
-msgstr "-s  --report-identical-files   當兩個檔案一樣時仍然顯示結果。"
+msgstr "-s, --report-identical-files  當兩個檔案一樣時仍然顯示結果"
 
-#: src/diff.c:894
+#: src/diff.c:896
 msgid ""
 "-c, -C NUM, --context[=NUM]   output NUM (default 3) lines of copied context"
-msgstr ""
+msgstr "-c, -C NUM, --context[=NUM]   輸出 NUM (預設 3) 行複製 (copied) 上下文"
 
-#: src/diff.c:895
-#, fuzzy
+#: src/diff.c:897
 msgid ""
 "-u, -U NUM, --unified[=NUM]   output NUM (default 3) lines of unified context"
-msgstr "-w NUM  --width=NUM         每行顯示最多 NUM(預設 130)個字元。"
+msgstr ""
+"-u, -U NUM, --unified[=NUM]   輸出 NUM (預設 3) 行統一 (unified) 上下文"
 
-#: src/diff.c:896
-#, fuzzy
+#: src/diff.c:898
 msgid "-e, --ed                      output an ed script"
-msgstr "-e  --ed     以 ed script 方式輸出。"
+msgstr "-e, --ed                      輸出 ed 文稿"
 
-#: src/diff.c:897
-#, fuzzy
+#: src/diff.c:899
 msgid "-n, --rcs                     output an RCS format diff"
-msgstr "-n  --rcs    以 RCS diff 格式輸出。"
+msgstr "-n, --rcs                     輸出 RCS 格式的 diff"
 
-#: src/diff.c:898
+#: src/diff.c:900
 msgid "-y, --side-by-side            output in two columns"
-msgstr ""
+msgstr "-y, --side-by-side            輸出成兩列"
 
-#: src/diff.c:899
-#, fuzzy
+#: src/diff.c:901
 msgid ""
 "-W, --width=NUM               output at most NUM (default 130) print columns"
-msgstr "-w NUM  --width=NUM         每行顯示最多 NUM(預設 130)個字元。"
+msgstr "-W, --width=NUM               輸出最多 NUM (預設 130) 輸出列"
 
-#: src/diff.c:900
-#, fuzzy
+#: src/diff.c:902
 msgid ""
 "    --left-column             output only the left column of common lines"
-msgstr "-l  --left-column           當有兩行相同時只顯示左邊的一行。"
+msgstr "    --left-column             當有兩行相同時只顯示左邊的一行"
 
-#: src/diff.c:901
-#, fuzzy
+#: src/diff.c:903
 msgid "    --suppress-common-lines   do not output common lines"
-msgstr "-s  --suppress-common-lines  當有兩行相同時不會顯示。"
+msgstr "    --suppress-common-lines   不輸出相同行"
 
-#: src/diff.c:903
+#: src/diff.c:905
 msgid "-p, --show-c-function         show which C function each change is in"
-msgstr ""
+msgstr "-p, --show-c-function         顯示 C 函數變更的地方"
 
-#: src/diff.c:904
+#: src/diff.c:906
 msgid "-F, --show-function-line=RE   show the most recent line matching RE"
-msgstr ""
+msgstr "-F, --show-function-line=RE   顯示最接近符合 RE 的行"
 
-#: src/diff.c:905
+#: src/diff.c:907
 msgid ""
 "    --label LABEL             use LABEL instead of file name and timestamp\n"
 "                                (can be repeated)"
 msgstr ""
+"    --label 標籤              使用 <標籤> 而不用檔名及時間戳 (可以重複)"
 
-#: src/diff.c:908
-#, fuzzy
+#: src/diff.c:910
 msgid "-t, --expand-tabs             expand tabs to spaces in output"
-msgstr "-t  --expand-tabs        將輸出中的 tab 換成空格。"
+msgstr "-t, --expand-tabs             將輸出中的 tab 換成空格"
 
-#: src/diff.c:909
-#, fuzzy
+#: src/diff.c:911
 msgid "-T, --initial-tab             make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab        每行先加上 tab 字元,使 tab 字元可以對齊。"
+msgstr "-T, --initial-tab             每行先加上 tab 字元,使 tab 字元可以對齊"
 
-#: src/diff.c:910
-#, fuzzy
+#: src/diff.c:912
 msgid ""
 "    --tabsize=NUM             tab stops every NUM (default 8) print columns"
-msgstr "--tabsize=NUM            定位字元 (tab) 的寬度,預設為 8 個空格。"
+msgstr ""
+"    --tabsize=NUM             定位字元 (tab) 的寬度,預設為 8 個輸出列。"
 
-#: src/diff.c:911
+#: src/diff.c:913
 msgid ""
 "    --suppress-blank-empty    suppress space or tab before empty output lines"
-msgstr ""
+msgstr "    --suppress-blank-empty    隱藏每個空輸出行前的空白及 Tab"
 
-#: src/diff.c:912
-#, fuzzy
+#: src/diff.c:914
 msgid "-l, --paginate                pass output through 'pr' to paginate it"
-msgstr "-l  --paginate           將輸出送至‘pr’指令來分頁。"
+msgstr "-l, --paginate                將輸出送至「pr」指令來分頁"
 
-#: src/diff.c:914
-#, fuzzy
+#: src/diff.c:916
 msgid ""
 "-r, --recursive                 recursively compare any subdirectories found"
-msgstr "-r  --recursive                連同所有副目錄一起比較。"
+msgstr "-r, --recursive                 遞迴比較所有找到的子目錄"
 
-#: src/diff.c:915
+#: src/diff.c:917
 msgid "    --no-dereference            don't follow symbolic links"
-msgstr ""
+msgstr "    --no-dereference            不追蹤符號連結"
 
-#: src/diff.c:916
-#, fuzzy
+#: src/diff.c:918
 msgid "-N, --new-file                  treat absent files as empty"
-msgstr "-N  --new-file                 不存在的檔案以空白檔案方式處理。"
+msgstr "-N, --new-file                  將不存在的檔案當作空檔案處理"
 
-#: src/diff.c:917
-#, fuzzy
+#: src/diff.c:919
 msgid "    --unidirectional-new-file   treat absent first files as empty"
-msgstr "--unidirectional-new-file      若第一個檔案不存在,以空白檔案處理。"
+msgstr "    --unidirectional-new-file   將第一個不存在檔案當作空檔案處理"
 
-#: src/diff.c:918
-#, fuzzy
+#: src/diff.c:920
 msgid "    --ignore-file-name-case     ignore case when comparing file names"
-msgstr "--ignore-file-name-case     當比較檔案名稱時不分辨大小寫。"
+msgstr "    --ignore-file-name-case     比較檔案名稱時不區分大小寫"
 
-#: src/diff.c:919
-#, fuzzy
+#: src/diff.c:921
 msgid "    --no-ignore-file-name-case  consider case when comparing file names"
-msgstr "--no-ignore-file-name-case  當比較檔案名稱時會分辨大小寫。"
+msgstr "    --no-ignore-file-name-case  比較檔案名稱時會區分大小寫"
 
-#: src/diff.c:920
-#, fuzzy
+#: src/diff.c:922
 msgid "-x, --exclude=PAT               exclude files that match PAT"
-msgstr "-x PAT  --exclude=PAT          排除樣式為 PAT 的檔案。"
+msgstr "-x, --exclude=PAT               排除符合 PAT 的檔案"
 
-#: src/diff.c:921
-#, fuzzy
+#: src/diff.c:923
 msgid ""
 "-X, --exclude-from=FILE         exclude files that match any pattern in FILE"
-msgstr "-X FILE  --exclude-from=FILE   排除所有在 FILE 中列出的樣式的檔案。"
+msgstr "-X, --exclude-from=檔案         排除符合 <檔案> 中任何樣式的檔案"
 
-#: src/diff.c:922
-#, fuzzy
+#: src/diff.c:924
 msgid ""
 "-S, --starting-file=FILE        start with FILE when comparing directories"
-msgstr "-S FILE  --starting-file=FILE  當比較目錄時,由 FILE 開始比較。"
+msgstr "-S, --starting-file=檔案        比較目錄時從 <檔案> 開始"
 
-#: src/diff.c:923
-#, fuzzy
+#: src/diff.c:925
 msgid ""
 "    --from-file=FILE1           compare FILE1 to all operands;\n"
 "                                  FILE1 can be a directory"
 msgstr ""
-"--from-file=FILE1  將 FILE1 和參數中的所有檔案/目錄作比較。FILE1 可以是目錄。"
+"    --from-file=檔案1           將 <檔案1> 和參數中的所有檔案/目錄作比較;\n"
+"                                  <檔案1> 可以是目錄"
 
-#: src/diff.c:925
-#, fuzzy
+#: src/diff.c:927
 msgid ""
 "    --to-file=FILE2             compare all operands to FILE2;\n"
 "                                  FILE2 can be a directory"
 msgstr ""
-"--to-file=FILE2    將參數中的所有檔案/目錄和 FILE2 作比較。FILE2 可以是目錄。"
+"    --to-file=檔案2             將參數中的所有檔案/目錄和 <檔案2> 作比較;\n"
+"                                  <檔案2> 可以是目錄"
 
-#: src/diff.c:928
-#, fuzzy
+#: src/diff.c:930
 msgid ""
 "-i, --ignore-case               ignore case differences in file contents"
-msgstr "-i  --ignore-case           不分辨檔案內容中的大小寫。"
+msgstr "-i, --ignore-case               不區分檔案內容的大小寫"
 
-#: src/diff.c:929
-#, fuzzy
+#: src/diff.c:931
 msgid "-E, --ignore-tab-expansion      ignore changes due to tab expansion"
-msgstr "-E  --ignore-tab-expansion  忽略因將 tab 轉換為空格而造成的差異。"
+msgstr "-E, --ignore-tab-expansion      忽略因 Tab 展開所致的變更"
 
-#: src/diff.c:930
-#, fuzzy
+#: src/diff.c:932
 msgid "-Z, --ignore-trailing-space     ignore white space at line end"
-msgstr "-w  --ignore-all-space      忽略所有空白字元。"
+msgstr "-Z, --ignore-trailing-space     忽略行末空白"
 
-#: src/diff.c:931
-#, fuzzy
+#: src/diff.c:933
 msgid ""
 "-b, --ignore-space-change       ignore changes in the amount of white space"
-msgstr "-b  --ignore-space-change   忽略因空白字元數目不同而造成的差異。"
+msgstr "-b, --ignore-space-change       忽略因空白數變更所致的變更"
 
-#: src/diff.c:932
-#, fuzzy
+#: src/diff.c:934
 msgid "-w, --ignore-all-space          ignore all white space"
-msgstr "-w  --ignore-all-space      忽略所有空白字元。"
+msgstr "-w, --ignore-all-space          忽略所有空白"
 
-#: src/diff.c:933
-#, fuzzy
+#: src/diff.c:935
 msgid ""
 "-B, --ignore-blank-lines        ignore changes where lines are all blank"
-msgstr "-B  --ignore-blank-lines    忽略任何因空行而造成的差異。"
+msgstr "-B, --ignore-blank-lines        忽略空列的變更"
 
-#: src/diff.c:934
-#, fuzzy
+#: src/diff.c:936
 msgid "-I, --ignore-matching-lines=RE  ignore changes where all lines match RE"
-msgstr ""
-"-I RE  --ignore-matching-lines=RE  忽略任何符合指定的<正規表示式>的地方。"
+msgstr "-I, --ignore-matching-lines=RE   忽略所有列都符合 RE 的變更"
 
-#: src/diff.c:936
-#, fuzzy
+#: src/diff.c:938
 msgid "-a, --text                      treat all files as text"
-msgstr "-a  --text               所有檔案都以文字檔方式處理。"
+msgstr "-a, --text                      所有檔案都以文字檔方式處理"
 
-#: src/diff.c:937
-#, fuzzy
+#: src/diff.c:939
 msgid "    --strip-trailing-cr         strip trailing carriage return on input"
-msgstr "--strip-trailing-cr      去除輸入資料每行末端的 carriage return 字元。"
+msgstr ""
+"    --strip-trailing-cr         去除輸入資料每行末端的 carriage return 字元"
 
-#: src/diff.c:939
-#, fuzzy
+#: src/diff.c:941
 msgid "    --binary                    read and write data in binary mode"
-msgstr "--binary                 以二元碼檔模式讀寫資料。"
+msgstr "    --binary                    以二進位模式讀寫資料。"
 
-#: src/diff.c:942
-#, fuzzy
+#: src/diff.c:944
 msgid ""
 "-D, --ifdef=NAME                output merged file with '#ifdef NAME' diffs"
-msgstr "-D NAME  --ifdef=NAME      輸出的資料以‘#ifdef NAME’方式標明差異。"
+msgstr ""
+"-D, --ifdef=NAME                輸出包含 '#ifdef NAME' 差異的已合併檔案"
 
-#: src/diff.c:943
-#, fuzzy
+#: src/diff.c:945
 msgid "    --GTYPE-group-format=GFMT   format GTYPE input groups with GFMT"
-msgstr ""
-"--GTYPE-group-format=GFMT  效果類似,但會以 GFMT 格式處理 GTYPE 輸入行組。"
+msgstr "    --GTYPE-group-format=GFMT   使用 GFMT 格式化 GTYPE 輸入資料群組"
 
-#: src/diff.c:944
-#, fuzzy
+#: src/diff.c:946
 msgid "    --line-format=LFMT          format all input lines with LFMT"
-msgstr "--line-format=LFMT         效果類似,但會以 LFMT 格式處理每一行資料。"
+msgstr "    --line-format=LFMT          使用 LFMT 格式化所有輸入資料行"
 
-#: src/diff.c:945
-#, fuzzy
+#: src/diff.c:947
 msgid "    --LTYPE-line-format=LFMT    format LTYPE input lines with LFMT"
-msgstr ""
-"--LTYPE-line-format=LFMT   效果類似,但會以 LFMT 格式處理 LTYPE 輸入行組。"
+msgstr "    --LTYPE-line-format=LFMT    使用 LFMT 格式化 LTYPE 輸入行"
 
-#: src/diff.c:946
+#: src/diff.c:948
 msgid ""
 "  These format options provide fine-grained control over the output\n"
 "    of diff, generalizing -D/--ifdef."
-msgstr ""
+msgstr "  這些格式化選項提供了微調 diff 輸出的選項,使 -D/--if-def 一般化。"
 
-#: src/diff.c:948
-#, fuzzy
+#: src/diff.c:950
 msgid "  LTYPE is 'old', 'new', or 'unchanged'.  GTYPE is LTYPE or 'changed'."
 msgstr ""
-"  LTYPE 可以是‘old’、‘new’或‘unchanged’。GTYPE 可以是 LTYPE 的選擇\n"
-"  或是‘changed’。"
+"  LTYPE 可以是 'old'、'new' 或 'unchanged'。GTYPE 可以是 LTYPE 或 'changed'。"
 
-#: src/diff.c:949
-#, fuzzy
+#: src/diff.c:951
 msgid ""
 "  GFMT (only) may contain:\n"
 "    %<  lines from FILE1\n"
@@ -992,33 +940,31 @@ msgid ""
 "        M  L+1\n"
 "    %(A=B?T:E)  if A equals B then T else E"
 msgstr ""
-"  GFMT 可包括:\n"
-"    %<  該組中每行屬於 FILE1 的差異\n"
-"    %>  該組中每行屬於 FILE2 的差異\n"
-"    %=  該組中同時在 FILE1 和 FILE2 出現的每一行\n"
+"  GFMT (只) 可包括:\n"
+"    %<  該組中每行屬於 <檔案1> 的差異\n"
+"    %>  該組中每行屬於 <檔案2> 的差異\n"
+"    %=  該組中同時在 <檔案1> 和 <檔案2> 出現的每一行\n"
 "    %[-][寬度][.[精確度]]{doxX}字元  以 printf 格式表示該<字元>代表的資料\n"
 "      大寫<字元>表示屬於新的檔案,小寫表示屬於舊的檔案。<字元>的意義如下:\n"
 "        F  行組中第一行的行號\n"
 "        L  行組中最後一行的行號\n"
 "        N  行數 ( =L-F+1 )\n"
 "        E  F-1\n"
-"        M  L+1"
+"        M  L+1    %(A=B?T:E)  如果 A 等於 B 就作 T 否則就 E"
 
-#: src/diff.c:961
-#, fuzzy
+#: src/diff.c:963
 msgid ""
 "  LFMT (only) may contain:\n"
 "    %L  contents of line\n"
 "    %l  contents of line, excluding any trailing newline\n"
 "    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number"
 msgstr ""
-"  LFMT 可包括:\n"
-"    %L  該行內容\n"
-"    %l  該行的內容,但不包括結束的 newline 字元\n"
-"    %[-][寬度][.[精確度]]{doxX}n  以 printf 格式表示輸入資料行號"
+"  LFMT (只) 可包括:\n"
+"    %L  該行內容\n"
+"    %l  該行內容,但不包括結束的換行字元\n"
+"    %[-][寬度][.[精確度]]{doxX}n  以 printf 格式表示輸入資料行號"
 
-#: src/diff.c:965
-#, fuzzy
+#: src/diff.c:967
 msgid ""
 "  Both GFMT and LFMT may contain:\n"
 "    %%  %\n"
@@ -1026,240 +972,230 @@ msgid ""
 "    %c'\\OOO'  the character with octal code OOO\n"
 "    C    the character C (other characters represent themselves)"
 msgstr ""
-"  GFMT 或 LFMT 可包括:\n"
-"    %%        %\n"
-"    %c'C'     字元 C\n"
-"    %c'\\OOO'  八進位數字 OOO 所代表的字元"
+"  GFMT 及 LFMT 兩個可以包括:\n"
+"    %%  %\n"
+"    %c'C'  一個 C 字元\n"
+"    %c'\\OOO'  八進位碼是 OOO 的字元\n"
+"    C    C 字元 (其他字元表示自身)"
 
-#: src/diff.c:971
-#, fuzzy
+#: src/diff.c:973
 msgid "-d, --minimal            try hard to find a smaller set of changes"
-msgstr "-d  --minimal            盡可能找出最小的差異。"
+msgstr "-d, --minimal            盡可能找出最小差異"
 
-#: src/diff.c:972
-#, fuzzy
+#: src/diff.c:974
 msgid "    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"
-msgstr "--horizon-lines=NUM      (此選項不作處理)"
+msgstr "    --horizon-lines=NUM  保留 NUM 行的共同前綴及後綴"
 
-#: src/diff.c:973
-#, fuzzy
+#: src/diff.c:975
 msgid ""
 "    --speed-large-files  assume large files and many scattered small changes"
-msgstr "-H  --speed-large-files  假設檔案十分大而且當中含有許多些微的差異。"
+msgstr "    --speed-large-files  假設檔案十分大而且當中含有許多些微的差異"
 
-#: src/diff.c:974
+#: src/diff.c:976
+#, fuzzy
 msgid ""
-"    --color[=WHEN]       colorize the output; WHEN can be 'never', "
-"'always',\n"
-"                           or 'auto' (the default)"
+"    --color[=WHEN]       color output; WHEN is 'never', 'always', or "
+"'auto';\n"
+"                           plain --color means --color='auto'"
 msgstr ""
+"    --color[=WHEN]       對輸出上色;WHEN 可以是 'never'、\n"
+"                         'always' 或 'auto' (預設值)"
 
-#: src/diff.c:976
+#: src/diff.c:978
 msgid ""
 "    --palette=PALETTE    the colors to use when --color is active; PALETTE "
 "is\n"
 "                           a colon-separated list of terminfo capabilities"
 msgstr ""
+"    --palette=調色盤     啟用 --color 後要用的顏色;<調色盤> 是使用\n"
+"                         冒號 (:) 分隔的 terminfo 功能 (capabilities)"
 
-#: src/diff.c:979
+#: src/diff.c:981
 msgid "    --help               display this help and exit"
-msgstr ""
+msgstr "    --help               顯示此說明後離開"
 
-#: src/diff.c:980
-#, fuzzy
+#: src/diff.c:982
 msgid "-v, --version            output version information and exit"
-msgstr "-v  --version            顯示版本資訊。"
+msgstr "-v, --version            輸出版本資訊後離開"
 
-#: src/diff.c:982
-#, fuzzy
+#: src/diff.c:984
 msgid "FILES are 'FILE1 FILE2' or 'DIR1 DIR2' or 'DIR FILE' or 'FILE DIR'."
 msgstr ""
-"FILES 的格式可以是‘FILE1 FILE2’、‘DIR1 DIR2’、‘DIR FILE...’或\n"
-"    ‘FILE... DIR’。"
+"<檔案> 的格式可以是「<檔案1> <檔案2>」、「<目錄1> <目錄2>」、\n"
+"「<目錄> <檔案>」或「<檔案> <目錄>」。"
 
-#: src/diff.c:983
-#, fuzzy
+#: src/diff.c:985
 msgid ""
 "If --from-file or --to-file is given, there are no restrictions on FILE(s)."
-msgstr "如果使用 --from-file 或 --to-file 選項,FILES 的格式則不受限制。"
+msgstr "如果使用 --from-file 或 --to-file 選項,<檔案> 的格式則不受限制。"
 
-#: src/diff.c:984 src/diff3.c:528 src/sdiff.c:219
-#, fuzzy
+#: src/diff.c:986 src/diff3.c:533 src/sdiff.c:220
 msgid "If a FILE is '-', read standard input."
-msgstr "如果 FILE 是‘-’,則由標準輸入讀取資料。"
+msgstr "如果 <檔案> 是「-」,則由標準輸入讀取資料。"
 
 # It is intentional *not* to translate FILES -- maddog
-#: src/diff.c:994
+#: src/diff.c:996
 #, c-format
 msgid "Usage: %s [OPTION]... FILES\n"
 msgstr "用法:%s [選項]... FILES\n"
 
-#: src/diff.c:995
-#, fuzzy
+#: src/diff.c:997
 msgid "Compare FILES line by line."
-msgstr "比較兩個檔案的每一行。"
+msgstr "比較 <檔案> 的每一行。"
 
-#: src/diff.c:1032
-#, fuzzy, c-format
+#: src/diff.c:1034
+#, c-format
 msgid "conflicting %s option value '%s'"
-msgstr "互相矛盾的 %s 選項,參數值為‘%s’"
+msgstr "%s 選項的值「%s」衝突"
 
-#: src/diff.c:1045
+#: src/diff.c:1047
 #, c-format
 msgid "conflicting output style options"
 msgstr "互相矛盾的輸出模式選項"
 
-#: src/diff.c:1061
-#, fuzzy, c-format
+#: src/diff.c:1063
+#, c-format
 msgid "invalid color '%s'"
-msgstr "無效的上下文行數‘%s’"
+msgstr "顏色 '%s' 無效"
 
-#: src/diff.c:1117 src/diff.c:1327
+#: src/diff.c:1119 src/diff.c:1329
 #, c-format
 msgid "Only in %s: %s\n"
 msgstr "只在 %s 存在:%s\n"
 
-#: src/diff.c:1251
-#, fuzzy
+#: src/diff.c:1253
 msgid "cannot compare '-' to a directory"
-msgstr "‘-’無法與目錄作比較"
+msgstr "「-」無法與目錄作比較"
 
-#: src/diff.c:1286
+#: src/diff.c:1288
 msgid "-D option not supported with directories"
 msgstr "-D 選項不可配合目錄使用"
 
-#: src/diff.c:1295
+#: src/diff.c:1297
 #, c-format
 msgid "Common subdirectories: %s and %s\n"
 msgstr "%s 和 %s 有共同的副目錄\n"
 
-#: src/diff.c:1337 src/diff.c:1387
+#: src/diff.c:1339 src/diff.c:1389
 #, c-format
 msgid "File %s is a %s while file %s is a %s\n"
 msgstr "檔案 %s 是%s而檔案 %s 是%s\n"
 
-#: src/diff.c:1373
-#, fuzzy, c-format
+#: src/diff.c:1375
+#, c-format
 msgid "Symbolic links %s and %s differ\n"
-msgstr "檔案 %s 與 %s 不同\n"
+msgstr "符號連結 %s 和 %s 不同\n"
 
-#: src/diff.c:1460
+#: src/diff.c:1462
 #, c-format
 msgid "Files %s and %s are identical\n"
 msgstr "檔案 %s 和 %s 相同\n"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/diff3.c:42
+#: src/diff3.c:43
 msgid "Randy Smith"
-msgstr ""
+msgstr "Randy Smith"
 
-#: src/diff3.c:351
+#: src/diff3.c:356
 #, c-format
 msgid "incompatible options"
 msgstr "不兼容的選項"
 
-#: src/diff3.c:391
-#, fuzzy
+#: src/diff3.c:396
 msgid "'-' specified for more than one input file"
-msgstr "輸入檔‘-’不可多於一個"
+msgstr "輸入檔「-」不可多於一個"
 
-#: src/diff3.c:442 src/diff3.c:1290 src/diff3.c:1693 src/diff3.c:1748
-#: src/sdiff.c:307 src/sdiff.c:844 src/sdiff.c:855
+#: src/diff3.c:447 src/diff3.c:1295 src/diff3.c:1698 src/diff3.c:1753
+#: src/sdiff.c:308 src/sdiff.c:846 src/sdiff.c:857
 msgid "read failed"
 msgstr "讀取資料失敗"
 
-#: src/diff3.c:475
-#, fuzzy
+#: src/diff3.c:480
 msgid "-A, --show-all              output all changes, bracketing conflicts"
-msgstr "-A  --show-all       顯示所有要更改的部份,並括上互相抵觸的地方。"
+msgstr "-A, --show-all              輸出所有變更,並使用括號括起衝突部份"
 
-#: src/diff3.c:477
-#, fuzzy
+#: src/diff3.c:482
 msgid ""
 "-e, --ed                    output ed script incorporating changes\n"
 "                                from OLDFILE to YOURFILE into MYFILE"
 msgstr ""
-"-e  --ed             取出由 OLDFILE 至 YOURFILE 的更改部份,並顯示可將此\n"
-"                       部份套用至 MYFILE 的 ed script。"
+"-e, --ed                    輸出會將 OLDFILE 變更合併至 YOURFILE 後\n"
+"                                輸出到 MYFILE 的 ed 文稿"
 
-#: src/diff3.c:479
-#, fuzzy
+#: src/diff3.c:484
 msgid "-E, --show-overlap          like -e, but bracket conflicts"
-msgstr "-E  --show-overlap   顯示未合併的更改部份,並括上互相抵觸的地方。"
+msgstr "-E, --show-overlap          類似 -e 但會用括號括起衝突部份"
 
-#: src/diff3.c:480
-#, fuzzy
+#: src/diff3.c:485
 msgid ""
 "-3, --easy-only             like -e, but incorporate only nonoverlapping "
 "changes"
-msgstr "-3  --easy-only      顯示未合併而且不重疊的更改部份。"
+msgstr "-3, --easy-only             類似 -e 但只合併不重疊的變更"
 
-#: src/diff3.c:481
-#, fuzzy
+#: src/diff3.c:486
 msgid ""
 "-x, --overlap-only          like -e, but incorporate only overlapping changes"
-msgstr "-x  --overlap-only   只顯示重疊的更改部份。"
+msgstr "-x, --overlap-only          類似 -e 但只合併有重疊的變更"
 
-#: src/diff3.c:482
+#: src/diff3.c:487
 msgid "-X                          like -x, but bracket conflicts"
-msgstr ""
+msgstr "-X                          類似 -x 但會將衝突處用括號括起"
 
-#: src/diff3.c:483
-#, fuzzy
+#: src/diff3.c:488
 msgid "-i                          append 'w' and 'q' commands to ed scripts"
-msgstr "-i                       在 ed script 中附加‘w’和‘q’指令。"
+msgstr "-i                          將 'w' 和 'q' 指令加至 ed 文稿末尾"
 
-#: src/diff3.c:485
+#: src/diff3.c:490
 msgid ""
 "-m, --merge                 output actual merged file, according to\n"
 "                                -A if no other options are given"
 msgstr ""
+"-m, --merge                 輸出實際合併的檔案,\n"
+"                                如果未提供其他選項則根據 -A"
 
-#: src/diff3.c:488
-#, fuzzy
+#: src/diff3.c:493
 msgid "-a, --text                  treat all files as text"
-msgstr "-a  --text               所有檔案都以文字檔方式處理。"
+msgstr "-a, --text                  所有檔案都以文字檔方式處理"
 
-#: src/diff3.c:489
-#, fuzzy
+#: src/diff3.c:494
 msgid "    --strip-trailing-cr     strip trailing carriage return on input"
-msgstr "--strip-trailing-cr      去除輸入資料每行末端的 carriage return 字元。"
+msgstr ""
+"    --strip-trailing-cr     去除輸入資料每行末端的 carriage return 字元"
 
-#: src/diff3.c:490
-#, fuzzy
+#: src/diff3.c:495
 msgid "-T, --initial-tab           make tabs line up by prepending a tab"
-msgstr "-T  --initial-tab        每行先加上 tab 字元,使 tab 字元可以對齊。"
+msgstr "-T, --initial-tab           每行先加上 tab 字元,使 tab 字元可以對齊。"
 
-#: src/diff3.c:491
-#, fuzzy
+#: src/diff3.c:496
 msgid "    --diff-program=PROGRAM  use PROGRAM to compare files"
-msgstr "--diff-program=程式      使用<程式>來比較檔案。"
+msgstr "    --diff-program=程式     使用 <程式> 比較檔案"
 
-#: src/diff3.c:492
+#: src/diff3.c:497
 msgid ""
 "-L, --label=LABEL           use LABEL instead of file name\n"
 "                                (can be repeated up to three times)"
 msgstr ""
+"-L, --label=標籤            使用 <標籤> 而非檔名\n"
+"                                (可重複使用三次)"
 
-#: src/diff3.c:495
+#: src/diff3.c:500
 msgid "    --help                  display this help and exit"
-msgstr ""
+msgstr "    --help                  顯示此說明後離開"
 
-#: src/diff3.c:496
-#, fuzzy
+#: src/diff3.c:501
 msgid "-v, --version               output version information and exit"
-msgstr "-v  --version            顯示版本資訊。"
+msgstr "-v, --version               輸出版本資訊後離開"
 
-#: src/diff3.c:505
+#: src/diff3.c:510
 #, c-format
 msgid "Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"
 msgstr "用法:%s [選項]... MYFILE OLDFILE YOURFILE\n"
 
-#: src/diff3.c:507
+#: src/diff3.c:512
 msgid "Compare three files line by line."
 msgstr "比較三個檔案的每一行。"
 
-#: src/diff3.c:517
+#: src/diff3.c:522
 msgid ""
 "\n"
 "The default output format is a somewhat human-readable representation of\n"
@@ -1272,191 +1208,179 @@ msgid ""
 "and output the actual merged file.  For unusual input, this is more\n"
 "robust than using ed.\n"
 msgstr ""
+"\n"
+"預設輸出格式是某個讓人好讀的變更表示方式。\n"
+"\n"
+"-e, -E, -x, -X (及其對應的長版) 選項可以讓 ed 指令稿\n"
+"輸出與預設模式不同的版本。\n"
+"\n"
+"最後,-m (--merge) 選項能讓 diff3 在內部合併,並輸出實際合併的檔案。\n"
+"在某些不常見的輸入情況,這會比使用 ed 還來得可靠。\n"
 
-#: src/diff3.c:529
+#: src/diff3.c:534
 msgid "Exit status is 0 if successful, 1 if conflicts, 2 if trouble."
 msgstr "回傳值是 0 的話代表指令成功執行,1 代表內容有衝突,2 代表有錯誤。"
 
-#: src/diff3.c:722
+#: src/diff3.c:727
 msgid "internal error: screwup in format of diff blocks"
 msgstr "內部錯誤:diff 區段的格式出錯"
 
-#: src/diff3.c:1017
+#: src/diff3.c:1022
 #, c-format
 msgid "%s: diff failed: "
 msgstr "%s:diff 失敗:"
 
-#: src/diff3.c:1039
+#: src/diff3.c:1044
 msgid "internal error: invalid diff type in process_diff"
 msgstr "內部錯誤:process_diff 中的 diff 類型無效"
 
-#: src/diff3.c:1064
+#: src/diff3.c:1069
 msgid "invalid diff format; invalid change separator"
 msgstr "無效的 diff 格式;表示資料變更的分隔字串無效"
 
-#: src/diff3.c:1300
+#: src/diff3.c:1305
 msgid "invalid diff format; incomplete last line"
 msgstr "無效的 diff 格式;最後一行不完整"
 
-#: src/diff3.c:1324 src/sdiff.c:275 src/util.c:969
-#, fuzzy, c-format
+#: src/diff3.c:1329 src/sdiff.c:276 src/util.c:969
+#, c-format
 msgid "subsidiary program '%s' could not be invoked"
-msgstr "子程式 ‘%s’ 無法執行"
+msgstr "無法執行「%s」子程式"
 
-#: src/diff3.c:1349
+#: src/diff3.c:1354
 msgid "invalid diff format; incorrect leading line chars"
 msgstr "diff 格式無效;某行的第一個字元不正確"
 
-#: src/diff3.c:1422
+#: src/diff3.c:1427
 msgid "internal error: invalid diff type passed to output"
 msgstr "內部錯誤:準備輸出的 diff 資料類型無效"
 
-#: src/diff3.c:1695 src/diff3.c:1752
+#: src/diff3.c:1700 src/diff3.c:1757
 msgid "input file shrank"
 msgstr "輸入檔縮小"
 
 #: src/dir.c:156
-#, fuzzy, c-format
+#, c-format
 msgid "cannot compare file names '%s' and '%s'"
-msgstr "無法比較檔案 ‘%s’ 和 ‘%s’"
+msgstr "無法比較檔案名稱「%s」和「%s」"
 
 #: src/dir.c:225
 #, c-format
 msgid "%s: recursive directory loop"
-msgstr ""
+msgstr "%s:遞迴目錄循環"
 
 #. This is a proper name. See the gettext manual, section Names.
-#: src/sdiff.c:43
+#: src/sdiff.c:44
 msgid "Thomas Lord"
-msgstr ""
+msgstr "Thomas Lord"
 
-#: src/sdiff.c:173
-#, fuzzy
+#: src/sdiff.c:174
 msgid ""
 "-o, --output=FILE            operate interactively, sending output to FILE"
-msgstr "-o 檔案  --output=檔案      互動式操作,並將結果寫入至<檔案>。"
+msgstr "-o, --output=檔案            互動式操作,並將結果寫入 <檔案>。"
 
-#: src/sdiff.c:175
-#, fuzzy
+#: src/sdiff.c:176
 msgid ""
 "-i, --ignore-case            consider upper- and lower-case to be the same"
-msgstr "-i  --ignore-case           不分辨檔案內容中的大小寫。"
+msgstr "-i, --ignore-case            不區分檔案內容中的大小寫"
 
-#: src/sdiff.c:176
-#, fuzzy
+#: src/sdiff.c:177
 msgid "-E, --ignore-tab-expansion   ignore changes due to tab expansion"
-msgstr "-E  --ignore-tab-expansion  忽略因將 tab 轉換為空格而造成的差異。"
+msgstr "-E, --ignore-tab-expansion   忽略因展開 tab 而造成的差異。"
 
-#: src/sdiff.c:177
-#, fuzzy
+#: src/sdiff.c:178
 msgid "-Z, --ignore-trailing-space  ignore white space at line end"
-msgstr "-w  --ignore-all-space      忽略所有空白字元。"
+msgstr "-Z, --ignore-trailing-space  忽略所有行末空白"
 
-#: src/sdiff.c:178
-#, fuzzy
+#: src/sdiff.c:179
 msgid ""
 "-b, --ignore-space-change    ignore changes in the amount of white space"
-msgstr "-b  --ignore-space-change   忽略因空白字元數目不同而造成的差異。"
+msgstr "-b, --ignore-space-change    忽略因空白字元數目不同而造成的差異"
 
-#: src/sdiff.c:179
-#, fuzzy
+#: src/sdiff.c:180
 msgid "-W, --ignore-all-space       ignore all white space"
-msgstr "-W  --ignore-all-space      忽略所有空白字元。"
+msgstr "-W, --ignore-all-space       忽略所有空白"
 
-#: src/sdiff.c:180
-#, fuzzy
+#: src/sdiff.c:181
 msgid "-B, --ignore-blank-lines     ignore changes whose lines are all blank"
-msgstr "-B  --ignore-blank-lines    忽略任何因空行而造成的差異。"
+msgstr "-B, --ignore-blank-lines     忽略因空列而造成的差異"
 
-#: src/sdiff.c:181
-#, fuzzy
+#: src/sdiff.c:182
 msgid "-I, --ignore-matching-lines=RE  ignore changes all whose lines match RE"
-msgstr ""
-"-I RE  --ignore-matching-lines=RE  忽略任何符合指定的<正規表示式>的地方。"
+msgstr "-I, --ignore-matching-lines=RE  忽略所有其列符合 RE 的變更"
 
-#: src/sdiff.c:182
-#, fuzzy
+#: src/sdiff.c:183
 msgid "    --strip-trailing-cr      strip trailing carriage return on input"
-msgstr "--strip-trailing-cr      去除輸入資料每行末端的 carriage return 字元。"
+msgstr ""
+"    --strip-trailing-cr      去除輸入資料每行末端的 carriage return 字元。"
 
-#: src/sdiff.c:183
-#, fuzzy
+#: src/sdiff.c:184
 msgid "-a, --text                   treat all files as text"
-msgstr "-a  --text               所有檔案都以文字檔方式處理。"
+msgstr "-a, --text                   將所有檔案依文字檔處理"
 
-#: src/sdiff.c:185
-#, fuzzy
+#: src/sdiff.c:186
 msgid ""
 "-w, --width=NUM              output at most NUM (default 130) print columns"
-msgstr "-w NUM  --width=NUM         每行顯示最多 NUM(預設 130)個字元。"
+msgstr "-w, --width=NUM              最多輸出 NUM(預設 130)個輸出列。"
 
-#: src/sdiff.c:186
-#, fuzzy
+#: src/sdiff.c:187
 msgid ""
 "-l, --left-column            output only the left column of common lines"
-msgstr "-l  --left-column           當有兩行相同時只顯示左邊的一行。"
+msgstr "-l, --left-column            兩行相同時只顯示左列"
 
-#: src/sdiff.c:187
-#, fuzzy
+#: src/sdiff.c:188
 msgid "-s, --suppress-common-lines  do not output common lines"
-msgstr "-s  --suppress-common-lines  當有兩行相同時不會顯示。"
+msgstr "-s, --suppress-common-lines  不輸出相同行"
 
-#: src/sdiff.c:189
-#, fuzzy
+#: src/sdiff.c:190
 msgid "-t, --expand-tabs            expand tabs to spaces in output"
-msgstr "-t  --expand-tabs        將輸出中的 tab 換成空格。"
+msgstr "-t, --expand-tabs            將輸出中的 tab 換成空格。"
 
-#: src/sdiff.c:190
-#, fuzzy
+#: src/sdiff.c:191
 msgid ""
 "    --tabsize=NUM            tab stops at every NUM (default 8) print columns"
-msgstr "--tabsize=NUM            定位字元 (tab) 的寬度,預設為 8 個空格。"
+msgstr ""
+"    --tabsize=NUM            定位字元 (tab) 的寬度,預設為 8 個輸出列。"
 
-#: src/sdiff.c:192
-#, fuzzy
+#: src/sdiff.c:193
 msgid "-d, --minimal                try hard to find a smaller set of changes"
-msgstr "-d  --minimal            盡可能找出最小的差異。"
+msgstr "-d, --minimal                盡可能找出最小差異"
 
-#: src/sdiff.c:193
-#, fuzzy
+#: src/sdiff.c:194
 msgid ""
 "-H, --speed-large-files      assume large files, many scattered small changes"
-msgstr "-H  --speed-large-files  假設檔案十分大而且當中含有許多些微的差異。"
+msgstr "-H, --speed-large-files      假設檔案十分大,且當中含有許多些微的差異"
 
-#: src/sdiff.c:194
-#, fuzzy
+#: src/sdiff.c:195
 msgid "    --diff-program=PROGRAM   use PROGRAM to compare files"
-msgstr "--diff-program=程式      使用<程式>來比較檔案。"
+msgstr "    --diff-program=程式      使用 <程式> 比較檔案"
 
-#: src/sdiff.c:196
+#: src/sdiff.c:197
 msgid "    --help                   display this help and exit"
-msgstr ""
+msgstr "    --help                   顯示此說明後離開"
 
-#: src/sdiff.c:197
-#, fuzzy
+#: src/sdiff.c:198
 msgid "-v, --version                output version information and exit"
-msgstr "-v  --version            顯示版本資訊。"
+msgstr "-v, --version                輸出版本資訊後離開"
 
-#: src/sdiff.c:206
+#: src/sdiff.c:207
 #, c-format
 msgid "Usage: %s [OPTION]... FILE1 FILE2\n"
 msgstr "用法:%s [選項]... 檔案1 檔案2\n"
 
-#: src/sdiff.c:208
-#, fuzzy
+#: src/sdiff.c:209
 msgid "Side-by-side merge of differences between FILE1 and FILE2."
-msgstr "以並排方式合併檔案之間的差異。"
+msgstr "以並排方式合併 <檔案1> 和 <檔案2> 之間的差異。"
 
-#: src/sdiff.c:329
+#: src/sdiff.c:330
 msgid "cannot interactively merge standard input"
 msgstr "不允許以互動方式合併標準輸入的資料"
 
-#: src/sdiff.c:595
+#: src/sdiff.c:597
 msgid "both files to be compared are directories"
 msgstr "兩個要比較的都是目錄"
 
-#: src/sdiff.c:818
-#, fuzzy
+#: src/sdiff.c:820
 msgid ""
 "ed:\tEdit then use both versions, each decorated with a header.\n"
 "eb:\tEdit then use both versions.\n"
@@ -1469,172 +1393,51 @@ msgid ""
 "v:\tVerbosely include common lines.\n"
 "q:\tQuit.\n"
 msgstr ""
-"ed:\t編輯兩邊的版本合併後的資料,各版本分別加上標頭以資識別。\n"
-"eb:\t編輯兩邊的版本合併後的資料。\n"
-"el:\t使用左邊的版本來進行編輯。\n"
-"er:\t使用右邊的版本來進行編輯。\n"
-"e :\t編輯新的版本。\n"
-"l :\t使用左邊的版本。\n"
-"r :\t使用右邊的版本。\n"
-"s :\t加上兩邊一樣的行組時不在畫面顯示。\n"
-"v :\t加上兩邊一樣的行組時會在畫面顯示。\n"
-"q :\t離開。\n"
+"ed:\t編輯後使用兩側版本,會使用標頭以利識別。\n"
+"eb:\t編輯後使用兩側版本。\n"
+"el 或 e1:\t編輯後使用左側版本。\n"
+"er 或 e2:\t編輯後使用右側版本。\n"
+"e:\t放棄兩側版本,並編輯新版本。\n"
+"l 或 1:\t使用左側版本。\n"
+"r 或 2:\t使用右側版本。\n"
+"s:\t安靜地加入共同行。\n"
+"v:\t詳細地加入共同行。\n"
+"q:\t離開。\n"
 
 #: src/util.c:662
-#, fuzzy, c-format
+#, c-format
 msgid "unrecognized prefix: %s"
-msgstr "%s:無法識別的選項‘--%s’\n"
+msgstr "前綴無法識別:%s"
 
 #: src/util.c:692
 #, c-format
 msgid "unparsable value for --palette"
-msgstr ""
+msgstr "無法解析傳入 --palette 的值"
 
-#, fuzzy
-#~ msgid "%s: option '--%s' doesn't allow an argument\n"
-#~ msgstr "%s:選項‘--%s’不可配合參數使用\n"
+#, c-format
+#~ msgid "invalid %s%s argument '%s'"
+#~ msgstr "%s%s 參數「%s」無效"
 
-#, fuzzy
-#~ msgid "%s: unrecognized option '--%s'\n"
-#~ msgstr "%s:無法識別的選項‘--%s’\n"
+#, c-format
+#~ msgid "invalid suffix in %s%s argument '%s'"
+#~ msgstr "%s%s 參數「%s」有無效後綴"
 
-#, fuzzy
-#~ msgid "%s: option '-W %s' is ambiguous\n"
-#~ msgstr "%s:選項‘-W %s’是不明確的\n"
+#, c-format
+#~ msgid "%s%s argument '%s' too large"
+#~ msgstr "%s%s 參數「%s」過長"
 
-#, fuzzy
-#~ msgid "%s: option '-W %s' doesn't allow an argument\n"
-#~ msgstr "%s:選項‘-W %s’不可配合參數使用\n"
+#, c-format
+#~ msgid "%s home page: <https://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s 首頁:<https://www.gnu.org/software/%s/>\n"
 
-#, fuzzy
-#~ msgid "%s: option '-W %s' requires an argument\n"
-#~ msgstr "%s:選項‘%s’需要參數\n"
+#~ msgid "%s: option `--%s' doesn't allow an argument\n"
+#~ msgstr "%s:選項「--%s」不可配合參數使用\n"
 
 #~ msgid "%s: illegal option -- %c\n"
 #~ msgstr "%s:不合法的選項 ─ %c\n"
 
-#~ msgid ""
-#~ "This is free software; see the source for copying conditions.  There is "
-#~ "NO\n"
-#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
-#~ "PURPOSE.\n"
-#~ msgstr ""
-#~ "本程式是自由軟體;請參考源代碼中的版權聲明。本軟體不提供任何保證,甚至不"
-#~ "會\n"
-#~ "包括可售性或適用於任何特定目的的保證。\n"
-
-#~ msgid "-i SKIP1:SKIP2  --ignore-initial=SKIP1:SKIP2"
-#~ msgstr "-i SKIP1:SKIP2  --ignore-initial=SKIP1:SKIP2"
-
-#~ msgid "-s  --quiet  --silent  Output nothing; yield exit status only."
-#~ msgstr "-s  --quiet  --silent    不輸出任何資訊;只產生回傳值。"
-
-#~ msgid "--help  Output this help."
-#~ msgstr "--help                   顯示此求助說明。"
-
-#~ msgid "Report bugs to <bug-gnu-utils@gnu.org>."
-#~ msgstr "請向 <bug-gnu-utils@gnu.org> 回報錯誤。"
-
-#~ msgid "`-%ld' option is obsolete; use `-%c %ld'"
-#~ msgstr "‘-%ld’ 選項已過時;請使用 ‘-%c %ld’"
-
-#~ msgid "`-%ld' option is obsolete; omit it"
-#~ msgstr "‘-%ld’ 選項已過時;會忽略此選項"
-
-#~ msgid ""
-#~ "-c  -C NUM  --context[=NUM]  Output NUM (default 3) lines of copied "
-#~ "context.\n"
-#~ "-u  -U NUM  --unified[=NUM]  Output NUM (default 3) lines of unified "
-#~ "context.\n"
-#~ "  --label LABEL  Use LABEL instead of file name.\n"
-#~ "  -p  --show-c-function  Show which C function each change is in.\n"
-#~ "  -F RE  --show-function-line=RE  Show the most recent line matching RE."
-#~ msgstr ""
-#~ "-c  -C 行數  --context[=行數]  顯示指定<行數>(預設 3 行)copied 格式的上下"
-#~ "文\n"
-#~ "-u  -U 行數  --unified[=行數]  顯示指定<行數>(預設 3 行)unified 格式的上下"
-#~ "文\n"
-#~ "   --label 標籤                    使用<標籤>代替檔案名稱。\n"
-#~ "   -p  --show-c-function           顯示和每個差異有關的 C 函式名稱。\n"
-#~ "   -F RE  --show-function-line=RE  顯示最接近而符合<正規表示式>的一行。"
-
-#~ msgid ""
-#~ "-y  --side-by-side  Output in two columns.\n"
-#~ "  -W NUM  --width=NUM  Output at most NUM (default 130) print columns.\n"
-#~ "  --left-column  Output only the left column of common lines.\n"
-#~ "  --suppress-common-lines  Do not output common lines."
-#~ msgstr ""
-#~ "-y  --side-by-side         以兩列並排的方式顯示。\n"
-#~ "  -W NUM  --width=NUM      每行顯示最多 NUM (預設 130) 個字元。\n"
-#~ "  --left-column            當有兩行相同時只顯示左邊的一行。\n"
-#~ "  --suppress-common-lines  當有兩行相同時不會顯示。"
-
-#~ msgid ""
-#~ "--speed-large-files  Assume large files and many scattered small changes."
-#~ msgstr "--speed-large-files      假設檔案十分大而且當中含有許多些微的差異。"
-
-#~ msgid "-X  Output overlapping changes, bracketing them."
-#~ msgstr "-X                   顯示重疊的更改部份,並括上記號。"
-
-#~ msgid "-m  --merge  Output merged file instead of ed script (default -A)."
-#~ msgstr ""
-#~ "-m  --merge          顯示合併後的檔案而不是 ed script (預設加上 -A)。"
-
-#~ msgid "-L LABEL  --label=LABEL  Use LABEL instead of file name."
-#~ msgstr "-L 標籤  --label=標籤    以<標籤>代替檔案名稱。"
-
-#~ msgid "subsidiary program `%s' not found"
-#~ msgstr "找不到子程式 ‘%s’"
-
-#~ msgid "subsidiary program `%s' failed"
-#~ msgstr "程式 ‘%s’ 回傳錯誤"
-
-#~ msgid "subsidiary program `%s' failed (exit status %d)"
-#~ msgstr "子程式 ‘%s’ 發生錯誤 (回傳值為 %d)"
-
-#~ msgid ""
-#~ "This program comes with NO WARRANTY, to the extent permitted by law.\n"
-#~ "You may redistribute copies of this program\n"
-#~ "under the terms of the GNU General Public License.\n"
-#~ "For more information about these matters, see the files named COPYING."
-#~ msgstr ""
-#~ "此軟體在法律允許的限度之下不附帶任何保證。你可以根據 GNU General Public\n"
-#~ "License 中的條款重新散佈此軟體。詳情請參考檔案 COPYING。"
-
-#~ msgid "Written by Torbjorn Granlund and David MacKenzie."
-#~ msgstr "由 Torbjorn Granlund 及 David MacKenzie 編寫。"
-
-#~ msgid ""
-#~ "Written by Paul Eggert, Mike Haertel, David Hayes,\n"
-#~ "Richard Stallman, and Len Tower."
-#~ msgstr ""
-#~ "由 Paul Eggert、Mike Haertel、David Hayes、\n"
-#~ "Richard Stallman 和 Len Tower 編寫。"
-
-#~ msgid "subsidiary program `%s' not executable"
-#~ msgstr "所需的程式‘%s’無法執行"
-
-#~ msgid "--inhibit-hunk-merge  Do not merge hunks."
-#~ msgstr "--inhibit-hunk-merge     (此選項不作處理)"
-
-#~ msgid ""
-#~ "SKIP values may be followed by the following multiplicative suffixes:\n"
-#~ msgstr "SKIP 值可以加上以下的單位:\n"
-
-#~ msgid "kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n"
-#~ msgstr "kB 1000、K 1024、MB 1,000,000、M 1,048,576、\n"
-
-#~ msgid "GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y.\n"
-#~ msgstr "GB 1,000,000,000、G 1,073,741,824、還有 T、P、E、Z、Y 如此類推。\n"
-
-#~ msgid "multiple `--from-file' options"
-#~ msgstr "‘--from-file’選項不可使用多於一次"
-
-#~ msgid "multiple `--to-file' options"
-#~ msgstr "‘--to-file’選項不可使用多於一次"
-
-#~ msgid "regular executable file"
-#~ msgstr "正常可執行檔"
-
-#~ msgid "If a FILE is `-', read standard input.\n"
-#~ msgstr "如果檔案是‘-’,則由標準輸入讀入資料。\n"
+#~ msgid "%s: option `-W %s' is ambiguous\n"
+#~ msgstr "%s:選項「-W %s」不明確\n"
+
+#~ msgid "%s: option `-W %s' doesn't allow an argument\n"
+#~ msgstr "%s:選項「-W %s」不可配合參數使用\n"
index 35ddefe..d27a54d 100644 (file)
@@ -1,6 +1,6 @@
 # Automakefile for GNU diffutils programs.
 
-# Copyright (C) 2001-2002, 2006, 2009-2013, 2015-2018 Free Software Foundation,
+# Copyright (C) 2001-2002, 2006, 2009-2013, 2015-2021 Free Software Foundation,
 # Inc.
 
 # This program is free software: you can redistribute it and/or modify
index a78e2d7..de31548 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -16,7 +16,7 @@
 
 # Automakefile for GNU diffutils programs.
 
-# Copyright (C) 2001-2002, 2006, 2009-2013, 2015-2018 Free Software Foundation,
+# Copyright (C) 2001-2002, 2006, 2009-2013, 2015-2021 Free Software Foundation,
 # Inc.
 
 # This program is free software: you can redistribute it and/or modify
@@ -115,11 +115,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -129,13 +131,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -143,49 +146,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -193,30 +204,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
@@ -316,8 +330,6 @@ am__define_uniq_tagged_files = \
   unique=`for i in $$list; do \
     if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
   done | $(am__uniquify_input)`
-ETAGS = etags
-CTAGS = ctags
 am__DIST_COMMON = $(srcdir)/Makefile.in \
        $(top_srcdir)/build-aux/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -341,9 +353,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -358,321 +373,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -707,13 +812,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -735,17 +841,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -761,7 +871,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -770,7 +879,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -793,11 +902,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -814,10 +982,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -831,14 +1004,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -852,23 +1030,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -907,12 +1086,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -933,20 +1115,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -955,8 +1151,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -977,6 +1175,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -986,6 +1186,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -1009,6 +1210,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -1018,6 +1221,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -1042,31 +1246,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1086,6 +1302,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1093,10 +1310,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1118,7 +1338,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1130,29 +1352,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1164,6 +1442,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1174,6 +1453,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1200,6 +1484,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1208,6 +1493,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1221,10 +1507,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1526,7 +1814,6 @@ cscopelist-am: $(am__tagged_files)
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
@@ -1570,7 +1857,8 @@ installdirs:
        done
 install: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
+install-exec: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-am
 install-data: install-data-am
 uninstall: uninstall-am
 
@@ -1699,7 +1987,7 @@ ps-am:
 
 uninstall-am: uninstall-binPROGRAMS
 
-.MAKE: all check install install-am install-strip
+.MAKE: all check install install-am install-exec install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
        clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
index 3c5b002..a5e4bdc 100644 (file)
@@ -1,7 +1,7 @@
 /* Analyze file differences for GNU DIFF.
 
    Copyright (C) 1988-1989, 1992-1995, 1998, 2001-2002, 2004, 2006-2007,
-   2009-2013, 2015-2018 Free Software Foundation, Inc.
+   2009-2013, 2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -57,7 +57,7 @@ discard_confusing_lines (struct file_data filevec[])
 
   /* Allocate our results.  */
   p = xmalloc ((filevec[0].buffered_lines + filevec[1].buffered_lines)
-              * (2 * sizeof *p));
+               * (2 * sizeof *p));
   for (f = 0; f < 2; f++)
     {
       filevec[f].undiscarded = p;  p += filevec[f].buffered_lines;
@@ -79,7 +79,7 @@ discard_confusing_lines (struct file_data filevec[])
   /* Set up tables of which lines are going to be discarded.  */
 
   discarded[0] = zalloc (filevec[0].buffered_lines
-                        + filevec[1].buffered_lines);
+                         + filevec[1].buffered_lines);
   discarded[1] = discarded[0] + filevec[0].buffered_lines;
 
   /* Mark to be discarded each line that matches no line of the other file.
@@ -95,21 +95,21 @@ discard_confusing_lines (struct file_data filevec[])
       size_t tem = end / 64;
 
       /* Multiply MANY by approximate square root of number of lines.
-        That is the threshold for provisionally discardable lines.  */
+         That is the threshold for provisionally discardable lines.  */
       while ((tem = tem >> 2) > 0)
-       many *= 2;
+        many *= 2;
 
       for (i = 0; i < end; i++)
-       {
-         lin nmatch;
-         if (equivs[i] == 0)
-           continue;
-         nmatch = counts[equivs[i]];
-         if (nmatch == 0)
-           discards[i] = 1;
-         else if (nmatch > many)
-           discards[i] = 2;
-       }
+        {
+          lin nmatch;
+          if (equivs[i] == 0)
+            continue;
+          nmatch = counts[equivs[i]];
+          if (nmatch == 0)
+            discards[i] = 1;
+          else if (nmatch > many)
+            discards[i] = 2;
+        }
     }
 
   /* Don't really discard the provisional lines except when they occur
@@ -122,106 +122,106 @@ discard_confusing_lines (struct file_data filevec[])
       register char *discards = discarded[f];
 
       for (i = 0; i < end; i++)
-       {
-         /* Cancel provisional discards not in middle of run of discards.  */
-         if (discards[i] == 2)
-           discards[i] = 0;
-         else if (discards[i] != 0)
-           {
-             /* We have found a nonprovisional discard.  */
-             register lin j;
-             lin length;
-             lin provisional = 0;
-
-             /* Find end of this run of discardable lines.
-                Count how many are provisionally discardable.  */
-             for (j = i; j < end; j++)
-               {
-                 if (discards[j] == 0)
-                   break;
-                 if (discards[j] == 2)
-                   ++provisional;
-               }
-
-             /* Cancel provisional discards at end, and shrink the run.  */
-             while (j > i && discards[j - 1] == 2)
-               discards[--j] = 0, --provisional;
-
-             /* Now we have the length of a run of discardable lines
-                whose first and last are not provisional.  */
-             length = j - i;
-
-             /* If 1/4 of the lines in the run are provisional,
-                cancel discarding of all provisional lines in the run.  */
-             if (provisional * 4 > length)
-               {
-                 while (j > i)
-                   if (discards[--j] == 2)
-                     discards[j] = 0;
-               }
-             else
-               {
-                 register lin consec;
-                 lin minimum = 1;
-                 lin tem = length >> 2;
-
-                 /* MINIMUM is approximate square root of LENGTH/4.
-                    A subrun of two or more provisionals can stand
-                    when LENGTH is at least 16.
-                    A subrun of 4 or more can stand when LENGTH >= 64.  */
-                 while (0 < (tem >>= 2))
-                   minimum <<= 1;
-                 minimum++;
-
-                 /* Cancel any subrun of MINIMUM or more provisionals
-                    within the larger run.  */
-                 for (j = 0, consec = 0; j < length; j++)
-                   if (discards[i + j] != 2)
-                     consec = 0;
-                   else if (minimum == ++consec)
-                     /* Back up to start of subrun, to cancel it all.  */
-                     j -= consec;
-                   else if (minimum < consec)
-                     discards[i + j] = 0;
-
-                 /* Scan from beginning of run
-                    until we find 3 or more nonprovisionals in a row
-                    or until the first nonprovisional at least 8 lines in.
-                    Until that point, cancel any provisionals.  */
-                 for (j = 0, consec = 0; j < length; j++)
-                   {
-                     if (j >= 8 && discards[i + j] == 1)
-                       break;
-                     if (discards[i + j] == 2)
-                       consec = 0, discards[i + j] = 0;
-                     else if (discards[i + j] == 0)
-                       consec = 0;
-                     else
-                       consec++;
-                     if (consec == 3)
-                       break;
-                   }
-
-                 /* I advances to the last line of the run.  */
-                 i += length - 1;
-
-                 /* Same thing, from end.  */
-                 for (j = 0, consec = 0; j < length; j++)
-                   {
-                     if (j >= 8 && discards[i - j] == 1)
-                       break;
-                     if (discards[i - j] == 2)
-                       consec = 0, discards[i - j] = 0;
-                     else if (discards[i - j] == 0)
-                       consec = 0;
-                     else
-                       consec++;
-                     if (consec == 3)
-                       break;
-                   }
-               }
-           }
-       }
+        {
+          /* Cancel provisional discards not in middle of run of discards.  */
+          if (discards[i] == 2)
+            discards[i] = 0;
+          else if (discards[i] != 0)
+            {
+              /* We have found a nonprovisional discard.  */
+              register lin j;
+              lin length;
+              lin provisional = 0;
+
+              /* Find end of this run of discardable lines.
+                 Count how many are provisionally discardable.  */
+              for (j = i; j < end; j++)
+                {
+                  if (discards[j] == 0)
+                    break;
+                  if (discards[j] == 2)
+                    ++provisional;
+                }
+
+              /* Cancel provisional discards at end, and shrink the run.  */
+              while (j > i && discards[j - 1] == 2)
+                discards[--j] = 0, --provisional;
+
+              /* Now we have the length of a run of discardable lines
+                 whose first and last are not provisional.  */
+              length = j - i;
+
+              /* If 1/4 of the lines in the run are provisional,
+                 cancel discarding of all provisional lines in the run.  */
+              if (provisional * 4 > length)
+                {
+                  while (j > i)
+                    if (discards[--j] == 2)
+                      discards[j] = 0;
+                }
+              else
+                {
+                  register lin consec;
+                  lin minimum = 1;
+                  lin tem = length >> 2;
+
+                  /* MINIMUM is approximate square root of LENGTH/4.
+                     A subrun of two or more provisionals can stand
+                     when LENGTH is at least 16.
+                     A subrun of 4 or more can stand when LENGTH >= 64.  */
+                  while (0 < (tem >>= 2))
+                    minimum <<= 1;
+                  minimum++;
+
+                  /* Cancel any subrun of MINIMUM or more provisionals
+                     within the larger run.  */
+                  for (j = 0, consec = 0; j < length; j++)
+                    if (discards[i + j] != 2)
+                      consec = 0;
+                    else if (minimum == ++consec)
+                      /* Back up to start of subrun, to cancel it all.  */
+                      j -= consec;
+                    else if (minimum < consec)
+                      discards[i + j] = 0;
+
+                  /* Scan from beginning of run
+                     until we find 3 or more nonprovisionals in a row
+                     or until the first nonprovisional at least 8 lines in.
+                     Until that point, cancel any provisionals.  */
+                  for (j = 0, consec = 0; j < length; j++)
+                    {
+                      if (j >= 8 && discards[i + j] == 1)
+                        break;
+                      if (discards[i + j] == 2)
+                        consec = 0, discards[i + j] = 0;
+                      else if (discards[i + j] == 0)
+                        consec = 0;
+                      else
+                        consec++;
+                      if (consec == 3)
+                        break;
+                    }
+
+                  /* I advances to the last line of the run.  */
+                  i += length - 1;
+
+                  /* Same thing, from end.  */
+                  for (j = 0, consec = 0; j < length; j++)
+                    {
+                      if (j >= 8 && discards[i - j] == 1)
+                        break;
+                      if (discards[i - j] == 2)
+                        consec = 0, discards[i - j] = 0;
+                      else if (discards[i - j] == 0)
+                        consec = 0;
+                      else
+                        consec++;
+                      if (consec == 3)
+                        break;
+                    }
+                }
+            }
+        }
     }
 
   /* Actually discard the lines. */
@@ -231,13 +231,13 @@ discard_confusing_lines (struct file_data filevec[])
       lin end = filevec[f].buffered_lines;
       lin j = 0;
       for (i = 0; i < end; ++i)
-       if (minimal || discards[i] == 0)
-         {
-           filevec[f].undiscarded[j] = filevec[f].equivs[i];
-           filevec[f].realindexes[j++] = i;
-         }
-       else
-         filevec[f].changed[i] = 1;
+        if (minimal || discards[i] == 0)
+          {
+            filevec[f].undiscarded[j] = filevec[f].equivs[i];
+            filevec[f].realindexes[j++] = i;
+          }
+        else
+          filevec[f].changed[i] = 1;
       filevec[f].nondiscarded_lines = j;
     }
 
@@ -270,85 +270,85 @@ shift_boundaries (struct file_data filevec[])
       lin i_end = filevec[f].buffered_lines;
 
       while (1)
-       {
-         lin runlength, start, corresponding;
-
-         /* Scan forwards to find beginning of another run of changes.
-            Also keep track of the corresponding point in the other file.  */
-
-         while (i < i_end && !changed[i])
-           {
-             while (other_changed[j++])
-               continue;
-             i++;
-           }
-
-         if (i == i_end)
-           break;
-
-         start = i;
-
-         /* Find the end of this run of changes.  */
-
-         while (changed[++i])
-           continue;
-         while (other_changed[j])
-           j++;
-
-         do
-           {
-             /* Record the length of this run of changes, so that
-                we can later determine whether the run has grown.  */
-             runlength = i - start;
-
-             /* Move the changed region back, so long as the
-                previous unchanged line matches the last changed one.
-                This merges with previous changed regions.  */
-
-             while (start && equivs[start - 1] == equivs[i - 1])
-               {
-                 changed[--start] = 1;
-                 changed[--i] = 0;
-                 while (changed[start - 1])
-                   start--;
-                 while (other_changed[--j])
-                   continue;
-               }
-
-             /* Set CORRESPONDING to the end of the changed run, at the last
-                point where it corresponds to a changed run in the other file.
-                CORRESPONDING == I_END means no such point has been found.  */
-             corresponding = other_changed[j - 1] ? i : i_end;
-
-             /* Move the changed region forward, so long as the
-                first changed line matches the following unchanged one.
-                This merges with following changed regions.
-                Do this second, so that if there are no merges,
-                the changed region is moved forward as far as possible.  */
-
-             while (i != i_end && equivs[start] == equivs[i])
-               {
-                 changed[start++] = 0;
-                 changed[i++] = 1;
-                 while (changed[i])
-                   i++;
-                 while (other_changed[++j])
-                   corresponding = i;
-               }
-           }
-         while (runlength != i - start);
-
-         /* If possible, move the fully-merged run of changes
-            back to a corresponding run in the other file.  */
-
-         while (corresponding < i)
-           {
-             changed[--start] = 1;
-             changed[--i] = 0;
-             while (other_changed[--j])
-               continue;
-           }
-       }
+        {
+          lin runlength, start, corresponding;
+
+          /* Scan forwards to find beginning of another run of changes.
+             Also keep track of the corresponding point in the other file.  */
+
+          while (i < i_end && !changed[i])
+            {
+              while (other_changed[j++])
+                continue;
+              i++;
+            }
+
+          if (i == i_end)
+            break;
+
+          start = i;
+
+          /* Find the end of this run of changes.  */
+
+          while (changed[++i])
+            continue;
+          while (other_changed[j])
+            j++;
+
+          do
+            {
+              /* Record the length of this run of changes, so that
+                 we can later determine whether the run has grown.  */
+              runlength = i - start;
+
+              /* Move the changed region back, so long as the
+                 previous unchanged line matches the last changed one.
+                 This merges with previous changed regions.  */
+
+              while (start && equivs[start - 1] == equivs[i - 1])
+                {
+                  changed[--start] = 1;
+                  changed[--i] = 0;
+                  while (changed[start - 1])
+                    start--;
+                  while (other_changed[--j])
+                    continue;
+                }
+
+              /* Set CORRESPONDING to the end of the changed run, at the last
+                 point where it corresponds to a changed run in the other file.
+                 CORRESPONDING == I_END means no such point has been found.  */
+              corresponding = other_changed[j - 1] ? i : i_end;
+
+              /* Move the changed region forward, so long as the
+                 first changed line matches the following unchanged one.
+                 This merges with following changed regions.
+                 Do this second, so that if there are no merges,
+                 the changed region is moved forward as far as possible.  */
+
+              while (i != i_end && equivs[start] == equivs[i])
+                {
+                  changed[start++] = 0;
+                  changed[i++] = 1;
+                  while (changed[i])
+                    i++;
+                  while (other_changed[++j])
+                    corresponding = i;
+                }
+            }
+          while (runlength != i - start);
+
+          /* If possible, move the fully-merged run of changes
+             back to a corresponding run in the other file.  */
+
+          while (corresponding < i)
+            {
+              changed[--start] = 1;
+              changed[--i] = 0;
+              while (other_changed[--j])
+                continue;
+            }
+        }
     }
 }
 \f
@@ -362,7 +362,7 @@ shift_boundaries (struct file_data filevec[])
 
 static struct change *
 add_change (lin line0, lin line1, lin deleted, lin inserted,
-           struct change *old)
+            struct change *old)
 {
   struct change *new = xmalloc (sizeof *new);
 
@@ -393,16 +393,16 @@ build_reverse_script (struct file_data const filevec[])
   while (i0 < len0 || i1 < len1)
     {
       if (changed0[i0] | changed1[i1])
-       {
-         lin line0 = i0, line1 = i1;
+        {
+          lin line0 = i0, line1 = i1;
 
-         /* Find # lines changed here in each file.  */
-         while (changed0[i0]) ++i0;
-         while (changed1[i1]) ++i1;
+          /* Find # lines changed here in each file.  */
+          while (changed0[i0]) ++i0;
+          while (changed1[i1]) ++i1;
 
-         /* Record this change.  */
-         script = add_change (line0, line1, i0 - line0, i1 - line1, script);
-       }
+          /* Record this change.  */
+          script = add_change (line0, line1, i0 - line0, i1 - line1, script);
+        }
 
       /* We have reached lines in the two files that match each other.  */
       i0++, i1++;
@@ -427,16 +427,16 @@ build_script (struct file_data const filevec[])
   while (i0 >= 0 || i1 >= 0)
     {
       if (changed0[i0 - 1] | changed1[i1 - 1])
-       {
-         lin line0 = i0, line1 = i1;
+        {
+          lin line0 = i0, line1 = i1;
 
-         /* Find # lines changed here in each file.  */
-         while (changed0[i0 - 1]) --i0;
-         while (changed1[i1 - 1]) --i1;
+          /* Find # lines changed here in each file.  */
+          while (changed0[i0 - 1]) --i0;
+          while (changed1[i1 - 1]) --i1;
 
-         /* Record this change.  */
-         script = add_change (i0, i1, line0 - i0, line1 - i1, script);
-       }
+          /* Record this change.  */
+          script = add_change (i0, i1, line0 - i0, line1 - i1, script);
+        }
 
       /* We have reached lines in the two files that match each other.  */
       i0--, i1--;
@@ -451,10 +451,10 @@ briefly_report (int changes, struct file_data const filevec[])
 {
   if (changes)
     message ((brief
-             ? _("Files %s and %s differ\n")
-             : _("Binary files %s and %s differ\n")),
-            file_label[0] ? file_label[0] : filevec[0].name,
-            file_label[1] ? file_label[1] : filevec[1].name);
+              ? _("Files %s and %s differ\n")
+              : _("Binary files %s and %s differ\n")),
+             file_label[0] ? file_label[0] : filevec[0].name,
+             file_label[1] ? file_label[1] : filevec[1].name);
 }
 
 /* Report the differences of two files.  */
@@ -477,56 +477,56 @@ diff_2_files (struct comparison *cmp)
     {
       /* Files with different lengths must be different.  */
       if (cmp->file[0].stat.st_size != cmp->file[1].stat.st_size
-         && 0 < cmp->file[0].stat.st_size
-         && 0 < cmp->file[1].stat.st_size
-         && (cmp->file[0].desc < 0 || S_ISREG (cmp->file[0].stat.st_mode))
-         && (cmp->file[1].desc < 0 || S_ISREG (cmp->file[1].stat.st_mode)))
-       changes = 1;
+          && 0 < cmp->file[0].stat.st_size
+          && 0 < cmp->file[1].stat.st_size
+          && (cmp->file[0].desc < 0 || S_ISREG (cmp->file[0].stat.st_mode))
+          && (cmp->file[1].desc < 0 || S_ISREG (cmp->file[1].stat.st_mode)))
+        changes = 1;
 
       /* Standard input equals itself.  */
       else if (cmp->file[0].desc == cmp->file[1].desc)
-       changes = 0;
+        changes = 0;
 
       else
-       /* Scan both files, a buffer at a time, looking for a difference.  */
-       {
-         /* Allocate same-sized buffers for both files.  */
-         size_t lcm_max = PTRDIFF_MAX - 1;
-         size_t buffer_size =
-           buffer_lcm (sizeof (word),
-                       buffer_lcm (STAT_BLOCKSIZE (cmp->file[0].stat),
-                                   STAT_BLOCKSIZE (cmp->file[1].stat),
-                                   lcm_max),
-                       lcm_max);
-         for (f = 0; f < 2; f++)
-           cmp->file[f].buffer = xrealloc (cmp->file[f].buffer, buffer_size);
-
-         for (;; cmp->file[0].buffered = cmp->file[1].buffered = 0)
-           {
-             /* Read a buffer's worth from both files.  */
-             for (f = 0; f < 2; f++)
-               if (0 <= cmp->file[f].desc)
-                 file_block_read (&cmp->file[f],
-                                  buffer_size - cmp->file[f].buffered);
-
-             /* If the buffers differ, the files differ.  */
-             if (cmp->file[0].buffered != cmp->file[1].buffered
-                 || memcmp (cmp->file[0].buffer,
-                            cmp->file[1].buffer,
-                            cmp->file[0].buffered))
-               {
-                 changes = 1;
-                 break;
-               }
-
-             /* If we reach end of file, the files are the same.  */
-             if (cmp->file[0].buffered != buffer_size)
-               {
-                 changes = 0;
-                 break;
-               }
-           }
-       }
+        /* Scan both files, a buffer at a time, looking for a difference.  */
+        {
+          /* Allocate same-sized buffers for both files.  */
+          size_t lcm_max = PTRDIFF_MAX - 1;
+          size_t buffer_size =
+            buffer_lcm (sizeof (word),
+                        buffer_lcm (STAT_BLOCKSIZE (cmp->file[0].stat),
+                                    STAT_BLOCKSIZE (cmp->file[1].stat),
+                                    lcm_max),
+                        lcm_max);
+          for (f = 0; f < 2; f++)
+            cmp->file[f].buffer = xrealloc (cmp->file[f].buffer, buffer_size);
+
+          for (;; cmp->file[0].buffered = cmp->file[1].buffered = 0)
+            {
+              /* Read a buffer's worth from both files.  */
+              for (f = 0; f < 2; f++)
+                if (0 <= cmp->file[f].desc)
+                  file_block_read (&cmp->file[f],
+                                   buffer_size - cmp->file[f].buffered);
+
+              /* If the buffers differ, the files differ.  */
+              if (cmp->file[0].buffered != cmp->file[1].buffered
+                  || memcmp (cmp->file[0].buffer,
+                             cmp->file[1].buffer,
+                             cmp->file[0].buffered))
+                {
+                  changes = 1;
+                  break;
+                }
+
+              /* If we reach end of file, the files are the same.  */
+              if (cmp->file[0].buffered != buffer_size)
+                {
+                  changes = 0;
+                  break;
+                }
+            }
+        }
 
       briefly_report (changes, cmp->file);
     }
@@ -537,9 +537,9 @@ diff_2_files (struct comparison *cmp)
       lin too_expensive;
 
       /* Allocate vectors for the results of comparison:
-        a flag for each line of each file, saying whether that line
-        is an insertion or deletion.
-        Allocate an extra element, always 0, at each end of each vector.  */
+         a flag for each line of each file, saying whether that line
+         is an insertion or deletion.
+         Allocate an extra element, always 0, at each end of each vector.  */
 
       size_t s = cmp->file[0].buffered_lines + cmp->file[1].buffered_lines + 4;
       char *flag_space = zalloc (s);
@@ -547,18 +547,18 @@ diff_2_files (struct comparison *cmp)
       cmp->file[1].changed = flag_space + cmp->file[0].buffered_lines + 3;
 
       /* Some lines are obviously insertions or deletions
-        because they don't match anything.  Detect them now, and
-        avoid even thinking about them in the main comparison algorithm.  */
+         because they don't match anything.  Detect them now, and
+         avoid even thinking about them in the main comparison algorithm.  */
 
       discard_confusing_lines (cmp->file);
 
       /* Now do the main comparison algorithm, considering just the
-        undiscarded lines.  */
+         undiscarded lines.  */
 
       ctxt.xvec = cmp->file[0].undiscarded;
       ctxt.yvec = cmp->file[1].undiscarded;
       diags = (cmp->file[0].nondiscarded_lines
-              + cmp->file[1].nondiscarded_lines + 3);
+               + cmp->file[1].nondiscarded_lines + 3);
       ctxt.fdiag = xmalloc (diags * (2 * sizeof *ctxt.fdiag));
       ctxt.bdiag = ctxt.fdiag + diags;
       ctxt.fdiag += cmp->file[1].nondiscarded_lines + 1;
@@ -567,145 +567,145 @@ diff_2_files (struct comparison *cmp)
       ctxt.heuristic = speed_large_files;
 
       /* Set TOO_EXPENSIVE to be the approximate square root of the
-        input size, bounded below by 4096.  4096 seems to be good for
-        circa-2016 CPUs; see Bug#16848 and Bug#24715.  */
+         input size, bounded below by 4096.  4096 seems to be good for
+         circa-2016 CPUs; see Bug#16848 and Bug#24715.  */
       too_expensive = 1;
       for (;  diags != 0;  diags >>= 2)
-       too_expensive <<= 1;
+        too_expensive <<= 1;
       ctxt.too_expensive = MAX (4096, too_expensive);
 
       files[0] = cmp->file[0];
       files[1] = cmp->file[1];
 
       compareseq (0, cmp->file[0].nondiscarded_lines,
-                 0, cmp->file[1].nondiscarded_lines, minimal, &ctxt);
+                  0, cmp->file[1].nondiscarded_lines, minimal, &ctxt);
 
       free (ctxt.fdiag - (cmp->file[1].nondiscarded_lines + 1));
 
       /* Modify the results slightly to make them prettier
-        in cases where that can validly be done.  */
+         in cases where that can validly be done.  */
 
       shift_boundaries (cmp->file);
 
       /* Get the results of comparison in the form of a chain
-        of 'struct change's -- an edit script.  */
+         of 'struct change's -- an edit script.  */
 
       if (output_style == OUTPUT_ED)
-       script = build_reverse_script (cmp->file);
+        script = build_reverse_script (cmp->file);
       else
-       script = build_script (cmp->file);
+        script = build_script (cmp->file);
 
       /* Set CHANGES if we had any diffs.
-        If some changes are ignored, we must scan the script to decide.  */
+         If some changes are ignored, we must scan the script to decide.  */
       if (ignore_blank_lines || ignore_regexp.fastmap)
-       {
-         struct change *next = script;
-         changes = 0;
-
-         while (next && changes == 0)
-           {
-             struct change *this, *end;
-             lin first0, last0, first1, last1;
-
-             /* Find a set of changes that belong together.  */
-             this = next;
-             end = find_change (next);
-
-             /* Disconnect them from the rest of the changes, making them
-                a hunk, and remember the rest for next iteration.  */
-             next = end->link;
-             end->link = 0;
-
-             /* Determine whether this hunk is really a difference.  */
-             if (analyze_hunk (this, &first0, &last0, &first1, &last1))
-               changes = 1;
-
-             /* Reconnect the script so it will all be freed properly.  */
-             end->link = next;
-           }
-       }
+        {
+          struct change *next = script;
+          changes = 0;
+
+          while (next && changes == 0)
+            {
+              struct change *this, *end;
+              lin first0, last0, first1, last1;
+
+              /* Find a set of changes that belong together.  */
+              this = next;
+              end = find_change (next);
+
+              /* Disconnect them from the rest of the changes, making them
+                 a hunk, and remember the rest for next iteration.  */
+              next = end->link;
+              end->link = 0;
+
+              /* Determine whether this hunk is really a difference.  */
+              if (analyze_hunk (this, &first0, &last0, &first1, &last1))
+                changes = 1;
+
+              /* Reconnect the script so it will all be freed properly.  */
+              end->link = next;
+            }
+        }
       else
-       changes = (script != 0);
+        changes = (script != 0);
 
       if (brief)
-       briefly_report (changes, cmp->file);
+        briefly_report (changes, cmp->file);
       else
-       {
-         if (changes || !no_diff_means_no_output)
-           {
-             /* Record info for starting up output,
-                to be used if and when we have some output to print.  */
-             setup_output (file_label[0] ? file_label[0] : cmp->file[0].name,
-                           file_label[1] ? file_label[1] : cmp->file[1].name,
-                           cmp->parent != 0);
-
-             switch (output_style)
-               {
-               case OUTPUT_CONTEXT:
-                 print_context_script (script, false);
-                 break;
-
-               case OUTPUT_UNIFIED:
-                 print_context_script (script, true);
-                 break;
-
-               case OUTPUT_ED:
-                 print_ed_script (script);
-                 break;
-
-               case OUTPUT_FORWARD_ED:
-                 pr_forward_ed_script (script);
-                 break;
-
-               case OUTPUT_RCS:
-                 print_rcs_script (script);
-                 break;
-
-               case OUTPUT_NORMAL:
-                 print_normal_script (script);
-                 break;
-
-               case OUTPUT_IFDEF:
-                 print_ifdef_script (script);
-                 break;
-
-               case OUTPUT_SDIFF:
-                 print_sdiff_script (script);
-                 break;
-
-               default:
-                 abort ();
-               }
-
-             finish_output ();
-           }
-       }
+        {
+          if (changes || !no_diff_means_no_output)
+            {
+              /* Record info for starting up output,
+                 to be used if and when we have some output to print.  */
+              setup_output (file_label[0] ? file_label[0] : cmp->file[0].name,
+                            file_label[1] ? file_label[1] : cmp->file[1].name,
+                            cmp->parent != 0);
+
+              switch (output_style)
+                {
+                case OUTPUT_CONTEXT:
+                  print_context_script (script, false);
+                  break;
+
+                case OUTPUT_UNIFIED:
+                  print_context_script (script, true);
+                  break;
+
+                case OUTPUT_ED:
+                  print_ed_script (script);
+                  break;
+
+                case OUTPUT_FORWARD_ED:
+                  pr_forward_ed_script (script);
+                  break;
+
+                case OUTPUT_RCS:
+                  print_rcs_script (script);
+                  break;
+
+                case OUTPUT_NORMAL:
+                  print_normal_script (script);
+                  break;
+
+                case OUTPUT_IFDEF:
+                  print_ifdef_script (script);
+                  break;
+
+                case OUTPUT_SDIFF:
+                  print_sdiff_script (script);
+                  break;
+
+                default:
+                  abort ();
+                }
+
+              finish_output ();
+            }
+        }
 
       free (cmp->file[0].undiscarded);
 
       free (flag_space);
 
       for (f = 0; f < 2; f++)
-       {
-         free (cmp->file[f].equivs);
-         free (cmp->file[f].linbuf + cmp->file[f].linbuf_base);
-       }
+        {
+          free (cmp->file[f].equivs);
+          free (cmp->file[f].linbuf + cmp->file[f].linbuf_base);
+        }
 
       for (e = script; e; e = p)
-       {
-         p = e->link;
-         free (e);
-       }
+        {
+          p = e->link;
+          free (e);
+        }
 
       if (! ROBUST_OUTPUT_STYLE (output_style))
-       for (f = 0; f < 2; ++f)
-         if (cmp->file[f].missing_newline)
-           {
-             error (0, 0, "%s: %s\n",
-                    file_label[f] ? file_label[f] : cmp->file[f].name,
-                    _("No newline at end of file"));
-             changes = 2;
-           }
+        for (f = 0; f < 2; ++f)
+          if (cmp->file[f].missing_newline)
+            {
+              error (0, 0, "%s: %s\n",
+                     file_label[f] ? file_label[f] : cmp->file[f].name,
+                     _("No newline at end of file"));
+              changes = 2;
+            }
     }
 
   if (cmp->file[0].buffer != cmp->file[1].buffer)
index 2811392..9953d14 100644 (file)
--- a/src/cmp.c
+++ b/src/cmp.c
@@ -1,7 +1,7 @@
 /* GNU cmp - compare two files byte by byte
 
    Copyright (C) 1990-1996, 1998, 2001-2002, 2004, 2006-2007, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
 #include <version-etc.h>
 #include <xalloc.h>
 #include <binary-io.h>
+#include <xstdopen.h>
 #include <xstrtol.h>
 
 /* The official name of this program (e.g., no 'g' prefix).  */
@@ -74,8 +75,8 @@ static size_t buf_size;
 /* Initial prefix to ignore for each file.  */
 static off_t ignore_initial[2];
 
-/* Number of bytes to compare.  */
-static uintmax_t bytes = UINTMAX_MAX;
+/* Number of bytes to compare, or -1 if there is no limit.  */
+static intmax_t bytes = -1;
 
 /* Output format.  */
 static enum comparison_type
@@ -116,7 +117,7 @@ try_help (char const *reason_msgid, char const *operand)
   if (reason_msgid)
     error (0, 0, _(reason_msgid), operand);
   die (EXIT_TROUBLE, 0,
-        _("Try '%s --help' for more information."), program_name);
+         _("Try '%s --help' for more information."), program_name);
 }
 
 static char const valid_suffixes[] = "kKMGTPEZY0";
@@ -128,12 +129,12 @@ static char const valid_suffixes[] = "kKMGTPEZY0";
 static void
 specify_ignore_initial (int f, char **argptr, char delimiter)
 {
-  uintmax_t val;
+  intmax_t val;
   char const *arg = *argptr;
-  strtol_error e = xstrtoumax (arg, argptr, 0, &val, valid_suffixes);
-  if (! (e == LONGINT_OK
-        || (e == LONGINT_INVALID_SUFFIX_CHAR && **argptr == delimiter))
-      || TYPE_MAXIMUM (off_t) < val)
+  strtol_error e = xstrtoimax (arg, argptr, 0, &val, valid_suffixes);
+  if (! ((e == LONGINT_OK
+          || (e == LONGINT_INVALID_SUFFIX_CHAR && **argptr == delimiter))
+         && 0 <= val && val <= TYPE_MAXIMUM (off_t)))
     try_help ("invalid --ignore-initial value '%s'", arg);
   if (ignore_initial[f] < val)
     ignore_initial[f] = val;
@@ -176,7 +177,7 @@ usage (void)
   char const * const *p;
 
   printf (_("Usage: %s [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]\n"),
-         program_name);
+          program_name);
   printf ("%s\n", _("Compare two files byte by byte."));
   printf ("\n%s\n\n",
 _("The optional SKIP1 and SKIP2 specify the number of bytes to skip\n"
@@ -188,18 +189,18 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   for (p = option_help_msgid;  *p;  p++)
     printf ("  %s\n", _(*p));
   printf ("\n%s\n\n%s\n%s\n",
-         _("SKIP values may be followed by the following multiplicative suffixes:\n\
+          _("SKIP values may be followed by the following multiplicative suffixes:\n\
 kB 1000, K 1024, MB 1,000,000, M 1,048,576,\n\
 GB 1,000,000,000, G 1,073,741,824, and so on for T, P, E, Z, Y."),
-         _("If a FILE is '-' or missing, read standard input."),
-         _("Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."));
+          _("If a FILE is '-' or missing, read standard input."),
+          _("Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."));
   emit_bug_reporting_address ();
 }
 \f
 int
 main (int argc, char **argv)
 {
-  int c, f, exit_status;
+  int c, exit_status;
   size_t words_per_buffer;
 
   exit_failure = EXIT_TROUBLE;
@@ -209,57 +210,59 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
   c_stack_action (0);
+  xstdopen ();
 
   /* Parse command line options.  */
 
   while ((c = getopt_long (argc, argv, "bci:ln:sv", long_options, 0))
-        != -1)
+         != -1)
     switch (c)
       {
       case 'b':
       case 'c': /* 'c' is obsolescent as of diffutils 2.7.3 */
-       opt_print_bytes = true;
-       break;
+        opt_print_bytes = true;
+        break;
 
       case 'i':
-       specify_ignore_initial (0, &optarg, ':');
-       if (*optarg++ == ':')
-         specify_ignore_initial (1, &optarg, 0);
-       else if (ignore_initial[1] < ignore_initial[0])
-         ignore_initial[1] = ignore_initial[0];
-       break;
+        specify_ignore_initial (0, &optarg, ':');
+        if (*optarg++ == ':')
+          specify_ignore_initial (1, &optarg, 0);
+        else if (ignore_initial[1] < ignore_initial[0])
+          ignore_initial[1] = ignore_initial[0];
+        break;
 
       case 'l':
-       specify_comparison_type (type_all_diffs);
-       break;
+        specify_comparison_type (type_all_diffs);
+        break;
 
       case 'n':
-       {
-         uintmax_t n;
-         if (xstrtoumax (optarg, 0, 0, &n, valid_suffixes) != LONGINT_OK)
-           try_help ("invalid --bytes value '%s'", optarg);
-         if (n < bytes)
-           bytes = n;
-       }
-       break;
+        {
+          intmax_t n;
+          if (xstrtoimax (optarg, 0, 0, &n, valid_suffixes) != LONGINT_OK
+              || n < 0)
+            try_help ("invalid --bytes value '%s'", optarg);
+          if (! (0 <= bytes && bytes < n))
+            bytes = n;
+        }
+        break;
 
       case 's':
-       specify_comparison_type (type_status);
-       break;
+        specify_comparison_type (type_status);
+        break;
 
       case 'v':
-       version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
-                    AUTHORS, (char *) NULL);
-       check_stdout ();
-       return EXIT_SUCCESS;
+        version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
+                     AUTHORS, (char *) NULL);
+        check_stdout ();
+        return EXIT_SUCCESS;
 
       case HELP_OPTION:
-       usage ();
-       check_stdout ();
-       return EXIT_SUCCESS;
+        usage ();
+        check_stdout ();
+        return EXIT_SUCCESS;
 
       default:
-       try_help (0, 0);
+        try_help (0, 0);
       }
 
   if (optind == argc)
@@ -268,7 +271,7 @@ main (int argc, char **argv)
   file[0] = argv[optind++];
   file[1] = optind < argc ? argv[optind++] : "-";
 
-  for (f = 0; f < 2 && optind < argc; f++)
+  for (int f = 0; f < 2 && optind < argc; f++)
     {
       char *arg = argv[optind++];
       specify_ignore_initial (f, &arg, 0);
@@ -277,34 +280,30 @@ main (int argc, char **argv)
   if (optind < argc)
     try_help ("extra operand '%s'", argv[optind]);
 
-  for (f = 0; f < 2; f++)
+  for (int f = 0; f < 2; f++)
     {
-      /* If file[1] is "-", treat it first; this avoids a misdiagnostic if
-        stdin is closed and opening file[0] yields file descriptor 0.  */
-      int f1 = f ^ (STREQ (file[1], "-"));
-
       /* Two files with the same name and offset are identical.
-        But wait until we open the file once, for proper diagnostics.  */
+         But wait until we open the file once, for proper diagnostics.  */
       if (f && ignore_initial[0] == ignore_initial[1]
-         && file_name_cmp (file[0], file[1]) == 0)
-       return EXIT_SUCCESS;
-
-      if (STREQ (file[f1], "-"))
-       {
-         file_desc[f1] = STDIN_FILENO;
-         if (O_BINARY && ! isatty (STDIN_FILENO))
-           set_binary_mode (STDIN_FILENO, O_BINARY);
-       }
+          && file_name_cmp (file[0], file[1]) == 0)
+        return EXIT_SUCCESS;
+
+      if (STREQ (file[f], "-"))
+        {
+          file_desc[f] = STDIN_FILENO;
+          if (O_BINARY && ! isatty (STDIN_FILENO))
+            set_binary_mode (STDIN_FILENO, O_BINARY);
+        }
       else
-       file_desc[f1] = open (file[f1], O_RDONLY | O_BINARY, 0);
-
-      if (file_desc[f1] < 0 || fstat (file_desc[f1], stat_buf + f1) != 0)
-       {
-         if (file_desc[f1] < 0 && comparison_type == type_status)
-           exit (EXIT_TROUBLE);
-         else
-           die (EXIT_TROUBLE, errno, "%s", file[f1]);
-       }
+        file_desc[f] = open (file[f], O_RDONLY | O_BINARY, 0);
+
+      if (file_desc[f] < 0 || fstat (file_desc[f], stat_buf + f) != 0)
+        {
+          if (file_desc[f] < 0 && comparison_type == type_status)
+            exit (EXIT_TROUBLE);
+          else
+            die (EXIT_TROUBLE, errno, "%s", file[f]);
+        }
     }
 
   /* If the files are links to the same inode and have the same file position,
@@ -323,9 +322,9 @@ main (int argc, char **argv)
       struct stat outstat, nullstat;
 
       if (fstat (STDOUT_FILENO, &outstat) == 0
-         && stat (NULL_DEVICE, &nullstat) == 0
-         && 0 < same_file (&outstat, &nullstat))
-       comparison_type = type_no_stdout;
+          && stat (NULL_DEVICE, &nullstat) == 0
+          && 0 < same_file (&outstat, &nullstat))
+        comparison_type = type_no_stdout;
     }
 
   /* If only a return code is needed,
@@ -340,18 +339,18 @@ main (int argc, char **argv)
       off_t s0 = stat_buf[0].st_size - file_position (0);
       off_t s1 = stat_buf[1].st_size - file_position (1);
       if (s0 < 0)
-       s0 = 0;
+        s0 = 0;
       if (s1 < 0)
-       s1 = 0;
-      if (s0 != s1 && MIN (s0, s1) < bytes)
-       exit (EXIT_FAILURE);
+        s1 = 0;
+      if (s0 != s1 && (bytes < 0 || MIN (s0, s1) < bytes))
+        exit (EXIT_FAILURE);
     }
 
   /* Get the optimal block size of the files.  */
 
   buf_size = buffer_lcm (STAT_BLOCKSIZE (stat_buf[0]),
-                        STAT_BLOCKSIZE (stat_buf[1]),
-                        PTRDIFF_MAX - sizeof (word));
+                         STAT_BLOCKSIZE (stat_buf[1]),
+                         PTRDIFF_MAX - sizeof (word));
 
   /* Allocate word-aligned buffers, with space for sentinels at the end.  */
 
@@ -361,7 +360,7 @@ main (int argc, char **argv)
 
   exit_status = cmp ();
 
-  for (f = 0; f < 2; f++)
+  for (int f = 0; f < 2; f++)
     if (close (file_desc[f]) != 0)
       die (EXIT_TROUBLE, errno, "%s", file[f]);
   if (exit_status != EXIT_SUCCESS && comparison_type < type_no_stdout)
@@ -381,7 +380,7 @@ cmp (void)
   bool at_line_start = true;
   off_t line_number = 1;       /* Line number (1...) of difference. */
   off_t byte_number = 1;       /* Byte number (1...) of difference. */
-  uintmax_t remaining = bytes; /* Remaining number of bytes to compare.  */
+  intmax_t remaining = bytes;  /* Remaining bytes to compare, or -1.  */
   size_t read0, read1;         /* Number of bytes read from each file. */
   size_t first_diff;           /* Offset (0...) in buffers of 1st diff. */
   size_t smaller;              /* The lesser of 'read0' and 'read1'. */
@@ -395,207 +394,217 @@ cmp (void)
 
   if (comparison_type == type_all_diffs)
     {
-      off_t byte_number_max = MIN (bytes, TYPE_MAXIMUM (off_t));
+      off_t byte_number_max = (0 <= bytes && bytes <= TYPE_MAXIMUM (off_t)
+                              ? bytes : TYPE_MAXIMUM (off_t));
 
       for (f = 0; f < 2; f++)
-       if (S_ISREG (stat_buf[f].st_mode))
-         {
-           off_t file_bytes = stat_buf[f].st_size - file_position (f);
-           if (file_bytes < byte_number_max)
-             byte_number_max = file_bytes;
-         }
+        if (S_ISREG (stat_buf[f].st_mode))
+          {
+            off_t file_bytes = stat_buf[f].st_size - file_position (f);
+            if (file_bytes < byte_number_max)
+              byte_number_max = file_bytes;
+          }
 
       for (offset_width = 1; (byte_number_max /= 10) != 0; offset_width++)
-       continue;
+        continue;
     }
 
   for (f = 0; f < 2; f++)
     {
       off_t ig = ignore_initial[f];
       if (ig && file_position (f) == -1)
-       {
-         /* lseek failed; read and discard the ignored initial prefix.  */
-         do
-           {
-             size_t bytes_to_read = MIN (ig, buf_size);
-             size_t r = block_read (file_desc[f], buf0, bytes_to_read);
-             if (r != bytes_to_read)
-               {
-                 if (r == SIZE_MAX)
-                   die (EXIT_TROUBLE, errno, "%s", file[f]);
-                 break;
-               }
-             ig -= r;
-           }
-         while (ig);
-       }
+        {
+          /* lseek failed; read and discard the ignored initial prefix.  */
+          do
+            {
+              size_t bytes_to_read = MIN (ig, buf_size);
+              size_t r = block_read (file_desc[f], buf0, bytes_to_read);
+              if (r != bytes_to_read)
+                {
+                  if (r == SIZE_MAX)
+                    die (EXIT_TROUBLE, errno, "%s", file[f]);
+                  break;
+                }
+              ig -= r;
+            }
+          while (ig);
+        }
     }
 
   do
     {
       size_t bytes_to_read = buf_size;
 
-      if (remaining != UINTMAX_MAX)
-       {
-         if (remaining < bytes_to_read)
-           bytes_to_read = remaining;
-         remaining -= bytes_to_read;
-       }
+      if (0 <= remaining)
+        {
+          if (remaining < bytes_to_read)
+            bytes_to_read = remaining;
+          remaining -= bytes_to_read;
+        }
 
       read0 = block_read (file_desc[0], buf0, bytes_to_read);
       if (read0 == SIZE_MAX)
-       die (EXIT_TROUBLE, errno, "%s", file[0]);
+        die (EXIT_TROUBLE, errno, "%s", file[0]);
       read1 = block_read (file_desc[1], buf1, bytes_to_read);
       if (read1 == SIZE_MAX)
-       die (EXIT_TROUBLE, errno, "%s", file[1]);
+        die (EXIT_TROUBLE, errno, "%s", file[1]);
 
       smaller = MIN (read0, read1);
 
       /* Optimize the common case where the buffers are the same.  */
       if (memcmp (buf0, buf1, smaller) == 0)
-       first_diff = smaller;
+        first_diff = smaller;
       else
-       {
-         /* Insert sentinels for the block compare.  */
-         buf0[read0] = ~buf1[read0];
-         buf1[read1] = ~buf0[read1];
-
-         first_diff = block_compare (buffer0, buffer1);
-       }
+        {
+          /* Insert sentinels for the block compare.  */
+          if (read0 >= read1)
+            buf1[read0] = 0x55; /* arbitrary */
+          if (read1 >= read0)
+            buf0[read1] = 0x79; /* arbitrary and distinct from the above */
+          buf0[read0] = ~buf1[read0];
+          buf1[read1] = ~buf0[read1];
+          /* Ensure all bytes of a final word-read are initialized.  */
+          memset (buf0 + read0 + 1, 0,
+                  sizeof (word) - read0 % sizeof (word) - 1);
+          memset (buf1 + read1 + 1, 0,
+                  sizeof (word) - read1 % sizeof (word) - 1);
+
+          first_diff = block_compare (buffer0, buffer1);
+        }
 
       byte_number += first_diff;
       if (comparison_type == type_first_diff && first_diff != 0)
-       {
-         line_number += count_newlines (buf0, first_diff);
-         at_line_start = buf0[first_diff - 1] == '\n';
-       }
+        {
+          line_number += count_newlines (buf0, first_diff);
+          at_line_start = buf0[first_diff - 1] == '\n';
+        }
 
       if (first_diff < smaller)
-       {
-         switch (comparison_type)
-           {
-           case type_first_diff:
-             {
-               char byte_buf[INT_BUFSIZE_BOUND (off_t)];
-               char line_buf[INT_BUFSIZE_BOUND (off_t)];
-               char const *byte_num = offtostr (byte_number, byte_buf);
-               char const *line_num = offtostr (line_number, line_buf);
-               if (!opt_print_bytes)
-                 {
-                   /* See POSIX for this format.  This message is
-                      used only in the POSIX locale, so it need not
-                      be translated.  */
-                   static char const char_message[] =
-                     "%s %s differ: char %s, line %s\n";
-
-                   /* The POSIX rationale recommends using the word
-                      "byte" outside the POSIX locale.  Some gettext
-                      implementations translate even in the POSIX
-                      locale if certain other environment variables
-                      are set, so use "byte" if a translation is
-                      available, or if outside the POSIX locale.  */
-                   static char const byte_msgid[] =
-                     N_("%s %s differ: byte %s, line %s\n");
-                   char const *byte_message = _(byte_msgid);
-                   bool use_byte_message = (byte_message != byte_msgid
-                                            || hard_locale_LC_MESSAGES);
-
-                   printf (use_byte_message ? byte_message : char_message,
-                           file[0], file[1], byte_num, line_num);
-                 }
-               else
-                 {
-                   unsigned char c0 = buf0[first_diff];
-                   unsigned char c1 = buf1[first_diff];
-                   char s0[5];
-                   char s1[5];
-                   sprintc (s0, c0);
-                   sprintc (s1, c1);
-                   printf (_("%s %s differ: byte %s, line %s is %3o %s %3o %s\n"),
-                           file[0], file[1], byte_num, line_num,
-                           c0, s0, c1, s1);
-                 }
-             }
-             FALLTHROUGH;
-           case type_status:
-             return EXIT_FAILURE;
-
-           case type_all_diffs:
-             do
-               {
-                 unsigned char c0 = buf0[first_diff];
-                 unsigned char c1 = buf1[first_diff];
-                 if (c0 != c1)
-                   {
-                     char byte_buf[INT_BUFSIZE_BOUND (off_t)];
-                     char const *byte_num = offtostr (byte_number, byte_buf);
-                     if (!opt_print_bytes)
-                       {
-                         /* See POSIX for this format.  */
-                         printf ("%*s %3o %3o\n",
-                                 offset_width, byte_num, c0, c1);
-                       }
-                     else
-                       {
-                         char s0[5];
-                         char s1[5];
-                         sprintc (s0, c0);
-                         sprintc (s1, c1);
-                         printf ("%*s %3o %-4s %3o %s\n",
-                                 offset_width, byte_num, c0, s0, c1, s1);
-                       }
-                   }
-                 byte_number++;
-                 first_diff++;
-               }
-             while (first_diff < smaller);
-             differing = -1;
-             break;
-
-           case type_no_stdout:
-             differing = 1;
-             break;
-           }
-       }
+        {
+          switch (comparison_type)
+            {
+            case type_first_diff:
+              {
+                char byte_buf[INT_BUFSIZE_BOUND (off_t)];
+                char line_buf[INT_BUFSIZE_BOUND (off_t)];
+                char const *byte_num = offtostr (byte_number, byte_buf);
+                char const *line_num = offtostr (line_number, line_buf);
+                if (!opt_print_bytes)
+                  {
+                    /* See POSIX for this format.  This message is
+                       used only in the POSIX locale, so it need not
+                       be translated.  */
+                    static char const char_message[] =
+                      "%s %s differ: char %s, line %s\n";
+
+                    /* The POSIX rationale recommends using the word
+                       "byte" outside the POSIX locale.  Some gettext
+                       implementations translate even in the POSIX
+                       locale if certain other environment variables
+                       are set, so use "byte" if a translation is
+                       available, or if outside the POSIX locale.  */
+                    static char const byte_msgid[] =
+                      N_("%s %s differ: byte %s, line %s\n");
+                    char const *byte_message = _(byte_msgid);
+                    bool use_byte_message = (byte_message != byte_msgid
+                                             || hard_locale_LC_MESSAGES);
+
+                    printf (use_byte_message ? byte_message : char_message,
+                            file[0], file[1], byte_num, line_num);
+                  }
+                else
+                  {
+                    unsigned char c0 = buf0[first_diff];
+                    unsigned char c1 = buf1[first_diff];
+                    char s0[5];
+                    char s1[5];
+                    sprintc (s0, c0);
+                    sprintc (s1, c1);
+                    printf (_("%s %s differ: byte %s, line %s is %3o %s %3o %s\n"),
+                            file[0], file[1], byte_num, line_num,
+                            c0, s0, c1, s1);
+                  }
+              }
+              FALLTHROUGH;
+            case type_status:
+              return EXIT_FAILURE;
+
+            case type_all_diffs:
+              do
+                {
+                  unsigned char c0 = buf0[first_diff];
+                  unsigned char c1 = buf1[first_diff];
+                  if (c0 != c1)
+                    {
+                      char byte_buf[INT_BUFSIZE_BOUND (off_t)];
+                      char const *byte_num = offtostr (byte_number, byte_buf);
+                      if (!opt_print_bytes)
+                        {
+                          /* See POSIX for this format.  */
+                          printf ("%*s %3o %3o\n",
+                                  offset_width, byte_num, c0, c1);
+                        }
+                      else
+                        {
+                          char s0[5];
+                          char s1[5];
+                          sprintc (s0, c0);
+                          sprintc (s1, c1);
+                          printf ("%*s %3o %-4s %3o %s\n",
+                                  offset_width, byte_num, c0, s0, c1, s1);
+                        }
+                    }
+                  byte_number++;
+                  first_diff++;
+                }
+              while (first_diff < smaller);
+              differing = -1;
+              break;
+
+            case type_no_stdout:
+              differing = 1;
+              break;
+            }
+        }
 
       if (read0 != read1)
-       {
-         if (differing <= 0 && comparison_type != type_status)
-           {
-             char const *shorter_file = file[read1 < read0];
-
-             /* POSIX says that each of these format strings must be
-                "cmp: EOF on %s", optionally followed by a blank and
-                extra text sans newline, then terminated by "\n".  */
-             if (byte_number == 1)
-               fprintf (stderr, _("cmp: EOF on %s which is empty\n"),
-                        shorter_file);
-             else
-               {
-                 char byte_buf[INT_BUFSIZE_BOUND (off_t)];
-                 char const *byte_num = offtostr (byte_number - 1, byte_buf);
-
-                 if (comparison_type == type_first_diff)
-                   {
-                     char line_buf[INT_BUFSIZE_BOUND (off_t)];
-                     char const *line_num
-                       = offtostr (line_number - at_line_start, line_buf);
-                     fprintf (stderr,
-                              (at_line_start
-                               ? _("cmp: EOF on %s after byte %s, line %s\n")
-                               : _("cmp: EOF on %s after byte %s,"
-                                   " in line %s\n")),
-                              shorter_file, byte_num, line_num);
-                   }
-                 else
-                   fprintf (stderr,
-                            _("cmp: EOF on %s after byte %s\n"),
-                            shorter_file, byte_num);
-               }
-           }
-
-         return EXIT_FAILURE;
-       }
+        {
+          if (differing <= 0 && comparison_type != type_status)
+            {
+              char const *shorter_file = file[read1 < read0];
+
+              /* POSIX says that each of these format strings must be
+                 "cmp: EOF on %s", optionally followed by a blank and
+                 extra text sans newline, then terminated by "\n".  */
+              if (byte_number == 1)
+                fprintf (stderr, _("cmp: EOF on %s which is empty\n"),
+                         shorter_file);
+              else
+                {
+                  char byte_buf[INT_BUFSIZE_BOUND (off_t)];
+                  char const *byte_num = offtostr (byte_number - 1, byte_buf);
+
+                  if (comparison_type == type_first_diff)
+                    {
+                      char line_buf[INT_BUFSIZE_BOUND (off_t)];
+                      char const *line_num
+                        = offtostr (line_number - at_line_start, line_buf);
+                      fprintf (stderr,
+                               (at_line_start
+                                ? _("cmp: EOF on %s after byte %s, line %s\n")
+                                : _("cmp: EOF on %s after byte %s,"
+                                    " in line %s\n")),
+                               shorter_file, byte_num, line_num);
+                    }
+                  else
+                    fprintf (stderr,
+                             _("cmp: EOF on %s after byte %s\n"),
+                             shorter_file, byte_num);
+                }
+            }
+
+          return EXIT_FAILURE;
+        }
     }
   while (differing <= 0 && read0 == buf_size);
 
@@ -656,21 +665,21 @@ sprintc (char *buf, unsigned char c)
   if (! isprint (c))
     {
       if (c >= 128)
-       {
-         *buf++ = 'M';
-         *buf++ = '-';
-         c -= 128;
-       }
+        {
+          *buf++ = 'M';
+          *buf++ = '-';
+          c -= 128;
+        }
       if (c < 32)
-       {
-         *buf++ = '^';
-         c += 64;
-       }
+        {
+          *buf++ = '^';
+          c += 64;
+        }
       else if (c == 127)
-       {
-         *buf++ = '^';
-         c = '?';
-       }
+        {
+          *buf++ = '^';
+          c = '?';
+        }
     }
 
   *buf++ = c;
index d1930d9..c65f427 100644 (file)
@@ -1,7 +1,7 @@
 /* Context-format output routines for GNU DIFF.
 
    Copyright (C) 1988-1989, 1991-1995, 1998, 2001-2002, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -39,9 +39,9 @@ static lin find_function_last_match;
 
 static void
 print_context_label (char const *mark,
-                    struct file_data *inf,
-                    char const *name,
-                    char const *label)
+                     struct file_data *inf,
+                     char const *name,
+                     char const *label)
 {
   set_color_context (HEADER_CONTEXT);
   if (label)
@@ -49,29 +49,29 @@ print_context_label (char const *mark,
   else
     {
       char buf[MAX (INT_STRLEN_BOUND (int) + 32,
-                   INT_STRLEN_BOUND (time_t) + 11)];
+                    INT_STRLEN_BOUND (time_t) + 11)];
       struct tm const *tm = localtime (&inf->stat.st_mtime);
       int nsec = get_stat_mtime_ns (&inf->stat);
       if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)))
-       {
-         verify (TYPE_IS_INTEGER (time_t));
-         if (LONG_MIN <= TYPE_MINIMUM (time_t)
-             && TYPE_MAXIMUM (time_t) <= LONG_MAX)
-           {
-             long int sec = inf->stat.st_mtime;
-             sprintf (buf, "%ld.%.9d", sec, nsec);
-           }
-         else if (TYPE_MAXIMUM (time_t) <= INTMAX_MAX)
-           {
-             intmax_t sec = inf->stat.st_mtime;
-             sprintf (buf, "%"PRIdMAX".%.9d", sec, nsec);
-           }
-         else
-           {
-             uintmax_t sec = inf->stat.st_mtime;
-             sprintf (buf, "%"PRIuMAX".%.9d", sec, nsec);
-           }
-       }
+        {
+          verify (TYPE_IS_INTEGER (time_t));
+          if (LONG_MIN <= TYPE_MINIMUM (time_t)
+              && TYPE_MAXIMUM (time_t) <= LONG_MAX)
+            {
+              long int sec = inf->stat.st_mtime;
+              sprintf (buf, "%ld.%.9d", sec, nsec);
+            }
+          else if (TYPE_MAXIMUM (time_t) <= INTMAX_MAX)
+            {
+              intmax_t sec = inf->stat.st_mtime;
+              sprintf (buf, "%"PRIdMAX".%.9d", sec, nsec);
+            }
+          else
+            {
+              uintmax_t sec = inf->stat.st_mtime;
+              sprintf (buf, "%"PRIuMAX".%.9d", sec, nsec);
+            }
+        }
       fprintf (outfile, "%s %s\t%s", mark, name, buf);
     }
   set_color_context (RESET_CONTEXT);
@@ -106,7 +106,7 @@ print_context_script (struct change *script, bool unidiff)
     {
       struct change *e;
       for (e = script; e; e = e->link)
-       e->ignore = false;
+        e->ignore = false;
     }
 
   find_function_last_search = - files[0].prefix_lines;
@@ -221,30 +221,30 @@ pr_context_hunk (struct change *hunk)
       struct change *next = hunk;
 
       for (i = first0; i <= last0; i++)
-       {
-         set_color_context (DELETE_CONTEXT);
+        {
+          set_color_context (DELETE_CONTEXT);
 
-         /* Skip past changes that apply (in file 0)
-            only to lines before line I.  */
+          /* Skip past changes that apply (in file 0)
+             only to lines before line I.  */
 
-         while (next && next->line0 + next->deleted <= i)
-           next = next->link;
+          while (next && next->line0 + next->deleted <= i)
+            next = next->link;
 
-         /* Compute the marking for line I.  */
+          /* Compute the marking for line I.  */
 
-         prefix = " ";
-         if (next && next->line0 <= i)
+          prefix = " ";
+          if (next && next->line0 <= i)
             {
               /* The change NEXT covers this line.
                  If lines were inserted here in file 1, this is "changed".
                  Otherwise it is "deleted".  */
               prefix = (next->inserted > 0 ? "!" : "-");
             }
-         print_1_line_nl (prefix, &files[0].linbuf[i], true);
+          print_1_line_nl (prefix, &files[0].linbuf[i], true);
           set_color_context (RESET_CONTEXT);
           if (files[0].linbuf[i + 1][-1] == '\n')
             putc ('\n', out);
-       }
+        }
     }
 
   set_color_context (LINE_NUMBER_CONTEXT);
@@ -259,30 +259,30 @@ pr_context_hunk (struct change *hunk)
       struct change *next = hunk;
 
       for (i = first1; i <= last1; i++)
-       {
-         set_color_context (ADD_CONTEXT);
+        {
+          set_color_context (ADD_CONTEXT);
 
-         /* Skip past changes that apply (in file 1)
-            only to lines before line I.  */
+          /* Skip past changes that apply (in file 1)
+             only to lines before line I.  */
 
-         while (next && next->line1 + next->inserted <= i)
-           next = next->link;
+          while (next && next->line1 + next->inserted <= i)
+            next = next->link;
 
-         /* Compute the marking for line I.  */
+          /* Compute the marking for line I.  */
 
-         prefix = " ";
-         if (next && next->line1 <= i)
+          prefix = " ";
+          if (next && next->line1 <= i)
             {
               /* The change NEXT covers this line.
                  If lines were deleted here in file 0, this is "changed".
                  Otherwise it is "inserted".  */
               prefix = (next->deleted > 0 ? "!" : "+");
             }
-         print_1_line_nl (prefix, &files[1].linbuf[i], true);
+          print_1_line_nl (prefix, &files[1].linbuf[i], true);
           set_color_context (RESET_CONTEXT);
           if (files[1].linbuf[i + 1][-1] == '\n')
             putc ('\n', out);
-       }
+        }
     }
 }
 \f
@@ -375,57 +375,57 @@ pr_unidiff_hunk (struct change *hunk)
       /* If the line isn't a difference, output the context from file 0. */
 
       if (!next || i < next->line0)
-       {
-         char const *const *line = &files[0].linbuf[i++];
-         if (! (suppress_blank_empty && **line == '\n'))
-           putc (initial_tab ? '\t' : ' ', out);
-         print_1_line (NULL, line);
-         j++;
-       }
+        {
+          char const *const *line = &files[0].linbuf[i++];
+          if (! (suppress_blank_empty && **line == '\n'))
+            putc (initial_tab ? '\t' : ' ', out);
+          print_1_line (NULL, line);
+          j++;
+        }
       else
-       {
-         /* For each difference, first output the deleted part. */
+        {
+          /* For each difference, first output the deleted part. */
 
-         k = next->deleted;
+          k = next->deleted;
 
-         while (k--)
-           {
-             char const * const *line = &files[0].linbuf[i++];
-             set_color_context (DELETE_CONTEXT);
-             putc ('-', out);
-             if (initial_tab && ! (suppress_blank_empty && **line == '\n'))
-               putc ('\t', out);
-             print_1_line_nl (NULL, line, true);
+          while (k--)
+            {
+              char const * const *line = &files[0].linbuf[i++];
+              set_color_context (DELETE_CONTEXT);
+              putc ('-', out);
+              if (initial_tab && ! (suppress_blank_empty && **line == '\n'))
+                putc ('\t', out);
+              print_1_line_nl (NULL, line, true);
 
-             set_color_context (RESET_CONTEXT);
+              set_color_context (RESET_CONTEXT);
 
               if (line[1][-1] == '\n')
                 putc ('\n', out);
-           }
+            }
 
-         /* Then output the inserted part. */
+          /* Then output the inserted part. */
 
-         k = next->inserted;
+          k = next->inserted;
 
           while (k--)
-           {
-             char const * const *line = &files[1].linbuf[j++];
-             set_color_context (ADD_CONTEXT);
-             putc ('+', out);
-             if (initial_tab && ! (suppress_blank_empty && **line == '\n'))
-               putc ('\t', out);
-             print_1_line_nl (NULL, line, true);
+            {
+              char const * const *line = &files[1].linbuf[j++];
+              set_color_context (ADD_CONTEXT);
+              putc ('+', out);
+              if (initial_tab && ! (suppress_blank_empty && **line == '\n'))
+                putc ('\t', out);
+              print_1_line_nl (NULL, line, true);
 
               set_color_context (RESET_CONTEXT);
 
               if (line[1][-1] == '\n')
                 putc ('\n', out);
-           }
+            }
 
-         /* We're done with this hunk, so on to the next! */
+          /* We're done with this hunk, so on to the next! */
 
-         next = next->link;
-       }
+          next = next->link;
+        }
     }
 }
 \f
@@ -454,16 +454,16 @@ find_hunk (struct change *start)
       prev = start;
       start = start->link;
       thresh = (start && start->ignore
-               ? ignorable_threshold
-               : non_ignorable_threshold);
+                ? ignorable_threshold
+                : non_ignorable_threshold);
       /* It is not supposed to matter which file we check in the end-test.
-        If it would matter, crash.  */
+         If it would matter, crash.  */
       if (start && start->line0 - top0 != start->line1 - top1)
-       abort ();
+        abort ();
     } while (start
-            /* Keep going if less than THRESH lines
-               elapse before the affected line.  */
-            && start->line0 - top0 < thresh);
+             /* Keep going if less than THRESH lines
+                elapse before the affected line.  */
+             && start->line0 - top0 < thresh);
 
   return prev;
 }
@@ -485,7 +485,7 @@ mark_ignorable (struct change *script)
 
       /* Determine whether this change is ignorable.  */
       script->ignore = ! analyze_hunk (script,
-                                      &first0, &last0, &first1, &last1);
+                                       &first0, &last0, &first1, &last1);
 
       /* Reconnect the chain as before.  */
       script->link = next;
@@ -516,10 +516,10 @@ find_function (char const * const *linbuf, lin linenum)
       int len = MIN (linelen, INT_MAX);
 
       if (0 <= re_search (&function_regexp, line, len, 0, len, NULL))
-       {
-         find_function_last_match = i;
-         return line;
-       }
+        {
+          find_function_last_match = i;
+          return line;
+        }
     }
   /* If we search back to where we started searching the previous time,
      find the line we found last time.  */
index f56945f..5ab0512 100644 (file)
--- a/src/die.h
+++ b/src/die.h
@@ -1,5 +1,5 @@
 /* Report an error and exit.
-   Copyright 2016-2018 Free Software Foundation, Inc.
+   Copyright 2016-2021 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e2eb324..9938daa 100644 (file)
@@ -1,7 +1,7 @@
 /* GNU diff - compare files line by line
 
    Copyright (C) 1988-1989, 1992-1994, 1996, 1998, 2001-2002, 2004, 2006-2007,
-   2009-2013, 2015-2018 Free Software Foundation, Inc.
+   2009-2013, 2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -41,6 +41,7 @@
 #include <version-etc.h>
 #include <xalloc.h>
 #include <xreadlink.h>
+#include <xstdopen.h>
 #include <binary-io.h>
 
 /* The official name of this program (e.g., no 'g' prefix).  */
@@ -281,7 +282,7 @@ main (int argc, char **argv)
   bool show_c_function = false;
   char const *from_file = NULL;
   char const *to_file = NULL;
-  uintmax_t numval;
+  intmax_t numval;
   char *numend;
 
   /* Do our initializations.  */
@@ -297,364 +298,365 @@ main (int argc, char **argv)
   re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
   excluded = new_exclude ();
   presume_output_tty = false;
+  xstdopen ();
 
   /* Decode the options.  */
 
   while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
     {
       switch (c)
-       {
-       case 0:
-         break;
-
-       case '0':
-       case '1':
-       case '2':
-       case '3':
-       case '4':
-       case '5':
-       case '6':
-       case '7':
-       case '8':
-       case '9':
-         ocontext = (! ISDIGIT (prev)
-                     ? c - '0'
-                     : (ocontext - (c - '0' <= CONTEXT_MAX % 10)
-                        < CONTEXT_MAX / 10)
-                     ? 10 * ocontext + (c - '0')
-                     : CONTEXT_MAX);
-         break;
-
-       case 'a':
-         text = true;
-         break;
-
-       case 'b':
-         if (ignore_white_space < IGNORE_SPACE_CHANGE)
-           ignore_white_space = IGNORE_SPACE_CHANGE;
-         break;
-
-       case 'Z':
-         if (ignore_white_space < IGNORE_SPACE_CHANGE)
-           ignore_white_space |= IGNORE_TRAILING_SPACE;
-         break;
-
-       case 'B':
-         ignore_blank_lines = true;
-         break;
-
-       case 'C':
-       case 'U':
-         {
-           if (optarg)
-             {
-               numval = strtoumax (optarg, &numend, 10);
-               if (*numend)
-                 try_help ("invalid context length '%s'", optarg);
-               if (CONTEXT_MAX < numval)
-                 numval = CONTEXT_MAX;
-             }
-           else
-             numval = 3;
-
-           specify_style (c == 'U' ? OUTPUT_UNIFIED : OUTPUT_CONTEXT);
-           if (context < numval)
-             context = numval;
-           explicit_context = true;
-         }
-         break;
-
-       case 'c':
-         specify_style (OUTPUT_CONTEXT);
-         if (context < 3)
-           context = 3;
-         break;
-
-       case 'd':
-         minimal = true;
-         break;
-
-       case 'D':
-         specify_style (OUTPUT_IFDEF);
-         {
-           static char const C_ifdef_group_formats[] =
-             "%%=%c#ifndef %s\n%%<#endif /* ! %s */\n%c#ifdef %s\n%%>#endif /* %s */\n%c#ifndef %s\n%%<#else /* %s */\n%%>#endif /* %s */\n";
-           char *b = xmalloc (sizeof C_ifdef_group_formats
-                              + 7 * strlen (optarg) - 14 /* 7*"%s" */
-                              - 8 /* 5*"%%" + 3*"%c" */);
-           sprintf (b, C_ifdef_group_formats,
-                    0,
-                    optarg, optarg, 0,
-                    optarg, optarg, 0,
-                    optarg, optarg, optarg);
-           for (i = 0; i < sizeof group_format / sizeof group_format[0]; i++)
-             {
-               specify_value (&group_format[i], b, "-D");
-               b += strlen (b) + 1;
-             }
-         }
-         break;
-
-       case 'e':
-         specify_style (OUTPUT_ED);
-         break;
-
-       case 'E':
-         if (ignore_white_space < IGNORE_SPACE_CHANGE)
-           ignore_white_space |= IGNORE_TAB_EXPANSION;
-         break;
-
-       case 'f':
-         specify_style (OUTPUT_FORWARD_ED);
-         break;
-
-       case 'F':
-         add_regexp (&function_regexp_list, optarg);
-         break;
-
-       case 'h':
-         /* Split the files into chunks for faster processing.
-            Usually does not change the result.
-
-            This currently has no effect.  */
-         break;
-
-       case 'H':
-         speed_large_files = true;
-         break;
-
-       case 'i':
-         ignore_case = true;
-         break;
-
-       case 'I':
-         add_regexp (&ignore_regexp_list, optarg);
-         break;
-
-       case 'l':
-         if (!pr_program[0])
-           try_help ("pagination not supported on this host", NULL);
-         paginate = true;
+        {
+        case 0:
+          break;
+
+        case '0':
+        case '1':
+        case '2':
+        case '3':
+        case '4':
+        case '5':
+        case '6':
+        case '7':
+        case '8':
+        case '9':
+          ocontext = (! ISDIGIT (prev)
+                      ? c - '0'
+                      : (ocontext - (c - '0' <= CONTEXT_MAX % 10)
+                         < CONTEXT_MAX / 10)
+                      ? 10 * ocontext + (c - '0')
+                      : CONTEXT_MAX);
+          break;
+
+        case 'a':
+          text = true;
+          break;
+
+        case 'b':
+          if (ignore_white_space < IGNORE_SPACE_CHANGE)
+            ignore_white_space = IGNORE_SPACE_CHANGE;
+          break;
+
+        case 'Z':
+          if (ignore_white_space < IGNORE_SPACE_CHANGE)
+            ignore_white_space |= IGNORE_TRAILING_SPACE;
+          break;
+
+        case 'B':
+          ignore_blank_lines = true;
+          break;
+
+        case 'C':
+        case 'U':
+          {
+            if (optarg)
+              {
+                numval = strtoimax (optarg, &numend, 10);
+                if (*numend || numval < 0)
+                  try_help ("invalid context length '%s'", optarg);
+                if (CONTEXT_MAX < numval)
+                  numval = CONTEXT_MAX;
+              }
+            else
+              numval = 3;
+
+            specify_style (c == 'U' ? OUTPUT_UNIFIED : OUTPUT_CONTEXT);
+            if (context < numval)
+              context = numval;
+            explicit_context = true;
+          }
+          break;
+
+        case 'c':
+          specify_style (OUTPUT_CONTEXT);
+          if (context < 3)
+            context = 3;
+          break;
+
+        case 'd':
+          minimal = true;
+          break;
+
+        case 'D':
+          specify_style (OUTPUT_IFDEF);
+          {
+            static char const C_ifdef_group_formats[] =
+              "%%=%c#ifndef %s\n%%<#endif /* ! %s */\n%c#ifdef %s\n%%>#endif /* %s */\n%c#ifndef %s\n%%<#else /* %s */\n%%>#endif /* %s */\n";
+            char *b = xmalloc (sizeof C_ifdef_group_formats
+                               + 7 * strlen (optarg) - 14 /* 7*"%s" */
+                               - 8 /* 5*"%%" + 3*"%c" */);
+            sprintf (b, C_ifdef_group_formats,
+                     0,
+                     optarg, optarg, 0,
+                     optarg, optarg, 0,
+                     optarg, optarg, optarg);
+            for (i = 0; i < sizeof group_format / sizeof group_format[0]; i++)
+              {
+                specify_value (&group_format[i], b, "-D");
+                b += strlen (b) + 1;
+              }
+          }
+          break;
+
+        case 'e':
+          specify_style (OUTPUT_ED);
+          break;
+
+        case 'E':
+          if (ignore_white_space < IGNORE_SPACE_CHANGE)
+            ignore_white_space |= IGNORE_TAB_EXPANSION;
+          break;
+
+        case 'f':
+          specify_style (OUTPUT_FORWARD_ED);
+          break;
+
+        case 'F':
+          add_regexp (&function_regexp_list, optarg);
+          break;
+
+        case 'h':
+          /* Split the files into chunks for faster processing.
+             Usually does not change the result.
+
+             This currently has no effect.  */
+          break;
+
+        case 'H':
+          speed_large_files = true;
+          break;
+
+        case 'i':
+          ignore_case = true;
+          break;
+
+        case 'I':
+          add_regexp (&ignore_regexp_list, optarg);
+          break;
+
+        case 'l':
+          if (!pr_program[0])
+            try_help ("pagination not supported on this host", NULL);
+          paginate = true;
 #ifdef SIGCHLD
-         /* Pagination requires forking and waiting, and
-            System V fork+wait does not work if SIGCHLD is ignored.  */
-         signal (SIGCHLD, SIG_DFL);
+          /* Pagination requires forking and waiting, and
+             System V fork+wait does not work if SIGCHLD is ignored.  */
+          signal (SIGCHLD, SIG_DFL);
 #endif
-         break;
-
-       case 'L':
-         if (!file_label[0])
-           file_label[0] = optarg;
-         else if (!file_label[1])
-           file_label[1] = optarg;
-         else
-           fatal ("too many file label options");
-         break;
-
-       case 'n':
-         specify_style (OUTPUT_RCS);
-         break;
-
-       case 'N':
-         new_file = true;
-         break;
-
-       case 'p':
-         show_c_function = true;
-         add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
-         break;
-
-       case 'P':
-         unidirectional_new_file = true;
-         break;
-
-       case 'q':
-         brief = true;
-         break;
-
-       case 'r':
-         recursive = true;
-         break;
-
-       case 's':
-         report_identical_files = true;
-         break;
-
-       case 'S':
-         specify_value (&starting_file, optarg, "-S");
-         break;
-
-       case 't':
-         expand_tabs = true;
-         break;
-
-       case 'T':
-         initial_tab = true;
-         break;
-
-       case 'u':
-         specify_style (OUTPUT_UNIFIED);
-         if (context < 3)
-           context = 3;
-         break;
-
-       case 'v':
-         version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
-                      AUTHORS, (char *) NULL);
-         check_stdout ();
-         return EXIT_SUCCESS;
-
-       case 'w':
-         ignore_white_space = IGNORE_ALL_SPACE;
-         break;
-
-       case 'x':
-         add_exclude (excluded, optarg, exclude_options ());
-         break;
-
-       case 'X':
-         if (add_exclude_file (add_exclude, excluded, optarg,
-                               exclude_options (), '\n'))
-           pfatal_with_name (optarg);
-         break;
-
-       case 'y':
-         specify_style (OUTPUT_SDIFF);
-         break;
-
-       case 'W':
-         numval = strtoumax (optarg, &numend, 10);
-         if (! (0 < numval && numval <= SIZE_MAX) || *numend)
-           try_help ("invalid width '%s'", optarg);
-         if (width != numval)
-           {
-             if (width)
-               fatal ("conflicting width options");
-             width = numval;
-           }
-         break;
-
-       case BINARY_OPTION:
+          break;
+
+        case 'L':
+          if (!file_label[0])
+            file_label[0] = optarg;
+          else if (!file_label[1])
+            file_label[1] = optarg;
+          else
+            fatal ("too many file label options");
+          break;
+
+        case 'n':
+          specify_style (OUTPUT_RCS);
+          break;
+
+        case 'N':
+          new_file = true;
+          break;
+
+        case 'p':
+          show_c_function = true;
+          add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
+          break;
+
+        case 'P':
+          unidirectional_new_file = true;
+          break;
+
+        case 'q':
+          brief = true;
+          break;
+
+        case 'r':
+          recursive = true;
+          break;
+
+        case 's':
+          report_identical_files = true;
+          break;
+
+        case 'S':
+          specify_value (&starting_file, optarg, "-S");
+          break;
+
+        case 't':
+          expand_tabs = true;
+          break;
+
+        case 'T':
+          initial_tab = true;
+          break;
+
+        case 'u':
+          specify_style (OUTPUT_UNIFIED);
+          if (context < 3)
+            context = 3;
+          break;
+
+        case 'v':
+          version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
+                       AUTHORS, (char *) NULL);
+          check_stdout ();
+          return EXIT_SUCCESS;
+
+        case 'w':
+          ignore_white_space = IGNORE_ALL_SPACE;
+          break;
+
+        case 'x':
+          add_exclude (excluded, optarg, exclude_options ());
+          break;
+
+        case 'X':
+          if (add_exclude_file (add_exclude, excluded, optarg,
+                                exclude_options (), '\n'))
+            pfatal_with_name (optarg);
+          break;
+
+        case 'y':
+          specify_style (OUTPUT_SDIFF);
+          break;
+
+        case 'W':
+          numval = strtoimax (optarg, &numend, 10);
+          if (! (0 < numval && numval <= SIZE_MAX) || *numend)
+            try_help ("invalid width '%s'", optarg);
+          if (width != numval)
+            {
+              if (width)
+                fatal ("conflicting width options");
+              width = numval;
+            }
+          break;
+
+        case BINARY_OPTION:
 #if O_BINARY
-         binary = true;
-         if (! isatty (STDOUT_FILENO))
-           set_binary_mode (STDOUT_FILENO, O_BINARY);
+          binary = true;
+          if (! isatty (STDOUT_FILENO))
+            set_binary_mode (STDOUT_FILENO, O_BINARY);
 #endif
-         break;
-
-       case FROM_FILE_OPTION:
-         specify_value (&from_file, optarg, "--from-file");
-         break;
-
-       case HELP_OPTION:
-         usage ();
-         check_stdout ();
-         return EXIT_SUCCESS;
-
-       case HORIZON_LINES_OPTION:
-         numval = strtoumax (optarg, &numend, 10);
-         if (*numend)
-           try_help ("invalid horizon length '%s'", optarg);
-         horizon_lines = MAX (horizon_lines, MIN (numval, LIN_MAX));
-         break;
-
-       case IGNORE_FILE_NAME_CASE_OPTION:
-         ignore_file_name_case = true;
-         break;
-
-       case INHIBIT_HUNK_MERGE_OPTION:
-         /* This option is obsolete, but accept it for backward
+          break;
+
+        case FROM_FILE_OPTION:
+          specify_value (&from_file, optarg, "--from-file");
+          break;
+
+        case HELP_OPTION:
+          usage ();
+          check_stdout ();
+          return EXIT_SUCCESS;
+
+        case HORIZON_LINES_OPTION:
+          numval = strtoimax (optarg, &numend, 10);
+          if (*numend || numval < 0)
+            try_help ("invalid horizon length '%s'", optarg);
+          horizon_lines = MAX (horizon_lines, MIN (numval, LIN_MAX));
+          break;
+
+        case IGNORE_FILE_NAME_CASE_OPTION:
+          ignore_file_name_case = true;
+          break;
+
+        case INHIBIT_HUNK_MERGE_OPTION:
+          /* This option is obsolete, but accept it for backward
              compatibility.  */
-         break;
-
-       case LEFT_COLUMN_OPTION:
-         left_column = true;
-         break;
-
-       case LINE_FORMAT_OPTION:
-         specify_style (OUTPUT_IFDEF);
-         for (i = 0; i < sizeof line_format / sizeof line_format[0]; i++)
-           specify_value (&line_format[i], optarg, "--line-format");
-         break;
-
-       case NO_DEREFERENCE_OPTION:
-         no_dereference_symlinks = true;
-         break;
-
-       case NO_IGNORE_FILE_NAME_CASE_OPTION:
-         ignore_file_name_case = false;
-         break;
-
-       case NORMAL_OPTION:
-         specify_style (OUTPUT_NORMAL);
-         break;
-
-       case SDIFF_MERGE_ASSIST_OPTION:
-         specify_style (OUTPUT_SDIFF);
-         sdiff_merge_assist = true;
-         break;
-
-       case STRIP_TRAILING_CR_OPTION:
-         strip_trailing_cr = true;
-         break;
-
-       case SUPPRESS_BLANK_EMPTY_OPTION:
-         suppress_blank_empty = true;
-         break;
-
-       case SUPPRESS_COMMON_LINES_OPTION:
-         suppress_common_lines = true;
-         break;
-
-       case TABSIZE_OPTION:
-         numval = strtoumax (optarg, &numend, 10);
-         if (! (0 < numval && numval <= SIZE_MAX - GUTTER_WIDTH_MINIMUM)
-             || *numend)
-           try_help ("invalid tabsize '%s'", optarg);
-         if (tabsize != numval)
-           {
-             if (tabsize)
-               fatal ("conflicting tabsize options");
-             tabsize = numval;
-           }
-         break;
-
-       case TO_FILE_OPTION:
-         specify_value (&to_file, optarg, "--to-file");
-         break;
-
-       case UNCHANGED_LINE_FORMAT_OPTION:
-       case OLD_LINE_FORMAT_OPTION:
-       case NEW_LINE_FORMAT_OPTION:
-         specify_style (OUTPUT_IFDEF);
-         c -= UNCHANGED_LINE_FORMAT_OPTION;
-         specify_value (&line_format[c], optarg, line_format_option[c]);
-         break;
-
-       case UNCHANGED_GROUP_FORMAT_OPTION:
-       case OLD_GROUP_FORMAT_OPTION:
-       case NEW_GROUP_FORMAT_OPTION:
-       case CHANGED_GROUP_FORMAT_OPTION:
-         specify_style (OUTPUT_IFDEF);
-         c -= UNCHANGED_GROUP_FORMAT_OPTION;
-         specify_value (&group_format[c], optarg, group_format_option[c]);
-         break;
-
-       case COLOR_OPTION:
-         specify_colors_style (optarg);
-         break;
-
-       case COLOR_PALETTE_OPTION:
-         set_color_palette (optarg);
-         break;
+          break;
+
+        case LEFT_COLUMN_OPTION:
+          left_column = true;
+          break;
+
+        case LINE_FORMAT_OPTION:
+          specify_style (OUTPUT_IFDEF);
+          for (i = 0; i < sizeof line_format / sizeof line_format[0]; i++)
+            specify_value (&line_format[i], optarg, "--line-format");
+          break;
+
+        case NO_DEREFERENCE_OPTION:
+          no_dereference_symlinks = true;
+          break;
+
+        case NO_IGNORE_FILE_NAME_CASE_OPTION:
+          ignore_file_name_case = false;
+          break;
+
+        case NORMAL_OPTION:
+          specify_style (OUTPUT_NORMAL);
+          break;
+
+        case SDIFF_MERGE_ASSIST_OPTION:
+          specify_style (OUTPUT_SDIFF);
+          sdiff_merge_assist = true;
+          break;
+
+        case STRIP_TRAILING_CR_OPTION:
+          strip_trailing_cr = true;
+          break;
+
+        case SUPPRESS_BLANK_EMPTY_OPTION:
+          suppress_blank_empty = true;
+          break;
+
+        case SUPPRESS_COMMON_LINES_OPTION:
+          suppress_common_lines = true;
+          break;
+
+        case TABSIZE_OPTION:
+          numval = strtoimax (optarg, &numend, 10);
+          if (! (0 < numval && numval <= SIZE_MAX - GUTTER_WIDTH_MINIMUM)
+              || *numend)
+            try_help ("invalid tabsize '%s'", optarg);
+          if (tabsize != numval)
+            {
+              if (tabsize)
+                fatal ("conflicting tabsize options");
+              tabsize = numval;
+            }
+          break;
+
+        case TO_FILE_OPTION:
+          specify_value (&to_file, optarg, "--to-file");
+          break;
+
+        case UNCHANGED_LINE_FORMAT_OPTION:
+        case OLD_LINE_FORMAT_OPTION:
+        case NEW_LINE_FORMAT_OPTION:
+          specify_style (OUTPUT_IFDEF);
+          c -= UNCHANGED_LINE_FORMAT_OPTION;
+          specify_value (&line_format[c], optarg, line_format_option[c]);
+          break;
+
+        case UNCHANGED_GROUP_FORMAT_OPTION:
+        case OLD_GROUP_FORMAT_OPTION:
+        case NEW_GROUP_FORMAT_OPTION:
+        case CHANGED_GROUP_FORMAT_OPTION:
+          specify_style (OUTPUT_IFDEF);
+          c -= UNCHANGED_GROUP_FORMAT_OPTION;
+          specify_value (&group_format[c], optarg, group_format_option[c]);
+          break;
+
+        case COLOR_OPTION:
+          specify_colors_style (optarg);
+          break;
+
+        case COLOR_PALETTE_OPTION:
+          set_color_palette (optarg);
+          break;
 
         case PRESUME_OUTPUT_TTY_OPTION:
           presume_output_tty = true;
           break;
 
-       default:
-         try_help (NULL, NULL);
-       }
+        default:
+          try_help (NULL, NULL);
+        }
       prev = c;
     }
 
@@ -668,13 +670,13 @@ main (int argc, char **argv)
   if (output_style == OUTPUT_UNSPECIFIED)
     {
       if (show_c_function)
-       {
-         specify_style (OUTPUT_CONTEXT);
-         if (ocontext < 0)
-           context = 3;
-       }
+        {
+          specify_style (OUTPUT_CONTEXT);
+          if (ocontext < 0)
+            context = 3;
+        }
       else
-       specify_style (OUTPUT_NORMAL);
+        specify_style (OUTPUT_NORMAL);
     }
 
   if (output_style != OUTPUT_CONTEXT || hard_locale (LC_TIME))
@@ -694,9 +696,9 @@ main (int argc, char **argv)
 
   if (0 <= ocontext
       && (output_style == OUTPUT_CONTEXT
-         || output_style == OUTPUT_UNIFIED)
+          || output_style == OUTPUT_UNIFIED)
       && (context < ocontext
-         || (ocontext < context && ! explicit_context)))
+          || (ocontext < context && ! explicit_context)))
     context = ocontext;
 
   if (! tabsize)
@@ -708,12 +710,12 @@ main (int argc, char **argv)
     /* Maximize first the half line width, and then the gutter width,
        according to the following constraints:
 
-       1.  Two half lines plus a gutter must fit in a line.
-       2.  If the half line width is nonzero:
-           a.  The gutter width is at least GUTTER_WIDTH_MINIMUM.
-           b.  If tabs are not expanded to spaces,
-               a half line plus a gutter is an integral number of tabs,
-               so that tabs in the right column line up.  */
+        1.  Two half lines plus a gutter must fit in a line.
+        2.  If the half line width is nonzero:
+            a.  The gutter width is at least GUTTER_WIDTH_MINIMUM.
+            b.  If tabs are not expanded to spaces,
+                a half line plus a gutter is an integral number of tabs,
+                so that tabs in the right column line up.  */
 
     size_t t = expand_tabs ? 1 : tabsize;
     size_t w = width;
@@ -721,8 +723,8 @@ main (int argc, char **argv)
     size_t unaligned_off = (w >> 1) + (t_plus_g >> 1) + (w & t_plus_g & 1);
     size_t off = unaligned_off - unaligned_off % t;
     sdiff_half_width = (off <= GUTTER_WIDTH_MINIMUM || w <= off
-                       ? 0
-                       : MIN (off - GUTTER_WIDTH_MINIMUM, w - off));
+                        ? 0
+                        : MIN (off - GUTTER_WIDTH_MINIMUM, w - off));
     sdiff_column2_offset = sdiff_half_width ? off : w;
   }
 
@@ -737,68 +739,68 @@ main (int argc, char **argv)
   if (output_style == OUTPUT_IFDEF)
     {
       for (i = 0; i < sizeof line_format / sizeof line_format[0]; i++)
-       if (!line_format[i])
-         line_format[i] = "%l\n";
+        if (!line_format[i])
+          line_format[i] = "%l\n";
       if (!group_format[OLD])
-       group_format[OLD]
-         = group_format[CHANGED] ? group_format[CHANGED] : "%<";
+        group_format[OLD]
+          = group_format[CHANGED] ? group_format[CHANGED] : "%<";
       if (!group_format[NEW])
-       group_format[NEW]
-         = group_format[CHANGED] ? group_format[CHANGED] : "%>";
+        group_format[NEW]
+          = group_format[CHANGED] ? group_format[CHANGED] : "%>";
       if (!group_format[UNCHANGED])
-       group_format[UNCHANGED] = "%=";
+        group_format[UNCHANGED] = "%=";
       if (!group_format[CHANGED])
-       group_format[CHANGED] = concat (group_format[OLD],
-                                       group_format[NEW], "");
+        group_format[CHANGED] = concat (group_format[OLD],
+                                        group_format[NEW], "");
     }
 
   no_diff_means_no_output =
     (output_style == OUTPUT_IFDEF ?
       (!*group_format[UNCHANGED]
        || (STREQ (group_format[UNCHANGED], "%=")
-          && !*line_format[UNCHANGED]))
+           && !*line_format[UNCHANGED]))
      : (output_style != OUTPUT_SDIFF) | suppress_common_lines);
 
   files_can_be_treated_as_binary =
     (brief & binary
      & ~ (ignore_blank_lines | ignore_case | strip_trailing_cr
-         | (ignore_regexp_list.regexps || ignore_white_space)));
+          | (ignore_regexp_list.regexps || ignore_white_space)));
 
   switch_string = option_list (argv + 1, optind - 1);
 
   if (from_file)
     {
       if (to_file)
-       fatal ("--from-file and --to-file both specified");
+        fatal ("--from-file and --to-file both specified");
       else
-       for (; optind < argc; optind++)
-         {
-           int status = compare_files (NULL, from_file, argv[optind]);
-           if (exit_status < status)
-             exit_status = status;
-         }
+        for (; optind < argc; optind++)
+          {
+            int status = compare_files (NULL, from_file, argv[optind]);
+            if (exit_status < status)
+              exit_status = status;
+          }
     }
   else
     {
       if (to_file)
-       for (; optind < argc; optind++)
-         {
-           int status = compare_files (NULL, argv[optind], to_file);
-           if (exit_status < status)
-             exit_status = status;
-         }
+        for (; optind < argc; optind++)
+          {
+            int status = compare_files (NULL, argv[optind], to_file);
+            if (exit_status < status)
+              exit_status = status;
+          }
       else
-       {
-         if (argc - optind != 2)
-           {
-             if (argc - optind < 2)
-               try_help ("missing operand after '%s'", argv[argc - 1]);
-             else
-               try_help ("extra operand '%s'", argv[optind + 2]);
-           }
-
-         exit_status = compare_files (NULL, argv[optind], argv[optind + 1]);
-       }
+        {
+          if (argc - optind != 2)
+            {
+              if (argc - optind < 2)
+                try_help ("missing operand after '%s'", argv[argc - 1]);
+              else
+                try_help ("extra operand '%s'", argv[optind + 2]);
+            }
+
+          exit_status = compare_files (NULL, argv[optind], argv[optind + 1]);
+        }
     }
 
   /* Print any messages that were saved up for last.  */
@@ -828,21 +830,21 @@ add_regexp (struct regexp_list *reglist, char const *pattern)
       size_t size = reglist->size;
 
       if (size <= newlen)
-       {
-         if (!size)
-           size = 1;
+        {
+          if (!size)
+            size = 1;
 
-         do size *= 2;
-         while (size <= newlen);
+          do size *= 2;
+          while (size <= newlen);
 
-         reglist->size = size;
-         reglist->regexps = regexps = xrealloc (regexps, size);
-       }
+          reglist->size = size;
+          reglist->regexps = regexps = xrealloc (regexps, size);
+        }
       if (multiple_regexps)
-       {
-         regexps[len++] = '\\';
-         regexps[len++] = '|';
-       }
+        {
+          regexps[len++] = '\\';
+          regexps[len++] = '|';
+        }
       memcpy (regexps + len, pattern, patlen + 1);
     }
 }
@@ -858,14 +860,14 @@ summarize_regexp_list (struct regexp_list *reglist)
       /* At least one regexp was specified.  Allocate a fastmap for it.  */
       reglist->buf->fastmap = xmalloc (1 << CHAR_BIT);
       if (reglist->multiple_regexps)
-       {
-         /* Compile the disjunction of the regexps.
-            (If just one regexp was specified, it is already compiled.)  */
-         char const *m = re_compile_pattern (reglist->regexps, reglist->len,
-                                             reglist->buf);
-         if (m)
-           die (EXIT_TROUBLE, 0, "%s: %s", reglist->regexps, m);
-       }
+        {
+          /* Compile the disjunction of the regexps.
+             (If just one regexp was specified, it is already compiled.)  */
+          char const *m = re_compile_pattern (reglist->regexps, reglist->len,
+                                              reglist->buf);
+          if (m)
+            die (EXIT_TROUBLE, 0, "%s: %s", reglist->regexps, m);
+        }
     }
 }
 
@@ -875,7 +877,7 @@ try_help (char const *reason_msgid, char const *operand)
   if (reason_msgid)
     error (0, 0, _(reason_msgid), operand);
   die (EXIT_TROUBLE, 0, _("Try '%s --help' for more information."),
-        program_name);
+         program_name);
 }
 
 static void
@@ -971,8 +973,8 @@ static char const * const option_help_msgid[] = {
   N_("-d, --minimal            try hard to find a smaller set of changes"),
   N_("    --horizon-lines=NUM  keep NUM lines of the common prefix and suffix"),
   N_("    --speed-large-files  assume large files and many scattered small changes"),
-  N_("    --color[=WHEN]       colorize the output; WHEN can be 'never', 'always',\n"
-     "                           or 'auto' (the default)"),
+  N_("    --color[=WHEN]       color output; WHEN is 'never', 'always', or 'auto';\n"
+     "                           plain --color means --color='auto'"),
   N_("    --palette=PALETTE    the colors to use when --color is active; PALETTE is\n"
      "                           a colon-separated list of terminfo capabilities"),
   "",
@@ -1001,23 +1003,23 @@ Mandatory arguments to long options are mandatory for short options too.\n\
   for (p = option_help_msgid;  *p;  p++)
     {
       if (!**p)
-       putchar ('\n');
+        putchar ('\n');
       else
-       {
-         char const *msg = _(*p);
-         char const *nl;
-         while ((nl = strchr (msg, '\n')))
-           {
-             int msglen = nl + 1 - msg;
-             /* This assertion is solely to avoid a warning from
-                gcc's -Wformat-overflow=.  */
-             assert (msglen < 4096);
-             printf ("  %.*s", msglen, msg);
-             msg = nl + 1;
-           }
-
-         printf ("  %s\n" + 2 * (*msg != ' ' && *msg != '-'), msg);
-       }
+        {
+          char const *msg = _(*p);
+          char const *nl;
+          while ((nl = strchr (msg, '\n')))
+            {
+              int msglen = nl + 1 - msg;
+              /* This assertion is solely to avoid a warning from
+                 gcc's -Wformat-overflow=.  */
+              assert (msglen < 4096);
+              printf ("  %.*s", msglen, msg);
+              msg = nl + 1;
+            }
+
+          printf (&"  %s\n"[2 * (*msg != ' ' && *msg != '-')], msg);
+        }
     }
   emit_bug_reporting_address ();
 }
@@ -1042,7 +1044,7 @@ specify_style (enum output_style style)
   if (output_style != style)
     {
       if (output_style != OUTPUT_UNSPECIFIED)
-       try_help ("conflicting output style options", NULL);
+        try_help ("conflicting output style options", NULL);
       output_style = style;
     }
 }
@@ -1091,8 +1093,8 @@ set_mtime_to_now (struct stat *st)
 
 static int
 compare_files (struct comparison const *parent,
-              char const *name0,
-              char const *name1)
+               char const *name0,
+               char const *name1)
 {
   struct comparison cmp;
 #define DIR_P(f) (S_ISDIR (cmp.file[f].stat.st_mode) != 0)
@@ -1107,8 +1109,8 @@ compare_files (struct comparison const *parent,
      If so, just print a message to that effect.  */
 
   if (! ((name0 && name1)
-        || (unidirectional_new_file && name1)
-        || new_file))
+         || (unidirectional_new_file && name1)
+         || new_file))
     {
       char const *name = name0 ? name0 : name1;
       char const *dir = parent->file[!name0].name;
@@ -1117,7 +1119,7 @@ compare_files (struct comparison const *parent,
       message ("Only in %s: %s\n", dir, name);
 
       /* Return EXIT_FAILURE so that diff_dirs will return
-        EXIT_FAILURE ("some files differ").  */
+         EXIT_FAILURE ("some files differ").  */
       return EXIT_FAILURE;
     }
 
@@ -1151,9 +1153,9 @@ compare_files (struct comparison const *parent,
   else
     {
       cmp.file[0].name = free0
-       = file_name_concat (parent->file[0].name, name0, NULL);
+        = file_name_concat (parent->file[0].name, name0, NULL);
       cmp.file[1].name = free1
-       = file_name_concat (parent->file[1].name, name1, NULL);
+        = file_name_concat (parent->file[1].name, name1, NULL);
     }
 
   /* Stat the files.  */
@@ -1161,42 +1163,42 @@ compare_files (struct comparison const *parent,
   for (f = 0; f < 2; f++)
     {
       if (cmp.file[f].desc != NONEXISTENT)
-       {
-         if (f && file_name_cmp (cmp.file[f].name, cmp.file[0].name) == 0)
-           {
-             cmp.file[f].desc = cmp.file[0].desc;
-             cmp.file[f].stat = cmp.file[0].stat;
-           }
-         else if (STREQ (cmp.file[f].name, "-"))
-           {
-             cmp.file[f].desc = STDIN_FILENO;
-             if (binary && ! isatty (STDIN_FILENO))
-               set_binary_mode (STDIN_FILENO, O_BINARY);
-             if (fstat (STDIN_FILENO, &cmp.file[f].stat) != 0)
-               cmp.file[f].desc = ERRNO_ENCODE (errno);
-             else
-               {
-                 if (S_ISREG (cmp.file[f].stat.st_mode))
-                   {
-                     off_t pos = lseek (STDIN_FILENO, 0, SEEK_CUR);
-                     if (pos < 0)
-                       cmp.file[f].desc = ERRNO_ENCODE (errno);
-                     else
-                       cmp.file[f].stat.st_size =
-                         MAX (0, cmp.file[f].stat.st_size - pos);
-                   }
-
-                 /* POSIX 1003.1-2001 requires current time for
-                    stdin.  */
-                 set_mtime_to_now (&cmp.file[f].stat);
-               }
-           }
-         else if ((no_dereference_symlinks
-                   ? lstat (cmp.file[f].name, &cmp.file[f].stat)
-                   : stat (cmp.file[f].name, &cmp.file[f].stat))
-                  != 0)
-           cmp.file[f].desc = ERRNO_ENCODE (errno);
-       }
+        {
+          if (f && file_name_cmp (cmp.file[f].name, cmp.file[0].name) == 0)
+            {
+              cmp.file[f].desc = cmp.file[0].desc;
+              cmp.file[f].stat = cmp.file[0].stat;
+            }
+          else if (STREQ (cmp.file[f].name, "-"))
+            {
+              cmp.file[f].desc = STDIN_FILENO;
+              if (binary && ! isatty (STDIN_FILENO))
+                set_binary_mode (STDIN_FILENO, O_BINARY);
+              if (fstat (STDIN_FILENO, &cmp.file[f].stat) != 0)
+                cmp.file[f].desc = ERRNO_ENCODE (errno);
+              else
+                {
+                  if (S_ISREG (cmp.file[f].stat.st_mode))
+                    {
+                      off_t pos = lseek (STDIN_FILENO, 0, SEEK_CUR);
+                      if (pos < 0)
+                        cmp.file[f].desc = ERRNO_ENCODE (errno);
+                      else
+                        cmp.file[f].stat.st_size =
+                          MAX (0, cmp.file[f].stat.st_size - pos);
+                    }
+
+                  /* POSIX 1003.1-2001 requires current time for
+                     stdin.  */
+                  set_mtime_to_now (&cmp.file[f].stat);
+                }
+            }
+          else if ((no_dereference_symlinks
+                    ? lstat (cmp.file[f].name, &cmp.file[f].stat)
+                    : stat (cmp.file[f].name, &cmp.file[f].stat))
+                   != 0)
+            cmp.file[f].desc = ERRNO_ENCODE (errno);
+        }
     }
 
   /* Mark files as nonexistent as needed for -N and -P, if they are
@@ -1206,58 +1208,58 @@ compare_files (struct comparison const *parent,
      exist.  */
   for (f = 0; f < 2; f++)
     if ((new_file || (f == 0 && unidirectional_new_file))
-       && (cmp.file[f].desc == UNOPENED
-           ? (S_ISREG (cmp.file[f].stat.st_mode)
-              && ! (cmp.file[f].stat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO))
-              && cmp.file[f].stat.st_size == 0)
-           : ((cmp.file[f].desc == ERRNO_ENCODE (ENOENT)
-               || cmp.file[f].desc == ERRNO_ENCODE (EBADF))
-              && ! parent
-              && (cmp.file[1 - f].desc == UNOPENED
-                  || cmp.file[1 - f].desc == STDIN_FILENO))))
+        && (cmp.file[f].desc == UNOPENED
+            ? (S_ISREG (cmp.file[f].stat.st_mode)
+               && ! (cmp.file[f].stat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO))
+               && cmp.file[f].stat.st_size == 0)
+            : ((cmp.file[f].desc == ERRNO_ENCODE (ENOENT)
+                || cmp.file[f].desc == ERRNO_ENCODE (EBADF))
+               && ! parent
+               && (cmp.file[1 - f].desc == UNOPENED
+                   || cmp.file[1 - f].desc == STDIN_FILENO))))
       cmp.file[f].desc = NONEXISTENT;
 
   for (f = 0; f < 2; f++)
     if (cmp.file[f].desc == NONEXISTENT)
       {
-       memset (&cmp.file[f].stat, 0, sizeof cmp.file[f].stat);
-       cmp.file[f].stat.st_mode = cmp.file[1 - f].stat.st_mode;
+        memset (&cmp.file[f].stat, 0, sizeof cmp.file[f].stat);
+        cmp.file[f].stat.st_mode = cmp.file[1 - f].stat.st_mode;
       }
 
   for (f = 0; f < 2; f++)
     {
       int e = ERRNO_DECODE (cmp.file[f].desc);
       if (0 <= e)
-       {
-         errno = e;
-         perror_with_name (cmp.file[f].name);
-         status = EXIT_TROUBLE;
-       }
+        {
+          errno = e;
+          perror_with_name (cmp.file[f].name);
+          status = EXIT_TROUBLE;
+        }
     }
 
   if (status == EXIT_SUCCESS && ! parent && DIR_P (0) != DIR_P (1))
     {
       /* If one is a directory, and it was specified in the command line,
-        use the file in that dir with the other file's basename.  */
+         use the file in that dir with the other file's basename.  */
 
       int fnm_arg = DIR_P (0);
       int dir_arg = 1 - fnm_arg;
       char const *fnm = cmp.file[fnm_arg].name;
       char const *dir = cmp.file[dir_arg].name;
       char const *filename = cmp.file[dir_arg].name = free0
-       = find_dir_file_pathname (dir, last_component (fnm));
+        = find_dir_file_pathname (dir, last_component (fnm));
 
       if (STREQ (fnm, "-"))
-       fatal ("cannot compare '-' to a directory");
+        fatal ("cannot compare '-' to a directory");
 
       if ((no_dereference_symlinks
-          ? lstat (filename, &cmp.file[dir_arg].stat)
-          : stat (filename, &cmp.file[dir_arg].stat))
-         != 0)
-       {
-         perror_with_name (filename);
-         status = EXIT_TROUBLE;
-       }
+           ? lstat (filename, &cmp.file[dir_arg].stat)
+           : stat (filename, &cmp.file[dir_arg].stat))
+          != 0)
+        {
+          perror_with_name (filename);
+          status = EXIT_TROUBLE;
+        }
     }
 
   if (status != EXIT_SUCCESS)
@@ -1265,145 +1267,145 @@ compare_files (struct comparison const *parent,
       /* One of the files should exist but does not.  */
     }
   else if (cmp.file[0].desc == NONEXISTENT
-          && cmp.file[1].desc == NONEXISTENT)
+           && cmp.file[1].desc == NONEXISTENT)
     {
       /* Neither file "exists", so there's nothing to compare.  */
     }
   else if ((same_files
-           = (cmp.file[0].desc != NONEXISTENT
-              && cmp.file[1].desc != NONEXISTENT
-              && 0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
-              && same_file_attributes (&cmp.file[0].stat,
-                                       &cmp.file[1].stat)))
-          && no_diff_means_no_output)
+            = (cmp.file[0].desc != NONEXISTENT
+               && cmp.file[1].desc != NONEXISTENT
+               && 0 < same_file (&cmp.file[0].stat, &cmp.file[1].stat)
+               && same_file_attributes (&cmp.file[0].stat,
+                                        &cmp.file[1].stat)))
+           && no_diff_means_no_output)
     {
       /* The two named files are actually the same physical file.
-        We know they are identical without actually reading them.  */
+         We know they are identical without actually reading them.  */
     }
   else if (DIR_P (0) & DIR_P (1))
     {
       if (output_style == OUTPUT_IFDEF)
-       fatal ("-D option not supported with directories");
+        fatal ("-D option not supported with directories");
 
       /* If both are directories, compare the files in them.  */
 
       if (parent && !recursive)
-       {
-         /* But don't compare dir contents one level down
-            unless -r was specified.
-            See POSIX 1003.1-2001 for this format.  */
-         message ("Common subdirectories: %s and %s\n",
-                  cmp.file[0].name, cmp.file[1].name);
-       }
+        {
+          /* But don't compare dir contents one level down
+             unless -r was specified.
+             See POSIX 1003.1-2001 for this format.  */
+          message ("Common subdirectories: %s and %s\n",
+                   cmp.file[0].name, cmp.file[1].name);
+        }
       else
-       status = diff_dirs (&cmp, compare_files);
+        status = diff_dirs (&cmp, compare_files);
     }
   else if ((DIR_P (0) | DIR_P (1))
-          || (parent
-              && !((S_ISREG (cmp.file[0].stat.st_mode)
-                    || S_ISLNK (cmp.file[0].stat.st_mode))
-                   && (S_ISREG (cmp.file[1].stat.st_mode)
-                       || S_ISLNK  (cmp.file[1].stat.st_mode)))))
+           || (parent
+               && !((S_ISREG (cmp.file[0].stat.st_mode)
+                     || S_ISLNK (cmp.file[0].stat.st_mode))
+                    && (S_ISREG (cmp.file[1].stat.st_mode)
+                        || S_ISLNK  (cmp.file[1].stat.st_mode)))))
     {
       if (cmp.file[0].desc == NONEXISTENT || cmp.file[1].desc == NONEXISTENT)
-       {
-         /* We have a subdirectory that exists only in one directory.  */
-
-         if ((DIR_P (0) | DIR_P (1))
-             && recursive
-             && (new_file
-                 || (unidirectional_new_file
-                     && cmp.file[0].desc == NONEXISTENT)))
-           status = diff_dirs (&cmp, compare_files);
-         else
-           {
-             char const *dir;
-
-             /* PARENT must be non-NULL here.  */
-             assert (parent);
-             dir = parent->file[cmp.file[0].desc == NONEXISTENT].name;
-
-             /* See POSIX 1003.1-2001 for this format.  */
-             message ("Only in %s: %s\n", dir, name0);
-
-             status = EXIT_FAILURE;
-           }
-       }
+        {
+          /* We have a subdirectory that exists only in one directory.  */
+
+          if ((DIR_P (0) | DIR_P (1))
+              && recursive
+              && (new_file
+                  || (unidirectional_new_file
+                      && cmp.file[0].desc == NONEXISTENT)))
+            status = diff_dirs (&cmp, compare_files);
+          else
+            {
+              char const *dir;
+
+              /* PARENT must be non-NULL here.  */
+              assert (parent);
+              dir = parent->file[cmp.file[0].desc == NONEXISTENT].name;
+
+              /* See POSIX 1003.1-2001 for this format.  */
+              message ("Only in %s: %s\n", dir, name0);
+
+              status = EXIT_FAILURE;
+            }
+        }
       else
-       {
-         /* We have two files that are not to be compared.  */
-
-         /* See POSIX 1003.1-2001 for this format.  */
-         message5 ("File %s is a %s while file %s is a %s\n",
-                   file_label[0] ? file_label[0] : cmp.file[0].name,
-                   file_type (&cmp.file[0].stat),
-                   file_label[1] ? file_label[1] : cmp.file[1].name,
-                   file_type (&cmp.file[1].stat));
-
-         /* This is a difference.  */
-         status = EXIT_FAILURE;
-       }
+        {
+          /* We have two files that are not to be compared.  */
+
+          /* See POSIX 1003.1-2001 for this format.  */
+          message5 ("File %s is a %s while file %s is a %s\n",
+                    file_label[0] ? file_label[0] : cmp.file[0].name,
+                    file_type (&cmp.file[0].stat),
+                    file_label[1] ? file_label[1] : cmp.file[1].name,
+                    file_type (&cmp.file[1].stat));
+
+          /* This is a difference.  */
+          status = EXIT_FAILURE;
+        }
     }
   else if (S_ISLNK (cmp.file[0].stat.st_mode)
-          || S_ISLNK (cmp.file[1].stat.st_mode))
+           || S_ISLNK (cmp.file[1].stat.st_mode))
     {
       /* We get here only if we use lstat(), not stat().  */
       assert (no_dereference_symlinks);
 
       if (S_ISLNK (cmp.file[0].stat.st_mode)
-         && S_ISLNK (cmp.file[1].stat.st_mode))
-       {
-         /* Compare the values of the symbolic links.  */
-         char *link_value[2] = { NULL, NULL };
-
-         for (f = 0; f < 2; f++)
-           {
-             link_value[f] = xreadlink (cmp.file[f].name);
-             if (link_value[f] == NULL)
-               {
-                 perror_with_name (cmp.file[f].name);
-                 status = EXIT_TROUBLE;
-                 break;
-               }
-           }
-         if (status == EXIT_SUCCESS)
-           {
-             if ( ! STREQ (link_value[0], link_value[1]))
-               {
-                 message ("Symbolic links %s and %s differ\n",
-                          cmp.file[0].name, cmp.file[1].name);
-                 /* This is a difference.  */
-                 status = EXIT_FAILURE;
-               }
-           }
-         for (f = 0; f < 2; f++)
-           free (link_value[f]);
-       }
+          && S_ISLNK (cmp.file[1].stat.st_mode))
+        {
+          /* Compare the values of the symbolic links.  */
+          char *link_value[2] = { NULL, NULL };
+
+          for (f = 0; f < 2; f++)
+            {
+              link_value[f] = xreadlink (cmp.file[f].name);
+              if (link_value[f] == NULL)
+                {
+                  perror_with_name (cmp.file[f].name);
+                  status = EXIT_TROUBLE;
+                  break;
+                }
+            }
+          if (status == EXIT_SUCCESS)
+            {
+              if ( ! STREQ (link_value[0], link_value[1]))
+                {
+                  message ("Symbolic links %s and %s differ\n",
+                           cmp.file[0].name, cmp.file[1].name);
+                  /* This is a difference.  */
+                  status = EXIT_FAILURE;
+                }
+            }
+          for (f = 0; f < 2; f++)
+            free (link_value[f]);
+        }
       else
-       {
-         /* We have two files that are not to be compared, because
-            one of them is a symbolic link and the other one is not.  */
-
-         message5 ("File %s is a %s while file %s is a %s\n",
-                   file_label[0] ? file_label[0] : cmp.file[0].name,
-                   file_type (&cmp.file[0].stat),
-                   file_label[1] ? file_label[1] : cmp.file[1].name,
-                   file_type (&cmp.file[1].stat));
-
-         /* This is a difference.  */
-         status = EXIT_FAILURE;
-       }
+        {
+          /* We have two files that are not to be compared, because
+             one of them is a symbolic link and the other one is not.  */
+
+          message5 ("File %s is a %s while file %s is a %s\n",
+                    file_label[0] ? file_label[0] : cmp.file[0].name,
+                    file_type (&cmp.file[0].stat),
+                    file_label[1] ? file_label[1] : cmp.file[1].name,
+                    file_type (&cmp.file[1].stat));
+
+          /* This is a difference.  */
+          status = EXIT_FAILURE;
+        }
     }
   else if (files_can_be_treated_as_binary
-          && S_ISREG (cmp.file[0].stat.st_mode)
-          && S_ISREG (cmp.file[1].stat.st_mode)
-          && cmp.file[0].stat.st_size != cmp.file[1].stat.st_size
-          && 0 < cmp.file[0].stat.st_size
-          && 0 < cmp.file[1].stat.st_size)
+           && S_ISREG (cmp.file[0].stat.st_mode)
+           && S_ISREG (cmp.file[1].stat.st_mode)
+           && cmp.file[0].stat.st_size != cmp.file[1].stat.st_size
+           && 0 < cmp.file[0].stat.st_size
+           && 0 < cmp.file[1].stat.st_size)
     {
       message ("Files %s and %s differ\n",
-              file_label[0] ? file_label[0] : cmp.file[0].name,
-              file_label[1] ? file_label[1] : cmp.file[1].name);
+               file_label[0] ? file_label[0] : cmp.file[0].name,
+               file_label[1] ? file_label[1] : cmp.file[1].name);
       status = EXIT_FAILURE;
     }
   else
@@ -1415,40 +1417,40 @@ compare_files (struct comparison const *parent,
       int oflags = O_RDONLY | (binary ? O_BINARY : 0);
 
       if (cmp.file[0].desc == UNOPENED)
-       if ((cmp.file[0].desc = open (cmp.file[0].name, oflags, 0)) < 0)
-         {
-           perror_with_name (cmp.file[0].name);
-           status = EXIT_TROUBLE;
-         }
+        if ((cmp.file[0].desc = open (cmp.file[0].name, oflags, 0)) < 0)
+          {
+            perror_with_name (cmp.file[0].name);
+            status = EXIT_TROUBLE;
+          }
       if (cmp.file[1].desc == UNOPENED)
-       {
-         if (same_files)
-           cmp.file[1].desc = cmp.file[0].desc;
-         else if ((cmp.file[1].desc = open (cmp.file[1].name, oflags, 0)) < 0)
-           {
-             perror_with_name (cmp.file[1].name);
-             status = EXIT_TROUBLE;
-           }
-       }
+        {
+          if (same_files)
+            cmp.file[1].desc = cmp.file[0].desc;
+          else if ((cmp.file[1].desc = open (cmp.file[1].name, oflags, 0)) < 0)
+            {
+              perror_with_name (cmp.file[1].name);
+              status = EXIT_TROUBLE;
+            }
+        }
 
       /* Compare the files, if no error was found.  */
 
       if (status == EXIT_SUCCESS)
-       status = diff_2_files (&cmp);
+        status = diff_2_files (&cmp);
 
       /* Close the file descriptors.  */
 
       if (0 <= cmp.file[0].desc && close (cmp.file[0].desc) != 0)
-       {
-         perror_with_name (cmp.file[0].name);
-         status = EXIT_TROUBLE;
-       }
+        {
+          perror_with_name (cmp.file[0].name);
+          status = EXIT_TROUBLE;
+        }
       if (0 <= cmp.file[1].desc && cmp.file[0].desc != cmp.file[1].desc
-         && close (cmp.file[1].desc) != 0)
-       {
-         perror_with_name (cmp.file[1].name);
-         status = EXIT_TROUBLE;
-       }
+          && close (cmp.file[1].desc) != 0)
+        {
+          perror_with_name (cmp.file[1].name);
+          status = EXIT_TROUBLE;
+        }
     }
 
   /* Now the comparison has been done, if no error prevented it,
@@ -1457,16 +1459,16 @@ compare_files (struct comparison const *parent,
   if (status == EXIT_SUCCESS)
     {
       if (report_identical_files && !DIR_P (0))
-       message ("Files %s and %s are identical\n",
-                file_label[0] ? file_label[0] : cmp.file[0].name,
-                file_label[1] ? file_label[1] : cmp.file[1].name);
+        message ("Files %s and %s are identical\n",
+                 file_label[0] ? file_label[0] : cmp.file[0].name,
+                 file_label[1] ? file_label[1] : cmp.file[1].name);
     }
   else
     {
       /* Flush stdout so that the user sees differences immediately.
-        This can hurt performance, unfortunately.  */
+         This can hurt performance, unfortunately.  */
       if (fflush (stdout) != 0)
-       pfatal_with_name (_("standard output"));
+        pfatal_with_name (_("standard output"));
     }
 
   free (free0);
index 03daaa4..27362c0 100644 (file)
@@ -1,7 +1,7 @@
 /* Shared definitions for GNU DIFF
 
    Copyright (C) 1988-1989, 1991-1995, 1998, 2001-2002, 2004, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
index ec414a9..6be7e3c 100644 (file)
@@ -1,7 +1,7 @@
 /* GNU diff3 - compare three files line by line
 
    Copyright (C) 1988-1989, 1992-1996, 1998, 2001-2002, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
 #include <version-etc.h>
 #include <xalloc.h>
 #include <xfreopen.h>
+#include <xstdopen.h>
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "diff3"
@@ -256,6 +257,7 @@ main (int argc, char **argv)
   int mapping[3];
   int rev_mapping[3];
   int incompat = 0;
+  enum { OPTION_3, OPTION_A, OPTION_E, OPTION_X, OPTION_e, OPTION_x };
   bool conflicts_found;
   struct diff_block *thread0, *thread1, *last_block;
   struct diff3_block *diff3;
@@ -272,80 +274,83 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
   c_stack_action (0);
+  xstdopen ();
 
   while ((c = getopt_long (argc, argv, "aeimvx3AEL:TX", longopts, 0)) != -1)
     {
       switch (c)
-       {
-       case 'a':
-         text = true;
-         break;
-       case 'A':
-         show_2nd = true;
-         flagging = true;
-         incompat++;
-         break;
-       case 'x':
-         overlap_only = true;
-         incompat++;
-         break;
-       case '3':
-         simple_only = true;
-         incompat++;
-         break;
-       case 'i':
-         finalwrite = true;
-         break;
-       case 'm':
-         merge = true;
-         break;
-       case 'X':
-         overlap_only = true;
-         FALLTHROUGH;
-       case 'E':
-         flagging = true;
-         FALLTHROUGH;
-       case 'e':
-         incompat++;
-         break;
-       case 'T':
-         initial_tab = true;
-         break;
-       case STRIP_TRAILING_CR_OPTION:
-         strip_trailing_cr = true;
-         break;
-       case 'v':
-         version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
-                      AUTHORS, (char *) NULL);
-         check_stdout ();
-         return EXIT_SUCCESS;
-       case DIFF_PROGRAM_OPTION:
-         diff_program = optarg;
-         break;
-       case HELP_OPTION:
-         usage ();
-         check_stdout ();
-         return EXIT_SUCCESS;
-       case 'L':
-         /* Handle up to three -L options.  */
-         if (tag_count < 3)
-           {
-             tag_strings[tag_count++] = optarg;
-             break;
-           }
-         try_help ("too many file label options", 0);
-       default:
-         try_help (0, 0);
-       }
+        {
+        case 'a':
+          text = true;
+          break;
+        case 'A':
+          show_2nd = true;
+          flagging = true;
+          incompat |= 1 << OPTION_A;
+          break;
+        case 'x':
+          overlap_only = true;
+          incompat |= 1 << OPTION_x;
+          break;
+        case '3':
+          simple_only = true;
+          incompat |= 1 << OPTION_3;
+          break;
+        case 'i':
+          finalwrite = true;
+          break;
+        case 'm':
+          merge = true;
+          break;
+        case 'X':
+          overlap_only = true;
+          incompat |= 1 << OPTION_X;
+          break;
+        case 'E':
+          flagging = true;
+          incompat |= 1 << OPTION_E;
+          break;
+        case 'e':
+          incompat |= 1 << OPTION_e;
+          break;
+        case 'T':
+          initial_tab = true;
+          break;
+        case STRIP_TRAILING_CR_OPTION:
+          strip_trailing_cr = true;
+          break;
+        case 'v':
+          version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
+                       AUTHORS, (char *) NULL);
+          check_stdout ();
+          return EXIT_SUCCESS;
+        case DIFF_PROGRAM_OPTION:
+          diff_program = optarg;
+          break;
+        case HELP_OPTION:
+          usage ();
+          check_stdout ();
+          return EXIT_SUCCESS;
+        case 'L':
+          /* Handle up to three -L options.  */
+          if (tag_count < 3)
+            {
+              tag_strings[tag_count++] = optarg;
+              break;
+            }
+          try_help ("too many file label options", 0);
+        default:
+          try_help (0, 0);
+        }
     }
 
   /* -AeExX3 without -m implies ed script.  */
-  edscript = incompat & ~(int) merge;
+  edscript = !!incompat & !merge;
 
-  show_2nd |= ~incompat & merge;  /* -m without -AeExX3 implies -A.  */
-  flagging |= ~incompat & merge;
+  show_2nd |= !incompat & merge;  /* -m without -AeExX3 implies -A.  */
+  flagging |= !incompat & merge;
 
-  if (incompat > 1  /* Ensure at most one of -AeExX3.  */
+  if (incompat & (incompat - 1)  /* Ensure at most one of -AeExX3.  */
       || finalwrite & merge /* -i -m would rewrite input file.  */
       || (tag_count && ! flagging)) /* -L requires one of -AEX.  */
     try_help ("incompatible options", 0);
@@ -353,9 +358,9 @@ main (int argc, char **argv)
   if (argc - optind != 3)
     {
       if (argc - optind < 3)
-       try_help ("missing operand after '%s'", argv[argc - 1]);
+        try_help ("missing operand after '%s'", argv[argc - 1]);
       else
-       try_help ("extra operand '%s'", argv[optind + 3]);
+        try_help ("extra operand '%s'", argv[optind + 3]);
     }
 
   file = &argv[optind];
@@ -384,11 +389,11 @@ main (int argc, char **argv)
   if (STREQ (file[common], "-"))
     {
       /* Sigh.  We've got standard input as the common file.  We can't
-        call diff twice on stdin.  Use the other arg as the common
-        file instead.  */
+         call diff twice on stdin.  Use the other arg as the common
+         file instead.  */
       common = 3 - common;
       if (STREQ (file[0], "-") || STREQ (file[common], "-"))
-       fatal ("'-' specified for more than one input file");
+        fatal ("'-' specified for more than one input file");
     }
 
   mapping[0] = 0;
@@ -401,10 +406,10 @@ main (int argc, char **argv)
   for (i = 0; i < 3; i++)
     if (! STREQ (file[i], "-"))
       {
-       if (stat (file[i], &statb) < 0)
-         perror_with_exit (file[i]);
-       else if (S_ISDIR (statb.st_mode))
-         die (EXIT_TROUBLE, EISDIR, "%s", file[i]);
+        if (stat (file[i], &statb) < 0)
+          perror_with_exit (file[i]);
+        else if (S_ISDIR (statb.st_mode))
+          die (EXIT_TROUBLE, EISDIR, "%s", file[i]);
       }
 
 #ifdef SIGCHLD
@@ -431,15 +436,15 @@ main (int argc, char **argv)
   if (edscript)
     conflicts_found
       = output_diff3_edscript (stdout, diff3, mapping, rev_mapping,
-                              tag_strings[0], tag_strings[1], tag_strings[2]);
+                               tag_strings[0], tag_strings[1], tag_strings[2]);
   else if (merge)
     {
       xfreopen (file[rev_mapping[FILE0]], "r", stdin);
       conflicts_found
-       = output_diff3_merge (stdin, stdout, diff3, mapping, rev_mapping,
-                             tag_strings[0], tag_strings[1], tag_strings[2]);
+        = output_diff3_merge (stdin, stdout, diff3, mapping, rev_mapping,
+                              tag_strings[0], tag_strings[1], tag_strings[2]);
       if (ferror (stdin))
-       fatal ("read failed");
+        fatal ("read failed");
     }
   else
     {
@@ -459,7 +464,7 @@ try_help (char const *reason_msgid, char const *operand)
   if (reason_msgid)
     error (0, 0, _(reason_msgid), operand);
   die (EXIT_TROUBLE, 0,
-        _("Try '%s --help' for more information."), program_name);
+         _("Try '%s --help' for more information."), program_name);
 }
 
 static void
@@ -503,7 +508,7 @@ usage (void)
   char const * const *p;
 
   printf (_("Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n"),
-         program_name);
+          program_name);
   printf ("%s\n\n", _("Compare three files line by line."));
 
   fputs (_("\
@@ -525,8 +530,8 @@ Finally, the -m (--merge) option causes diff3 to do the merge internally\n\
 and output the actual merged file.  For unusual input, this is more\n\
 robust than using ed.\n"), stdout);
   printf ("\n%s\n%s\n",
-         _("If a FILE is '-', read standard input."),
-         _("Exit status is 0 if successful, 1 if conflicts, 2 if trouble."));
+          _("If a FILE is '-', read standard input."),
+          _("Exit status is 0 if successful, 1 if conflicts, 2 if trouble."));
   emit_bug_reporting_address ();
 }
 \f
@@ -537,43 +542,43 @@ robust than using ed.\n"), stdout);
      Diff02 is the diff between 0 and 2.
      Diff12 is the diff between 1 and 2.
 
-       1) Find the range for the first block in File2.
-           a) Take the lowest of the two ranges (in File2) in the two
-              current blocks (one from each diff) as being the low
-              water mark.  Assign the upper end of this block as
-              being the high water mark and move the current block up
-              one.  Mark the block just moved over as to be used.
-           b) Check the next block in the diff that the high water
-              mark is *not* from.
+        1) Find the range for the first block in File2.
+            a) Take the lowest of the two ranges (in File2) in the two
+               current blocks (one from each diff) as being the low
+               water mark.  Assign the upper end of this block as
+               being the high water mark and move the current block up
+               one.  Mark the block just moved over as to be used.
+            b) Check the next block in the diff that the high water
+               mark is *not* from.
 
-              *If* the high water mark is above
-              the low end of the range in that block,
+               *If* the high water mark is above
+               the low end of the range in that block,
 
-                  mark that block as to be used and move the current
-                  block up.  Set the high water mark to the max of
-                  the high end of this block and the current.  Repeat b.
+                   mark that block as to be used and move the current
+                   block up.  Set the high water mark to the max of
+                   the high end of this block and the current.  Repeat b.
 
-        2) Find the corresponding ranges in File0 (from the blocks
-           in diff02; line per line outside of diffs) and in File1.
-           Create a diff3_block, reserving space as indicated by the ranges.
+         2) Find the corresponding ranges in File0 (from the blocks
+            in diff02; line per line outside of diffs) and in File1.
+            Create a diff3_block, reserving space as indicated by the ranges.
 
-        3) Copy all of the pointers for file2 in.  At least for now,
-           do memcmp's between corresponding strings in the two diffs.
+         3) Copy all of the pointers for file2 in.  At least for now,
+            do memcmp's between corresponding strings in the two diffs.
 
-        4) Copy all of the pointers for file0 and 1 in.  Get what is
-           needed from file2 (when there isn't a diff block, it's
-           identical to file2 within the range between diff blocks).
+         4) Copy all of the pointers for file0 and 1 in.  Get what is
+            needed from file2 (when there isn't a diff block, it's
+            identical to file2 within the range between diff blocks).
 
-        5) If the diff blocks used came from only one of the two
-           strings of diffs, then that file (i.e. the one other than
-           the common file in that diff) is the odd person out.  If
-           diff blocks are used from both sets, check to see if files
-           0 and 1 match:
+         5) If the diff blocks used came from only one of the two
+            strings of diffs, then that file (i.e. the one other than
+            the common file in that diff) is the odd person out.  If
+            diff blocks are used from both sets, check to see if files
+            0 and 1 match:
 
-               Same number of lines?  If so, do a set of memcmp's (if
-           a memcmp matches; copy the pointer over; it'll be easier
-           later during comparisons).  If they match, 0 & 1 are the
-           same.  If not, all three different.
+                Same number of lines?  If so, do a set of memcmp's (if
+            a memcmp matches; copy the pointer over; it'll be easier
+            later during comparisons).  If they match, 0 & 1 are the
+            same.  If not, all three different.
 
      Then do it again, until the blocks are exhausted.  */
 
@@ -650,12 +655,12 @@ make_3way_diff (struct diff_block *thread0, struct diff_block *thread1)
 
       /* Setup low and high water threads, diffs, and marks.  */
       if (!current[0])
-       base_water_thread = 1;
+        base_water_thread = 1;
       else if (!current[1])
-       base_water_thread = 0;
+        base_water_thread = 0;
       else
-       base_water_thread =
-         (D_LOWLINE (current[0], FC) > D_LOWLINE (current[1], FC));
+        base_water_thread =
+          (D_LOWLINE (current[0], FC) > D_LOWLINE (current[1], FC));
 
       high_water_thread = base_water_thread;
 
@@ -665,8 +670,8 @@ make_3way_diff (struct diff_block *thread0, struct diff_block *thread1)
 
       /* Make the diff you just got info from into the using class */
       using[high_water_thread]
-       = last_using[high_water_thread]
-       = high_water_diff;
+        = last_using[high_water_thread]
+        = high_water_diff;
       current[high_water_thread] = high_water_diff->next;
       last_using[high_water_thread]->next = 0;
 
@@ -675,51 +680,51 @@ make_3way_diff (struct diff_block *thread0, struct diff_block *thread1)
       other_diff = current[other_thread];
 
       /* Shuffle up the ladder, checking the other diff to see if it
-        needs to be incorporated.  */
+         needs to be incorporated.  */
       while (other_diff
-            && D_LOWLINE (other_diff, FC) <= high_water_mark + 1)
-       {
-
-         /* Incorporate this diff into the using list.  Note that
-            this doesn't take it off the current list */
-         if (using[other_thread])
-           last_using[other_thread]->next = other_diff;
-         else
-           using[other_thread] = other_diff;
-         last_using[other_thread] = other_diff;
-
-         /* Take it off the current list.  Note that this following
-            code assumes that other_diff enters it equal to
-            current[high_water_thread ^ 0x1] */
-         current[other_thread] = current[other_thread]->next;
-         other_diff->next = 0;
-
-         /* Set the high_water stuff
-            If this comparison is equal, then this is the last pass
-            through this loop; since diff blocks within a given
-            thread cannot overlap, the high_water_mark will be
-            *below* the range_start of either of the next diffs.  */
-
-         if (high_water_mark < D_HIGHLINE (other_diff, FC))
-           {
-             high_water_thread ^= 1;
-             high_water_mark = D_HIGHLINE (other_diff, FC);
-           }
-
-         /* Set the other diff */
-         other_thread = high_water_thread ^ 0x1;
-         other_diff = current[other_thread];
-       }
+             && D_LOWLINE (other_diff, FC) <= high_water_mark + 1)
+        {
+
+          /* Incorporate this diff into the using list.  Note that
+             this doesn't take it off the current list */
+          if (using[other_thread])
+            last_using[other_thread]->next = other_diff;
+          else
+            using[other_thread] = other_diff;
+          last_using[other_thread] = other_diff;
+
+          /* Take it off the current list.  Note that this following
+             code assumes that other_diff enters it equal to
+             current[high_water_thread ^ 0x1] */
+          current[other_thread] = current[other_thread]->next;
+          other_diff->next = 0;
+
+          /* Set the high_water stuff
+             If this comparison is equal, then this is the last pass
+             through this loop; since diff blocks within a given
+             thread cannot overlap, the high_water_mark will be
+             *below* the range_start of either of the next diffs.  */
+
+          if (high_water_mark < D_HIGHLINE (other_diff, FC))
+            {
+              high_water_thread ^= 1;
+              high_water_mark = D_HIGHLINE (other_diff, FC);
+            }
+
+          /* Set the other diff */
+          other_thread = high_water_thread ^ 0x1;
+          other_diff = current[other_thread];
+        }
 
       /* The using lists contain a list of all of the blocks to be
-        included in this diff3_block.  Create it.  */
+         included in this diff3_block.  Create it.  */
 
       tmpblock = using_to_diff3_block (using, last_using,
-                                      base_water_thread, high_water_thread,
-                                      last_diff3);
+                                       base_water_thread, high_water_thread,
+                                       last_diff3);
 
       if (!tmpblock)
-       fatal ("internal error: screwup in format of diff blocks");
+        fatal ("internal error: screwup in format of diff blocks");
 
       /* Put it on the list.  */
       *result_end = tmpblock;
@@ -749,9 +754,9 @@ make_3way_diff (struct diff_block *thread0, struct diff_block *thread1)
 
 static struct diff3_block *
 using_to_diff3_block (struct diff_block *using[2],
-                     struct diff_block *last_using[2],
-                     int low_thread, int high_thread,
-                     struct diff3_block const *last_diff3)
+                      struct diff_block *last_using[2],
+                      int low_thread, int high_thread,
+                      struct diff3_block const *last_diff3)
 {
   lin low[2], high[2];
   struct diff3_block *result;
@@ -770,13 +775,13 @@ using_to_diff3_block (struct diff_block *using[2],
   for (d = 0; d < 2; d++)
     if (using[d])
       {
-       low[d] = D_LOW_MAPLINE (using[d], FC, FO, lowc);
-       high[d] = D_HIGH_MAPLINE (last_using[d], FC, FO, highc);
+        low[d] = D_LOW_MAPLINE (using[d], FC, FO, lowc);
+        high[d] = D_HIGH_MAPLINE (last_using[d], FC, FO, highc);
       }
     else
       {
-       low[d] = D_HIGH_MAPLINE (last_diff3, FILEC, FILE0 + d, lowc);
-       high[d] = D_HIGH_MAPLINE (last_diff3, FILEC, FILE0 + d, highc);
+        low[d] = D_HIGH_MAPLINE (last_diff3, FILEC, FILE0 + d, lowc);
+        high[d] = D_HIGH_MAPLINE (last_diff3, FILEC, FILE0 + d, highc);
       }
 
   /* Create a block with the appropriate sizes */
@@ -788,14 +793,14 @@ using_to_diff3_block (struct diff_block *using[2],
   for (d = 0; d < 2; d++)
     for (ptr = using[d]; ptr; ptr = D_NEXT (ptr))
       {
-       lin result_offset = D_LOWLINE (ptr, FC) - lowc;
-
-       if (!copy_stringlist (D_LINEARRAY (ptr, FC),
-                             D_LENARRAY (ptr, FC),
-                             D_LINEARRAY (result, FILEC) + result_offset,
-                             D_LENARRAY (result, FILEC) + result_offset,
-                             D_NUMLINES (ptr, FC)))
-         return 0;
+        lin result_offset = D_LOWLINE (ptr, FC) - lowc;
+
+        if (!copy_stringlist (D_LINEARRAY (ptr, FC),
+                              D_LENARRAY (ptr, FC),
+                              D_LINEARRAY (result, FILEC) + result_offset,
+                              D_LENARRAY (result, FILEC) + result_offset,
+                              D_NUMLINES (ptr, FC)))
+          return 0;
       }
 
   /* Copy information for file d.  First deal with anything that might be
@@ -807,36 +812,36 @@ using_to_diff3_block (struct diff_block *using[2],
       lin lo = low[d], hi = high[d];
 
       for (i = 0;
-          i + lo < (u ? D_LOWLINE (u, FO) : hi + 1);
-          i++)
-       {
-         D_RELNUM (result, FILE0 + d, i) = D_RELNUM (result, FILEC, i);
-         D_RELLEN (result, FILE0 + d, i) = D_RELLEN (result, FILEC, i);
-       }
+           i + lo < (u ? D_LOWLINE (u, FO) : hi + 1);
+           i++)
+        {
+          D_RELNUM (result, FILE0 + d, i) = D_RELNUM (result, FILEC, i);
+          D_RELLEN (result, FILE0 + d, i) = D_RELLEN (result, FILEC, i);
+        }
 
       for (ptr = u; ptr; ptr = D_NEXT (ptr))
-       {
-         lin result_offset = D_LOWLINE (ptr, FO) - lo;
-         lin linec;
-
-         if (!copy_stringlist (D_LINEARRAY (ptr, FO),
-                               D_LENARRAY (ptr, FO),
-                               D_LINEARRAY (result, FILE0 + d) + result_offset,
-                               D_LENARRAY (result, FILE0 + d) + result_offset,
-                               D_NUMLINES (ptr, FO)))
-           return 0;
-
-         /* Catch the lines between here and the next diff */
-         linec = D_HIGHLINE (ptr, FC) + 1 - lowc;
-         for (i = D_HIGHLINE (ptr, FO) + 1 - lo;
-              i < (D_NEXT (ptr) ? D_LOWLINE (D_NEXT (ptr), FO) : hi + 1) - lo;
-              i++)
-           {
-             D_RELNUM (result, FILE0 + d, i) = D_RELNUM (result, FILEC, linec);
-             D_RELLEN (result, FILE0 + d, i) = D_RELLEN (result, FILEC, linec);
-             linec++;
-           }
-       }
+        {
+          lin result_offset = D_LOWLINE (ptr, FO) - lo;
+          lin linec;
+
+          if (!copy_stringlist (D_LINEARRAY (ptr, FO),
+                                D_LENARRAY (ptr, FO),
+                                D_LINEARRAY (result, FILE0 + d) + result_offset,
+                                D_LENARRAY (result, FILE0 + d) + result_offset,
+                                D_NUMLINES (ptr, FO)))
+            return 0;
+
+          /* Catch the lines between here and the next diff */
+          linec = D_HIGHLINE (ptr, FC) + 1 - lowc;
+          for (i = D_HIGHLINE (ptr, FO) + 1 - lo;
+               i < (D_NEXT (ptr) ? D_LOWLINE (D_NEXT (ptr), FO) : hi + 1) - lo;
+               i++)
+            {
+              D_RELNUM (result, FILE0 + d, i) = D_RELNUM (result, FILEC, linec);
+              D_RELLEN (result, FILE0 + d, i) = D_RELLEN (result, FILEC, linec);
+              linec++;
+            }
+        }
     }
 
   /* Set correspond */
@@ -850,14 +855,14 @@ using_to_diff3_block (struct diff_block *using[2],
       lin nl1 = D_NUMLINES (result, FILE1);
 
       if (nl0 != nl1
-         || !compare_line_list (D_LINEARRAY (result, FILE0),
-                                D_LENARRAY (result, FILE0),
-                                D_LINEARRAY (result, FILE1),
-                                D_LENARRAY (result, FILE1),
-                                nl0))
-       D3_TYPE (result) = DIFF_ALL;
+          || !compare_line_list (D_LINEARRAY (result, FILE0),
+                                 D_LENARRAY (result, FILE0),
+                                 D_LINEARRAY (result, FILE1),
+                                 D_LENARRAY (result, FILE1),
+                                 nl0))
+        D3_TYPE (result) = DIFF_ALL;
       else
-       D3_TYPE (result) = DIFF_3RD;
+        D3_TYPE (result) = DIFF_3RD;
     }
 
   return result;
@@ -870,8 +875,8 @@ using_to_diff3_block (struct diff_block *using[2],
 
 static bool
 copy_stringlist (char * const fromptrs[], size_t const fromlengths[],
-                char *toptrs[], size_t tolengths[],
-                lin copynum)
+                 char *toptrs[], size_t tolengths[],
+                 lin copynum)
 {
   register char * const *f = fromptrs;
   register char **t = toptrs;
@@ -881,15 +886,15 @@ copy_stringlist (char * const fromptrs[], size_t const fromlengths[],
   while (copynum--)
     {
       if (*t)
-       {
-         if (*fl != *tl || memcmp (*f, *t, *fl) != 0)
-           return false;
-       }
+        {
+          if (*fl != *tl || memcmp (*f, *t, *fl) != 0)
+            return false;
+        }
       else
-       {
-         *t = *f;
-         *tl = *fl;
-       }
+        {
+          *t = *f;
+          *tl = *fl;
+        }
 
       t++; f++; tl++; fl++;
     }
@@ -903,8 +908,8 @@ copy_stringlist (char * const fromptrs[], size_t const fromlengths[],
 
 static struct diff3_block *
 create_diff3_block (lin low0, lin high0,
-                   lin low1, lin high1,
-                   lin low2, lin high2)
+                    lin low1, lin high1,
+                    lin low2, lin high2)
 {
   struct diff3_block *result = xmalloc (sizeof *result);
   lin numlines;
@@ -966,8 +971,8 @@ create_diff3_block (lin low0, lin high0,
 
 static bool
 compare_line_list (char * const list1[], size_t const lengths1[],
-                  char * const list2[], size_t const lengths2[],
-                  lin nl)
+                   char * const list2[], size_t const lengths2[],
+                   lin nl)
 {
   char * const *l1 = list1;
   char * const *l2 = list2;
@@ -976,7 +981,7 @@ compare_line_list (char * const list1[], size_t const lengths1[],
 
   while (nl--)
     if (!*l1 || !*l2 || *lgths1 != *lgths2++
-       || memcmp (*l1++, *l2++, *lgths1++) != 0)
+        || memcmp (*l1++, *l2++, *lgths1++) != 0)
       return false;
   return true;
 }
@@ -985,9 +990,9 @@ compare_line_list (char * const list1[], size_t const lengths1[],
 
 static struct diff_block *
 process_diff (char const *filea,
-             char const *fileb,
-             struct diff_block **last_block,
-             char **buf_to_free)
+              char const *fileb,
+              struct diff_block **last_block,
+              char **buf_to_free)
 {
   char *diff_contents;
   char *diff_limit;
@@ -998,8 +1003,8 @@ process_diff (char const *filea,
   struct diff_block **block_list_end = &block_list;
   struct diff_block *bptr IF_LINT (= NULL);
   size_t too_many_lines = (PTRDIFF_MAX
-                          / MIN (sizeof *bptr->lines[1],
-                                 sizeof *bptr->lengths[1]));
+                           / MIN (sizeof *bptr->lines[1],
+                                  sizeof *bptr->lengths[1]));
 
   diff_limit = read_diff (filea, fileb, &diff_contents);
   *buf_to_free = diff_contents;
@@ -1013,74 +1018,74 @@ process_diff (char const *filea,
 
       dt = process_diff_control (&scan_diff, bptr);
       if (dt == ERROR || *scan_diff != '\n')
-       {
-         fprintf (stderr, _("%s: diff failed: "), program_name);
-         do
-           {
-             putc (*scan_diff, stderr);
-           }
-         while (*scan_diff++ != '\n');
-         exit (EXIT_TROUBLE);
-       }
+        {
+          fprintf (stderr, _("%s: diff failed: "), program_name);
+          do
+            {
+              putc (*scan_diff, stderr);
+            }
+          while (*scan_diff++ != '\n');
+          exit (EXIT_TROUBLE);
+        }
       scan_diff++;
 
       /* Force appropriate ranges to be null, if necessary */
       switch (dt)
-       {
-       case ADD:
-         bptr->ranges[0][0]++;
-         break;
-       case DELETE:
-         bptr->ranges[1][0]++;
-         break;
-       case CHANGE:
-         break;
-       default:
-         fatal ("internal error: invalid diff type in process_diff");
-         break;
-       }
+        {
+        case ADD:
+          bptr->ranges[0][0]++;
+          break;
+        case DELETE:
+          bptr->ranges[1][0]++;
+          break;
+        case CHANGE:
+          break;
+        default:
+          fatal ("internal error: invalid diff type in process_diff");
+          break;
+        }
 
       /* Allocate space for the pointers for the lines from filea, and
-        parcel them out among these pointers */
+         parcel them out among these pointers */
       if (dt != ADD)
-       {
-         lin numlines = D_NUMLINES (bptr, 0);
-         if (too_many_lines <= numlines)
-           xalloc_die ();
-         bptr->lines[0] = xmalloc (numlines * sizeof *bptr->lines[0]);
-         bptr->lengths[0] = xmalloc (numlines * sizeof *bptr->lengths[0]);
-         for (i = 0; i < numlines; i++)
-           scan_diff = scan_diff_line (scan_diff,
-                                       &(bptr->lines[0][i]),
-                                       &(bptr->lengths[0][i]),
-                                       diff_limit,
-                                       '<');
-       }
+        {
+          lin numlines = D_NUMLINES (bptr, 0);
+          if (too_many_lines <= numlines)
+            xalloc_die ();
+          bptr->lines[0] = xmalloc (numlines * sizeof *bptr->lines[0]);
+          bptr->lengths[0] = xmalloc (numlines * sizeof *bptr->lengths[0]);
+          for (i = 0; i < numlines; i++)
+            scan_diff = scan_diff_line (scan_diff,
+                                        &(bptr->lines[0][i]),
+                                        &(bptr->lengths[0][i]),
+                                        diff_limit,
+                                        '<');
+        }
 
       /* Get past the separator for changes */
       if (dt == CHANGE)
-       {
-         if (strncmp (scan_diff, "---\n", 4))
-           fatal ("invalid diff format; invalid change separator");
-         scan_diff += 4;
-       }
+        {
+          if (strncmp (scan_diff, "---\n", 4))
+            fatal ("invalid diff format; invalid change separator");
+          scan_diff += 4;
+        }
 
       /* Allocate space for the pointers for the lines from fileb, and
-        parcel them out among these pointers */
+         parcel them out among these pointers */
       if (dt != DELETE)
-       {
-         lin numlines = D_NUMLINES (bptr, 1);
-         if (too_many_lines <= numlines)
-           xalloc_die ();
-         bptr->lines[1] = xmalloc (numlines * sizeof *bptr->lines[1]);
-         bptr->lengths[1] = xmalloc (numlines * sizeof *bptr->lengths[1]);
-         for (i = 0; i < numlines; i++)
-           scan_diff = scan_diff_line (scan_diff,
-                                       &(bptr->lines[1][i]),
-                                       &(bptr->lengths[1][i]),
-                                       diff_limit,
-                                       '>');
-       }
+        {
+          lin numlines = D_NUMLINES (bptr, 1);
+          if (too_many_lines <= numlines)
+            xalloc_die ();
+          bptr->lines[1] = xmalloc (numlines * sizeof *bptr->lines[1]);
+          bptr->lengths[1] = xmalloc (numlines * sizeof *bptr->lengths[1]);
+          for (i = 0; i < numlines; i++)
+            scan_diff = scan_diff_line (scan_diff,
+                                        &(bptr->lines[1][i]),
+                                        &(bptr->lengths[1][i]),
+                                        diff_limit,
+                                        '>');
+        }
 
       /* Place this block on the blocklist.  */
       *block_list_end = bptr;
@@ -1156,7 +1161,7 @@ process_diff_control (char **string, struct diff_block *db)
     {
       s = readnum (s + 1, &db->ranges[0][RANGE_END]);
       if (! s)
-       return ERROR;
+        return ERROR;
     }
   else
     db->ranges[0][RANGE_END] = db->ranges[0][RANGE_START];
@@ -1190,7 +1195,7 @@ process_diff_control (char **string, struct diff_block *db)
     {
       s = readnum (s + 1, &db->ranges[1][RANGE_END]);
       if (! s)
-       return ERROR;
+        return ERROR;
       s = skipwhite (s);               /* To move to end */
     }
   else
@@ -1202,8 +1207,8 @@ process_diff_control (char **string, struct diff_block *db)
 
 static char *
 read_diff (char const *filea,
-          char const *fileb,
-          char **output_placement)
+           char const *fileb,
+           char **output_placement)
 {
   char *diff_result;
   size_t current_chunk_size, total;
@@ -1243,13 +1248,13 @@ read_diff (char const *filea,
       /* Child */
       close (fds[0]);
       if (fds[1] != STDOUT_FILENO)
-       {
-         dup2 (fds[1], STDOUT_FILENO);
-         close (fds[1]);
-       }
+        {
+          dup2 (fds[1], STDOUT_FILENO);
+          close (fds[1]);
+        }
 
       /* The cast to (char **) is needed for portability to older
-        hosts with a nonstandard prototype for execvp.  */
+         hosts with a nonstandard prototype for execvp.  */
       execvp (diff_program, (char **) argv);
 
       _exit (errno == ENOENT ? 127 : 126);
@@ -1285,13 +1290,13 @@ read_diff (char const *filea,
       size_t bytes = block_read (fd, diff_result + total, bytes_to_read);
       total += bytes;
       if (bytes != bytes_to_read)
-       {
-         if (bytes == SIZE_MAX)
-           perror_with_exit (_("read failed"));
-         break;
-       }
+        {
+          if (bytes == SIZE_MAX)
+            perror_with_exit (_("read failed"));
+          break;
+        }
       if (PTRDIFF_MAX / 2 <= current_chunk_size)
-       xalloc_die ();
+        xalloc_die ();
       current_chunk_size *= 2;
       diff_result = xrealloc (diff_result, current_chunk_size);
     }
@@ -1320,14 +1325,14 @@ read_diff (char const *filea,
 
   if (EXIT_TROUBLE <= status)
     die (EXIT_TROUBLE, werrno,
-          _(status == 126
-            ? "subsidiary program '%s' could not be invoked"
-            : status == 127
-            ? "subsidiary program '%s' not found"
-            : status == INT_MAX
-            ? "subsidiary program '%s' failed"
-            : "subsidiary program '%s' failed (exit status %d)"),
-          diff_program, status);
+           _(status == 126
+             ? "subsidiary program '%s' could not be invoked"
+             : status == 127
+             ? "subsidiary program '%s' not found"
+             : status == INT_MAX
+             ? "subsidiary program '%s' failed"
+             : "subsidiary program '%s' failed (exit status %d)"),
+           diff_program, status);
 
   return diff_result + total;
 }
@@ -1340,12 +1345,12 @@ read_diff (char const *filea,
    are used as call-by-reference values.  */
 static char *
 scan_diff_line (char *scan_ptr, char **set_start, size_t *set_length,
-               char *limit, char leadingchar)
+                char *limit, char leadingchar)
 {
   char *line_ptr;
 
   if (!(scan_ptr[0] == leadingchar
-       && scan_ptr[1] == ' '))
+        && scan_ptr[1] == ' '))
     fatal ("invalid diff format; incorrect leading line chars");
 
   *set_start = line_ptr = scan_ptr + 2;
@@ -1361,15 +1366,15 @@ scan_diff_line (char *scan_ptr, char **set_start, size_t *set_length,
   if (line_ptr < limit && *line_ptr == '\\')
     {
       if (edscript)
-       fprintf (stderr, "%s:", program_name);
+        fprintf (stderr, "%s:", program_name);
       else
-       --*set_length;
+        --*set_length;
       line_ptr++;
       do
-       {
-         if (edscript)
-           putc (*line_ptr, stderr);
-       }
+        {
+          if (edscript)
+            putc (*line_ptr, stderr);
+        }
       while (*line_ptr++ != '\n');
     }
 
@@ -1386,7 +1391,7 @@ scan_diff_line (char *scan_ptr, char **set_start, size_t *set_length,
 
 static void
 output_diff3 (FILE *outputfile, struct diff3_block *diff,
-             int const mapping[3], int const rev_mapping[3])
+              int const mapping[3], int const rev_mapping[3])
 {
   int i;
   int oddoneout;
@@ -1403,68 +1408,68 @@ output_diff3 (FILE *outputfile, struct diff3_block *diff,
       char x[2];
 
       switch (ptr->correspond)
-       {
-       case DIFF_ALL:
-         x[0] = 0;
-         dontprint = 3;        /* Print them all */
-         oddoneout = 3;        /* Nobody's odder than anyone else */
-         break;
-       case DIFF_1ST:
-       case DIFF_2ND:
-       case DIFF_3RD:
-         oddoneout = rev_mapping[ptr->correspond - DIFF_1ST];
-
-         x[0] = oddoneout + '1';
-         x[1] = 0;
-         dontprint = oddoneout == 0;
-         break;
-       default:
-         fatal ("internal error: invalid diff type passed to output");
-       }
+        {
+        case DIFF_ALL:
+          x[0] = 0;
+          dontprint = 3;       /* Print them all */
+          oddoneout = 3;       /* Nobody's odder than anyone else */
+          break;
+        case DIFF_1ST:
+        case DIFF_2ND:
+        case DIFF_3RD:
+          oddoneout = rev_mapping[ptr->correspond - DIFF_1ST];
+
+          x[0] = oddoneout + '1';
+          x[1] = 0;
+          dontprint = oddoneout == 0;
+          break;
+        default:
+          fatal ("internal error: invalid diff type passed to output");
+        }
       fprintf (outputfile, "====%s\n", x);
 
       /* Go 0, 2, 1 if the first and third outputs are equivalent.  */
       for (i = 0; i < 3;
-          i = (oddoneout == 1 ? skew_increment[i] : i + 1))
-       {
-         int realfile = mapping[i];
-         lin lowt = D_LOWLINE (ptr, realfile);
-         lin hight = D_HIGHLINE (ptr, realfile);
-         printint llowt = lowt;
-         printint lhight = hight;
-
-         fprintf (outputfile, "%d:", i + 1);
-         switch (lowt - hight)
-           {
-           case 1:
-             fprintf (outputfile, "%"pI"da\n", llowt - 1);
-             break;
-           case 0:
-             fprintf (outputfile, "%"pI"dc\n", llowt);
-             break;
-           default:
-             fprintf (outputfile, "%"pI"d,%"pI"dc\n", llowt, lhight);
-             break;
-           }
-
-         if (i == dontprint) continue;
-
-         if (lowt <= hight)
-           {
-             line = 0;
-             do
-               {
-                 fputs (line_prefix, outputfile);
-                 cp = D_RELNUM (ptr, realfile, line);
-                 length = D_RELLEN (ptr, realfile, line);
-                 fwrite (cp, sizeof (char), length, outputfile);
-               }
-             while (++line < hight - lowt + 1);
-             if (cp[length - 1] != '\n')
-               fprintf (outputfile, "\n\\ %s\n",
-                        _("No newline at end of file"));
-           }
-       }
+           i = (oddoneout == 1 ? skew_increment[i] : i + 1))
+        {
+          int realfile = mapping[i];
+          lin lowt = D_LOWLINE (ptr, realfile);
+          lin hight = D_HIGHLINE (ptr, realfile);
+          printint llowt = lowt;
+          printint lhight = hight;
+
+          fprintf (outputfile, "%d:", i + 1);
+          switch (lowt - hight)
+            {
+            case 1:
+              fprintf (outputfile, "%"pI"da\n", llowt - 1);
+              break;
+            case 0:
+              fprintf (outputfile, "%"pI"dc\n", llowt);
+              break;
+            default:
+              fprintf (outputfile, "%"pI"d,%"pI"dc\n", llowt, lhight);
+              break;
+            }
+
+          if (i == dontprint) continue;
+
+          if (lowt <= hight)
+            {
+              line = 0;
+              do
+                {
+                  fputs (line_prefix, outputfile);
+                  cp = D_RELNUM (ptr, realfile, line);
+                  length = D_RELLEN (ptr, realfile, line);
+                  fwrite (cp, sizeof (char), length, outputfile);
+                }
+              while (++line < hight - lowt + 1);
+              if (cp[length - 1] != '\n')
+                fprintf (outputfile, "\n\\ %s\n",
+                         _("No newline at end of file"));
+            }
+        }
     }
 }
 
@@ -1484,12 +1489,12 @@ dotlines (FILE *outputfile, struct diff3_block *b, int filenum)
     {
       char *line = D_RELNUM (b, filenum, i);
       if (line[0] == '.')
-       {
-         leading_dot = true;
-         fputc ('.', outputfile);
-       }
+        {
+          leading_dot = true;
+          fputc ('.', outputfile);
+        }
       fwrite (line, sizeof (char),
-             D_RELLEN (b, filenum, i), outputfile);
+              D_RELLEN (b, filenum, i), outputfile);
     }
 
   return leading_dot;
@@ -1506,9 +1511,9 @@ undotlines (FILE *outputfile, bool leading_dot, printint start, printint num)
   if (leading_dot)
     {
       if (num == 1)
-       fprintf (outputfile, "%"pI"ds/^\\.//\n", start);
+        fprintf (outputfile, "%"pI"ds/^\\.//\n", start);
       else
-       fprintf (outputfile, "%"pI"d,%"pI"ds/^\\.//\n", start, start + num - 1);
+        fprintf (outputfile, "%"pI"d,%"pI"ds/^\\.//\n", start, start + num - 1);
     }
 }
 
@@ -1533,8 +1538,8 @@ undotlines (FILE *outputfile, bool leading_dot, printint start, printint num)
 
 static bool
 output_diff3_edscript (FILE *outputfile, struct diff3_block *diff,
-                      int const mapping[3], int const rev_mapping[3],
-                      char const *file0, char const *file1, char const *file2)
+                       int const mapping[3], int const rev_mapping[3],
+                       char const *file0, char const *file1, char const *file2)
 {
   bool leading_dot;
   bool conflicts_found = false;
@@ -1545,92 +1550,92 @@ output_diff3_edscript (FILE *outputfile, struct diff3_block *diff,
     {
       /* Must do mapping correctly.  */
       enum diff_type type
-       = (b->correspond == DIFF_ALL
-          ? DIFF_ALL
-          : DIFF_1ST + rev_mapping[b->correspond - DIFF_1ST]);
+        = (b->correspond == DIFF_ALL
+           ? DIFF_ALL
+           : DIFF_1ST + rev_mapping[b->correspond - DIFF_1ST]);
 
       printint low0, high0;
 
       /* If we aren't supposed to do this output block, skip it.  */
       switch (type)
-       {
-       default: continue;
-       case DIFF_2ND: if (!show_2nd) continue; conflict = true; break;
-       case DIFF_3RD: if (overlap_only) continue; conflict = false; break;
-       case DIFF_ALL: if (simple_only) continue; conflict = flagging; break;
-       }
+        {
+        default: continue;
+        case DIFF_2ND: if (!show_2nd) continue; conflict = true; break;
+        case DIFF_3RD: if (overlap_only) continue; conflict = false; break;
+        case DIFF_ALL: if (simple_only) continue; conflict = flagging; break;
+        }
 
       low0 = D_LOWLINE (b, mapping[FILE0]);
       high0 = D_HIGHLINE (b, mapping[FILE0]);
 
       if (conflict)
-       {
-         conflicts_found = true;
-
-
-         /* Mark end of conflict.  */
-
-         fprintf (outputfile, "%"pI"da\n", high0);
-         leading_dot = false;
-         if (type == DIFF_ALL)
-           {
-             if (show_2nd)
-               {
-                 /* Append lines from FILE1.  */
-                 fprintf (outputfile, "||||||| %s\n", file1);
-                 leading_dot = dotlines (outputfile, b, mapping[FILE1]);
-               }
-             /* Append lines from FILE2.  */
-             fputs ("=======\n", outputfile);
-             leading_dot |= dotlines (outputfile, b, mapping[FILE2]);
-           }
-         fprintf (outputfile, ">>>>>>> %s\n", file2);
-         undotlines (outputfile, leading_dot, high0 + 2,
-                     (D_NUMLINES (b, mapping[FILE1])
-                      + D_NUMLINES (b, mapping[FILE2]) + 1));
-
-
-         /* Mark start of conflict.  */
-
-         fprintf (outputfile, "%"pI"da\n<<<<<<< %s\n", low0 - 1,
-                  type == DIFF_ALL ? file0 : file1);
-         leading_dot = false;
-         if (type == DIFF_2ND)
-           {
-             /* Prepend lines from FILE1.  */
-             leading_dot = dotlines (outputfile, b, mapping[FILE1]);
-             fputs ("=======\n", outputfile);
-           }
-         undotlines (outputfile, leading_dot, low0 + 1,
-                     D_NUMLINES (b, mapping[FILE1]));
-       }
+        {
+          conflicts_found = true;
+
+
+          /* Mark end of conflict.  */
+
+          fprintf (outputfile, "%"pI"da\n", high0);
+          leading_dot = false;
+          if (type == DIFF_ALL)
+            {
+              if (show_2nd)
+                {
+                  /* Append lines from FILE1.  */
+                  fprintf (outputfile, "||||||| %s\n", file1);
+                  leading_dot = dotlines (outputfile, b, mapping[FILE1]);
+                }
+              /* Append lines from FILE2.  */
+              fputs ("=======\n", outputfile);
+              leading_dot |= dotlines (outputfile, b, mapping[FILE2]);
+            }
+          fprintf (outputfile, ">>>>>>> %s\n", file2);
+          undotlines (outputfile, leading_dot, high0 + 2,
+                      (D_NUMLINES (b, mapping[FILE1])
+                       + D_NUMLINES (b, mapping[FILE2]) + 1));
+
+
+          /* Mark start of conflict.  */
+
+          fprintf (outputfile, "%"pI"da\n<<<<<<< %s\n", low0 - 1,
+                   type == DIFF_ALL ? file0 : file1);
+          leading_dot = false;
+          if (type == DIFF_2ND)
+            {
+              /* Prepend lines from FILE1.  */
+              leading_dot = dotlines (outputfile, b, mapping[FILE1]);
+              fputs ("=======\n", outputfile);
+            }
+          undotlines (outputfile, leading_dot, low0 + 1,
+                      D_NUMLINES (b, mapping[FILE1]));
+        }
       else if (D_NUMLINES (b, mapping[FILE2]) == 0)
-       /* Write out a delete */
-       {
-         if (low0 == high0)
-           fprintf (outputfile, "%"pI"dd\n", low0);
-         else
-           fprintf (outputfile, "%"pI"d,%"pI"dd\n", low0, high0);
-       }
+        /* Write out a delete */
+        {
+          if (low0 == high0)
+            fprintf (outputfile, "%"pI"dd\n", low0);
+          else
+            fprintf (outputfile, "%"pI"d,%"pI"dd\n", low0, high0);
+        }
       else
-       /* Write out an add or change */
-       {
-         switch (high0 - low0)
-           {
-           case -1:
-             fprintf (outputfile, "%"pI"da\n", high0);
-             break;
-           case 0:
-             fprintf (outputfile, "%"pI"dc\n", high0);
-             break;
-           default:
-             fprintf (outputfile, "%"pI"d,%"pI"dc\n", low0, high0);
-             break;
-           }
-
-         undotlines (outputfile, dotlines (outputfile, b, mapping[FILE2]),
-                     low0, D_NUMLINES (b, mapping[FILE2]));
-       }
+        /* Write out an add or change */
+        {
+          switch (high0 - low0)
+            {
+            case -1:
+              fprintf (outputfile, "%"pI"da\n", high0);
+              break;
+            case 0:
+              fprintf (outputfile, "%"pI"dc\n", high0);
+              break;
+            default:
+              fprintf (outputfile, "%"pI"d,%"pI"dc\n", low0, high0);
+              break;
+            }
+
+          undotlines (outputfile, dotlines (outputfile, b, mapping[FILE2]),
+                      low0, D_NUMLINES (b, mapping[FILE2]));
+        }
     }
   if (finalwrite)
     fputs ("w\nq\n", outputfile);
@@ -1650,8 +1655,8 @@ output_diff3_edscript (FILE *outputfile, struct diff3_block *diff,
 
 static bool
 output_diff3_merge (FILE *infile, FILE *outputfile, struct diff3_block *diff,
-                   int const mapping[3], int const rev_mapping[3],
-                   char const *file0, char const *file1, char const *file2)
+                    int const mapping[3], int const rev_mapping[3],
+                    char const *file0, char const *file1, char const *file2)
 {
   int c;
   lin i;
@@ -1664,95 +1669,95 @@ output_diff3_merge (FILE *infile, FILE *outputfile, struct diff3_block *diff,
     {
       /* Must do mapping correctly.  */
       enum diff_type type
-       = ((b->correspond == DIFF_ALL)
-          ? DIFF_ALL
-          : DIFF_1ST + rev_mapping[b->correspond - DIFF_1ST]);
+        = ((b->correspond == DIFF_ALL)
+           ? DIFF_ALL
+           : DIFF_1ST + rev_mapping[b->correspond - DIFF_1ST]);
       char const *format_2nd = "<<<<<<< %s\n";
 
       /* If we aren't supposed to do this output block, skip it.  */
       switch (type)
-       {
-       default: continue;
-       case DIFF_2ND: if (!show_2nd) continue; conflict = true; break;
-       case DIFF_3RD: if (overlap_only) continue; conflict = false; break;
-       case DIFF_ALL: if (simple_only) continue; conflict = flagging;
-         format_2nd = "||||||| %s\n";
-         break;
-       }
+        {
+        default: continue;
+        case DIFF_2ND: if (!show_2nd) continue; conflict = true; break;
+        case DIFF_3RD: if (overlap_only) continue; conflict = false; break;
+        case DIFF_ALL: if (simple_only) continue; conflict = flagging;
+          format_2nd = "||||||| %s\n";
+          break;
+        }
 
       /* Copy I lines from file 0.  */
       i = D_LOWLINE (b, FILE0) - linesread - 1;
       linesread += i;
       while (0 <= --i)
-       do
-         {
-           c = getc (infile);
-           if (c == EOF)
-             {
-               if (ferror (infile))
-                 perror_with_exit (_("read failed"));
-               else if (feof (infile))
-                 fatal ("input file shrank");
-             }
-           putc (c, outputfile);
-         }
-       while (c != '\n');
+        do
+          {
+            c = getc (infile);
+            if (c == EOF)
+              {
+                if (ferror (infile))
+                  perror_with_exit (_("read failed"));
+                else if (feof (infile))
+                  fatal ("input file shrank");
+              }
+            putc (c, outputfile);
+          }
+        while (c != '\n');
 
       if (conflict)
-       {
-         conflicts_found = true;
-
-         if (type == DIFF_ALL)
-           {
-             /* Put in lines from FILE0 with bracket.  */
-             fprintf (outputfile, "<<<<<<< %s\n", file0);
-             for (i = 0;
-                  i < D_NUMLINES (b, mapping[FILE0]);
-                  i++)
-               fwrite (D_RELNUM (b, mapping[FILE0], i), sizeof (char),
-                       D_RELLEN (b, mapping[FILE0], i), outputfile);
-           }
-
-         if (show_2nd)
-           {
-             /* Put in lines from FILE1 with bracket.  */
-             fprintf (outputfile, format_2nd, file1);
-             for (i = 0;
-                  i < D_NUMLINES (b, mapping[FILE1]);
-                  i++)
-               fwrite (D_RELNUM (b, mapping[FILE1], i), sizeof (char),
-                       D_RELLEN (b, mapping[FILE1], i), outputfile);
-           }
-
-         fputs ("=======\n", outputfile);
-       }
+        {
+          conflicts_found = true;
+
+          if (type == DIFF_ALL)
+            {
+              /* Put in lines from FILE0 with bracket.  */
+              fprintf (outputfile, "<<<<<<< %s\n", file0);
+              for (i = 0;
+                   i < D_NUMLINES (b, mapping[FILE0]);
+                   i++)
+                fwrite (D_RELNUM (b, mapping[FILE0], i), sizeof (char),
+                        D_RELLEN (b, mapping[FILE0], i), outputfile);
+            }
+
+          if (show_2nd)
+            {
+              /* Put in lines from FILE1 with bracket.  */
+              fprintf (outputfile, format_2nd, file1);
+              for (i = 0;
+                   i < D_NUMLINES (b, mapping[FILE1]);
+                   i++)
+                fwrite (D_RELNUM (b, mapping[FILE1], i), sizeof (char),
+                        D_RELLEN (b, mapping[FILE1], i), outputfile);
+            }
+
+          fputs ("=======\n", outputfile);
+        }
 
       /* Put in lines from FILE2.  */
       for (i = 0;
-          i < D_NUMLINES (b, mapping[FILE2]);
-          i++)
-       fwrite (D_RELNUM (b, mapping[FILE2], i), sizeof (char),
-               D_RELLEN (b, mapping[FILE2], i), outputfile);
+           i < D_NUMLINES (b, mapping[FILE2]);
+           i++)
+        fwrite (D_RELNUM (b, mapping[FILE2], i), sizeof (char),
+                D_RELLEN (b, mapping[FILE2], i), outputfile);
 
       if (conflict)
-       fprintf (outputfile, ">>>>>>> %s\n", file2);
+        fprintf (outputfile, ">>>>>>> %s\n", file2);
 
       /* Skip I lines in file 0.  */
       i = D_NUMLINES (b, FILE0);
       linesread += i;
       while (0 <= --i)
-       while ((c = getc (infile)) != '\n')
-         if (c == EOF)
-           {
-             if (ferror (infile))
-               perror_with_exit (_("read failed"));
-             else if (feof (infile))
-               {
-                 if (i || b->next)
-                   fatal ("input file shrank");
-                 return conflicts_found;
-               }
-           }
+        while ((c = getc (infile)) != '\n')
+          if (c == EOF)
+            {
+              if (ferror (infile))
+                perror_with_exit (_("read failed"));
+              else if (feof (infile))
+                {
+                  if (i || b->next)
+                    fatal ("input file shrank");
+                  return conflicts_found;
+                }
+            }
     }
   /* Copy rest of common file.  */
   while ((c = getc (infile)) != EOF || !(ferror (infile) | feof (infile)))
index 734603e..01a32ab 100644 (file)
--- a/src/dir.c
+++ b/src/dir.c
@@ -1,7 +1,7 @@
 /* Read, sort and compare two directories.  Used for GNU DIFF.
 
    Copyright (C) 1988-1989, 1992-1995, 1998, 2001-2002, 2004, 2006-2007,
-   2009-2013, 2015-2018 Free Software Foundation, Inc.
+   2009-2013, 2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -75,7 +75,7 @@ dir_read (struct file_data const *dir, struct dirdata *dirdata)
       /* Open the directory and check for errors.  */
       register DIR *reading = opendir (dir->name);
       if (!reading)
-       return false;
+        return false;
 
       /* Initialize the table of filenames.  */
 
@@ -84,44 +84,44 @@ dir_read (struct file_data const *dir, struct dirdata *dirdata)
       dirdata->data = data = xmalloc (data_alloc);
 
       /* Read the directory entries, and insert the subfiles
-        into the 'data' table.  */
+         into the 'data' table.  */
 
       while ((errno = 0, (next = readdir (reading)) != 0))
-       {
-         char *d_name = next->d_name;
-         size_t d_size = _D_EXACT_NAMLEN (next) + 1;
-
-         /* Ignore "." and "..".  */
-         if (d_name[0] == '.'
-             && (d_name[1] == 0 || (d_name[1] == '.' && d_name[2] == 0)))
-           continue;
-
-         if (excluded_file_name (excluded, d_name))
-           continue;
-
-         while (data_alloc < data_used + d_size)
-           {
-             if (PTRDIFF_MAX / 2 <= data_alloc)
-               xalloc_die ();
-             dirdata->data = data = xrealloc (data, data_alloc *= 2);
-           }
-
-         memcpy (data + data_used, d_name, d_size);
-         data_used += d_size;
-         nnames++;
-       }
+        {
+          char *d_name = next->d_name;
+          size_t d_size = _D_EXACT_NAMLEN (next) + 1;
+
+          /* Ignore "." and "..".  */
+          if (d_name[0] == '.'
+              && (d_name[1] == 0 || (d_name[1] == '.' && d_name[2] == 0)))
+            continue;
+
+          if (excluded_file_name (excluded, d_name))
+            continue;
+
+          while (data_alloc < data_used + d_size)
+            {
+              if (PTRDIFF_MAX / 2 <= data_alloc)
+                xalloc_die ();
+              dirdata->data = data = xrealloc (data, data_alloc *= 2);
+            }
+
+          memcpy (data + data_used, d_name, d_size);
+          data_used += d_size;
+          nnames++;
+        }
       if (errno)
-       {
-         int e = errno;
-         closedir (reading);
-         errno = e;
-         return false;
-       }
+        {
+          int e = errno;
+          closedir (reading);
+          errno = e;
+          return false;
+        }
 #if CLOSEDIR_VOID
       closedir (reading);
 #else
       if (closedir (reading) != 0)
-       return false;
+        return false;
 #endif
     }
 
@@ -154,7 +154,7 @@ compare_collated (char const *name1, char const *name2)
   if (errno)
     {
       error (0, errno, _("cannot compare file names '%s' and '%s'"),
-            name1, name2);
+             name1, name2);
       longjmp (failed_locale_specific_sorting, 1);
     }
   return r;
@@ -169,7 +169,7 @@ compare_names (char const *name1, char const *name2)
     {
       int diff = compare_collated (name1, name2);
       if (diff || ignore_file_name_case)
-       return diff;
+        return diff;
     }
   return file_name_cmp (name1, name2);
 }
@@ -188,7 +188,7 @@ compare_names_for_qsort (void const *file1, void const *file2)
     {
       int diff = compare_collated (name1, name2);
       if (diff)
-       return diff;
+        return diff;
     }
   return file_name_cmp (name1, name2);
 }
@@ -212,8 +212,8 @@ compare_names_for_qsort (void const *file1, void const *file2)
 
 int
 diff_dirs (struct comparison const *cmp,
-          int (*handle_file) (struct comparison const *,
-                              char const *, char const *))
+           int (*handle_file) (struct comparison const *,
+                               char const *, char const *))
 {
   struct dirdata dirdata[2];
   int volatile val = EXIT_SUCCESS;
@@ -223,7 +223,7 @@ diff_dirs (struct comparison const *cmp,
       && (cmp->file[1].desc == -1 || dir_loop (cmp, 1)))
     {
       error (0, 0, _("%s: recursive directory loop"),
-            cmp->file[cmp->file[0].desc == -1].name);
+             cmp->file[cmp->file[0].desc == -1].name);
       return EXIT_TROUBLE;
     }
 
@@ -231,8 +231,8 @@ diff_dirs (struct comparison const *cmp,
   for (i = 0; i < 2; i++)
     if (! dir_read (&cmp->file[i], &dirdata[i]))
       {
-       perror_with_name (cmp->file[i].name);
-       val = EXIT_TROUBLE;
+        perror_with_name (cmp->file[i].name);
+        val = EXIT_TROUBLE;
       }
 
   if (val == EXIT_SUCCESS)
@@ -244,73 +244,73 @@ diff_dirs (struct comparison const *cmp,
       /* Use locale-specific sorting if possible, else native byte order.  */
       locale_specific_sorting = true;
       if (setjmp (failed_locale_specific_sorting))
-       locale_specific_sorting = false;
+        locale_specific_sorting = false;
 
       /* Sort the directories.  */
       for (i = 0; i < 2; i++)
-       qsort (names[i], dirdata[i].nnames, sizeof *dirdata[i].names,
-              compare_names_for_qsort);
+        qsort (names[i], dirdata[i].nnames, sizeof *dirdata[i].names,
+               compare_names_for_qsort);
 
       /* If '-S name' was given, and this is the topmost level of comparison,
-        ignore all file names less than the specified starting name.  */
+         ignore all file names less than the specified starting name.  */
 
       if (starting_file && ! cmp->parent)
-       {
-         while (*names[0] && compare_names (*names[0], starting_file) < 0)
-           names[0]++;
-         while (*names[1] && compare_names (*names[1], starting_file) < 0)
-           names[1]++;
-       }
+        {
+          while (*names[0] && compare_names (*names[0], starting_file) < 0)
+            names[0]++;
+          while (*names[1] && compare_names (*names[1], starting_file) < 0)
+            names[1]++;
+        }
 
       /* Loop while files remain in one or both dirs.  */
       while (*names[0] || *names[1])
-       {
-         /* Compare next name in dir 0 with next name in dir 1.
-            At the end of a dir,
-            pretend the "next name" in that dir is very large.  */
-         int nameorder = (!*names[0] ? 1 : !*names[1] ? -1
-                          : compare_names (*names[0], *names[1]));
-
-         /* Prefer a file_name_cmp match if available.  This algorithm is
-            O(N**2), where N is the number of names in a directory
-            that compare_names says are all equal, but in practice N
-            is so small it's not worth tuning.  */
-         if (nameorder == 0 && ignore_file_name_case)
-           {
-             int raw_order = file_name_cmp (*names[0], *names[1]);
-             if (raw_order != 0)
-               {
-                 int greater_side = raw_order < 0;
-                 int lesser_side = 1 - greater_side;
-                 char const **lesser = names[lesser_side];
-                 char const *greater_name = *names[greater_side];
-                 char const **p;
-
-                 for (p = lesser + 1;
-                      *p && compare_names (*p, greater_name) == 0;
-                      p++)
-                   {
-                     int c = file_name_cmp (*p, greater_name);
-                     if (0 <= c)
-                       {
-                         if (c == 0)
-                           {
-                             memmove (lesser + 1, lesser,
-                                      (char *) p - (char *) lesser);
-                             *lesser = greater_name;
-                           }
-                         break;
-                       }
-                   }
-               }
-           }
-
-         int v1 = (*handle_file) (cmp,
-                                  0 < nameorder ? 0 : *names[0]++,
-                                  nameorder < 0 ? 0 : *names[1]++);
-         if (val < v1)
-           val = v1;
-       }
+        {
+          /* Compare next name in dir 0 with next name in dir 1.
+             At the end of a dir,
+             pretend the "next name" in that dir is very large.  */
+          int nameorder = (!*names[0] ? 1 : !*names[1] ? -1
+                           : compare_names (*names[0], *names[1]));
+
+          /* Prefer a file_name_cmp match if available.  This algorithm is
+             O(N**2), where N is the number of names in a directory
+             that compare_names says are all equal, but in practice N
+             is so small it's not worth tuning.  */
+          if (nameorder == 0 && ignore_file_name_case)
+            {
+              int raw_order = file_name_cmp (*names[0], *names[1]);
+              if (raw_order != 0)
+                {
+                  int greater_side = raw_order < 0;
+                  int lesser_side = 1 - greater_side;
+                  char const **lesser = names[lesser_side];
+                  char const *greater_name = *names[greater_side];
+                  char const **p;
+
+                  for (p = lesser + 1;
+                       *p && compare_names (*p, greater_name) == 0;
+                       p++)
+                    {
+                      int c = file_name_cmp (*p, greater_name);
+                      if (0 <= c)
+                        {
+                          if (c == 0)
+                            {
+                              memmove (lesser + 1, lesser,
+                                       (char *) p - (char *) lesser);
+                              *lesser = greater_name;
+                            }
+                          break;
+                        }
+                    }
+                }
+            }
+
+          int v1 = (*handle_file) (cmp,
+                                   0 < nameorder ? 0 : *names[0]++,
+                                   nameorder < 0 ? 0 : *names[1]++);
+          if (val < v1)
+            val = v1;
+        }
     }
 
   for (i = 0; i < 2; i++)
@@ -357,25 +357,25 @@ find_dir_file_pathname (char const *dir, char const *file)
       filedata.desc = 0;
 
       if (dir_read (&filedata, &dirdata))
-       {
-         locale_specific_sorting = true;
-         if (setjmp (failed_locale_specific_sorting))
-           match = file; /* longjmp may mess up MATCH.  */
-         else
-           {
-             for (char const **p = dirdata.names; *p; p++)
-               if (compare_names (*p, file) == 0)
-                 {
-                   if (file_name_cmp (*p, file) == 0)
-                     {
-                       match = *p;
-                       break;
-                     }
-                   if (match == file)
-                     match = *p;
-                 }
-           }
-       }
+        {
+          locale_specific_sorting = true;
+          if (setjmp (failed_locale_specific_sorting))
+            match = file; /* longjmp may mess up MATCH.  */
+          else
+            {
+              for (char const **p = dirdata.names; *p; p++)
+                if (compare_names (*p, file) == 0)
+                  {
+                    if (file_name_cmp (*p, file) == 0)
+                      {
+                        match = *p;
+                        break;
+                      }
+                    if (match == file)
+                      match = *p;
+                  }
+            }
+        }
     }
 
   val = file_name_concat (dir, match, NULL);
index 73771a2..053e1fc 100644 (file)
--- a/src/ed.c
+++ b/src/ed.c
@@ -1,7 +1,7 @@
 /* Output routines for ed-script format.
 
    Copyright (C) 1988-1989, 1991-1993, 1995, 1998, 2001, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -63,26 +63,26 @@ print_ed_hunk (struct change *hunk)
       bool insert_mode = true;
 
       for (i = f1; i <= l1; i++)
-       {
-         if (!insert_mode)
-           {
-             fputs ("a\n", outfile);
-             insert_mode = true;
-           }
-         if (files[1].linbuf[i][0] == '.' && files[1].linbuf[i][1] == '\n')
-           {
-             /* The file's line is just a dot, and it would exit
-                insert mode.  Precede the dot with another dot, exit
-                insert mode and remove the extra dot.  */
-             fputs ("..\n.\ns/.//\n", outfile);
-             insert_mode = false;
-           }
-         else
-           print_1_line ("", &files[1].linbuf[i]);
-       }
+        {
+          if (!insert_mode)
+            {
+              fputs ("a\n", outfile);
+              insert_mode = true;
+            }
+          if (files[1].linbuf[i][0] == '.' && files[1].linbuf[i][1] == '\n')
+            {
+              /* The file's line is just a dot, and it would exit
+                 insert mode.  Precede the dot with another dot, exit
+                 insert mode and remove the extra dot.  */
+              fputs ("..\n.\ns/.//\n", outfile);
+              insert_mode = false;
+            }
+          else
+            print_1_line ("", &files[1].linbuf[i]);
+        }
 
       if (insert_mode)
-       fputs (".\n", outfile);
+        fputs (".\n", outfile);
     }
 }
 \f
@@ -158,9 +158,9 @@ print_rcs_hunk (struct change *hunk)
   if (changes & OLD)
     {
       /* For deletion, print just the starting line number from file 0
-        and the number of lines deleted.  */
+         and the number of lines deleted.  */
       fprintf (outfile, "d%"pI"d %"pI"d\n", tf0,
-              tf0 <= tl0 ? tl0 - tf0 + 1 : 1);
+               tf0 <= tl0 ? tl0 - tf0 + 1 : 1);
     }
 
   if (changes & NEW)
@@ -168,10 +168,10 @@ print_rcs_hunk (struct change *hunk)
       /* Take last-line-number from file 0 and # lines from file 1.  */
       translate_range (&files[1], f1, l1, &tf1, &tl1);
       fprintf (outfile, "a%"pI"d %"pI"d\n", tl0,
-              tf1 <= tl1 ? tl1 - tf1 + 1 : 1);
+               tf1 <= tl1 ? tl1 - tf1 + 1 : 1);
 
       /* Print the inserted lines.  */
       for (i = f1; i <= l1; i++)
-       print_1_line ("", &files[1].linbuf[i]);
+        print_1_line ("", &files[1].linbuf[i]);
     }
 }
index 0ecc2c0..d40a88e 100644 (file)
@@ -1,6 +1,6 @@
 /* #ifdef-format output routines for GNU DIFF.
 
-   Copyright (C) 1989, 1991-1994, 2001-2002, 2004, 2006, 2009-2013, 2015-2018
+   Copyright (C) 1989, 1991-1994, 2001-2002, 2004, 2006, 2009-2013, 2015-2021
    Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
@@ -22,7 +22,7 @@
 
 #include "diff.h"
 
-#include <xalloc.h>
+#include <xmalloca.h>
 
 struct group
 {
@@ -31,10 +31,10 @@ struct group
 };
 
 static char const *format_group (FILE *, char const *, char,
-                                struct group const *);
+                                 struct group const *);
 static char const *do_printf_spec (FILE *, char const *,
-                                  struct file_data const *, lin,
-                                  struct group const *);
+                                   struct file_data const *, lin,
+                                   struct group const *);
 static char const *scan_char_literal (char const *, char *);
 static lin groups_letter_value (struct group const *, char);
 static void format_ifdef (char const *, lin, lin, lin, lin);
@@ -56,8 +56,8 @@ print_ifdef_script (struct change *script)
     {
       begin_output ();
       format_ifdef (group_format[UNCHANGED],
-                   next_line0, files[0].valid_lines,
-                   next_line1, files[1].valid_lines);
+                    next_line0, files[0].valid_lines,
+                    next_line1, files[1].valid_lines);
     }
 }
 
@@ -80,15 +80,15 @@ print_ifdef_hunk (struct change *hunk)
   /* Print lines up to this change.  */
   if (next_line0 < first0 || next_line1 < first1)
     format_ifdef (group_format[UNCHANGED],
-                 next_line0, first0,
-                 next_line1, first1);
+                  next_line0, first0,
+                  next_line1, first1);
 
   /* Print this change.  */
   next_line0 = last0 + 1;
   next_line1 = last1 + 1;
   format_ifdef (group_format[changes],
-               first0, next_line0,
-               first1, next_line1);
+                first0, next_line0,
+                first1, next_line1);
 }
 
 /* Print a set of lines according to FORMAT.
@@ -117,7 +117,7 @@ format_ifdef (char const *format, lin beg0, lin end0, lin beg1, lin end1)
 
 static char const *
 format_group (register FILE *out, char const *format, char endchar,
-             struct group const *groups)
+              struct group const *groups)
 {
   register char c;
   register char const *f = format;
@@ -126,81 +126,81 @@ format_group (register FILE *out, char const *format, char endchar,
     {
       char const *f1 = ++f;
       if (c == '%')
-       switch ((c = *f++))
-         {
-         case '%':
-           break;
-
-         case '(':
-           /* Print if-then-else format e.g. '%(n=1?thenpart:elsepart)'.  */
-           {
-             int i;
-             uintmax_t value[2];
-             FILE *thenout, *elseout;
-
-             for (i = 0; i < 2; i++)
-               {
-                 if (ISDIGIT (*f))
-                   {
-                     char *fend;
-                     errno = 0;
-                     value[i] = strtoumax (f, &fend, 10);
-                     if (errno)
-                       goto bad_format;
-                     f = fend;
-                   }
-                 else
-                   {
-                     value[i] = groups_letter_value (groups, *f);
-                     if (value[i] == -1)
-                       goto bad_format;
-                     f++;
-                   }
-                 if (*f++ != "=?"[i])
-                   goto bad_format;
-               }
-             if (value[0] == value[1])
-               thenout = out, elseout = 0;
-             else
-               thenout = 0, elseout = out;
-             f = format_group (thenout, f, ':', groups);
-             if (*f)
-               {
-                 f = format_group (elseout, f + 1, ')', groups);
-                 if (*f)
-                   f++;
-               }
-           }
-           continue;
-
-         case '<':
-           /* Print lines deleted from first file.  */
-           print_ifdef_lines (out, line_format[OLD], &groups[0]);
-           continue;
-
-         case '=':
-           /* Print common lines.  */
-           print_ifdef_lines (out, line_format[UNCHANGED], &groups[0]);
-           continue;
-
-         case '>':
-           /* Print lines inserted from second file.  */
-           print_ifdef_lines (out, line_format[NEW], &groups[1]);
-           continue;
-
-         default:
-           f = do_printf_spec (out, f - 2, 0, 0, groups);
-           if (f)
-             continue;
-           /* Fall through. */
-         bad_format:
-           c = '%';
-           f = f1;
-           break;
-         }
+        switch ((c = *f++))
+          {
+          case '%':
+            break;
+
+          case '(':
+            /* Print if-then-else format e.g. '%(n=1?thenpart:elsepart)'.  */
+            {
+              int i;
+              intmax_t value[2];
+              FILE *thenout, *elseout;
+
+              for (i = 0; i < 2; i++)
+                {
+                  if (ISDIGIT (*f))
+                    {
+                      char *fend;
+                      errno = 0;
+                      value[i] = strtoimax (f, &fend, 10);
+                      if (errno)
+                        goto bad_format;
+                      f = fend;
+                    }
+                  else
+                    {
+                      value[i] = groups_letter_value (groups, *f);
+                      if (value[i] < 0)
+                        goto bad_format;
+                      f++;
+                    }
+                  if (*f++ != "=?"[i])
+                    goto bad_format;
+                }
+              if (value[0] == value[1])
+                thenout = out, elseout = 0;
+              else
+                thenout = 0, elseout = out;
+              f = format_group (thenout, f, ':', groups);
+              if (*f)
+                {
+                  f = format_group (elseout, f + 1, ')', groups);
+                  if (*f)
+                    f++;
+                }
+            }
+            continue;
+
+          case '<':
+            /* Print lines deleted from first file.  */
+            print_ifdef_lines (out, line_format[OLD], &groups[0]);
+            continue;
+
+          case '=':
+            /* Print common lines.  */
+            print_ifdef_lines (out, line_format[UNCHANGED], &groups[0]);
+            continue;
+
+          case '>':
+            /* Print lines inserted from second file.  */
+            print_ifdef_lines (out, line_format[NEW], &groups[1]);
+            continue;
+
+          default:
+            f = do_printf_spec (out, f - 2, 0, 0, groups);
+            if (f)
+              continue;
+            /* Fall through. */
+          bad_format:
+            c = '%';
+            f = f1;
+            break;
+          }
 
       if (out)
-       putc (c, out);
+        putc (c, out);
     }
 
   return f;
@@ -235,7 +235,7 @@ groups_letter_value (struct group const *g, char letter)
    But do nothing if OUT is zero.  */
 static void
 print_ifdef_lines (register FILE *out, char const *format,
-                  struct group const *group)
+                   struct group const *group)
 {
   struct file_data const *file = group->file;
   char const * const *linbuf = file->linbuf;
@@ -248,18 +248,18 @@ print_ifdef_lines (register FILE *out, char const *format,
   if (!expand_tabs && format[0] == '%')
     {
       if (format[1] == 'l' && format[2] == '\n' && !format[3] && from < upto)
-       {
-         fwrite (linbuf[from], sizeof (char),
-                 linbuf[upto] + (linbuf[upto][-1] != '\n') -  linbuf[from],
-                 out);
-         return;
-       }
+        {
+          fwrite (linbuf[from], sizeof (char),
+                  linbuf[upto] + (linbuf[upto][-1] != '\n') -  linbuf[from],
+                  out);
+          return;
+        }
       if (format[1] == 'L' && !format[2])
-       {
-         fwrite (linbuf[from], sizeof (char),
-                 linbuf[upto] -  linbuf[from], out);
-         return;
-       }
+        {
+          fwrite (linbuf[from], sizeof (char),
+                  linbuf[upto] -  linbuf[from], out);
+          return;
+        }
     }
 
   for (;  from < upto;  from++)
@@ -268,43 +268,43 @@ print_ifdef_lines (register FILE *out, char const *format,
       register char const *f = format;
 
       while ((c = *f++) != 0)
-       {
-         char const *f1 = f;
-         if (c == '%')
-           switch ((c = *f++))
-             {
-             case '%':
-               break;
-
-             case 'l':
-               output_1_line (linbuf[from],
-                              (linbuf[from + 1]
-                               - (linbuf[from + 1][-1] == '\n')),
-                              0, 0);
-               continue;
-
-             case 'L':
-               output_1_line (linbuf[from], linbuf[from + 1], 0, 0);
-               continue;
-
-             default:
-               f = do_printf_spec (out, f - 2, file, from, 0);
-               if (f)
-                 continue;
-               c = '%';
-               f = f1;
-               break;
-             }
-
-         putc (c, out);
-       }
+        {
+          char const *f1 = f;
+          if (c == '%')
+            switch ((c = *f++))
+              {
+              case '%':
+                break;
+
+              case 'l':
+                output_1_line (linbuf[from],
+                               (linbuf[from + 1]
+                                - (linbuf[from + 1][-1] == '\n')),
+                               0, 0);
+                continue;
+
+              case 'L':
+                output_1_line (linbuf[from], linbuf[from + 1], 0, 0);
+                continue;
+
+              default:
+                f = do_printf_spec (out, f - 2, file, from, 0);
+                if (f)
+                  continue;
+                c = '%';
+                f = f1;
+                break;
+              }
+
+          putc (c, out);
+        }
     }
 }
 
 static char const *
 do_printf_spec (FILE *out, char const *spec,
-               struct file_data const *file, lin n,
-               struct group const *groups)
+                struct file_data const *file, lin n,
+                struct group const *groups)
 {
   char const *f = spec;
   char c;
@@ -326,57 +326,51 @@ do_printf_spec (FILE *out, char const *spec,
     {
     case 'c':
       if (c1 != '\'')
-       return 0;
+        return 0;
       else
-       {
-         char value IF_LINT (= 0);
-         f = scan_char_literal (f, &value);
-         if (!f)
-           return 0;
-         if (out)
-           putc (value, out);
-       }
+        {
+          char value IF_LINT (= 0);
+          f = scan_char_literal (f, &value);
+          if (!f)
+            return 0;
+          if (out)
+            putc (value, out);
+        }
       break;
 
     case 'd': case 'o': case 'x': case 'X':
       {
-       lin value;
-
-       if (file)
-         {
-           if (c1 != 'n')
-             return 0;
-           value = translate_line_number (file, n);
-         }
-       else
-         {
-           value = groups_letter_value (groups, c1);
-           if (value < 0)
-             return 0;
-         }
-
-       if (out)
-         {
-           /* For example, if the spec is "%3xn" and pI is "l", use the printf
-              format spec "%3lx".  Here the spec prefix is "%3".  */
-           printint print_value = value;
-           size_t spec_prefix_len = f - spec - 2;
-           size_t pI_len = sizeof pI - 1;
-#if 0
-           char format[spec_prefix_len + pI_len + 2];
-#else
-           char *format = xmalloc (spec_prefix_len + pI_len + 2);
-#endif
-           char *p = format + spec_prefix_len + pI_len;
-           memcpy (format, spec, spec_prefix_len);
-           memcpy (format + spec_prefix_len, pI, pI_len);
-           *p++ = c;
-           *p = '\0';
-           fprintf (out, format, print_value);
-#if ! HAVE_C_VARARRAYS
-           free (format);
-#endif
-         }
+        lin value;
+
+        if (file)
+          {
+            if (c1 != 'n')
+              return 0;
+            value = translate_line_number (file, n);
+          }
+        else
+          {
+            value = groups_letter_value (groups, c1);
+            if (value < 0)
+              return 0;
+          }
+
+        if (out)
+          {
+            /* For example, if the spec is "%3xn" and pI is "l", use the printf
+               format spec "%3lx".  Here the spec prefix is "%3".  */
+            printint print_value = value;
+            size_t spec_prefix_len = f - spec - 2;
+            size_t pI_len = sizeof pI - 1;
+            char *format = xmalloca (spec_prefix_len + pI_len + 2);
+            char *p = format + spec_prefix_len + pI_len;
+            memcpy (format, spec, spec_prefix_len);
+            memcpy (format + spec_prefix_len, pI, pI_len);
+            *p++ = c;
+            *p = '\0';
+            fprintf (out, format, print_value);
+            freea (format);
+          }
       }
       break;
 
@@ -403,27 +397,27 @@ scan_char_literal (char const *lit, char *valptr)
     {
       case 0:
       case '\'':
-       return NULL;
+        return NULL;
 
       case '\\':
-       value = 0;
-       while ((c = *p++) != '\'')
-         {
-           unsigned int digit = c - '0';
-           if (8 <= digit)
-             return NULL;
-           value = 8 * value + digit;
-         }
-       digits = p - lit - 2;
-       if (! (1 <= digits && digits <= 3))
-         return NULL;
-       break;
+        value = 0;
+        while ((c = *p++) != '\'')
+          {
+            unsigned int digit = c - '0';
+            if (8 <= digit)
+              return NULL;
+            value = 8 * value + digit;
+          }
+        digits = p - lit - 2;
+        if (! (1 <= digits && digits <= 3))
+          return NULL;
+        break;
 
       default:
-       value = c;
-       if (*p++ != '\'')
-         return NULL;
-       break;
+        value = c;
+        if (*p++ != '\'')
+          return NULL;
+        break;
     }
 
   *valptr = value;
index 6c03c70..1f0e040 100644 (file)
--- a/src/io.c
+++ b/src/io.c
@@ -1,7 +1,7 @@
 /* File I/O for GNU DIFF.
 
    Copyright (C) 1988-1989, 1992-1995, 1998, 2001-2002, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -72,9 +72,9 @@ file_block_read (struct file_data *current, size_t size)
   if (size && ! current->eof)
     {
       size_t s = block_read (current->desc,
-                            FILE_BUFFER (current) + current->buffered, size);
+                             FILE_BUFFER (current) + current->buffered, size);
       if (s == SIZE_MAX)
-       pfatal_with_name (current->name);
+        pfatal_with_name (current->name);
       current->buffered += s;
       current->eof = s < size;
     }
@@ -104,40 +104,40 @@ sip (struct file_data *current, bool skip_test)
   else
     {
       current->bufsize = buffer_lcm (sizeof (word),
-                                    STAT_BLOCKSIZE (current->stat),
-                                    PTRDIFF_MAX - 2 * sizeof (word));
+                                     STAT_BLOCKSIZE (current->stat),
+                                     PTRDIFF_MAX - 2 * sizeof (word));
       current->buffer = xmalloc (current->bufsize);
 
 #ifdef __KLIBC__
       /* Skip test if seek is not possible */
       skip_test = skip_test
-                 || (lseek (current->desc, 0, SEEK_CUR) < 0
-                     && errno == ESPIPE);
+                  || (lseek (current->desc, 0, SEEK_CUR) < 0
+                      && errno == ESPIPE);
 #endif
 
       if (! skip_test)
-       {
-         /* Check first part of file to see if it's a binary file.  */
-
-         int prev_mode = set_binary_mode (current->desc, O_BINARY);
-         off_t buffered;
-         file_block_read (current, current->bufsize);
-         buffered = current->buffered;
-
-         if (prev_mode != O_BINARY)
-           {
-             /* Revert to text mode and seek back to the start to reread
-                the file.  Use relative seek, since file descriptors
-                like stdin might not start at offset zero.  */
-             if (lseek (current->desc, - buffered, SEEK_CUR) < 0)
-               pfatal_with_name (current->name);
-             set_binary_mode (current->desc, prev_mode);
-             current->buffered = 0;
-             current->eof = false;
-           }
-
-         return binary_file_p (current->buffer, buffered);
-       }
+        {
+          /* Check first part of file to see if it's a binary file.  */
+
+          int prev_mode = set_binary_mode (current->desc, O_BINARY);
+          off_t buffered;
+          file_block_read (current, current->bufsize);
+          buffered = current->buffered;
+
+          if (prev_mode != O_BINARY)
+            {
+              /* Revert to text mode and seek back to the start to reread
+                 the file.  Use relative seek, since file descriptors
+                 like stdin might not start at offset zero.  */
+              if (lseek (current->desc, - buffered, SEEK_CUR) < 0)
+                pfatal_with_name (current->name);
+              set_binary_mode (current->desc, prev_mode);
+              current->buffered = 0;
+              current->eof = false;
+            }
+
+          return binary_file_p (current->buffer, buffered);
+        }
     }
 
   current->buffered = 0;
@@ -163,30 +163,30 @@ slurp (struct file_data *current)
       /* It's a regular file; slurp in the rest all at once.  */
 
       /* Get the size out of the stat block.
-        Allocate just enough room for appended newline plus word sentinel,
-        plus word-alignment since we want the buffer word-aligned.  */
+         Allocate just enough room for appended newline plus word sentinel,
+         plus word-alignment since we want the buffer word-aligned.  */
       size_t file_size = current->stat.st_size;
       cc = file_size + 2 * sizeof (word) - file_size % sizeof (word);
       if (file_size != current->stat.st_size || cc < file_size
-         || PTRDIFF_MAX <= cc)
-       xalloc_die ();
+          || PTRDIFF_MAX <= cc)
+        xalloc_die ();
 
       if (current->bufsize < cc)
-       {
-         current->bufsize = cc;
-         current->buffer = xrealloc (current->buffer, cc);
-       }
+        {
+          current->bufsize = cc;
+          current->buffer = xrealloc (current->buffer, cc);
+        }
 
       /* Try to read at least 1 more byte than the size indicates, to
-        detect whether the file is growing.  This is a nicety for
-        users who run 'diff' on files while they are changing.  */
+         detect whether the file is growing.  This is a nicety for
+         users who run 'diff' on files while they are changing.  */
 
       if (current->buffered <= file_size)
-       {
-         file_block_read (current, file_size + 1 - current->buffered);
-         if (current->buffered <= file_size)
-           return;
-       }
+        {
+          file_block_read (current, file_size + 1 - current->buffered);
+          if (current->buffered <= file_size)
+            return;
+        }
     }
 
   /* It's not a regular file, or it's a growing regular file; read it,
@@ -197,16 +197,16 @@ slurp (struct file_data *current)
   if (current->buffered)
     {
       while (current->buffered == current->bufsize)
-       {
-         if (PTRDIFF_MAX / 2 - sizeof (word) < current->bufsize)
-           xalloc_die ();
-         current->bufsize *= 2;
-         current->buffer = xrealloc (current->buffer, current->bufsize);
-         file_block_read (current, current->bufsize - current->buffered);
-       }
+        {
+          if (PTRDIFF_MAX / 2 - sizeof (word) < current->bufsize)
+            xalloc_die ();
+          current->bufsize *= 2;
+          current->buffer = xrealloc (current->buffer, current->bufsize);
+          file_block_read (current, current->bufsize - current->buffered);
+        }
 
       /* Allocate just enough room for appended newline plus word
-        sentinel, plus word-alignment.  */
+         sentinel, plus word-alignment.  */
       cc = current->buffered + 2 * sizeof (word);
       current->bufsize = cc - cc % sizeof (word);
       current->buffer = xrealloc (current->buffer, current->bufsize);
@@ -249,97 +249,97 @@ find_and_hash_each_line (struct file_data *current)
 
       /* Hash this line until we find a newline.  */
       switch (ig_white_space)
-       {
-       case IGNORE_ALL_SPACE:
-         while ((c = *p++) != '\n')
-           if (! isspace (c))
-             h = HASH (h, ig_case ? tolower (c) : c);
-         break;
-
-       case IGNORE_SPACE_CHANGE:
-         while ((c = *p++) != '\n')
-           {
-             if (isspace (c))
-               {
-                 do
-                   if ((c = *p++) == '\n')
-                     goto hashing_done;
-                 while (isspace (c));
-
-                 h = HASH (h, ' ');
-               }
-
-             /* C is now the first non-space.  */
-             h = HASH (h, ig_case ? tolower (c) : c);
-           }
-         break;
-
-       case IGNORE_TAB_EXPANSION:
-       case IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE:
-       case IGNORE_TRAILING_SPACE:
-         {
-           size_t column = 0;
-           while ((c = *p++) != '\n')
-             {
-               if (ig_white_space & IGNORE_TRAILING_SPACE
-                   && isspace (c))
-                 {
-                   char const *p1 = p;
-                   unsigned char c1;
-                   do
-                     if ((c1 = *p1++) == '\n')
-                       {
-                         p = p1;
-                         goto hashing_done;
-                       }
-                   while (isspace (c1));
-                 }
-
-               size_t repetitions = 1;
-
-               if (ig_white_space & IGNORE_TAB_EXPANSION)
-                 switch (c)
-                   {
-                   case '\b':
-                     column -= 0 < column;
-                     break;
-
-                   case '\t':
-                     c = ' ';
-                     repetitions = tabsize - column % tabsize;
-                     column = (column + repetitions < column
-                               ? 0
-                               : column + repetitions);
-                     break;
-
-                   case '\r':
-                     column = 0;
-                     break;
-
-                   default:
-                     column++;
-                     break;
-                   }
-
-               if (ig_case)
-                 c = tolower (c);
-
-               do
-                 h = HASH (h, c);
-               while (--repetitions != 0);
-             }
-         }
-         break;
-
-       default:
-         if (ig_case)
-           while ((c = *p++) != '\n')
-             h = HASH (h, tolower (c));
-         else
-           while ((c = *p++) != '\n')
-             h = HASH (h, c);
-         break;
-       }
+        {
+        case IGNORE_ALL_SPACE:
+          while ((c = *p++) != '\n')
+            if (! isspace (c))
+              h = HASH (h, ig_case ? tolower (c) : c);
+          break;
+
+        case IGNORE_SPACE_CHANGE:
+          while ((c = *p++) != '\n')
+            {
+              if (isspace (c))
+                {
+                  do
+                    if ((c = *p++) == '\n')
+                      goto hashing_done;
+                  while (isspace (c));
+
+                  h = HASH (h, ' ');
+                }
+
+              /* C is now the first non-space.  */
+              h = HASH (h, ig_case ? tolower (c) : c);
+            }
+          break;
+
+        case IGNORE_TAB_EXPANSION:
+        case IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE:
+        case IGNORE_TRAILING_SPACE:
+          {
+            size_t column = 0;
+            while ((c = *p++) != '\n')
+              {
+                if (ig_white_space & IGNORE_TRAILING_SPACE
+                    && isspace (c))
+                  {
+                    char const *p1 = p;
+                    unsigned char c1;
+                    do
+                      if ((c1 = *p1++) == '\n')
+                        {
+                          p = p1;
+                          goto hashing_done;
+                        }
+                    while (isspace (c1));
+                  }
+
+                size_t repetitions = 1;
+
+                if (ig_white_space & IGNORE_TAB_EXPANSION)
+                  switch (c)
+                    {
+                    case '\b':
+                      column -= 0 < column;
+                      break;
+
+                    case '\t':
+                      c = ' ';
+                      repetitions = tabsize - column % tabsize;
+                      column = (column + repetitions < column
+                                ? 0
+                                : column + repetitions);
+                      break;
+
+                    case '\r':
+                      column = 0;
+                      break;
+
+                    default:
+                      column++;
+                      break;
+                    }
+
+                if (ig_case)
+                  c = tolower (c);
+
+                do
+                  h = HASH (h, c);
+                while (--repetitions != 0);
+              }
+          }
+          break;
+
+        default:
+          if (ig_case)
+            while ((c = *p++) != '\n')
+              h = HASH (h, tolower (c));
+          else
+            while ((c = *p++) != '\n')
+              h = HASH (h, c);
+          break;
+        }
 
    hashing_done:;
 
@@ -347,75 +347,75 @@ find_and_hash_each_line (struct file_data *current)
       length = p - ip - 1;
 
       if (p == bufend
-         && current->missing_newline
-         && ROBUST_OUTPUT_STYLE (output_style))
-       {
-         /* The last line is incomplete and we do not silently
-            complete lines.  If the line cannot compare equal to any
-            complete line, put it into buckets[-1] so that it can
-            compare equal only to the other file's incomplete line
-            (if one exists).  */
-         if (ig_white_space < IGNORE_TRAILING_SPACE)
-           bucket = &buckets[-1];
-       }
+          && current->missing_newline
+          && ROBUST_OUTPUT_STYLE (output_style))
+        {
+          /* The last line is incomplete and we do not silently
+             complete lines.  If the line cannot compare equal to any
+             complete line, put it into buckets[-1] so that it can
+             compare equal only to the other file's incomplete line
+             (if one exists).  */
+          if (ig_white_space < IGNORE_TRAILING_SPACE)
+            bucket = &buckets[-1];
+        }
 
       for (i = *bucket;  ;  i = eqs[i].next)
-       if (!i)
-         {
-           /* Create a new equivalence class in this bucket.  */
-           i = eqs_index++;
-           if (i == eqs_alloc)
-             {
-               if (PTRDIFF_MAX / (2 * sizeof *eqs) <= eqs_alloc)
-                 xalloc_die ();
-               eqs_alloc *= 2;
-               eqs = xrealloc (eqs, eqs_alloc * sizeof *eqs);
-             }
-           eqs[i].next = *bucket;
-           eqs[i].hash = h;
-           eqs[i].line = ip;
-           eqs[i].length = length;
-           *bucket = i;
-           break;
-         }
-       else if (eqs[i].hash == h)
-         {
-           char const *eqline = eqs[i].line;
-
-           /* Reuse existing class if lines_differ reports the lines
+        if (!i)
+          {
+            /* Create a new equivalence class in this bucket.  */
+            i = eqs_index++;
+            if (i == eqs_alloc)
+              {
+                if (PTRDIFF_MAX / (2 * sizeof *eqs) <= eqs_alloc)
+                  xalloc_die ();
+                eqs_alloc *= 2;
+                eqs = xrealloc (eqs, eqs_alloc * sizeof *eqs);
+              }
+            eqs[i].next = *bucket;
+            eqs[i].hash = h;
+            eqs[i].line = ip;
+            eqs[i].length = length;
+            *bucket = i;
+            break;
+          }
+        else if (eqs[i].hash == h)
+          {
+            char const *eqline = eqs[i].line;
+
+            /* Reuse existing class if lines_differ reports the lines
                equal.  */
-           if (eqs[i].length == length)
-             {
-               /* Reuse existing equivalence class if the lines are identical.
-                  This detects the common case of exact identity
-                  faster than lines_differ would.  */
-               if (memcmp (eqline, ip, length) == 0)
-                 break;
-               if (!same_length_diff_contents_compare_anyway)
-                 continue;
-             }
-           else if (!diff_length_compare_anyway)
-             continue;
-
-           if (! lines_differ (eqline, ip))
-             break;
-         }
+            if (eqs[i].length == length)
+              {
+                /* Reuse existing equivalence class if the lines are identical.
+                   This detects the common case of exact identity
+                   faster than lines_differ would.  */
+                if (memcmp (eqline, ip, length) == 0)
+                  break;
+                if (!same_length_diff_contents_compare_anyway)
+                  continue;
+              }
+            else if (!diff_length_compare_anyway)
+              continue;
+
+            if (! lines_differ (eqline, ip))
+              break;
+          }
 
       /* Maybe increase the size of the line table.  */
       if (line == alloc_lines)
-       {
-         /* Double (alloc_lines - linbuf_base) by adding to alloc_lines.  */
-         if (PTRDIFF_MAX / 3 <= alloc_lines
-             || PTRDIFF_MAX / sizeof *cureqs <= 2 * alloc_lines - linbuf_base
-             || PTRDIFF_MAX / sizeof *linbuf <= alloc_lines - linbuf_base)
-           xalloc_die ();
-         alloc_lines = 2 * alloc_lines - linbuf_base;
-         cureqs = xrealloc (cureqs, alloc_lines * sizeof *cureqs);
-         linbuf += linbuf_base;
-         linbuf = xrealloc (linbuf,
-                            (alloc_lines - linbuf_base) * sizeof *linbuf);
-         linbuf -= linbuf_base;
-       }
+        {
+          /* Double (alloc_lines - linbuf_base) by adding to alloc_lines.  */
+          if (PTRDIFF_MAX / 3 <= alloc_lines
+              || PTRDIFF_MAX / sizeof *cureqs <= 2 * alloc_lines - linbuf_base
+              || PTRDIFF_MAX / sizeof *linbuf <= alloc_lines - linbuf_base)
+            xalloc_die ();
+          alloc_lines = 2 * alloc_lines - linbuf_base;
+          cureqs = xrealloc (cureqs, alloc_lines * sizeof *cureqs);
+          linbuf += linbuf_base;
+          linbuf = xrealloc (linbuf,
+                             (alloc_lines - linbuf_base) * sizeof *linbuf);
+          linbuf -= linbuf_base;
+        }
       linbuf[line] = ip;
       cureqs[line] = i;
       ++line;
@@ -426,39 +426,39 @@ find_and_hash_each_line (struct file_data *current)
   for (i = 0;  ;  i++)
     {
       /* Record the line start for lines in the suffix that we care about.
-        Record one more line start than lines,
-        so that we can compute the length of any buffered line.  */
+         Record one more line start than lines,
+         so that we can compute the length of any buffered line.  */
       if (line == alloc_lines)
-       {
-         /* Double (alloc_lines - linbuf_base) by adding to alloc_lines.  */
-         if (PTRDIFF_MAX / 3 <= alloc_lines
-             || PTRDIFF_MAX / sizeof *cureqs <= 2 * alloc_lines - linbuf_base
-             || PTRDIFF_MAX / sizeof *linbuf <= alloc_lines - linbuf_base)
-           xalloc_die ();
-         alloc_lines = 2 * alloc_lines - linbuf_base;
-         linbuf += linbuf_base;
-         linbuf = xrealloc (linbuf,
-                            (alloc_lines - linbuf_base) * sizeof *linbuf);
-         linbuf -= linbuf_base;
-       }
+        {
+          /* Double (alloc_lines - linbuf_base) by adding to alloc_lines.  */
+          if (PTRDIFF_MAX / 3 <= alloc_lines
+              || PTRDIFF_MAX / sizeof *cureqs <= 2 * alloc_lines - linbuf_base
+              || PTRDIFF_MAX / sizeof *linbuf <= alloc_lines - linbuf_base)
+            xalloc_die ();
+          alloc_lines = 2 * alloc_lines - linbuf_base;
+          linbuf += linbuf_base;
+          linbuf = xrealloc (linbuf,
+                             (alloc_lines - linbuf_base) * sizeof *linbuf);
+          linbuf -= linbuf_base;
+        }
       linbuf[line] = p;
 
       if (p == bufend)
-       {
-         /* If the last line is incomplete and we do not silently
-            complete lines, don't count its appended newline.  */
-         if (current->missing_newline && ROBUST_OUTPUT_STYLE (output_style))
-           linbuf[line]--;
-         break;
-       }
+        {
+          /* If the last line is incomplete and we do not silently
+             complete lines, don't count its appended newline.  */
+          if (current->missing_newline && ROBUST_OUTPUT_STYLE (output_style))
+            linbuf[line]--;
+          break;
+        }
 
       if (context <= i && no_diff_means_no_output)
-       break;
+        break;
 
       line++;
 
       while (*p++ != '\n')
-       continue;
+        continue;
     }
 
   /* Done with cache in local variables.  */
@@ -491,10 +491,10 @@ prepare_text (struct file_data *current)
       char *dst = rawmemchr (p, '\r');
 
       for (char const *src = dst; src != srclim; src++)
-       {
-         src += *src == '\r' && src[1] == '\n';
-         *dst++ = *src;
-       }
+        {
+          src += *src == '\r' && src[1] == '\n';
+          *dst++ = *src;
+        }
 
       buffered -= srclim - dst;
     }
@@ -570,31 +570,31 @@ find_identical_ends (struct file_data filevec[])
   else
     {
       /* Insert end sentinels, in this case characters that are guaranteed
-        to make the equality test false, and thus terminate the loop.  */
+         to make the equality test false, and thus terminate the loop.  */
 
       if (n0 < n1)
-       p0[n0] = ~p1[n0];
+        p0[n0] = ~p1[n0];
       else
-       p1[n1] = ~p0[n1];
+        p1[n1] = ~p0[n1];
 
       /* Loop until first mismatch, or to the sentinel characters.  */
 
       /* Compare a word at a time for speed.  */
       while (*w0 == *w1)
-       w0++, w1++;
+        w0++, w1++;
 
       /* Do the last few bytes of comparison a byte at a time.  */
       p0 = (char *) w0;
       p1 = (char *) w1;
       while (*p0 == *p1)
-       p0++, p1++;
+        p0++, p1++;
 
       /* Don't mistakenly count missing newline as part of prefix.  */
       if (ROBUST_OUTPUT_STYLE (output_style)
-         && ((buffer0 + n0 - filevec[0].missing_newline < p0)
-             !=
-             (buffer1 + n1 - filevec[1].missing_newline < p1)))
-       p0--, p1--;
+          && ((buffer0 + n0 - filevec[0].missing_newline < p0)
+              !=
+              (buffer1 + n1 - filevec[1].missing_newline < p1)))
+        p0--, p1--;
     }
 
   /* Now P0 and P1 point at the first nonmatching characters.  */
@@ -621,30 +621,30 @@ find_identical_ends (struct file_data filevec[])
       end0 = p0;       /* Addr of last char in file 0.  */
 
       /* Get value of P0 at which we should stop scanning backward:
-        this is when either P0 or P1 points just past the last char
-        of the identical prefix.  */
+         this is when either P0 or P1 points just past the last char
+         of the identical prefix.  */
       beg0 = filevec[0].prefix_end + (n0 < n1 ? 0 : n0 - n1);
 
       /* Scan back until chars don't match or we reach that point.  */
       while (p0 != beg0)
-       if (*--p0 != *--p1)
-         {
-           /* Point at the first char of the matching suffix.  */
-           ++p0, ++p1;
-           beg0 = p0;
-           break;
-         }
+        if (*--p0 != *--p1)
+          {
+            /* Point at the first char of the matching suffix.  */
+            ++p0, ++p1;
+            beg0 = p0;
+            break;
+          }
 
       /* Are we at a line-beginning in both files?  If not, add the rest of
-        this line to the main body.  Discard up to HORIZON_LINES lines from
-        the identical suffix.  Also, discard one extra line,
-        because shift_boundaries may need it.  */
+         this line to the main body.  Discard up to HORIZON_LINES lines from
+         the identical suffix.  Also, discard one extra line,
+         because shift_boundaries may need it.  */
       i = horizon_lines + !((buffer0 == p0 || p0[-1] == '\n')
-                           &&
-                           (buffer1 == p1 || p1[-1] == '\n'));
+                            &&
+                            (buffer1 == p1 || p1[-1] == '\n'));
       while (i-- && p0 != end0)
-       while (*p0++ != '\n')
-         continue;
+        while (*p0++ != '\n')
+          continue;
 
       p1 += p0 - beg0;
     }
@@ -673,9 +673,9 @@ find_identical_ends (struct file_data filevec[])
       middle_guess = guess_lines (0, 0, p0 - filevec[0].prefix_end);
       suffix_guess = guess_lines (0, 0, buffer0 + n0 - p0);
       for (prefix_count = 1;  prefix_count <= context;  prefix_count *= 2)
-       continue;
+        continue;
       alloc_lines0 = (prefix_count + middle_guess
-                     + MIN (context, suffix_guess));
+                      + MIN (context, suffix_guess));
     }
   else
     {
@@ -687,8 +687,8 @@ find_identical_ends (struct file_data filevec[])
   lines = 0;
   linbuf0 = xmalloc (alloc_lines0 * sizeof *linbuf0);
   prefix_needed = ! (no_diff_means_no_output
-                    && filevec[0].prefix_end == p0
-                    && filevec[1].prefix_end == p1);
+                     && filevec[0].prefix_end == p0
+                     && filevec[1].prefix_end == p1);
   p0 = buffer0;
 
   /* If the prefix is needed, find the prefix lines.  */
@@ -696,19 +696,19 @@ find_identical_ends (struct file_data filevec[])
     {
       end0 = filevec[0].prefix_end;
       while (p0 != end0)
-       {
-         lin l = lines++ & prefix_mask;
-         if (l == alloc_lines0)
-           {
-             if (PTRDIFF_MAX / (2 * sizeof *linbuf0) <= alloc_lines0)
-               xalloc_die ();
-             alloc_lines0 *= 2;
-             linbuf0 = xrealloc (linbuf0, alloc_lines0 * sizeof *linbuf0);
-           }
-         linbuf0[l] = p0;
-         while (*p0++ != '\n')
-           continue;
-       }
+        {
+          lin l = lines++ & prefix_mask;
+          if (l == alloc_lines0)
+            {
+              if (PTRDIFF_MAX / (2 * sizeof *linbuf0) <= alloc_lines0)
+                xalloc_die ();
+              alloc_lines0 *= 2;
+              linbuf0 = xrealloc (linbuf0, alloc_lines0 * sizeof *linbuf0);
+            }
+          linbuf0[l] = p0;
+          while (*p0++ != '\n')
+            continue;
+        }
     }
   buffered_prefix = prefix_count && context < lines ? context : lines;
 
@@ -726,9 +726,9 @@ find_identical_ends (struct file_data filevec[])
     {
       /* Rotate prefix lines to proper location.  */
       for (i = 0;  i < buffered_prefix;  i++)
-       linbuf1[i] = linbuf0[(lines - context + i) & prefix_mask];
+        linbuf1[i] = linbuf0[(lines - context + i) & prefix_mask];
       for (i = 0;  i < buffered_prefix;  i++)
-       linbuf0[i] = linbuf1[i];
+        linbuf0[i] = linbuf1[i];
     }
 
   /* Initialize line buffer 1 from line buffer 0.  */
index bdb718b..f76c1ac 100644 (file)
@@ -1,6 +1,6 @@
 /* Normal-format output routines for GNU DIFF.
 
-   Copyright (C) 1988-1989, 1993, 1995, 1998, 2001, 2006, 2009-2013, 2015-2018
+   Copyright (C) 1988-1989, 1993, 1995, 1998, 2001, 2006, 2009-2013, 2015-2021
    Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
index caef59e..232ebcd 100644 (file)
@@ -1,7 +1,7 @@
 /* GNU sdiff - side-by-side merge of file differences
 
    Copyright (C) 1992-1996, 1998, 2001-2002, 2004, 2006-2007, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -35,6 +35,7 @@
 #include <system-quote.h>
 #include <version-etc.h>
 #include <xalloc.h>
+#include <xstdopen.h>
 
 /* The official name of this program (e.g., no 'g' prefix).  */
 #define PROGRAM_NAME "sdiff"
@@ -157,7 +158,7 @@ try_help (char const *reason_msgid, char const *operand)
   if (reason_msgid)
     error (0, 0, _(reason_msgid), operand);
   die (EXIT_TROUBLE, 0, _("Try '%s --help' for more information."),
-        program_name);
+         program_name);
 }
 
 static void
@@ -216,8 +217,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
     else
       putchar ('\n');
   printf ("\n%s\n%s\n",
-         _("If a FILE is '-', read standard input."),
-         _("Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."));
+          _("If a FILE is '-', read standard input."),
+          _("Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."));
   emit_bug_reporting_address ();
 }
 
@@ -262,23 +263,23 @@ perror_fatal (char const *msg)
 
 static void
 check_child_status (int werrno, int wstatus, int max_ok_status,
-                   char const *subsidiary_program)
+                    char const *subsidiary_program)
 {
   int status = (! werrno && WIFEXITED (wstatus)
-               ? WEXITSTATUS (wstatus)
-               : INT_MAX);
+                ? WEXITSTATUS (wstatus)
+                : INT_MAX);
 
   if (max_ok_status < status)
     {
       error (0, werrno,
-            _(status == 126
-              ? "subsidiary program '%s' could not be invoked"
-              : status == 127
-              ? "subsidiary program '%s' not found"
-              : status == INT_MAX
-              ? "subsidiary program '%s' failed"
-              : "subsidiary program '%s' failed (exit status %d)"),
-            subsidiary_program, status);
+             _(status == 126
+               ? "subsidiary program '%s' could not be invoked"
+               : status == 127
+               ? "subsidiary program '%s' not found"
+               : status == INT_MAX
+               ? "subsidiary program '%s' failed"
+               : "subsidiary program '%s' failed (exit status %d)"),
+             subsidiary_program, status);
       exiterr ();
     }
 }
@@ -381,17 +382,17 @@ lf_copy (struct line_filter *lf, lin lines, FILE *outfile)
     {
       lf->bufpos = rawmemchr (lf->bufpos, '\n');
       if (lf->bufpos == lf->buflim)
-       {
-         ck_fwrite (start, lf->buflim - start, outfile);
-         if (! lf_refill (lf))
-           return;
-         start = lf->bufpos;
-       }
+        {
+          ck_fwrite (start, lf->buflim - start, outfile);
+          if (! lf_refill (lf))
+            return;
+          start = lf->bufpos;
+        }
       else
-       {
-         --lines;
-         ++lf->bufpos;
-       }
+        {
+          --lines;
+          ++lf->bufpos;
+        }
     }
 
   ck_fwrite (start, lf->bufpos - start, outfile);
@@ -405,15 +406,15 @@ lf_skip (struct line_filter *lf, lin lines)
     {
       lf->bufpos = rawmemchr (lf->bufpos, '\n');
       if (lf->bufpos == lf->buflim)
-       {
-         if (! lf_refill (lf))
-           break;
-       }
+        {
+          if (! lf_refill (lf))
+            break;
+        }
       else
-       {
-         --lines;
-         ++lf->bufpos;
-       }
+        {
+          --lines;
+          ++lf->bufpos;
+        }
     }
 }
 
@@ -427,16 +428,16 @@ lf_snarf (struct line_filter *lf, char *buffer, size_t bufsize)
       char *next = rawmemchr (start, '\n');
       size_t s = next - start;
       if (bufsize <= s)
-       return 0;
+        return 0;
       memcpy (buffer, start, s);
       if (next < lf->buflim)
-       {
-         buffer[s] = 0;
-         lf->bufpos = next + 1;
-         return 1;
-       }
+        {
+          buffer[s] = 0;
+          lf->bufpos = next + 1;
+          return 1;
+        }
       if (! lf_refill (lf))
-       return s ? 0 : EOF;
+        return s ? 0 : EOF;
       buffer += s;
       bufsize -= s;
     }
@@ -455,6 +456,7 @@ main (int argc, char *argv[])
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
   c_stack_action (cleanup);
+  xstdopen ();
 
   prog = getenv ("EDITOR");
   if (prog)
@@ -464,114 +466,114 @@ main (int argc, char *argv[])
 
   /* parse command line args */
   while ((opt = getopt_long (argc, argv, "abBdEHiI:lo:stvw:WZ", longopts, 0))
-        != -1)
+         != -1)
     {
       switch (opt)
-       {
-       case 'a':
-         diffarg ("-a");
-         break;
-
-       case 'b':
-         diffarg ("-b");
-         break;
-
-       case 'B':
-         diffarg ("-B");
-         break;
-
-       case 'd':
-         diffarg ("-d");
-         break;
-
-       case 'E':
-         diffarg ("-E");
-         break;
-
-       case 'H':
-         diffarg ("-H");
-         break;
-
-       case 'i':
-         diffarg ("-i");
-         break;
-
-       case 'I':
-         diffarg ("-I");
-         diffarg (optarg);
-         break;
-
-       case 'l':
-         diffarg ("--left-column");
-         break;
-
-       case 'o':
-         output = optarg;
-         break;
-
-       case 's':
-         suppress_common_lines = true;
-         break;
-
-       case 't':
-         diffarg ("-t");
-         break;
-
-       case 'v':
-         version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
-                      AUTHORS, (char *) NULL);
-         check_stdout ();
-         return EXIT_SUCCESS;
-
-       case 'w':
-         diffarg ("-W");
-         diffarg (optarg);
-         break;
-
-       case 'W':
-         diffarg ("-w");
-         break;
-
-       case 'Z':
-         diffarg ("-Z");
-         break;
-
-       case DIFF_PROGRAM_OPTION:
-         diffargv[0] = optarg;
-         break;
-
-       case HELP_OPTION:
-         usage ();
-         check_stdout ();
-         return EXIT_SUCCESS;
-
-       case STRIP_TRAILING_CR_OPTION:
-         diffarg ("--strip-trailing-cr");
-         break;
-
-       case TABSIZE_OPTION:
-         diffarg ("--tabsize");
-         diffarg (optarg);
-         break;
-
-       default:
-         try_help (0, 0);
-       }
+        {
+        case 'a':
+          diffarg ("-a");
+          break;
+
+        case 'b':
+          diffarg ("-b");
+          break;
+
+        case 'B':
+          diffarg ("-B");
+          break;
+
+        case 'd':
+          diffarg ("-d");
+          break;
+
+        case 'E':
+          diffarg ("-E");
+          break;
+
+        case 'H':
+          diffarg ("-H");
+          break;
+
+        case 'i':
+          diffarg ("-i");
+          break;
+
+        case 'I':
+          diffarg ("-I");
+          diffarg (optarg);
+          break;
+
+        case 'l':
+          diffarg ("--left-column");
+          break;
+
+        case 'o':
+          output = optarg;
+          break;
+
+        case 's':
+          suppress_common_lines = true;
+          break;
+
+        case 't':
+          diffarg ("-t");
+          break;
+
+        case 'v':
+          version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version,
+                       AUTHORS, (char *) NULL);
+          check_stdout ();
+          return EXIT_SUCCESS;
+
+        case 'w':
+          diffarg ("-W");
+          diffarg (optarg);
+          break;
+
+        case 'W':
+          diffarg ("-w");
+          break;
+
+        case 'Z':
+          diffarg ("-Z");
+          break;
+
+        case DIFF_PROGRAM_OPTION:
+          diffargv[0] = optarg;
+          break;
+
+        case HELP_OPTION:
+          usage ();
+          check_stdout ();
+          return EXIT_SUCCESS;
+
+        case STRIP_TRAILING_CR_OPTION:
+          diffarg ("--strip-trailing-cr");
+          break;
+
+        case TABSIZE_OPTION:
+          diffarg ("--tabsize");
+          diffarg (optarg);
+          break;
+
+        default:
+          try_help (0, 0);
+        }
     }
 
   if (argc - optind != 2)
     {
       if (argc - optind < 2)
-       try_help ("missing operand after '%s'", argv[argc - 1]);
+        try_help ("missing operand after '%s'", argv[argc - 1]);
       else
-       try_help ("extra operand '%s'", argv[optind + 2]);
+        try_help ("extra operand '%s'", argv[optind + 2]);
     }
 
   if (! output)
     {
       /* easy case: diff does everything for us */
       if (suppress_common_lines)
-       diffarg ("--suppress-common-lines");
+        diffarg ("--suppress-common-lines");
       diffarg ("-y");
       diffarg ("--");
       diffarg (argv[optind]);
@@ -592,7 +594,7 @@ main (int argc, char *argv[])
       bool rightdir = diraccess (argv[optind + 1]);
 
       if (leftdir & rightdir)
-       fatal ("both files to be compared are directories");
+        fatal ("both files to be compared are directories");
 
       lname = expand_name (argv[optind], leftdir, argv[optind + 1]);
       left = ck_fopen (lname, "r");
@@ -610,47 +612,47 @@ main (int argc, char *argv[])
 
 #if ! HAVE_WORKING_FORK
       {
-       char *command = system_quote_argv (SCI_SYSTEM, (char **) diffargv);
-       errno = 0;
-       diffout = popen (command, "r");
-       if (! diffout)
-         perror_fatal (command);
-       free (command);
+        char *command = system_quote_argv (SCI_SYSTEM, (char **) diffargv);
+        errno = 0;
+        diffout = popen (command, "r");
+        if (! diffout)
+          perror_fatal (command);
+        free (command);
       }
 #else
       {
-       int diff_fds[2];
-
-       if (pipe (diff_fds) != 0)
-         perror_fatal ("pipe");
-
-       diffpid = fork ();
-       if (diffpid < 0)
-         perror_fatal ("fork");
-       if (! diffpid)
-         {
-           /* Alter the child's SIGINT and SIGPIPE handlers;
-              this may munge the parent.
-              The child ignores SIGINT in case the user interrupts the editor.
-              The child does not ignore SIGPIPE, even if the parent does.  */
-           if (initial_handler (handler_index_of_SIGINT) != SIG_IGN)
-             signal_handler (SIGINT, SIG_IGN);
-           signal_handler (SIGPIPE, SIG_DFL);
-           close (diff_fds[0]);
-           if (diff_fds[1] != STDOUT_FILENO)
-             {
-               dup2 (diff_fds[1], STDOUT_FILENO);
-               close (diff_fds[1]);
-             }
-
-           execvp (diffargv[0], (char **) diffargv);
-           _exit (errno == ENOENT ? 127 : 126);
-         }
-
-       close (diff_fds[1]);
-       diffout = fdopen (diff_fds[0], "r");
-       if (! diffout)
-         perror_fatal ("fdopen");
+        int diff_fds[2];
+
+        if (pipe (diff_fds) != 0)
+          perror_fatal ("pipe");
+
+        diffpid = fork ();
+        if (diffpid < 0)
+          perror_fatal ("fork");
+        if (! diffpid)
+          {
+            /* Alter the child's SIGINT and SIGPIPE handlers;
+               this may munge the parent.
+               The child ignores SIGINT in case the user interrupts the editor.
+               The child does not ignore SIGPIPE, even if the parent does.  */
+            if (initial_handler (handler_index_of_SIGINT) != SIG_IGN)
+              signal_handler (SIGINT, SIG_IGN);
+            signal_handler (SIGPIPE, SIG_DFL);
+            close (diff_fds[0]);
+            if (diff_fds[1] != STDOUT_FILENO)
+              {
+                dup2 (diff_fds[1], STDOUT_FILENO);
+                close (diff_fds[1]);
+              }
+
+            execvp (diffargv[0], (char **) diffargv);
+            _exit (errno == ENOENT ? 127 : 126);
+          }
+
+        close (diff_fds[1]);
+        diffout = fdopen (diff_fds[0], "r");
+        if (! diffout)
+          perror_fatal ("fdopen");
       }
 #endif
 
@@ -665,36 +667,36 @@ main (int argc, char *argv[])
       ck_fclose (out);
 
       {
-       int wstatus;
-       int werrno = 0;
+        int wstatus;
+        int werrno = 0;
 
 #if ! HAVE_WORKING_FORK
-       wstatus = pclose (diffout);
-       if (wstatus == -1)
-         werrno = errno;
+        wstatus = pclose (diffout);
+        if (wstatus == -1)
+          werrno = errno;
 #else
-       ck_fclose (diffout);
-       while (waitpid (diffpid, &wstatus, 0) < 0)
-         if (errno == EINTR)
-           checksigs ();
-         else
-           perror_fatal ("waitpid");
-       diffpid = 0;
+        ck_fclose (diffout);
+        while (waitpid (diffpid, &wstatus, 0) < 0)
+          if (errno == EINTR)
+            checksigs ();
+          else
+            perror_fatal ("waitpid");
+        diffpid = 0;
 #endif
 
-       if (tmpname)
-         {
-           unlink (tmpname);
-           tmpname = 0;
-         }
+        if (tmpname)
+          {
+            unlink (tmpname);
+            tmpname = 0;
+          }
 
-       if (! interact_ok)
-         exiterr ();
+        if (! interact_ok)
+          exiterr ();
 
-       check_child_status (werrno, wstatus, EXIT_FAILURE, diffargv[0]);
-       untrapsig (0);
-       checksigs ();
-       exit (WEXITSTATUS (wstatus));
+        check_child_status (werrno, wstatus, EXIT_FAILURE, diffargv[0]);
+        untrapsig (0);
+        checksigs ();
+        exit (WEXITSTATUS (wstatus));
       }
     }
   return EXIT_SUCCESS;                 /* Fool '-Wall'.  */
@@ -708,11 +710,11 @@ diffarg (char const *a)
   if (diffargs == diffarglim)
     {
       if (! diffarglim)
-       diffarglim = 16;
+        diffarglim = 16;
       else if (PTRDIFF_MAX / (2 * sizeof *diffargv) <= diffarglim)
-       xalloc_die ();
+        xalloc_die ();
       else
-       diffarglim *= 2;
+        diffarglim *= 2;
       diffargv = xrealloc (diffargv, diffarglim * sizeof *diffargv);
     }
   diffargv[diffargs++] = a;
@@ -765,7 +767,7 @@ trapsigs (void)
       initial_action[i] = signal (sigs[i], SIG_IGN);
 #endif
       if (initial_handler (i) != SIG_IGN)
-       signal_handler (sigs[i], catchsig);
+        signal_handler (sigs[i], catchsig);
     }
 
 #ifdef SIGCHLD
@@ -785,13 +787,13 @@ untrapsig (int s)
   if (sigs_trapped)
     for (i = 0;  i < NUM_SIGS;  i++)
       if ((! s || sigs[i] == s)  &&  initial_handler (i) != SIG_IGN)
-       {
+        {
 #if HAVE_SIGACTION
-         sigaction (sigs[i], &initial_action[i], 0);
+          sigaction (sigs[i], &initial_action[i], 0);
 #else
-         signal (sigs[i], initial_action[i]);
+          signal (sigs[i], initial_action[i]);
 #endif
-       }
+        }
 }
 
 /* Exit if a signal has been received.  */
@@ -837,7 +839,7 @@ skip_white (void)
     {
       c = getchar ();
       if (! isspace (c) || c == '\n')
-       break;
+        break;
       checksigs ();
     }
   if (ferror (stdin))
@@ -869,215 +871,215 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen,
       bool gotcmd = false;
 
       while (! gotcmd)
-       {
-         if (putchar ('%') != '%')
-           perror_fatal (_("write failed"));
-         ck_fflush (stdout);
-
-         cmd0 = skip_white ();
-         switch (cmd0)
-           {
-           case '1': case '2': case 'l': case 'r':
-           case 's': case 'v': case 'q':
-             if (skip_white () != '\n')
-               {
-                 give_help ();
-                 flush_line ();
-                 continue;
-               }
-             gotcmd = true;
-             break;
-
-           case 'e':
-             cmd1 = skip_white ();
-             switch (cmd1)
-               {
-               case '1': case '2': case 'b': case 'd': case 'l': case 'r':
-                 if (skip_white () != '\n')
-                   {
-                     give_help ();
-                     flush_line ();
-                     continue;
-                   }
-                 gotcmd = true;
-                 break;
-               case '\n':
-                 gotcmd = true;
-                 break;
-               default:
-                 give_help ();
-                 flush_line ();
-                 continue;
-               }
-             break;
-
-           case EOF:
-             if (feof (stdin))
-               {
-                 gotcmd = true;
-                 cmd0 = 'q';
-                 break;
-               }
-             FALLTHROUGH;
-           default:
-             flush_line ();
-             FALLTHROUGH;
-           case '\n':
-             give_help ();
-             continue;
-           }
-       }
+        {
+          if (putchar ('%') != '%')
+            perror_fatal (_("write failed"));
+          ck_fflush (stdout);
+
+          cmd0 = skip_white ();
+          switch (cmd0)
+            {
+            case '1': case '2': case 'l': case 'r':
+            case 's': case 'v': case 'q':
+              if (skip_white () != '\n')
+                {
+                  give_help ();
+                  flush_line ();
+                  continue;
+                }
+              gotcmd = true;
+              break;
+
+            case 'e':
+              cmd1 = skip_white ();
+              switch (cmd1)
+                {
+                case '1': case '2': case 'b': case 'd': case 'l': case 'r':
+                  if (skip_white () != '\n')
+                    {
+                      give_help ();
+                      flush_line ();
+                      continue;
+                    }
+                  gotcmd = true;
+                  break;
+                case '\n':
+                  gotcmd = true;
+                  break;
+                default:
+                  give_help ();
+                  flush_line ();
+                  continue;
+                }
+              break;
+
+            case EOF:
+              if (feof (stdin))
+                {
+                  gotcmd = true;
+                  cmd0 = 'q';
+                  break;
+                }
+              FALLTHROUGH;
+            default:
+              flush_line ();
+              FALLTHROUGH;
+            case '\n':
+              give_help ();
+              continue;
+            }
+        }
 
       switch (cmd0)
-       {
-       case '1': case 'l':
-         lf_copy (left, llen, outfile);
-         lf_skip (right, rlen);
-         return true;
-       case '2': case 'r':
-         lf_copy (right, rlen, outfile);
-         lf_skip (left, llen);
-         return true;
-       case 's':
-         suppress_common_lines = true;
-         break;
-       case 'v':
-         suppress_common_lines = false;
-         break;
-       case 'q':
-         return false;
-       case 'e':
-         {
-           int fd;
-
-           if (tmpname)
-             tmp = fopen (tmpname, "w");
-           else
-             {
-               if ((fd = temporary_file ()) < 0)
-                 perror_fatal ("mkstemp");
-               tmp = fdopen (fd, "w");
-             }
-
-           if (! tmp)
-             perror_fatal (tmpname);
-
-           switch (cmd1)
-             {
-             case 'd':
-               if (llen)
-                 {
-                   printint l1 = lline;
-                   printint l2 = lline + llen - 1;
-                   if (llen == 1)
-                     fprintf (tmp, "--- %s %"pI"d\n", lname, l1);
-                   else
-                     fprintf (tmp, "--- %s %"pI"d,%"pI"d\n", lname, l1, l2);
-                 }
-               FALLTHROUGH;
-             case '1': case 'b': case 'l':
-               lf_copy (left, llen, tmp);
-               break;
-
-             default:
-               lf_skip (left, llen);
-               break;
-             }
-
-           switch (cmd1)
-             {
-             case 'd':
-               if (rlen)
-                 {
-                   printint l1 = rline;
-                   printint l2 = rline + rlen - 1;
-                   if (rlen == 1)
-                     fprintf (tmp, "+++ %s %"pI"d\n", rname, l1);
-                   else
-                     fprintf (tmp, "+++ %s %"pI"d,%"pI"d\n", rname, l1, l2);
-                 }
-               FALLTHROUGH;
-             case '2': case 'b': case 'r':
-               lf_copy (right, rlen, tmp);
-               break;
-
-             default:
-               lf_skip (right, rlen);
-               break;
-             }
-
-           ck_fclose (tmp);
-
-           {
-             int wstatus;
-             int werrno = 0;
-             char const *argv[3];
-
-             ignore_SIGINT = true;
-             checksigs ();
-             argv[0] = editor_program;
-             argv[1] = tmpname;
-             argv[2] = 0;
-
-             {
+        {
+        case '1': case 'l':
+          lf_copy (left, llen, outfile);
+          lf_skip (right, rlen);
+          return true;
+        case '2': case 'r':
+          lf_copy (right, rlen, outfile);
+          lf_skip (left, llen);
+          return true;
+        case 's':
+          suppress_common_lines = true;
+          break;
+        case 'v':
+          suppress_common_lines = false;
+          break;
+        case 'q':
+          return false;
+        case 'e':
+          {
+            int fd;
+
+            if (tmpname)
+              tmp = fopen (tmpname, "w");
+            else
+              {
+                if ((fd = temporary_file ()) < 0)
+                  perror_fatal ("mkstemp");
+                tmp = fdopen (fd, "w");
+              }
+
+            if (! tmp)
+              perror_fatal (tmpname);
+
+            switch (cmd1)
+              {
+              case 'd':
+                if (llen)
+                  {
+                    printint l1 = lline;
+                    printint l2 = lline + llen - 1;
+                    if (llen == 1)
+                      fprintf (tmp, "--- %s %"pI"d\n", lname, l1);
+                    else
+                      fprintf (tmp, "--- %s %"pI"d,%"pI"d\n", lname, l1, l2);
+                  }
+                FALLTHROUGH;
+              case '1': case 'b': case 'l':
+                lf_copy (left, llen, tmp);
+                break;
+
+              default:
+                lf_skip (left, llen);
+                break;
+              }
+
+            switch (cmd1)
+              {
+              case 'd':
+                if (rlen)
+                  {
+                    printint l1 = rline;
+                    printint l2 = rline + rlen - 1;
+                    if (rlen == 1)
+                      fprintf (tmp, "+++ %s %"pI"d\n", rname, l1);
+                    else
+                      fprintf (tmp, "+++ %s %"pI"d,%"pI"d\n", rname, l1, l2);
+                  }
+                FALLTHROUGH;
+              case '2': case 'b': case 'r':
+                lf_copy (right, rlen, tmp);
+                break;
+
+              default:
+                lf_skip (right, rlen);
+                break;
+              }
+
+            ck_fclose (tmp);
+
+            {
+              int wstatus;
+              int werrno = 0;
+              char const *argv[3];
+
+              ignore_SIGINT = true;
+              checksigs ();
+              argv[0] = editor_program;
+              argv[1] = tmpname;
+              argv[2] = 0;
+
+              {
 #if ! HAVE_WORKING_FORK
-               char *command = system_quote_argv (SCI_SYSTEM, (char **) argv);
-               wstatus = system (command);
-               if (wstatus == -1)
-                 werrno = errno;
-               free (command);
+                char *command = system_quote_argv (SCI_SYSTEM, (char **) argv);
+                wstatus = system (command);
+                if (wstatus == -1)
+                  werrno = errno;
+                free (command);
 #else
-               pid_t pid;
-
-               pid = fork ();
-               if (pid == 0)
-                 {
-                   execvp (editor_program, (char **) argv);
-                   _exit (errno == ENOENT ? 127 : 126);
-                 }
-
-               if (pid < 0)
-                 perror_fatal ("fork");
-
-               while (waitpid (pid, &wstatus, 0) < 0)
-                 if (errno == EINTR)
-                   checksigs ();
-                 else
-                   perror_fatal ("waitpid");
+                pid_t pid;
+
+                pid = fork ();
+                if (pid == 0)
+                  {
+                    execvp (editor_program, (char **) argv);
+                    _exit (errno == ENOENT ? 127 : 126);
+                  }
+
+                if (pid < 0)
+                  perror_fatal ("fork");
+
+                while (waitpid (pid, &wstatus, 0) < 0)
+                  if (errno == EINTR)
+                    checksigs ();
+                  else
+                    perror_fatal ("waitpid");
 #endif
-             }
-
-             ignore_SIGINT = false;
-             check_child_status (werrno, wstatus, EXIT_SUCCESS,
-                                 editor_program);
-           }
-
-           {
-             char buf[SDIFF_BUFSIZE];
-             size_t size;
-             tmp = ck_fopen (tmpname, "r");
-             while ((size = ck_fread (buf, SDIFF_BUFSIZE, tmp)) != 0)
-               {
-                 checksigs ();
-                 ck_fwrite (buf, size, outfile);
-               }
-             ck_fclose (tmp);
-           }
-           return true;
-         }
-       default:
-         give_help ();
-         break;
-       }
+              }
+
+              ignore_SIGINT = false;
+              check_child_status (werrno, wstatus, EXIT_SUCCESS,
+                                  editor_program);
+            }
+
+            {
+              char buf[SDIFF_BUFSIZE];
+              size_t size;
+              tmp = ck_fopen (tmpname, "r");
+              while ((size = ck_fread (buf, SDIFF_BUFSIZE, tmp)) != 0)
+                {
+                  checksigs ();
+                  ck_fwrite (buf, size, outfile);
+                }
+              ck_fclose (tmp);
+            }
+            return true;
+          }
+        default:
+          give_help ();
+          break;
+        }
     }
 }
 \f
 /* Alternately reveal bursts of diff output and handle user commands.  */
 static bool
 interact (struct line_filter *diff,
-         struct line_filter *left, char const *lname,
-         struct line_filter *right, char const *rname,
-         FILE *outfile)
+          struct line_filter *left, char const *lname,
+          struct line_filter *right, char const *rname,
+          FILE *outfile)
 {
   lin lline = 1, rline = 1;
 
@@ -1087,56 +1089,56 @@ interact (struct line_filter *diff,
       int snarfed = lf_snarf (diff, diff_help, sizeof diff_help);
 
       if (snarfed <= 0)
-       return snarfed != 0;
+        return snarfed != 0;
 
       checksigs ();
 
       if (diff_help[0] == ' ')
-       puts (diff_help + 1);
+        puts (diff_help + 1);
       else
-       {
-         char *numend;
-         uintmax_t val;
-         lin llen, rlen, lenmax;
-         errno = 0;
-         val = strtoumax (diff_help + 1, &numend, 10);
-         if (LIN_MAX < val || errno || *numend != ',')
-           fatal (diff_help);
-         llen = val;
-         val = strtoumax (numend + 1, &numend, 10);
-         if (LIN_MAX < val || errno || *numend)
-           fatal (diff_help);
-         rlen = val;
-
-         lenmax = MAX (llen, rlen);
-
-         switch (diff_help[0])
-           {
-           case 'i':
-             if (suppress_common_lines)
-               lf_skip (diff, lenmax);
-             else
-               lf_copy (diff, lenmax, stdout);
-
-             lf_copy (left, llen, outfile);
-             lf_skip (right, rlen);
-             break;
-
-           case 'c':
-             lf_copy (diff, lenmax, stdout);
-             if (! edit (left, lname, lline, llen,
-                         right, rname, rline, rlen,
-                         outfile))
-               return false;
-             break;
-
-           default:
-             fatal (diff_help);
-           }
-
-         lline += llen;
-         rline += rlen;
-       }
+        {
+          char *numend;
+          intmax_t val;
+          lin llen, rlen, lenmax;
+          errno = 0;
+          val = strtoimax (diff_help + 1, &numend, 10);
+          if (! (0 <= val && val <= LIN_MAX) || errno || *numend != ',')
+            fatal (diff_help);
+          llen = val;
+          val = strtoimax (numend + 1, &numend, 10);
+          if (! (0 <= val && val <= LIN_MAX) || errno || *numend)
+            fatal (diff_help);
+          rlen = val;
+
+          lenmax = MAX (llen, rlen);
+
+          switch (diff_help[0])
+            {
+            case 'i':
+              if (suppress_common_lines)
+                lf_skip (diff, lenmax);
+              else
+                lf_copy (diff, lenmax, stdout);
+
+              lf_copy (left, llen, outfile);
+              lf_skip (right, rlen);
+              break;
+
+            case 'c':
+              lf_copy (diff, lenmax, stdout);
+              if (! edit (left, lname, lline, llen,
+                          right, rname, rline, rlen,
+                          outfile))
+                return false;
+              break;
+
+            default:
+              fatal (diff_help);
+            }
+
+          lline += llen;
+          rline += rlen;
+        }
     }
 }
 
index 9670025..11d5f5c 100644 (file)
@@ -1,6 +1,6 @@
 /* sdiff-format output routines for GNU DIFF.
 
-   Copyright (C) 1991-1993, 1998, 2001-2002, 2004, 2009-2013, 2015-2018 Free
+   Copyright (C) 1991-1993, 1998, 2001-2002, 2004, 2009-2013, 2015-2021 Free
    Software Foundation, Inc.
 
    This file is part of GNU DIFF.
@@ -55,8 +55,8 @@ tab_from_to (size_t from, size_t to)
   if (!expand_tabs)
     for (tab = from + tab_size - from % tab_size;  tab <= to;  tab += tab_size)
       {
-       putc ('\t', out);
-       from = tab;
+        putc ('\t', out);
+        from = tab;
       }
   while (from++ < to)
     putc (' ', out);
@@ -83,111 +83,111 @@ print_half_line (char const *const *line, size_t indent, size_t out_bound)
       register char c = *text_pointer++;
 
       switch (c)
-       {
-       case '\t':
-         {
-           size_t spaces = tabsize - in_position % tabsize;
-           if (in_position == out_position)
-             {
-               size_t tabstop = out_position + spaces;
-               if (expand_tabs)
-                 {
-                   if (out_bound < tabstop)
-                     tabstop = out_bound;
-                   for (;  out_position < tabstop;  out_position++)
-                     putc (' ', out);
-                 }
-               else
-                 if (tabstop < out_bound)
-                   {
-                     out_position = tabstop;
-                     putc (c, out);
-                   }
-             }
-           in_position += spaces;
-         }
-         break;
-
-       case '\r':
-         {
-           putc (c, out);
-           tab_from_to (0, indent);
-           in_position = out_position = 0;
-         }
-         break;
-
-       case '\b':
-         if (in_position != 0 && --in_position < out_bound)
-           {
-             if (out_position <= in_position)
-               /* Add spaces to make up for suppressed tab past out_bound.  */
-               for (;  out_position < in_position;  out_position++)
-                 putc (' ', out);
-             else
-               {
-                 out_position = in_position;
-                 putc (c, out);
-               }
-           }
-         break;
-
-       default:
-         {
-           wchar_t wc;
-           size_t bytes = mbrtowc (&wc, tp0, text_limit - tp0, &mbstate);
-
-           if (0 < bytes && bytes < (size_t) -2)
-             {
-               int width = wcwidth (wc);
-               if (0 < width)
-                 in_position += width;
-               if (in_position <= out_bound)
-                 {
-                   out_position = in_position;
-                   fwrite (tp0, 1, bytes, stdout);
-                 }
-               text_pointer = tp0 + bytes;
-               break;
-             }
-         }
-         FALLTHROUGH;
-       case '\f':
-       case '\v':
-         if (in_position < out_bound)
-           putc (c, out);
-         break;
-
-       case ' ': case '!': case '"': case '#': case '%':
-       case '&': case '\'': case '(': case ')': case '*':
-       case '+': case ',': case '-': case '.': case '/':
-       case '0': case '1': case '2': case '3': case '4':
-       case '5': case '6': case '7': case '8': case '9':
-       case ':': case ';': case '<': case '=': case '>':
-       case '?':
-       case 'A': case 'B': case 'C': case 'D': case 'E':
-       case 'F': case 'G': case 'H': case 'I': case 'J':
-       case 'K': case 'L': case 'M': case 'N': case 'O':
-       case 'P': case 'Q': case 'R': case 'S': case 'T':
-       case 'U': case 'V': case 'W': case 'X': case 'Y':
-       case 'Z':
-       case '[': case '\\': case ']': case '^': case '_':
-       case 'a': case 'b': case 'c': case 'd': case 'e':
-       case 'f': case 'g': case 'h': case 'i': case 'j':
-       case 'k': case 'l': case 'm': case 'n': case 'o':
-       case 'p': case 'q': case 'r': case 's': case 't':
-       case 'u': case 'v': case 'w': case 'x': case 'y':
-       case 'z': case '{': case '|': case '}': case '~':
-         /* These characters are printable ASCII characters.  */
-         if (in_position++ < out_bound)
-           {
-             out_position = in_position;
-             putc (c, out);
-           }
-         break;
-
-       case '\n':
-         return out_position;
-       }
+        {
+        case '\t':
+          {
+            size_t spaces = tabsize - in_position % tabsize;
+            if (in_position == out_position)
+              {
+                size_t tabstop = out_position + spaces;
+                if (expand_tabs)
+                  {
+                    if (out_bound < tabstop)
+                      tabstop = out_bound;
+                    for (;  out_position < tabstop;  out_position++)
+                      putc (' ', out);
+                  }
+                else
+                  if (tabstop < out_bound)
+                    {
+                      out_position = tabstop;
+                      putc (c, out);
+                    }
+              }
+            in_position += spaces;
+          }
+          break;
+
+        case '\r':
+          {
+            putc (c, out);
+            tab_from_to (0, indent);
+            in_position = out_position = 0;
+          }
+          break;
+
+        case '\b':
+          if (in_position != 0 && --in_position < out_bound)
+            {
+              if (out_position <= in_position)
+                /* Add spaces to make up for suppressed tab past out_bound.  */
+                for (;  out_position < in_position;  out_position++)
+                  putc (' ', out);
+              else
+                {
+                  out_position = in_position;
+                  putc (c, out);
+                }
+            }
+          break;
+
+        default:
+          {
+            wchar_t wc;
+            size_t bytes = mbrtowc (&wc, tp0, text_limit - tp0, &mbstate);
+
+            if (0 < bytes && bytes < (size_t) -2)
+              {
+                int width = wcwidth (wc);
+                if (0 < width)
+                  in_position += width;
+                if (in_position <= out_bound)
+                  {
+                    out_position = in_position;
+                    fwrite (tp0, 1, bytes, stdout);
+                  }
+                text_pointer = tp0 + bytes;
+                break;
+              }
+          }
+          FALLTHROUGH;
+        case '\f':
+        case '\v':
+          if (in_position < out_bound)
+            putc (c, out);
+          break;
+
+        case ' ': case '!': case '"': case '#': case '%':
+        case '&': case '\'': case '(': case ')': case '*':
+        case '+': case ',': case '-': case '.': case '/':
+        case '0': case '1': case '2': case '3': case '4':
+        case '5': case '6': case '7': case '8': case '9':
+        case ':': case ';': case '<': case '=': case '>':
+        case '?':
+        case 'A': case 'B': case 'C': case 'D': case 'E':
+        case 'F': case 'G': case 'H': case 'I': case 'J':
+        case 'K': case 'L': case 'M': case 'N': case 'O':
+        case 'P': case 'Q': case 'R': case 'S': case 'T':
+        case 'U': case 'V': case 'W': case 'X': case 'Y':
+        case 'Z':
+        case '[': case '\\': case ']': case '^': case '_':
+        case 'a': case 'b': case 'c': case 'd': case 'e':
+        case 'f': case 'g': case 'h': case 'i': case 'j':
+        case 'k': case 'l': case 'm': case 'n': case 'o':
+        case 'p': case 'q': case 'r': case 's': case 't':
+        case 'u': case 'v': case 'w': case 'x': case 'y':
+        case 'z': case '{': case '|': case '}': case '~':
+          /* These characters are printable ASCII characters.  */
+          if (in_position++ < out_bound)
+            {
+              out_position = in_position;
+              putc (c, out);
+            }
+          break;
+
+        case '\n':
+          return out_position;
+        }
     }
 
   return out_position;
@@ -199,7 +199,7 @@ print_half_line (char const *const *line, size_t indent, size_t out_bound)
 
 static void
 print_1sdiff_line (char const *const *left, char sep,
-                  char const *const *right)
+                   char const *const *right)
 {
   FILE *out = outfile;
   size_t hw = sdiff_half_width;
@@ -229,7 +229,7 @@ print_1sdiff_line (char const *const *left, char sep,
     {
       col = tab_from_to (col, (hw + c2o - 1) / 2) + 1;
       if (sep == '|' && put_newline != (right[1][-1] == '\n'))
-       sep = put_newline ? '/' : '\\';
+        sep = put_newline ? '/' : '\\';
       putc (sep, out);
     }
 
@@ -237,10 +237,10 @@ print_1sdiff_line (char const *const *left, char sep,
     {
       put_newline |= right[1][-1] == '\n';
       if (**right != '\n')
-       {
-         col = tab_from_to (col, c2o);
-         print_half_line (right, col, hw);
-       }
+        {
+          col = tab_from_to (col, c2o);
+          print_half_line (right, col, hw);
+        }
     }
 
   if (put_newline)
@@ -259,22 +259,22 @@ print_sdiff_common_lines (lin limit0, lin limit1)
   if (!suppress_common_lines && (i0 != limit0 || i1 != limit1))
     {
       if (sdiff_merge_assist)
-       {
-         printint len0 = limit0 - i0;
-         printint len1 = limit1 - i1;
-         fprintf (outfile, "i%"pI"d,%"pI"d\n", len0, len1);
-       }
+        {
+          printint len0 = limit0 - i0;
+          printint len1 = limit1 - i1;
+          fprintf (outfile, "i%"pI"d,%"pI"d\n", len0, len1);
+        }
 
       if (!left_column)
-       {
-         while (i0 != limit0 && i1 != limit1)
-           print_1sdiff_line (&files[0].linbuf[i0++], ' ',
-                              &files[1].linbuf[i1++]);
-         while (i1 != limit1)
-           print_1sdiff_line (0, ')', &files[1].linbuf[i1++]);
-       }
+        {
+          while (i0 != limit0 && i1 != limit1)
+            print_1sdiff_line (&files[0].linbuf[i0++], ' ',
+                               &files[1].linbuf[i1++]);
+          while (i1 != limit1)
+            print_1sdiff_line (0, ')', &files[1].linbuf[i1++]);
+        }
       while (i0 != limit0)
-       print_1sdiff_line (&files[0].linbuf[i0++], '(', 0);
+        print_1sdiff_line (&files[0].linbuf[i0++], '(', 0);
     }
 
   next0 = limit0;
@@ -311,7 +311,7 @@ print_sdiff_hunk (struct change *hunk)
   if (changes == CHANGED)
     {
       for (i = first0, j = first1;  i <= last0 && j <= last1;  i++, j++)
-       print_1sdiff_line (&files[0].linbuf[i], '|', &files[1].linbuf[j]);
+        print_1sdiff_line (&files[0].linbuf[i], '|', &files[1].linbuf[j]);
       changes = (i <= last0 ? OLD : 0) + (j <= last1 ? NEW : 0);
       next0 = first0 = i;
       next1 = first1 = j;
@@ -321,7 +321,7 @@ print_sdiff_hunk (struct change *hunk)
   if (changes & NEW)
     {
       for (j = first1; j <= last1; ++j)
-       print_1sdiff_line (0, '>', &files[1].linbuf[j]);
+        print_1sdiff_line (0, '>', &files[1].linbuf[j]);
       next1 = j;
     }
 
@@ -329,7 +329,7 @@ print_sdiff_hunk (struct change *hunk)
   if (changes & OLD)
     {
       for (i = first0; i <= last0; ++i)
-       print_1sdiff_line (&files[0].linbuf[i], '<', 0);
+        print_1sdiff_line (&files[0].linbuf[i], '<', 0);
       next0 = i;
     }
 }
index 0c351b9..f921a50 100644 (file)
@@ -1,7 +1,7 @@
 /* System dependent declarations.
 
    Copyright (C) 1988-1989, 1992-1995, 1998, 2001-2002, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
index 4f4d9bb..4348757 100644 (file)
@@ -1,7 +1,7 @@
 /* Support routines for GNU DIFF.
 
    Copyright (C) 1988-1989, 1992-1995, 1998, 2001-2002, 2004, 2006, 2009-2013,
-   2015-2018 Free Software Foundation, Inc.
+   2015-2021 Free Software Foundation, Inc.
 
    This file is part of GNU DIFF.
 
@@ -101,7 +101,7 @@ message (char const *format_msgid, char const *arg1, char const *arg2)
 
 void
 message5 (char const *format_msgid, char const *arg1, char const *arg2,
-         char const *arg3, char const *arg4)
+          char const *arg3, char const *arg4)
 {
   if (paginate)
     {
@@ -119,12 +119,12 @@ message5 (char const *format_msgid, char const *arg1, char const *arg2,
       arg[4] = arg4 ? arg4 : "";
 
       for (i = 0;  i < 5;  i++)
-       total_size += size[i] = strlen (arg[i]) + 1;
+        total_size += size[i] = strlen (arg[i]) + 1;
 
       new = xmalloc (total_size);
 
       for (i = 0, p = new->args;  i < 5;  p += size[i++])
-       memcpy (p, arg[i], size[i]);
+        memcpy (p, arg[i], size[i]);
 
       *msg_chain_end = new;
       new->next = 0;
@@ -133,7 +133,7 @@ message5 (char const *format_msgid, char const *arg1, char const *arg2,
   else
     {
       if (sdiff_merge_assist)
-       putchar (' ');
+        putchar (' ');
       printf (_(format_msgid), arg1, arg2, arg3, arg4);
     }
 }
@@ -152,7 +152,7 @@ print_message_queue (void)
       struct msg *next = m->next;
       arg[0] = m->args;
       for (i = 0;  i < 4;  i++)
-       arg[i + 1] = arg[i] + strlen (arg[i]) + 1;
+        arg[i + 1] = arg[i] + strlen (arg[i]) + 1;
       printf (_(arg[0]), arg[1], arg[2], arg[3], arg[4]);
       free (m);
       m = next;
@@ -770,21 +770,21 @@ c_escape (char const *str)
       char c = *s;
 
       if (c == ' ')
-       {
-         must_quote = true;
-         continue;
-       }
+        {
+          must_quote = true;
+          continue;
+        }
       switch (c_escape_char (*s))
-       {
-         case 1:
-           plus += 3;
-           /* fall through */
-         case 0:
-           break;
-         default:
-           plus++;
-           break;
-       }
+        {
+          case 1:
+            plus += 3;
+            /* fall through */
+          case 0:
+            break;
+          default:
+            plus++;
+            break;
+        }
     }
 
   if (must_quote || plus)
@@ -795,27 +795,27 @@ c_escape (char const *str)
 
       *b++ = '"';
       for (s = str; *s; s++)
-       {
-         char c = *s;
-         char escape = c_escape_char (c);
-
-         switch (escape)
-           {
-             case 0:
-               *b++ = c;
-               break;
-             case 1:
-               *b++ = '\\';
-               *b++ = ((c >> 6) & 03) + '0';
-               *b++ = ((c >> 3) & 07) + '0';
-               *b++ = ((c >> 0) & 07) + '0';
-               break;
-             default:
-               *b++ = '\\';
-               *b++ = escape;
-               break;
-           }
-       }
+        {
+          char c = *s;
+          char escape = c_escape_char (c);
+
+          switch (escape)
+            {
+              case 0:
+                *b++ = c;
+                break;
+              case 1:
+                *b++ = '\\';
+                *b++ = ((c >> 6) & 03) + '0';
+                *b++ = ((c >> 3) & 07) + '0';
+                *b++ = ((c >> 0) & 07) + '0';
+                break;
+              default:
+                *b++ = '\\';
+                *b++ = escape;
+                break;
+            }
+        }
       *b++ = '"';
       *b = 0;
       return buffer;
@@ -849,7 +849,7 @@ begin_output (void)
       char const *argv[4];
 
       if (fflush (stdout) != 0)
-       pfatal_with_name (_("write failed"));
+        pfatal_with_name (_("write failed"));
 
       argv[0] = pr_program;
       argv[1] = "-h";
@@ -859,44 +859,44 @@ begin_output (void)
       /* Make OUTFILE a pipe to a subsidiary 'pr'.  */
       {
 #if HAVE_WORKING_FORK
-       int pipes[2];
-
-       if (pipe (pipes) != 0)
-         pfatal_with_name ("pipe");
-
-       pr_pid = fork ();
-       if (pr_pid < 0)
-         pfatal_with_name ("fork");
-
-       if (pr_pid == 0)
-         {
-           close (pipes[1]);
-           if (pipes[0] != STDIN_FILENO)
-             {
-               if (dup2 (pipes[0], STDIN_FILENO) < 0)
-                 pfatal_with_name ("dup2");
-               close (pipes[0]);
-             }
-
-           execv (pr_program, (char **) argv);
-           _exit (errno == ENOENT ? 127 : 126);
-         }
-       else
-         {
-           close (pipes[0]);
-           outfile = fdopen (pipes[1], "w");
-           if (!outfile)
-             pfatal_with_name ("fdopen");
-           check_color_output (true);
-         }
+        int pipes[2];
+
+        if (pipe (pipes) != 0)
+          pfatal_with_name ("pipe");
+
+        pr_pid = fork ();
+        if (pr_pid < 0)
+          pfatal_with_name ("fork");
+
+        if (pr_pid == 0)
+          {
+            close (pipes[1]);
+            if (pipes[0] != STDIN_FILENO)
+              {
+                if (dup2 (pipes[0], STDIN_FILENO) < 0)
+                  pfatal_with_name ("dup2");
+                close (pipes[0]);
+              }
+
+            execv (pr_program, (char **) argv);
+            _exit (errno == ENOENT ? 127 : 126);
+          }
+        else
+          {
+            close (pipes[0]);
+            outfile = fdopen (pipes[1], "w");
+            if (!outfile)
+              pfatal_with_name ("fdopen");
+            check_color_output (true);
+          }
 #else
-       char *command = system_quote_argv (SCI_SYSTEM, (char **) argv);
-       errno = 0;
-       outfile = popen (command, "w");
-       if (!outfile)
-         pfatal_with_name (command);
-       check_color_output (true);
-       free (command);
+        char *command = system_quote_argv (SCI_SYSTEM, (char **) argv);
+        errno = 0;
+        outfile = popen (command, "w");
+        if (!outfile)
+          pfatal_with_name (command);
+        check_color_output (true);
+        free (command);
 #endif
       }
     }
@@ -909,9 +909,9 @@ begin_output (void)
       check_color_output (false);
 
       /* If handling multiple files (because scanning a directory),
-        print which files the following output is about.  */
+         print which files the following output is about.  */
       if (currently_recursive)
-       printf ("%s\n", name);
+        printf ("%s\n", name);
     }
 
   free (name);
@@ -949,30 +949,30 @@ finish_output (void)
       int wstatus;
       int werrno = 0;
       if (ferror (outfile))
-       fatal ("write failed");
+        fatal ("write failed");
 #if ! HAVE_WORKING_FORK
       wstatus = pclose (outfile);
       if (wstatus == -1)
-       werrno = errno;
+        werrno = errno;
 #else
       if (fclose (outfile) != 0)
-       pfatal_with_name (_("write failed"));
+        pfatal_with_name (_("write failed"));
       if (waitpid (pr_pid, &wstatus, 0) < 0)
-       pfatal_with_name ("waitpid");
+        pfatal_with_name ("waitpid");
 #endif
       status = (! werrno && WIFEXITED (wstatus)
-               ? WEXITSTATUS (wstatus)
-               : INT_MAX);
+                ? WEXITSTATUS (wstatus)
+                : INT_MAX);
       if (status)
-       die (EXIT_TROUBLE, werrno,
-              _(status == 126
-                ? "subsidiary program '%s' could not be invoked"
-                : status == 127
-                ? "subsidiary program '%s' not found"
-                : status == INT_MAX
-                ? "subsidiary program '%s' failed"
-                : "subsidiary program '%s' failed (exit status %d)"),
-              pr_program, status);
+        die (EXIT_TROUBLE, werrno,
+               _(status == 126
+                 ? "subsidiary program '%s' could not be invoked"
+                 : status == 127
+                 ? "subsidiary program '%s' not found"
+                 : status == INT_MAX
+                 ? "subsidiary program '%s' failed"
+                 : "subsidiary program '%s' failed (exit status %d)"),
+               pr_program, status);
     }
 
   outfile = 0;
@@ -998,143 +998,143 @@ lines_differ (char const *s1, char const *s2)
 
       /* Test for exact char equality first, since it's a common case.  */
       if (c1 != c2)
-       {
-         switch (ignore_white_space)
-           {
-           case IGNORE_ALL_SPACE:
-             /* For -w, just skip past any white space.  */
-             while (isspace (c1) && c1 != '\n') c1 = *t1++;
-             while (isspace (c2) && c2 != '\n') c2 = *t2++;
-             break;
-
-           case IGNORE_SPACE_CHANGE:
-             /* For -b, advance past any sequence of white space in
-                line 1 and consider it just one space, or nothing at
-                all if it is at the end of the line.  */
-             if (isspace (c1))
-               {
-                 while (c1 != '\n')
-                   {
-                     c1 = *t1++;
-                     if (! isspace (c1))
-                       {
-                         --t1;
-                         c1 = ' ';
-                         break;
-                       }
-                   }
-               }
-
-             /* Likewise for line 2.  */
-             if (isspace (c2))
-               {
-                 while (c2 != '\n')
-                   {
-                     c2 = *t2++;
-                     if (! isspace (c2))
-                       {
-                         --t2;
-                         c2 = ' ';
-                         break;
-                       }
-                   }
-               }
-
-             if (c1 != c2)
-               {
-                 /* If we went too far when doing the simple test
-                    for equality, go back to the first non-white-space
-                    character in both sides and try again.  */
-                 if (c2 == ' ' && c1 != '\n'
-                     && s1 + 1 < t1
-                     && isspace ((unsigned char) t1[-2]))
-                   {
-                     --t1;
-                     continue;
-                   }
-                 if (c1 == ' ' && c2 != '\n'
-                     && s2 + 1 < t2
-                     && isspace ((unsigned char) t2[-2]))
-                   {
-                     --t2;
-                     continue;
-                   }
-               }
-
-             break;
-
-           case IGNORE_TRAILING_SPACE:
-           case IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE:
-             if (isspace (c1) && isspace (c2))
-               {
-                 unsigned char c;
-                 if (c1 != '\n')
-                   {
-                     char const *p = t1;
-                     while ((c = *p) != '\n' && isspace (c))
-                       ++p;
-                     if (c != '\n')
-                       break;
-                   }
-                 if (c2 != '\n')
-                   {
-                     char const *p = t2;
-                     while ((c = *p) != '\n' && isspace (c))
-                       ++p;
-                     if (c != '\n')
-                       break;
-                   }
-                 /* Both lines have nothing but whitespace left.  */
-                 return false;
-               }
-             if (ignore_white_space == IGNORE_TRAILING_SPACE)
-               break;
-             FALLTHROUGH;
-           case IGNORE_TAB_EXPANSION:
-             if ((c1 == ' ' && c2 == '\t')
-                 || (c1 == '\t' && c2 == ' '))
-               {
-                 size_t column2 = column;
-                 for (;; c1 = *t1++)
-                   {
-                     if (c1 == ' ')
-                       column++;
-                     else if (c1 == '\t')
-                       column += tabsize - column % tabsize;
-                     else
-                       break;
-                   }
-                 for (;; c2 = *t2++)
-                   {
-                     if (c2 == ' ')
-                       column2++;
-                     else if (c2 == '\t')
-                       column2 += tabsize - column2 % tabsize;
-                     else
-                       break;
-                   }
-                 if (column != column2)
-                   return true;
-               }
-             break;
-
-           case IGNORE_NO_WHITE_SPACE:
-             break;
-           }
-
-         /* Lowercase all letters if -i is specified.  */
-
-         if (ignore_case)
-           {
-             c1 = tolower (c1);
-             c2 = tolower (c2);
-           }
-
-         if (c1 != c2)
-           break;
-       }
+        {
+          switch (ignore_white_space)
+            {
+            case IGNORE_ALL_SPACE:
+              /* For -w, just skip past any white space.  */
+              while (isspace (c1) && c1 != '\n') c1 = *t1++;
+              while (isspace (c2) && c2 != '\n') c2 = *t2++;
+              break;
+
+            case IGNORE_SPACE_CHANGE:
+              /* For -b, advance past any sequence of white space in
+                 line 1 and consider it just one space, or nothing at
+                 all if it is at the end of the line.  */
+              if (isspace (c1))
+                {
+                  while (c1 != '\n')
+                    {
+                      c1 = *t1++;
+                      if (! isspace (c1))
+                        {
+                          --t1;
+                          c1 = ' ';
+                          break;
+                        }
+                    }
+                }
+
+              /* Likewise for line 2.  */
+              if (isspace (c2))
+                {
+                  while (c2 != '\n')
+                    {
+                      c2 = *t2++;
+                      if (! isspace (c2))
+                        {
+                          --t2;
+                          c2 = ' ';
+                          break;
+                        }
+                    }
+                }
+
+              if (c1 != c2)
+                {
+                  /* If we went too far when doing the simple test
+                     for equality, go back to the first non-white-space
+                     character in both sides and try again.  */
+                  if (c2 == ' ' && c1 != '\n'
+                      && s1 + 1 < t1
+                      && isspace ((unsigned char) t1[-2]))
+                    {
+                      --t1;
+                      continue;
+                    }
+                  if (c1 == ' ' && c2 != '\n'
+                      && s2 + 1 < t2
+                      && isspace ((unsigned char) t2[-2]))
+                    {
+                      --t2;
+                      continue;
+                    }
+                }
+
+              break;
+
+            case IGNORE_TRAILING_SPACE:
+            case IGNORE_TAB_EXPANSION_AND_TRAILING_SPACE:
+              if (isspace (c1) && isspace (c2))
+                {
+                  unsigned char c;
+                  if (c1 != '\n')
+                    {
+                      char const *p = t1;
+                      while ((c = *p) != '\n' && isspace (c))
+                        ++p;
+                      if (c != '\n')
+                        break;
+                    }
+                  if (c2 != '\n')
+                    {
+                      char const *p = t2;
+                      while ((c = *p) != '\n' && isspace (c))
+                        ++p;
+                      if (c != '\n')
+                        break;
+                    }
+                  /* Both lines have nothing but whitespace left.  */
+                  return false;
+                }
+              if (ignore_white_space == IGNORE_TRAILING_SPACE)
+                break;
+              FALLTHROUGH;
+            case IGNORE_TAB_EXPANSION:
+              if ((c1 == ' ' && c2 == '\t')
+                  || (c1 == '\t' && c2 == ' '))
+                {
+                  size_t column2 = column;
+                  for (;; c1 = *t1++)
+                    {
+                      if (c1 == ' ')
+                        column++;
+                      else if (c1 == '\t')
+                        column += tabsize - column % tabsize;
+                      else
+                        break;
+                    }
+                  for (;; c2 = *t2++)
+                    {
+                      if (c2 == ' ')
+                        column2++;
+                      else if (c2 == '\t')
+                        column2 += tabsize - column2 % tabsize;
+                      else
+                        break;
+                    }
+                  if (column != column2)
+                    return true;
+                }
+              break;
+
+            case IGNORE_NO_WHITE_SPACE:
+              break;
+            }
+
+          /* Lowercase all letters if -i is specified.  */
+
+          if (ignore_case)
+            {
+              c1 = tolower (c1);
+              c2 = tolower (c2);
+            }
+
+          if (c1 != c2)
+            break;
+        }
       if (c1 == '\n')
-       return false;
+        return false;
 
       column += c1 == '\t' ? tabsize - column % tabsize : 1;
     }
@@ -1170,8 +1170,8 @@ find_reverse_change (struct change *start)
 
 void
 print_script (struct change *script,
-             struct change * (*hunkfun) (struct change *),
-             void (*printfun) (struct change *))
+              struct change * (*hunkfun) (struct change *),
+              void (*printfun) (struct change *))
 {
   struct change *next = script;
 
@@ -1184,7 +1184,7 @@ print_script (struct change *script,
       end = (*hunkfun) (next);
 
       /* Disconnect them from the rest of the changes,
-        making them a hunk, and remember the rest for next iteration.  */
+         making them a hunk, and remember the rest for next iteration.  */
       next = end->link;
       end->link = 0;
 #ifdef DEBUG
@@ -1234,14 +1234,14 @@ print_1_line_nl (char const *line_flag, char const *const *line, bool skip_nl)
       char const *line_flag_1 = line_flag;
 
       if (suppress_blank_empty && **line == '\n')
-       {
-         flag_format_1 = "%s";
+        {
+          flag_format_1 = "%s";
 
-         /* This hack to omit trailing blanks takes advantage of the
-            fact that the only way that LINE_FLAG can end in a blank
-            is when LINE_FLAG consists of a single blank.  */
-         line_flag_1 += *line_flag_1 == ' ';
-       }
+          /* This hack to omit trailing blanks takes advantage of the
+             fact that the only way that LINE_FLAG can end in a blank
+             is when LINE_FLAG consists of a single blank.  */
+          line_flag_1 += *line_flag_1 == ' ';
+        }
 
       fprintf (out, flag_format_1, line_flag_1);
     }
@@ -1262,7 +1262,7 @@ print_1_line_nl (char const *line_flag, char const *const *line, bool skip_nl)
 
 void
 output_1_line (char const *base, char const *limit, char const *flag_format,
-              char const *line_flag)
+               char const *line_flag)
 {
   const size_t MAX_CHUNK = 1024;
   if (!expand_tabs)
@@ -1405,8 +1405,8 @@ translate_line_number (struct file_data const *file, lin i)
 
 void
 translate_range (struct file_data const *file,
-                lin a, lin b,
-                printint *aptr, printint *bptr)
+                 lin a, lin b,
+                 printint *aptr, printint *bptr)
 {
   *aptr = translate_line_number (file, a - 1) + 1;
   *bptr = translate_line_number (file, b + 1) - 1;
@@ -1448,8 +1448,8 @@ print_number_range (char sepchar, struct file_data *file, lin a, lin b)
 
 enum changes
 analyze_hunk (struct change *hunk,
-             lin *first0, lin *last0,
-             lin *first1, lin *last1)
+              lin *first0, lin *last0,
+              lin *first1, lin *last1)
 {
   struct change *next;
   lin l0, l1;
@@ -1482,46 +1482,46 @@ analyze_hunk (struct change *hunk,
       show_to += next->inserted;
 
       for (i = next->line0; i <= l0 && trivial; i++)
-       {
-         char const *line = linbuf0[i];
-         char const *lastbyte = linbuf0[i + 1] - 1;
-         char const *newline = lastbyte + (*lastbyte != '\n');
-         size_t len = newline - line;
-         char const *p = line;
-         if (skip_white_space)
-           for (; *p != '\n'; p++)
-             if (! isspace ((unsigned char) *p))
-               {
-                 if (! skip_leading_white_space)
-                   p = line;
-                 break;
-               }
-         if (newline - p != trivial_length
-             && (! ignore_regexp.fastmap
-                 || re_search (&ignore_regexp, line, len, 0, len, 0) < 0))
-           trivial = 0;
-       }
+        {
+          char const *line = linbuf0[i];
+          char const *lastbyte = linbuf0[i + 1] - 1;
+          char const *newline = lastbyte + (*lastbyte != '\n');
+          size_t len = newline - line;
+          char const *p = line;
+          if (skip_white_space)
+            for (; *p != '\n'; p++)
+              if (! isspace ((unsigned char) *p))
+                {
+                  if (! skip_leading_white_space)
+                    p = line;
+                  break;
+                }
+          if (newline - p != trivial_length
+              && (! ignore_regexp.fastmap
+                  || re_search (&ignore_regexp, line, len, 0, len, 0) < 0))
+            trivial = 0;
+        }
 
       for (i = next->line1; i <= l1 && trivial; i++)
-       {
-         char const *line = linbuf1[i];
-         char const *lastbyte = linbuf1[i + 1] - 1;
-         char const *newline = lastbyte + (*lastbyte != '\n');
-         size_t len = newline - line;
-         char const *p = line;
-         if (skip_white_space)
-           for (; *p != '\n'; p++)
-             if (! isspace ((unsigned char) *p))
-               {
-                 if (! skip_leading_white_space)
-                   p = line;
-                 break;
-               }
-         if (newline - p != trivial_length
-             && (! ignore_regexp.fastmap
-                 || re_search (&ignore_regexp, line, len, 0, len, 0) < 0))
-           trivial = 0;
-       }
+        {
+          char const *line = linbuf1[i];
+          char const *lastbyte = linbuf1[i + 1] - 1;
+          char const *newline = lastbyte + (*lastbyte != '\n');
+          size_t len = newline - line;
+          char const *p = line;
+          if (skip_white_space)
+            for (; *p != '\n'; p++)
+              if (! isspace ((unsigned char) *p))
+                {
+                  if (! skip_leading_white_space)
+                    p = line;
+                  break;
+                }
+          if (newline - p != trivial_length
+              && (! ignore_regexp.fastmap
+                  || re_search (&ignore_regexp, line, len, 0, len, 0) < 0))
+            trivial = 0;
+        }
     }
   while ((next = next->link) != 0);
 
@@ -1569,7 +1569,7 @@ debug_script (struct change *sp)
       printint deleted = sp->deleted;
       printint inserted = sp->inserted;
       fprintf (stderr, "%3"pI"d %3"pI"d delete %"pI"d insert %"pI"d\n",
-              line0, line1, deleted, inserted);
+               line0, line1, deleted, inserted);
     }
 
   fflush (stderr);
index b83fca9..2264d36 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16a from Makefile.am.
+# Makefile.in generated by automake 1.16d from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -94,11 +94,13 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/__inline.m4 \
        $(top_srcdir)/m4/absolute-header.m4 $(top_srcdir)/m4/alloca.m4 \
-       $(top_srcdir)/m4/arpa_inet_h.m4 $(top_srcdir)/m4/btowc.m4 \
-       $(top_srcdir)/m4/builtin-expect.m4 $(top_srcdir)/m4/c-stack.m4 \
+       $(top_srcdir)/m4/arpa_inet_h.m4 \
+       $(top_srcdir)/m4/asm-underscore.m4 $(top_srcdir)/m4/atoll.m4 \
+       $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/builtin-expect.m4 \
+       $(top_srcdir)/m4/c-stack.m4 $(top_srcdir)/m4/calloc.m4 \
        $(top_srcdir)/m4/clock_time.m4 $(top_srcdir)/m4/close.m4 \
        $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/config-h.m4 \
-       $(top_srcdir)/m4/ctype.m4 $(top_srcdir)/m4/dirname.m4 \
+       $(top_srcdir)/m4/ctype_h.m4 \
        $(top_srcdir)/m4/double-slash-root.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 \
@@ -108,13 +110,14 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/fdopen.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/fpieee.m4 $(top_srcdir)/m4/freopen.m4 \
+       $(top_srcdir)/m4/fopen.m4 $(top_srcdir)/m4/fpieee.m4 \
+       $(top_srcdir)/m4/free.m4 $(top_srcdir)/m4/freopen.m4 \
        $(top_srcdir)/m4/fstat.m4 $(top_srcdir)/m4/ftruncate.m4 \
        $(top_srcdir)/m4/getcwd.m4 $(top_srcdir)/m4/getdtablesize.m4 \
        $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/getpagesize.m4 \
-       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/gettext.m4 \
-       $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \
-       $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnu-make.m4 \
+       $(top_srcdir)/m4/getprogname.m4 $(top_srcdir)/m4/getrandom.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/gnu-make.m4 \
        $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 \
        $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \
@@ -122,49 +125,57 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inet_pton.m4 \
        $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \
        $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \
-       $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
-       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/ioctl.m4 \
-       $(top_srcdir)/m4/isblank.m4 $(top_srcdir)/m4/iswblank.m4 \
-       $(top_srcdir)/m4/langinfo_h.m4 $(top_srcdir)/m4/largefile.m4 \
-       $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-       $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
+       $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
+       $(top_srcdir)/m4/ioctl.m4 $(top_srcdir)/m4/isblank.m4 \
+       $(top_srcdir)/m4/iswblank.m4 $(top_srcdir)/m4/iswdigit.m4 \
+       $(top_srcdir)/m4/iswxdigit.m4 $(top_srcdir)/m4/langinfo_h.m4 \
+       $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libunistring-base.m4 \
        $(top_srcdir)/m4/limits-h.m4 $(top_srcdir)/m4/localcharset.m4 \
        $(top_srcdir)/m4/locale-fr.m4 $(top_srcdir)/m4/locale-ja.m4 \
        $(top_srcdir)/m4/locale-tr.m4 $(top_srcdir)/m4/locale-zh.m4 \
        $(top_srcdir)/m4/locale_h.m4 $(top_srcdir)/m4/localeconv.m4 \
-       $(top_srcdir)/m4/localtime-buffer.m4 \
-       $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+       $(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/lstat.m4 \
        $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/malloca.m4 \
        $(top_srcdir)/m4/manywarnings.m4 $(top_srcdir)/m4/mbchar.m4 \
        $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
        $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbslen.m4 \
        $(top_srcdir)/m4/mbsrtowcs.m4 $(top_srcdir)/m4/mbstate_t.m4 \
        $(top_srcdir)/m4/mbtowc.m4 $(top_srcdir)/m4/memchr.m4 \
-       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir.m4 \
-       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
-       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \
-       $(top_srcdir)/m4/msvc-inval.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/minmax.m4 \
+       $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mkstemp.m4 \
+       $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/mmap-anon.m4 \
+       $(top_srcdir)/m4/mode_t.m4 $(top_srcdir)/m4/msvc-inval.m4 \
        $(top_srcdir)/m4/msvc-nothrow.m4 $(top_srcdir)/m4/multiarch.m4 \
-       $(top_srcdir)/m4/nanosleep.m4 $(top_srcdir)/m4/netinet_in_h.m4 \
+       $(top_srcdir)/m4/musl.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/netinet_in_h.m4 \
        $(top_srcdir)/m4/nl_langinfo.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/nstrftime.m4 \
        $(top_srcdir)/m4/off_t.m4 $(top_srcdir)/m4/open-cloexec.m4 \
-       $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/pathmax.m4 \
-       $(top_srcdir)/m4/perror.m4 $(top_srcdir)/m4/pipe.m4 \
-       $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf.m4 \
-       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/putenv.m4 \
+       $(top_srcdir)/m4/open-slash.m4 $(top_srcdir)/m4/open.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/perror.m4 \
+       $(top_srcdir)/m4/pipe.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \
+       $(top_srcdir)/m4/pthread-thread.m4 \
+       $(top_srcdir)/m4/pthread_h.m4 \
+       $(top_srcdir)/m4/pthread_rwlock_rdlock.m4 \
+       $(top_srcdir)/m4/pthread_sigmask.m4 $(top_srcdir)/m4/putenv.m4 \
        $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \
        $(top_srcdir)/m4/raise.m4 $(top_srcdir)/m4/rawmemchr.m4 \
-       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
-       $(top_srcdir)/m4/select.m4 $(top_srcdir)/m4/setenv.m4 \
-       $(top_srcdir)/m4/setlocale.m4 $(top_srcdir)/m4/sigaction.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/realloc.m4 \
+       $(top_srcdir)/m4/reallocarray.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/sched_h.m4 $(top_srcdir)/m4/select.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/setlocale_null.m4 \
+       $(top_srcdir)/m4/sigaction.m4 $(top_srcdir)/m4/sigaltstack.m4 \
        $(top_srcdir)/m4/signal_h.m4 \
        $(top_srcdir)/m4/signalblocking.m4 \
        $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \
        $(top_srcdir)/m4/snprintf.m4 $(top_srcdir)/m4/socketlib.m4 \
        $(top_srcdir)/m4/sockets.m4 $(top_srcdir)/m4/socklen.m4 \
        $(top_srcdir)/m4/sockpfaf.m4 $(top_srcdir)/m4/ssize_t.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 \
@@ -172,30 +183,33 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
        $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
        $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/strerror.m4 \
        $(top_srcdir)/m4/strerror_r.m4 $(top_srcdir)/m4/string_h.m4 \
-       $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \
-       $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strptime.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/strings_h.m4 $(top_srcdir)/m4/strnlen.m4 \
+       $(top_srcdir)/m4/strptime.m4 $(top_srcdir)/m4/strtoimax.m4 \
+       $(top_srcdir)/m4/strtoll.m4 $(top_srcdir)/m4/symlink.m4 \
+       $(top_srcdir)/m4/sys_ioctl_h.m4 \
+       $(top_srcdir)/m4/sys_random_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/sys_wait_h.m4 $(top_srcdir)/m4/tempname.m4 \
+       $(top_srcdir)/m4/thread.m4 $(top_srcdir)/m4/threadlib.m4 \
        $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \
        $(top_srcdir)/m4/time_rz.m4 $(top_srcdir)/m4/timegm.m4 \
        $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
        $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/unistd_h.m4 \
-       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vararrays.m4 \
-       $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vasprintf.m4 \
-       $(top_srcdir)/m4/version-etc.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/wint_t.m4 \
-       $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xsize.m4 \
-       $(top_srcdir)/m4/xstrndup.m4 $(top_srcdir)/m4/xstrtol.m4 \
-       $(top_srcdir)/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.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/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/xvasprintf.m4 $(top_srcdir)/m4/year2038.m4 \
+       $(top_srcdir)/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
@@ -405,6 +419,7 @@ am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
   bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check recheck
 TEST_SUITE_LOG = test-suite.log
@@ -450,9 +465,12 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CONFIG_INCLUDE = @CONFIG_INCLUDE@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
 CYGPATH_W = @CYGPATH_W@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -467,321 +485,411 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
 EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
 EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
 ERRNO_H = @ERRNO_H@
+ETAGS = @ETAGS@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
 GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
 GETOPT_H = @GETOPT_H@
 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC21 = @GLIBC21@
+GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
+GL_CXXFLAG_ALLOW_WARNINGS = @GL_CXXFLAG_ALLOW_WARNINGS@
+GL_GNULIB_ACCEPT = @GL_GNULIB_ACCEPT@
+GL_GNULIB_ACCEPT4 = @GL_GNULIB_ACCEPT4@
+GL_GNULIB_ACCESS = @GL_GNULIB_ACCESS@
+GL_GNULIB_ALIGNED_ALLOC = @GL_GNULIB_ALIGNED_ALLOC@
+GL_GNULIB_ATOLL = @GL_GNULIB_ATOLL@
+GL_GNULIB_BIND = @GL_GNULIB_BIND@
+GL_GNULIB_BTOWC = @GL_GNULIB_BTOWC@
+GL_GNULIB_CALLOC_POSIX = @GL_GNULIB_CALLOC_POSIX@
+GL_GNULIB_CANONICALIZE_FILE_NAME = @GL_GNULIB_CANONICALIZE_FILE_NAME@
+GL_GNULIB_CHDIR = @GL_GNULIB_CHDIR@
+GL_GNULIB_CHOWN = @GL_GNULIB_CHOWN@
+GL_GNULIB_CLOSE = @GL_GNULIB_CLOSE@
+GL_GNULIB_CONNECT = @GL_GNULIB_CONNECT@
+GL_GNULIB_COPY_FILE_RANGE = @GL_GNULIB_COPY_FILE_RANGE@
+GL_GNULIB_CREAT = @GL_GNULIB_CREAT@
+GL_GNULIB_CTIME = @GL_GNULIB_CTIME@
+GL_GNULIB_DPRINTF = @GL_GNULIB_DPRINTF@
+GL_GNULIB_DUP = @GL_GNULIB_DUP@
+GL_GNULIB_DUP2 = @GL_GNULIB_DUP2@
+GL_GNULIB_DUP3 = @GL_GNULIB_DUP3@
+GL_GNULIB_DUPLOCALE = @GL_GNULIB_DUPLOCALE@
+GL_GNULIB_ENVIRON = @GL_GNULIB_ENVIRON@
+GL_GNULIB_EUIDACCESS = @GL_GNULIB_EUIDACCESS@
+GL_GNULIB_EXECL = @GL_GNULIB_EXECL@
+GL_GNULIB_EXECLE = @GL_GNULIB_EXECLE@
+GL_GNULIB_EXECLP = @GL_GNULIB_EXECLP@
+GL_GNULIB_EXECV = @GL_GNULIB_EXECV@
+GL_GNULIB_EXECVE = @GL_GNULIB_EXECVE@
+GL_GNULIB_EXECVP = @GL_GNULIB_EXECVP@
+GL_GNULIB_EXECVPE = @GL_GNULIB_EXECVPE@
+GL_GNULIB_EXPLICIT_BZERO = @GL_GNULIB_EXPLICIT_BZERO@
+GL_GNULIB_FACCESSAT = @GL_GNULIB_FACCESSAT@
+GL_GNULIB_FCHDIR = @GL_GNULIB_FCHDIR@
+GL_GNULIB_FCHMODAT = @GL_GNULIB_FCHMODAT@
+GL_GNULIB_FCHOWNAT = @GL_GNULIB_FCHOWNAT@
+GL_GNULIB_FCLOSE = @GL_GNULIB_FCLOSE@
+GL_GNULIB_FCNTL = @GL_GNULIB_FCNTL@
+GL_GNULIB_FDATASYNC = @GL_GNULIB_FDATASYNC@
+GL_GNULIB_FDOPEN = @GL_GNULIB_FDOPEN@
+GL_GNULIB_FFLUSH = @GL_GNULIB_FFLUSH@
+GL_GNULIB_FFS = @GL_GNULIB_FFS@
+GL_GNULIB_FFSL = @GL_GNULIB_FFSL@
+GL_GNULIB_FFSLL = @GL_GNULIB_FFSLL@
+GL_GNULIB_FGETC = @GL_GNULIB_FGETC@
+GL_GNULIB_FGETS = @GL_GNULIB_FGETS@
+GL_GNULIB_FNMATCH = @GL_GNULIB_FNMATCH@
+GL_GNULIB_FOPEN = @GL_GNULIB_FOPEN@
+GL_GNULIB_FPRINTF = @GL_GNULIB_FPRINTF@
+GL_GNULIB_FPRINTF_POSIX = @GL_GNULIB_FPRINTF_POSIX@
+GL_GNULIB_FPURGE = @GL_GNULIB_FPURGE@
+GL_GNULIB_FPUTC = @GL_GNULIB_FPUTC@
+GL_GNULIB_FPUTS = @GL_GNULIB_FPUTS@
+GL_GNULIB_FREAD = @GL_GNULIB_FREAD@
+GL_GNULIB_FREE_POSIX = @GL_GNULIB_FREE_POSIX@
+GL_GNULIB_FREOPEN = @GL_GNULIB_FREOPEN@
+GL_GNULIB_FSCANF = @GL_GNULIB_FSCANF@
+GL_GNULIB_FSEEK = @GL_GNULIB_FSEEK@
+GL_GNULIB_FSEEKO = @GL_GNULIB_FSEEKO@
+GL_GNULIB_FSTAT = @GL_GNULIB_FSTAT@
+GL_GNULIB_FSTATAT = @GL_GNULIB_FSTATAT@
+GL_GNULIB_FSYNC = @GL_GNULIB_FSYNC@
+GL_GNULIB_FTELL = @GL_GNULIB_FTELL@
+GL_GNULIB_FTELLO = @GL_GNULIB_FTELLO@
+GL_GNULIB_FTRUNCATE = @GL_GNULIB_FTRUNCATE@
+GL_GNULIB_FUTIMENS = @GL_GNULIB_FUTIMENS@
+GL_GNULIB_FWRITE = @GL_GNULIB_FWRITE@
+GL_GNULIB_GETC = @GL_GNULIB_GETC@
+GL_GNULIB_GETCHAR = @GL_GNULIB_GETCHAR@
+GL_GNULIB_GETCWD = @GL_GNULIB_GETCWD@
+GL_GNULIB_GETDELIM = @GL_GNULIB_GETDELIM@
+GL_GNULIB_GETDOMAINNAME = @GL_GNULIB_GETDOMAINNAME@
+GL_GNULIB_GETDTABLESIZE = @GL_GNULIB_GETDTABLESIZE@
+GL_GNULIB_GETENTROPY = @GL_GNULIB_GETENTROPY@
+GL_GNULIB_GETGROUPS = @GL_GNULIB_GETGROUPS@
+GL_GNULIB_GETHOSTNAME = @GL_GNULIB_GETHOSTNAME@
+GL_GNULIB_GETLINE = @GL_GNULIB_GETLINE@
+GL_GNULIB_GETLOADAVG = @GL_GNULIB_GETLOADAVG@
+GL_GNULIB_GETLOGIN = @GL_GNULIB_GETLOGIN@
+GL_GNULIB_GETLOGIN_R = @GL_GNULIB_GETLOGIN_R@
+GL_GNULIB_GETOPT_POSIX = @GL_GNULIB_GETOPT_POSIX@
+GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
+GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
+GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
+GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
+GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
+GL_GNULIB_GETSUBOPT = @GL_GNULIB_GETSUBOPT@
+GL_GNULIB_GETTIMEOFDAY = @GL_GNULIB_GETTIMEOFDAY@
+GL_GNULIB_GETUMASK = @GL_GNULIB_GETUMASK@
+GL_GNULIB_GETUSERSHELL = @GL_GNULIB_GETUSERSHELL@
+GL_GNULIB_GRANTPT = @GL_GNULIB_GRANTPT@
+GL_GNULIB_GROUP_MEMBER = @GL_GNULIB_GROUP_MEMBER@
+GL_GNULIB_ICONV = @GL_GNULIB_ICONV@
+GL_GNULIB_IMAXABS = @GL_GNULIB_IMAXABS@
+GL_GNULIB_IMAXDIV = @GL_GNULIB_IMAXDIV@
+GL_GNULIB_INET_NTOP = @GL_GNULIB_INET_NTOP@
+GL_GNULIB_INET_PTON = @GL_GNULIB_INET_PTON@
+GL_GNULIB_IOCTL = @GL_GNULIB_IOCTL@
+GL_GNULIB_ISATTY = @GL_GNULIB_ISATTY@
+GL_GNULIB_ISBLANK = @GL_GNULIB_ISBLANK@
+GL_GNULIB_ISWBLANK = @GL_GNULIB_ISWBLANK@
+GL_GNULIB_ISWCTYPE = @GL_GNULIB_ISWCTYPE@
+GL_GNULIB_ISWDIGIT = @GL_GNULIB_ISWDIGIT@
+GL_GNULIB_ISWXDIGIT = @GL_GNULIB_ISWXDIGIT@
+GL_GNULIB_LCHMOD = @GL_GNULIB_LCHMOD@
+GL_GNULIB_LCHOWN = @GL_GNULIB_LCHOWN@
+GL_GNULIB_LINK = @GL_GNULIB_LINK@
+GL_GNULIB_LINKAT = @GL_GNULIB_LINKAT@
+GL_GNULIB_LISTEN = @GL_GNULIB_LISTEN@
+GL_GNULIB_LOCALECONV = @GL_GNULIB_LOCALECONV@
+GL_GNULIB_LOCALENAME = @GL_GNULIB_LOCALENAME@
+GL_GNULIB_LOCALTIME = @GL_GNULIB_LOCALTIME@
+GL_GNULIB_LSEEK = @GL_GNULIB_LSEEK@
+GL_GNULIB_LSTAT = @GL_GNULIB_LSTAT@
+GL_GNULIB_MALLOC_POSIX = @GL_GNULIB_MALLOC_POSIX@
+GL_GNULIB_MBRLEN = @GL_GNULIB_MBRLEN@
+GL_GNULIB_MBRTOWC = @GL_GNULIB_MBRTOWC@
+GL_GNULIB_MBSCASECMP = @GL_GNULIB_MBSCASECMP@
+GL_GNULIB_MBSCASESTR = @GL_GNULIB_MBSCASESTR@
+GL_GNULIB_MBSCHR = @GL_GNULIB_MBSCHR@
+GL_GNULIB_MBSCSPN = @GL_GNULIB_MBSCSPN@
+GL_GNULIB_MBSINIT = @GL_GNULIB_MBSINIT@
+GL_GNULIB_MBSLEN = @GL_GNULIB_MBSLEN@
+GL_GNULIB_MBSNCASECMP = @GL_GNULIB_MBSNCASECMP@
+GL_GNULIB_MBSNLEN = @GL_GNULIB_MBSNLEN@
+GL_GNULIB_MBSNRTOWCS = @GL_GNULIB_MBSNRTOWCS@
+GL_GNULIB_MBSPBRK = @GL_GNULIB_MBSPBRK@
+GL_GNULIB_MBSPCASECMP = @GL_GNULIB_MBSPCASECMP@
+GL_GNULIB_MBSRCHR = @GL_GNULIB_MBSRCHR@
+GL_GNULIB_MBSRTOWCS = @GL_GNULIB_MBSRTOWCS@
+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_MBTOWC = @GL_GNULIB_MBTOWC@
+GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
+GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
+GL_GNULIB_MDA_CHMOD = @GL_GNULIB_MDA_CHMOD@
+GL_GNULIB_MDA_CLOSE = @GL_GNULIB_MDA_CLOSE@
+GL_GNULIB_MDA_CREAT = @GL_GNULIB_MDA_CREAT@
+GL_GNULIB_MDA_DUP = @GL_GNULIB_MDA_DUP@
+GL_GNULIB_MDA_DUP2 = @GL_GNULIB_MDA_DUP2@
+GL_GNULIB_MDA_ECVT = @GL_GNULIB_MDA_ECVT@
+GL_GNULIB_MDA_EXECL = @GL_GNULIB_MDA_EXECL@
+GL_GNULIB_MDA_EXECLE = @GL_GNULIB_MDA_EXECLE@
+GL_GNULIB_MDA_EXECLP = @GL_GNULIB_MDA_EXECLP@
+GL_GNULIB_MDA_EXECV = @GL_GNULIB_MDA_EXECV@
+GL_GNULIB_MDA_EXECVE = @GL_GNULIB_MDA_EXECVE@
+GL_GNULIB_MDA_EXECVP = @GL_GNULIB_MDA_EXECVP@
+GL_GNULIB_MDA_EXECVPE = @GL_GNULIB_MDA_EXECVPE@
+GL_GNULIB_MDA_FCLOSEALL = @GL_GNULIB_MDA_FCLOSEALL@
+GL_GNULIB_MDA_FCVT = @GL_GNULIB_MDA_FCVT@
+GL_GNULIB_MDA_FDOPEN = @GL_GNULIB_MDA_FDOPEN@
+GL_GNULIB_MDA_FILENO = @GL_GNULIB_MDA_FILENO@
+GL_GNULIB_MDA_GCVT = @GL_GNULIB_MDA_GCVT@
+GL_GNULIB_MDA_GETCWD = @GL_GNULIB_MDA_GETCWD@
+GL_GNULIB_MDA_GETPID = @GL_GNULIB_MDA_GETPID@
+GL_GNULIB_MDA_GETW = @GL_GNULIB_MDA_GETW@
+GL_GNULIB_MDA_ISATTY = @GL_GNULIB_MDA_ISATTY@
+GL_GNULIB_MDA_LSEEK = @GL_GNULIB_MDA_LSEEK@
+GL_GNULIB_MDA_MEMCCPY = @GL_GNULIB_MDA_MEMCCPY@
+GL_GNULIB_MDA_MKDIR = @GL_GNULIB_MDA_MKDIR@
+GL_GNULIB_MDA_MKTEMP = @GL_GNULIB_MDA_MKTEMP@
+GL_GNULIB_MDA_OPEN = @GL_GNULIB_MDA_OPEN@
+GL_GNULIB_MDA_PUTENV = @GL_GNULIB_MDA_PUTENV@
+GL_GNULIB_MDA_PUTW = @GL_GNULIB_MDA_PUTW@
+GL_GNULIB_MDA_READ = @GL_GNULIB_MDA_READ@
+GL_GNULIB_MDA_RMDIR = @GL_GNULIB_MDA_RMDIR@
+GL_GNULIB_MDA_STRDUP = @GL_GNULIB_MDA_STRDUP@
+GL_GNULIB_MDA_SWAB = @GL_GNULIB_MDA_SWAB@
+GL_GNULIB_MDA_TEMPNAM = @GL_GNULIB_MDA_TEMPNAM@
+GL_GNULIB_MDA_TZSET = @GL_GNULIB_MDA_TZSET@
+GL_GNULIB_MDA_UMASK = @GL_GNULIB_MDA_UMASK@
+GL_GNULIB_MDA_UNLINK = @GL_GNULIB_MDA_UNLINK@
+GL_GNULIB_MDA_WCSDUP = @GL_GNULIB_MDA_WCSDUP@
+GL_GNULIB_MDA_WRITE = @GL_GNULIB_MDA_WRITE@
+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_MKDIR = @GL_GNULIB_MKDIR@
+GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
+GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
+GL_GNULIB_MKFIFO = @GL_GNULIB_MKFIFO@
+GL_GNULIB_MKFIFOAT = @GL_GNULIB_MKFIFOAT@
+GL_GNULIB_MKNOD = @GL_GNULIB_MKNOD@
+GL_GNULIB_MKNODAT = @GL_GNULIB_MKNODAT@
+GL_GNULIB_MKOSTEMP = @GL_GNULIB_MKOSTEMP@
+GL_GNULIB_MKOSTEMPS = @GL_GNULIB_MKOSTEMPS@
+GL_GNULIB_MKSTEMP = @GL_GNULIB_MKSTEMP@
+GL_GNULIB_MKSTEMPS = @GL_GNULIB_MKSTEMPS@
+GL_GNULIB_MKTIME = @GL_GNULIB_MKTIME@
+GL_GNULIB_NANOSLEEP = @GL_GNULIB_NANOSLEEP@
+GL_GNULIB_NL_LANGINFO = @GL_GNULIB_NL_LANGINFO@
+GL_GNULIB_NONBLOCKING = @GL_GNULIB_NONBLOCKING@
+GL_GNULIB_OBSTACK_PRINTF = @GL_GNULIB_OBSTACK_PRINTF@
+GL_GNULIB_OBSTACK_PRINTF_POSIX = @GL_GNULIB_OBSTACK_PRINTF_POSIX@
+GL_GNULIB_OPEN = @GL_GNULIB_OPEN@
+GL_GNULIB_OPENAT = @GL_GNULIB_OPENAT@
+GL_GNULIB_OVERRIDES_STRUCT_STAT = @GL_GNULIB_OVERRIDES_STRUCT_STAT@
+GL_GNULIB_PCLOSE = @GL_GNULIB_PCLOSE@
+GL_GNULIB_PERROR = @GL_GNULIB_PERROR@
+GL_GNULIB_PIPE = @GL_GNULIB_PIPE@
+GL_GNULIB_PIPE2 = @GL_GNULIB_PIPE2@
+GL_GNULIB_POPEN = @GL_GNULIB_POPEN@
+GL_GNULIB_POSIX_MEMALIGN = @GL_GNULIB_POSIX_MEMALIGN@
+GL_GNULIB_POSIX_OPENPT = @GL_GNULIB_POSIX_OPENPT@
+GL_GNULIB_PREAD = @GL_GNULIB_PREAD@
+GL_GNULIB_PRINTF = @GL_GNULIB_PRINTF@
+GL_GNULIB_PRINTF_POSIX = @GL_GNULIB_PRINTF_POSIX@
+GL_GNULIB_PSELECT = @GL_GNULIB_PSELECT@
+GL_GNULIB_PTHREAD_COND = @GL_GNULIB_PTHREAD_COND@
+GL_GNULIB_PTHREAD_MUTEX = @GL_GNULIB_PTHREAD_MUTEX@
+GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK = @GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+GL_GNULIB_PTHREAD_ONCE = @GL_GNULIB_PTHREAD_ONCE@
+GL_GNULIB_PTHREAD_RWLOCK = @GL_GNULIB_PTHREAD_RWLOCK@
+GL_GNULIB_PTHREAD_SIGMASK = @GL_GNULIB_PTHREAD_SIGMASK@
+GL_GNULIB_PTHREAD_SPIN = @GL_GNULIB_PTHREAD_SPIN@
+GL_GNULIB_PTHREAD_THREAD = @GL_GNULIB_PTHREAD_THREAD@
+GL_GNULIB_PTHREAD_TSS = @GL_GNULIB_PTHREAD_TSS@
+GL_GNULIB_PTSNAME = @GL_GNULIB_PTSNAME@
+GL_GNULIB_PTSNAME_R = @GL_GNULIB_PTSNAME_R@
+GL_GNULIB_PUTC = @GL_GNULIB_PUTC@
+GL_GNULIB_PUTCHAR = @GL_GNULIB_PUTCHAR@
+GL_GNULIB_PUTENV = @GL_GNULIB_PUTENV@
+GL_GNULIB_PUTS = @GL_GNULIB_PUTS@
+GL_GNULIB_PWRITE = @GL_GNULIB_PWRITE@
+GL_GNULIB_QSORT_R = @GL_GNULIB_QSORT_R@
+GL_GNULIB_RAISE = @GL_GNULIB_RAISE@
+GL_GNULIB_RANDOM = @GL_GNULIB_RANDOM@
+GL_GNULIB_RANDOM_R = @GL_GNULIB_RANDOM_R@
+GL_GNULIB_RAWMEMCHR = @GL_GNULIB_RAWMEMCHR@
+GL_GNULIB_READ = @GL_GNULIB_READ@
+GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
+GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
+GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
+GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
+GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
+GL_GNULIB_RECV = @GL_GNULIB_RECV@
+GL_GNULIB_RECVFROM = @GL_GNULIB_RECVFROM@
+GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
+GL_GNULIB_RENAME = @GL_GNULIB_RENAME@
+GL_GNULIB_RENAMEAT = @GL_GNULIB_RENAMEAT@
+GL_GNULIB_RMDIR = @GL_GNULIB_RMDIR@
+GL_GNULIB_RPMATCH = @GL_GNULIB_RPMATCH@
+GL_GNULIB_SCANF = @GL_GNULIB_SCANF@
+GL_GNULIB_SCHED_YIELD = @GL_GNULIB_SCHED_YIELD@
+GL_GNULIB_SECURE_GETENV = @GL_GNULIB_SECURE_GETENV@
+GL_GNULIB_SELECT = @GL_GNULIB_SELECT@
+GL_GNULIB_SEND = @GL_GNULIB_SEND@
+GL_GNULIB_SENDTO = @GL_GNULIB_SENDTO@
+GL_GNULIB_SETENV = @GL_GNULIB_SETENV@
+GL_GNULIB_SETHOSTNAME = @GL_GNULIB_SETHOSTNAME@
+GL_GNULIB_SETLOCALE = @GL_GNULIB_SETLOCALE@
+GL_GNULIB_SETLOCALE_NULL = @GL_GNULIB_SETLOCALE_NULL@
+GL_GNULIB_SETSOCKOPT = @GL_GNULIB_SETSOCKOPT@
+GL_GNULIB_SHUTDOWN = @GL_GNULIB_SHUTDOWN@
+GL_GNULIB_SIGABBREV_NP = @GL_GNULIB_SIGABBREV_NP@
+GL_GNULIB_SIGACTION = @GL_GNULIB_SIGACTION@
+GL_GNULIB_SIGDESCR_NP = @GL_GNULIB_SIGDESCR_NP@
+GL_GNULIB_SIGNAL_H_SIGPIPE = @GL_GNULIB_SIGNAL_H_SIGPIPE@
+GL_GNULIB_SIGPROCMASK = @GL_GNULIB_SIGPROCMASK@
+GL_GNULIB_SLEEP = @GL_GNULIB_SLEEP@
+GL_GNULIB_SNPRINTF = @GL_GNULIB_SNPRINTF@
+GL_GNULIB_SOCKET = @GL_GNULIB_SOCKET@
+GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
+GL_GNULIB_STAT = @GL_GNULIB_STAT@
+GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
+GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
+GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
+GL_GNULIB_STPNCPY = @GL_GNULIB_STPNCPY@
+GL_GNULIB_STRCASESTR = @GL_GNULIB_STRCASESTR@
+GL_GNULIB_STRCHRNUL = @GL_GNULIB_STRCHRNUL@
+GL_GNULIB_STRDUP = @GL_GNULIB_STRDUP@
+GL_GNULIB_STRERROR = @GL_GNULIB_STRERROR@
+GL_GNULIB_STRERRORNAME_NP = @GL_GNULIB_STRERRORNAME_NP@
+GL_GNULIB_STRERROR_R = @GL_GNULIB_STRERROR_R@
+GL_GNULIB_STRFTIME = @GL_GNULIB_STRFTIME@
+GL_GNULIB_STRNCAT = @GL_GNULIB_STRNCAT@
+GL_GNULIB_STRNDUP = @GL_GNULIB_STRNDUP@
+GL_GNULIB_STRNLEN = @GL_GNULIB_STRNLEN@
+GL_GNULIB_STRPBRK = @GL_GNULIB_STRPBRK@
+GL_GNULIB_STRPTIME = @GL_GNULIB_STRPTIME@
+GL_GNULIB_STRSEP = @GL_GNULIB_STRSEP@
+GL_GNULIB_STRSIGNAL = @GL_GNULIB_STRSIGNAL@
+GL_GNULIB_STRSTR = @GL_GNULIB_STRSTR@
+GL_GNULIB_STRTOD = @GL_GNULIB_STRTOD@
+GL_GNULIB_STRTOIMAX = @GL_GNULIB_STRTOIMAX@
+GL_GNULIB_STRTOK_R = @GL_GNULIB_STRTOK_R@
+GL_GNULIB_STRTOL = @GL_GNULIB_STRTOL@
+GL_GNULIB_STRTOLD = @GL_GNULIB_STRTOLD@
+GL_GNULIB_STRTOLL = @GL_GNULIB_STRTOLL@
+GL_GNULIB_STRTOUL = @GL_GNULIB_STRTOUL@
+GL_GNULIB_STRTOULL = @GL_GNULIB_STRTOULL@
+GL_GNULIB_STRTOUMAX = @GL_GNULIB_STRTOUMAX@
+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_TIMEGM = @GL_GNULIB_TIMEGM@
+GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
+GL_GNULIB_TIME_R = @GL_GNULIB_TIME_R@
+GL_GNULIB_TIME_RZ = @GL_GNULIB_TIME_RZ@
+GL_GNULIB_TMPFILE = @GL_GNULIB_TMPFILE@
+GL_GNULIB_TOWCTRANS = @GL_GNULIB_TOWCTRANS@
+GL_GNULIB_TRUNCATE = @GL_GNULIB_TRUNCATE@
+GL_GNULIB_TTYNAME_R = @GL_GNULIB_TTYNAME_R@
+GL_GNULIB_TZSET = @GL_GNULIB_TZSET@
+GL_GNULIB_UNISTD_H_GETOPT = @GL_GNULIB_UNISTD_H_GETOPT@
+GL_GNULIB_UNISTD_H_NONBLOCKING = @GL_GNULIB_UNISTD_H_NONBLOCKING@
+GL_GNULIB_UNISTD_H_SIGPIPE = @GL_GNULIB_UNISTD_H_SIGPIPE@
+GL_GNULIB_UNLINK = @GL_GNULIB_UNLINK@
+GL_GNULIB_UNLINKAT = @GL_GNULIB_UNLINKAT@
+GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
+GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
+GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
+GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
+GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
+GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
+GL_GNULIB_VFPRINTF = @GL_GNULIB_VFPRINTF@
+GL_GNULIB_VFPRINTF_POSIX = @GL_GNULIB_VFPRINTF_POSIX@
+GL_GNULIB_VFSCANF = @GL_GNULIB_VFSCANF@
+GL_GNULIB_VPRINTF = @GL_GNULIB_VPRINTF@
+GL_GNULIB_VPRINTF_POSIX = @GL_GNULIB_VPRINTF_POSIX@
+GL_GNULIB_VSCANF = @GL_GNULIB_VSCANF@
+GL_GNULIB_VSNPRINTF = @GL_GNULIB_VSNPRINTF@
+GL_GNULIB_VSPRINTF_POSIX = @GL_GNULIB_VSPRINTF_POSIX@
+GL_GNULIB_WAITPID = @GL_GNULIB_WAITPID@
+GL_GNULIB_WCPCPY = @GL_GNULIB_WCPCPY@
+GL_GNULIB_WCPNCPY = @GL_GNULIB_WCPNCPY@
+GL_GNULIB_WCRTOMB = @GL_GNULIB_WCRTOMB@
+GL_GNULIB_WCSCASECMP = @GL_GNULIB_WCSCASECMP@
+GL_GNULIB_WCSCAT = @GL_GNULIB_WCSCAT@
+GL_GNULIB_WCSCHR = @GL_GNULIB_WCSCHR@
+GL_GNULIB_WCSCMP = @GL_GNULIB_WCSCMP@
+GL_GNULIB_WCSCOLL = @GL_GNULIB_WCSCOLL@
+GL_GNULIB_WCSCPY = @GL_GNULIB_WCSCPY@
+GL_GNULIB_WCSCSPN = @GL_GNULIB_WCSCSPN@
+GL_GNULIB_WCSDUP = @GL_GNULIB_WCSDUP@
+GL_GNULIB_WCSFTIME = @GL_GNULIB_WCSFTIME@
+GL_GNULIB_WCSLEN = @GL_GNULIB_WCSLEN@
+GL_GNULIB_WCSNCASECMP = @GL_GNULIB_WCSNCASECMP@
+GL_GNULIB_WCSNCAT = @GL_GNULIB_WCSNCAT@
+GL_GNULIB_WCSNCMP = @GL_GNULIB_WCSNCMP@
+GL_GNULIB_WCSNCPY = @GL_GNULIB_WCSNCPY@
+GL_GNULIB_WCSNLEN = @GL_GNULIB_WCSNLEN@
+GL_GNULIB_WCSNRTOMBS = @GL_GNULIB_WCSNRTOMBS@
+GL_GNULIB_WCSPBRK = @GL_GNULIB_WCSPBRK@
+GL_GNULIB_WCSRCHR = @GL_GNULIB_WCSRCHR@
+GL_GNULIB_WCSRTOMBS = @GL_GNULIB_WCSRTOMBS@
+GL_GNULIB_WCSSPN = @GL_GNULIB_WCSSPN@
+GL_GNULIB_WCSSTR = @GL_GNULIB_WCSSTR@
+GL_GNULIB_WCSTOK = @GL_GNULIB_WCSTOK@
+GL_GNULIB_WCSWIDTH = @GL_GNULIB_WCSWIDTH@
+GL_GNULIB_WCSXFRM = @GL_GNULIB_WCSXFRM@
+GL_GNULIB_WCTOB = @GL_GNULIB_WCTOB@
+GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
+GL_GNULIB_WCTRANS = @GL_GNULIB_WCTRANS@
+GL_GNULIB_WCTYPE = @GL_GNULIB_WCTYPE@
+GL_GNULIB_WCWIDTH = @GL_GNULIB_WCWIDTH@
+GL_GNULIB_WMEMCHR = @GL_GNULIB_WMEMCHR@
+GL_GNULIB_WMEMCMP = @GL_GNULIB_WMEMCMP@
+GL_GNULIB_WMEMCPY = @GL_GNULIB_WMEMCPY@
+GL_GNULIB_WMEMMOVE = @GL_GNULIB_WMEMMOVE@
+GL_GNULIB_WMEMPCPY = @GL_GNULIB_WMEMPCPY@
+GL_GNULIB_WMEMSET = @GL_GNULIB_WMEMSET@
+GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
+GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
 GMSGFMT = @GMSGFMT@
 GMSGFMT_015 = @GMSGFMT_015@
-GNULIB_ACCEPT = @GNULIB_ACCEPT@
-GNULIB_ACCEPT4 = @GNULIB_ACCEPT4@
-GNULIB_ATOLL = @GNULIB_ATOLL@
-GNULIB_BIND = @GNULIB_BIND@
-GNULIB_BTOWC = @GNULIB_BTOWC@
-GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
-GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
-GNULIB_CHDIR = @GNULIB_CHDIR@
-GNULIB_CHOWN = @GNULIB_CHOWN@
-GNULIB_CLOSE = @GNULIB_CLOSE@
-GNULIB_CONNECT = @GNULIB_CONNECT@
-GNULIB_CTIME = @GNULIB_CTIME@
-GNULIB_DPRINTF = @GNULIB_DPRINTF@
-GNULIB_DUP = @GNULIB_DUP@
-GNULIB_DUP2 = @GNULIB_DUP2@
-GNULIB_DUP3 = @GNULIB_DUP3@
-GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
-GNULIB_ENVIRON = @GNULIB_ENVIRON@
-GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
-GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@
-GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
-GNULIB_FCHDIR = @GNULIB_FCHDIR@
-GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
-GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
-GNULIB_FCLOSE = @GNULIB_FCLOSE@
-GNULIB_FCNTL = @GNULIB_FCNTL@
-GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
-GNULIB_FDOPEN = @GNULIB_FDOPEN@
-GNULIB_FFLUSH = @GNULIB_FFLUSH@
-GNULIB_FFS = @GNULIB_FFS@
-GNULIB_FFSL = @GNULIB_FFSL@
-GNULIB_FFSLL = @GNULIB_FFSLL@
-GNULIB_FGETC = @GNULIB_FGETC@
-GNULIB_FGETS = @GNULIB_FGETS@
-GNULIB_FNMATCH = @GNULIB_FNMATCH@
-GNULIB_FOPEN = @GNULIB_FOPEN@
-GNULIB_FPRINTF = @GNULIB_FPRINTF@
-GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
-GNULIB_FPURGE = @GNULIB_FPURGE@
-GNULIB_FPUTC = @GNULIB_FPUTC@
-GNULIB_FPUTS = @GNULIB_FPUTS@
-GNULIB_FREAD = @GNULIB_FREAD@
-GNULIB_FREOPEN = @GNULIB_FREOPEN@
-GNULIB_FSCANF = @GNULIB_FSCANF@
-GNULIB_FSEEK = @GNULIB_FSEEK@
-GNULIB_FSEEKO = @GNULIB_FSEEKO@
-GNULIB_FSTAT = @GNULIB_FSTAT@
-GNULIB_FSTATAT = @GNULIB_FSTATAT@
-GNULIB_FSYNC = @GNULIB_FSYNC@
-GNULIB_FTELL = @GNULIB_FTELL@
-GNULIB_FTELLO = @GNULIB_FTELLO@
-GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
-GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
-GNULIB_FWRITE = @GNULIB_FWRITE@
-GNULIB_GETC = @GNULIB_GETC@
-GNULIB_GETCHAR = @GNULIB_GETCHAR@
-GNULIB_GETCWD = @GNULIB_GETCWD@
-GNULIB_GETDELIM = @GNULIB_GETDELIM@
-GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
-GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
-GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
-GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
-GNULIB_GETLINE = @GNULIB_GETLINE@
-GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
-GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
-GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
-GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
-GNULIB_GETPASS = @GNULIB_GETPASS@
-GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
-GNULIB_GETSOCKNAME = @GNULIB_GETSOCKNAME@
-GNULIB_GETSOCKOPT = @GNULIB_GETSOCKOPT@
-GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
 GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
-GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
-GNULIB_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@
-GNULIB_GRANTPT = @GNULIB_GRANTPT@
-GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@
-GNULIB_ICONV = @GNULIB_ICONV@
-GNULIB_IMAXABS = @GNULIB_IMAXABS@
-GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
-GNULIB_INET_NTOP = @GNULIB_INET_NTOP@
-GNULIB_INET_PTON = @GNULIB_INET_PTON@
-GNULIB_IOCTL = @GNULIB_IOCTL@
-GNULIB_ISATTY = @GNULIB_ISATTY@
-GNULIB_ISBLANK = @GNULIB_ISBLANK@
-GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
-GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
-GNULIB_LCHMOD = @GNULIB_LCHMOD@
-GNULIB_LCHOWN = @GNULIB_LCHOWN@
-GNULIB_LINK = @GNULIB_LINK@
-GNULIB_LINKAT = @GNULIB_LINKAT@
-GNULIB_LISTEN = @GNULIB_LISTEN@
-GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
-GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
-GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
-GNULIB_LSEEK = @GNULIB_LSEEK@
-GNULIB_LSTAT = @GNULIB_LSTAT@
-GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
-GNULIB_MBRLEN = @GNULIB_MBRLEN@
-GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
-GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
-GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
-GNULIB_MBSCHR = @GNULIB_MBSCHR@
-GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
-GNULIB_MBSINIT = @GNULIB_MBSINIT@
-GNULIB_MBSLEN = @GNULIB_MBSLEN@
-GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
-GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
-GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
-GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
-GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
-GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
-GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
-GNULIB_MBSSEP = @GNULIB_MBSSEP@
-GNULIB_MBSSPN = @GNULIB_MBSSPN@
-GNULIB_MBSSTR = @GNULIB_MBSSTR@
-GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
-GNULIB_MBTOWC = @GNULIB_MBTOWC@
-GNULIB_MEMCHR = @GNULIB_MEMCHR@
-GNULIB_MEMMEM = @GNULIB_MEMMEM@
-GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
-GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
-GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
-GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
-GNULIB_MKFIFO = @GNULIB_MKFIFO@
-GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
-GNULIB_MKNOD = @GNULIB_MKNOD@
-GNULIB_MKNODAT = @GNULIB_MKNODAT@
-GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
-GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
-GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
-GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
-GNULIB_MKTIME = @GNULIB_MKTIME@
-GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
-GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
-GNULIB_NONBLOCKING = @GNULIB_NONBLOCKING@
-GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
-GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
-GNULIB_OPEN = @GNULIB_OPEN@
-GNULIB_OPENAT = @GNULIB_OPENAT@
-GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@
-GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@
-GNULIB_PCLOSE = @GNULIB_PCLOSE@
-GNULIB_PERROR = @GNULIB_PERROR@
-GNULIB_PIPE = @GNULIB_PIPE@
-GNULIB_PIPE2 = @GNULIB_PIPE2@
-GNULIB_POPEN = @GNULIB_POPEN@
-GNULIB_POSIX_OPENPT = @GNULIB_POSIX_OPENPT@
-GNULIB_PREAD = @GNULIB_PREAD@
-GNULIB_PRINTF = @GNULIB_PRINTF@
-GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
-GNULIB_PSELECT = @GNULIB_PSELECT@
-GNULIB_PTHREAD_SIGMASK = @GNULIB_PTHREAD_SIGMASK@
-GNULIB_PTSNAME = @GNULIB_PTSNAME@
-GNULIB_PTSNAME_R = @GNULIB_PTSNAME_R@
-GNULIB_PUTC = @GNULIB_PUTC@
-GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
-GNULIB_PUTENV = @GNULIB_PUTENV@
-GNULIB_PUTS = @GNULIB_PUTS@
-GNULIB_PWRITE = @GNULIB_PWRITE@
-GNULIB_QSORT_R = @GNULIB_QSORT_R@
-GNULIB_RAISE = @GNULIB_RAISE@
-GNULIB_RANDOM = @GNULIB_RANDOM@
-GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
-GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
-GNULIB_READ = @GNULIB_READ@
-GNULIB_READLINK = @GNULIB_READLINK@
-GNULIB_READLINKAT = @GNULIB_READLINKAT@
-GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@
-GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
-GNULIB_REALPATH = @GNULIB_REALPATH@
-GNULIB_RECV = @GNULIB_RECV@
-GNULIB_RECVFROM = @GNULIB_RECVFROM@
-GNULIB_REMOVE = @GNULIB_REMOVE@
-GNULIB_RENAME = @GNULIB_RENAME@
-GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
-GNULIB_RMDIR = @GNULIB_RMDIR@
-GNULIB_RPMATCH = @GNULIB_RPMATCH@
-GNULIB_SCANF = @GNULIB_SCANF@
-GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@
-GNULIB_SELECT = @GNULIB_SELECT@
-GNULIB_SEND = @GNULIB_SEND@
-GNULIB_SENDTO = @GNULIB_SENDTO@
-GNULIB_SETENV = @GNULIB_SETENV@
-GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
-GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
-GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
-GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
-GNULIB_SIGACTION = @GNULIB_SIGACTION@
-GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
-GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
-GNULIB_SLEEP = @GNULIB_SLEEP@
-GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
-GNULIB_SOCKET = @GNULIB_SOCKET@
-GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
-GNULIB_STAT = @GNULIB_STAT@
-GNULIB_STDIO_H_NONBLOCKING = @GNULIB_STDIO_H_NONBLOCKING@
-GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
-GNULIB_STPCPY = @GNULIB_STPCPY@
-GNULIB_STPNCPY = @GNULIB_STPNCPY@
-GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
-GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
-GNULIB_STRDUP = @GNULIB_STRDUP@
-GNULIB_STRERROR = @GNULIB_STRERROR@
-GNULIB_STRERROR_R = @GNULIB_STRERROR_R@
-GNULIB_STRFTIME = @GNULIB_STRFTIME@
-GNULIB_STRNCAT = @GNULIB_STRNCAT@
-GNULIB_STRNDUP = @GNULIB_STRNDUP@
-GNULIB_STRNLEN = @GNULIB_STRNLEN@
-GNULIB_STRPBRK = @GNULIB_STRPBRK@
-GNULIB_STRPTIME = @GNULIB_STRPTIME@
-GNULIB_STRSEP = @GNULIB_STRSEP@
-GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
-GNULIB_STRSTR = @GNULIB_STRSTR@
-GNULIB_STRTOD = @GNULIB_STRTOD@
-GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
-GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
-GNULIB_STRTOLL = @GNULIB_STRTOLL@
-GNULIB_STRTOULL = @GNULIB_STRTOULL@
-GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
-GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
-GNULIB_SYMLINK = @GNULIB_SYMLINK@
-GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
-GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@
-GNULIB_TIMEGM = @GNULIB_TIMEGM@
-GNULIB_TIME_R = @GNULIB_TIME_R@
-GNULIB_TIME_RZ = @GNULIB_TIME_RZ@
-GNULIB_TMPFILE = @GNULIB_TMPFILE@
-GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
-GNULIB_TRUNCATE = @GNULIB_TRUNCATE@
-GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@
-GNULIB_TZSET = @GNULIB_TZSET@
-GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@
-GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
-GNULIB_UNLINK = @GNULIB_UNLINK@
-GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
-GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@
-GNULIB_UNSETENV = @GNULIB_UNSETENV@
-GNULIB_USLEEP = @GNULIB_USLEEP@
-GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
-GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
-GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
-GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
-GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
-GNULIB_VFSCANF = @GNULIB_VFSCANF@
-GNULIB_VPRINTF = @GNULIB_VPRINTF@
-GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
-GNULIB_VSCANF = @GNULIB_VSCANF@
-GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
-GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
-GNULIB_WAITPID = @GNULIB_WAITPID@
 GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@
-GNULIB_WCPCPY = @GNULIB_WCPCPY@
-GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
-GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
-GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@
-GNULIB_WCSCAT = @GNULIB_WCSCAT@
-GNULIB_WCSCHR = @GNULIB_WCSCHR@
-GNULIB_WCSCMP = @GNULIB_WCSCMP@
-GNULIB_WCSCOLL = @GNULIB_WCSCOLL@
-GNULIB_WCSCPY = @GNULIB_WCSCPY@
-GNULIB_WCSCSPN = @GNULIB_WCSCSPN@
-GNULIB_WCSDUP = @GNULIB_WCSDUP@
-GNULIB_WCSFTIME = @GNULIB_WCSFTIME@
-GNULIB_WCSLEN = @GNULIB_WCSLEN@
-GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@
-GNULIB_WCSNCAT = @GNULIB_WCSNCAT@
-GNULIB_WCSNCMP = @GNULIB_WCSNCMP@
-GNULIB_WCSNCPY = @GNULIB_WCSNCPY@
-GNULIB_WCSNLEN = @GNULIB_WCSNLEN@
-GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
-GNULIB_WCSPBRK = @GNULIB_WCSPBRK@
-GNULIB_WCSRCHR = @GNULIB_WCSRCHR@
-GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
-GNULIB_WCSSPN = @GNULIB_WCSSPN@
-GNULIB_WCSSTR = @GNULIB_WCSSTR@
-GNULIB_WCSTOK = @GNULIB_WCSTOK@
-GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@
-GNULIB_WCSXFRM = @GNULIB_WCSXFRM@
-GNULIB_WCTOB = @GNULIB_WCTOB@
-GNULIB_WCTOMB = @GNULIB_WCTOMB@
-GNULIB_WCTRANS = @GNULIB_WCTRANS@
-GNULIB_WCTYPE = @GNULIB_WCTYPE@
-GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
-GNULIB_WMEMCHR = @GNULIB_WMEMCHR@
-GNULIB_WMEMCMP = @GNULIB_WMEMCMP@
-GNULIB_WMEMCPY = @GNULIB_WMEMCPY@
-GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@
-GNULIB_WMEMSET = @GNULIB_WMEMSET@
-GNULIB_WRITE = @GNULIB_WRITE@
-GNULIB__EXIT = @GNULIB__EXIT@
 GREP = @GREP@
 HAVE_ACCEPT4 = @HAVE_ACCEPT4@
+HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
+HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
 HAVE_ARPA_INET_H = @HAVE_ARPA_INET_H@
 HAVE_ATOLL = @HAVE_ATOLL@
 HAVE_BTOWC = @HAVE_BTOWC@
 HAVE_C99_STDINT_H = @HAVE_C99_STDINT_H@
 HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COPY_FILE_RANGE = @HAVE_COPY_FILE_RANGE@
 HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@
+HAVE_DECL_ECVT = @HAVE_DECL_ECVT@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXECVPE = @HAVE_DECL_EXECVPE@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
+HAVE_DECL_FCLOSEALL = @HAVE_DECL_FCLOSEALL@
+HAVE_DECL_FCVT = @HAVE_DECL_FCVT@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
 HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
 HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@
 HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@
+HAVE_DECL_GCVT = @HAVE_DECL_GCVT@
 HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
 HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@
 HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
@@ -816,13 +924,14 @@ HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@
 HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCSDUP = @HAVE_DECL_WCSDUP@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
 HAVE_DPRINTF = @HAVE_DPRINTF@
-HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXECVPE = @HAVE_EXECVPE@
 HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
@@ -844,17 +953,21 @@ HAVE_FTELLO = @HAVE_FTELLO@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
 HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETENTROPY = @HAVE_GETENTROPY@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
 HAVE_GETLOGIN = @HAVE_GETLOGIN@
 HAVE_GETOPT_H = @HAVE_GETOPT_H@
 HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
 HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETRANDOM = @HAVE_GETRANDOM@
 HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
 HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUMASK = @HAVE_GETUMASK@
 HAVE_GRANTPT = @HAVE_GRANTPT@
 HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
 HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
+HAVE_INITSTATE = @HAVE_INITSTATE@
 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
 HAVE_ISBLANK = @HAVE_ISBLANK@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
@@ -870,7 +983,6 @@ HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@
 HAVE_LINK = @HAVE_LINK@
 HAVE_LINKAT = @HAVE_LINKAT@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
 HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
 HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -879,7 +991,7 @@ HAVE_MBSINIT = @HAVE_MBSINIT@
 HAVE_MBSLEN = @HAVE_MBSLEN@
 HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
-HAVE_MEMCHR = @HAVE_MEMCHR@
+HAVE_MBTOWC = @HAVE_MBTOWC@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MKDIRAT = @HAVE_MKDIRAT@
 HAVE_MKDTEMP = @HAVE_MKDTEMP@
@@ -902,11 +1014,70 @@ HAVE_PCLOSE = @HAVE_PCLOSE@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
 HAVE_POPEN = @HAVE_POPEN@
+HAVE_POSIX_MEMALIGN = @HAVE_POSIX_MEMALIGN@
 HAVE_POSIX_OPENPT = @HAVE_POSIX_OPENPT@
 HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PSELECT = @HAVE_PSELECT@
+HAVE_PTHREAD_ATTR_DESTROY = @HAVE_PTHREAD_ATTR_DESTROY@
+HAVE_PTHREAD_ATTR_GETDETACHSTATE = @HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+HAVE_PTHREAD_ATTR_INIT = @HAVE_PTHREAD_ATTR_INIT@
+HAVE_PTHREAD_ATTR_SETDETACHSTATE = @HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+HAVE_PTHREAD_CONDATTR_DESTROY = @HAVE_PTHREAD_CONDATTR_DESTROY@
+HAVE_PTHREAD_CONDATTR_INIT = @HAVE_PTHREAD_CONDATTR_INIT@
+HAVE_PTHREAD_COND_BROADCAST = @HAVE_PTHREAD_COND_BROADCAST@
+HAVE_PTHREAD_COND_DESTROY = @HAVE_PTHREAD_COND_DESTROY@
+HAVE_PTHREAD_COND_INIT = @HAVE_PTHREAD_COND_INIT@
+HAVE_PTHREAD_COND_SIGNAL = @HAVE_PTHREAD_COND_SIGNAL@
+HAVE_PTHREAD_COND_TIMEDWAIT = @HAVE_PTHREAD_COND_TIMEDWAIT@
+HAVE_PTHREAD_COND_WAIT = @HAVE_PTHREAD_COND_WAIT@
+HAVE_PTHREAD_CREATE = @HAVE_PTHREAD_CREATE@
+HAVE_PTHREAD_CREATE_DETACHED = @HAVE_PTHREAD_CREATE_DETACHED@
+HAVE_PTHREAD_DETACH = @HAVE_PTHREAD_DETACH@
+HAVE_PTHREAD_EQUAL = @HAVE_PTHREAD_EQUAL@
+HAVE_PTHREAD_EXIT = @HAVE_PTHREAD_EXIT@
+HAVE_PTHREAD_GETSPECIFIC = @HAVE_PTHREAD_GETSPECIFIC@
+HAVE_PTHREAD_H = @HAVE_PTHREAD_H@
+HAVE_PTHREAD_JOIN = @HAVE_PTHREAD_JOIN@
+HAVE_PTHREAD_KEY_CREATE = @HAVE_PTHREAD_KEY_CREATE@
+HAVE_PTHREAD_KEY_DELETE = @HAVE_PTHREAD_KEY_DELETE@
+HAVE_PTHREAD_MUTEXATTR_DESTROY = @HAVE_PTHREAD_MUTEXATTR_DESTROY@
+HAVE_PTHREAD_MUTEXATTR_GETROBUST = @HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+HAVE_PTHREAD_MUTEXATTR_GETTYPE = @HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+HAVE_PTHREAD_MUTEXATTR_INIT = @HAVE_PTHREAD_MUTEXATTR_INIT@
+HAVE_PTHREAD_MUTEXATTR_SETROBUST = @HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+HAVE_PTHREAD_MUTEXATTR_SETTYPE = @HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+HAVE_PTHREAD_MUTEX_DESTROY = @HAVE_PTHREAD_MUTEX_DESTROY@
+HAVE_PTHREAD_MUTEX_INIT = @HAVE_PTHREAD_MUTEX_INIT@
+HAVE_PTHREAD_MUTEX_LOCK = @HAVE_PTHREAD_MUTEX_LOCK@
+HAVE_PTHREAD_MUTEX_RECURSIVE = @HAVE_PTHREAD_MUTEX_RECURSIVE@
+HAVE_PTHREAD_MUTEX_ROBUST = @HAVE_PTHREAD_MUTEX_ROBUST@
+HAVE_PTHREAD_MUTEX_TIMEDLOCK = @HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+HAVE_PTHREAD_MUTEX_TRYLOCK = @HAVE_PTHREAD_MUTEX_TRYLOCK@
+HAVE_PTHREAD_MUTEX_UNLOCK = @HAVE_PTHREAD_MUTEX_UNLOCK@
+HAVE_PTHREAD_ONCE = @HAVE_PTHREAD_ONCE@
+HAVE_PTHREAD_PROCESS_SHARED = @HAVE_PTHREAD_PROCESS_SHARED@
+HAVE_PTHREAD_RWLOCKATTR_DESTROY = @HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+HAVE_PTHREAD_RWLOCKATTR_INIT = @HAVE_PTHREAD_RWLOCKATTR_INIT@
+HAVE_PTHREAD_RWLOCK_DESTROY = @HAVE_PTHREAD_RWLOCK_DESTROY@
+HAVE_PTHREAD_RWLOCK_INIT = @HAVE_PTHREAD_RWLOCK_INIT@
+HAVE_PTHREAD_RWLOCK_RDLOCK = @HAVE_PTHREAD_RWLOCK_RDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK = @HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+HAVE_PTHREAD_RWLOCK_TRYRDLOCK = @HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+HAVE_PTHREAD_RWLOCK_TRYWRLOCK = @HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+HAVE_PTHREAD_RWLOCK_UNLOCK = @HAVE_PTHREAD_RWLOCK_UNLOCK@
+HAVE_PTHREAD_RWLOCK_WRLOCK = @HAVE_PTHREAD_RWLOCK_WRLOCK@
+HAVE_PTHREAD_SELF = @HAVE_PTHREAD_SELF@
+HAVE_PTHREAD_SETSPECIFIC = @HAVE_PTHREAD_SETSPECIFIC@
 HAVE_PTHREAD_SIGMASK = @HAVE_PTHREAD_SIGMASK@
+HAVE_PTHREAD_SPINLOCK_T = @HAVE_PTHREAD_SPINLOCK_T@
+HAVE_PTHREAD_SPIN_DESTROY = @HAVE_PTHREAD_SPIN_DESTROY@
+HAVE_PTHREAD_SPIN_INIT = @HAVE_PTHREAD_SPIN_INIT@
+HAVE_PTHREAD_SPIN_LOCK = @HAVE_PTHREAD_SPIN_LOCK@
+HAVE_PTHREAD_SPIN_TRYLOCK = @HAVE_PTHREAD_SPIN_TRYLOCK@
+HAVE_PTHREAD_SPIN_UNLOCK = @HAVE_PTHREAD_SPIN_UNLOCK@
+HAVE_PTHREAD_T = @HAVE_PTHREAD_T@
 HAVE_PTSNAME = @HAVE_PTSNAME@
 HAVE_PTSNAME_R = @HAVE_PTSNAME_R@
 HAVE_PWRITE = @HAVE_PWRITE@
@@ -923,10 +1094,15 @@ HAVE_REALPATH = @HAVE_REALPATH@
 HAVE_RENAMEAT = @HAVE_RENAMEAT@
 HAVE_RPMATCH = @HAVE_RPMATCH@
 HAVE_SA_FAMILY_T = @HAVE_SA_FAMILY_T@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SCHED_YIELD = @HAVE_SCHED_YIELD@
 HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@
 HAVE_SETENV = @HAVE_SETENV@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
+HAVE_SETSTATE = @HAVE_SETSTATE@
+HAVE_SIGABBREV_NP = @HAVE_SIGABBREV_NP@
 HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGDESCR_NP = @HAVE_SIGDESCR_NP@
 HAVE_SIGHANDLER_T = @HAVE_SIGHANDLER_T@
 HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
@@ -940,14 +1116,19 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASECMP = @HAVE_STRCASECMP@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRERRORNAME_NP = @HAVE_STRERRORNAME_NP@
 HAVE_STRINGS_H = @HAVE_STRINGS_H@
 HAVE_STRPBRK = @HAVE_STRPBRK@
 HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOL = @HAVE_STRTOL@
+HAVE_STRTOLD = @HAVE_STRTOLD@
 HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOUL = @HAVE_STRTOUL@
 HAVE_STRTOULL = @HAVE_STRTOULL@
 HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
 HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
 HAVE_STRUCT_SOCKADDR_STORAGE = @HAVE_STRUCT_SOCKADDR_STORAGE@
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = @HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY@
@@ -961,23 +1142,24 @@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
 HAVE_SYS_IOCTL_H = @HAVE_SYS_IOCTL_H@
 HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
 HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_RANDOM_H = @HAVE_SYS_RANDOM_H@
 HAVE_SYS_SELECT_H = @HAVE_SYS_SELECT_H@
 HAVE_SYS_SOCKET_H = @HAVE_SYS_SOCKET_H@
 HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_SYS_UIO_H = @HAVE_SYS_UIO_H@
 HAVE_TIMEGM = @HAVE_TIMEGM@
+HAVE_TIMESPEC_GET = @HAVE_TIMESPEC_GET@
 HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@
 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
-HAVE_TZSET = @HAVE_TZSET@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
 HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_VASPRINTF = @HAVE_VASPRINTF@
 HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -1016,12 +1198,15 @@ HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
 HAVE_WMEMCPY = @HAVE_WMEMCPY@
 HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
+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@
 HELP2MAN = @HELP2MAN@
+HOST_CPU = @HOST_CPU@
+HOST_CPU_C_ABI = @HOST_CPU_C_ABI@
 ICONV_CONST = @ICONV_CONST@
 ICONV_H = @ICONV_H@
 INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -1042,20 +1227,34 @@ LIBDIFFUTILS_LIBDEPS = @LIBDIFFUTILS_LIBDEPS@
 LIBDIFFUTILS_LTLIBDEPS = @LIBDIFFUTILS_LTLIBDEPS@
 LIBICONV = @LIBICONV@
 LIBINTL = @LIBINTL@
+LIBMULTITHREAD = @LIBMULTITHREAD@
 LIBOBJS = @LIBOBJS@
+LIBPMULTITHREAD = @LIBPMULTITHREAD@
+LIBPTHREAD = @LIBPTHREAD@
 LIBS = @LIBS@
 LIBSIGSEGV = @LIBSIGSEGV@
 LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@
 LIBSOCKET = @LIBSOCKET@
+LIBSTDTHREAD = @LIBSTDTHREAD@
 LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTHREAD = @LIBTHREAD@
 LIBUNISTRING_UNISTR_H = @LIBUNISTRING_UNISTR_H@
 LIBUNISTRING_UNITYPES_H = @LIBUNISTRING_UNITYPES_H@
 LIBUNISTRING_UNIWIDTH_H = @LIBUNISTRING_UNIWIDTH_H@
 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_GETRANDOM = @LIB_GETRANDOM@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
 LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LIB_NL_LANGINFO = @LIB_NL_LANGINFO@
+LIB_PTHREAD = @LIB_PTHREAD@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
 LIB_SELECT = @LIB_SELECT@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
 LIMITS_H = @LIMITS_H@
 LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALENAME_ENHANCE_LOCALE_FUNCS = @LOCALENAME_ENHANCE_LOCALE_FUNCS@
 LOCALE_FR = @LOCALE_FR@
 LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
 LOCALE_JA = @LOCALE_JA@
@@ -1064,8 +1263,10 @@ LOCALE_ZH_CN = @LOCALE_ZH_CN@
 LTLIBCSTACK = @LTLIBCSTACK@
 LTLIBICONV = @LTLIBICONV@
 LTLIBINTL = @LTLIBINTL@
+LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
 LTLIBOBJS = @LTLIBOBJS@
 LTLIBSIGSEGV = @LTLIBSIGSEGV@
+LTLIBTHREAD = @LTLIBTHREAD@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
 MSGFMT = @MSGFMT@
@@ -1086,6 +1287,8 @@ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
+NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H = @NEXT_AS_FIRST_DIRECTIVE_PTHREAD_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
 NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
@@ -1095,6 +1298,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
@@ -1118,6 +1322,8 @@ NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
 NEXT_LIMITS_H = @NEXT_LIMITS_H@
 NEXT_LOCALE_H = @NEXT_LOCALE_H@
 NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
+NEXT_PTHREAD_H = @NEXT_PTHREAD_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
 NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
 NEXT_STDARG_H = @NEXT_STDARG_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
@@ -1127,6 +1333,7 @@ NEXT_STDLIB_H = @NEXT_STDLIB_H@
 NEXT_STRINGS_H = @NEXT_STRINGS_H@
 NEXT_STRING_H = @NEXT_STRING_H@
 NEXT_SYS_IOCTL_H = @NEXT_SYS_IOCTL_H@
+NEXT_SYS_RANDOM_H = @NEXT_SYS_RANDOM_H@
 NEXT_SYS_SELECT_H = @NEXT_SYS_SELECT_H@
 NEXT_SYS_SOCKET_H = @NEXT_SYS_SOCKET_H@
 NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
@@ -1151,31 +1358,43 @@ POSUB = @POSUB@
 PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
 PR_PROGRAM = @PR_PROGRAM@
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
+REPLACE_ACCESS = @REPLACE_ACCESS@
+REPLACE_ALIGNED_ALLOC = @REPLACE_ALIGNED_ALLOC@
 REPLACE_BTOWC = @REPLACE_BTOWC@
 REPLACE_CALLOC = @REPLACE_CALLOC@
 REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CREAT = @REPLACE_CREAT@
 REPLACE_CTIME = @REPLACE_CTIME@
 REPLACE_DPRINTF = @REPLACE_DPRINTF@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_EXECL = @REPLACE_EXECL@
+REPLACE_EXECLE = @REPLACE_EXECLE@
+REPLACE_EXECLP = @REPLACE_EXECLP@
+REPLACE_EXECV = @REPLACE_EXECV@
+REPLACE_EXECVE = @REPLACE_EXECVE@
+REPLACE_EXECVP = @REPLACE_EXECVP@
+REPLACE_EXECVPE = @REPLACE_EXECVPE@
 REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
 REPLACE_FCLOSE = @REPLACE_FCLOSE@
 REPLACE_FCNTL = @REPLACE_FCNTL@
 REPLACE_FDOPEN = @REPLACE_FDOPEN@
 REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FFSLL = @REPLACE_FFSLL@
 REPLACE_FNMATCH = @REPLACE_FNMATCH@
 REPLACE_FOPEN = @REPLACE_FOPEN@
 REPLACE_FPRINTF = @REPLACE_FPRINTF@
 REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREE = @REPLACE_FREE@
 REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
 REPLACE_FREOPEN = @REPLACE_FREOPEN@
 REPLACE_FSEEK = @REPLACE_FSEEK@
@@ -1195,6 +1414,7 @@ REPLACE_GETLINE = @REPLACE_GETLINE@
 REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
 REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
 REPLACE_GETPASS = @REPLACE_GETPASS@
+REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
 REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
 REPLACE_GMTIME = @REPLACE_GMTIME@
 REPLACE_ICONV = @REPLACE_ICONV@
@@ -1202,10 +1422,13 @@ REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
 REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
 REPLACE_INET_NTOP = @REPLACE_INET_NTOP@
 REPLACE_INET_PTON = @REPLACE_INET_PTON@
+REPLACE_INITSTATE = @REPLACE_INITSTATE@
 REPLACE_IOCTL = @REPLACE_IOCTL@
 REPLACE_ISATTY = @REPLACE_ISATTY@
 REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
 REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
 REPLACE_ITOLD = @REPLACE_ITOLD@
 REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LINK = @REPLACE_LINK@
@@ -1227,7 +1450,9 @@ REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
 REPLACE_MKDIR = @REPLACE_MKDIR@
 REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
 REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKNODAT = @REPLACE_MKNODAT@
 REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
 REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -1239,29 +1464,85 @@ REPLACE_OPEN = @REPLACE_OPEN@
 REPLACE_OPENAT = @REPLACE_OPENAT@
 REPLACE_PERROR = @REPLACE_PERROR@
 REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PRINTF = @REPLACE_PRINTF@
 REPLACE_PSELECT = @REPLACE_PSELECT@
+REPLACE_PTHREAD_ATTR_DESTROY = @REPLACE_PTHREAD_ATTR_DESTROY@
+REPLACE_PTHREAD_ATTR_GETDETACHSTATE = @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+REPLACE_PTHREAD_ATTR_INIT = @REPLACE_PTHREAD_ATTR_INIT@
+REPLACE_PTHREAD_ATTR_SETDETACHSTATE = @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+REPLACE_PTHREAD_CONDATTR_DESTROY = @REPLACE_PTHREAD_CONDATTR_DESTROY@
+REPLACE_PTHREAD_CONDATTR_INIT = @REPLACE_PTHREAD_CONDATTR_INIT@
+REPLACE_PTHREAD_COND_BROADCAST = @REPLACE_PTHREAD_COND_BROADCAST@
+REPLACE_PTHREAD_COND_DESTROY = @REPLACE_PTHREAD_COND_DESTROY@
+REPLACE_PTHREAD_COND_INIT = @REPLACE_PTHREAD_COND_INIT@
+REPLACE_PTHREAD_COND_SIGNAL = @REPLACE_PTHREAD_COND_SIGNAL@
+REPLACE_PTHREAD_COND_TIMEDWAIT = @REPLACE_PTHREAD_COND_TIMEDWAIT@
+REPLACE_PTHREAD_COND_WAIT = @REPLACE_PTHREAD_COND_WAIT@
+REPLACE_PTHREAD_CREATE = @REPLACE_PTHREAD_CREATE@
+REPLACE_PTHREAD_DETACH = @REPLACE_PTHREAD_DETACH@
+REPLACE_PTHREAD_EQUAL = @REPLACE_PTHREAD_EQUAL@
+REPLACE_PTHREAD_EXIT = @REPLACE_PTHREAD_EXIT@
+REPLACE_PTHREAD_GETSPECIFIC = @REPLACE_PTHREAD_GETSPECIFIC@
+REPLACE_PTHREAD_JOIN = @REPLACE_PTHREAD_JOIN@
+REPLACE_PTHREAD_KEY_CREATE = @REPLACE_PTHREAD_KEY_CREATE@
+REPLACE_PTHREAD_KEY_DELETE = @REPLACE_PTHREAD_KEY_DELETE@
+REPLACE_PTHREAD_MUTEXATTR_DESTROY = @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+REPLACE_PTHREAD_MUTEXATTR_GETROBUST = @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_GETTYPE = @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+REPLACE_PTHREAD_MUTEXATTR_INIT = @REPLACE_PTHREAD_MUTEXATTR_INIT@
+REPLACE_PTHREAD_MUTEXATTR_SETROBUST = @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+REPLACE_PTHREAD_MUTEXATTR_SETTYPE = @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+REPLACE_PTHREAD_MUTEX_DESTROY = @REPLACE_PTHREAD_MUTEX_DESTROY@
+REPLACE_PTHREAD_MUTEX_INIT = @REPLACE_PTHREAD_MUTEX_INIT@
+REPLACE_PTHREAD_MUTEX_LOCK = @REPLACE_PTHREAD_MUTEX_LOCK@
+REPLACE_PTHREAD_MUTEX_TIMEDLOCK = @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+REPLACE_PTHREAD_MUTEX_TRYLOCK = @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+REPLACE_PTHREAD_MUTEX_UNLOCK = @REPLACE_PTHREAD_MUTEX_UNLOCK@
+REPLACE_PTHREAD_ONCE = @REPLACE_PTHREAD_ONCE@
+REPLACE_PTHREAD_RWLOCKATTR_DESTROY = @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+REPLACE_PTHREAD_RWLOCKATTR_INIT = @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+REPLACE_PTHREAD_RWLOCK_DESTROY = @REPLACE_PTHREAD_RWLOCK_DESTROY@
+REPLACE_PTHREAD_RWLOCK_INIT = @REPLACE_PTHREAD_RWLOCK_INIT@
+REPLACE_PTHREAD_RWLOCK_RDLOCK = @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK = @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYRDLOCK = @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+REPLACE_PTHREAD_RWLOCK_TRYWRLOCK = @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+REPLACE_PTHREAD_RWLOCK_UNLOCK = @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+REPLACE_PTHREAD_RWLOCK_WRLOCK = @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+REPLACE_PTHREAD_SELF = @REPLACE_PTHREAD_SELF@
+REPLACE_PTHREAD_SETSPECIFIC = @REPLACE_PTHREAD_SETSPECIFIC@
 REPLACE_PTHREAD_SIGMASK = @REPLACE_PTHREAD_SIGMASK@
+REPLACE_PTHREAD_SPIN_DESTROY = @REPLACE_PTHREAD_SPIN_DESTROY@
+REPLACE_PTHREAD_SPIN_INIT = @REPLACE_PTHREAD_SPIN_INIT@
+REPLACE_PTHREAD_SPIN_LOCK = @REPLACE_PTHREAD_SPIN_LOCK@
+REPLACE_PTHREAD_SPIN_TRYLOCK = @REPLACE_PTHREAD_SPIN_TRYLOCK@
+REPLACE_PTHREAD_SPIN_UNLOCK = @REPLACE_PTHREAD_SPIN_UNLOCK@
 REPLACE_PTSNAME = @REPLACE_PTSNAME@
 REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@
 REPLACE_PUTENV = @REPLACE_PUTENV@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_QSORT_R = @REPLACE_QSORT_R@
 REPLACE_RAISE = @REPLACE_RAISE@
+REPLACE_RANDOM = @REPLACE_RANDOM@
 REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
 REPLACE_READ = @REPLACE_READ@
 REPLACE_READLINK = @REPLACE_READLINK@
 REPLACE_READLINKAT = @REPLACE_READLINKAT@
 REPLACE_REALLOC = @REPLACE_REALLOC@
+REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
 REPLACE_REALPATH = @REPLACE_REALPATH@
 REPLACE_REMOVE = @REPLACE_REMOVE@
 REPLACE_RENAME = @REPLACE_RENAME@
 REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
 REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_SCHED_YIELD = @REPLACE_SCHED_YIELD@
 REPLACE_SELECT = @REPLACE_SELECT@
 REPLACE_SETENV = @REPLACE_SETENV@
 REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
+REPLACE_SETSTATE = @REPLACE_SETSTATE@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
 REPLACE_SPRINTF = @REPLACE_SPRINTF@
@@ -1273,6 +1554,7 @@ REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
 REPLACE_STRDUP = @REPLACE_STRDUP@
 REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRERRORNAME_NP = @REPLACE_STRERRORNAME_NP@
 REPLACE_STRERROR_R = @REPLACE_STRERROR_R@
 REPLACE_STRFTIME = @REPLACE_STRFTIME@
 REPLACE_STRNCAT = @REPLACE_STRNCAT@
@@ -1283,6 +1565,11 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOD = @REPLACE_STRTOD@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_STRTOL = @REPLACE_STRTOL@
+REPLACE_STRTOLD = @REPLACE_STRTOLD@
+REPLACE_STRTOLL = @REPLACE_STRTOLL@
+REPLACE_STRTOUL = @REPLACE_STRTOUL@
+REPLACE_STRTOULL = @REPLACE_STRTOULL@
 REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
 REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
 REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
@@ -1309,6 +1596,7 @@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSTOK = @REPLACE_WCSTOK@
 REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
 REPLACE_WCTOB = @REPLACE_WCTOB@
 REPLACE_WCTOMB = @REPLACE_WCTOMB@
@@ -1317,6 +1605,7 @@ REPLACE_WRITE = @REPLACE_WRITE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
+SIGSEGV_H = @SIGSEGV_H@
 SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
 SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
 SRC_VERSION_C = @SRC_VERSION_C@
@@ -1330,10 +1619,12 @@ SYS_IOCTL_H_HAVE_WINSOCK2_H = @SYS_IOCTL_H_HAVE_WINSOCK2_H@
 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
 TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_TIME_UTC = @TIME_H_DEFINES_TIME_UTC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
 UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@
+UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
 UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
 USE_NLS = @USE_NLS@
@@ -1647,7 +1938,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
        fi;                                                             \
        echo "$${col}$$br$${std}";                                      \
-       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
+       echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
        echo "$${col}$$br$${std}";                                      \
        create_testsuite_report --maybe-color;                          \
        echo "$$col$$br$$std";                                          \
@@ -1849,7 +2140,6 @@ colors.log: colors
 @am__EXEEXT_TRUE@      --log-file $$b.log --trs-file $$b.trs \
 @am__EXEEXT_TRUE@      $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
 @am__EXEEXT_TRUE@      "$$tst" $(AM_TESTS_FD_REDIRECT)
-
 distdir: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) distdir-am
 
index ca0fe5e..79568a2 100755 (executable)
--- a/tests/cmp
+++ b/tests/cmp
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Test 'cmp'.
 
-# Copyright 2017-2018 Free Software Foundation, Inc.
+# Copyright 2017-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -218,4 +218,14 @@ case `LC_ALL=C cmp -b bad bug` in
   *) echo 'expected cmp -b to report a and u'; fail=1;;
 esac
 
+printf 'Jackdaws love my big sphinx of quartz!' > j1
+printf 'jackdaws love my big sphinx of quartz.' > j2
+cat <<'EOF' > exp2 || fail=1
+ 1 112 J    152 j
+38  41 !     56 .
+EOF
+cmp -bl j1 j2 > out2
+test $? -eq 1 || fail=1
+compare exp2 out2 || fail=1
+
 Exit $fail
index a64f769..dff7527 100644 (file)
@@ -1,7 +1,7 @@
 # -*- sh -*-
 # Check environment variables for sane values while testing.
 
-# Copyright (C) 2000-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 295ab05..d5a8d71 100755 (executable)
@@ -2,7 +2,7 @@
 # Make sure all these programs work properly
 # when invoked with --help or --version.
 
-# Copyright (C) 2000-2013, 2015-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2013, 2015-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 06c54ad..656a54e 100644 (file)
@@ -1,6 +1,6 @@
 # This file is sourced by init.sh, *before* its initialization.
 
-# Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# Copyright (C) 2010-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ sanitize_path_()
   # FIXME: remove double quotes around $IFS when all tests use init.sh.
   # They constitute a work-around for a bug in FreeBSD 8.1's /bin/sh.
   local saved_IFS="$IFS"
-    IFS=:
+    IFS=$PATH_SEPARATOR
     set -- $PATH
   IFS=$saved_IFS
 
@@ -44,14 +44,14 @@ sanitize_path_()
     test -z "$d" && d1=. || d1=$d
     if ls -d "$d1/." > /dev/null 2>&1; then
       new_path="$new_path$colon$d"
-      colon=':'
+      colon=$PATH_SEPARATOR
     fi
   done
 
   for d in /sbin /usr/sbin ; do
-    case ":$new_path:" in
-      *:$d:*) ;;
-      *) new_path="$new_path:$d" ;;
+    case "$PATH_SEPARATOR$new_path$PATH_SEPARATOR" in
+      *$PATH_SEPARATOR$d$PATH_SEPARATOR*) ;;
+      *) new_path="$new_path$PATH_SEPARATOR$d" ;;
     esac
   done
 
index 93d14f5..9ef8348 100644 (file)
@@ -1,6 +1,6 @@
 # source this file; set up for tests
 
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -60,6 +60,9 @@
 #   4. Finally
 #   $ exit
 
+# =============================================================================
+# Elementary diagnostics
+
 ME_=`expr "./$0" : '.*/\(.*\)$'`
 
 # Prepare PATH_SEPARATOR.
@@ -109,26 +112,8 @@ skip_ () { warn_ "$ME_: skipped test: $@"; Exit 77; }
 fatal_ () { warn_ "$ME_: hard error: $@"; Exit 99; }
 framework_failure_ () { warn_ "$ME_: set-up failure: $@"; Exit 99; }
 
-# This is used to simplify checking of the return value
-# which is useful when ensuring a command fails as desired.
-# I.e., just doing `command ... &&fail=1` will not catch
-# a segfault in command for example.  With this helper you
-# instead check an explicit exit code like
-#   returns_ 1 command ... || fail
-returns_ () {
-  # Disable tracing so it doesn't interfere with stderr of the wrapped command
-  { set +x; } 2>/dev/null
-
-  local exp_exit="$1"
-  shift
-  "$@"
-  test $? -eq $exp_exit && ret_=0 || ret_=1
-
-  if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
-    set -x
-  fi
-  { return $ret_; } 2>/dev/null
-}
+# =============================================================================
+# Ensure the shell supports modern syntax.
 
 # Sanitize this shell to POSIX mode, if possible.
 DUALCASE=1; export DUALCASE
@@ -144,6 +129,8 @@ else
 fi
 
 # We require $(...) support unconditionally.
+# We require that the printf built-in work correctly regarding octal escapes;
+# this eliminates /bin/sh on AIX 7.2.
 # We require non-surprising "local" semantics (this eliminates dash).
 # This takes the admittedly draconian step of eliminating dash, because the
 # assignment tab=$(printf '\t') works fine, yet preceding it with "local "
@@ -173,6 +160,12 @@ fi
 #  ? - not ok
 gl_shell_test_script_='
 test $(echo y) = y || exit 1
+LC_ALL=en_US.UTF-8 printf "\\351" 2>/dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
+  || exit 1
+printf "\\351" 2>/dev/null \
+  | LC_ALL=C tr "\\351" x | LC_ALL=C grep "^x$" > /dev/null \
+  || exit 1
 f_local_() { local v=1; }; f_local_ || exit 1
 f_dash_local_fail_() { local t=$(printf " 1"); }; f_dash_local_fail_
 score_=10
@@ -255,6 +248,9 @@ else
   fi
 fi
 
+# =============================================================================
+# Ensure the shell behaves reasonably.
+
 # If this is bash, turn off all aliases.
 test -n "$BASH_VERSION" && unalias -a
 
@@ -265,99 +261,177 @@ test -n "$BASH_VERSION" && unalias -a
 # widespread than that for hyphen-containing function names.
 test -n "$EXEEXT" && test -n "$BASH_VERSION" && shopt -s expand_aliases
 
-# Enable glibc's malloc-perturbing option.
-# This is useful for exposing code that depends on the fact that
-# malloc-related functions often return memory that is mostly zeroed.
-# If you have the time and cycles, use valgrind to do an even better job.
-: ${MALLOC_PERTURB_=87}
-export MALLOC_PERTURB_
+# =============================================================================
+# Creating a temporary directory (needed by the core test framework)
 
-# This is a stub function that is run upon trap (upon regular exit and
-# interrupt).  Override it with a per-test function, e.g., to unmount
-# a partition, or to undo any other global state changes.
-cleanup_ () { :; }
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+#  - try to get random bytes from /dev/urandom
+#  - failing that, generate output from a combination of quickly-varying
+#      sources and gzip.  Ignore non-varying gzip header, and extract
+#      "random" bits from there.
+#  - given those bits, map to file-name bytes using tr, and try to create
+#      the desired directory.
+#  - make only $MAX_TRIES_ attempts
 
-# Emit a header similar to that from diff -u;  Print the simulated "diff"
-# command so that the order of arguments is clear.  Don't bother with @@ lines.
-emit_diff_u_header_ ()
+# Helper function.  Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_ ()
 {
-  printf '%s\n' "diff -u $*" \
-    "--- $1    1970-01-01" \
-    "+++ $2    1970-01-01"
+  n_=$1
+
+  # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+  # But if they have openssl, they probably have mktemp, too.
+
+  chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+  dev_rand_=/dev/urandom
+  if test -r "$dev_rand_"; then
+    # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+    dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+      | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+    return
+  fi
+
+  n_plus_50_=`expr $n_ + 50`
+  cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
+  data_=` (eval "$cmds_") 2>&1 | gzip `
+
+  # Ensure that $data_ has length at least 50+$n_
+  while :; do
+    len_=`echo "$data_"|wc -c`
+    test $n_plus_50_ -le $len_ && break;
+    data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+  done
+
+  echo "$data_" \
+    | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+    | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
 }
 
-# Arrange not to let diff or cmp operate on /dev/null,
-# since on some systems (at least OSF/1 5.1), that doesn't work.
-# When there are not two arguments, or no argument is /dev/null, return 2.
-# When one argument is /dev/null and the other is not empty,
-# cat the nonempty file to stderr and return 1.
-# Otherwise, return 0.
-compare_dev_null_ ()
+mktempd_ ()
 {
-  test $# = 2 || return 2
+  case $# in
+  2);;
+  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
+  esac
 
-  if test "x$1" = x/dev/null; then
-    test -s "$2" || return 0
-    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
-    return 1
-  fi
+  destdir_=$1
+  template_=$2
 
-  if test "x$2" = x/dev/null; then
-    test -s "$1" || return 0
-    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
-    return 1
-  fi
+  MAX_TRIES_=4
 
-  return 2
+  # Disallow any trailing slash on specified destdir:
+  # it would subvert the post-mktemp "case"-based destdir test.
+  case $destdir_ in
+  / | //) destdir_slash_=$destdir;;
+  */) fail_ "invalid destination dir: remove trailing slash(es)";;
+  *) destdir_slash_=$destdir_/;;
+  esac
+
+  case $template_ in
+  *XXXX) ;;
+  *) fail_ \
+       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+  esac
+
+  # First, try to use mktemp.
+  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
+
+  # The resulting name must be in the specified directory.
+  case $d in "$destdir_slash_"*) :;; *) false;; esac &&
+
+  # It must have created the directory.
+  test -d "$d" &&
+
+  # It must have 0700 permissions.  Handle sticky "S" bits.
+  perms=`ls -dgo "$d" 2>/dev/null` &&
+  case $perms in drwx--[-S]---*) :;; *) false;; esac && {
+    echo "$d"
+    return
+  }
+
+  # If we reach this point, we'll have to create a directory manually.
+
+  # Get a copy of the template without its suffix of X's.
+  base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+  # Calculate how many X's we've just removed.
+  template_length_=`echo "$template_" | wc -c`
+  nx_=`echo "$base_template_" | wc -c`
+  nx_=`expr $template_length_ - $nx_`
+
+  err_=
+  i_=1
+  while :; do
+    X_=`rand_bytes_ $nx_`
+    candidate_dir_="$destdir_slash_$base_template_$X_"
+    err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+      && { echo "$candidate_dir_"; return; }
+    test $MAX_TRIES_ -le $i_ && break;
+    i_=`expr $i_ + 1`
+  done
+  fail_ "$err_"
 }
 
-for diff_opt_ in -u -U3 -c '' no; do
-  test "$diff_opt_" != no &&
-    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
-    break
-done
-if test "$diff_opt_" != no; then
-  if test -z "$diff_out_"; then
-    compare_ () { diff $diff_opt_ "$@"; }
-  else
-    compare_ ()
-    {
-      # If no differences were found, AIX and HP-UX 'diff' produce output
-      # like "No differences encountered".  Hide this output.
-      diff $diff_opt_ "$@" > diff.out
-      diff_status_=$?
-      test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
-      rm -f diff.out || diff_status_=2
-      return $diff_status_
-    }
-  fi
-elif cmp -s /dev/null /dev/null 2>/dev/null; then
-  compare_ () { cmp -s "$@"; }
-else
-  compare_ () { cmp "$@"; }
-fi
+# =============================================================================
+# Core test framework
 
-# Usage: compare EXPECTED ACTUAL
-#
-# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
-# Otherwise, propagate $? to caller: any diffs have already been printed.
-compare ()
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_ () { printf gt; }
+
+# Set up the environment for the test to run in.
+setup_ ()
 {
-  # This looks like it can be factored to use a simple "case $?"
-  # after unchecked compare_dev_null_ invocation, but that would
-  # fail in a "set -e" environment.
-  if compare_dev_null_ "$@"; then
-    return 0
-  else
-    case $? in
-      1) return 1;;
-      *) compare_ "$@";;
-    esac
+  if test "$VERBOSE" = yes; then
+    # Test whether set -x may cause the selected shell to corrupt an
+    # application's stderr.  Many do, including zsh-4.3.10 and the /bin/sh
+    # from SunOS 5.11, OpenBSD 4.7 and Irix 6.5.
+    # If enabling verbose output this way would cause trouble, simply
+    # issue a warning and refrain.
+    if $gl_set_x_corrupts_stderr_; then
+      warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
+    else
+      set -x
+    fi
   fi
+
+  initial_cwd_=$PWD
+
+  # Create and enter the temporary directory.
+  pfx_=`testdir_prefix_`
+  test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+    || fail_ "failed to create temporary directory in $initial_cwd_"
+  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+  # Set variables srcdir, builddir, for the convenience of the test.
+  case $srcdir in
+    /* | ?:*) ;;
+    *) srcdir="../$srcdir" ;;
+  esac
+  builddir=".."
+  export srcdir builddir
+
+  # As autoconf-generated configure scripts do, ensure that IFS
+  # is defined initially, so that saving and restoring $IFS works.
+  gl_init_sh_nl_='
+'
+  IFS=" ""     $gl_init_sh_nl_"
+
+  # This trap statement, along with a trap on 0 below, ensure that the
+  # temporary directory, $test_dir_, is removed upon exit as well as
+  # upon receipt of any of the listed signals.
+  for sig_ in 1 2 3 13 15; do
+    eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
+  done
 }
 
-# An arbitrary prefix to help distinguish test directories.
-testdir_prefix_ () { printf gt; }
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt).  Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_ () { :; }
 
 # Run the user-overridable cleanup_ function, remove the temporary
 # directory and exit with the incoming value of $?.
@@ -377,6 +451,9 @@ remove_tmp_ ()
   exit $__st
 }
 
+# =============================================================================
+# Prepending directories to PATH
+
 # Given a directory name, DIR, if every entry in it that matches *.exe
 # contains only the specified bytes (see the case stmt below), then print
 # a space-separated list of those names and return 0.  Otherwise, don't
@@ -458,160 +535,148 @@ path_prepend_ ()
   export PATH
 }
 
-setup_ ()
-{
-  if test "$VERBOSE" = yes; then
-    # Test whether set -x may cause the selected shell to corrupt an
-    # application's stderr.  Many do, including zsh-4.3.10 and the /bin/sh
-    # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5.
-    # If enabling verbose output this way would cause trouble, simply
-    # issue a warning and refrain.
-    if $gl_set_x_corrupts_stderr_; then
-      warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr"
-    else
-      set -x
-    fi
-  fi
+# =============================================================================
+# Convenience environment variables for the tests
 
-  initial_cwd_=$PWD
+# -----------------------------------------------------------------------------
 
-  pfx_=`testdir_prefix_`
-  test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
-    || fail_ "failed to create temporary directory in $initial_cwd_"
-  cd "$test_dir_" || fail_ "failed to cd to temporary directory"
+# Enable glibc's malloc-perturbing option.
+# This is useful for exposing code that depends on the fact that
+# malloc-related functions often return memory that is mostly zeroed.
+# If you have the time and cycles, use valgrind to do an even better job.
+: ${MALLOC_PERTURB_=87}
+export MALLOC_PERTURB_
 
-  # As autoconf-generated configure scripts do, ensure that IFS
-  # is defined initially, so that saving and restoring $IFS works.
-  gl_init_sh_nl_='
-'
-  IFS=" ""     $gl_init_sh_nl_"
+# -----------------------------------------------------------------------------
 
-  # This trap statement, along with a trap on 0 below, ensure that the
-  # temporary directory, $test_dir_, is removed upon exit as well as
-  # upon receipt of any of the listed signals.
-  for sig_ in 1 2 3 13 15; do
-    eval "trap 'Exit $(expr $sig_ + 128)' $sig_"
-  done
-}
+# The interpreter for Bourne-shell scripts.
+# No special standards compatibility requirements.
+# Some environments, such as Android, don't have /bin/sh.
+if test -f /bin/sh$EXEEXT; then
+  BOURNE_SHELL=/bin/sh
+else
+  BOURNE_SHELL=sh
+fi
 
-# Create a temporary directory, much like mktemp -d does.
-# Written by Jim Meyering.
-#
-# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
-#
-# First, try to use the mktemp program.
-# Failing that, we'll roll our own mktemp-like function:
-#  - try to get random bytes from /dev/urandom
-#  - failing that, generate output from a combination of quickly-varying
-#      sources and gzip.  Ignore non-varying gzip header, and extract
-#      "random" bits from there.
-#  - given those bits, map to file-name bytes using tr, and try to create
-#      the desired directory.
-#  - make only $MAX_TRIES_ attempts
+# =============================================================================
+# Convenience functions for the tests
 
-# Helper function.  Print $N pseudo-random bytes from a-zA-Z0-9.
-rand_bytes_ ()
-{
-  n_=$1
+# -----------------------------------------------------------------------------
+# Return value checking
 
-  # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
-  # But if they have openssl, they probably have mktemp, too.
+# This is used to simplify checking of the return value
+# which is useful when ensuring a command fails as desired.
+# I.e., just doing `command ... &&fail=1` will not catch
+# a segfault in command for example.  With this helper you
+# instead check an explicit exit code like
+#   returns_ 1 command ... || fail
+returns_ () {
+  # Disable tracing so it doesn't interfere with stderr of the wrapped command
+  { set +x; } 2>/dev/null
 
-  chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
-  dev_rand_=/dev/urandom
-  if test -r "$dev_rand_"; then
-    # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
-    dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
-      | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
-    return
-  fi
+  local exp_exit="$1"
+  shift
+  "$@"
+  test $? -eq $exp_exit && ret_=0 || ret_=1
 
-  n_plus_50_=`expr $n_ + 50`
-  cmds_='date; date +%N; free; who -a; w; ps auxww; ps -ef'
-  data_=` (eval "$cmds_") 2>&1 | gzip `
+  if test "$VERBOSE" = yes && test "$gl_set_x_corrupts_stderr_" = false; then
+    set -x
+  fi
+  { return $ret_; } 2>/dev/null
+}
 
-  # Ensure that $data_ has length at least 50+$n_
-  while :; do
-    len_=`echo "$data_"|wc -c`
-    test $n_plus_50_ -le $len_ && break;
-    data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
-  done
+# -----------------------------------------------------------------------------
+# Text file comparison
 
-  echo "$data_" \
-    | dd bs=1 skip=50 count=$n_ 2>/dev/null \
-    | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_
+# Emit a header similar to that from diff -u;  Print the simulated "diff"
+# command so that the order of arguments is clear.  Don't bother with @@ lines.
+emit_diff_u_header_ ()
+{
+  printf '%s\n' "diff -u $*" \
+    "--- $1    1970-01-01" \
+    "+++ $2    1970-01-01"
 }
 
-mktempd_ ()
+# Arrange not to let diff or cmp operate on /dev/null,
+# since on some systems (at least OSF/1 5.1), that doesn't work.
+# When there are not two arguments, or no argument is /dev/null, return 2.
+# When one argument is /dev/null and the other is not empty,
+# cat the nonempty file to stderr and return 1.
+# Otherwise, return 0.
+compare_dev_null_ ()
 {
-  case $# in
-  2);;
-  *) fail_ "Usage: mktempd_ DIR TEMPLATE";;
-  esac
-
-  destdir_=$1
-  template_=$2
-
-  MAX_TRIES_=4
-
-  # Disallow any trailing slash on specified destdir:
-  # it would subvert the post-mktemp "case"-based destdir test.
-  case $destdir_ in
-  / | //) destdir_slash_=$destdir;;
-  */) fail_ "invalid destination dir: remove trailing slash(es)";;
-  *) destdir_slash_=$destdir_/;;
-  esac
-
-  case $template_ in
-  *XXXX) ;;
-  *) fail_ \
-       "invalid template: $template_ (must have a suffix of at least 4 X's)";;
-  esac
-
-  # First, try to use mktemp.
-  d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` &&
-
-  # The resulting name must be in the specified directory.
-  case $d in "$destdir_slash_"*) :;; *) false;; esac &&
-
-  # It must have created the directory.
-  test -d "$d" &&
+  test $# = 2 || return 2
 
-  # It must have 0700 permissions.  Handle sticky "S" bits.
-  perms=`ls -dgo "$d" 2>/dev/null` &&
-  case $perms in drwx--[-S]---*) :;; *) false;; esac && {
-    echo "$d"
-    return
-  }
+  if test "x$1" = x/dev/null; then
+    test -s "$2" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/+/' "$2"
+    return 1
+  fi
 
-  # If we reach this point, we'll have to create a directory manually.
+  if test "x$2" = x/dev/null; then
+    test -s "$1" || return 0
+    emit_diff_u_header_ "$@"; sed 's/^/-/' "$1"
+    return 1
+  fi
 
-  # Get a copy of the template without its suffix of X's.
-  base_template_=`echo "$template_"|sed 's/XX*$//'`
+  return 2
+}
 
-  # Calculate how many X's we've just removed.
-  template_length_=`echo "$template_" | wc -c`
-  nx_=`echo "$base_template_" | wc -c`
-  nx_=`expr $template_length_ - $nx_`
+for diff_opt_ in -u -U3 -c '' no; do
+  test "$diff_opt_" != no &&
+    diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
+    break
+done
+if test "$diff_opt_" != no; then
+  if test -z "$diff_out_"; then
+    compare_ () { diff $diff_opt_ "$@"; }
+  else
+    compare_ ()
+    {
+      # If no differences were found, AIX and HP-UX 'diff' produce output
+      # like "No differences encountered".  Hide this output.
+      diff $diff_opt_ "$@" > diff.out
+      diff_status_=$?
+      test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
+      rm -f diff.out || diff_status_=2
+      return $diff_status_
+    }
+  fi
+elif cmp -s /dev/null /dev/null 2>/dev/null; then
+  compare_ () { cmp -s "$@"; }
+else
+  compare_ () { cmp "$@"; }
+fi
 
-  err_=
-  i_=1
-  while :; do
-    X_=`rand_bytes_ $nx_`
-    candidate_dir_="$destdir_slash_$base_template_$X_"
-    err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
-      && { echo "$candidate_dir_"; return; }
-    test $MAX_TRIES_ -le $i_ && break;
-    i_=`expr $i_ + 1`
-  done
-  fail_ "$err_"
+# Usage: compare EXPECTED ACTUAL
+#
+# Given compare_dev_null_'s preprocessing, defer to compare_ if 2 or more.
+# Otherwise, propagate $? to caller: any diffs have already been printed.
+compare ()
+{
+  # This looks like it can be factored to use a simple "case $?"
+  # after unchecked compare_dev_null_ invocation, but that would
+  # fail in a "set -e" environment.
+  if compare_dev_null_ "$@"; then
+    return 0
+  else
+    case $? in
+      1) return 1;;
+      *) compare_ "$@";;
+    esac
+  fi
 }
 
+# -----------------------------------------------------------------------------
+
 # If you want to override the testdir_prefix_ function,
 # or to add more utility functions, use this file.
 test -f "$srcdir/init.cfg" \
   && . "$srcdir/init.cfg"
 
+# =============================================================================
+# Set up the environment for the test to run in.
+
 setup_ "$@"
 # This trap is here, rather than in the setup_ function, because some
 # shells run the exit trap at shell function exit, rather than script exit.
index 4400051..e3a61da 100755 (executable)
@@ -10,12 +10,6 @@ echo a > a || fail=1
 echo '0a1
 > a' > exp || fail=1
 
-returns_ 1 diff -N - a <&- > out || fail=1
-compare exp out || fail=1
-
-returns_ 1 diff --unidirectional-new-file - a <&- > out || fail=1
-compare exp out || fail=1
-
 returns_ 1 diff -N b - < a > out || fail=1
 compare exp out || fail=1
 
@@ -25,14 +19,6 @@ compare exp out || fail=1
 echo '1d0
 < a' > exp || fail=1
 
-returns_ 1 diff -N a - <&- > out || fail=1
-compare exp out || fail=1
-
-# With closed standard input, require an exit status of 2
-# and empty stdout.
-returns_ 2 diff --unidirectional-new-file a - <&- > out || fail=1
-compare /dev/null out || fail=1
-
 returns_ 1 diff -N - b < a > out || fail=1
 compare exp out || fail=1