summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 15:13:04 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 15:13:04 (GMT)
commitbbdcf5a704517d35a76ba8b666075da9ffe39ac4 (patch)
treea36bec4f7c2802dfe5efc5cb2dfc902fec2a23b8
parentfa1ac7ecb247faf58fe65740c0d40e0585f684c9 (diff)
downloadmonitoring-plugins-bbdcf5a.tar.gz
Sync with the latest Gnulib code (fa1ac7ec)
-rwxr-xr-xbuild-aux/config.rpath2
-rw-r--r--gl/Makefile.am807
-rw-r--r--gl/_Noreturn.h2
-rw-r--r--gl/af_alg.c2
-rw-r--r--gl/af_alg.h2
-rw-r--r--gl/alloca.in.h2
-rw-r--r--gl/arpa_inet.in.h2
-rw-r--r--gl/asnprintf.c2
-rw-r--r--gl/asprintf.c2
-rw-r--r--gl/attribute.h2
-rw-r--r--gl/base64.c2
-rw-r--r--gl/base64.h2
-rw-r--r--gl/basename-lgpl.c2
-rw-r--r--gl/basename-lgpl.h2
-rw-r--r--gl/basename.c4
-rw-r--r--gl/btowc.c2
-rw-r--r--gl/byteswap.in.h2
-rw-r--r--gl/calloc.c2
-rw-r--r--gl/cdefs.h23
-rw-r--r--gl/cloexec.c2
-rw-r--r--gl/cloexec.h2
-rw-r--r--gl/close.c2
-rw-r--r--gl/dirname-lgpl.c2
-rw-r--r--gl/dirname.c4
-rw-r--r--gl/dirname.h2
-rw-r--r--gl/dup2.c2
-rw-r--r--gl/dynarray.h2
-rw-r--r--gl/errno.in.h2
-rw-r--r--gl/error.c2
-rw-r--r--gl/error.h2
-rw-r--r--gl/exitfail.c2
-rw-r--r--gl/exitfail.h2
-rw-r--r--gl/fcntl.c2
-rw-r--r--gl/fcntl.in.h6
-rw-r--r--gl/fd-hook.c2
-rw-r--r--gl/fd-hook.h2
-rw-r--r--gl/fflush.c2
-rw-r--r--gl/filename.h2
-rw-r--r--gl/float+.h2
-rw-r--r--gl/float.c2
-rw-r--r--gl/float.in.h2
-rw-r--r--gl/floor.c4
-rw-r--r--gl/floorf.c4
-rw-r--r--gl/fopen.c2
-rw-r--r--gl/fpurge.c2
-rw-r--r--gl/freading.c2
-rw-r--r--gl/freading.h2
-rw-r--r--gl/free.c2
-rw-r--r--gl/fseek.c2
-rw-r--r--gl/fseeko.c2
-rw-r--r--gl/fstat.c2
-rw-r--r--gl/fsusage.c4
-rw-r--r--gl/fsusage.h4
-rw-r--r--gl/ftell.c2
-rw-r--r--gl/ftello.c2
-rw-r--r--gl/gai_strerror.c2
-rw-r--r--gl/getaddrinfo.c2
-rw-r--r--gl/getdelim.c2
-rw-r--r--gl/getdtablesize.c2
-rw-r--r--gl/gethostname.c2
-rw-r--r--gl/getline.c2
-rw-r--r--gl/getloadavg.c4
-rw-r--r--gl/getopt-cdefs.in.h2
-rw-r--r--gl/getopt-core.h2
-rw-r--r--gl/getopt-ext.h2
-rw-r--r--gl/getopt-pfx-core.h2
-rw-r--r--gl/getopt-pfx-ext.h2
-rw-r--r--gl/getopt.c2
-rw-r--r--gl/getopt.in.h2
-rw-r--r--gl/getopt1.c2
-rw-r--r--gl/getopt_int.h2
-rw-r--r--gl/getprogname.c2
-rw-r--r--gl/getprogname.h2
-rw-r--r--gl/gettext.h15
-rw-r--r--gl/gl_openssl.h2
-rw-r--r--gl/glthread/lock.c2
-rw-r--r--gl/glthread/lock.h2
-rw-r--r--gl/glthread/threadlib.c2
-rw-r--r--gl/hard-locale.c2
-rw-r--r--gl/hard-locale.h2
-rw-r--r--gl/ialloc.c2
-rw-r--r--gl/ialloc.h2
-rw-r--r--gl/idpriv-droptemp.c4
-rw-r--r--gl/idpriv.h4
-rw-r--r--gl/idx.h2
-rw-r--r--gl/inet_ntop.c2
-rw-r--r--gl/intprops-internal.h392
-rw-r--r--gl/intprops.h358
-rw-r--r--gl/inttypes.in.h2
-rw-r--r--gl/itold.c2
-rw-r--r--gl/langinfo.in.h2
-rw-r--r--gl/lc-charset-dispatch.c2
-rw-r--r--gl/lc-charset-dispatch.h2
-rw-r--r--gl/libc-config.h13
-rw-r--r--gl/limits.in.h2
-rw-r--r--gl/localcharset.c2
-rw-r--r--gl/localcharset.h2
-rw-r--r--gl/locale.in.h2
-rw-r--r--gl/localeconv.c2
-rw-r--r--gl/lseek.c2
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/__inline.m42
-rw-r--r--gl/m4/absolute-header.m42
-rw-r--r--gl/m4/af_alg.m42
-rw-r--r--gl/m4/alloca.m412
-rw-r--r--gl/m4/arpa_inet_h.m42
-rw-r--r--gl/m4/base64.m42
-rw-r--r--gl/m4/btowc.m42
-rw-r--r--gl/m4/builtin-expect.m42
-rw-r--r--gl/m4/byteswap.m410
-rw-r--r--gl/m4/calloc.m413
-rw-r--r--gl/m4/close.m42
-rw-r--r--gl/m4/codeset.m42
-rw-r--r--gl/m4/double-slash-root.m42
-rw-r--r--gl/m4/dup2.m42
-rw-r--r--gl/m4/eealloc.m42
-rw-r--r--gl/m4/environ.m42
-rw-r--r--gl/m4/errno_h.m412
-rw-r--r--gl/m4/error.m42
-rw-r--r--gl/m4/exponentd.m42
-rw-r--r--gl/m4/extensions.m42
-rw-r--r--gl/m4/extern-inline.m421
-rw-r--r--gl/m4/fcntl-o.m42
-rw-r--r--gl/m4/fcntl.m42
-rw-r--r--gl/m4/fcntl_h.m42
-rw-r--r--gl/m4/fflush.m42
-rw-r--r--gl/m4/float_h.m422
-rw-r--r--gl/m4/floorf.m42
-rw-r--r--gl/m4/fopen.m49
-rw-r--r--gl/m4/fpurge.m42
-rw-r--r--gl/m4/freading.m42
-rw-r--r--gl/m4/free.m42
-rw-r--r--gl/m4/fseek.m42
-rw-r--r--gl/m4/fseeko.m42
-rw-r--r--gl/m4/fstat.m42
-rw-r--r--gl/m4/fstypename.m42
-rw-r--r--gl/m4/fsusage.m42
-rw-r--r--gl/m4/ftell.m42
-rw-r--r--gl/m4/ftello.m42
-rw-r--r--gl/m4/getaddrinfo.m42
-rw-r--r--gl/m4/getdelim.m42
-rw-r--r--gl/m4/getdtablesize.m42
-rw-r--r--gl/m4/gethostname.m42
-rw-r--r--gl/m4/getline.m42
-rw-r--r--gl/m4/getloadavg.m42
-rw-r--r--gl/m4/getopt.m412
-rw-r--r--gl/m4/getprogname.m42
-rw-r--r--gl/m4/gettext.m42
-rw-r--r--gl/m4/gl-openssl.m42
-rw-r--r--gl/m4/gnulib-cache.m44
-rw-r--r--gl/m4/gnulib-common.m4133
-rw-r--r--gl/m4/gnulib-comp.m4438
-rw-r--r--gl/m4/gnulib-tool.m410
-rw-r--r--gl/m4/host-cpu-c-abi.m47
-rw-r--r--gl/m4/hostent.m42
-rw-r--r--gl/m4/iconv.m426
-rw-r--r--gl/m4/idpriv.m42
-rw-r--r--gl/m4/include_next.m48
-rw-r--r--gl/m4/inet_ntop.m42
-rw-r--r--gl/m4/intl-thread-locale.m42
-rw-r--r--gl/m4/intlmacosx.m42
-rw-r--r--gl/m4/intmax_t.m42
-rw-r--r--gl/m4/inttypes.m46
-rw-r--r--gl/m4/inttypes_h.m42
-rw-r--r--gl/m4/langinfo_h.m42
-rw-r--r--gl/m4/largefile.m49
-rw-r--r--gl/m4/lib-ld.m42
-rw-r--r--gl/m4/lib-link.m48
-rw-r--r--gl/m4/lib-prefix.m46
-rw-r--r--gl/m4/limits-h.m411
-rw-r--r--gl/m4/localcharset.m42
-rw-r--r--gl/m4/locale-fr.m42
-rw-r--r--gl/m4/locale-ja.m42
-rw-r--r--gl/m4/locale-zh.m42
-rw-r--r--gl/m4/locale_h.m42
-rw-r--r--gl/m4/localeconv.m42
-rw-r--r--gl/m4/lock.m42
-rw-r--r--gl/m4/lseek.m42
-rw-r--r--gl/m4/malloc.m413
-rw-r--r--gl/m4/malloca.m42
-rw-r--r--gl/m4/math_h.m42
-rw-r--r--gl/m4/mbrtowc.m42
-rw-r--r--gl/m4/mbsinit.m42
-rw-r--r--gl/m4/mbstate_t.m42
-rw-r--r--gl/m4/mbtowc.m42
-rw-r--r--gl/m4/memchr.m42
-rw-r--r--gl/m4/minmax.m42
-rw-r--r--gl/m4/mktime.m431
-rw-r--r--gl/m4/mmap-anon.m42
-rw-r--r--gl/m4/mode_t.m42
-rw-r--r--gl/m4/mountlist.m42
-rw-r--r--gl/m4/msvc-inval.m42
-rw-r--r--gl/m4/msvc-nothrow.m42
-rw-r--r--gl/m4/multiarch.m42
-rw-r--r--gl/m4/netdb_h.m42
-rw-r--r--gl/m4/netinet_in_h.m410
-rw-r--r--gl/m4/nl_langinfo.m42
-rw-r--r--gl/m4/nls.m42
-rw-r--r--gl/m4/nocrash.m42
-rw-r--r--gl/m4/off_t.m42
-rw-r--r--gl/m4/open-cloexec.m42
-rw-r--r--gl/m4/open-slash.m42
-rw-r--r--gl/m4/open.m42
-rw-r--r--gl/m4/pathmax.m42
-rw-r--r--gl/m4/pid_t.m42
-rw-r--r--gl/m4/po.m42
-rw-r--r--gl/m4/printf.m42
-rw-r--r--gl/m4/progtest.m42
-rw-r--r--gl/m4/pthread_rwlock_rdlock.m42
-rw-r--r--gl/m4/realloc.m412
-rw-r--r--gl/m4/reallocarray.m42
-rw-r--r--gl/m4/regex.m42
-rw-r--r--gl/m4/servent.m42
-rw-r--r--gl/m4/setenv.m42
-rw-r--r--gl/m4/setlocale_null.m42
-rw-r--r--gl/m4/sha1.m42
-rw-r--r--gl/m4/size_max.m42
-rw-r--r--gl/m4/snprintf.m42
-rw-r--r--gl/m4/socketlib.m42
-rw-r--r--gl/m4/sockets.m42
-rw-r--r--gl/m4/socklen.m42
-rw-r--r--gl/m4/sockpfaf.m42
-rw-r--r--gl/m4/ssize_t.m42
-rw-r--r--gl/m4/stat-time.m42
-rw-r--r--gl/m4/stat.m42
-rw-r--r--gl/m4/std-gnu11.m42
-rw-r--r--gl/m4/stdalign.m49
-rw-r--r--gl/m4/stdbool.m4124
-rw-r--r--gl/m4/stddef_h.m416
-rw-r--r--gl/m4/stdint.m410
-rw-r--r--gl/m4/stdint_h.m42
-rw-r--r--gl/m4/stdio_h.m433
-rw-r--r--gl/m4/stdlib_h.m416
-rw-r--r--gl/m4/strcase.m42
-rw-r--r--gl/m4/strcasestr.m42
-rw-r--r--gl/m4/strerror.m46
-rw-r--r--gl/m4/string_h.m42
-rw-r--r--gl/m4/strings_h.m42
-rw-r--r--gl/m4/strsep.m42
-rw-r--r--gl/m4/strstr.m42
-rw-r--r--gl/m4/sys_socket_h.m49
-rw-r--r--gl/m4/sys_stat_h.m48
-rw-r--r--gl/m4/sys_types_h.m42
-rw-r--r--gl/m4/sys_uio_h.m42
-rw-r--r--gl/m4/threadlib.m42
-rw-r--r--gl/m4/time_h.m46
-rw-r--r--gl/m4/time_r.m42
-rw-r--r--gl/m4/timegm.m42
-rw-r--r--gl/m4/ungetc.m42
-rw-r--r--gl/m4/unistd_h.m4191
-rw-r--r--gl/m4/unlocked-io.m42
-rw-r--r--gl/m4/vararrays.m472
-rw-r--r--gl/m4/vasnprintf.m42
-rw-r--r--gl/m4/vasprintf.m42
-rw-r--r--gl/m4/visibility.m42
-rw-r--r--gl/m4/vsnprintf.m42
-rw-r--r--gl/m4/warn-on-use.m42
-rw-r--r--gl/m4/wchar_h.m42
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wcrtomb.m42
-rw-r--r--gl/m4/wctype_h.m42
-rw-r--r--gl/m4/wint_t.m42
-rw-r--r--gl/m4/xalloc.m42
-rw-r--r--gl/m4/xsize.m42
-rw-r--r--gl/m4/year2038.m412
-rw-r--r--gl/m4/zzgnulib.m42
-rw-r--r--gl/malloc.c2
-rw-r--r--gl/malloc/.deps/.dirstamp0
-rw-r--r--gl/malloc/.deps/dynarray-skeleton.Po1
-rw-r--r--gl/malloc/.deps/dynarray_at_failure.Po232
-rw-r--r--gl/malloc/.deps/dynarray_emplace_enlarge.Po231
-rw-r--r--gl/malloc/.deps/dynarray_finalize.Po196
-rw-r--r--gl/malloc/.deps/dynarray_resize.Po231
-rw-r--r--gl/malloc/.deps/dynarray_resize_clear.Po91
-rw-r--r--gl/malloc/.dirstamp0
-rw-r--r--gl/malloc/dynarray-skeleton.c2
-rw-r--r--gl/malloc/dynarray.h2
-rw-r--r--gl/malloc/dynarray_at_failure.c2
-rw-r--r--gl/malloc/dynarray_emplace_enlarge.c2
-rw-r--r--gl/malloc/dynarray_finalize.c2
-rw-r--r--gl/malloc/dynarray_resize.c2
-rw-r--r--gl/malloc/dynarray_resize_clear.c2
-rw-r--r--gl/malloca.c12
-rw-r--r--gl/malloca.h2
-rw-r--r--gl/math.c2
-rw-r--r--gl/math.in.h6
-rw-r--r--gl/mbrtowc-impl-utf8.h2
-rw-r--r--gl/mbrtowc-impl.h2
-rw-r--r--gl/mbrtowc.c2
-rw-r--r--gl/mbsinit.c2
-rw-r--r--gl/mbtowc-impl.h2
-rw-r--r--gl/mbtowc-lock.c2
-rw-r--r--gl/mbtowc-lock.h2
-rw-r--r--gl/mbtowc.c2
-rw-r--r--gl/memchr.c2
-rw-r--r--gl/memchr.valgrind2
-rw-r--r--gl/minmax.h2
-rw-r--r--gl/mktime-internal.h2
-rw-r--r--gl/mktime.c30
-rw-r--r--gl/mountlist.c4
-rw-r--r--gl/mountlist.h4
-rw-r--r--gl/msvc-inval.c2
-rw-r--r--gl/msvc-inval.h2
-rw-r--r--gl/msvc-nothrow.c2
-rw-r--r--gl/msvc-nothrow.h2
-rw-r--r--gl/netdb.in.h2
-rw-r--r--gl/netinet_in.in.h2
-rw-r--r--gl/nl_langinfo-lock.c2
-rw-r--r--gl/nl_langinfo.c2
-rw-r--r--gl/open.c2
-rw-r--r--gl/pathmax.h2
-rw-r--r--gl/printf-args.c2
-rw-r--r--gl/printf-args.h2
-rw-r--r--gl/printf-parse.c2
-rw-r--r--gl/printf-parse.h2
-rw-r--r--gl/realloc.c2
-rw-r--r--gl/reallocarray.c7
-rw-r--r--gl/regcomp.c831
-rw-r--r--gl/regex.c2
-rw-r--r--gl/regex.h2
-rw-r--r--gl/regex_internal.c64
-rw-r--r--gl/regex_internal.h51
-rw-r--r--gl/regexec.c84
-rw-r--r--gl/setenv.c2
-rw-r--r--gl/setlocale-lock.c2
-rw-r--r--gl/setlocale_null.c2
-rw-r--r--gl/setlocale_null.h2
-rw-r--r--gl/sha1-stream.c2
-rw-r--r--gl/sha1.c2
-rw-r--r--gl/sha1.h5
-rw-r--r--gl/size_max.h2
-rw-r--r--gl/snprintf.c2
-rw-r--r--gl/sockets.c2
-rw-r--r--gl/sockets.h2
-rw-r--r--gl/stat-time.c2
-rw-r--r--gl/stat-time.h2
-rw-r--r--gl/stat-w32.c2
-rw-r--r--gl/stat-w32.h2
-rw-r--r--gl/stat.c2
-rw-r--r--gl/stdalign.in.h2
-rw-r--r--gl/stdbool.in.h27
-rw-r--r--gl/stdckdint.in.h37
-rw-r--r--gl/stddef.in.h2
-rw-r--r--gl/stdint.in.h2
-rw-r--r--gl/stdio-impl.h2
-rw-r--r--gl/stdio-read.c168
-rw-r--r--gl/stdio-write.c206
-rw-r--r--gl/stdio.in.h5
-rw-r--r--gl/stdlib.in.h37
-rw-r--r--gl/str-two-way.h6
-rw-r--r--gl/strcasecmp.c2
-rw-r--r--gl/strcasestr.c2
-rw-r--r--gl/streq.h2
-rw-r--r--gl/strerror-override.c2
-rw-r--r--gl/strerror-override.h2
-rw-r--r--gl/strerror.c2
-rw-r--r--gl/string.in.h120
-rw-r--r--gl/strings.in.h2
-rw-r--r--gl/stripslash.c2
-rw-r--r--gl/strncasecmp.c2
-rw-r--r--gl/strsep.c2
-rw-r--r--gl/strstr.c2
-rw-r--r--gl/sys-limits.h2
-rw-r--r--gl/sys_socket.c2
-rw-r--r--gl/sys_socket.in.h2
-rw-r--r--gl/sys_stat.in.h30
-rw-r--r--gl/sys_types.in.h2
-rw-r--r--gl/sys_uio.in.h2
-rw-r--r--gl/time.in.h13
-rw-r--r--gl/time_r.c2
-rw-r--r--gl/timegm.c2
-rw-r--r--gl/unistd.c2
-rw-r--r--gl/unistd.in.h21
-rw-r--r--gl/unlocked-io.h4
-rw-r--r--gl/unsetenv.c2
-rw-r--r--gl/vasnprintf.c241
-rw-r--r--gl/vasnprintf.h2
-rw-r--r--gl/vasprintf.c2
-rw-r--r--gl/verify.h14
-rw-r--r--gl/vsnprintf.c2
-rw-r--r--gl/w32sock.h2
-rw-r--r--gl/wchar.in.h38
-rw-r--r--gl/wcrtomb.c2
-rw-r--r--gl/wctype-h.c2
-rw-r--r--gl/wctype.in.h2
-rw-r--r--gl/windows-initguard.h2
-rw-r--r--gl/windows-mutex.c2
-rw-r--r--gl/windows-mutex.h2
-rw-r--r--gl/windows-once.c2
-rw-r--r--gl/windows-once.h2
-rw-r--r--gl/windows-recmutex.c2
-rw-r--r--gl/windows-recmutex.h2
-rw-r--r--gl/windows-rwlock.c2
-rw-r--r--gl/windows-rwlock.h2
-rw-r--r--gl/xalloc-die.c4
-rw-r--r--gl/xalloc-oversized.h2
-rw-r--r--gl/xalloc.h4
-rw-r--r--gl/xmalloc.c16
-rw-r--r--gl/xsize.c2
-rw-r--r--gl/xsize.h2
400 files changed, 4179 insertions, 2517 deletions
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 4b7dc49..1e1ab67 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
2# Output a system dependent set of variables, describing how to set the 2# Output a system dependent set of variables, describing how to set the
3# run time search path of shared libraries in an executable. 3# run time search path of shared libraries in an executable.
4# 4#
5# Copyright 1996-2021 Free Software Foundation, Inc. 5# Copyright 1996-2022 Free Software Foundation, Inc.
6# Taken from GNU libtool, 2001 6# Taken from GNU libtool, 2001
7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8# 8#
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 5451c47..deb665c 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,10 +1,10 @@
1## DO NOT EDIT! GENERATED AUTOMATICALLY! 1## DO NOT EDIT! GENERATED AUTOMATICALLY!
2## Process this file with automake to produce Makefile.in. 2## Process this file with automake to produce Makefile.in.
3# Copyright (C) 2002-2021 Free Software Foundation, Inc. 3# Copyright (C) 2002-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software; you can redistribute it and/or modify 5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or 7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version. 8# (at your option) any later version.
9# 9#
10# This file is distributed in the hope that it will be useful, 10# This file is distributed in the hope that it will be useful,
@@ -56,7 +56,7 @@
56# vasprintf \ 56# vasprintf \
57# vsnprintf 57# vsnprintf
58 58
59AUTOMAKE_OPTIONS = 1.11 gnits subdir-objects 59AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects
60 60
61SUBDIRS = 61SUBDIRS =
62noinst_HEADERS = 62noinst_HEADERS =
@@ -79,6 +79,7 @@ AM_CFLAGS =
79noinst_LIBRARIES += libgnu.a 79noinst_LIBRARIES += libgnu.a
80 80
81libgnu_a_SOURCES = 81libgnu_a_SOURCES =
82libgnu_a_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS)
82libgnu_a_LIBADD = $(gl_LIBOBJS) 83libgnu_a_LIBADD = $(gl_LIBOBJS)
83libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) 84libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
84EXTRA_libgnu_a_SOURCES = 85EXTRA_libgnu_a_SOURCES =
@@ -100,11 +101,10 @@ BUILT_SOURCES += $(ALLOCA_H)
100# doesn't have one that works with the given compiler. 101# doesn't have one that works with the given compiler.
101if GL_GENERATE_ALLOCA_H 102if GL_GENERATE_ALLOCA_H
102alloca.h: alloca.in.h $(top_builddir)/config.status 103alloca.h: alloca.in.h $(top_builddir)/config.status
103 $(AM_V_GEN)rm -f $@-t $@ && \ 104 $(gl_V_at)$(SED_HEADER_STDOUT) \
104 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 105 -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' \
105 sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g' < $(srcdir)/alloca.in.h; \ 106 $(srcdir)/alloca.in.h > $@-t
106 } > $@-t && \ 107 $(AM_V_at)mv $@-t $@
107 mv -f $@-t $@
108else 108else
109alloca.h: $(top_builddir)/config.status 109alloca.h: $(top_builddir)/config.status
110 rm -f $@ 110 rm -f $@
@@ -122,10 +122,9 @@ BUILT_SOURCES += arpa/inet.h
122# We need the following in order to create <arpa/inet.h> when the system 122# We need the following in order to create <arpa/inet.h> when the system
123# doesn't have one. 123# doesn't have one.
124arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) 124arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
125 $(AM_V_at)$(MKDIR_P) arpa 125 $(AM_V_GEN)$(MKDIR_P) '%reldir%/arpa'
126 $(AM_V_GEN)rm -f $@-t $@ && \ 126 $(AM_V_at)$(SED_HEADER_STDOUT) \
127 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 127 -e 's|@''GUARD_PREFIX''@|GL|g' \
128 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
129 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 128 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
130 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 129 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
131 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 130 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -142,9 +141,8 @@ arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON
142 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 141 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
143 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 142 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
144 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 143 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
145 < $(srcdir)/arpa_inet.in.h; \ 144 $(srcdir)/arpa_inet.in.h > $@-t
146 } > $@-t && \ 145 $(AM_V_at)mv $@-t $@
147 mv $@-t $@
148MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t 146MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
149MOSTLYCLEANDIRS += arpa 147MOSTLYCLEANDIRS += arpa
150 148
@@ -175,10 +173,9 @@ EXTRA_DIST += basename-lgpl.h
175 173
176## begin gnulib module btowc 174## begin gnulib module btowc
177 175
178 176if GL_COND_OBJ_BTOWC
179EXTRA_DIST += btowc.c 177libgnu_a_SOURCES += btowc.c
180 178endif
181EXTRA_libgnu_a_SOURCES += btowc.c
182 179
183## end gnulib module btowc 180## end gnulib module btowc
184 181
@@ -190,11 +187,8 @@ BUILT_SOURCES += $(BYTESWAP_H)
190# doesn't have one. 187# doesn't have one.
191if GL_GENERATE_BYTESWAP_H 188if GL_GENERATE_BYTESWAP_H
192byteswap.h: byteswap.in.h $(top_builddir)/config.status 189byteswap.h: byteswap.in.h $(top_builddir)/config.status
193 $(AM_V_GEN)rm -f $@-t $@ && \ 190 $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/byteswap.in.h
194 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 191 $(AM_V_at)mv $@-t $@
195 cat $(srcdir)/byteswap.in.h; \
196 } > $@-t && \
197 mv -f $@-t $@
198else 192else
199byteswap.h: $(top_builddir)/config.status 193byteswap.h: $(top_builddir)/config.status
200 rm -f $@ 194 rm -f $@
@@ -233,10 +227,9 @@ EXTRA_DIST += cloexec.h
233 227
234## begin gnulib module close 228## begin gnulib module close
235 229
236 230if GL_COND_OBJ_CLOSE
237EXTRA_DIST += close.c 231libgnu_a_SOURCES += close.c
238 232endif
239EXTRA_libgnu_a_SOURCES += close.c
240 233
241## end gnulib module close 234## end gnulib module close
242 235
@@ -282,10 +275,9 @@ EXTRA_DIST += dirname.h
282 275
283## begin gnulib module dup2 276## begin gnulib module dup2
284 277
285 278if GL_COND_OBJ_DUP2
286EXTRA_DIST += dup2.c 279libgnu_a_SOURCES += dup2.c
287 280endif
288EXTRA_libgnu_a_SOURCES += dup2.c
289 281
290## end gnulib module dup2 282## end gnulib module dup2
291 283
@@ -294,27 +286,24 @@ EXTRA_libgnu_a_SOURCES += dup2.c
294BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h 286BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
295 287
296malloc/dynarray.gl.h: malloc/dynarray.h 288malloc/dynarray.gl.h: malloc/dynarray.h
297 $(AM_V_at)$(MKDIR_P) malloc 289 $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
298 $(AM_V_GEN)rm -f $@-t $@ && \ 290 $(AM_V_at)$(SED_HEADER_STDOUT) \
299 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 291 -e '/libc_hidden_proto/d' \
300 sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ 292 $(srcdir)/malloc/dynarray.h > $@-t
301 } > $@-t && \ 293 $(AM_V_at)mv $@-t $@
302 mv $@-t $@
303MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t 294MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
304 295
305malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c 296malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
306 $(AM_V_at)$(MKDIR_P) malloc 297 $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
307 $(AM_V_GEN)rm -f $@-t $@ && \ 298 $(AM_V_at)$(SED_HEADER_STDOUT) \
308 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 299 -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
309 sed -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
310 -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ 300 -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
311 -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ 301 -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
312 -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \ 302 -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
313 -e 's|__glibc_likely|_GL_LIKELY|g' \ 303 -e 's|__glibc_likely|_GL_LIKELY|g' \
314 -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ 304 -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
315 < $(srcdir)/malloc/dynarray-skeleton.c; \ 305 $(srcdir)/malloc/dynarray-skeleton.c > $@-t
316 } > $@-t && \ 306 $(AM_V_at)mv $@-t $@
317 mv $@-t $@
318MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t 307MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
319 308
320libgnu_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 309libgnu_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
@@ -333,9 +322,8 @@ BUILT_SOURCES += $(ERRNO_H)
333# doesn't have one that is POSIX compliant. 322# doesn't have one that is POSIX compliant.
334if GL_GENERATE_ERRNO_H 323if GL_GENERATE_ERRNO_H
335errno.h: errno.in.h $(top_builddir)/config.status 324errno.h: errno.in.h $(top_builddir)/config.status
336 $(AM_V_GEN)rm -f $@-t $@ && \ 325 $(gl_V_at)$(SED_HEADER_STDOUT) \
337 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 326 -e 's|@''GUARD_PREFIX''@|GL|g' \
338 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
339 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 327 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
340 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 328 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
341 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 329 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -346,9 +334,8 @@ errno.h: errno.in.h $(top_builddir)/config.status
346 -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ 334 -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
347 -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ 335 -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
348 -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ 336 -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
349 < $(srcdir)/errno.in.h; \ 337 $(srcdir)/errno.in.h > $@-t
350 } > $@-t && \ 338 $(AM_V_at)mv $@-t $@
351 mv $@-t $@
352else 339else
353errno.h: $(top_builddir)/config.status 340errno.h: $(top_builddir)/config.status
354 rm -f $@ 341 rm -f $@
@@ -361,10 +348,11 @@ EXTRA_DIST += errno.in.h
361 348
362## begin gnulib module error 349## begin gnulib module error
363 350
351if GL_COND_OBJ_ERROR
352libgnu_a_SOURCES += error.c
353endif
364 354
365EXTRA_DIST += error.c error.h 355EXTRA_DIST += error.h
366
367EXTRA_libgnu_a_SOURCES += error.c
368 356
369## end gnulib module error 357## end gnulib module error
370 358
@@ -378,10 +366,9 @@ EXTRA_DIST += exitfail.h
378 366
379## begin gnulib module fcntl 367## begin gnulib module fcntl
380 368
381 369if GL_COND_OBJ_FCNTL
382EXTRA_DIST += fcntl.c 370libgnu_a_SOURCES += fcntl.c
383 371endif
384EXTRA_libgnu_a_SOURCES += fcntl.c
385 372
386## end gnulib module fcntl 373## end gnulib module fcntl
387 374
@@ -392,9 +379,8 @@ BUILT_SOURCES += fcntl.h
392# We need the following in order to create <fcntl.h> when the system 379# We need the following in order to create <fcntl.h> when the system
393# doesn't have one that works with the given compiler. 380# doesn't have one that works with the given compiler.
394fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 381fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
395 $(AM_V_GEN)rm -f $@-t $@ && \ 382 $(gl_V_at)$(SED_HEADER_STDOUT) \
396 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 383 -e 's|@''GUARD_PREFIX''@|GL|g' \
397 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
398 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 384 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
399 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 385 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
400 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 386 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -415,9 +401,8 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
415 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 401 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
416 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 402 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
417 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 403 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
418 < $(srcdir)/fcntl.in.h; \ 404 $(srcdir)/fcntl.in.h > $@-t
419 } > $@-t && \ 405 $(AM_V_at)mv $@-t $@
420 mv $@-t $@
421MOSTLYCLEANFILES += fcntl.h fcntl.h-t 406MOSTLYCLEANFILES += fcntl.h fcntl.h-t
422 407
423EXTRA_DIST += fcntl.in.h 408EXTRA_DIST += fcntl.in.h
@@ -434,10 +419,11 @@ EXTRA_DIST += fd-hook.h
434 419
435## begin gnulib module fflush 420## begin gnulib module fflush
436 421
422if GL_COND_OBJ_FFLUSH
423libgnu_a_SOURCES += fflush.c
424endif
437 425
438EXTRA_DIST += fflush.c stdio-impl.h 426EXTRA_DIST += stdio-impl.h
439
440EXTRA_libgnu_a_SOURCES += fflush.c
441 427
442## end gnulib module fflush 428## end gnulib module fflush
443 429
@@ -456,35 +442,41 @@ BUILT_SOURCES += $(FLOAT_H)
456# doesn't have one that works with the given compiler. 442# doesn't have one that works with the given compiler.
457if GL_GENERATE_FLOAT_H 443if GL_GENERATE_FLOAT_H
458float.h: float.in.h $(top_builddir)/config.status 444float.h: float.in.h $(top_builddir)/config.status
459 $(AM_V_GEN)rm -f $@-t $@ && \ 445 $(gl_V_at)$(SED_HEADER_STDOUT) \
460 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 446 -e 's|@''GUARD_PREFIX''@|GL|g' \
461 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
462 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 447 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
463 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 448 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
464 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 449 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
465 -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ 450 -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
466 -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ 451 -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \
467 < $(srcdir)/float.in.h; \ 452 $(srcdir)/float.in.h > $@-t
468 } > $@-t && \ 453 $(AM_V_at)mv $@-t $@
469 mv $@-t $@
470else 454else
471float.h: $(top_builddir)/config.status 455float.h: $(top_builddir)/config.status
472 rm -f $@ 456 rm -f $@
473endif 457endif
474MOSTLYCLEANFILES += float.h float.h-t 458MOSTLYCLEANFILES += float.h float.h-t
475 459
476EXTRA_DIST += float.c float.in.h itold.c 460if GL_COND_OBJ_FLOAT
461libgnu_a_SOURCES += float.c
462endif
463if GL_COND_OBJ_ITOLD
464libgnu_a_SOURCES += itold.c
465endif
477 466
478EXTRA_libgnu_a_SOURCES += float.c itold.c 467EXTRA_DIST += float.in.h
479 468
480## end gnulib module float 469## end gnulib module float
481 470
482## begin gnulib module floorf 471## begin gnulib module floorf
483 472
473if GL_COND_OBJ_FLOORF
474libgnu_a_SOURCES += floorf.c
475endif
484 476
485EXTRA_DIST += floor.c floorf.c 477EXTRA_DIST += floor.c
486 478
487EXTRA_libgnu_a_SOURCES += floor.c floorf.c 479EXTRA_libgnu_a_SOURCES += floor.c
488 480
489## end gnulib module floorf 481## end gnulib module floorf
490 482
@@ -508,10 +500,11 @@ EXTRA_libgnu_a_SOURCES += fopen.c
508 500
509## begin gnulib module fpurge 501## begin gnulib module fpurge
510 502
503if GL_COND_OBJ_FPURGE
504libgnu_a_SOURCES += fpurge.c
505endif
511 506
512EXTRA_DIST += fpurge.c stdio-impl.h 507EXTRA_DIST += stdio-impl.h
513
514EXTRA_libgnu_a_SOURCES += fpurge.c
515 508
516## end gnulib module fpurge 509## end gnulib module fpurge
517 510
@@ -525,118 +518,139 @@ EXTRA_DIST += freading.h stdio-impl.h
525 518
526## begin gnulib module free-posix 519## begin gnulib module free-posix
527 520
528 521if GL_COND_OBJ_FREE
529EXTRA_DIST += free.c 522libgnu_a_SOURCES += free.c
530 523endif
531EXTRA_libgnu_a_SOURCES += free.c
532 524
533## end gnulib module free-posix 525## end gnulib module free-posix
534 526
535## begin gnulib module fseek 527## begin gnulib module fseek
536 528
537 529if GL_COND_OBJ_FSEEK
538EXTRA_DIST += fseek.c 530libgnu_a_SOURCES += fseek.c
539 531endif
540EXTRA_libgnu_a_SOURCES += fseek.c
541 532
542## end gnulib module fseek 533## end gnulib module fseek
543 534
544## begin gnulib module fseeko 535## begin gnulib module fseeko
545 536
537if GL_COND_OBJ_FSEEKO
538libgnu_a_SOURCES += fseeko.c
539endif
546 540
547EXTRA_DIST += fseeko.c stdio-impl.h 541EXTRA_DIST += stdio-impl.h
548
549EXTRA_libgnu_a_SOURCES += fseeko.c
550 542
551## end gnulib module fseeko 543## end gnulib module fseeko
552 544
553## begin gnulib module fstat 545## begin gnulib module fstat
554 546
547if GL_COND_OBJ_FSTAT
548libgnu_a_SOURCES += fstat.c
549endif
555 550
556EXTRA_DIST += fstat.c stat-w32.c stat-w32.h 551EXTRA_DIST += stat-w32.c stat-w32.h
557 552
558EXTRA_libgnu_a_SOURCES += fstat.c stat-w32.c 553EXTRA_libgnu_a_SOURCES += stat-w32.c
559 554
560## end gnulib module fstat 555## end gnulib module fstat
561 556
562## begin gnulib module fsusage 557## begin gnulib module fsusage
563 558
559if GL_COND_OBJ_FSUSAGE
560libgnu_a_SOURCES += fsusage.c
561endif
564 562
565EXTRA_DIST += fsusage.c fsusage.h 563EXTRA_DIST += fsusage.h
566
567EXTRA_libgnu_a_SOURCES += fsusage.c
568 564
569## end gnulib module fsusage 565## end gnulib module fsusage
570 566
571## begin gnulib module ftell 567## begin gnulib module ftell
572 568
573 569if GL_COND_OBJ_FTELL
574EXTRA_DIST += ftell.c 570libgnu_a_SOURCES += ftell.c
575 571endif
576EXTRA_libgnu_a_SOURCES += ftell.c
577 572
578## end gnulib module ftell 573## end gnulib module ftell
579 574
580## begin gnulib module ftello 575## begin gnulib module ftello
581 576
577if GL_COND_OBJ_FTELLO
578libgnu_a_SOURCES += ftello.c
579endif
582 580
583EXTRA_DIST += ftello.c stdio-impl.h 581EXTRA_DIST += stdio-impl.h
584
585EXTRA_libgnu_a_SOURCES += ftello.c
586 582
587## end gnulib module ftello 583## end gnulib module ftello
588 584
589## begin gnulib module getaddrinfo 585## begin gnulib module gen-header
590 586
587# In 'sed', replace the pattern space with a "DO NOT EDIT" comment.
588SED_HEADER_NOEDIT = s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,
591 589
592EXTRA_DIST += gai_strerror.c getaddrinfo.c 590# '$(SED_HEADER_STDOUT) -e "..."' runs 'sed' but first outputs "DO NOT EDIT".
591SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e 1G
593 592
594EXTRA_libgnu_a_SOURCES += gai_strerror.c getaddrinfo.c 593# '$(SED_HEADER_TO_AT_t) FILE' copies FILE to $@-t, prepending a leading
594# "DO_NOT_EDIT". Although this could be done more simply via:
595# SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) > $@-t
596# the -n and 'w' avoid a fork+exec, at least when GNU Make is used.
597SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t'
595 598
596## end gnulib module getaddrinfo 599# Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that
600gl_V_at = $(AM_V_GEN)
597 601
598## begin gnulib module getdelim 602## end gnulib module gen-header
599 603
604## begin gnulib module getaddrinfo
600 605
601EXTRA_DIST += getdelim.c 606if GL_COND_OBJ_GETADDRINFO
607libgnu_a_SOURCES += getaddrinfo.c
608endif
609if GL_COND_OBJ_GAI_STRERROR
610libgnu_a_SOURCES += gai_strerror.c
611endif
602 612
603EXTRA_libgnu_a_SOURCES += getdelim.c 613## end gnulib module getaddrinfo
604 614
605## end gnulib module getdelim 615## begin gnulib module getdelim
606 616
607## begin gnulib module getdtablesize 617if GL_COND_OBJ_GETDELIM
618libgnu_a_SOURCES += getdelim.c
619endif
608 620
621## end gnulib module getdelim
609 622
610EXTRA_DIST += getdtablesize.c 623## begin gnulib module getdtablesize
611 624
612EXTRA_libgnu_a_SOURCES += getdtablesize.c 625if GL_COND_OBJ_GETDTABLESIZE
626libgnu_a_SOURCES += getdtablesize.c
627endif
613 628
614## end gnulib module getdtablesize 629## end gnulib module getdtablesize
615 630
616## begin gnulib module gethostname 631## begin gnulib module gethostname
617 632
633if GL_COND_OBJ_GETHOSTNAME
634libgnu_a_SOURCES += gethostname.c
635endif
618 636
619EXTRA_DIST += gethostname.c w32sock.h 637EXTRA_DIST += w32sock.h
620
621EXTRA_libgnu_a_SOURCES += gethostname.c
622 638
623## end gnulib module gethostname 639## end gnulib module gethostname
624 640
625## begin gnulib module getline 641## begin gnulib module getline
626 642
627 643if GL_COND_OBJ_GETLINE
628EXTRA_DIST += getline.c 644libgnu_a_SOURCES += getline.c
629 645endif
630EXTRA_libgnu_a_SOURCES += getline.c
631 646
632## end gnulib module getline 647## end gnulib module getline
633 648
634## begin gnulib module getloadavg 649## begin gnulib module getloadavg
635 650
636 651if GL_COND_OBJ_GETLOADAVG
637EXTRA_DIST += getloadavg.c 652libgnu_a_SOURCES += getloadavg.c
638 653endif
639EXTRA_libgnu_a_SOURCES += getloadavg.c
640 654
641## end gnulib module getloadavg 655## end gnulib module getloadavg
642 656
@@ -646,33 +660,41 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
646 660
647# We need the following in order to create <getopt.h> when the system 661# We need the following in order to create <getopt.h> when the system
648# doesn't have one that works with the given compiler. 662# doesn't have one that works with the given compiler.
663if GL_GENERATE_GETOPT_H
649getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) 664getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
650 $(AM_V_GEN)rm -f $@-t $@ && \ 665 $(gl_V_at)$(SED_HEADER_STDOUT) \
651 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 666 -e 's|@''GUARD_PREFIX''@|GL|g' \
652 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
653 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ 667 -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
654 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 668 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
655 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 669 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
656 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 670 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
657 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ 671 -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
658 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 672 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
659 < $(srcdir)/getopt.in.h; \ 673 $(srcdir)/getopt.in.h > $@-t
660 } > $@-t && \ 674 $(AM_V_at)mv $@-t $@
661 mv -f $@-t $@ 675else
676getopt.h: $(top_builddir)/config.status
677 rm -f $@
678endif
662 679
680if GL_GENERATE_GETOPT_CDEFS_H
663getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status 681getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
664 $(AM_V_GEN)rm -f $@-t $@ && \ 682 $(AM_V_GEN)$(SED_HEADER_STDOUT) \
665 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 683 -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
666 sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ 684 $(srcdir)/getopt-cdefs.in.h > $@-t
667 < $(srcdir)/getopt-cdefs.in.h; \ 685 $(AM_V_at)mv $@-t $@
668 } > $@-t && \ 686else
669 mv -f $@-t $@ 687getopt-cdefs.h: $(top_builddir)/config.status
688 rm -f $@
689endif
670 690
671MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t 691MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t
672 692
673EXTRA_DIST += 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 693if GL_COND_OBJ_GETOPT
694libgnu_a_SOURCES += getopt.c getopt1.c
695endif
674 696
675EXTRA_libgnu_a_SOURCES += getopt.c getopt1.c 697EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h getopt.in.h getopt_int.h
676 698
677## end gnulib module getopt-posix 699## end gnulib module getopt-posix
678 700
@@ -744,17 +766,16 @@ libgnu_a_SOURCES += idx.h
744 766
745## begin gnulib module inet_ntop 767## begin gnulib module inet_ntop
746 768
747 769if GL_COND_OBJ_INET_NTOP
748EXTRA_DIST += inet_ntop.c 770libgnu_a_SOURCES += inet_ntop.c
749 771endif
750EXTRA_libgnu_a_SOURCES += inet_ntop.c
751 772
752## end gnulib module inet_ntop 773## end gnulib module inet_ntop
753 774
754## begin gnulib module intprops 775## begin gnulib module intprops
755 776
756 777
757EXTRA_DIST += intprops.h 778EXTRA_DIST += intprops-internal.h intprops.h
758 779
759## end gnulib module intprops 780## end gnulib module intprops
760 781
@@ -765,9 +786,8 @@ BUILT_SOURCES += inttypes.h
765# We need the following in order to create <inttypes.h> when the system 786# We need the following in order to create <inttypes.h> when the system
766# doesn't have one that works with the given compiler. 787# doesn't have one that works with the given compiler.
767inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) 788inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
768 $(AM_V_GEN)rm -f $@-t $@ && \ 789 $(gl_V_at)$(SED_HEADER_STDOUT) \
769 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 790 -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
770 sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
771 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 791 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
772 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 792 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
773 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 793 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -792,9 +812,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
792 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 812 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
793 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 813 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
794 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 814 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
795 < $(srcdir)/inttypes.in.h; \ 815 $(srcdir)/inttypes.in.h > $@-t
796 } > $@-t && \ 816 $(AM_V_at)mv $@-t $@
797 mv $@-t $@
798MOSTLYCLEANFILES += inttypes.h inttypes.h-t 817MOSTLYCLEANFILES += inttypes.h inttypes.h-t
799 818
800EXTRA_DIST += inttypes.in.h 819EXTRA_DIST += inttypes.in.h
@@ -808,9 +827,8 @@ BUILT_SOURCES += langinfo.h
808# We need the following in order to create an empty placeholder for 827# We need the following in order to create an empty placeholder for
809# <langinfo.h> when the system doesn't have one. 828# <langinfo.h> when the system doesn't have one.
810langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) 829langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
811 $(AM_V_GEN)rm -f $@-t $@ && \ 830 $(gl_V_at)$(SED_HEADER_STDOUT) \
812 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 831 -e 's|@''GUARD_PREFIX''@|GL|g' \
813 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
814 -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ 832 -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
815 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 833 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
816 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 834 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@@ -826,9 +844,8 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
826 -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ 844 -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
827 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 845 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
828 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 846 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
829 < $(srcdir)/langinfo.in.h; \ 847 $(srcdir)/langinfo.in.h > $@-t
830 } > $@-t && \ 848 $(AM_V_at)mv $@-t $@
831 mv $@-t $@
832MOSTLYCLEANFILES += langinfo.h langinfo.h-t 849MOSTLYCLEANFILES += langinfo.h langinfo.h-t
833 850
834EXTRA_DIST += langinfo.in.h 851EXTRA_DIST += langinfo.in.h
@@ -850,16 +867,14 @@ BUILT_SOURCES += $(LIMITS_H)
850# doesn't have one that is compatible with GNU. 867# doesn't have one that is compatible with GNU.
851if GL_GENERATE_LIMITS_H 868if GL_GENERATE_LIMITS_H
852limits.h: limits.in.h $(top_builddir)/config.status 869limits.h: limits.in.h $(top_builddir)/config.status
853 $(AM_V_GEN)rm -f $@-t $@ && \ 870 $(gl_V_at)$(SED_HEADER_STDOUT) \
854 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 871 -e 's|@''GUARD_PREFIX''@|GL|g' \
855 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
856 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 872 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
857 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 873 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
858 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 874 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
859 -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \ 875 -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
860 < $(srcdir)/limits.in.h; \ 876 $(srcdir)/limits.in.h > $@-t
861 } > $@-t && \ 877 $(AM_V_at)mv $@-t $@
862 mv $@-t $@
863else 878else
864limits.h: $(top_builddir)/config.status 879limits.h: $(top_builddir)/config.status
865 rm -f $@ 880 rm -f $@
@@ -885,9 +900,8 @@ BUILT_SOURCES += locale.h
885# We need the following in order to create <locale.h> when the system 900# We need the following in order to create <locale.h> when the system
886# doesn't have one that provides all definitions. 901# doesn't have one that provides all definitions.
887locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 902locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
888 $(AM_V_GEN)rm -f $@-t $@ && \ 903 $(gl_V_at)$(SED_HEADER_STDOUT) \
889 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 904 -e 's|@''GUARD_PREFIX''@|GL|g' \
890 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
891 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 905 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
892 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 906 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
893 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 907 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -911,9 +925,8 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
911 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 925 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
912 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 926 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
913 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 927 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
914 < $(srcdir)/locale.in.h; \ 928 $(srcdir)/locale.in.h > $@-t
915 } > $@-t && \ 929 $(AM_V_at)mv $@-t $@
916 mv $@-t $@
917MOSTLYCLEANFILES += locale.h locale.h-t 930MOSTLYCLEANFILES += locale.h locale.h-t
918 931
919EXTRA_DIST += locale.in.h 932EXTRA_DIST += locale.in.h
@@ -922,10 +935,9 @@ EXTRA_DIST += locale.in.h
922 935
923## begin gnulib module localeconv 936## begin gnulib module localeconv
924 937
925 938if GL_COND_OBJ_LOCALECONV
926EXTRA_DIST += localeconv.c 939libgnu_a_SOURCES += localeconv.c
927 940endif
928EXTRA_libgnu_a_SOURCES += localeconv.c
929 941
930## end gnulib module localeconv 942## end gnulib module localeconv
931 943
@@ -937,10 +949,9 @@ libgnu_a_SOURCES += glthread/lock.h glthread/lock.c
937 949
938## begin gnulib module lseek 950## begin gnulib module lseek
939 951
940 952if GL_COND_OBJ_LSEEK
941EXTRA_DIST += lseek.c 953libgnu_a_SOURCES += lseek.c
942 954endif
943EXTRA_libgnu_a_SOURCES += lseek.c
944 955
945## end gnulib module lseek 956## end gnulib module lseek
946 957
@@ -978,9 +989,8 @@ libgnu_a_SOURCES += math.c
978# We need the following in order to create <math.h> when the system 989# We need the following in order to create <math.h> when the system
979# doesn't have one that works with the given compiler. 990# doesn't have one that works with the given compiler.
980math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 991math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
981 $(AM_V_GEN)rm -f $@-t $@ && \ 992 $(gl_V_at)$(SED_HEADER_STDOUT) \
982 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 993 -e 's|@''GUARD_PREFIX''@|GL|g' \
983 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
984 -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \ 994 -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
985 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 995 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
986 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 996 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1267,9 +1277,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
1267 -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ 1277 -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
1268 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 1278 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1269 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 1279 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1270 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 1280 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1271 } > $@-t && \ 1281 > $@-t
1272 mv $@-t $@ 1282 $(AM_V_at)mv $@-t $@
1273MOSTLYCLEANFILES += math.h math.h-t 1283MOSTLYCLEANFILES += math.h math.h-t
1274 1284
1275EXTRA_DIST += math.in.h 1285EXTRA_DIST += math.in.h
@@ -1278,37 +1288,41 @@ EXTRA_DIST += math.in.h
1278 1288
1279## begin gnulib module mbrtowc 1289## begin gnulib module mbrtowc
1280 1290
1291if GL_COND_OBJ_MBRTOWC
1292libgnu_a_SOURCES += mbrtowc.c
1293endif
1281 1294
1282EXTRA_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 1295EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbtowc-lock.c mbtowc-lock.h windows-initguard.h
1283 1296
1284EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c 1297EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbtowc-lock.c
1285 1298
1286## end gnulib module mbrtowc 1299## end gnulib module mbrtowc
1287 1300
1288## begin gnulib module mbsinit 1301## begin gnulib module mbsinit
1289 1302
1290 1303if GL_COND_OBJ_MBSINIT
1291EXTRA_DIST += mbsinit.c 1304libgnu_a_SOURCES += mbsinit.c
1292 1305endif
1293EXTRA_libgnu_a_SOURCES += mbsinit.c
1294 1306
1295## end gnulib module mbsinit 1307## end gnulib module mbsinit
1296 1308
1297## begin gnulib module mbtowc 1309## begin gnulib module mbtowc
1298 1310
1311if GL_COND_OBJ_MBTOWC
1312libgnu_a_SOURCES += mbtowc.c
1313endif
1299 1314
1300EXTRA_DIST += mbtowc-impl.h mbtowc.c 1315EXTRA_DIST += mbtowc-impl.h
1301
1302EXTRA_libgnu_a_SOURCES += mbtowc.c
1303 1316
1304## end gnulib module mbtowc 1317## end gnulib module mbtowc
1305 1318
1306## begin gnulib module memchr 1319## begin gnulib module memchr
1307 1320
1321if GL_COND_OBJ_MEMCHR
1322libgnu_a_SOURCES += memchr.c
1323endif
1308 1324
1309EXTRA_DIST += memchr.c memchr.valgrind 1325EXTRA_DIST += memchr.valgrind
1310
1311EXTRA_libgnu_a_SOURCES += memchr.c
1312 1326
1313## end gnulib module memchr 1327## end gnulib module memchr
1314 1328
@@ -1338,28 +1352,31 @@ EXTRA_libgnu_a_SOURCES += mktime.c
1338 1352
1339## begin gnulib module mountlist 1353## begin gnulib module mountlist
1340 1354
1355if GL_COND_OBJ_MOUNTLIST
1356libgnu_a_SOURCES += mountlist.c
1357endif
1341 1358
1342EXTRA_DIST += mountlist.c mountlist.h 1359EXTRA_DIST += mountlist.h
1343
1344EXTRA_libgnu_a_SOURCES += mountlist.c
1345 1360
1346## end gnulib module mountlist 1361## end gnulib module mountlist
1347 1362
1348## begin gnulib module msvc-inval 1363## begin gnulib module msvc-inval
1349 1364
1365if GL_COND_OBJ_MSVC_INVAL
1366libgnu_a_SOURCES += msvc-inval.c
1367endif
1350 1368
1351EXTRA_DIST += msvc-inval.c msvc-inval.h 1369EXTRA_DIST += msvc-inval.h
1352
1353EXTRA_libgnu_a_SOURCES += msvc-inval.c
1354 1370
1355## end gnulib module msvc-inval 1371## end gnulib module msvc-inval
1356 1372
1357## begin gnulib module msvc-nothrow 1373## begin gnulib module msvc-nothrow
1358 1374
1375if GL_COND_OBJ_MSVC_NOTHROW
1376libgnu_a_SOURCES += msvc-nothrow.c
1377endif
1359 1378
1360EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h 1379EXTRA_DIST += msvc-nothrow.h
1361
1362EXTRA_libgnu_a_SOURCES += msvc-nothrow.c
1363 1380
1364## end gnulib module msvc-nothrow 1381## end gnulib module msvc-nothrow
1365 1382
@@ -1370,9 +1387,8 @@ BUILT_SOURCES += netdb.h
1370# We need the following in order to create <netdb.h> when the system 1387# We need the following in order to create <netdb.h> when the system
1371# doesn't have one that works with the given compiler. 1388# doesn't have one that works with the given compiler.
1372netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1389netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1373 $(AM_V_GEN)rm -f $@-t $@ && \ 1390 $(gl_V_at)$(SED_HEADER_STDOUT) \
1374 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1391 -e 's|@''GUARD_PREFIX''@|GL|g' \
1375 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1376 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1392 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1377 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1393 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1378 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1394 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1389,9 +1405,8 @@ netdb.h: netdb.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1389 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 1405 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1390 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 1406 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1391 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 1407 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1392 < $(srcdir)/netdb.in.h; \ 1408 $(srcdir)/netdb.in.h > $@-t
1393 } > $@-t && \ 1409 $(AM_V_at)mv $@-t $@
1394 mv $@-t $@
1395MOSTLYCLEANFILES += netdb.h netdb.h-t 1410MOSTLYCLEANFILES += netdb.h netdb.h-t
1396 1411
1397EXTRA_DIST += netdb.in.h 1412EXTRA_DIST += netdb.in.h
@@ -1406,18 +1421,16 @@ BUILT_SOURCES += $(NETINET_IN_H)
1406# doesn't have one. 1421# doesn't have one.
1407if GL_GENERATE_NETINET_IN_H 1422if GL_GENERATE_NETINET_IN_H
1408netinet/in.h: netinet_in.in.h $(top_builddir)/config.status 1423netinet/in.h: netinet_in.in.h $(top_builddir)/config.status
1409 $(AM_V_at)$(MKDIR_P) netinet 1424 $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet'
1410 $(AM_V_GEN)rm -f $@-t $@ && \ 1425 $(AM_V_at)$(SED_HEADER_STDOUT) \
1411 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1426 -e 's|@''GUARD_PREFIX''@|GL|g' \
1412 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1413 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1427 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1414 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1428 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1415 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1429 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
1416 -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ 1430 -e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
1417 -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ 1431 -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
1418 < $(srcdir)/netinet_in.in.h; \ 1432 $(srcdir)/netinet_in.in.h > $@-t
1419 } > $@-t && \ 1433 $(AM_V_at)mv $@-t $@
1420 mv $@-t $@
1421else 1434else
1422netinet/in.h: $(top_builddir)/config.status 1435netinet/in.h: $(top_builddir)/config.status
1423 rm -f $@ 1436 rm -f $@
@@ -1431,19 +1444,22 @@ EXTRA_DIST += netinet_in.in.h
1431 1444
1432## begin gnulib module nl_langinfo 1445## begin gnulib module nl_langinfo
1433 1446
1447if GL_COND_OBJ_NL_LANGINFO
1448libgnu_a_SOURCES += nl_langinfo.c
1449endif
1450if GL_COND_OBJ_NL_LANGINFO_LOCK
1451libgnu_a_SOURCES += nl_langinfo-lock.c
1452endif
1434 1453
1435EXTRA_DIST += nl_langinfo-lock.c nl_langinfo.c windows-initguard.h 1454EXTRA_DIST += windows-initguard.h
1436
1437EXTRA_libgnu_a_SOURCES += nl_langinfo-lock.c nl_langinfo.c
1438 1455
1439## end gnulib module nl_langinfo 1456## end gnulib module nl_langinfo
1440 1457
1441## begin gnulib module open 1458## begin gnulib module open
1442 1459
1443 1460if GL_COND_OBJ_OPEN
1444EXTRA_DIST += open.c 1461libgnu_a_SOURCES += open.c
1445 1462endif
1446EXTRA_libgnu_a_SOURCES += open.c
1447 1463
1448## end gnulib module open 1464## end gnulib module open
1449 1465
@@ -1474,38 +1490,40 @@ EXTRA_libgnu_a_SOURCES += realloc.c
1474 1490
1475## begin gnulib module reallocarray 1491## begin gnulib module reallocarray
1476 1492
1477 1493if GL_COND_OBJ_REALLOCARRAY
1478EXTRA_DIST += reallocarray.c 1494libgnu_a_SOURCES += reallocarray.c
1479 1495endif
1480EXTRA_libgnu_a_SOURCES += reallocarray.c
1481 1496
1482## end gnulib module reallocarray 1497## end gnulib module reallocarray
1483 1498
1484## begin gnulib module regex 1499## begin gnulib module regex
1485 1500
1501if GL_COND_OBJ_REGEX
1502libgnu_a_SOURCES += regex.c
1503endif
1486 1504
1487EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c 1505EXTRA_DIST += regcomp.c regex.h regex_internal.c regex_internal.h regexec.c
1488 1506
1489EXTRA_libgnu_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c 1507EXTRA_libgnu_a_SOURCES += regcomp.c regex_internal.c regexec.c
1490 1508
1491## end gnulib module regex 1509## end gnulib module regex
1492 1510
1493## begin gnulib module setenv 1511## begin gnulib module setenv
1494 1512
1495 1513if GL_COND_OBJ_SETENV
1496EXTRA_DIST += setenv.c 1514libgnu_a_SOURCES += setenv.c
1497 1515endif
1498EXTRA_libgnu_a_SOURCES += setenv.c
1499 1516
1500## end gnulib module setenv 1517## end gnulib module setenv
1501 1518
1502## begin gnulib module setlocale-null 1519## begin gnulib module setlocale-null
1503 1520
1504libgnu_a_SOURCES += setlocale_null.c 1521libgnu_a_SOURCES += setlocale_null.c
1522if GL_COND_OBJ_SETLOCALE_LOCK
1523libgnu_a_SOURCES += setlocale-lock.c
1524endif
1505 1525
1506EXTRA_DIST += setlocale-lock.c setlocale_null.h windows-initguard.h 1526EXTRA_DIST += setlocale_null.h windows-initguard.h
1507
1508EXTRA_libgnu_a_SOURCES += setlocale-lock.c
1509 1527
1510## end gnulib module setlocale-null 1528## end gnulib module setlocale-null
1511 1529
@@ -1582,10 +1600,13 @@ EXTRA_DIST += w32sock.h
1582 1600
1583## begin gnulib module stat 1601## begin gnulib module stat
1584 1602
1603if GL_COND_OBJ_STAT
1604libgnu_a_SOURCES += stat.c
1605endif
1585 1606
1586EXTRA_DIST += stat-w32.c stat-w32.h stat.c 1607EXTRA_DIST += stat-w32.c stat-w32.h
1587 1608
1588EXTRA_libgnu_a_SOURCES += stat-w32.c stat.c 1609EXTRA_libgnu_a_SOURCES += stat-w32.c
1589 1610
1590## end gnulib module stat 1611## end gnulib module stat
1591 1612
@@ -1605,11 +1626,8 @@ BUILT_SOURCES += $(STDALIGN_H)
1605# doesn't have one that works. 1626# doesn't have one that works.
1606if GL_GENERATE_STDALIGN_H 1627if GL_GENERATE_STDALIGN_H
1607stdalign.h: stdalign.in.h $(top_builddir)/config.status 1628stdalign.h: stdalign.in.h $(top_builddir)/config.status
1608 $(AM_V_GEN)rm -f $@-t $@ && \ 1629 $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
1609 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1630 $(AM_V_at)mv $@-t $@
1610 cat $(srcdir)/stdalign.in.h; \
1611 } > $@-t && \
1612 mv $@-t $@
1613else 1631else
1614stdalign.h: $(top_builddir)/config.status 1632stdalign.h: $(top_builddir)/config.status
1615 rm -f $@ 1633 rm -f $@
@@ -1628,11 +1646,10 @@ BUILT_SOURCES += $(STDBOOL_H)
1628# doesn't have one that works. 1646# doesn't have one that works.
1629if GL_GENERATE_STDBOOL_H 1647if GL_GENERATE_STDBOOL_H
1630stdbool.h: stdbool.in.h $(top_builddir)/config.status 1648stdbool.h: stdbool.in.h $(top_builddir)/config.status
1631 $(AM_V_GEN)rm -f $@-t $@ && \ 1649 $(gl_V_at)$(SED_HEADER_STDOUT) \
1632 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1650 -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
1633 sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ 1651 $(srcdir)/stdbool.in.h > $@-t
1634 } > $@-t && \ 1652 $(AM_V_at)mv $@-t $@
1635 mv $@-t $@
1636else 1653else
1637stdbool.h: $(top_builddir)/config.status 1654stdbool.h: $(top_builddir)/config.status
1638 rm -f $@ 1655 rm -f $@
@@ -1643,6 +1660,27 @@ EXTRA_DIST += stdbool.in.h
1643 1660
1644## end gnulib module stdbool 1661## end gnulib module stdbool
1645 1662
1663## begin gnulib module stdckdint
1664
1665BUILT_SOURCES += $(STDCKDINT_H)
1666
1667# We need the following in order to create <stdckdint.h> when the system
1668# doesn't have one that works with the given compiler.
1669if GL_GENERATE_STDCKDINT_H
1670stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
1671 $(gl_V_at)$(SED_HEADER_STDOUT) \
1672 $(srcdir)/stdckdint.in.h > $@-t
1673 $(AM_V_at)mv $@-t $@
1674else
1675stdckdint.h: $(top_builddir)/config.status
1676 rm -f $@
1677endif
1678MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t
1679
1680EXTRA_DIST += intprops-internal.h stdckdint.in.h
1681
1682## end gnulib module stdckdint
1683
1646## begin gnulib module stddef 1684## begin gnulib module stddef
1647 1685
1648BUILT_SOURCES += $(STDDEF_H) 1686BUILT_SOURCES += $(STDDEF_H)
@@ -1651,9 +1689,8 @@ BUILT_SOURCES += $(STDDEF_H)
1651# doesn't have one that works with the given compiler. 1689# doesn't have one that works with the given compiler.
1652if GL_GENERATE_STDDEF_H 1690if GL_GENERATE_STDDEF_H
1653stddef.h: stddef.in.h $(top_builddir)/config.status 1691stddef.h: stddef.in.h $(top_builddir)/config.status
1654 $(AM_V_GEN)rm -f $@-t $@ && \ 1692 $(gl_V_at)$(SED_HEADER_STDOUT) \
1655 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1693 -e 's|@''GUARD_PREFIX''@|GL|g' \
1656 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1657 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1694 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1658 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1695 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1659 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1696 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1661,9 +1698,8 @@ stddef.h: stddef.in.h $(top_builddir)/config.status
1661 -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ 1698 -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
1662 -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ 1699 -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
1663 -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ 1700 -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
1664 < $(srcdir)/stddef.in.h; \ 1701 $(srcdir)/stddef.in.h > $@-t
1665 } > $@-t && \ 1702 $(AM_V_at)mv $@-t $@
1666 mv $@-t $@
1667else 1703else
1668stddef.h: $(top_builddir)/config.status 1704stddef.h: $(top_builddir)/config.status
1669 rm -f $@ 1705 rm -f $@
@@ -1682,9 +1718,8 @@ BUILT_SOURCES += $(STDINT_H)
1682# doesn't have one that works with the given compiler. 1718# doesn't have one that works with the given compiler.
1683if GL_GENERATE_STDINT_H 1719if GL_GENERATE_STDINT_H
1684stdint.h: stdint.in.h $(top_builddir)/config.status 1720stdint.h: stdint.in.h $(top_builddir)/config.status
1685 $(AM_V_GEN)rm -f $@-t $@ && \ 1721 $(gl_V_at)$(SED_HEADER_STDOUT) \
1686 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 1722 -e 's|@''GUARD_PREFIX''@|GL|g' \
1687 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1688 -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ 1723 -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
1689 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1724 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1690 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1725 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@@ -1711,9 +1746,8 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
1711 -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ 1746 -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
1712 -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ 1747 -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
1713 -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \ 1748 -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRIDE_WINT_T)/g' \
1714 < $(srcdir)/stdint.in.h; \ 1749 $(srcdir)/stdint.in.h > $@-t
1715 } > $@-t && \ 1750 $(AM_V_at)mv $@-t $@
1716 mv $@-t $@
1717else 1751else
1718stdint.h: $(top_builddir)/config.status 1752stdint.h: $(top_builddir)/config.status
1719 rm -f $@ 1753 rm -f $@
@@ -1731,9 +1765,8 @@ BUILT_SOURCES += stdio.h
1731# We need the following in order to create <stdio.h> when the system 1765# We need the following in order to create <stdio.h> when the system
1732# doesn't have one that works with the given compiler. 1766# doesn't have one that works with the given compiler.
1733stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1767stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1734 $(AM_V_GEN)rm -f $@-t $@ && \ 1768 $(gl_V_at)$(SED_HEADER_STDOUT) \
1735 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1769 -e 's|@''GUARD_PREFIX''@|GL|g' \
1736 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1737 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1770 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1738 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1771 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1739 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1772 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1745,6 +1778,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1745 -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ 1778 -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \
1746 -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ 1779 -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \
1747 -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ 1780 -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \
1781 -e 's/@''GNULIB_FOPEN_GNU''@/$(GL_GNULIB_FOPEN_GNU)/g' \
1748 -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ 1782 -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \
1749 -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ 1783 -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \
1750 -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ 1784 -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \
@@ -1820,6 +1854,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1820 -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ 1854 -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
1821 -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ 1855 -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
1822 -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ 1856 -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
1857 -e 's|@''REPLACE_FOPEN_FOR_FOPEN_GNU''@|$(REPLACE_FOPEN_FOR_FOPEN_GNU)|g' \
1823 -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ 1858 -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
1824 -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ 1859 -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
1825 -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ 1860 -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
@@ -1850,11 +1885,18 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
1850 -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ 1885 -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
1851 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 1886 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1852 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 1887 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1853 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 1888 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1854 } > $@-t && \ 1889 > $@-t
1855 mv $@-t $@ 1890 $(AM_V_at)mv $@-t $@
1856MOSTLYCLEANFILES += stdio.h stdio.h-t 1891MOSTLYCLEANFILES += stdio.h stdio.h-t
1857 1892
1893if GL_COND_OBJ_STDIO_READ
1894libgnu_a_SOURCES += stdio-read.c
1895endif
1896if GL_COND_OBJ_STDIO_WRITE
1897libgnu_a_SOURCES += stdio-write.c
1898endif
1899
1858EXTRA_DIST += stdio.in.h 1900EXTRA_DIST += stdio.in.h
1859 1901
1860## end gnulib module stdio 1902## end gnulib module stdio
@@ -1867,9 +1909,8 @@ BUILT_SOURCES += stdlib.h
1867# doesn't have one that works with the given compiler. 1909# doesn't have one that works with the given compiler.
1868stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ 1910stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1869 $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 1911 $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
1870 $(AM_V_GEN)rm -f $@-t $@ && \ 1912 $(gl_V_at)$(SED_HEADER_STDOUT) \
1871 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 1913 -e 's|@''GUARD_PREFIX''@|GL|g' \
1872 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
1873 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 1914 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
1874 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 1915 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
1875 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 1916 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -1877,12 +1918,14 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1877 -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ 1918 -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \
1878 -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ 1919 -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \
1879 -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ 1920 -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \
1921 -e 's/@''GNULIB_CALLOC_GNU''@/$(GL_GNULIB_CALLOC_GNU)/g' \
1880 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ 1922 -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \
1881 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \ 1923 -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
1882 -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ 1924 -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
1883 -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ 1925 -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
1884 -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ 1926 -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
1885 -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ 1927 -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
1928 -e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \
1886 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ 1929 -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
1887 -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ 1930 -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
1888 -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ 1931 -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
@@ -1898,6 +1941,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1898 -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ 1941 -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
1899 -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ 1942 -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
1900 -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ 1943 -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
1944 -e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \
1901 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ 1945 -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \
1902 -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ 1946 -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \
1903 -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ 1947 -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \
@@ -1964,11 +2008,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1964 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ 2008 -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
1965 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ 2009 -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
1966 -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \ 2010 -e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
1967 -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ 2011 -e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
2012 -e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
1968 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ 2013 -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
1969 -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \ 2014 -e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
1970 -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \ 2015 -e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
1971 -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ 2016 -e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
2017 -e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
1972 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ 2018 -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
1973 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ 2019 -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
1974 -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \ 2020 -e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
@@ -1978,7 +2024,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1978 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ 2024 -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
1979 -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ 2025 -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
1980 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ 2026 -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
1981 -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ 2027 -e 's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \
2028 -e 's|@''REPLACE_REALLOC_FOR_REALLOC_POSIX''@|$(REPLACE_REALLOC_FOR_REALLOC_POSIX)|g' \
1982 -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ 2029 -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \
1983 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ 2030 -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
1984 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ 2031 -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
@@ -1994,9 +2041,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
1994 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2041 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
1995 -e '/definition of _Noreturn/r $(_NORETURN_H)' \ 2042 -e '/definition of _Noreturn/r $(_NORETURN_H)' \
1996 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2043 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
1997 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 2044 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
1998 } > $@-t && \ 2045 > $@-t
1999 mv $@-t $@ 2046 $(AM_V_at)mv $@-t $@
2000MOSTLYCLEANFILES += stdlib.h stdlib.h-t 2047MOSTLYCLEANFILES += stdlib.h stdlib.h-t
2001 2048
2002EXTRA_DIST += stdlib.in.h 2049EXTRA_DIST += stdlib.in.h
@@ -2005,10 +2052,12 @@ EXTRA_DIST += stdlib.in.h
2005 2052
2006## begin gnulib module strcase 2053## begin gnulib module strcase
2007 2054
2008 2055if GL_COND_OBJ_STRCASECMP
2009EXTRA_DIST += strcasecmp.c strncasecmp.c 2056libgnu_a_SOURCES += strcasecmp.c
2010 2057endif
2011EXTRA_libgnu_a_SOURCES += strcasecmp.c strncasecmp.c 2058if GL_COND_OBJ_STRNCASECMP
2059libgnu_a_SOURCES += strncasecmp.c
2060endif
2012 2061
2013## end gnulib module strcase 2062## end gnulib module strcase
2014 2063
@@ -2039,19 +2088,19 @@ EXTRA_DIST += streq.h
2039 2088
2040## begin gnulib module strerror 2089## begin gnulib module strerror
2041 2090
2042 2091if GL_COND_OBJ_STRERROR
2043EXTRA_DIST += strerror.c 2092libgnu_a_SOURCES += strerror.c
2044 2093endif
2045EXTRA_libgnu_a_SOURCES += strerror.c
2046 2094
2047## end gnulib module strerror 2095## end gnulib module strerror
2048 2096
2049## begin gnulib module strerror-override 2097## begin gnulib module strerror-override
2050 2098
2099if GL_COND_OBJ_STRERROR_OVERRIDE
2100libgnu_a_SOURCES += strerror-override.c
2101endif
2051 2102
2052EXTRA_DIST += strerror-override.c strerror-override.h 2103EXTRA_DIST += strerror-override.h
2053
2054EXTRA_libgnu_a_SOURCES += strerror-override.c
2055 2104
2056## end gnulib module strerror-override 2105## end gnulib module strerror-override
2057 2106
@@ -2062,9 +2111,8 @@ BUILT_SOURCES += string.h
2062# We need the following in order to create <string.h> when the system 2111# We need the following in order to create <string.h> when the system
2063# doesn't have one that works with the given compiler. 2112# doesn't have one that works with the given compiler.
2064string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 2113string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
2065 $(AM_V_GEN)rm -f $@-t $@ && \ 2114 $(gl_V_at)$(SED_HEADER_STDOUT) \
2066 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 2115 -e 's|@''GUARD_PREFIX''@|GL|g' \
2067 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2068 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2116 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2069 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2117 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2070 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2118 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -2158,10 +2206,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2158 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ 2206 -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
2159 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2207 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2160 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2208 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2161 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 2209 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2162 < $(srcdir)/string.in.h; \ 2210 > $@-t
2163 } > $@-t && \ 2211 $(AM_V_at)mv $@-t $@
2164 mv $@-t $@
2165MOSTLYCLEANFILES += string.h string.h-t 2212MOSTLYCLEANFILES += string.h string.h-t
2166 2213
2167EXTRA_DIST += string.in.h 2214EXTRA_DIST += string.in.h
@@ -2175,9 +2222,8 @@ BUILT_SOURCES += strings.h
2175# We need the following in order to create <strings.h> when the system 2222# We need the following in order to create <strings.h> when the system
2176# doesn't have one that works with the given compiler. 2223# doesn't have one that works with the given compiler.
2177strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) 2224strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
2178 $(AM_V_GEN)rm -f $@-t $@ && \ 2225 $(gl_V_at)$(SED_HEADER_STDOUT) \
2179 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 2226 -e 's|@''GUARD_PREFIX''@|GL|g' \
2180 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2181 -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \ 2227 -e 's|@''HAVE_STRINGS_H''@|$(HAVE_STRINGS_H)|g' \
2182 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2228 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2183 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2229 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@@ -2190,9 +2236,8 @@ strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE
2190 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2236 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2191 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2237 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2192 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 2238 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2193 < $(srcdir)/strings.in.h; \ 2239 $(srcdir)/strings.in.h > $@-t
2194 } > $@-t && \ 2240 $(AM_V_at)mv $@-t $@
2195 mv $@-t $@
2196MOSTLYCLEANFILES += strings.h strings.h-t 2241MOSTLYCLEANFILES += strings.h strings.h-t
2197 2242
2198EXTRA_DIST += strings.in.h 2243EXTRA_DIST += strings.in.h
@@ -2201,10 +2246,9 @@ EXTRA_DIST += strings.in.h
2201 2246
2202## begin gnulib module strsep 2247## begin gnulib module strsep
2203 2248
2204 2249if GL_COND_OBJ_STRSEP
2205EXTRA_DIST += strsep.c 2250libgnu_a_SOURCES += strsep.c
2206 2251endif
2207EXTRA_libgnu_a_SOURCES += strsep.c
2208 2252
2209## end gnulib module strsep 2253## end gnulib module strsep
2210 2254
@@ -2225,10 +2269,9 @@ libgnu_a_SOURCES += sys_socket.c
2225# We need the following in order to create <sys/socket.h> when the system 2269# We need the following in order to create <sys/socket.h> when the system
2226# doesn't have one that works with the given compiler. 2270# doesn't have one that works with the given compiler.
2227sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) 2271sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
2228 $(AM_V_at)$(MKDIR_P) sys 2272 $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
2229 $(AM_V_GEN)rm -f $@-t $@ && \ 2273 $(AM_V_at)$(SED_HEADER_STDOUT) \
2230 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2274 -e 's|@''GUARD_PREFIX''@|GL|g' \
2231 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2232 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2275 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2233 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2276 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2234 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2277 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -2259,9 +2302,8 @@ sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_
2259 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2302 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2260 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2303 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2261 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 2304 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2262 < $(srcdir)/sys_socket.in.h; \ 2305 $(srcdir)/sys_socket.in.h > $@-t
2263 } > $@-t && \ 2306 $(AM_V_at)mv $@-t $@
2264 mv -f $@-t $@
2265MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t 2307MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
2266MOSTLYCLEANDIRS += sys 2308MOSTLYCLEANDIRS += sys
2267 2309
@@ -2276,16 +2318,16 @@ BUILT_SOURCES += sys/stat.h
2276# We need the following in order to create <sys/stat.h> when the system 2318# We need the following in order to create <sys/stat.h> when the system
2277# has one that is incomplete. 2319# has one that is incomplete.
2278sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 2320sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
2279 $(AM_V_at)$(MKDIR_P) sys 2321 $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
2280 $(AM_V_GEN)rm -f $@-t $@ && \ 2322 $(AM_V_at)$(SED_HEADER_STDOUT) \
2281 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2323 -e 's|@''GUARD_PREFIX''@|GL|g' \
2282 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2283 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2324 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2284 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2325 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2285 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2326 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
2286 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ 2327 -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
2287 -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ 2328 -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
2288 -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ 2329 -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \
2330 -e 's/@''GNULIB_CHMOD''@/$(GL_GNULIB_CHMOD)/g' \
2289 -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \ 2331 -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \
2290 -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \ 2332 -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \
2291 -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \ 2333 -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \
@@ -2317,6 +2359,7 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
2317 -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ 2359 -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
2318 -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ 2360 -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
2319 -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ 2361 -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
2362 -e 's|@''REPLACE_CHMOD''@|$(REPLACE_CHMOD)|g' \
2320 -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \ 2363 -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
2321 -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ 2364 -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
2322 -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ 2365 -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
@@ -2332,9 +2375,8 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
2332 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2375 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2333 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2376 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2334 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 2377 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2335 < $(srcdir)/sys_stat.in.h; \ 2378 $(srcdir)/sys_stat.in.h > $@-t
2336 } > $@-t && \ 2379 $(AM_V_at)mv $@-t $@
2337 mv $@-t $@
2338MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t 2380MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
2339MOSTLYCLEANDIRS += sys 2381MOSTLYCLEANDIRS += sys
2340 2382
@@ -2349,19 +2391,17 @@ BUILT_SOURCES += sys/types.h
2349# We need the following in order to create <sys/types.h> when the system 2391# We need the following in order to create <sys/types.h> when the system
2350# doesn't have one that works with the given compiler. 2392# doesn't have one that works with the given compiler.
2351sys/types.h: sys_types.in.h $(top_builddir)/config.status 2393sys/types.h: sys_types.in.h $(top_builddir)/config.status
2352 $(AM_V_at)$(MKDIR_P) sys 2394 $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
2353 $(AM_V_GEN)rm -f $@-t $@ && \ 2395 $(AM_V_at)$(SED_HEADER_STDOUT) \
2354 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2396 -e 's|@''GUARD_PREFIX''@|GL|g' \
2355 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2356 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2397 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2357 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2398 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2358 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2399 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
2359 -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ 2400 -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
2360 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ 2401 -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
2361 -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ 2402 -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
2362 < $(srcdir)/sys_types.in.h; \ 2403 $(srcdir)/sys_types.in.h > $@-t
2363 } > $@-t && \ 2404 $(AM_V_at)mv $@-t $@
2364 mv $@-t $@
2365MOSTLYCLEANFILES += sys/types.h sys/types.h-t 2405MOSTLYCLEANFILES += sys/types.h sys/types.h-t
2366 2406
2367EXTRA_DIST += sys_types.in.h 2407EXTRA_DIST += sys_types.in.h
@@ -2375,18 +2415,16 @@ BUILT_SOURCES += sys/uio.h
2375# We need the following in order to create <sys/uio.h> when the system 2415# We need the following in order to create <sys/uio.h> when the system
2376# doesn't have one that works with the given compiler. 2416# doesn't have one that works with the given compiler.
2377sys/uio.h: sys_uio.in.h $(top_builddir)/config.status 2417sys/uio.h: sys_uio.in.h $(top_builddir)/config.status
2378 $(AM_V_at)$(MKDIR_P) sys 2418 $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
2379 $(AM_V_GEN)rm -f $@-t $@ && \ 2419 $(AM_V_at)$(SED_HEADER_STDOUT) \
2380 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2420 -e 's|@''GUARD_PREFIX''@|GL|g' \
2381 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2382 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2421 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2383 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2422 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2384 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2423 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
2385 -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \ 2424 -e 's|@''NEXT_SYS_UIO_H''@|$(NEXT_SYS_UIO_H)|g' \
2386 -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \ 2425 -e 's|@''HAVE_SYS_UIO_H''@|$(HAVE_SYS_UIO_H)|g' \
2387 < $(srcdir)/sys_uio.in.h; \ 2426 $(srcdir)/sys_uio.in.h > $@-t
2388 } > $@-t && \ 2427 $(AM_V_at)mv $@-t $@
2389 mv -f $@-t $@
2390MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t 2428MOSTLYCLEANFILES += sys/uio.h sys/uio.h-t
2391MOSTLYCLEANDIRS += sys 2429MOSTLYCLEANDIRS += sys
2392 2430
@@ -2407,9 +2445,8 @@ BUILT_SOURCES += time.h
2407# We need the following in order to create <time.h> when the system 2445# We need the following in order to create <time.h> when the system
2408# doesn't have one that works with the given compiler. 2446# doesn't have one that works with the given compiler.
2409time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 2447time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
2410 $(AM_V_GEN)rm -f $@-t $@ && \ 2448 $(gl_V_at)$(SED_HEADER_STDOUT) \
2411 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ 2449 -e 's|@''GUARD_PREFIX''@|GL|g' \
2412 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2413 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2450 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2414 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2451 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2415 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2452 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -2422,6 +2459,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
2422 -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ 2459 -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
2423 -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ 2460 -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
2424 -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ 2461 -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
2462 -e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
2425 -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ 2463 -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \
2426 -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ 2464 -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \
2427 -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ 2465 -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \
@@ -2431,6 +2469,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
2431 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ 2469 -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
2432 -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ 2470 -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
2433 -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \ 2471 -e 's|@''HAVE_TIMESPEC_GET''@|$(HAVE_TIMESPEC_GET)|g' \
2472 -e 's|@''HAVE_TIMESPEC_GETRES''@|$(HAVE_TIMESPEC_GETRES)|g' \
2434 -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ 2473 -e 's|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \
2435 -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \ 2474 -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|g' \
2436 -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ 2475 -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \
@@ -2449,9 +2488,8 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
2449 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2488 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2450 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2489 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2451 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 2490 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2452 < $(srcdir)/time.in.h; \ 2491 $(srcdir)/time.in.h > $@-t
2453 } > $@-t && \ 2492 $(AM_V_at)mv $@-t $@
2454 mv $@-t $@
2455MOSTLYCLEANFILES += time.h time.h-t 2493MOSTLYCLEANFILES += time.h time.h-t
2456 2494
2457EXTRA_DIST += time.in.h 2495EXTRA_DIST += time.in.h
@@ -2460,19 +2498,19 @@ EXTRA_DIST += time.in.h
2460 2498
2461## begin gnulib module time_r 2499## begin gnulib module time_r
2462 2500
2463 2501if GL_COND_OBJ_TIME_R
2464EXTRA_DIST += time_r.c 2502libgnu_a_SOURCES += time_r.c
2465 2503endif
2466EXTRA_libgnu_a_SOURCES += time_r.c
2467 2504
2468## end gnulib module time_r 2505## end gnulib module time_r
2469 2506
2470## begin gnulib module timegm 2507## begin gnulib module timegm
2471 2508
2509if GL_COND_OBJ_TIMEGM
2510libgnu_a_SOURCES += timegm.c
2511endif
2472 2512
2473EXTRA_DIST += mktime-internal.h timegm.c 2513EXTRA_DIST += mktime-internal.h
2474
2475EXTRA_libgnu_a_SOURCES += timegm.c
2476 2514
2477## end gnulib module timegm 2515## end gnulib module timegm
2478 2516
@@ -2484,9 +2522,8 @@ libgnu_a_SOURCES += unistd.c
2484# We need the following in order to create an empty placeholder for 2522# We need the following in order to create an empty placeholder for
2485# <unistd.h> when the system doesn't have one. 2523# <unistd.h> when the system doesn't have one.
2486unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 2524unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
2487 $(AM_V_GEN)rm -f $@-t $@ && \ 2525 $(gl_V_at)$(SED_HEADER_STDOUT) \
2488 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2526 -e 's|@''GUARD_PREFIX''@|GL|g' \
2489 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2490 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ 2527 -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
2491 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2528 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2492 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2529 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@@ -2527,6 +2564,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2527 -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ 2564 -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \
2528 -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ 2565 -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \
2529 -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ 2566 -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \
2567 -e 's/@''GNULIB_GETPASS_GNU''@/$(GL_GNULIB_GETPASS_GNU)/g' \
2530 -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ 2568 -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \
2531 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ 2569 -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \
2532 -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ 2570 -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \
@@ -2628,6 +2666,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2628 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \ 2666 sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
2629 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ 2667 -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
2630 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ 2668 -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
2669 -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
2631 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ 2670 -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
2632 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ 2671 -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
2633 -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \ 2672 -e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
@@ -2647,6 +2686,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2647 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ 2686 -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
2648 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ 2687 -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
2649 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ 2688 -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
2689 -e 's|@''REPLACE_GETPASS_FOR_GETPASS_GNU''@|$(REPLACE_GETPASS_FOR_GETPASS_GNU)|g' \
2650 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ 2690 -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
2651 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ 2691 -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
2652 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ 2692 -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
@@ -2672,9 +2712,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
2672 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ 2712 -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
2673 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2713 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2674 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2714 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2675 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 2715 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2676 } > $@-t && \ 2716 > $@-t
2677 mv $@-t $@ 2717 $(AM_V_at)mv $@-t $@
2678MOSTLYCLEANFILES += unistd.h unistd.h-t 2718MOSTLYCLEANFILES += unistd.h unistd.h-t
2679 2719
2680EXTRA_DIST += unistd.in.h 2720EXTRA_DIST += unistd.in.h
@@ -2690,10 +2730,9 @@ EXTRA_DIST += unlocked-io.h
2690 2730
2691## begin gnulib module unsetenv 2731## begin gnulib module unsetenv
2692 2732
2693 2733if GL_COND_OBJ_UNSETENV
2694EXTRA_DIST += unsetenv.c 2734libgnu_a_SOURCES += unsetenv.c
2695 2735endif
2696EXTRA_libgnu_a_SOURCES += unsetenv.c
2697 2736
2698## end gnulib module unsetenv 2737## end gnulib module unsetenv
2699 2738
@@ -2738,9 +2777,8 @@ BUILT_SOURCES += wchar.h
2738# We need the following in order to create <wchar.h> when the system 2777# We need the following in order to create <wchar.h> when the system
2739# version does not work standalone. 2778# version does not work standalone.
2740wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) 2779wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
2741 $(AM_V_GEN)rm -f $@-t $@ && \ 2780 $(gl_V_at)$(SED_HEADER_STDOUT) \
2742 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2781 -e 's|@''GUARD_PREFIX''@|GL|g' \
2743 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2744 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2782 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2745 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2783 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
2746 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ 2784 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
@@ -2855,9 +2893,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
2855 -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \ 2893 -e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
2856 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2894 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2857 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ 2895 -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
2858 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ 2896 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2859 } > $@-t && \ 2897 > $@-t
2860 mv $@-t $@ 2898 $(AM_V_at)mv $@-t $@
2861MOSTLYCLEANFILES += wchar.h wchar.h-t 2899MOSTLYCLEANFILES += wchar.h wchar.h-t
2862 2900
2863EXTRA_DIST += wchar.in.h 2901EXTRA_DIST += wchar.in.h
@@ -2866,10 +2904,9 @@ EXTRA_DIST += wchar.in.h
2866 2904
2867## begin gnulib module wcrtomb 2905## begin gnulib module wcrtomb
2868 2906
2869 2907if GL_COND_OBJ_WCRTOMB
2870EXTRA_DIST += wcrtomb.c 2908libgnu_a_SOURCES += wcrtomb.c
2871 2909endif
2872EXTRA_libgnu_a_SOURCES += wcrtomb.c
2873 2910
2874## end gnulib module wcrtomb 2911## end gnulib module wcrtomb
2875 2912
@@ -2881,9 +2918,8 @@ libgnu_a_SOURCES += wctype-h.c
2881# We need the following in order to create <wctype.h> when the system 2918# We need the following in order to create <wctype.h> when the system
2882# doesn't have one that works with the given compiler. 2919# doesn't have one that works with the given compiler.
2883wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) 2920wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
2884 $(AM_V_GEN)rm -f $@-t $@ && \ 2921 $(gl_V_at)$(SED_HEADER_STDOUT) \
2885 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ 2922 -e 's|@''GUARD_PREFIX''@|GL|g' \
2886 sed -e 's|@''GUARD_PREFIX''@|GL|g' \
2887 -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ 2923 -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
2888 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ 2924 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
2889 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ 2925 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
@@ -2910,9 +2946,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
2910 -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ 2946 -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
2911 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ 2947 -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
2912 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ 2948 -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
2913 < $(srcdir)/wctype.in.h; \ 2949 $(srcdir)/wctype.in.h > $@-t
2914 } > $@-t && \ 2950 $(AM_V_at)mv $@-t $@
2915 mv $@-t $@
2916MOSTLYCLEANFILES += wctype.h wctype.h-t 2951MOSTLYCLEANFILES += wctype.h wctype.h-t
2917 2952
2918EXTRA_DIST += wctype.in.h 2953EXTRA_DIST += wctype.in.h
@@ -2921,37 +2956,41 @@ EXTRA_DIST += wctype.in.h
2921 2956
2922## begin gnulib module windows-mutex 2957## begin gnulib module windows-mutex
2923 2958
2959if GL_COND_OBJ_WINDOWS_MUTEX
2960libgnu_a_SOURCES += windows-mutex.c
2961endif
2924 2962
2925EXTRA_DIST += windows-initguard.h windows-mutex.c windows-mutex.h 2963EXTRA_DIST += windows-initguard.h windows-mutex.h
2926
2927EXTRA_libgnu_a_SOURCES += windows-mutex.c
2928 2964
2929## end gnulib module windows-mutex 2965## end gnulib module windows-mutex
2930 2966
2931## begin gnulib module windows-once 2967## begin gnulib module windows-once
2932 2968
2969if GL_COND_OBJ_WINDOWS_ONCE
2970libgnu_a_SOURCES += windows-once.c
2971endif
2933 2972
2934EXTRA_DIST += windows-once.c windows-once.h 2973EXTRA_DIST += windows-once.h
2935
2936EXTRA_libgnu_a_SOURCES += windows-once.c
2937 2974
2938## end gnulib module windows-once 2975## end gnulib module windows-once
2939 2976
2940## begin gnulib module windows-recmutex 2977## begin gnulib module windows-recmutex
2941 2978
2979if GL_COND_OBJ_WINDOWS_RECMUTEX
2980libgnu_a_SOURCES += windows-recmutex.c
2981endif
2942 2982
2943EXTRA_DIST += windows-initguard.h windows-recmutex.c windows-recmutex.h 2983EXTRA_DIST += windows-initguard.h windows-recmutex.h
2944
2945EXTRA_libgnu_a_SOURCES += windows-recmutex.c
2946 2984
2947## end gnulib module windows-recmutex 2985## end gnulib module windows-recmutex
2948 2986
2949## begin gnulib module windows-rwlock 2987## begin gnulib module windows-rwlock
2950 2988
2989if GL_COND_OBJ_WINDOWS_RWLOCK
2990libgnu_a_SOURCES += windows-rwlock.c
2991endif
2951 2992
2952EXTRA_DIST += windows-initguard.h windows-rwlock.c windows-rwlock.h 2993EXTRA_DIST += windows-initguard.h windows-rwlock.h
2953
2954EXTRA_libgnu_a_SOURCES += windows-rwlock.c
2955 2994
2956## end gnulib module windows-rwlock 2995## end gnulib module windows-rwlock
2957 2996
@@ -2992,3 +3031,7 @@ mostlyclean-local: mostlyclean-generic
2992 fi; \ 3031 fi; \
2993 done; \ 3032 done; \
2994 : 3033 :
3034distclean-local: distclean-gnulib-libobjs
3035distclean-gnulib-libobjs:
3036 -rm -f @gl_LIBOBJDEPS@
3037maintainer-clean-local: distclean-gnulib-libobjs
diff --git a/gl/_Noreturn.h b/gl/_Noreturn.h
index 6fed3c7..e914627 100644
--- a/gl/_Noreturn.h
+++ b/gl/_Noreturn.h
@@ -1,5 +1,5 @@
1/* A C macro for declaring that a function does not return. 1/* A C macro for declaring that a function does not return.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify it 4 This program is free software: you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as published 5 under the terms of the GNU Lesser General Public License as published
diff --git a/gl/af_alg.c b/gl/af_alg.c
index 748af70..084bff6 100644
--- a/gl/af_alg.c
+++ b/gl/af_alg.c
@@ -1,5 +1,5 @@
1/* af_alg.c - Compute message digests from file streams and buffers. 1/* af_alg.c - Compute message digests from file streams and buffers.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc. 2 Copyright (C) 2018-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/af_alg.h b/gl/af_alg.h
index f0fe7fc..ddd6568 100644
--- a/gl/af_alg.h
+++ b/gl/af_alg.h
@@ -1,5 +1,5 @@
1/* af_alg.h - Compute message digests from file streams and buffers. 1/* af_alg.h - Compute message digests from file streams and buffers.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc. 2 Copyright (C) 2018-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index 65c2d4d..e2b1461 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,6 +1,6 @@
1/* Memory allocation on the stack. 1/* Memory allocation on the stack.
2 2
3 Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundation, 3 Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
4 Inc. 4 Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 9968067..f5d7db2 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <arpa/inet.h>. 1/* A GNU-like <arpa/inet.h>.
2 2
3 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/asnprintf.c b/gl/asnprintf.c
index c5367b2..0c5c76e 100644
--- a/gl/asnprintf.c
+++ b/gl/asnprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 1999, 2002, 2006, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2002, 2006, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/asprintf.c b/gl/asprintf.c
index 9c78c13..9c163f3 100644
--- a/gl/asprintf.c
+++ b/gl/asprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 1999, 2002, 2006-2007, 2009-2021 Free Software Foundation, 2 Copyright (C) 1999, 2002, 2006-2007, 2009-2022 Free Software Foundation,
3 Inc. 3 Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/attribute.h b/gl/attribute.h
index eb36188..378d4f0 100644
--- a/gl/attribute.h
+++ b/gl/attribute.h
@@ -1,6 +1,6 @@
1/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers 1/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
2 2
3 Copyright 2020-2021 Free Software Foundation, Inc. 3 Copyright 2020-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/base64.c b/gl/base64.c
index b204cb7..6b6e5b0 100644
--- a/gl/base64.c
+++ b/gl/base64.c
@@ -1,5 +1,5 @@
1/* base64.c -- Encode binary data using printable characters. 1/* base64.c -- Encode binary data using printable characters.
2 Copyright (C) 1999-2001, 2004-2006, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999-2001, 2004-2006, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/base64.h b/gl/base64.h
index e58ccfb..6b8b3dc 100644
--- a/gl/base64.h
+++ b/gl/base64.h
@@ -1,5 +1,5 @@
1/* base64.h -- Encode binary data using printable characters. 1/* base64.h -- Encode binary data using printable characters.
2 Copyright (C) 2004-2006, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2004-2006, 2009-2022 Free Software Foundation, Inc.
3 Written by Simon Josefsson. 3 Written by Simon Josefsson.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/basename-lgpl.c b/gl/basename-lgpl.c
index 5dbd157..eb07e25 100644
--- a/gl/basename-lgpl.c
+++ b/gl/basename-lgpl.c
@@ -1,6 +1,6 @@
1/* basename.c -- return the last element in a file name 1/* basename.c -- return the last element in a file name
2 2
3 Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software 3 Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/basename-lgpl.h b/gl/basename-lgpl.h
index d520c09..5569f21 100644
--- a/gl/basename-lgpl.h
+++ b/gl/basename-lgpl.h
@@ -1,6 +1,6 @@
1/* Extract the last component (base name) of a file name. 1/* Extract the last component (base name) of a file name.
2 2
3 Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, 3 Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
4 Inc. 4 Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/basename.c b/gl/basename.c
index 1181134..0e372ca 100644
--- a/gl/basename.c
+++ b/gl/basename.c
@@ -1,11 +1,11 @@
1/* basename.c -- return the last element in a file name 1/* basename.c -- return the last element in a file name
2 2
3 Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2021 Free Software 3 Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This program is free software: you can redistribute it and/or modify 6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/gl/btowc.c b/gl/btowc.c
index b8239af..4af58bb 100644
--- a/gl/btowc.c
+++ b/gl/btowc.c
@@ -1,5 +1,5 @@
1/* Convert unibyte character to wide character. 1/* Convert unibyte character to wide character.
2 Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h
index 113f878..f4746d3 100644
--- a/gl/byteswap.in.h
+++ b/gl/byteswap.in.h
@@ -1,5 +1,5 @@
1/* byteswap.h - Byte swapping 1/* byteswap.h - Byte swapping
2 Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
3 Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005. 3 Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/calloc.c b/gl/calloc.c
index 25064e9..0a934b3 100644
--- a/gl/calloc.c
+++ b/gl/calloc.c
@@ -1,6 +1,6 @@
1/* calloc() function that is glibc compatible. 1/* calloc() function that is glibc compatible.
2 This wrapper function is required at least on Tru64 UNIX 5.1 and mingw. 2 This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
3 Copyright (C) 2004-2007, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2004-2007, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/cdefs.h b/gl/cdefs.h
index ab57d4a..7b8ed5b 100644
--- a/gl/cdefs.h
+++ b/gl/cdefs.h
@@ -1,4 +1,4 @@
1/* Copyright (C) 1992-2021 Free Software Foundation, Inc. 1/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
2 Copyright The GNU Toolchain Authors. 2 Copyright The GNU Toolchain Authors.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
@@ -41,7 +41,9 @@
41 Similarly for __has_builtin, etc. */ 41 Similarly for __has_builtin, etc. */
42#if (defined __has_attribute \ 42#if (defined __has_attribute \
43 && (!defined __clang_minor__ \ 43 && (!defined __clang_minor__ \
44 || 3 < __clang_major__ + (5 <= __clang_minor__))) 44 || (defined __apple_build_version__ \
45 ? 6000000 <= __apple_build_version__ \
46 : 3 < __clang_major__ + (5 <= __clang_minor__))))
45# define __glibc_has_attribute(attr) __has_attribute (attr) 47# define __glibc_has_attribute(attr) __has_attribute (attr)
46#else 48#else
47# define __glibc_has_attribute(attr) 0 49# define __glibc_has_attribute(attr) 0
@@ -143,7 +145,8 @@
143#define __bos0(ptr) __builtin_object_size (ptr, 0) 145#define __bos0(ptr) __builtin_object_size (ptr, 0)
144 146
145/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */ 147/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
146#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0) 148#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
149 || __GNUC_PREREQ (12, 0))
147# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0) 150# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
148# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1) 151# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
149#else 152#else
@@ -161,15 +164,15 @@
161 || (__builtin_constant_p (__l) && (__l) > 0)) 164 || (__builtin_constant_p (__l) && (__l) > 0))
162 165
163/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ 166/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
164 condition can be folded to a constant and if it is true. The -1 check is 167 condition can be folded to a constant and if it is true, or unknown (-1) */
165 redundant because since it implies that __glibc_safe_len_cond is true. */
166#define __glibc_safe_or_unknown_len(__l, __s, __osz) \ 168#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
167 (__glibc_unsigned_or_positive (__l) \ 169 ((__osz) == (__SIZE_TYPE__) -1 \
168 && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \ 170 || (__glibc_unsigned_or_positive (__l) \
169 __s, __osz)) \ 171 && __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
170 && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz)) 172 (__s), (__osz))) \
173 && __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), (__s), (__osz))))
171 174
172/* Conversely, we know at compile time that the length is safe if the 175/* Conversely, we know at compile time that the length is unsafe if the
173 __L * __S <= __OBJSZ condition can be folded to a constant and if it is 176 __L * __S <= __OBJSZ condition can be folded to a constant and if it is
174 false. */ 177 false. */
175#define __glibc_unsafe_len(__l, __s, __osz) \ 178#define __glibc_unsafe_len(__l, __s, __osz) \
diff --git a/gl/cloexec.c b/gl/cloexec.c
index 7defa93..812be01 100644
--- a/gl/cloexec.c
+++ b/gl/cloexec.c
@@ -1,6 +1,6 @@
1/* cloexec.c - set or clear the close-on-exec descriptor flag 1/* cloexec.c - set or clear the close-on-exec descriptor flag
2 2
3 Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/cloexec.h b/gl/cloexec.h
index 97a3659..7a22d77 100644
--- a/gl/cloexec.h
+++ b/gl/cloexec.h
@@ -1,6 +1,6 @@
1/* cloexec.c - set or clear the close-on-exec descriptor flag 1/* cloexec.c - set or clear the close-on-exec descriptor flag
2 2
3 Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2004, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/close.c b/gl/close.c
index 5b9ab6c..44990ba 100644
--- a/gl/close.c
+++ b/gl/close.c
@@ -1,5 +1,5 @@
1/* close replacement. 1/* close replacement.
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c
index 95f9c99..d54f6a9 100644
--- a/gl/dirname-lgpl.c
+++ b/gl/dirname-lgpl.c
@@ -1,6 +1,6 @@
1/* dirname.c -- return all but the last element in a file name 1/* dirname.c -- return all but the last element in a file name
2 2
3 Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software 3 Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/dirname.c b/gl/dirname.c
index d8b07d3..3d2aaf1 100644
--- a/gl/dirname.c
+++ b/gl/dirname.c
@@ -1,11 +1,11 @@
1/* dirname.c -- return all but the last element in a file name 1/* dirname.c -- return all but the last element in a file name
2 2
3 Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2021 Free Software 3 Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This program is free software: you can redistribute it and/or modify 6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/gl/dirname.h b/gl/dirname.h
index 25abc7b..e18a97e 100644
--- a/gl/dirname.h
+++ b/gl/dirname.h
@@ -1,6 +1,6 @@
1/* Take file names apart into directory and base names. 1/* Take file names apart into directory and base names.
2 2
3 Copyright (C) 1998, 2001, 2003-2006, 2009-2021 Free Software Foundation, 3 Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
4 Inc. 4 Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/dup2.c b/gl/dup2.c
index 53e5552..1c766ab 100644
--- a/gl/dup2.c
+++ b/gl/dup2.c
@@ -1,6 +1,6 @@
1/* Duplicate an open file descriptor to a specified file descriptor. 1/* Duplicate an open file descriptor to a specified file descriptor.
2 2
3 Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/dynarray.h b/gl/dynarray.h
index ec64273..ca6439d 100644
--- a/gl/dynarray.h
+++ b/gl/dynarray.h
@@ -1,5 +1,5 @@
1/* Type-safe arrays which grow dynamically. 1/* Type-safe arrays which grow dynamically.
2 Copyright 2021 Free Software Foundation, Inc. 2 Copyright 2021-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/errno.in.h b/gl/errno.in.h
index 3cad9e2..3ec1845 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -1,6 +1,6 @@
1/* A POSIX-like <errno.h>. 1/* A POSIX-like <errno.h>.
2 2
3 Copyright (C) 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/error.c b/gl/error.c
index f89dcc5..272d45e 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -1,5 +1,5 @@
1/* Error handler for noninteractive utilities 1/* Error handler for noninteractive utilities
2 Copyright (C) 1990-1998, 2000-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 1990-1998, 2000-2007, 2009-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/error.h b/gl/error.h
index 814715e..45ec2a5 100644
--- a/gl/error.h
+++ b/gl/error.h
@@ -1,5 +1,5 @@
1/* Declaration for error-reporting function 1/* Declaration for error-reporting function
2 Copyright (C) 1995-1997, 2003, 2006, 2008-2021 Free Software Foundation, 2 Copyright (C) 1995-1997, 2003, 2006, 2008-2022 Free Software Foundation,
3 Inc. 3 Inc.
4 This file is part of the GNU C Library. 4 This file is part of the GNU C Library.
5 5
diff --git a/gl/exitfail.c b/gl/exitfail.c
index ebc1f58..84fb0ef 100644
--- a/gl/exitfail.c
+++ b/gl/exitfail.c
@@ -1,6 +1,6 @@
1/* Failure exit status 1/* Failure exit status
2 2
3 Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/exitfail.h b/gl/exitfail.h
index 4add9e0..865f096 100644
--- a/gl/exitfail.h
+++ b/gl/exitfail.h
@@ -1,6 +1,6 @@
1/* Failure exit status 1/* Failure exit status
2 2
3 Copyright (C) 2002, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2002, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fcntl.c b/gl/fcntl.c
index c744eb9..f9753c4 100644
--- a/gl/fcntl.c
+++ b/gl/fcntl.c
@@ -1,6 +1,6 @@
1/* Provide file descriptor control. 1/* Provide file descriptor control.
2 2
3 Copyright (C) 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fcntl.in.h b/gl/fcntl.in.h
index 26dedc3..9270ced 100644
--- a/gl/fcntl.in.h
+++ b/gl/fcntl.in.h
@@ -1,6 +1,6 @@
1/* Like <fcntl.h>, but with non-working flags defined to 0. 1/* Like <fcntl.h>, but with non-working flags defined to 0.
2 2
3 Copyright (C) 2006-2021 Free Software Foundation, Inc. 3 Copyright (C) 2006-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -435,6 +435,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
435# define AT_EACCESS 4 435# define AT_EACCESS 4
436#endif 436#endif
437 437
438/* Ignore this flag if not supported. */
439#ifndef AT_NO_AUTOMOUNT
440# define AT_NO_AUTOMOUNT 0
441#endif
438 442
439#endif /* _@GUARD_PREFIX@_FCNTL_H */ 443#endif /* _@GUARD_PREFIX@_FCNTL_H */
440#endif /* _@GUARD_PREFIX@_FCNTL_H */ 444#endif /* _@GUARD_PREFIX@_FCNTL_H */
diff --git a/gl/fd-hook.c b/gl/fd-hook.c
index 75b1626..64a7a80 100644
--- a/gl/fd-hook.c
+++ b/gl/fd-hook.c
@@ -1,5 +1,5 @@
1/* Hook for making file descriptor functions close(), ioctl() extensible. 1/* Hook for making file descriptor functions close(), ioctl() extensible.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2009. 3 Written by Bruno Haible <bruno@clisp.org>, 2009.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/fd-hook.h b/gl/fd-hook.h
index 98e2a52..d6c4964 100644
--- a/gl/fd-hook.h
+++ b/gl/fd-hook.h
@@ -1,5 +1,5 @@
1/* Hook for making file descriptor functions close(), ioctl() extensible. 1/* Hook for making file descriptor functions close(), ioctl() extensible.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fflush.c b/gl/fflush.c
index 8fe9d26..69511cd 100644
--- a/gl/fflush.c
+++ b/gl/fflush.c
@@ -1,5 +1,5 @@
1/* fflush.c -- allow flushing input streams 1/* fflush.c -- allow flushing input streams
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/filename.h b/gl/filename.h
index dafe3df..ab77ca2 100644
--- a/gl/filename.h
+++ b/gl/filename.h
@@ -1,5 +1,5 @@
1/* Basic filename support macros. 1/* Basic filename support macros.
2 Copyright (C) 2001-2004, 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2001-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/float+.h b/gl/float+.h
index ad891f6..9ab4520 100644
--- a/gl/float+.h
+++ b/gl/float+.h
@@ -1,5 +1,5 @@
1/* Supplemental information about the floating-point formats. 1/* Supplemental information about the floating-point formats.
2 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2007. 3 Written by Bruno Haible <bruno@clisp.org>, 2007.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/float.c b/gl/float.c
index dd1e84a..de85064 100644
--- a/gl/float.c
+++ b/gl/float.c
@@ -1,5 +1,5 @@
1/* Auxiliary definitions for <float.h>. 1/* Auxiliary definitions for <float.h>.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011. 3 Written by Bruno Haible <bruno@clisp.org>, 2011.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/float.in.h b/gl/float.in.h
index f52aba3..a418376 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -1,6 +1,6 @@
1/* A correct <float.h>. 1/* A correct <float.h>.
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/floor.c b/gl/floor.c
index 1530300..3e4f8d0 100644
--- a/gl/floor.c
+++ b/gl/floor.c
@@ -1,9 +1,9 @@
1/* Round towards negative infinity. 1/* Round towards negative infinity.
2 Copyright (C) 2007, 2010-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2010-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the 6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This file is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
diff --git a/gl/floorf.c b/gl/floorf.c
index 587f73b..457ec75 100644
--- a/gl/floorf.c
+++ b/gl/floorf.c
@@ -1,9 +1,9 @@
1/* Round towards negative infinity. 1/* Round towards negative infinity.
2 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 3 of the 6 published by the Free Software Foundation, either version 3 of the
7 License, or (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This file is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
diff --git a/gl/fopen.c b/gl/fopen.c
index cebcdac..a5b3ae3 100644
--- a/gl/fopen.c
+++ b/gl/fopen.c
@@ -1,5 +1,5 @@
1/* Open a stream to a file. 1/* Open a stream to a file.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fpurge.c b/gl/fpurge.c
index 6b9c17a..21e3b86 100644
--- a/gl/fpurge.c
+++ b/gl/fpurge.c
@@ -1,5 +1,5 @@
1/* Flushing buffers of a FILE stream. 1/* Flushing buffers of a FILE stream.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/freading.c b/gl/freading.c
index be4f561..93e96e0 100644
--- a/gl/freading.c
+++ b/gl/freading.c
@@ -1,5 +1,5 @@
1/* Retrieve information about a FILE stream. 1/* Retrieve information about a FILE stream.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/freading.h b/gl/freading.h
index 61cdbd2..74fed22 100644
--- a/gl/freading.h
+++ b/gl/freading.h
@@ -1,5 +1,5 @@
1/* Retrieve information about a FILE stream. 1/* Retrieve information about a FILE stream.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/free.c b/gl/free.c
index 780f03d..86ebe6c 100644
--- a/gl/free.c
+++ b/gl/free.c
@@ -1,6 +1,6 @@
1/* Make free() preserve errno. 1/* Make free() preserve errno.
2 2
3 Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2006, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fseek.c b/gl/fseek.c
index d0df710..e9f9314 100644
--- a/gl/fseek.c
+++ b/gl/fseek.c
@@ -1,5 +1,5 @@
1/* An fseek() function that, together with fflush(), is POSIX compliant. 1/* An fseek() function that, together with fflush(), is POSIX compliant.
2 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fseeko.c b/gl/fseeko.c
index 3539a36..2ca2db8 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -1,5 +1,5 @@
1/* An fseeko() function that, together with fflush(), is POSIX compliant. 1/* An fseeko() function that, together with fflush(), is POSIX compliant.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fstat.c b/gl/fstat.c
index 512c688..3928c86 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -1,5 +1,5 @@
1/* fstat() replacement. 1/* fstat() replacement.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fsusage.c b/gl/fsusage.c
index 740cdc2..18f790f 100644
--- a/gl/fsusage.c
+++ b/gl/fsusage.c
@@ -1,11 +1,11 @@
1/* fsusage.c -- return space usage of mounted file systems 1/* fsusage.c -- return space usage of mounted file systems
2 2
3 Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2021 Free Software 3 Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/gl/fsusage.h b/gl/fsusage.h
index b3f58d9..0443d19 100644
--- a/gl/fsusage.h
+++ b/gl/fsusage.h
@@ -1,11 +1,11 @@
1/* fsusage.h -- declarations for file system space usage info 1/* fsusage.h -- declarations for file system space usage info
2 2
3 Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2021 Free Software 3 Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
8 published by the Free Software Foundation; either version 3 of the 8 published by the Free Software Foundation, either version 3 of the
9 License, or (at your option) any later version. 9 License, or (at your option) any later version.
10 10
11 This file is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
diff --git a/gl/ftell.c b/gl/ftell.c
index a2479c6..3fbd9e9 100644
--- a/gl/ftell.c
+++ b/gl/ftell.c
@@ -1,5 +1,5 @@
1/* An ftell() function that works around platform bugs. 1/* An ftell() function that works around platform bugs.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/ftello.c b/gl/ftello.c
index f701aa6..989614a 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
1/* An ftello() function that works around platform bugs. 1/* An ftello() function that works around platform bugs.
2 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c
index 4874ef5..c7eedb2 100644
--- a/gl/gai_strerror.c
+++ b/gl/gai_strerror.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2021 Free Software 1/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2022 Free Software
2 Foundation, Inc. 2 Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997. 4 Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
index 0c42d1b..3922898 100644
--- a/gl/getaddrinfo.c
+++ b/gl/getaddrinfo.c
@@ -1,5 +1,5 @@
1/* Get address information (partial implementation). 1/* Get address information (partial implementation).
2 Copyright (C) 1997, 2001-2002, 2004-2021 Free Software Foundation, Inc. 2 Copyright (C) 1997, 2001-2002, 2004-2022 Free Software Foundation, Inc.
3 Contributed by Simon Josefsson <simon@josefsson.org>. 3 Contributed by Simon Josefsson <simon@josefsson.org>.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/getdelim.c b/gl/getdelim.c
index c690b10..9eb0483 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -1,5 +1,5 @@
1/* getdelim.c --- Implementation of replacement getdelim function. 1/* getdelim.c --- Implementation of replacement getdelim function.
2 Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2021 Free Software 2 Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/getdtablesize.c b/gl/getdtablesize.c
index 5006c2d..793e0f8 100644
--- a/gl/getdtablesize.c
+++ b/gl/getdtablesize.c
@@ -1,5 +1,5 @@
1/* getdtablesize() function: Return maximum possible file descriptor value + 1. 1/* getdtablesize() function: Return maximum possible file descriptor value + 1.
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/gethostname.c b/gl/gethostname.c
index 028edc6..ce9bf41 100644
--- a/gl/gethostname.c
+++ b/gl/gethostname.c
@@ -1,6 +1,6 @@
1/* gethostname emulation for SysV and POSIX.1. 1/* gethostname emulation for SysV and POSIX.1.
2 2
3 Copyright (C) 1992, 2003, 2006, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 1992, 2003, 2006, 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/getline.c b/gl/getline.c
index 47de1ba..34b9117 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -1,5 +1,5 @@
1/* getline.c --- Implementation of replacement getline function. 1/* getline.c --- Implementation of replacement getline function.
2 Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/getloadavg.c b/gl/getloadavg.c
index d42d0cd..37e8280 100644
--- a/gl/getloadavg.c
+++ b/gl/getloadavg.c
@@ -1,6 +1,6 @@
1/* Get the system load averages. 1/* Get the system load averages.
2 2
3 Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2021 Free Software 3 Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 NOTE: The canonical source of this file is maintained with gnulib. 6 NOTE: The canonical source of this file is maintained with gnulib.
@@ -8,7 +8,7 @@
8 8
9 This program is free software: you can redistribute it and/or modify 9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
14 This program is distributed in the hope that it will be useful, 14 This program is distributed in the hope that it will be useful,
diff --git a/gl/getopt-cdefs.in.h b/gl/getopt-cdefs.in.h
index 33e3d4b..b6dd913 100644
--- a/gl/getopt-cdefs.in.h
+++ b/gl/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
1/* getopt-on-non-glibc compatibility macros. 1/* getopt-on-non-glibc compatibility macros.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 Unlike most of the getopt implementation, it is NOT shared 4 Unlike most of the getopt implementation, it is NOT shared
5 with the GNU C Library. 5 with the GNU C Library.
diff --git a/gl/getopt-core.h b/gl/getopt-core.h
index ceb14d0..1c40ecc 100644
--- a/gl/getopt-core.h
+++ b/gl/getopt-core.h
@@ -1,5 +1,5 @@
1/* Declarations for getopt (basic, portable features only). 1/* Declarations for getopt (basic, portable features only).
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library and is also part of gnulib. 3 This file is part of the GNU C Library and is also part of gnulib.
4 Patches to this file should be submitted to both projects. 4 Patches to this file should be submitted to both projects.
5 5
diff --git a/gl/getopt-ext.h b/gl/getopt-ext.h
index f82a8c6..d661fcc 100644
--- a/gl/getopt-ext.h
+++ b/gl/getopt-ext.h
@@ -1,5 +1,5 @@
1/* Declarations for getopt (GNU extensions). 1/* Declarations for getopt (GNU extensions).
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library and is also part of gnulib. 3 This file is part of the GNU C Library and is also part of gnulib.
4 Patches to this file should be submitted to both projects. 4 Patches to this file should be submitted to both projects.
5 5
diff --git a/gl/getopt-pfx-core.h b/gl/getopt-pfx-core.h
index b1733a3..3eead0e 100644
--- a/gl/getopt-pfx-core.h
+++ b/gl/getopt-pfx-core.h
@@ -1,5 +1,5 @@
1/* getopt (basic, portable features) gnulib wrapper header. 1/* getopt (basic, portable features) gnulib wrapper header.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 Unlike most of the getopt implementation, it is NOT shared 4 Unlike most of the getopt implementation, it is NOT shared
5 with the GNU C Library. 5 with the GNU C Library.
diff --git a/gl/getopt-pfx-ext.h b/gl/getopt-pfx-ext.h
index b9a14ba..85a6cb5 100644
--- a/gl/getopt-pfx-ext.h
+++ b/gl/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
1/* getopt (GNU extensions) gnulib wrapper header. 1/* getopt (GNU extensions) gnulib wrapper header.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 Unlike most of the getopt implementation, it is NOT shared 4 Unlike most of the getopt implementation, it is NOT shared
5 with the GNU C Library. 5 with the GNU C Library.
diff --git a/gl/getopt.c b/gl/getopt.c
index 7f3aa5a..128dc7f 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -1,5 +1,5 @@
1/* Getopt for GNU. 1/* Getopt for GNU.
2 Copyright (C) 1987-2021 Free Software Foundation, Inc. 2 Copyright (C) 1987-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library and is also part of gnulib. 3 This file is part of the GNU C Library and is also part of gnulib.
4 Patches to this file should be submitted to both projects. 4 Patches to this file should be submitted to both projects.
5 5
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index bf884f0..9bc50ee 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
1/* Declarations for getopt. 1/* Declarations for getopt.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 Unlike most of the getopt implementation, it is NOT shared 4 Unlike most of the getopt implementation, it is NOT shared
5 with the GNU C Library, which supplies a different version of 5 with the GNU C Library, which supplies a different version of
diff --git a/gl/getopt1.c b/gl/getopt1.c
index 5a92806..990eee1 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -1,5 +1,5 @@
1/* getopt_long and getopt_long_only entry points for GNU getopt. 1/* getopt_long and getopt_long_only entry points for GNU getopt.
2 Copyright (C) 1987-2021 Free Software Foundation, Inc. 2 Copyright (C) 1987-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library and is also part of gnulib. 3 This file is part of the GNU C Library and is also part of gnulib.
4 Patches to this file should be submitted to both projects. 4 Patches to this file should be submitted to both projects.
5 5
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 91254e4..ccdbb97 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
1/* Internal declarations for getopt. 1/* Internal declarations for getopt.
2 Copyright (C) 1989-2021 Free Software Foundation, Inc. 2 Copyright (C) 1989-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library and is also part of gnulib. 3 This file is part of the GNU C Library and is also part of gnulib.
4 Patches to this file should be submitted to both projects. 4 Patches to this file should be submitted to both projects.
5 5
diff --git a/gl/getprogname.c b/gl/getprogname.c
index 9a80281..62a4800 100644
--- a/gl/getprogname.c
+++ b/gl/getprogname.c
@@ -1,5 +1,5 @@
1/* Program name management. 1/* Program name management.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc. 2 Copyright (C) 2016-2022 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by 5 it under the terms of the GNU Lesser General Public License as published by
diff --git a/gl/getprogname.h b/gl/getprogname.h
index eb12dcd..9a35e58 100644
--- a/gl/getprogname.h
+++ b/gl/getprogname.h
@@ -1,5 +1,5 @@
1/* Program name management. 1/* Program name management.
2 Copyright (C) 2016-2021 Free Software Foundation, Inc. 2 Copyright (C) 2016-2022 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by 5 it under the terms of the GNU Lesser General Public License as published by
diff --git a/gl/gettext.h b/gl/gettext.h
index f1c7a24..b3577a0 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
1/* Convenience header for conditional use of GNU <libintl.h>. 1/* Convenience header for conditional use of GNU <libintl.h>.
2 Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Software 2 Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
@@ -138,7 +138,7 @@
138#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ 138#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
139 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) 139 npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
140 140
141#ifdef __GNUC__ 141#if defined __GNUC__ || defined __clang__
142__inline 142__inline
143#else 143#else
144#ifdef __cplusplus 144#ifdef __cplusplus
@@ -157,7 +157,7 @@ pgettext_aux (const char *domain,
157 return translation; 157 return translation;
158} 158}
159 159
160#ifdef __GNUC__ 160#if defined __GNUC__ || defined __clang__
161__inline 161__inline
162#else 162#else
163#ifdef __cplusplus 163#ifdef __cplusplus
@@ -191,9 +191,8 @@ npgettext_aux (const char *domain,
191 or may have security implications due to non-deterministic stack usage. */ 191 or may have security implications due to non-deterministic stack usage. */
192 192
193#if (!defined GNULIB_NO_VLA \ 193#if (!defined GNULIB_NO_VLA \
194 && (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ 194 && defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__ \
195 /* || (__STDC_VERSION__ == 199901L && !defined __HP_cc) 195 && !defined __STDC_NO_VLA__)
196 || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ))
197# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 196# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
198#else 197#else
199# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 198# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0
@@ -208,7 +207,7 @@ npgettext_aux (const char *domain,
208#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ 207#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
209 dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) 208 dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
210 209
211#ifdef __GNUC__ 210#if defined __GNUC__ || defined __clang__
212__inline 211__inline
213#else 212#else
214#ifdef __cplusplus 213#ifdef __cplusplus
@@ -255,7 +254,7 @@ dcpgettext_expr (const char *domain,
255#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ 254#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
256 dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) 255 dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
257 256
258#ifdef __GNUC__ 257#if defined __GNUC__ || defined __clang__
259__inline 258__inline
260#else 259#else
261#ifdef __cplusplus 260#ifdef __cplusplus
diff --git a/gl/gl_openssl.h b/gl/gl_openssl.h
index ed98975..4c42ac8 100644
--- a/gl/gl_openssl.h
+++ b/gl/gl_openssl.h
@@ -1,6 +1,6 @@
1/* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*- 1/* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*-
2 2
3 Copyright (C) 2013-2021 Free Software Foundation, Inc. 3 Copyright (C) 2013-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/glthread/lock.c b/gl/glthread/lock.c
index 44335e3..b650c21 100644
--- a/gl/glthread/lock.c
+++ b/gl/glthread/lock.c
@@ -1,5 +1,5 @@
1/* Locking in multithreaded situations. 1/* Locking in multithreaded situations.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/glthread/lock.h b/gl/glthread/lock.h
index cc4c519..47eed8f 100644
--- a/gl/glthread/lock.h
+++ b/gl/glthread/lock.h
@@ -1,5 +1,5 @@
1/* Locking in multithreaded situations. 1/* Locking in multithreaded situations.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/glthread/threadlib.c b/gl/glthread/threadlib.c
index 793bc69..88a76ba 100644
--- a/gl/glthread/threadlib.c
+++ b/gl/glthread/threadlib.c
@@ -1,5 +1,5 @@
1/* Multithreading primitives. 1/* Multithreading primitives.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/hard-locale.c b/gl/hard-locale.c
index 8b6802d..f7fbc47 100644
--- a/gl/hard-locale.c
+++ b/gl/hard-locale.c
@@ -1,6 +1,6 @@
1/* hard-locale.c -- Determine whether a locale is hard. 1/* hard-locale.c -- Determine whether a locale is hard.
2 2
3 Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2021 Free Software 3 Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/hard-locale.h b/gl/hard-locale.h
index eba6601..6066f4e 100644
--- a/gl/hard-locale.h
+++ b/gl/hard-locale.h
@@ -1,6 +1,6 @@
1/* Determine whether a locale is hard. 1/* Determine whether a locale is hard.
2 2
3 Copyright (C) 1999, 2003-2004, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 1999, 2003-2004, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/ialloc.c b/gl/ialloc.c
index 0137099..43c1043 100644
--- a/gl/ialloc.c
+++ b/gl/ialloc.c
@@ -1,6 +1,6 @@
1/* malloc with idx_t rather than size_t 1/* malloc with idx_t rather than size_t
2 2
3 Copyright 2021 Free Software Foundation, Inc. 3 Copyright 2021-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/ialloc.h b/gl/ialloc.h
index d4f54ce..37cf4bf 100644
--- a/gl/ialloc.h
+++ b/gl/ialloc.h
@@ -1,6 +1,6 @@
1/* ialloc.h -- malloc with idx_t rather than size_t 1/* ialloc.h -- malloc with idx_t rather than size_t
2 2
3 Copyright 2021 Free Software Foundation, Inc. 3 Copyright 2021-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/idpriv-droptemp.c b/gl/idpriv-droptemp.c
index 532413a..f327236 100644
--- a/gl/idpriv-droptemp.c
+++ b/gl/idpriv-droptemp.c
@@ -1,9 +1,9 @@
1/* Dropping uid/gid privileges of the current process temporarily. 1/* Dropping uid/gid privileges of the current process temporarily.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/gl/idpriv.h b/gl/idpriv.h
index 0f7e2f4..b97d192 100644
--- a/gl/idpriv.h
+++ b/gl/idpriv.h
@@ -1,9 +1,9 @@
1/* Dropping uid/gid privileges of the current process. 1/* Dropping uid/gid privileges of the current process.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or 6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version. 7 (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This program is distributed in the hope that it will be useful,
diff --git a/gl/idx.h b/gl/idx.h
index 54ad5d8..c3669dd 100644
--- a/gl/idx.h
+++ b/gl/idx.h
@@ -1,5 +1,5 @@
1/* A type for indices and sizes. 1/* A type for indices and sizes.
2 Copyright (C) 2020-2021 Free Software Foundation, Inc. 2 Copyright (C) 2020-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index 409e88c..2d401d2 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -1,6 +1,6 @@
1/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form 1/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
2 2
3 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/intprops-internal.h b/gl/intprops-internal.h
new file mode 100644
index 0000000..f6455f7
--- /dev/null
+++ b/gl/intprops-internal.h
@@ -0,0 +1,392 @@
1/* intprops-internal.h -- properties of integer types not visible to users
2
3 Copyright (C) 2001-2022 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published
7 by the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18#ifndef _GL_INTPROPS_INTERNAL_H
19#define _GL_INTPROPS_INTERNAL_H
20
21#include <limits.h>
22
23/* Return a value with the common real type of E and V and the value of V.
24 Do not evaluate E. */
25#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
26
27/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
28 <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
29#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
30
31/* The extra casts in the following macros work around compiler bugs,
32 e.g., in Cray C 5.0.3.0. */
33
34/* True if the real type T is signed. */
35#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
36
37/* Return 1 if the real expression E, after promotion, has a
38 signed or floating type. Do not evaluate E. */
39#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
40
41
42/* Minimum and maximum values for integer types and expressions. */
43
44/* The width in bits of the integer type or expression T.
45 Do not evaluate T. T must not be a bit-field expression.
46 Padding bits are not supported; this is checked at compile-time below. */
47#define _GL_TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
48
49/* The maximum and minimum values for the type of the expression E,
50 after integer promotion. E is not evaluated. */
51#define _GL_INT_MINIMUM(e) \
52 (_GL_EXPR_SIGNED (e) \
53 ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
54 : _GL_INT_CONVERT (e, 0))
55#define _GL_INT_MAXIMUM(e) \
56 (_GL_EXPR_SIGNED (e) \
57 ? _GL_SIGNED_INT_MAXIMUM (e) \
58 : _GL_INT_NEGATE_CONVERT (e, 1))
59#define _GL_SIGNED_INT_MAXIMUM(e) \
60 (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
61
62/* Work around OpenVMS incompatibility with C99. */
63#if !defined LLONG_MAX && defined __INT64_MAX
64# define LLONG_MAX __INT64_MAX
65# define LLONG_MIN __INT64_MIN
66#endif
67
68/* This include file assumes that signed types are two's complement without
69 padding bits; the above macros have undefined behavior otherwise.
70 If this is a problem for you, please let us know how to fix it for your host.
71 This assumption is tested by the intprops-tests module. */
72
73/* Does the __typeof__ keyword work? This could be done by
74 'configure', but for now it's easier to do it by hand. */
75#if (2 <= __GNUC__ \
76 || (4 <= __clang_major__) \
77 || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
78 || (0x5110 <= __SUNPRO_C && !__STDC__))
79# define _GL_HAVE___TYPEOF__ 1
80#else
81# define _GL_HAVE___TYPEOF__ 0
82#endif
83
84/* Return 1 if the integer type or expression T might be signed. Return 0
85 if it is definitely unsigned. T must not be a bit-field expression.
86 This macro does not evaluate its argument, and expands to an
87 integer constant expression. */
88#if _GL_HAVE___TYPEOF__
89# define _GL_SIGNED_TYPE_OR_EXPR(t) _GL_TYPE_SIGNED (__typeof__ (t))
90#else
91# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
92#endif
93
94/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
95 A should not have side effects, and A's type should be an
96 integer with minimum value MIN and maximum MAX. */
97#define _GL_INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
98 ((min) < 0 ? (a) < - (max) : 0 < (a))
99
100/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
101 (A, B, P) work when P is non-null. */
102#ifdef __EDG__
103/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
104 <https://bugs.gnu.org/53256>. */
105# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
106#elif defined __has_builtin
107# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
108/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
109 see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
110#elif 7 <= __GNUC__
111# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
112#else
113# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
114#endif
115
116/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */
117#if defined __clang_major__ && __clang_major__ < 14
118/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */
119# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
120#else
121# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
122#endif
123
124/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
125 __builtin_sub_overflow_p and __builtin_mul_overflow_p. */
126#ifdef __EDG__
127/* In EDG-based compilers like ICC 2021.3 and earlier,
128 __builtin_add_overflow_p etc. are not treated as integral constant
129 expressions even when all arguments are. */
130# define _GL_HAS_BUILTIN_OVERFLOW_P 0
131#elif defined __has_builtin
132# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
133#else
134# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
135#endif
136
137#if (!defined _GL_STDCKDINT_H && 202311 <= __STDC_VERSION__ \
138 && ! (_GL_HAS_BUILTIN_ADD_OVERFLOW && _GL_HAS_BUILTIN_MUL_OVERFLOW))
139# include <stdckdint.h>
140#endif
141
142/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
143 Return 1 if the result overflows. Arguments should not have side
144 effects and A, B and *R can be of any integer type other than char,
145 bool, a bit-precise integer type, or an enumeration type. */
146#if _GL_HAS_BUILTIN_ADD_OVERFLOW
147# define _GL_INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
148# define _GL_INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
149#elif defined ckd_add && defined ckd_sub && !defined _GL_STDCKDINT_H
150# define _GL_INT_ADD_WRAPV(a, b, r) ckd_add (r, + (a), + (b))
151# define _GL_INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, + (a), + (b))
152#else
153# define _GL_INT_ADD_WRAPV(a, b, r) \
154 _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
155# define _GL_INT_SUBTRACT_WRAPV(a, b, r) \
156 _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
157#endif
158#if _GL_HAS_BUILTIN_MUL_OVERFLOW
159# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
160 || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
161 && !defined __EDG__)
162# define _GL_INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
163# else
164 /* Work around GCC bug 91450. */
165# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
166 ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \
167 && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
168 ? ((void) __builtin_mul_overflow (a, b, r), 1) \
169 : __builtin_mul_overflow (a, b, r))
170# endif
171#elif defined ckd_mul && !defined _GL_STDCKDINT_H
172# define _GL_INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, + (a), + (b))
173#else
174# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
175 _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
176#endif
177
178/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
179 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
180 https://llvm.org/bugs/show_bug.cgi?id=25390
181 For now, assume all versions of GCC-like compilers generate bogus
182 warnings for _Generic. This matters only for compilers that
183 lack relevant builtins. */
184#if __GNUC__ || defined __clang__
185# define _GL__GENERIC_BOGUS 1
186#else
187# define _GL__GENERIC_BOGUS 0
188#endif
189
190/* Store the low-order bits of A <op> B into *R, where OP specifies
191 the operation and OVERFLOW the overflow predicate. Return 1 if the
192 result overflows. Arguments should not have side effects,
193 and A, B and *R can be of any integer type other than char, bool, a
194 bit-precise integer type, or an enumeration type. */
195#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
196# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
197 (_Generic \
198 (*(r), \
199 signed char: \
200 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
201 signed char, SCHAR_MIN, SCHAR_MAX), \
202 unsigned char: \
203 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
204 unsigned char, 0, UCHAR_MAX), \
205 short int: \
206 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
207 short int, SHRT_MIN, SHRT_MAX), \
208 unsigned short int: \
209 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
210 unsigned short int, 0, USHRT_MAX), \
211 int: \
212 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
213 int, INT_MIN, INT_MAX), \
214 unsigned int: \
215 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
216 unsigned int, 0, UINT_MAX), \
217 long int: \
218 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
219 long int, LONG_MIN, LONG_MAX), \
220 unsigned long int: \
221 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
222 unsigned long int, 0, ULONG_MAX), \
223 long long int: \
224 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
225 long long int, LLONG_MIN, LLONG_MAX), \
226 unsigned long long int: \
227 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
228 unsigned long long int, 0, ULLONG_MAX)))
229#else
230/* Store the low-order bits of A <op> B into *R, where OP specifies
231 the operation and OVERFLOW the overflow predicate. If *R is
232 signed, its type is ST with bounds SMIN..SMAX; otherwise its type
233 is UT with bounds U..UMAX. ST and UT are narrower than int.
234 Return 1 if the result overflows. Arguments should not have side
235 effects, and A, B and *R can be of any integer type other than
236 char, bool, a bit-precise integer type, or an enumeration type. */
237# if _GL_HAVE___TYPEOF__
238# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
239 (_GL_TYPE_SIGNED (__typeof__ (*(r))) \
240 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
241 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
242# else
243# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
244 (overflow (a, b, smin, smax) \
245 ? (overflow (a, b, 0, umax) \
246 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
247 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
248 : (overflow (a, b, 0, umax) \
249 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
250 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
251# endif
252
253# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
254 (sizeof *(r) == sizeof (signed char) \
255 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
256 signed char, SCHAR_MIN, SCHAR_MAX, \
257 unsigned char, UCHAR_MAX) \
258 : sizeof *(r) == sizeof (short int) \
259 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
260 short int, SHRT_MIN, SHRT_MAX, \
261 unsigned short int, USHRT_MAX) \
262 : sizeof *(r) == sizeof (int) \
263 ? (_GL_EXPR_SIGNED (*(r)) \
264 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
265 int, INT_MIN, INT_MAX) \
266 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
267 unsigned int, 0, UINT_MAX)) \
268 : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
269# ifdef LLONG_MAX
270# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
271 (sizeof *(r) == sizeof (long int) \
272 ? (_GL_EXPR_SIGNED (*(r)) \
273 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
274 long int, LONG_MIN, LONG_MAX) \
275 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
276 unsigned long int, 0, ULONG_MAX)) \
277 : (_GL_EXPR_SIGNED (*(r)) \
278 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
279 long long int, LLONG_MIN, LLONG_MAX) \
280 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
281 unsigned long long int, 0, ULLONG_MAX)))
282# else
283# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
284 (_GL_EXPR_SIGNED (*(r)) \
285 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
286 long int, LONG_MIN, LONG_MAX) \
287 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
288 unsigned long int, 0, ULONG_MAX))
289# endif
290#endif
291
292/* Store the low-order bits of A <op> B into *R, where the operation
293 is given by OP. Use the unsigned type UT for calculation to avoid
294 overflow problems. *R's type is T, with extrema TMIN and TMAX.
295 T can be any signed integer type other than char, bool, a
296 bit-precise integer type, or an enumeration type.
297 Return 1 if the result overflows. */
298#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
299 (overflow (a, b, tmin, tmax) \
300 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
301 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
302
303/* Return 1 if the integer expressions A - B and -A would overflow,
304 respectively. Arguments should not have side effects,
305 and can be any signed integer type other than char, bool, a
306 bit-precise integer type, or an enumeration type.
307 These macros are tuned for their last input argument being a constant. */
308
309#if _GL_HAS_BUILTIN_OVERFLOW_P
310# define _GL_INT_NEGATE_OVERFLOW(a) \
311 __builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0)
312#else
313# define _GL_INT_NEGATE_OVERFLOW(a) \
314 _GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
315#endif
316
317/* Return the low-order bits of A <op> B, where the operation is given
318 by OP. Use the unsigned type UT for calculation to avoid undefined
319 behavior on signed integer overflow, and convert the result to type T.
320 UT is at least as wide as T and is no narrower than unsigned int,
321 T is two's complement, and there is no padding or trap representations.
322 Assume that converting UT to T yields the low-order bits, as is
323 done in all known two's-complement C compilers. E.g., see:
324 https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
325
326 According to the C standard, converting UT to T yields an
327 implementation-defined result or signal for values outside T's
328 range. However, code that works around this theoretical problem
329 runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
330 https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
331 As the compiler bug is real, don't try to work around the
332 theoretical problem. */
333
334#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
335 ((t) ((ut) (a) op (ut) (b)))
336
337/* Return true if the numeric values A + B, A - B, A * B fall outside
338 the range TMIN..TMAX. Arguments should not have side effects
339 and can be any integer type other than char, bool,
340 a bit-precise integer type, or an enumeration type.
341 TMIN should be signed and nonpositive.
342 TMAX should be positive, and should be signed unless TMIN is zero. */
343#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
344 ((b) < 0 \
345 ? (((tmin) \
346 ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
347 && (a) < (tmin) - (b)) \
348 : (a) <= -1 - (b)) \
349 || ((_GL_EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
350 : (a) < 0 \
351 ? (((tmin) \
352 ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
353 && (b) < (tmin) - (a)) \
354 : (b) <= -1 - (a)) \
355 || ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
356 && (tmax) < (a) + (b))) \
357 : (tmax) < (b) || (tmax) - (b) < (a))
358#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
359 (((a) < 0) == ((b) < 0) \
360 ? ((a) < (b) \
361 ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
362 : (tmax) < (a) - (b)) \
363 : (a) < 0 \
364 ? ((!_GL_EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
365 || (a) - (tmin) < (b)) \
366 : ((! (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
367 && _GL_EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
368 && (tmax) <= -1 - (b)) \
369 || (tmax) + (b) < (a)))
370#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
371 ((b) < 0 \
372 ? ((a) < 0 \
373 ? (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
374 ? (a) < (tmax) / (b) \
375 : ((_GL_INT_NEGATE_OVERFLOW (b) \
376 ? _GL_INT_CONVERT (b, tmax) >> (_GL_TYPE_WIDTH (+ (b)) - 1) \
377 : (tmax) / -(b)) \
378 <= -1 - (a))) \
379 : _GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
380 ? (_GL_EXPR_SIGNED (a) \
381 ? 0 < (a) + (tmin) \
382 : 0 < (a) && -1 - (tmin) < (a) - 1) \
383 : (tmin) / (b) < (a)) \
384 : (b) == 0 \
385 ? 0 \
386 : ((a) < 0 \
387 ? (_GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
388 ? (_GL_EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
389 : (tmin) / (a) < (b)) \
390 : (tmax) / (b) < (a)))
391
392#endif /* _GL_INTPROPS_INTERNAL_H */
diff --git a/gl/intprops.h b/gl/intprops.h
index 3fe64e8..f182ddc 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -1,6 +1,6 @@
1/* intprops.h -- properties of integer types 1/* intprops.h -- properties of integer types
2 2
3 Copyright (C) 2001-2021 Free Software Foundation, Inc. 3 Copyright (C) 2001-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify it 5 This program is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published 6 under the terms of the GNU Lesser General Public License as published
@@ -15,19 +15,10 @@
15 You should have received a copy of the GNU Lesser General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18
19#ifndef _GL_INTPROPS_H 18#ifndef _GL_INTPROPS_H
20#define _GL_INTPROPS_H 19#define _GL_INTPROPS_H
21 20
22#include <limits.h> 21#include "intprops-internal.h"
23
24/* Return a value with the common real type of E and V and the value of V.
25 Do not evaluate E. */
26#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
27
28/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
29 <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
30#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
31 22
32/* The extra casts in the following macros work around compiler bugs, 23/* The extra casts in the following macros work around compiler bugs,
33 e.g., in Cray C 5.0.3.0. */ 24 e.g., in Cray C 5.0.3.0. */
@@ -37,11 +28,11 @@
37#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) 28#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
38 29
39/* True if the real type T is signed. */ 30/* True if the real type T is signed. */
40#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) 31#define TYPE_SIGNED(t) _GL_TYPE_SIGNED (t)
41 32
42/* Return 1 if the real expression E, after promotion, has a 33/* Return 1 if the real expression E, after promotion, has a
43 signed or floating type. Do not evaluate E. */ 34 signed or floating type. Do not evaluate E. */
44#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) 35#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
45 36
46 37
47/* Minimum and maximum values for integer types and expressions. */ 38/* Minimum and maximum values for integer types and expressions. */
@@ -49,7 +40,7 @@
49/* The width in bits of the integer type or expression T. 40/* The width in bits of the integer type or expression T.
50 Do not evaluate T. T must not be a bit-field expression. 41 Do not evaluate T. T must not be a bit-field expression.
51 Padding bits are not supported; this is checked at compile-time below. */ 42 Padding bits are not supported; this is checked at compile-time below. */
52#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) 43#define TYPE_WIDTH(t) _GL_TYPE_WIDTH (t)
53 44
54/* The maximum and minimum values for the integer type T. */ 45/* The maximum and minimum values for the integer type T. */
55#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) 46#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
@@ -58,51 +49,6 @@
58 ? (t) -1 \ 49 ? (t) -1 \
59 : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) 50 : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
60 51
61/* The maximum and minimum values for the type of the expression E,
62 after integer promotion. E is not evaluated. */
63#define _GL_INT_MINIMUM(e) \
64 (EXPR_SIGNED (e) \
65 ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
66 : _GL_INT_CONVERT (e, 0))
67#define _GL_INT_MAXIMUM(e) \
68 (EXPR_SIGNED (e) \
69 ? _GL_SIGNED_INT_MAXIMUM (e) \
70 : _GL_INT_NEGATE_CONVERT (e, 1))
71#define _GL_SIGNED_INT_MAXIMUM(e) \
72 (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
73
74/* Work around OpenVMS incompatibility with C99. */
75#if !defined LLONG_MAX && defined __INT64_MAX
76# define LLONG_MAX __INT64_MAX
77# define LLONG_MIN __INT64_MIN
78#endif
79
80/* This include file assumes that signed types are two's complement without
81 padding bits; the above macros have undefined behavior otherwise.
82 If this is a problem for you, please let us know how to fix it for your host.
83 This assumption is tested by the intprops-tests module. */
84
85/* Does the __typeof__ keyword work? This could be done by
86 'configure', but for now it's easier to do it by hand. */
87#if (2 <= __GNUC__ \
88 || (4 <= __clang_major__) \
89 || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
90 || (0x5110 <= __SUNPRO_C && !__STDC__))
91# define _GL_HAVE___TYPEOF__ 1
92#else
93# define _GL_HAVE___TYPEOF__ 0
94#endif
95
96/* Return 1 if the integer type or expression T might be signed. Return 0
97 if it is definitely unsigned. T must not be a bit-field expression.
98 This macro does not evaluate its argument, and expands to an
99 integer constant expression. */
100#if _GL_HAVE___TYPEOF__
101# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
102#else
103# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
104#endif
105
106/* Bound on length of the string representing an unsigned integer 52/* Bound on length of the string representing an unsigned integer
107 value representable in B bits. log10 (2.0) < 146/485. The 53 value representable in B bits. log10 (2.0) < 146/485. The
108 smallest value of B where this bound is not tight is 2621. */ 54 smallest value of B where this bound is not tight is 2621. */
@@ -129,12 +75,11 @@
129/* Range overflow checks. 75/* Range overflow checks.
130 76
131 The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C 77 The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
132 operators might not yield numerically correct answers due to 78 operators overflow arithmetically when given the same arguments.
133 arithmetic overflow. They do not rely on undefined or 79 These macros do not rely on undefined or implementation-defined behavior.
134 implementation-defined behavior. Their implementations are simple 80 Although their implementations are simple and straightforward,
135 and straightforward, but they are harder to use and may be less 81 they are harder to use and may be less efficient than the
136 efficient than the INT_<op>_WRAPV, INT_<op>_OK, and 82 INT_<op>_WRAPV, INT_<op>_OK, and INT_<op>_OVERFLOW macros described below.
137 INT_<op>_OVERFLOW macros described below.
138 83
139 Example usage: 84 Example usage:
140 85
@@ -181,9 +126,7 @@
181/* Return 1 if - A would overflow in [MIN,MAX] arithmetic. 126/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
182 See above for restrictions. */ 127 See above for restrictions. */
183#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ 128#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
184 ((min) < 0 \ 129 _GL_INT_NEGATE_RANGE_OVERFLOW (a, min, max)
185 ? (a) < - (max) \
186 : 0 < (a))
187 130
188/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. 131/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
189 See above for restrictions. Avoid && and || as they tickle 132 See above for restrictions. Avoid && and || as they tickle
@@ -227,40 +170,6 @@
227 ? (a) < (min) >> (b) \ 170 ? (a) < (min) >> (b) \
228 : (max) >> (b) < (a)) 171 : (max) >> (b) < (a))
229 172
230/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
231 (A, B, P) work when P is non-null. */
232/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
233 see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
234#if 7 <= __GNUC__ && !defined __ICC
235# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
236#elif defined __has_builtin
237# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
238#else
239# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
240#endif
241
242/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */
243#ifdef __clang__
244/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */
245# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
246#else
247# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
248#endif
249
250/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
251 __builtin_sub_overflow_p and __builtin_mul_overflow_p. */
252#if defined __clang__ || defined __ICC
253/* Clang 11 lacks __builtin_mul_overflow_p, and even if it did it
254 would presumably run afoul of Clang bug 16404. ICC 2021.1's
255 __builtin_add_overflow_p etc. are not treated as integral constant
256 expressions even when all arguments are. */
257# define _GL_HAS_BUILTIN_OVERFLOW_P 0
258#elif defined __has_builtin
259# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
260#else
261# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
262#endif
263
264/* The _GL*_OVERFLOW macros have the same restrictions as the 173/* The _GL*_OVERFLOW macros have the same restrictions as the
265 *_RANGE_OVERFLOW macros, except that they do not assume that operands 174 *_RANGE_OVERFLOW macros, except that they do not assume that operands
266 (e.g., A and B) have the same type as MIN and MAX. Instead, they assume 175 (e.g., A and B) have the same type as MIN and MAX. Instead, they assume
@@ -347,13 +256,18 @@
347 Because the WRAPV macros convert the result, they report overflow 256 Because the WRAPV macros convert the result, they report overflow
348 in different circumstances than the OVERFLOW macros do. For 257 in different circumstances than the OVERFLOW macros do. For
349 example, in the typical case with 16-bit 'short' and 32-bit 'int', 258 example, in the typical case with 16-bit 'short' and 32-bit 'int',
350 if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B) 259 if A, B and *R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
351 returns false because the addition cannot overflow after A and B 260 returns false because the addition cannot overflow after A and B
352 are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns 261 are converted to 'int', whereas INT_ADD_WRAPV (A, B, R) returns
353 true or false depending on whether the sum fits into 'short'. 262 true or false depending on whether the sum fits into 'short'.
354 263
355 These macros are tuned for their last input argument being a constant. 264 These macros are tuned for their last input argument being a constant.
356 265
266 A, B, and *R should be integers; they need not be the same type,
267 and they need not be all signed or all unsigned.
268 However, none of the integer types should be bit-precise,
269 and *R's type should not be char, bool, or an enumeration type.
270
357 Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, 271 Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
358 A % B, and A << B would overflow, respectively. */ 272 A % B, and A << B would overflow, respectively. */
359 273
@@ -361,12 +275,7 @@
361 _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) 275 _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
362#define INT_SUBTRACT_OVERFLOW(a, b) \ 276#define INT_SUBTRACT_OVERFLOW(a, b) \
363 _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) 277 _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
364#if _GL_HAS_BUILTIN_OVERFLOW_P 278#define INT_NEGATE_OVERFLOW(a) _GL_INT_NEGATE_OVERFLOW (a)
365# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
366#else
367# define INT_NEGATE_OVERFLOW(a) \
368 INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
369#endif
370#define INT_MULTIPLY_OVERFLOW(a, b) \ 279#define INT_MULTIPLY_OVERFLOW(a, b) \
371 _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) 280 _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
372#define INT_DIVIDE_OVERFLOW(a, b) \ 281#define INT_DIVIDE_OVERFLOW(a, b) \
@@ -388,224 +297,9 @@
388 297
389/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R. 298/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
390 Return 1 if the result overflows. See above for restrictions. */ 299 Return 1 if the result overflows. See above for restrictions. */
391#if _GL_HAS_BUILTIN_ADD_OVERFLOW 300#define INT_ADD_WRAPV(a, b, r) _GL_INT_ADD_WRAPV (a, b, r)
392# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r) 301#define INT_SUBTRACT_WRAPV(a, b, r) _GL_INT_SUBTRACT_WRAPV (a, b, r)
393# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r) 302#define INT_MULTIPLY_WRAPV(a, b, r) _GL_INT_MULTIPLY_WRAPV (a, b, r)
394#else
395# define INT_ADD_WRAPV(a, b, r) \
396 _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
397# define INT_SUBTRACT_WRAPV(a, b, r) \
398 _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
399#endif
400#if _GL_HAS_BUILTIN_MUL_OVERFLOW
401# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
402 || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
403 && !defined __ICC)
404# define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
405# else
406 /* Work around GCC bug 91450. */
407# define INT_MULTIPLY_WRAPV(a, b, r) \
408 ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
409 && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
410 ? ((void) __builtin_mul_overflow (a, b, r), 1) \
411 : __builtin_mul_overflow (a, b, r))
412# endif
413#else
414# define INT_MULTIPLY_WRAPV(a, b, r) \
415 _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
416#endif
417
418/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
419 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
420 https://llvm.org/bugs/show_bug.cgi?id=25390
421 For now, assume all versions of GCC-like compilers generate bogus
422 warnings for _Generic. This matters only for compilers that
423 lack relevant builtins. */
424#if __GNUC__ || defined __clang__
425# define _GL__GENERIC_BOGUS 1
426#else
427# define _GL__GENERIC_BOGUS 0
428#endif
429
430/* Store the low-order bits of A <op> B into *R, where OP specifies
431 the operation and OVERFLOW the overflow predicate. Return 1 if the
432 result overflows. See above for restrictions. */
433#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
434# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
435 (_Generic \
436 (*(r), \
437 signed char: \
438 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
439 signed char, SCHAR_MIN, SCHAR_MAX), \
440 unsigned char: \
441 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
442 unsigned char, 0, UCHAR_MAX), \
443 short int: \
444 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
445 short int, SHRT_MIN, SHRT_MAX), \
446 unsigned short int: \
447 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
448 unsigned short int, 0, USHRT_MAX), \
449 int: \
450 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
451 int, INT_MIN, INT_MAX), \
452 unsigned int: \
453 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
454 unsigned int, 0, UINT_MAX), \
455 long int: \
456 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
457 long int, LONG_MIN, LONG_MAX), \
458 unsigned long int: \
459 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
460 unsigned long int, 0, ULONG_MAX), \
461 long long int: \
462 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
463 long long int, LLONG_MIN, LLONG_MAX), \
464 unsigned long long int: \
465 _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
466 unsigned long long int, 0, ULLONG_MAX)))
467#else
468/* Store the low-order bits of A <op> B into *R, where OP specifies
469 the operation and OVERFLOW the overflow predicate. If *R is
470 signed, its type is ST with bounds SMIN..SMAX; otherwise its type
471 is UT with bounds U..UMAX. ST and UT are narrower than int.
472 Return 1 if the result overflows. See above for restrictions. */
473# if _GL_HAVE___TYPEOF__
474# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
475 (TYPE_SIGNED (__typeof__ (*(r))) \
476 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
477 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
478# else
479# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
480 (overflow (a, b, smin, smax) \
481 ? (overflow (a, b, 0, umax) \
482 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
483 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
484 : (overflow (a, b, 0, umax) \
485 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
486 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
487# endif
488
489# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
490 (sizeof *(r) == sizeof (signed char) \
491 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
492 signed char, SCHAR_MIN, SCHAR_MAX, \
493 unsigned char, UCHAR_MAX) \
494 : sizeof *(r) == sizeof (short int) \
495 ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
496 short int, SHRT_MIN, SHRT_MAX, \
497 unsigned short int, USHRT_MAX) \
498 : sizeof *(r) == sizeof (int) \
499 ? (EXPR_SIGNED (*(r)) \
500 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
501 int, INT_MIN, INT_MAX) \
502 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
503 unsigned int, 0, UINT_MAX)) \
504 : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
505# ifdef LLONG_MAX
506# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
507 (sizeof *(r) == sizeof (long int) \
508 ? (EXPR_SIGNED (*(r)) \
509 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
510 long int, LONG_MIN, LONG_MAX) \
511 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
512 unsigned long int, 0, ULONG_MAX)) \
513 : (EXPR_SIGNED (*(r)) \
514 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
515 long long int, LLONG_MIN, LLONG_MAX) \
516 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
517 unsigned long long int, 0, ULLONG_MAX)))
518# else
519# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
520 (EXPR_SIGNED (*(r)) \
521 ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
522 long int, LONG_MIN, LONG_MAX) \
523 : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
524 unsigned long int, 0, ULONG_MAX))
525# endif
526#endif
527
528/* Store the low-order bits of A <op> B into *R, where the operation
529 is given by OP. Use the unsigned type UT for calculation to avoid
530 overflow problems. *R's type is T, with extrema TMIN and TMAX.
531 T must be a signed integer type. Return 1 if the result overflows. */
532#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
533 (overflow (a, b, tmin, tmax) \
534 ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
535 : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
536
537/* Return the low-order bits of A <op> B, where the operation is given
538 by OP. Use the unsigned type UT for calculation to avoid undefined
539 behavior on signed integer overflow, and convert the result to type T.
540 UT is at least as wide as T and is no narrower than unsigned int,
541 T is two's complement, and there is no padding or trap representations.
542 Assume that converting UT to T yields the low-order bits, as is
543 done in all known two's-complement C compilers. E.g., see:
544 https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
545
546 According to the C standard, converting UT to T yields an
547 implementation-defined result or signal for values outside T's
548 range. However, code that works around this theoretical problem
549 runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
550 https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
551 As the compiler bug is real, don't try to work around the
552 theoretical problem. */
553
554#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
555 ((t) ((ut) (a) op (ut) (b)))
556
557/* Return true if the numeric values A + B, A - B, A * B fall outside
558 the range TMIN..TMAX. Arguments should be integer expressions
559 without side effects. TMIN should be signed and nonpositive.
560 TMAX should be positive, and should be signed unless TMIN is zero. */
561#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
562 ((b) < 0 \
563 ? (((tmin) \
564 ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
565 && (a) < (tmin) - (b)) \
566 : (a) <= -1 - (b)) \
567 || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
568 : (a) < 0 \
569 ? (((tmin) \
570 ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
571 && (b) < (tmin) - (a)) \
572 : (b) <= -1 - (a)) \
573 || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
574 && (tmax) < (a) + (b))) \
575 : (tmax) < (b) || (tmax) - (b) < (a))
576#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
577 (((a) < 0) == ((b) < 0) \
578 ? ((a) < (b) \
579 ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
580 : (tmax) < (a) - (b)) \
581 : (a) < 0 \
582 ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
583 || (a) - (tmin) < (b)) \
584 : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
585 && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
586 && (tmax) <= -1 - (b)) \
587 || (tmax) + (b) < (a)))
588#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
589 ((b) < 0 \
590 ? ((a) < 0 \
591 ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
592 ? (a) < (tmax) / (b) \
593 : ((INT_NEGATE_OVERFLOW (b) \
594 ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
595 : (tmax) / -(b)) \
596 <= -1 - (a))) \
597 : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
598 ? (EXPR_SIGNED (a) \
599 ? 0 < (a) + (tmin) \
600 : 0 < (a) && -1 - (tmin) < (a) - 1) \
601 : (tmin) / (b) < (a)) \
602 : (b) == 0 \
603 ? 0 \
604 : ((a) < 0 \
605 ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
606 ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
607 : (tmin) / (a) < (b)) \
608 : (tmax) / (b) < (a)))
609 303
610/* The following macros compute A + B, A - B, and A * B, respectively. 304/* The following macros compute A + B, A - B, and A * B, respectively.
611 If no overflow occurs, they set *R to the result and return 1; 305 If no overflow occurs, they set *R to the result and return 1;
@@ -621,6 +315,8 @@
621 315
622 A, B, and *R should be integers; they need not be the same type, 316 A, B, and *R should be integers; they need not be the same type,
623 and they need not be all signed or all unsigned. 317 and they need not be all signed or all unsigned.
318 However, none of the integer types should be bit-precise,
319 and *R's type should not be char, bool, or an enumeration type.
624 320
625 These macros work correctly on all known practical hosts, and do not rely 321 These macros work correctly on all known practical hosts, and do not rely
626 on undefined behavior due to signed arithmetic overflow. 322 on undefined behavior due to signed arithmetic overflow.
@@ -632,8 +328,8 @@
632 328
633 These macros are tuned for B being a constant. */ 329 These macros are tuned for B being a constant. */
634 330
635#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r) 331#define INT_ADD_OK(a, b, r) (! INT_ADD_WRAPV (a, b, r))
636#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r) 332#define INT_SUBTRACT_OK(a, b, r) (! INT_SUBTRACT_WRAPV (a, b, r))
637#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r) 333#define INT_MULTIPLY_OK(a, b, r) (! INT_MULTIPLY_WRAPV (a, b, r))
638 334
639#endif /* _GL_INTPROPS_H */ 335#endif /* _GL_INTPROPS_H */
diff --git a/gl/inttypes.in.h b/gl/inttypes.in.h
index 41cb422..853eca0 100644
--- a/gl/inttypes.in.h
+++ b/gl/inttypes.in.h
@@ -1,4 +1,4 @@
1/* Copyright (C) 2006-2021 Free Software Foundation, Inc. 1/* Copyright (C) 2006-2022 Free Software Foundation, Inc.
2 Written by Paul Eggert, Bruno Haible, Derek Price. 2 Written by Paul Eggert, Bruno Haible, Derek Price.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 4
diff --git a/gl/itold.c b/gl/itold.c
index 7984866..fe4a384 100644
--- a/gl/itold.c
+++ b/gl/itold.c
@@ -1,5 +1,5 @@
1/* Replacement for 'int' to 'long double' conversion routine. 1/* Replacement for 'int' to 'long double' conversion routine.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011. 3 Written by Bruno Haible <bruno@clisp.org>, 2011.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/langinfo.in.h b/gl/langinfo.in.h
index 4873899..98aea6a 100644
--- a/gl/langinfo.in.h
+++ b/gl/langinfo.in.h
@@ -1,5 +1,5 @@
1/* Substitute for and wrapper around <langinfo.h>. 1/* Substitute for and wrapper around <langinfo.h>.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lc-charset-dispatch.c b/gl/lc-charset-dispatch.c
index 88a0bd3..66d78fd 100644
--- a/gl/lc-charset-dispatch.c
+++ b/gl/lc-charset-dispatch.c
@@ -1,5 +1,5 @@
1/* Dispatching based on the current locale's character encoding. 1/* Dispatching based on the current locale's character encoding.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc. 2 Copyright (C) 2018-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lc-charset-dispatch.h b/gl/lc-charset-dispatch.h
index 59b485d..3867c32 100644
--- a/gl/lc-charset-dispatch.h
+++ b/gl/lc-charset-dispatch.h
@@ -1,5 +1,5 @@
1/* Dispatching based on the current locale's character encoding. 1/* Dispatching based on the current locale's character encoding.
2 Copyright (C) 2018-2021 Free Software Foundation, Inc. 2 Copyright (C) 2018-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/libc-config.h b/gl/libc-config.h
index 886c11f..a56665b 100644
--- a/gl/libc-config.h
+++ b/gl/libc-config.h
@@ -1,6 +1,6 @@
1/* System definitions for code taken from the GNU C Library 1/* System definitions for code taken from the GNU C Library
2 2
3 Copyright 2017-2021 Free Software Foundation, Inc. 3 Copyright 2017-2022 Free Software Foundation, Inc.
4 4
5 This program is free software; you can redistribute it and/or 5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -121,6 +121,7 @@
121# undef __attr_dealloc 121# undef __attr_dealloc
122# undef __attr_dealloc_free 122# undef __attr_dealloc_free
123# undef __attribute__ 123# undef __attribute__
124# undef __attribute_alloc_align__
124# undef __attribute_alloc_size__ 125# undef __attribute_alloc_size__
125# undef __attribute_artificial__ 126# undef __attribute_artificial__
126# undef __attribute_const__ 127# undef __attribute_const__
@@ -129,6 +130,7 @@
129# undef __attribute_format_arg__ 130# undef __attribute_format_arg__
130# undef __attribute_format_strfmon__ 131# undef __attribute_format_strfmon__
131# undef __attribute_malloc__ 132# undef __attribute_malloc__
133# undef __attribute_maybe_unused__
132# undef __attribute_noinline__ 134# undef __attribute_noinline__
133# undef __attribute_nonstring__ 135# undef __attribute_nonstring__
134# undef __attribute_pure__ 136# undef __attribute_pure__
@@ -142,16 +144,24 @@
142# undef __extern_always_inline 144# undef __extern_always_inline
143# undef __extern_inline 145# undef __extern_inline
144# undef __flexarr 146# undef __flexarr
147# undef __fortified_attr_access
145# undef __fortify_function 148# undef __fortify_function
146# undef __glibc_c99_flexarr_available 149# undef __glibc_c99_flexarr_available
150# undef __glibc_fortify
151# undef __glibc_fortify_n
147# undef __glibc_has_attribute 152# undef __glibc_has_attribute
148# undef __glibc_has_builtin 153# undef __glibc_has_builtin
149# undef __glibc_has_extension 154# undef __glibc_has_extension
155# undef __glibc_likely
150# undef __glibc_macro_warning 156# undef __glibc_macro_warning
151# undef __glibc_macro_warning1 157# undef __glibc_macro_warning1
152# undef __glibc_objsize 158# undef __glibc_objsize
153# undef __glibc_objsize0 159# undef __glibc_objsize0
160# undef __glibc_safe_len_cond
161# undef __glibc_safe_or_unknown_len
154# undef __glibc_unlikely 162# undef __glibc_unlikely
163# undef __glibc_unsafe_len
164# undef __glibc_unsigned_or_positive
155# undef __inline 165# undef __inline
156# undef __ptr_t 166# undef __ptr_t
157# undef __restrict 167# undef __restrict
@@ -159,6 +169,7 @@
159# undef __va_arg_pack 169# undef __va_arg_pack
160# undef __va_arg_pack_len 170# undef __va_arg_pack_len
161# undef __warnattr 171# undef __warnattr
172# undef __wur
162 173
163/* Include our copy of glibc <sys/cdefs.h>. */ 174/* Include our copy of glibc <sys/cdefs.h>. */
164# include <cdefs.h> 175# include <cdefs.h>
diff --git a/gl/limits.in.h b/gl/limits.in.h
index 2ecafeb..b77bf75 100644
--- a/gl/limits.in.h
+++ b/gl/limits.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <limits.h>. 1/* A GNU-like <limits.h>.
2 2
3 Copyright 2016-2021 Free Software Foundation, Inc. 3 Copyright 2016-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/localcharset.c b/gl/localcharset.c
index 3c50858..17a4a1e 100644
--- a/gl/localcharset.c
+++ b/gl/localcharset.c
@@ -1,6 +1,6 @@
1/* Determine a canonical name for the current locale's character encoding. 1/* Determine a canonical name for the current locale's character encoding.
2 2
3 Copyright (C) 2000-2006, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2000-2006, 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/localcharset.h b/gl/localcharset.h
index 0ff4954..62efbf3 100644
--- a/gl/localcharset.h
+++ b/gl/localcharset.h
@@ -1,5 +1,5 @@
1/* Determine a canonical name for the current locale's character encoding. 1/* Determine a canonical name for the current locale's character encoding.
2 Copyright (C) 2000-2003, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2000-2003, 2009-2022 Free Software Foundation, Inc.
3 This file is part of the GNU CHARSET Library. 3 This file is part of the GNU CHARSET Library.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/locale.in.h b/gl/locale.in.h
index 1063070..4aef74d 100644
--- a/gl/locale.in.h
+++ b/gl/locale.in.h
@@ -1,5 +1,5 @@
1/* A POSIX <locale.h>. 1/* A POSIX <locale.h>.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/localeconv.c b/gl/localeconv.c
index 25e95a1..ef26120 100644
--- a/gl/localeconv.c
+++ b/gl/localeconv.c
@@ -1,5 +1,5 @@
1/* Query locale dependent information for formatting numbers. 1/* Query locale dependent information for formatting numbers.
2 Copyright (C) 2012-2021 Free Software Foundation, Inc. 2 Copyright (C) 2012-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lseek.c b/gl/lseek.c
index e9a96ad..1a9c49b 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -1,5 +1,5 @@
1/* An lseek() function that detects pipes. 1/* An lseek() function that detects pipes.
2 Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index 9ba1743..dea34e8 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
1# 00gnulib.m4 serial 8 1# 00gnulib.m4 serial 8
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/__inline.m4 b/gl/m4/__inline.m4
index b28cc6a..fbe2098 100644
--- a/gl/m4/__inline.m4
+++ b/gl/m4/__inline.m4
@@ -1,5 +1,5 @@
1# Test for __inline keyword 1# Test for __inline keyword
2dnl Copyright 2017-2021 Free Software Foundation, Inc. 2dnl Copyright 2017-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
index 52d80d0..67d6507 100644
--- a/gl/m4/absolute-header.m4
+++ b/gl/m4/absolute-header.m4
@@ -1,5 +1,5 @@
1# absolute-header.m4 serial 17 1# absolute-header.m4 serial 17
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/af_alg.m4 b/gl/m4/af_alg.m4
index 601cf67..9c7edf0 100644
--- a/gl/m4/af_alg.m4
+++ b/gl/m4/af_alg.m4
@@ -1,5 +1,5 @@
1# af_alg.m4 serial 6 1# af_alg.m4 serial 6
2dnl Copyright 2018-2021 Free Software Foundation, Inc. 2dnl Copyright 2018-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index ba2f679..dc6f47e 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
1# alloca.m4 serial 20 1# alloca.m4 serial 21
2dnl Copyright (C) 2002-2004, 2006-2007, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 2002-2004, 2006-2007, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -26,17 +26,15 @@ AC_DEFUN([gl_FUNC_ALLOCA],
26 AC_DEFINE([HAVE_ALLOCA], [1], 26 AC_DEFINE([HAVE_ALLOCA], [1],
27 [Define to 1 if you have 'alloca' after including <alloca.h>, 27 [Define to 1 if you have 'alloca' after including <alloca.h>,
28 a header that may be supplied by this distribution.]) 28 a header that may be supplied by this distribution.])
29 ALLOCA_H=alloca.h 29 GL_GENERATE_ALLOCA_H=true
30 else 30 else
31 dnl alloca exists as a library function, i.e. it is slow and probably 31 dnl alloca exists as a library function, i.e. it is slow and probably
32 dnl a memory leak. Don't define HAVE_ALLOCA in this case. 32 dnl a memory leak. Don't define HAVE_ALLOCA in this case.
33 ALLOCA_H= 33 GL_GENERATE_ALLOCA_H=false
34 fi 34 fi
35 else 35 else
36 ALLOCA_H=alloca.h 36 GL_GENERATE_ALLOCA_H=true
37 fi 37 fi
38 AC_SUBST([ALLOCA_H])
39 AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"])
40 38
41 if test $ac_cv_working_alloca_h = yes; then 39 if test $ac_cv_working_alloca_h = yes; then
42 HAVE_ALLOCA_H=1 40 HAVE_ALLOCA_H=1
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index a3ba256..057e13f 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
1# arpa_inet_h.m4 serial 17 1# arpa_inet_h.m4 serial 17
2dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4
index ab95081..fed3398 100644
--- a/gl/m4/base64.m4
+++ b/gl/m4/base64.m4
@@ -1,5 +1,5 @@
1# base64.m4 serial 4 1# base64.m4 serial 4
2dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index d2b2fe8..45a61f5 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,5 +1,5 @@
1# btowc.m4 serial 12 1# btowc.m4 serial 12
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4
index c584116..b1fb12a 100644
--- a/gl/m4/builtin-expect.m4
+++ b/gl/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
1dnl Check for __builtin_expect. 1dnl Check for __builtin_expect.
2 2
3dnl Copyright 2016-2021 Free Software Foundation, Inc. 3dnl Copyright 2016-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4
index 1083b4c..99aeb68 100644
--- a/gl/m4/byteswap.m4
+++ b/gl/m4/byteswap.m4
@@ -1,5 +1,5 @@
1# byteswap.m4 serial 4 1# byteswap.m4 serial 5
2dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -10,10 +10,8 @@ AC_DEFUN([gl_BYTESWAP],
10[ 10[
11 dnl Prerequisites of lib/byteswap.in.h. 11 dnl Prerequisites of lib/byteswap.in.h.
12 AC_CHECK_HEADERS([byteswap.h], [ 12 AC_CHECK_HEADERS([byteswap.h], [
13 BYTESWAP_H='' 13 GL_GENERATE_BYTESWAP_H=false
14 ], [ 14 ], [
15 BYTESWAP_H='byteswap.h' 15 GL_GENERATE_BYTESWAP_H=true
16 ]) 16 ])
17 AC_SUBST([BYTESWAP_H])
18 AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"])
19]) 17])
diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4
index fe12b15..c01520e 100644
--- a/gl/m4/calloc.m4
+++ b/gl/m4/calloc.m4
@@ -1,6 +1,6 @@
1# calloc.m4 serial 27 1# calloc.m4 serial 29
2 2
3# Copyright (C) 2004-2021 Free Software Foundation, Inc. 3# Copyright (C) 2004-2022 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
@@ -58,8 +58,9 @@ AC_DEFUN([gl_FUNC_CALLOC_GNU],
58[ 58[
59 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 59 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
60 AC_REQUIRE([gl_FUNC_CALLOC_POSIX]) 60 AC_REQUIRE([gl_FUNC_CALLOC_POSIX])
61 if test $REPLACE_CALLOC = 0; then 61 REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
62 _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC=1]) 62 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
63 _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC_FOR_CALLOC_GNU=1])
63 fi 64 fi
64])# gl_FUNC_CALLOC_GNU 65])# gl_FUNC_CALLOC_GNU
65 66
@@ -72,8 +73,8 @@ AC_DEFUN([gl_FUNC_CALLOC_POSIX],
72[ 73[
73 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 74 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
74 AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) 75 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
75 if test $REPLACE_MALLOC = 1; then 76 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
76 REPLACE_CALLOC=1 77 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
77 fi 78 fi
78 dnl Although in theory we should also test for size_t overflow, 79 dnl Although in theory we should also test for size_t overflow,
79 dnl in practice testing for ptrdiff_t overflow suffices 80 dnl in practice testing for ptrdiff_t overflow suffices
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index 77a5047..f95dbc9 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,5 +1,5 @@
1# close.m4 serial 9 1# close.m4 serial 9
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index 629f4ee..eb73260 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,5 +1,5 @@
1# codeset.m4 serial 5 (gettext-0.18.2) 1# codeset.m4 serial 5 (gettext-0.18.2)
2dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2021 Free Software 2dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2022 Free Software
3dnl Foundation, Inc. 3dnl Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index c9bbcef..09ff5f0 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
1# double-slash-root.m4 serial 4 -*- Autoconf -*- 1# double-slash-root.m4 serial 4 -*- Autoconf -*-
2dnl Copyright (C) 2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index 0753a32..7e777cd 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,5 +1,5 @@
1#serial 27 1#serial 27
2dnl Copyright (C) 2002, 2005, 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index 002f0c8..a6aa2f8 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,5 +1,5 @@
1# eealloc.m4 serial 3 1# eealloc.m4 serial 3
2dnl Copyright (C) 2003, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
index ae53291..583dac3 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,5 +1,5 @@
1# environ.m4 serial 8 1# environ.m4 serial 8
2dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 51dfe92..4be9780 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
1# errno_h.m4 serial 13 1# errno_h.m4 serial 14
2dnl Copyright (C) 2004, 2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004, 2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -68,13 +68,11 @@ booboo
68 [gl_cv_header_errno_h_complete=yes]) 68 [gl_cv_header_errno_h_complete=yes])
69 ]) 69 ])
70 if test $gl_cv_header_errno_h_complete = yes; then 70 if test $gl_cv_header_errno_h_complete = yes; then
71 ERRNO_H='' 71 GL_GENERATE_ERRNO_H=false
72 else 72 else
73 gl_NEXT_HEADERS([errno.h]) 73 gl_NEXT_HEADERS([errno.h])
74 ERRNO_H='errno.h' 74 GL_GENERATE_ERRNO_H=true
75 fi 75 fi
76 AC_SUBST([ERRNO_H])
77 AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
78 gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) 76 gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
79 gl_REPLACE_ERRNO_VALUE([ENOLINK]) 77 gl_REPLACE_ERRNO_VALUE([ENOLINK])
80 gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) 78 gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
@@ -88,7 +86,7 @@ booboo
88# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. 86# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
89AC_DEFUN([gl_REPLACE_ERRNO_VALUE], 87AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
90[ 88[
91 if test -n "$ERRNO_H"; then 89 if $GL_GENERATE_ERRNO_H; then
92 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ 90 AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
93 AC_EGREP_CPP([yes],[ 91 AC_EGREP_CPP([yes],[
94#include <errno.h> 92#include <errno.h>
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 8e3cf95..7a10344 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
1#serial 15 1#serial 15
2 2
3# Copyright (C) 1996-1998, 2001-2004, 2009-2021 Free Software Foundation, Inc. 3# Copyright (C) 1996-1998, 2001-2004, 2009-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index fb136f4..83ac08b 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,5 +1,5 @@
1# exponentd.m4 serial 3 1# exponentd.m4 serial 3
2dnl Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 5792a95..0b3e4b5 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
1# serial 22 -*- Autoconf -*- 1# serial 22 -*- Autoconf -*-
2# Enable extensions on systems that normally disable them. 2# Enable extensions on systems that normally disable them.
3 3
4# Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc. 4# Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index a4ac5ea..8a12bdd 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,13 +1,28 @@
1dnl 'extern inline' a la ISO C99. 1dnl 'extern inline' a la ISO C99.
2 2
3dnl Copyright 2012-2021 Free Software Foundation, Inc. 3dnl Copyright 2012-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7 7
8AC_DEFUN([gl_EXTERN_INLINE], 8AC_DEFUN([gl_EXTERN_INLINE],
9[ 9[
10 AH_VERBATIM([extern_inline], 10 AC_CACHE_CHECK([whether ctype.h defines __header_inline],
11 [gl_cv_have___header_inline],
12 [AC_PREPROC_IFELSE(
13 [AC_LANG_SOURCE([[#include <ctype.h>
14 #ifndef __header_inline
15 #error "<ctype.h> does not define __header_inline"
16 #endif
17 ]])],
18 [gl_cv_have___header_inline=yes],
19 [gl_cv_have___header_inline=no])])
20 if test "$gl_cv_have___header_inline" = yes; then
21 AC_DEFINE([HAVE___HEADER_INLINE], [1],
22 [Define to 1 if ctype.h defines __header_inline.])
23 fi
24
25 AH_VERBATIM([HAVE___HEADER_INLINE_1],
11[/* Please see the Gnulib manual for how to use these macros. 26[/* Please see the Gnulib manual for how to use these macros.
12 27
13 Suppress extern inline with HP-UX cc, as it appears to be broken; see 28 Suppress extern inline with HP-UX cc, as it appears to be broken; see
@@ -54,7 +69,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
54 */ 69 */
55#if (((defined __APPLE__ && defined __MACH__) \ 70#if (((defined __APPLE__ && defined __MACH__) \
56 || defined __DragonFly__ || defined __FreeBSD__) \ 71 || defined __DragonFly__ || defined __FreeBSD__) \
57 && (defined __header_inline \ 72 && (defined HAVE___HEADER_INLINE \
58 ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ 73 ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
59 && ! defined __clang__) \ 74 && ! defined __clang__) \
60 : ((! defined _DONT_USE_CTYPE_INLINE_ \ 75 : ((! defined _DONT_USE_CTYPE_INLINE_ \
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 7c459ad..4dcde9e 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
1# fcntl-o.m4 serial 7 1# fcntl-o.m4 serial 7
2dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4
index f626434..428e570 100644
--- a/gl/m4/fcntl.m4
+++ b/gl/m4/fcntl.m4
@@ -1,5 +1,5 @@
1# fcntl.m4 serial 11 1# fcntl.m4 serial 11
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index aba4473..267f98b 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
1# serial 20 1# serial 20
2# Configure fcntl.h. 2# Configure fcntl.h.
3dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. 3dnl Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4
index 43266ef..e36f90e 100644
--- a/gl/m4/fflush.m4
+++ b/gl/m4/fflush.m4
@@ -1,6 +1,6 @@
1# fflush.m4 serial 18 1# fflush.m4 serial 18
2 2
3# Copyright (C) 2007-2021 Free Software Foundation, Inc. 3# Copyright (C) 2007-2022 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index ba38a28..0e84572 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
1# float_h.m4 serial 12 1# float_h.m4 serial 13
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -8,18 +8,18 @@ AC_DEFUN([gl_FLOAT_H],
8[ 8[
9 AC_REQUIRE([AC_PROG_CC]) 9 AC_REQUIRE([AC_PROG_CC])
10 AC_REQUIRE([AC_CANONICAL_HOST]) 10 AC_REQUIRE([AC_CANONICAL_HOST])
11 FLOAT_H= 11 GL_GENERATE_FLOAT_H=false
12 REPLACE_FLOAT_LDBL=0 12 REPLACE_FLOAT_LDBL=0
13 case "$host_os" in 13 case "$host_os" in
14 aix* | beos* | openbsd* | mirbsd* | irix*) 14 aix* | beos* | openbsd* | mirbsd* | irix*)
15 FLOAT_H=float.h 15 GL_GENERATE_FLOAT_H=true
16 ;; 16 ;;
17 freebsd* | dragonfly*) 17 freebsd* | dragonfly*)
18 case "$host_cpu" in 18 case "$host_cpu" in
19changequote(,)dnl 19changequote(,)dnl
20 i[34567]86 ) 20 i[34567]86 )
21changequote([,])dnl 21changequote([,])dnl
22 FLOAT_H=float.h 22 GL_GENERATE_FLOAT_H=true
23 ;; 23 ;;
24 x86_64 ) 24 x86_64 )
25 # On x86_64 systems, the C compiler may still be generating 25 # On x86_64 systems, the C compiler may still be generating
@@ -33,21 +33,21 @@ changequote([,])dnl
33 #endif 33 #endif
34 ]])], 34 ]])],
35 [], 35 [],
36 [FLOAT_H=float.h]) 36 [GL_GENERATE_FLOAT_H=true])
37 ;; 37 ;;
38 esac 38 esac
39 ;; 39 ;;
40 linux*) 40 linux*)
41 case "$host_cpu" in 41 case "$host_cpu" in
42 powerpc*) 42 powerpc*)
43 FLOAT_H=float.h 43 GL_GENERATE_FLOAT_H=true
44 ;; 44 ;;
45 esac 45 esac
46 ;; 46 ;;
47 esac 47 esac
48 case "$host_os" in 48 case "$host_os" in
49 aix* | freebsd* | dragonfly* | linux*) 49 aix* | freebsd* | dragonfly* | linux*)
50 if test -n "$FLOAT_H"; then 50 if $GL_GENERATE_FLOAT_H; then
51 REPLACE_FLOAT_LDBL=1 51 REPLACE_FLOAT_LDBL=1
52 fi 52 fi
53 ;; 53 ;;
@@ -95,14 +95,12 @@ int main ()
95 REPLACE_ITOLD=1 95 REPLACE_ITOLD=1
96 dnl We add the workaround to <float.h> but also to <math.h>, 96 dnl We add the workaround to <float.h> but also to <math.h>,
97 dnl to increase the chances that the fix function gets pulled in. 97 dnl to increase the chances that the fix function gets pulled in.
98 FLOAT_H=float.h 98 GL_GENERATE_FLOAT_H=true
99 ;; 99 ;;
100 esac 100 esac
101 101
102 if test -n "$FLOAT_H"; then 102 if $GL_GENERATE_FLOAT_H; then
103 gl_NEXT_HEADERS([float.h]) 103 gl_NEXT_HEADERS([float.h])
104 fi 104 fi
105 AC_SUBST([FLOAT_H])
106 AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"])
107 AC_SUBST([REPLACE_ITOLD]) 105 AC_SUBST([REPLACE_ITOLD])
108]) 106])
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4
index f521437..e8f290b 100644
--- a/gl/m4/floorf.m4
+++ b/gl/m4/floorf.m4
@@ -1,5 +1,5 @@
1# floorf.m4 serial 18 1# floorf.m4 serial 18
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4
index 4ed7dce..50767f8 100644
--- a/gl/m4/fopen.m4
+++ b/gl/m4/fopen.m4
@@ -1,5 +1,5 @@
1# fopen.m4 serial 12 1# fopen.m4 serial 13
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -136,11 +136,12 @@ int main ()
136 ]) 136 ])
137 rm -f conftest.x 137 rm -f conftest.x
138 ]) 138 ])
139 REPLACE_FOPEN_FOR_FOPEN_GNU="$REPLACE_FOPEN"
139 case "$gl_cv_func_fopen_mode_x" in 140 case "$gl_cv_func_fopen_mode_x" in
140 *no) REPLACE_FOPEN=1 ;; 141 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
141 esac 142 esac
142 case "$gl_cv_func_fopen_mode_e" in 143 case "$gl_cv_func_fopen_mode_e" in
143 *no) REPLACE_FOPEN=1 ;; 144 *no) REPLACE_FOPEN_FOR_FOPEN_GNU=1 ;;
144 esac 145 esac
145]) 146])
146 147
diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4
index 275c9d0..1a15454 100644
--- a/gl/m4/fpurge.m4
+++ b/gl/m4/fpurge.m4
@@ -1,5 +1,5 @@
1# fpurge.m4 serial 12 1# fpurge.m4 serial 12
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/freading.m4 b/gl/m4/freading.m4
index 6cc660f..81b17a6 100644
--- a/gl/m4/freading.m4
+++ b/gl/m4/freading.m4
@@ -1,5 +1,5 @@
1# freading.m4 serial 2 1# freading.m4 serial 2
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/free.m4 b/gl/m4/free.m4
index a7923b9..dfeecd2 100644
--- a/gl/m4/free.m4
+++ b/gl/m4/free.m4
@@ -1,5 +1,5 @@
1# free.m4 serial 6 1# free.m4 serial 6
2# Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc. 2# Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc.
3# This file is free software; the Free Software Foundation 3# This file is free software; the Free Software Foundation
4# gives unlimited permission to copy and/or distribute it, 4# gives unlimited permission to copy and/or distribute it,
5# with or without modifications, as long as this notice is preserved. 5# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4
index 2e90afc..bd4a55b 100644
--- a/gl/m4/fseek.m4
+++ b/gl/m4/fseek.m4
@@ -1,5 +1,5 @@
1# fseek.m4 serial 4 1# fseek.m4 serial 4
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 531e442..e50fe39 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
1# fseeko.m4 serial 20 1# fseeko.m4 serial 20
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index cdaca80..9e61bcc 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
1# fstat.m4 serial 8 1# fstat.m4 serial 8
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4
index 895c4f0..6749922 100644
--- a/gl/m4/fstypename.m4
+++ b/gl/m4/fstypename.m4
@@ -6,7 +6,7 @@ dnl See if struct statfs has the f_fstypename member.
6dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. 6dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME.
7dnl 7dnl
8 8
9# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2021 Free Software 9# Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2022 Free Software
10# Foundation, Inc. 10# Foundation, Inc.
11# This file is free software; the Free Software Foundation 11# This file is free software; the Free Software Foundation
12# gives unlimited permission to copy and/or distribute it, 12# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4
index d005579..06e6088 100644
--- a/gl/m4/fsusage.m4
+++ b/gl/m4/fsusage.m4
@@ -1,7 +1,7 @@
1# serial 35 1# serial 35
2# Obtaining file system usage information. 2# Obtaining file system usage information.
3 3
4# Copyright (C) 1997-1998, 2000-2001, 2003-2021 Free Software Foundation, Inc. 4# Copyright (C) 1997-1998, 2000-2001, 2003-2022 Free Software Foundation, Inc.
5# 5#
6# This file is free software; the Free Software Foundation 6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it, 7# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index f9cc619..89f2d1b 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,5 +1,5 @@
1# ftell.m4 serial 3 1# ftell.m4 serial 3
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index 65bec39..919f39d 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,5 +1,5 @@
1# ftello.m4 serial 14 1# ftello.m4 serial 14
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 3f8e04f..65a0fd0 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,5 +1,5 @@
1# getaddrinfo.m4 serial 34 1# getaddrinfo.m4 serial 34
2dnl Copyright (C) 2004-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 244a731..0b63b55 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
1# getdelim.m4 serial 15 1# getdelim.m4 serial 15
2 2
3dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. 3dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
4dnl 4dnl
5dnl This file is free software; the Free Software Foundation 5dnl This file is free software; the Free Software Foundation
6dnl gives unlimited permission to copy and/or distribute it, 6dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4
index 8fbc941..6134eaa 100644
--- a/gl/m4/getdtablesize.m4
+++ b/gl/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
1# getdtablesize.m4 serial 8 1# getdtablesize.m4 serial 8
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4
index 25e9eb2..11f22b2 100644
--- a/gl/m4/gethostname.m4
+++ b/gl/m4/gethostname.m4
@@ -1,5 +1,5 @@
1# gethostname.m4 serial 15 1# gethostname.m4 serial 15
2dnl Copyright (C) 2002, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 58b27c7..ca0301d 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,6 @@
1# getline.m4 serial 30 1# getline.m4 serial 30
2 2
3dnl Copyright (C) 1998-2003, 2005-2007, 2009-2021 Free Software Foundation, 3dnl Copyright (C) 1998-2003, 2005-2007, 2009-2022 Free Software Foundation,
4dnl Inc. 4dnl Inc.
5dnl 5dnl
6dnl This file is free software; the Free Software Foundation 6dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/getloadavg.m4 b/gl/m4/getloadavg.m4
index bba2216..7bb8890 100644
--- a/gl/m4/getloadavg.m4
+++ b/gl/m4/getloadavg.m4
@@ -1,6 +1,6 @@
1# Check for getloadavg. 1# Check for getloadavg.
2 2
3# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2021 Free Software 3# Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2022 Free Software
4# Foundation, Inc. 4# Foundation, Inc.
5 5
6# This file is free software; the Free Software Foundation 6# This file is free software; the Free Software Foundation
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index bb95c5e..ff78ed5 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
1# getopt.m4 serial 47 1# getopt.m4 serial 48
2dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -21,6 +21,8 @@ AC_DEFUN([gl_FUNC_GETOPT_POSIX],
21 REPLACE_GETOPT=1 21 REPLACE_GETOPT=1
22 fi 22 fi
23 ]) 23 ])
24 GL_GENERATE_GETOPT_H=false
25 GL_GENERATE_GETOPT_CDEFS_H=false
24 if test $REPLACE_GETOPT = 1; then 26 if test $REPLACE_GETOPT = 1; then
25 dnl Arrange for getopt.h to be created. 27 dnl Arrange for getopt.h to be created.
26 gl_GETOPT_SUBSTITUTE_HEADER 28 gl_GETOPT_SUBSTITUTE_HEADER
@@ -374,8 +376,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
374 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], 376 AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
375 [Define to rpl_ if the getopt replacement functions and variables 377 [Define to rpl_ if the getopt replacement functions and variables
376 should be used.]) 378 should be used.])
377 GETOPT_H=getopt.h 379 GL_GENERATE_GETOPT_H=true
378 GETOPT_CDEFS_H=getopt-cdefs.h 380 GL_GENERATE_GETOPT_CDEFS_H=true
379 AC_SUBST([GETOPT_H])
380 AC_SUBST([GETOPT_CDEFS_H])
381]) 381])
diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4
index 65917d6..b26146e 100644
--- a/gl/m4/getprogname.m4
+++ b/gl/m4/getprogname.m4
@@ -1,6 +1,6 @@
1# getprogname.m4 - check for getprogname or replacements for it 1# getprogname.m4 - check for getprogname or replacements for it
2 2
3# Copyright (C) 2016-2021 Free Software Foundation, Inc. 3# Copyright (C) 2016-2022 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gettext.m4 b/gl/m4/gettext.m4
index c7f5460..989d645 100644
--- a/gl/m4/gettext.m4
+++ b/gl/m4/gettext.m4
@@ -1,5 +1,5 @@
1# gettext.m4 serial 71 (gettext-0.20.2) 1# gettext.m4 serial 71 (gettext-0.20.2)
2dnl Copyright (C) 1995-2014, 2016, 2018-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gl-openssl.m4 b/gl/m4/gl-openssl.m4
index c968eb6..d076f84 100644
--- a/gl/m4/gl-openssl.m4
+++ b/gl/m4/gl-openssl.m4
@@ -1,5 +1,5 @@
1# gl-openssl.m4 serial 6 1# gl-openssl.m4 serial 6
2dnl Copyright (C) 2013-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2013-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 2471be2..9d0128a 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,8 +1,8 @@
1# Copyright (C) 2002-2021 Free Software Foundation, Inc. 1# Copyright (C) 2002-2022 Free Software Foundation, Inc.
2# 2#
3# This file is free software; you can redistribute it and/or modify 3# This file is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by 4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or 5# the Free Software Foundation, either version 3 of the License, or
6# (at your option) any later version. 6# (at your option) any later version.
7# 7#
8# This file is distributed in the hope that it will be useful, 8# This file is distributed in the hope that it will be useful,
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 12b19db..30911d1 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
1# gnulib-common.m4 serial 67 1# gnulib-common.m4 serial 73
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -69,7 +69,9 @@ AC_DEFUN([gl_COMMON_BODY], [
69[/* Attributes. */ 69[/* Attributes. */
70#if (defined __has_attribute \ 70#if (defined __has_attribute \
71 && (!defined __clang_minor__ \ 71 && (!defined __clang_minor__ \
72 || 3 < __clang_major__ + (5 <= __clang_minor__))) 72 || (defined __apple_build_version__ \
73 ? 6000000 <= __apple_build_version__ \
74 : 3 < __clang_major__ + (5 <= __clang_minor__))))
73# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__) 75# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
74#else 76#else
75# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr 77# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
@@ -104,6 +106,10 @@ AC_DEFUN([gl_COMMON_BODY], [
104#endif 106#endif
105 107
106#ifdef __has_c_attribute 108#ifdef __has_c_attribute
109# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
110 && _GL_GNUC_PREREQ (4, 6))
111# pragma GCC diagnostic ignored "-Wpedantic"
112# endif
107# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) 113# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
108#else 114#else
109# define _GL_HAS_C_ATTRIBUTE(attr) 0 115# define _GL_HAS_C_ATTRIBUTE(attr) 0
@@ -181,7 +187,12 @@ AC_DEFUN([gl_COMMON_BODY], [
181#else 187#else
182# define _GL_ATTRIBUTE_DEALLOC(f, i) 188# define _GL_ATTRIBUTE_DEALLOC(f, i)
183#endif 189#endif
184#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1) 190/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
191 to use this earlier definition, since <stdlib.h> may not have been included
192 yet. */
193#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
194# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
195#endif
185 196
186/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated. 197/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
187 The compiler may warn if the entity is used. */ 198 The compiler may warn if the entity is used. */
@@ -813,6 +824,24 @@ AC_DEFUN([gl_CACHE_VAL_SILENT],
813 ]) 824 ])
814]) 825])
815 826
827# gl_CONDITIONAL(conditional, condition)
828# is like AM_CONDITIONAL(conditional, condition), except that it does not
829# produce an error
830# configure: error: conditional "..." was never defined.
831# Usually this means the macro was only invoked conditionally.
832# when only invoked conditionally. Instead, in that case, both the _TRUE
833# and the _FALSE case are disabled.
834AC_DEFUN([gl_CONDITIONAL],
835[
836 pushdef([AC_CONFIG_COMMANDS_PRE], [:])dnl
837 AM_CONDITIONAL([$1], [$2])
838 popdef([AC_CONFIG_COMMANDS_PRE])dnl
839 if test -z "${[$1]_TRUE}" && test -z "${[$1]_FALSE}"; then
840 [$1]_TRUE='#'
841 [$1]_FALSE='#'
842 fi
843])
844
816# gl_CC_ALLOW_WARNINGS 845# gl_CC_ALLOW_WARNINGS
817# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option 846# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) option
818# that reverts a preceding '-Werror' option, if available. 847# that reverts a preceding '-Werror' option, if available.
@@ -879,6 +908,102 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
879 AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS]) 908 AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS])
880]) 909])
881 910
911# gl_CC_GNULIB_WARNINGS
912# sets and substitutes a variable GL_CFLAG_GNULIB_WARNINGS, to a $(CC) option
913# set that enables or disables warnings as suitable for the Gnulib coding style.
914AC_DEFUN([gl_CC_GNULIB_WARNINGS],
915[
916 AC_REQUIRE([gl_CC_ALLOW_WARNINGS])
917 dnl Assume that the compiler supports -Wno-* options only if it also supports
918 dnl -Wno-error.
919 GL_CFLAG_GNULIB_WARNINGS=''
920 if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
921 dnl Enable these warning options:
922 dnl
923 dnl GCC clang
924 dnl -Wno-cast-qual >= 3 >= 3.9
925 dnl -Wno-conversion >= 3 >= 3.9
926 dnl -Wno-float-conversion >= 4.9 >= 3.9
927 dnl -Wno-float-equal >= 3 >= 3.9
928 dnl -Wimplicit-fallthrough >= 7 >= 3.9
929 dnl -Wno-pedantic >= 4.8 >= 3.9
930 dnl -Wno-sign-compare >= 3 >= 3.9
931 dnl -Wno-sign-conversion >= 4.3 >= 3.9
932 dnl -Wno-type-limits >= 4.3 >= 3.9
933 dnl -Wno-undef >= 3 >= 3.9
934 dnl -Wno-unsuffixed-float-constants >= 4.5
935 dnl -Wno-unused-function >= 3 >= 3.9
936 dnl -Wno-unused-parameter >= 3 >= 3.9
937 dnl
938 cat > conftest.c <<\EOF
939 #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
940 -Wno-cast-qual
941 -Wno-conversion
942 -Wno-float-equal
943 -Wno-sign-compare
944 -Wno-undef
945 -Wno-unused-function
946 -Wno-unused-parameter
947 #endif
948 #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
949 -Wno-float-conversion
950 #endif
951 #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
952 -Wimplicit-fallthrough
953 #endif
954 #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
955 -Wno-pedantic
956 #endif
957 #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
958 -Wno-sign-conversion
959 -Wno-type-limits
960 #endif
961 #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
962 -Wno-unsuffixed-float-constants
963 #endif
964EOF
965 gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
966 if AC_TRY_EVAL([gl_command]); then
967 gl_options=`grep -v '#' conftest.out`
968 for word in $gl_options; do
969 GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
970 done
971 fi
972 rm -f conftest.c conftest.out
973 fi
974 AC_SUBST([GL_CFLAG_GNULIB_WARNINGS])
975])
976
977dnl gl_CONDITIONAL_HEADER([foo.h])
978dnl takes a shell variable GL_GENERATE_FOO_H (with value true or false) as input
979dnl and produces
980dnl - an AC_SUBSTed variable FOO_H that is either a file name or empty, based
981dnl on whether GL_GENERATE_FOO_H is true or false,
982dnl - an Automake conditional GL_GENERATE_FOO_H that evaluates to the value of
983dnl the shell variable GL_GENERATE_FOO_H.
984AC_DEFUN([gl_CONDITIONAL_HEADER],
985[
986 m4_pushdef([gl_header_name], AS_TR_SH(m4_toupper($1)))
987 m4_pushdef([gl_generate_var], [GL_GENERATE_]AS_TR_SH(m4_toupper($1)))
988 m4_pushdef([gl_generate_cond], [GL_GENERATE_]AS_TR_SH(m4_toupper($1)))
989 case "$gl_generate_var" in
990 false) gl_header_name='' ;;
991 true)
992 dnl It is OK to use a .h file in lib/ from within tests/, but not vice
993 dnl versa.
994 if test -z "$gl_header_name"; then
995 gl_header_name="${gl_source_base_prefix}$1"
996 fi
997 ;;
998 *) echo "*** gl_generate_var is not set correctly" 1>&2; exit 1 ;;
999 esac
1000 AC_SUBST(gl_header_name)
1001 gl_CONDITIONAL(gl_generate_cond, [$gl_generate_var])
1002 m4_popdef([gl_generate_cond])
1003 m4_popdef([gl_generate_var])
1004 m4_popdef([gl_header_name])
1005])
1006
882dnl Expands to some code for use in .c programs that, on native Windows, defines 1007dnl Expands to some code for use in .c programs that, on native Windows, defines
883dnl the Microsoft deprecated alias function names to the underscore-prefixed 1008dnl the Microsoft deprecated alias function names to the underscore-prefixed
884dnl actual function names. With this macro, these function names are available 1009dnl actual function names. With this macro, these function names are available
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 219b81e..a82c5de 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,9 +1,9 @@
1# DO NOT EDIT! GENERATED AUTOMATICALLY! 1# DO NOT EDIT! GENERATED AUTOMATICALLY!
2# Copyright (C) 2002-2021 Free Software Foundation, Inc. 2# Copyright (C) 2002-2022 Free Software Foundation, Inc.
3# 3#
4# This file is free software; you can redistribute it and/or modify 4# This file is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3 of the License, or 6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version. 7# (at your option) any later version.
8# 8#
9# This file is distributed in the hope that it will be useful, 9# This file is distributed in the hope that it will be useful,
@@ -42,7 +42,6 @@ AC_DEFUN([gl_EARLY],
42 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 42 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
43 AC_REQUIRE([gl_PROG_AR_RANLIB]) 43 AC_REQUIRE([gl_PROG_AR_RANLIB])
44 44
45 AC_REQUIRE([AM_PROG_CC_C_O])
46 # Code from module absolute-header: 45 # Code from module absolute-header:
47 # Code from module alloca-opt: 46 # Code from module alloca-opt:
48 # Code from module arpa_inet: 47 # Code from module arpa_inet:
@@ -92,6 +91,7 @@ AC_DEFUN([gl_EARLY],
92 # Code from module ftell: 91 # Code from module ftell:
93 # Code from module ftello: 92 # Code from module ftello:
94 AC_REQUIRE([gl_SET_LARGEFILE_SOURCE]) 93 AC_REQUIRE([gl_SET_LARGEFILE_SOURCE])
94 # Code from module gen-header:
95 # Code from module getaddrinfo: 95 # Code from module getaddrinfo:
96 # Code from module getdelim: 96 # Code from module getdelim:
97 # Code from module getdtablesize: 97 # Code from module getdtablesize:
@@ -167,6 +167,7 @@ AC_DEFUN([gl_EARLY],
167 # Code from module std-gnu11: 167 # Code from module std-gnu11:
168 # Code from module stdalign: 168 # Code from module stdalign:
169 # Code from module stdbool: 169 # Code from module stdbool:
170 # Code from module stdckdint:
170 # Code from module stddef: 171 # Code from module stddef:
171 # Code from module stdint: 172 # Code from module stdint:
172 # Code from module stdio: 173 # Code from module stdio:
@@ -193,6 +194,7 @@ AC_DEFUN([gl_EARLY],
193 # Code from module unistd: 194 # Code from module unistd:
194 # Code from module unlocked-io-internal: 195 # Code from module unlocked-io-internal:
195 # Code from module unsetenv: 196 # Code from module unsetenv:
197 # Code from module vararrays:
196 # Code from module vasnprintf: 198 # Code from module vasnprintf:
197 # Code from module vasprintf: 199 # Code from module vasprintf:
198 # Code from module verify: 200 # Code from module verify:
@@ -228,33 +230,38 @@ AC_DEFUN([gl_INIT],
228 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) 230 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
229 gl_COMMON 231 gl_COMMON
230 gl_source_base='gl' 232 gl_source_base='gl'
233 gl_source_base_prefix=
231 gl_FUNC_ALLOCA 234 gl_FUNC_ALLOCA
235 gl_CONDITIONAL_HEADER([alloca.h])
236 AC_PROG_MKDIR_P
232 gl_ARPA_INET_H 237 gl_ARPA_INET_H
233 gl_ARPA_INET_H_REQUIRE_DEFAULTS 238 gl_ARPA_INET_H_REQUIRE_DEFAULTS
234 AC_PROG_MKDIR_P 239 AC_PROG_MKDIR_P
235 gl_FUNC_BASE64 240 gl_FUNC_BASE64
236 gl_FUNC_BTOWC 241 gl_FUNC_BTOWC
237 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then 242 gl_CONDITIONAL([GL_COND_OBJ_BTOWC],
238 AC_LIBOBJ([btowc]) 243 [test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1])
244 AM_COND_IF([GL_COND_OBJ_BTOWC], [
239 gl_PREREQ_BTOWC 245 gl_PREREQ_BTOWC
240 fi 246 ])
241 gl_WCHAR_MODULE_INDICATOR([btowc]) 247 gl_WCHAR_MODULE_INDICATOR([btowc])
242 gl___BUILTIN_EXPECT 248 gl___BUILTIN_EXPECT
243 gl_BYTESWAP 249 gl_BYTESWAP
250 gl_CONDITIONAL_HEADER([byteswap.h])
251 AC_PROG_MKDIR_P
244 gl_FUNC_CALLOC_GNU 252 gl_FUNC_CALLOC_GNU
245 if test $REPLACE_CALLOC = 1; then 253 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
246 AC_LIBOBJ([calloc]) 254 AC_LIBOBJ([calloc])
247 fi 255 fi
256 gl_STDLIB_MODULE_INDICATOR([calloc-gnu])
248 gl_FUNC_CALLOC_POSIX 257 gl_FUNC_CALLOC_POSIX
249 if test $REPLACE_CALLOC = 1; then 258 if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
250 AC_LIBOBJ([calloc]) 259 AC_LIBOBJ([calloc])
251 fi 260 fi
252 gl_STDLIB_MODULE_INDICATOR([calloc-posix]) 261 gl_STDLIB_MODULE_INDICATOR([calloc-posix])
253 gl_MODULE_INDICATOR_FOR_TESTS([cloexec]) 262 gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
254 gl_FUNC_CLOSE 263 gl_FUNC_CLOSE
255 if test $REPLACE_CLOSE = 1; then 264 gl_CONDITIONAL([GL_COND_OBJ_CLOSE], [test $REPLACE_CLOSE = 1])
256 AC_LIBOBJ([close])
257 fi
258 gl_UNISTD_MODULE_INDICATOR([close]) 265 gl_UNISTD_MODULE_INDICATOR([close])
259 gl_AF_ALG 266 gl_AF_ALG
260 AC_REQUIRE([AC_C_RESTRICT]) 267 AC_REQUIRE([AC_C_RESTRICT])
@@ -262,18 +269,20 @@ AC_DEFUN([gl_INIT],
262 gl_MODULE_INDICATOR([dirname]) 269 gl_MODULE_INDICATOR([dirname])
263 gl_DOUBLE_SLASH_ROOT 270 gl_DOUBLE_SLASH_ROOT
264 gl_FUNC_DUP2 271 gl_FUNC_DUP2
265 if test $REPLACE_DUP2 = 1; then 272 gl_CONDITIONAL([GL_COND_OBJ_DUP2], [test $REPLACE_DUP2 = 1])
266 AC_LIBOBJ([dup2]) 273 AM_COND_IF([GL_COND_OBJ_DUP2], [
267 gl_PREREQ_DUP2 274 gl_PREREQ_DUP2
268 fi 275 ])
269 gl_UNISTD_MODULE_INDICATOR([dup2]) 276 gl_UNISTD_MODULE_INDICATOR([dup2])
270 AC_PROG_MKDIR_P 277 AC_PROG_MKDIR_P
271 gl_ENVIRON 278 gl_ENVIRON
272 gl_UNISTD_MODULE_INDICATOR([environ]) 279 gl_UNISTD_MODULE_INDICATOR([environ])
273 gl_HEADER_ERRNO_H 280 gl_HEADER_ERRNO_H
281 gl_CONDITIONAL_HEADER([errno.h])
282 AC_PROG_MKDIR_P
274 gl_ERROR 283 gl_ERROR
275 AS_IF([test "$ac_cv_lib_error_at_line" = no], [ 284 gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test "$ac_cv_lib_error_at_line" = no])
276 AC_LIBOBJ([error]) 285 AM_COND_IF([GL_COND_OBJ_ERROR], [
277 gl_PREREQ_ERROR 286 gl_PREREQ_ERROR
278 ]) 287 ])
279 m4_ifdef([AM_XGETTEXT_OPTION], 288 m4_ifdef([AM_XGETTEXT_OPTION],
@@ -281,30 +290,27 @@ AC_DEFUN([gl_INIT],
281 AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) 290 AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
282 AC_REQUIRE([gl_EXTERN_INLINE]) 291 AC_REQUIRE([gl_EXTERN_INLINE])
283 gl_FUNC_FCNTL 292 gl_FUNC_FCNTL
284 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then 293 gl_CONDITIONAL([GL_COND_OBJ_FCNTL],
285 AC_LIBOBJ([fcntl]) 294 [test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1])
286 fi
287 gl_FCNTL_MODULE_INDICATOR([fcntl]) 295 gl_FCNTL_MODULE_INDICATOR([fcntl])
288 gl_FCNTL_H 296 gl_FCNTL_H
289 gl_FCNTL_H_REQUIRE_DEFAULTS 297 gl_FCNTL_H_REQUIRE_DEFAULTS
298 AC_PROG_MKDIR_P
290 gl_FUNC_FFLUSH 299 gl_FUNC_FFLUSH
291 if test $REPLACE_FFLUSH = 1; then 300 gl_CONDITIONAL([GL_COND_OBJ_FFLUSH], [test $REPLACE_FFLUSH = 1])
292 AC_LIBOBJ([fflush]) 301 AM_COND_IF([GL_COND_OBJ_FFLUSH], [
293 gl_PREREQ_FFLUSH 302 gl_PREREQ_FFLUSH
294 fi 303 ])
295 gl_MODULE_INDICATOR([fflush]) 304 gl_MODULE_INDICATOR([fflush])
296 gl_STDIO_MODULE_INDICATOR([fflush]) 305 gl_STDIO_MODULE_INDICATOR([fflush])
297 gl_FLOAT_H 306 gl_FLOAT_H
298 if test $REPLACE_FLOAT_LDBL = 1; then 307 gl_CONDITIONAL_HEADER([float.h])
299 AC_LIBOBJ([float]) 308 AC_PROG_MKDIR_P
300 fi 309 gl_CONDITIONAL([GL_COND_OBJ_FLOAT], [test $REPLACE_FLOAT_LDBL = 1])
301 if test $REPLACE_ITOLD = 1; then 310 gl_CONDITIONAL([GL_COND_OBJ_ITOLD], [test $REPLACE_ITOLD = 1])
302 AC_LIBOBJ([itold])
303 fi
304 gl_FUNC_FLOORF 311 gl_FUNC_FLOORF
305 if test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1; then 312 gl_CONDITIONAL([GL_COND_OBJ_FLOORF],
306 AC_LIBOBJ([floorf]) 313 [test $HAVE_DECL_FLOORF = 0 || test $REPLACE_FLOORF = 1])
307 fi
308 gl_MATH_MODULE_INDICATOR([floorf]) 314 gl_MATH_MODULE_INDICATOR([floorf])
309 gl_FUNC_FOPEN 315 gl_FUNC_FOPEN
310 if test $REPLACE_FOPEN = 1; then 316 if test $REPLACE_FOPEN = 1; then
@@ -313,112 +319,112 @@ AC_DEFUN([gl_INIT],
313 fi 319 fi
314 gl_STDIO_MODULE_INDICATOR([fopen]) 320 gl_STDIO_MODULE_INDICATOR([fopen])
315 gl_FUNC_FOPEN_GNU 321 gl_FUNC_FOPEN_GNU
316 if test $REPLACE_FOPEN = 1; then 322 if test $REPLACE_FOPEN_FOR_FOPEN_GNU = 1; then
317 AC_LIBOBJ([fopen]) 323 AC_LIBOBJ([fopen])
318 gl_PREREQ_FOPEN 324 gl_PREREQ_FOPEN
319 fi 325 fi
320 gl_MODULE_INDICATOR([fopen-gnu]) 326 gl_MODULE_INDICATOR([fopen-gnu])
327 gl_STDIO_MODULE_INDICATOR([fopen-gnu])
321 gl_FUNC_FPURGE 328 gl_FUNC_FPURGE
322 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then 329 gl_CONDITIONAL([GL_COND_OBJ_FPURGE],
323 AC_LIBOBJ([fpurge]) 330 [test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1])
324 fi
325 gl_STDIO_MODULE_INDICATOR([fpurge]) 331 gl_STDIO_MODULE_INDICATOR([fpurge])
326 gl_FUNC_FREADING 332 gl_FUNC_FREADING
327 gl_FUNC_FREE 333 gl_FUNC_FREE
328 if test $REPLACE_FREE = 1; then 334 gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
329 AC_LIBOBJ([free]) 335 AM_COND_IF([GL_COND_OBJ_FREE], [
330 gl_PREREQ_FREE 336 gl_PREREQ_FREE
331 fi 337 ])
332 gl_STDLIB_MODULE_INDICATOR([free-posix]) 338 gl_STDLIB_MODULE_INDICATOR([free-posix])
333 gl_FUNC_FSEEK 339 gl_FUNC_FSEEK
334 if test $REPLACE_FSEEK = 1; then 340 gl_CONDITIONAL([GL_COND_OBJ_FSEEK], [test $REPLACE_FSEEK = 1])
335 AC_LIBOBJ([fseek])
336 fi
337 gl_STDIO_MODULE_INDICATOR([fseek]) 341 gl_STDIO_MODULE_INDICATOR([fseek])
338 gl_FUNC_FSEEKO 342 gl_FUNC_FSEEKO
339 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then 343 gl_CONDITIONAL([GL_COND_OBJ_FSEEKO],
340 AC_LIBOBJ([fseeko]) 344 [test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1])
345 AM_COND_IF([GL_COND_OBJ_FSEEKO], [
341 gl_PREREQ_FSEEKO 346 gl_PREREQ_FSEEKO
342 fi 347 ])
343 gl_STDIO_MODULE_INDICATOR([fseeko]) 348 gl_STDIO_MODULE_INDICATOR([fseeko])
344 gl_FUNC_FSTAT 349 gl_FUNC_FSTAT
345 if test $REPLACE_FSTAT = 1; then 350 gl_CONDITIONAL([GL_COND_OBJ_FSTAT], [test $REPLACE_FSTAT = 1])
346 AC_LIBOBJ([fstat]) 351 AM_COND_IF([GL_COND_OBJ_FSTAT], [
347 case "$host_os" in 352 case "$host_os" in
348 mingw*) 353 mingw*)
349 AC_LIBOBJ([stat-w32]) 354 AC_LIBOBJ([stat-w32])
350 ;; 355 ;;
351 esac 356 esac
352 gl_PREREQ_FSTAT 357 gl_PREREQ_FSTAT
353 fi 358 ])
354 gl_SYS_STAT_MODULE_INDICATOR([fstat]) 359 gl_SYS_STAT_MODULE_INDICATOR([fstat])
355 gl_FSUSAGE 360 gl_FSUSAGE
356 if test $gl_cv_fs_space = yes; then 361 gl_CONDITIONAL([GL_COND_OBJ_FSUSAGE], [test $gl_cv_fs_space = yes])
357 AC_LIBOBJ([fsusage]) 362 AM_COND_IF([GL_COND_OBJ_FSUSAGE], [
358 gl_PREREQ_FSUSAGE_EXTRA 363 gl_PREREQ_FSUSAGE_EXTRA
359 fi 364 ])
360 gl_FUNC_FTELL 365 gl_FUNC_FTELL
361 if test $REPLACE_FTELL = 1; then 366 gl_CONDITIONAL([GL_COND_OBJ_FTELL], [test $REPLACE_FTELL = 1])
362 AC_LIBOBJ([ftell])
363 fi
364 gl_STDIO_MODULE_INDICATOR([ftell]) 367 gl_STDIO_MODULE_INDICATOR([ftell])
365 gl_FUNC_FTELLO 368 gl_FUNC_FTELLO
366 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then 369 gl_CONDITIONAL([GL_COND_OBJ_FTELLO],
367 AC_LIBOBJ([ftello]) 370 [test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1])
371 AM_COND_IF([GL_COND_OBJ_FTELLO], [
368 gl_PREREQ_FTELLO 372 gl_PREREQ_FTELLO
369 fi 373 ])
370 gl_STDIO_MODULE_INDICATOR([ftello]) 374 gl_STDIO_MODULE_INDICATOR([ftello])
371 gl_GETADDRINFO 375 gl_GETADDRINFO
372 if test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1; then 376 gl_CONDITIONAL([GL_COND_OBJ_GETADDRINFO],
373 AC_LIBOBJ([getaddrinfo]) 377 [test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1])
374 fi 378 gl_CONDITIONAL([GL_COND_OBJ_GAI_STRERROR],
375 if test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1; then 379 [test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1])
376 AC_LIBOBJ([gai_strerror])
377 fi
378 gl_NETDB_MODULE_INDICATOR([getaddrinfo]) 380 gl_NETDB_MODULE_INDICATOR([getaddrinfo])
379 gl_FUNC_GETDELIM 381 gl_FUNC_GETDELIM
380 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then 382 gl_CONDITIONAL([GL_COND_OBJ_GETDELIM],
381 AC_LIBOBJ([getdelim]) 383 [test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1])
384 AM_COND_IF([GL_COND_OBJ_GETDELIM], [
382 gl_PREREQ_GETDELIM 385 gl_PREREQ_GETDELIM
383 fi 386 ])
384 gl_STDIO_MODULE_INDICATOR([getdelim]) 387 gl_STDIO_MODULE_INDICATOR([getdelim])
385 gl_FUNC_GETDTABLESIZE 388 gl_FUNC_GETDTABLESIZE
386 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then 389 gl_CONDITIONAL([GL_COND_OBJ_GETDTABLESIZE],
387 AC_LIBOBJ([getdtablesize]) 390 [test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1])
391 AM_COND_IF([GL_COND_OBJ_GETDTABLESIZE], [
388 gl_PREREQ_GETDTABLESIZE 392 gl_PREREQ_GETDTABLESIZE
389 fi 393 ])
390 gl_UNISTD_MODULE_INDICATOR([getdtablesize]) 394 gl_UNISTD_MODULE_INDICATOR([getdtablesize])
391 gl_FUNC_GETHOSTNAME 395 gl_FUNC_GETHOSTNAME
392 if test $HAVE_GETHOSTNAME = 0; then 396 gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME], [test $HAVE_GETHOSTNAME = 0])
393 AC_LIBOBJ([gethostname]) 397 AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [
394 gl_PREREQ_GETHOSTNAME 398 gl_PREREQ_GETHOSTNAME
395 fi 399 ])
396 gl_UNISTD_MODULE_INDICATOR([gethostname]) 400 gl_UNISTD_MODULE_INDICATOR([gethostname])
397 gl_FUNC_GETLINE 401 gl_FUNC_GETLINE
398 if test $REPLACE_GETLINE = 1; then 402 gl_CONDITIONAL([GL_COND_OBJ_GETLINE], [test $REPLACE_GETLINE = 1])
399 AC_LIBOBJ([getline]) 403 AM_COND_IF([GL_COND_OBJ_GETLINE], [
400 gl_PREREQ_GETLINE 404 gl_PREREQ_GETLINE
401 fi 405 ])
402 gl_STDIO_MODULE_INDICATOR([getline]) 406 gl_STDIO_MODULE_INDICATOR([getline])
403 AC_REQUIRE([AC_CANONICAL_HOST]) 407 AC_REQUIRE([AC_CANONICAL_HOST])
404 gl_GETLOADAVG 408 gl_GETLOADAVG
405 if test $HAVE_GETLOADAVG = 0; then 409 gl_CONDITIONAL([GL_COND_OBJ_GETLOADAVG], [test $HAVE_GETLOADAVG = 0])
406 AC_LIBOBJ([getloadavg]) 410 AM_COND_IF([GL_COND_OBJ_GETLOADAVG], [
407 gl_PREREQ_GETLOADAVG 411 gl_PREREQ_GETLOADAVG
408 fi 412 ])
409 gl_STDLIB_MODULE_INDICATOR([getloadavg]) 413 gl_STDLIB_MODULE_INDICATOR([getloadavg])
410 gl_FUNC_GETOPT_GNU 414 gl_FUNC_GETOPT_GNU
411 dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required 415 dnl Because of the way gl_FUNC_GETOPT_GNU is implemented (the gl_getopt_required
412 dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are 416 dnl mechanism), there is no need to do any AC_LIBOBJ or AC_SUBST here; they are
413 dnl done in the getopt-posix module. 417 dnl done in the getopt-posix module.
414 gl_FUNC_GETOPT_POSIX 418 gl_FUNC_GETOPT_POSIX
415 if test $REPLACE_GETOPT = 1; then 419 gl_CONDITIONAL_HEADER([getopt.h])
416 AC_LIBOBJ([getopt]) 420 gl_CONDITIONAL_HEADER([getopt-cdefs.h])
417 AC_LIBOBJ([getopt1]) 421 AC_PROG_MKDIR_P
422 gl_CONDITIONAL([GL_COND_OBJ_GETOPT], [test $REPLACE_GETOPT = 1])
423 AM_COND_IF([GL_COND_OBJ_GETOPT], [
418 dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1. 424 dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1.
419 gl_UNISTD_H_REQUIRE_DEFAULTS 425 gl_UNISTD_H_REQUIRE_DEFAULTS
420 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1]) 426 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1])
421 fi 427 ])
422 gl_UNISTD_MODULE_INDICATOR([getopt-posix]) 428 gl_UNISTD_MODULE_INDICATOR([getopt-posix])
423 gl_FUNC_GETPROGNAME 429 gl_FUNC_GETPROGNAME
424 dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac. 430 dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
@@ -432,77 +438,86 @@ AC_DEFUN([gl_INIT],
432 gl_HOSTENT 438 gl_HOSTENT
433 gl_IDPRIV 439 gl_IDPRIV
434 gl_FUNC_INET_NTOP 440 gl_FUNC_INET_NTOP
435 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then 441 gl_CONDITIONAL([GL_COND_OBJ_INET_NTOP],
436 AC_LIBOBJ([inet_ntop]) 442 [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1])
443 AM_COND_IF([GL_COND_OBJ_INET_NTOP], [
437 gl_PREREQ_INET_NTOP 444 gl_PREREQ_INET_NTOP
438 fi 445 ])
439 gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) 446 gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
440 gl_INTTYPES_INCOMPLETE 447 gl_INTTYPES_INCOMPLETE
441 gl_INTTYPES_H_REQUIRE_DEFAULTS 448 gl_INTTYPES_H_REQUIRE_DEFAULTS
449 AC_PROG_MKDIR_P
442 gl_LANGINFO_H 450 gl_LANGINFO_H
443 gl_LANGINFO_H_REQUIRE_DEFAULTS 451 gl_LANGINFO_H_REQUIRE_DEFAULTS
452 AC_PROG_MKDIR_P
444 AC_REQUIRE([gl_LARGEFILE]) 453 AC_REQUIRE([gl_LARGEFILE])
445 gl___INLINE 454 gl___INLINE
446 gl_LIMITS_H 455 gl_LIMITS_H
456 gl_CONDITIONAL_HEADER([limits.h])
457 AC_PROG_MKDIR_P
447 gl_LOCALCHARSET 458 gl_LOCALCHARSET
448 dnl For backward compatibility. Some packages still use this. 459 dnl For backward compatibility. Some packages still use this.
449 LOCALCHARSET_TESTS_ENVIRONMENT= 460 LOCALCHARSET_TESTS_ENVIRONMENT=
450 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) 461 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
451 gl_LOCALE_H 462 gl_LOCALE_H
452 gl_LOCALE_H_REQUIRE_DEFAULTS 463 gl_LOCALE_H_REQUIRE_DEFAULTS
464 AC_PROG_MKDIR_P
453 gl_FUNC_LOCALECONV 465 gl_FUNC_LOCALECONV
454 if test $REPLACE_LOCALECONV = 1; then 466 gl_CONDITIONAL([GL_COND_OBJ_LOCALECONV], [test $REPLACE_LOCALECONV = 1])
455 AC_LIBOBJ([localeconv]) 467 AM_COND_IF([GL_COND_OBJ_LOCALECONV], [
456 gl_PREREQ_LOCALECONV 468 gl_PREREQ_LOCALECONV
457 fi 469 ])
458 gl_LOCALE_MODULE_INDICATOR([localeconv]) 470 gl_LOCALE_MODULE_INDICATOR([localeconv])
459 gl_LOCK 471 gl_LOCK
460 gl_MODULE_INDICATOR([lock]) 472 gl_MODULE_INDICATOR([lock])
461 gl_FUNC_LSEEK 473 gl_FUNC_LSEEK
462 if test $REPLACE_LSEEK = 1; then 474 gl_CONDITIONAL([GL_COND_OBJ_LSEEK], [test $REPLACE_LSEEK = 1])
463 AC_LIBOBJ([lseek])
464 fi
465 gl_UNISTD_MODULE_INDICATOR([lseek]) 475 gl_UNISTD_MODULE_INDICATOR([lseek])
466 gl_FUNC_MALLOC_GNU 476 gl_FUNC_MALLOC_GNU
467 if test $REPLACE_MALLOC = 1; then 477 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
468 AC_LIBOBJ([malloc]) 478 AC_LIBOBJ([malloc])
469 fi 479 fi
480 gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
470 AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) 481 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
471 if test $REPLACE_MALLOC = 1; then 482 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
472 AC_LIBOBJ([malloc]) 483 AC_LIBOBJ([malloc])
473 fi 484 fi
474 gl_STDLIB_MODULE_INDICATOR([malloc-posix]) 485 gl_STDLIB_MODULE_INDICATOR([malloc-posix])
475 gl_MALLOCA 486 gl_MALLOCA
476 gl_MATH_H 487 gl_MATH_H
477 gl_MATH_H_REQUIRE_DEFAULTS 488 gl_MATH_H_REQUIRE_DEFAULTS
489 AC_PROG_MKDIR_P
478 gl_FUNC_MBRTOWC 490 gl_FUNC_MBRTOWC
479 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then 491 gl_CONDITIONAL([GL_COND_OBJ_MBRTOWC],
480 AC_LIBOBJ([mbrtowc]) 492 [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1])
493 AM_COND_IF([GL_COND_OBJ_MBRTOWC], [
481 if test $REPLACE_MBSTATE_T = 1; then 494 if test $REPLACE_MBSTATE_T = 1; then
482 AC_LIBOBJ([lc-charset-dispatch]) 495 AC_LIBOBJ([lc-charset-dispatch])
483 AC_LIBOBJ([mbtowc-lock]) 496 AC_LIBOBJ([mbtowc-lock])
484 gl_PREREQ_MBTOWC_LOCK 497 gl_PREREQ_MBTOWC_LOCK
485 fi 498 fi
486 gl_PREREQ_MBRTOWC 499 gl_PREREQ_MBRTOWC
487 fi 500 ])
488 gl_WCHAR_MODULE_INDICATOR([mbrtowc]) 501 gl_WCHAR_MODULE_INDICATOR([mbrtowc])
489 gl_FUNC_MBSINIT 502 gl_FUNC_MBSINIT
490 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then 503 gl_CONDITIONAL([GL_COND_OBJ_MBSINIT],
491 AC_LIBOBJ([mbsinit]) 504 [test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1])
505 AM_COND_IF([GL_COND_OBJ_MBSINIT], [
492 gl_PREREQ_MBSINIT 506 gl_PREREQ_MBSINIT
493 fi 507 ])
494 gl_WCHAR_MODULE_INDICATOR([mbsinit]) 508 gl_WCHAR_MODULE_INDICATOR([mbsinit])
495 gl_FUNC_MBTOWC 509 gl_FUNC_MBTOWC
496 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then 510 gl_CONDITIONAL([GL_COND_OBJ_MBTOWC],
497 AC_LIBOBJ([mbtowc]) 511 [test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1])
512 AM_COND_IF([GL_COND_OBJ_MBTOWC], [
498 gl_PREREQ_MBTOWC 513 gl_PREREQ_MBTOWC
499 fi 514 ])
500 gl_STDLIB_MODULE_INDICATOR([mbtowc]) 515 gl_STDLIB_MODULE_INDICATOR([mbtowc])
501 gl_FUNC_MEMCHR 516 gl_FUNC_MEMCHR
502 if test $REPLACE_MEMCHR = 1; then 517 gl_CONDITIONAL([GL_COND_OBJ_MEMCHR], [test $REPLACE_MEMCHR = 1])
503 AC_LIBOBJ([memchr]) 518 AM_COND_IF([GL_COND_OBJ_MEMCHR], [
504 gl_PREREQ_MEMCHR 519 gl_PREREQ_MEMCHR
505 fi 520 ])
506 gl_STRING_MODULE_INDICATOR([memchr]) 521 gl_STRING_MODULE_INDICATOR([memchr])
507 gl_MINMAX 522 gl_MINMAX
508 gl_FUNC_MKTIME 523 gl_FUNC_MKTIME
@@ -517,72 +532,74 @@ AC_DEFUN([gl_INIT],
517 gl_PREREQ_MKTIME 532 gl_PREREQ_MKTIME
518 fi 533 fi
519 gl_MOUNTLIST 534 gl_MOUNTLIST
520 if test $gl_cv_list_mounted_fs = yes; then 535 gl_CONDITIONAL([GL_COND_OBJ_MOUNTLIST], [test $gl_cv_list_mounted_fs = yes])
521 AC_LIBOBJ([mountlist]) 536 AM_COND_IF([GL_COND_OBJ_MOUNTLIST], [
522 gl_PREREQ_MOUNTLIST_EXTRA 537 gl_PREREQ_MOUNTLIST_EXTRA
523 fi 538 ])
524 AC_REQUIRE([gl_MSVC_INVAL]) 539 AC_REQUIRE([gl_MSVC_INVAL])
525 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 540 gl_CONDITIONAL([GL_COND_OBJ_MSVC_INVAL],
526 AC_LIBOBJ([msvc-inval]) 541 [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1])
527 fi
528 AC_REQUIRE([gl_MSVC_NOTHROW]) 542 AC_REQUIRE([gl_MSVC_NOTHROW])
529 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 543 gl_CONDITIONAL([GL_COND_OBJ_MSVC_NOTHROW],
530 AC_LIBOBJ([msvc-nothrow]) 544 [test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1])
531 fi
532 gl_MODULE_INDICATOR([msvc-nothrow]) 545 gl_MODULE_INDICATOR([msvc-nothrow])
533 gl_MULTIARCH 546 gl_MULTIARCH
534 gl_NETDB_H 547 gl_NETDB_H
535 gl_NETDB_H_REQUIRE_DEFAULTS 548 gl_NETDB_H_REQUIRE_DEFAULTS
549 AC_PROG_MKDIR_P
536 gl_HEADER_NETINET_IN 550 gl_HEADER_NETINET_IN
551 gl_CONDITIONAL_HEADER([netinet/in.h])
537 AC_PROG_MKDIR_P 552 AC_PROG_MKDIR_P
538 gl_FUNC_NL_LANGINFO 553 gl_FUNC_NL_LANGINFO
539 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then 554 gl_CONDITIONAL([GL_COND_OBJ_NL_LANGINFO],
540 AC_LIBOBJ([nl_langinfo]) 555 [test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1])
541 fi 556 gl_CONDITIONAL([GL_COND_OBJ_NL_LANGINFO_LOCK],
557 [test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0])
542 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then 558 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
543 AC_LIBOBJ([nl_langinfo-lock])
544 gl_PREREQ_NL_LANGINFO_LOCK 559 gl_PREREQ_NL_LANGINFO_LOCK
545 fi 560 fi
546 gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) 561 gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
547 gl_FUNC_OPEN 562 gl_FUNC_OPEN
548 if test $REPLACE_OPEN = 1; then 563 gl_CONDITIONAL([GL_COND_OBJ_OPEN], [test $REPLACE_OPEN = 1])
549 AC_LIBOBJ([open]) 564 AM_COND_IF([GL_COND_OBJ_OPEN], [
550 gl_PREREQ_OPEN 565 gl_PREREQ_OPEN
551 fi 566 ])
552 gl_FCNTL_MODULE_INDICATOR([open]) 567 gl_FCNTL_MODULE_INDICATOR([open])
553 gl_PATHMAX 568 gl_PATHMAX
554 gl_FUNC_REALLOC_GNU 569 gl_FUNC_REALLOC_GNU
555 if test $REPLACE_REALLOC = 1; then 570 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
556 AC_LIBOBJ([realloc]) 571 AC_LIBOBJ([realloc])
557 fi 572 fi
573 gl_STDLIB_MODULE_INDICATOR([realloc-gnu])
558 gl_FUNC_REALLOC_POSIX 574 gl_FUNC_REALLOC_POSIX
559 if test $REPLACE_REALLOC = 1; then 575 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
560 AC_LIBOBJ([realloc]) 576 AC_LIBOBJ([realloc])
561 fi 577 fi
562 gl_STDLIB_MODULE_INDICATOR([realloc-posix]) 578 gl_STDLIB_MODULE_INDICATOR([realloc-posix])
563 gl_FUNC_REALLOCARRAY 579 gl_FUNC_REALLOCARRAY
564 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then 580 gl_CONDITIONAL([GL_COND_OBJ_REALLOCARRAY],
565 AC_LIBOBJ([reallocarray]) 581 [test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1])
582 AM_COND_IF([GL_COND_OBJ_REALLOCARRAY], [
566 gl_PREREQ_REALLOCARRAY 583 gl_PREREQ_REALLOCARRAY
567 fi 584 ])
568 gl_MODULE_INDICATOR([reallocarray]) 585 gl_MODULE_INDICATOR([reallocarray])
569 gl_STDLIB_MODULE_INDICATOR([reallocarray]) 586 gl_STDLIB_MODULE_INDICATOR([reallocarray])
570 gl_REGEX 587 gl_REGEX
571 if test $ac_use_included_regex = yes; then 588 gl_CONDITIONAL([GL_COND_OBJ_REGEX], [test $ac_use_included_regex = yes])
572 AC_LIBOBJ([regex]) 589 AM_COND_IF([GL_COND_OBJ_REGEX], [
573 gl_PREREQ_REGEX 590 gl_PREREQ_REGEX
574 fi 591 ])
575 gl_SERVENT 592 gl_SERVENT
576 gl_FUNC_SETENV 593 gl_FUNC_SETENV
577 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then 594 gl_CONDITIONAL([GL_COND_OBJ_SETENV],
578 AC_LIBOBJ([setenv]) 595 [test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1])
579 fi
580 gl_STDLIB_MODULE_INDICATOR([setenv]) 596 gl_STDLIB_MODULE_INDICATOR([setenv])
581 gl_FUNC_SETLOCALE_NULL 597 gl_FUNC_SETLOCALE_NULL
582 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then 598 gl_CONDITIONAL([GL_COND_OBJ_SETLOCALE_LOCK],
583 AC_LIBOBJ([setlocale-lock]) 599 [test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0])
600 AM_COND_IF([GL_COND_OBJ_SETLOCALE_LOCK], [
584 gl_PREREQ_SETLOCALE_LOCK 601 gl_PREREQ_SETLOCALE_LOCK
585 fi 602 ])
586 gl_LOCALE_MODULE_INDICATOR([setlocale_null]) 603 gl_LOCALE_MODULE_INDICATOR([setlocale_null])
587 gl_SIZE_MAX 604 gl_SIZE_MAX
588 gl_FUNC_SNPRINTF 605 gl_FUNC_SNPRINTF
@@ -593,25 +610,46 @@ AC_DEFUN([gl_INIT],
593 gl_TYPE_SOCKLEN_T 610 gl_TYPE_SOCKLEN_T
594 gt_TYPE_SSIZE_T 611 gt_TYPE_SSIZE_T
595 gl_FUNC_STAT 612 gl_FUNC_STAT
596 if test $REPLACE_STAT = 1; then 613 gl_CONDITIONAL([GL_COND_OBJ_STAT], [test $REPLACE_STAT = 1])
597 AC_LIBOBJ([stat]) 614 AM_COND_IF([GL_COND_OBJ_STAT], [
598 case "$host_os" in 615 case "$host_os" in
599 mingw*) 616 mingw*)
600 AC_LIBOBJ([stat-w32]) 617 AC_LIBOBJ([stat-w32])
601 ;; 618 ;;
602 esac 619 esac
603 gl_PREREQ_STAT 620 gl_PREREQ_STAT
604 fi 621 ])
605 gl_SYS_STAT_MODULE_INDICATOR([stat]) 622 gl_SYS_STAT_MODULE_INDICATOR([stat])
606 gl_STAT_TIME 623 gl_STAT_TIME
607 gl_STAT_BIRTHTIME 624 gl_STAT_BIRTHTIME
608 gl_STDALIGN_H 625 gl_STDALIGN_H
609 AM_STDBOOL_H 626 gl_CONDITIONAL_HEADER([stdalign.h])
627 AC_PROG_MKDIR_P
628 gl_STDBOOL_H
629 gl_CONDITIONAL_HEADER([stdbool.h])
630 AC_PROG_MKDIR_P
631 AC_CHECK_HEADERS_ONCE([stdckdint.h])
632 if test $ac_cv_header_stdckdint_h = yes; then
633 GL_GENERATE_STDCKDINT_H=false
634 else
635 GL_GENERATE_STDCKDINT_H=true
636 fi
637 gl_CONDITIONAL_HEADER([stdckdint.h])
638 AC_PROG_MKDIR_P
610 gl_STDDEF_H 639 gl_STDDEF_H
611 gl_STDDEF_H_REQUIRE_DEFAULTS 640 gl_STDDEF_H_REQUIRE_DEFAULTS
641 gl_CONDITIONAL_HEADER([stddef.h])
642 AC_PROG_MKDIR_P
612 gl_STDINT_H 643 gl_STDINT_H
644 gl_CONDITIONAL_HEADER([stdint.h])
645 dnl Because of gl_REPLACE_LIMITS_H:
646 gl_CONDITIONAL_HEADER([limits.h])
647 AC_PROG_MKDIR_P
613 gl_STDIO_H 648 gl_STDIO_H
614 gl_STDIO_H_REQUIRE_DEFAULTS 649 gl_STDIO_H_REQUIRE_DEFAULTS
650 AC_PROG_MKDIR_P
651 gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
652 gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
615 dnl No need to create extra modules for these functions. Everyone who uses 653 dnl No need to create extra modules for these functions. Everyone who uses
616 dnl <stdio.h> likely needs them. 654 dnl <stdio.h> likely needs them.
617 gl_STDIO_MODULE_INDICATOR([fscanf]) 655 gl_STDIO_MODULE_INDICATOR([fscanf])
@@ -637,15 +675,16 @@ AC_DEFUN([gl_INIT],
637 gl_STDIO_MODULE_INDICATOR([fwrite]) 675 gl_STDIO_MODULE_INDICATOR([fwrite])
638 gl_STDLIB_H 676 gl_STDLIB_H
639 gl_STDLIB_H_REQUIRE_DEFAULTS 677 gl_STDLIB_H_REQUIRE_DEFAULTS
678 AC_PROG_MKDIR_P
640 gl_STRCASE 679 gl_STRCASE
641 if test $HAVE_STRCASECMP = 0; then 680 gl_CONDITIONAL([GL_COND_OBJ_STRCASECMP], [test $HAVE_STRCASECMP = 0])
642 AC_LIBOBJ([strcasecmp]) 681 AM_COND_IF([GL_COND_OBJ_STRCASECMP], [
643 gl_PREREQ_STRCASECMP 682 gl_PREREQ_STRCASECMP
644 fi 683 ])
645 if test $HAVE_STRNCASECMP = 0; then 684 gl_CONDITIONAL([GL_COND_OBJ_STRNCASECMP], [test $HAVE_STRNCASECMP = 0])
646 AC_LIBOBJ([strncasecmp]) 685 AM_COND_IF([GL_COND_OBJ_STRNCASECMP], [
647 gl_PREREQ_STRNCASECMP 686 gl_PREREQ_STRNCASECMP
648 fi 687 ])
649 gl_FUNC_STRCASESTR 688 gl_FUNC_STRCASESTR
650 if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then 689 if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
651 AC_LIBOBJ([strcasestr]) 690 AC_LIBOBJ([strcasestr])
@@ -658,26 +697,27 @@ AC_DEFUN([gl_INIT],
658 fi 697 fi
659 gl_STRING_MODULE_INDICATOR([strcasestr]) 698 gl_STRING_MODULE_INDICATOR([strcasestr])
660 gl_FUNC_STRERROR 699 gl_FUNC_STRERROR
661 if test $REPLACE_STRERROR = 1; then 700 gl_CONDITIONAL([GL_COND_OBJ_STRERROR], [test $REPLACE_STRERROR = 1])
662 AC_LIBOBJ([strerror])
663 fi
664 gl_MODULE_INDICATOR([strerror]) 701 gl_MODULE_INDICATOR([strerror])
665 gl_STRING_MODULE_INDICATOR([strerror]) 702 gl_STRING_MODULE_INDICATOR([strerror])
666 AC_REQUIRE([gl_HEADER_ERRNO_H]) 703 AC_REQUIRE([gl_HEADER_ERRNO_H])
667 AC_REQUIRE([gl_FUNC_STRERROR_0]) 704 AC_REQUIRE([gl_FUNC_STRERROR_0])
668 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then 705 gl_CONDITIONAL([GL_COND_OBJ_STRERROR_OVERRIDE],
669 AC_LIBOBJ([strerror-override]) 706 [test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1])
707 AM_COND_IF([GL_COND_OBJ_STRERROR_OVERRIDE], [
670 gl_PREREQ_SYS_H_WINSOCK2 708 gl_PREREQ_SYS_H_WINSOCK2
671 fi 709 ])
672 gl_STRING_H 710 gl_STRING_H
673 gl_STRING_H_REQUIRE_DEFAULTS 711 gl_STRING_H_REQUIRE_DEFAULTS
712 AC_PROG_MKDIR_P
674 gl_STRINGS_H 713 gl_STRINGS_H
675 gl_STRINGS_H_REQUIRE_DEFAULTS 714 gl_STRINGS_H_REQUIRE_DEFAULTS
715 AC_PROG_MKDIR_P
676 gl_FUNC_STRSEP 716 gl_FUNC_STRSEP
677 if test $HAVE_STRSEP = 0; then 717 gl_CONDITIONAL([GL_COND_OBJ_STRSEP], [test $HAVE_STRSEP = 0])
678 AC_LIBOBJ([strsep]) 718 AM_COND_IF([GL_COND_OBJ_STRSEP], [
679 gl_PREREQ_STRSEP 719 gl_PREREQ_STRSEP
680 fi 720 ])
681 gl_STRING_MODULE_INDICATOR([strsep]) 721 gl_STRING_MODULE_INDICATOR([strsep])
682 gl_FUNC_STRSTR_SIMPLE 722 gl_FUNC_STRSTR_SIMPLE
683 if test $REPLACE_STRSTR = 1; then 723 if test $REPLACE_STRSTR = 1; then
@@ -699,27 +739,33 @@ AC_DEFUN([gl_INIT],
699 AC_REQUIRE([gl_THREADLIB]) 739 AC_REQUIRE([gl_THREADLIB])
700 gl_TIME_H 740 gl_TIME_H
701 gl_TIME_H_REQUIRE_DEFAULTS 741 gl_TIME_H_REQUIRE_DEFAULTS
742 AC_PROG_MKDIR_P
702 gl_TIME_R 743 gl_TIME_R
703 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then 744 gl_CONDITIONAL([GL_COND_OBJ_TIME_R],
704 AC_LIBOBJ([time_r]) 745 [test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1])
746 AM_COND_IF([GL_COND_OBJ_TIME_R], [
705 gl_PREREQ_TIME_R 747 gl_PREREQ_TIME_R
706 fi 748 ])
707 gl_TIME_MODULE_INDICATOR([time_r]) 749 gl_TIME_MODULE_INDICATOR([time_r])
708 gl_FUNC_TIMEGM 750 gl_FUNC_TIMEGM
709 if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then 751 gl_CONDITIONAL([GL_COND_OBJ_TIMEGM],
710 AC_LIBOBJ([timegm]) 752 [test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1])
753 AM_COND_IF([GL_COND_OBJ_TIMEGM], [
711 gl_PREREQ_TIMEGM 754 gl_PREREQ_TIMEGM
712 fi 755 ])
713 gl_TIME_MODULE_INDICATOR([timegm]) 756 gl_TIME_MODULE_INDICATOR([timegm])
714 gl_UNISTD_H 757 gl_UNISTD_H
715 gl_UNISTD_H_REQUIRE_DEFAULTS 758 gl_UNISTD_H_REQUIRE_DEFAULTS
759 AC_PROG_MKDIR_P
716 gl_FUNC_GLIBC_UNLOCKED_IO 760 gl_FUNC_GLIBC_UNLOCKED_IO
717 gl_FUNC_UNSETENV 761 gl_FUNC_UNSETENV
718 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then 762 gl_CONDITIONAL([GL_COND_OBJ_UNSETENV],
719 AC_LIBOBJ([unsetenv]) 763 [test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1])
764 AM_COND_IF([GL_COND_OBJ_UNSETENV], [
720 gl_PREREQ_UNSETENV 765 gl_PREREQ_UNSETENV
721 fi 766 ])
722 gl_STDLIB_MODULE_INDICATOR([unsetenv]) 767 gl_STDLIB_MODULE_INDICATOR([unsetenv])
768 AC_C_VARARRAYS
723 AC_REQUIRE([AC_C_RESTRICT]) 769 AC_REQUIRE([AC_C_RESTRICT])
724 gl_FUNC_VASNPRINTF 770 gl_FUNC_VASNPRINTF
725 gl_FUNC_VASPRINTF 771 gl_FUNC_VASPRINTF
@@ -731,38 +777,29 @@ AC_DEFUN([gl_INIT],
731 gl_STDIO_MODULE_INDICATOR([vsnprintf]) 777 gl_STDIO_MODULE_INDICATOR([vsnprintf])
732 gl_WCHAR_H 778 gl_WCHAR_H
733 gl_WCHAR_H_REQUIRE_DEFAULTS 779 gl_WCHAR_H_REQUIRE_DEFAULTS
780 AC_PROG_MKDIR_P
734 gl_FUNC_WCRTOMB 781 gl_FUNC_WCRTOMB
735 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then 782 gl_CONDITIONAL([GL_COND_OBJ_WCRTOMB],
736 AC_LIBOBJ([wcrtomb]) 783 [test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1])
784 AM_COND_IF([GL_COND_OBJ_WCRTOMB], [
737 gl_PREREQ_WCRTOMB 785 gl_PREREQ_WCRTOMB
738 fi 786 ])
739 gl_WCHAR_MODULE_INDICATOR([wcrtomb]) 787 gl_WCHAR_MODULE_INDICATOR([wcrtomb])
740 gl_WCTYPE_H 788 gl_WCTYPE_H
741 gl_WCTYPE_H_REQUIRE_DEFAULTS 789 gl_WCTYPE_H_REQUIRE_DEFAULTS
790 AC_PROG_MKDIR_P
742 AC_REQUIRE([AC_CANONICAL_HOST]) 791 AC_REQUIRE([AC_CANONICAL_HOST])
743 case "$host_os" in 792 gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_MUTEX],
744 mingw*) 793 [case "$host_os" in mingw*) true;; *) false;; esac])
745 AC_LIBOBJ([windows-mutex])
746 ;;
747 esac
748 AC_REQUIRE([AC_CANONICAL_HOST]) 794 AC_REQUIRE([AC_CANONICAL_HOST])
749 case "$host_os" in 795 gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_ONCE],
750 mingw*) 796 [case "$host_os" in mingw*) true;; *) false;; esac])
751 AC_LIBOBJ([windows-once])
752 ;;
753 esac
754 AC_REQUIRE([AC_CANONICAL_HOST]) 797 AC_REQUIRE([AC_CANONICAL_HOST])
755 case "$host_os" in 798 gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RECMUTEX],
756 mingw*) 799 [case "$host_os" in mingw*) true;; *) false;; esac])
757 AC_LIBOBJ([windows-recmutex])
758 ;;
759 esac
760 AC_REQUIRE([AC_CANONICAL_HOST]) 800 AC_REQUIRE([AC_CANONICAL_HOST])
761 case "$host_os" in 801 gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RWLOCK],
762 mingw*) 802 [case "$host_os" in mingw*) true;; *) false;; esac])
763 AC_LIBOBJ([windows-rwlock])
764 ;;
765 esac
766 gl_XALLOC 803 gl_XALLOC
767 gl_MODULE_INDICATOR([xalloc]) 804 gl_MODULE_INDICATOR([xalloc])
768 gl_MODULE_INDICATOR([xalloc-die]) 805 gl_MODULE_INDICATOR([xalloc-die])
@@ -789,16 +826,28 @@ AC_DEFUN([gl_INIT],
789 AC_CONFIG_COMMANDS_PRE([ 826 AC_CONFIG_COMMANDS_PRE([
790 gl_libobjs= 827 gl_libobjs=
791 gl_ltlibobjs= 828 gl_ltlibobjs=
829 gl_libobjdeps=
792 if test -n "$gl_LIBOBJS"; then 830 if test -n "$gl_LIBOBJS"; then
793 # Remove the extension. 831 # Remove the extension.
832changequote(,)dnl
794 sed_drop_objext='s/\.o$//;s/\.obj$//' 833 sed_drop_objext='s/\.o$//;s/\.obj$//'
834 sed_dirname1='s,//*,/,g'
835 sed_dirname2='s,\(.\)/$,\1,'
836 sed_dirname3='s,^[^/]*$,.,'
837 sed_dirname4='s,\(.\)/[^/]*$,\1,'
838 sed_basename1='s,.*/,,'
839changequote([, ])dnl
795 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 840 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
796 gl_libobjs="$gl_libobjs $i.$ac_objext" 841 gl_libobjs="$gl_libobjs $i.$ac_objext"
797 gl_ltlibobjs="$gl_ltlibobjs $i.lo" 842 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
843 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
844 i_base=`echo "$i" | sed -e "$sed_basename1"`
845 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
798 done 846 done
799 fi 847 fi
800 AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) 848 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
801 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) 849 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
850 AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
802 ]) 851 ])
803 gltests_libdeps= 852 gltests_libdeps=
804 gltests_ltlibdeps= 853 gltests_ltlibdeps=
@@ -811,6 +860,7 @@ AC_DEFUN([gl_INIT],
811 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) 860 m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL])
812 gl_COMMON 861 gl_COMMON
813 gl_source_base='tests' 862 gl_source_base='tests'
863 gl_source_base_prefix=
814changequote(,)dnl 864changequote(,)dnl
815 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 865 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
816changequote([, ])dnl 866changequote([, ])dnl
@@ -839,17 +889,30 @@ changequote([, ])dnl
839 AC_CONFIG_COMMANDS_PRE([ 889 AC_CONFIG_COMMANDS_PRE([
840 gltests_libobjs= 890 gltests_libobjs=
841 gltests_ltlibobjs= 891 gltests_ltlibobjs=
892 gltests_libobjdeps=
842 if test -n "$gltests_LIBOBJS"; then 893 if test -n "$gltests_LIBOBJS"; then
843 # Remove the extension. 894 # Remove the extension.
895changequote(,)dnl
844 sed_drop_objext='s/\.o$//;s/\.obj$//' 896 sed_drop_objext='s/\.o$//;s/\.obj$//'
897 sed_dirname1='s,//*,/,g'
898 sed_dirname2='s,\(.\)/$,\1,'
899 sed_dirname3='s,^[^/]*$,.,'
900 sed_dirname4='s,\(.\)/[^/]*$,\1,'
901 sed_basename1='s,.*/,,'
902changequote([, ])dnl
845 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 903 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
846 gltests_libobjs="$gltests_libobjs $i.$ac_objext" 904 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
847 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" 905 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
906 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
907 i_base=`echo "$i" | sed -e "$sed_basename1"`
908 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
848 done 909 done
849 fi 910 fi
850 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) 911 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
851 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) 912 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
913 AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
852 ]) 914 ])
915 AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
853 LIBGNU_LIBDEPS="$gl_libdeps" 916 LIBGNU_LIBDEPS="$gl_libdeps"
854 AC_SUBST([LIBGNU_LIBDEPS]) 917 AC_SUBST([LIBGNU_LIBDEPS])
855 LIBGNU_LTLIBDEPS="$gl_ltlibdeps" 918 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
@@ -1000,6 +1063,7 @@ AC_DEFUN([gl_FILE_LIST], [
1000 lib/idpriv.h 1063 lib/idpriv.h
1001 lib/idx.h 1064 lib/idx.h
1002 lib/inet_ntop.c 1065 lib/inet_ntop.c
1066 lib/intprops-internal.h
1003 lib/intprops.h 1067 lib/intprops.h
1004 lib/inttypes.in.h 1068 lib/inttypes.in.h
1005 lib/itold.c 1069 lib/itold.c
@@ -1080,9 +1144,12 @@ AC_DEFUN([gl_FILE_LIST], [
1080 lib/stat.c 1144 lib/stat.c
1081 lib/stdalign.in.h 1145 lib/stdalign.in.h
1082 lib/stdbool.in.h 1146 lib/stdbool.in.h
1147 lib/stdckdint.in.h
1083 lib/stddef.in.h 1148 lib/stddef.in.h
1084 lib/stdint.in.h 1149 lib/stdint.in.h
1085 lib/stdio-impl.h 1150 lib/stdio-impl.h
1151 lib/stdio-read.c
1152 lib/stdio-write.c
1086 lib/stdio.in.h 1153 lib/stdio.in.h
1087 lib/stdlib.in.h 1154 lib/stdlib.in.h
1088 lib/str-two-way.h 1155 lib/str-two-way.h
@@ -1285,6 +1352,7 @@ AC_DEFUN([gl_FILE_LIST], [
1285 m4/ungetc.m4 1352 m4/ungetc.m4
1286 m4/unistd_h.m4 1353 m4/unistd_h.m4
1287 m4/unlocked-io.m4 1354 m4/unlocked-io.m4
1355 m4/vararrays.m4
1288 m4/vasnprintf.m4 1356 m4/vasnprintf.m4
1289 m4/vasprintf.m4 1357 m4/vasprintf.m4
1290 m4/visibility.m4 1358 m4/visibility.m4
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index 3d56d83..8428901 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
1# gnulib-tool.m4 serial 2 1# gnulib-tool.m4 serial 4
2dnl Copyright (C) 2004-2005, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004-2005, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -44,6 +44,12 @@ AC_DEFUN([gl_LGPL], [])
44dnl Usage: gl_MAKEFILE_NAME([FILENAME]) 44dnl Usage: gl_MAKEFILE_NAME([FILENAME])
45AC_DEFUN([gl_MAKEFILE_NAME], []) 45AC_DEFUN([gl_MAKEFILE_NAME], [])
46 46
47dnl Usage: gl_TESTS_MAKEFILE_NAME([FILENAME])
48AC_DEFUN([gl_TESTS_MAKEFILE_NAME], [])
49
50dnl Usage: gl_AUTOMAKE_SUBDIR
51AC_DEFUN([gl_AUTOMAKE_SUBDIR], [])
52
47dnl Usage: gl_LIBTOOL 53dnl Usage: gl_LIBTOOL
48AC_DEFUN([gl_LIBTOOL], []) 54AC_DEFUN([gl_LIBTOOL], [])
49 55
diff --git a/gl/m4/host-cpu-c-abi.m4 b/gl/m4/host-cpu-c-abi.m4
index 64e28b1..b922324 100644
--- a/gl/m4/host-cpu-c-abi.m4
+++ b/gl/m4/host-cpu-c-abi.m4
@@ -1,5 +1,5 @@
1# host-cpu-c-abi.m4 serial 14 1# host-cpu-c-abi.m4 serial 15
2dnl Copyright (C) 2002-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -382,6 +382,9 @@ EOF
382#ifndef __ia64__ 382#ifndef __ia64__
383#undef __ia64__ 383#undef __ia64__
384#endif 384#endif
385#ifndef __loongarch64__
386#undef __loongarch64__
387#endif
385#ifndef __m68k__ 388#ifndef __m68k__
386#undef __m68k__ 389#undef __m68k__
387#endif 390#endif
diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4
index f1390a3..69fc5ac 100644
--- a/gl/m4/hostent.m4
+++ b/gl/m4/hostent.m4
@@ -1,5 +1,5 @@
1# hostent.m4 serial 4 1# hostent.m4 serial 4
2dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iconv.m4 b/gl/m4/iconv.m4
index d0e61de..2065c97 100644
--- a/gl/m4/iconv.m4
+++ b/gl/m4/iconv.m4
@@ -1,5 +1,5 @@
1# iconv.m4 serial 24 1# iconv.m4 serial 26
2dnl Copyright (C) 2000-2002, 2007-2014, 2016-2021 Free Software Foundation, 2dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -234,12 +234,6 @@ AC_DEFUN([AM_ICONV_LINK],
234 234
235dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like 235dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like
236dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". 236dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
237dnl This is tricky because of the way 'aclocal' is implemented:
238dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
239dnl Otherwise aclocal's initial scan pass would miss the macro definition.
240dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
241dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
242dnl warnings.
243AC_DEFUN_ONCE([AM_ICONV], 237AC_DEFUN_ONCE([AM_ICONV],
244[ 238[
245 AM_ICONV_LINK 239 AM_ICONV_LINK
@@ -280,4 +274,20 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
280 ICONV_CONST="const" 274 ICONV_CONST="const"
281 fi 275 fi
282 ]) 276 ])
277
278 dnl A summary result, for those packages which want to print a summary at the
279 dnl end of the configuration.
280 if test "$am_func_iconv" = yes; then
281 if test -n "$LIBICONV"; then
282 am_cv_func_iconv_summary='yes, in libiconv'
283 else
284 am_cv_func_iconv_summary='yes, in libc'
285 fi
286 else
287 if test "$am_cv_func_iconv" = yes; then
288 am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
289 else
290 am_cv_func_iconv_summary='no, consider installing GNU libiconv'
291 fi
292 fi
283]) 293])
diff --git a/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4
index d96fdd1..b3b1c7b 100644
--- a/gl/m4/idpriv.m4
+++ b/gl/m4/idpriv.m4
@@ -1,5 +1,5 @@
1# idpriv.m4 serial 1 1# idpriv.m4 serial 1
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index bdd542b..a9247f6 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
1# include_next.m4 serial 26 1# include_next.m4 serial 26
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -193,9 +193,9 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
193 if test AS_VAR_GET([gl_header_exists]) = yes; then 193 if test AS_VAR_GET([gl_header_exists]) = yes; then
194 AS_VAR_POPDEF([gl_header_exists]) 194 AS_VAR_POPDEF([gl_header_exists])
195 ]) 195 ])
196 gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) 196 gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME)
197 AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) 197 AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME))
198 AS_VAR_SET([gl_next_header], ['"'$gl_header'"']) 198 AS_VAR_SET([gl_next_header], ['"'$gl_header'"'])
199 m4_if([$2], [check], 199 m4_if([$2], [check],
200 [else 200 [else
201 AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) 201 AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 171f53e..c335cae 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,5 +1,5 @@
1# inet_ntop.m4 serial 21 1# inet_ntop.m4 serial 21
2dnl Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intl-thread-locale.m4 b/gl/m4/intl-thread-locale.m4
index 890fec0..d5d5b26 100644
--- a/gl/m4/intl-thread-locale.m4
+++ b/gl/m4/intl-thread-locale.m4
@@ -1,5 +1,5 @@
1# intl-thread-locale.m4 serial 9 1# intl-thread-locale.m4 serial 9
2dnl Copyright (C) 2015-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2015-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intlmacosx.m4 b/gl/m4/intlmacosx.m4
index 4ae0d12..ecc88d6 100644
--- a/gl/m4/intlmacosx.m4
+++ b/gl/m4/intlmacosx.m4
@@ -1,5 +1,5 @@
1# intlmacosx.m4 serial 8 (gettext-0.20.2) 1# intlmacosx.m4 serial 8 (gettext-0.20.2)
2dnl Copyright (C) 2004-2014, 2016, 2019-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004-2014, 2016, 2019-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index 63c4b41..8a15dab 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
1# intmax_t.m4 serial 9 1# intmax_t.m4 serial 9
2dnl Copyright (C) 1997-2004, 2006-2007, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 1997-2004, 2006-2007, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index 64b1de5..df25a21 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,5 +1,5 @@
1# inttypes.m4 serial 35 1# inttypes.m4 serial 36
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -36,7 +36,7 @@ AC_DEFUN_ONCE([gl_INTTYPES_INCOMPLETE],
36AC_DEFUN([gl_INTTYPES_PRI_SCN], 36AC_DEFUN([gl_INTTYPES_PRI_SCN],
37[ 37[
38 PRIPTR_PREFIX= 38 PRIPTR_PREFIX=
39 if test -n "$STDINT_H"; then 39 if $GL_GENERATE_STDINT_H; then
40 dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or 40 dnl Using the gnulib <stdint.h>. It defines intptr_t to 'long' or
41 dnl 'long long', depending on _WIN64. 41 dnl 'long long', depending on _WIN64.
42 AC_COMPILE_IFELSE( 42 AC_COMPILE_IFELSE(
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index 672a93e..6e9eebf 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
1# inttypes_h.m4 serial 10 1# inttypes_h.m4 serial 10
2dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 87959f7..563c8c4 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
1# langinfo_h.m4 serial 12 1# langinfo_h.m4 serial 12
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index fbde5e6..ec9677c 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,7 +1,7 @@
1# Enable large files on systems where this is not the default. 1# Enable large files on systems where this is not the default.
2# Enable support for files on Linux file systems with 64-bit inode numbers. 2# Enable support for files on Linux file systems with 64-bit inode numbers.
3 3
4# Copyright 1992-1996, 1998-2021 Free Software Foundation, Inc. 4# Copyright 1992-1996, 1998-2022 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
@@ -10,8 +10,10 @@
10# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this 10# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
11# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko 11# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
12# and ftello in C++ mode as well. 12# and ftello in C++ mode as well.
13# Fixed in Autoconf 2.72, which has AC_SYS_YEAR2038.
13AC_DEFUN([gl_SET_LARGEFILE_SOURCE], 14AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
14[ 15[
16 m4_ifndef([AC_SYS_YEAR2038], [
15 AC_REQUIRE([AC_CANONICAL_HOST]) 17 AC_REQUIRE([AC_CANONICAL_HOST])
16 AC_FUNC_FSEEKO 18 AC_FUNC_FSEEKO
17 case "$host_os" in 19 case "$host_os" in
@@ -20,9 +22,10 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
20 [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).]) 22 [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
21 ;; 23 ;;
22 esac 24 esac
25 ])
23]) 26])
24 27
25# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+ 28# Work around a problem in Autoconf through 2.71 on glibc 2.34+
26# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69: 29# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
27# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, 30# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
28# or configures them incorrectly in some cases. 31# or configures them incorrectly in some cases.
@@ -43,6 +46,7 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
43]) 46])
44])# m4_version_prereq 2.70 47])# m4_version_prereq 2.70
45 48
49m4_ifndef([AC_SYS_YEAR2038], [
46 50
47# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, 51# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
48# CACHE-VAR, 52# CACHE-VAR,
@@ -118,6 +122,7 @@ AS_IF([test "$enable_largefile" != no],
118 [64], 122 [64],
119 [gl_YEAR2038_BODY([])])]) 123 [gl_YEAR2038_BODY([])])])
120])# AC_SYS_LARGEFILE 124])# AC_SYS_LARGEFILE
125])# m4_ifndef AC_SYS_YEAR2038
121 126
122# Enable large files on systems where this is implemented by Gnulib, not by the 127# Enable large files on systems where this is implemented by Gnulib, not by the
123# system headers. 128# system headers.
diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index 076358d..934207a 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,5 +1,5 @@
1# lib-ld.m4 serial 10 1# lib-ld.m4 serial 10
2dnl Copyright (C) 1996-2003, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 787efab..3b75bcd 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
1# lib-link.m4 serial 32 1# lib-link.m4 serial 33
2dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -196,8 +196,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
196 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" 196 eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
197 ]) 197 ])
198 AC_ARG_WITH(PACK[-prefix], 198 AC_ARG_WITH(PACK[-prefix],
199[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib 199[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib
200 --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], 200 --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]],
201[ 201[
202 if test "X$withval" = "Xno"; then 202 if test "X$withval" = "Xno"; then
203 use_additional=no 203 use_additional=no
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index 3c94db0..999f712 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
1# lib-prefix.m4 serial 19 1# lib-prefix.m4 serial 20
2dnl Copyright (C) 2001-2005, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -174,7 +174,7 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
174 174
175 AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], 175 AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
176 [AC_EGREP_CPP([Extensible Linking Format], 176 [AC_EGREP_CPP([Extensible Linking Format],
177 [#ifdef __ELF__ 177 [#if defined __ELF__ || (defined __linux__ && defined __EDG__)
178 Extensible Linking Format 178 Extensible Linking Format
179 #endif 179 #endif
180 ], 180 ],
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4
index 00c9fe9..5d5a5bf 100644
--- a/gl/m4/limits-h.m4
+++ b/gl/m4/limits-h.m4
@@ -1,6 +1,6 @@
1dnl Check whether limits.h has needed features. 1dnl Check whether limits.h has needed features.
2 2
3dnl Copyright 2016-2021 Free Software Foundation, Inc. 3dnl Copyright 2016-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -27,18 +27,15 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
27 [gl_cv_header_limits_width=yes], 27 [gl_cv_header_limits_width=yes],
28 [gl_cv_header_limits_width=no])]) 28 [gl_cv_header_limits_width=no])])
29 if test "$gl_cv_header_limits_width" = yes; then 29 if test "$gl_cv_header_limits_width" = yes; then
30 LIMITS_H= 30 GL_GENERATE_LIMITS_H=false
31 else 31 else
32 LIMITS_H=limits.h 32 GL_GENERATE_LIMITS_H=true
33 fi 33 fi
34 AC_SUBST([LIMITS_H])
35 AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
36]) 34])
37 35
38dnl Unconditionally enables the replacement of <limits.h>. 36dnl Unconditionally enables the replacement of <limits.h>.
39AC_DEFUN([gl_REPLACE_LIMITS_H], 37AC_DEFUN([gl_REPLACE_LIMITS_H],
40[ 38[
41 AC_REQUIRE([gl_LIMITS_H]) 39 AC_REQUIRE([gl_LIMITS_H])
42 LIMITS_H='limits.h' 40 GL_GENERATE_LIMITS_H=true
43 AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
44]) 41])
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4
index 04389fc..f5dbbd4 100644
--- a/gl/m4/localcharset.m4
+++ b/gl/m4/localcharset.m4
@@ -1,5 +1,5 @@
1# localcharset.m4 serial 8 1# localcharset.m4 serial 8
2dnl Copyright (C) 2002, 2004, 2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index b61df7e..3753891 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,5 +1,5 @@
1# locale-fr.m4 serial 20 1# locale-fr.m4 serial 20
2dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index cd94288..73a5d1a 100644
--- a/gl/m4/locale-ja.m4
+++ b/gl/m4/locale-ja.m4
@@ -1,5 +1,5 @@
1# locale-ja.m4 serial 15 1# locale-ja.m4 serial 15
2dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index 1228be8..c997971 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,5 +1,5 @@
1# locale-zh.m4 serial 15 1# locale-zh.m4 serial 15
2dnl Copyright (C) 2003, 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
index 444a381..ca5d0d0 100644
--- a/gl/m4/locale_h.m4
+++ b/gl/m4/locale_h.m4
@@ -1,5 +1,5 @@
1# locale_h.m4 serial 28 1# locale_h.m4 serial 28
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
index e29c7c3..09c1a1a 100644
--- a/gl/m4/localeconv.m4
+++ b/gl/m4/localeconv.m4
@@ -1,5 +1,5 @@
1# localeconv.m4 serial 1 1# localeconv.m4 serial 1
2dnl Copyright (C) 2012-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index d68c12d..c4cbf07 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,5 +1,5 @@
1# lock.m4 serial 14 1# lock.m4 serial 14
2dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index faab09b..0583511 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,5 +1,5 @@
1# lseek.m4 serial 12 1# lseek.m4 serial 12
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 972e808..6b76c1e 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
1# malloc.m4 serial 27 1# malloc.m4 serial 28
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -43,8 +43,9 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
43[ 43[
44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
45 AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) 45 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
46 if test $REPLACE_MALLOC = 0; then 46 REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
47 _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=1]) 47 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
48 _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
48 fi 49 fi
49]) 50])
50 51
@@ -56,7 +57,7 @@ AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
56[ 57[
57 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 58 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
58 AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) 59 AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
59 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC=1 60 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
60]) 61])
61 62
62# Test whether malloc, realloc, calloc refuse to create objects 63# Test whether malloc, realloc, calloc refuse to create objects
@@ -109,7 +110,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
109 AC_DEFINE([HAVE_MALLOC_POSIX], [1], 110 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
110 [Define if malloc, realloc, and calloc set errno on allocation failure.]) 111 [Define if malloc, realloc, and calloc set errno on allocation failure.])
111 else 112 else
112 REPLACE_MALLOC=1 113 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
113 fi 114 fi
114]) 115])
115 116
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index 06ed2c6..77eb96a 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,5 +1,5 @@
1# malloca.m4 serial 2 1# malloca.m4 serial 2
2dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index b3a10c3..a08526a 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,5 @@
1# math_h.m4 serial 125 1# math_h.m4 serial 125
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index 1d4e73d..ec8716b 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
1# mbrtowc.m4 serial 38 -*- coding: utf-8 -*- 1# mbrtowc.m4 serial 38 -*- coding: utf-8 -*-
2dnl Copyright (C) 2001-2002, 2004-2005, 2008-2021 Free Software Foundation, 2dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index dc6e10d..ebd2d4f 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,5 +1,5 @@
1# mbsinit.m4 serial 9 1# mbsinit.m4 serial 9
2dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4
index e7fe358..a6eba1b 100644
--- a/gl/m4/mbstate_t.m4
+++ b/gl/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
1# mbstate_t.m4 serial 14 1# mbstate_t.m4 serial 14
2dnl Copyright (C) 2000-2002, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2000-2002, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
index 7fc74c9..2827e83 100644
--- a/gl/m4/mbtowc.m4
+++ b/gl/m4/mbtowc.m4
@@ -1,5 +1,5 @@
1# mbtowc.m4 serial 3 1# mbtowc.m4 serial 3
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index ca08192..c7489d8 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
1# memchr.m4 serial 18 1# memchr.m4 serial 18
2dnl Copyright (C) 2002-2004, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index e21a687..b976739 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
1# minmax.m4 serial 4 1# minmax.m4 serial 4
2dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4
index 721189a..431b17d 100644
--- a/gl/m4/mktime.m4
+++ b/gl/m4/mktime.m4
@@ -1,5 +1,5 @@
1# serial 36 1# serial 37
2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -82,7 +82,8 @@ spring_forward_gap ()
82 instead of "TZ=America/Vancouver" in order to detect the bug even 82 instead of "TZ=America/Vancouver" in order to detect the bug even
83 on systems that don't support the Olson extension, or don't have the 83 on systems that don't support the Olson extension, or don't have the
84 full zoneinfo tables installed. */ 84 full zoneinfo tables installed. */
85 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); 85 if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
86 return -1;
86 87
87 tm.tm_year = 98; 88 tm.tm_year = 98;
88 tm.tm_mon = 3; 89 tm.tm_mon = 3;
@@ -170,7 +171,8 @@ year_2050_test ()
170 instead of "TZ=America/Vancouver" in order to detect the bug even 171 instead of "TZ=America/Vancouver" in order to detect the bug even
171 on systems that don't support the Olson extension, or don't have the 172 on systems that don't support the Olson extension, or don't have the
172 full zoneinfo tables installed. */ 173 full zoneinfo tables installed. */
173 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); 174 if (putenv ("TZ=PST8PDT,M4.1.0,M10.5.0") != 0)
175 return -1;
174 176
175 t = mktime (&tm); 177 t = mktime (&tm);
176 178
@@ -181,6 +183,25 @@ year_2050_test ()
181 || (0 < t && answer - 120 <= t && t <= answer + 120)); 183 || (0 < t && answer - 120 <= t && t <= answer + 120));
182} 184}
183 185
186static int
187indiana_test ()
188{
189 if (putenv ("TZ=America/Indiana/Indianapolis") != 0)
190 return -1;
191 struct tm tm;
192 tm.tm_year = 1986 - 1900; tm.tm_mon = 4 - 1; tm.tm_mday = 28;
193 tm.tm_hour = 16; tm.tm_min = 24; tm.tm_sec = 50; tm.tm_isdst = 0;
194 time_t std = mktime (&tm);
195 if (! (std == 515107490 || std == 515107503))
196 return 1;
197
198 /* This platform supports TZDB, either without or with leap seconds.
199 Return true if GNU Bug#48085 is absent. */
200 tm.tm_isdst = 1;
201 time_t dst = mktime (&tm);
202 return std - dst == 60 * 60;
203}
204
184int 205int
185main () 206main ()
186{ 207{
@@ -236,7 +257,7 @@ main ()
236 result |= 16; 257 result |= 16;
237 if (! spring_forward_gap ()) 258 if (! spring_forward_gap ())
238 result |= 32; 259 result |= 32;
239 if (! year_2050_test ()) 260 if (! year_2050_test () || ! indiana_test ())
240 result |= 64; 261 result |= 64;
241 return result; 262 return result;
242}]])], 263}]])],
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index e47aa2d..a4580ff 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
1# mmap-anon.m4 serial 12 1# mmap-anon.m4 serial 12
2dnl Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index 3bd4b89..e08d27a 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,5 +1,5 @@
1# mode_t.m4 serial 2 1# mode_t.m4 serial 2
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4
index 49029ed..a3f72df 100644
--- a/gl/m4/mountlist.m4
+++ b/gl/m4/mountlist.m4
@@ -1,5 +1,5 @@
1# serial 15 1# serial 15
2dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index 3ba5b4e..b32cf6e 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
1# msvc-inval.m4 serial 1 1# msvc-inval.m4 serial 1
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index aae25ce..16ceb1f 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
1# msvc-nothrow.m4 serial 1 1# msvc-nothrow.m4 serial 1
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index f1678d9..5d94276 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
1# multiarch.m4 serial 9 1# multiarch.m4 serial 9
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index eb7c3b8..d6a9d70 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,5 +1,5 @@
1# netdb_h.m4 serial 15 1# netdb_h.m4 serial 15
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index c555596..de26fe8 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
1# netinet_in_h.m4 serial 5 1# netinet_in_h.m4 serial 6
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,9 +14,9 @@ AC_DEFUN([gl_HEADER_NETINET_IN],
14 [gl_cv_header_netinet_in_h_selfcontained=no]) 14 [gl_cv_header_netinet_in_h_selfcontained=no])
15 ]) 15 ])
16 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then 16 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
17 NETINET_IN_H='' 17 GL_GENERATE_NETINET_IN_H=false
18 else 18 else
19 NETINET_IN_H='netinet/in.h' 19 GL_GENERATE_NETINET_IN_H=true
20 AC_CHECK_HEADERS([netinet/in.h]) 20 AC_CHECK_HEADERS([netinet/in.h])
21 gl_CHECK_NEXT_HEADERS([netinet/in.h]) 21 gl_CHECK_NEXT_HEADERS([netinet/in.h])
22 if test $ac_cv_header_netinet_in_h = yes; then 22 if test $ac_cv_header_netinet_in_h = yes; then
@@ -26,6 +26,4 @@ AC_DEFUN([gl_HEADER_NETINET_IN],
26 fi 26 fi
27 AC_SUBST([HAVE_NETINET_IN_H]) 27 AC_SUBST([HAVE_NETINET_IN_H])
28 fi 28 fi
29 AC_SUBST([NETINET_IN_H])
30 AM_CONDITIONAL([GL_GENERATE_NETINET_IN_H], [test -n "$NETINET_IN_H"])
31]) 29])
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4
index 6ad32c8..d20a09c 100644
--- a/gl/m4/nl_langinfo.m4
+++ b/gl/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
1# nl_langinfo.m4 serial 8 1# nl_langinfo.m4 serial 8
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/nls.m4 b/gl/m4/nls.m4
index f4f6b80..7c11c90 100644
--- a/gl/m4/nls.m4
+++ b/gl/m4/nls.m4
@@ -1,5 +1,5 @@
1# nls.m4 serial 6 (gettext-0.20.2) 1# nls.m4 serial 6 (gettext-0.20.2)
2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2021 Free 2dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2022 Free
3dnl Software Foundation, Inc. 3dnl Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 27412cd..91f00c1 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
1# nocrash.m4 serial 5 1# nocrash.m4 serial 5
2dnl Copyright (C) 2005, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index bdec43c..0890ada 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,5 +1,5 @@
1# off_t.m4 serial 1 1# off_t.m4 serial 1
2dnl Copyright (C) 2012-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4
index 542a90f..16cd5ec 100644
--- a/gl/m4/open-cloexec.m4
+++ b/gl/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
1# Test whether O_CLOEXEC is defined. 1# Test whether O_CLOEXEC is defined.
2 2
3dnl Copyright 2017-2021 Free Software Foundation, Inc. 3dnl Copyright 2017-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4
index e619039..4fbf491 100644
--- a/gl/m4/open-slash.m4
+++ b/gl/m4/open-slash.m4
@@ -1,5 +1,5 @@
1# open-slash.m4 serial 2 1# open-slash.m4 serial 2
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index c634386..f82fd6c 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,5 +1,5 @@
1# open.m4 serial 15 1# open.m4 serial 15
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index e67c656..44add99 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,5 +1,5 @@
1# pathmax.m4 serial 11 1# pathmax.m4 serial 11
2dnl Copyright (C) 2002-2003, 2005-2006, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/pid_t.m4 b/gl/m4/pid_t.m4
index b7650a1..cb26f36 100644
--- a/gl/m4/pid_t.m4
+++ b/gl/m4/pid_t.m4
@@ -1,5 +1,5 @@
1# pid_t.m4 serial 4 1# pid_t.m4 serial 4
2dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/po.m4 b/gl/m4/po.m4
index 66bea3e..ace6f96 100644
--- a/gl/m4/po.m4
+++ b/gl/m4/po.m4
@@ -1,5 +1,5 @@
1# po.m4 serial 31 (gettext-0.20.2) 1# po.m4 serial 31 (gettext-0.20.2)
2dnl Copyright (C) 1995-2014, 2016, 2018-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 284c7c5..667452e 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
1# printf.m4 serial 73 1# printf.m4 serial 73
2dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/progtest.m4 b/gl/m4/progtest.m4
index 9e8823c..4a5b0b4 100644
--- a/gl/m4/progtest.m4
+++ b/gl/m4/progtest.m4
@@ -1,5 +1,5 @@
1# progtest.m4 serial 9 (gettext-0.21.1) 1# progtest.m4 serial 9 (gettext-0.21.1)
2dnl Copyright (C) 1996-2003, 2005, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1996-2003, 2005, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4
index a5fbead..8ad7839 100644
--- a/gl/m4/pthread_rwlock_rdlock.m4
+++ b/gl/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
1# pthread_rwlock_rdlock.m4 serial 4 1# pthread_rwlock_rdlock.m4 serial 4
2dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 0abc418..86e57c2 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
1# realloc.m4 serial 24 1# realloc.m4 serial 26
2dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -43,8 +43,8 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU],
43[ 43[
44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 44 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
45 AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) 45 AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
46 if test $REPLACE_REALLOC = 0; then 46 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
47 _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=1]) 47 _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1])
48 fi 48 fi
49])# gl_FUNC_REALLOC_GNU 49])# gl_FUNC_REALLOC_GNU
50 50
@@ -57,7 +57,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
57[ 57[
58 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 58 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
59 AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) 59 AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
60 if test $REPLACE_MALLOC = 1; then 60 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
61 REPLACE_REALLOC=1 61 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
62 fi 62 fi
63]) 63])
diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4
index 9d8a626..f39ab6e 100644
--- a/gl/m4/reallocarray.m4
+++ b/gl/m4/reallocarray.m4
@@ -1,5 +1,5 @@
1# reallocarray.m4 serial 3 1# reallocarray.m4 serial 3
2dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4
index 1c7e562..4734298 100644
--- a/gl/m4/regex.m4
+++ b/gl/m4/regex.m4
@@ -1,6 +1,6 @@
1# serial 73 1# serial 73
2 2
3# Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. 3# Copyright (C) 1996-2001, 2003-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index 9bc3bcd..c1b7d15 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,5 +1,5 @@
1# servent.m4 serial 4 1# servent.m4 serial 4
2dnl Copyright (C) 2008, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index f79a278..2000039 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,5 +1,5 @@
1# setenv.m4 serial 30 1# setenv.m4 serial 30
2dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4
index 2c958ed..09ea50e 100644
--- a/gl/m4/setlocale_null.m4
+++ b/gl/m4/setlocale_null.m4
@@ -1,5 +1,5 @@
1# setlocale_null.m4 serial 5 1# setlocale_null.m4 serial 5
2dnl Copyright (C) 2019-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sha1.m4 b/gl/m4/sha1.m4
index fdba7a6..0d7abc7 100644
--- a/gl/m4/sha1.m4
+++ b/gl/m4/sha1.m4
@@ -1,5 +1,5 @@
1# sha1.m4 serial 12 1# sha1.m4 serial 12
2dnl Copyright (C) 2002-2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index 1d41ce9..1d6abae 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
1# size_max.m4 serial 12 1# size_max.m4 serial 12
2dnl Copyright (C) 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4
index 8520994..7420591 100644
--- a/gl/m4/snprintf.m4
+++ b/gl/m4/snprintf.m4
@@ -1,5 +1,5 @@
1# snprintf.m4 serial 7 1# snprintf.m4 serial 7
2dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index 0f8a082..b8bd0af 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,5 +1,5 @@
1# socketlib.m4 serial 3 1# socketlib.m4 serial 3
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index 02b43b6..aa04acc 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
1# sockets.m4 serial 7 1# sockets.m4 serial 7
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index eca1d1b..1390ac4 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
1# socklen.m4 serial 11 1# socklen.m4 serial 11
2dnl Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index 17e14c7..b1c4068 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
1# sockpfaf.m4 serial 10 1# sockpfaf.m4 serial 10
2dnl Copyright (C) 2004, 2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index f0ed509..03b2b89 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
1# ssize_t.m4 serial 5 (gettext-0.18.2) 1# ssize_t.m4 serial 5 (gettext-0.18.2)
2dnl Copyright (C) 2001-2003, 2006, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4
index df1c2a7..342857d 100644
--- a/gl/m4/stat-time.m4
+++ b/gl/m4/stat-time.m4
@@ -1,6 +1,6 @@
1# Checks for stat-related time functions. 1# Checks for stat-related time functions.
2 2
3# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2021 Free Software 3# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software
4# Foundation, Inc. 4# Foundation, Inc.
5 5
6# This file is free software; the Free Software Foundation 6# This file is free software; the Free Software Foundation
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index 9bcdb72..916eb88 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
1# serial 18 1# serial 18
2 2
3# Copyright (C) 2009-2021 Free Software Foundation, Inc. 3# Copyright (C) 2009-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/std-gnu11.m4 b/gl/m4/std-gnu11.m4
index 7b1a042..5ca1860 100644
--- a/gl/m4/std-gnu11.m4
+++ b/gl/m4/std-gnu11.m4
@@ -9,7 +9,7 @@
9m4_version_prereq([2.70], [], [ 9m4_version_prereq([2.70], [], [
10 10
11 11
12# Copyright (C) 2001-2021 Free Software Foundation, Inc. 12# Copyright (C) 2001-2022 Free Software Foundation, Inc.
13 13
14# This program is free software; you can redistribute it and/or modify 14# This program is free software; you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by 15# it under the terms of the GNU General Public License as published by
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index e22d7f7..78577cb 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,6 +1,6 @@
1# Check for stdalign.h that conforms to C11. 1# Check for stdalign.h that conforms to C11.
2 2
3dnl Copyright 2011-2021 Free Software Foundation, Inc. 3dnl Copyright 2011-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -49,11 +49,8 @@ AC_DEFUN([gl_STDALIGN_H],
49 [gl_cv_header_working_stdalign_h=no])]) 49 [gl_cv_header_working_stdalign_h=no])])
50 50
51 if test $gl_cv_header_working_stdalign_h = yes; then 51 if test $gl_cv_header_working_stdalign_h = yes; then
52 STDALIGN_H='' 52 GL_GENERATE_STDALIGN_H=false
53 else 53 else
54 STDALIGN_H='stdalign.h' 54 GL_GENERATE_STDALIGN_H=true
55 fi 55 fi
56
57 AC_SUBST([STDALIGN_H])
58 AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
59]) 56])
diff --git a/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
index 3169779..c67908a 100644
--- a/gl/m4/stdbool.m4
+++ b/gl/m4/stdbool.m4
@@ -1,15 +1,15 @@
1# Check for stdbool.h that conforms to C99. 1# Check for stdbool.h that conforms to C99.
2 2
3dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. 3dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7 7
8#serial 8 8#serial 9
9 9
10# Prepare for substituting <stdbool.h> if it is not supported. 10# Prepare for substituting <stdbool.h> if it is not supported.
11 11
12AC_DEFUN([AM_STDBOOL_H], 12AC_DEFUN([gl_STDBOOL_H],
13[ 13[
14 AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) 14 AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
15 AC_REQUIRE([AC_CANONICAL_HOST]) 15 AC_REQUIRE([AC_CANONICAL_HOST])
@@ -22,20 +22,18 @@ AC_DEFUN([AM_STDBOOL_H],
22 case "$host_os" in 22 case "$host_os" in
23 solaris*) 23 solaris*)
24 if test -z "$GCC"; then 24 if test -z "$GCC"; then
25 STDBOOL_H='stdbool.h' 25 GL_GENERATE_STDBOOL_H=true
26 else 26 else
27 STDBOOL_H='' 27 GL_GENERATE_STDBOOL_H=false
28 fi 28 fi
29 ;; 29 ;;
30 *) 30 *)
31 STDBOOL_H='' 31 GL_GENERATE_STDBOOL_H=false
32 ;; 32 ;;
33 esac 33 esac
34 else 34 else
35 STDBOOL_H='stdbool.h' 35 GL_GENERATE_STDBOOL_H=true
36 fi 36 fi
37 AC_SUBST([STDBOOL_H])
38 AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
39 37
40 if test "$ac_cv_type__Bool" = yes; then 38 if test "$ac_cv_type__Bool" = yes; then
41 HAVE__BOOL=1 39 HAVE__BOOL=1
@@ -45,78 +43,76 @@ AC_DEFUN([AM_STDBOOL_H],
45 AC_SUBST([HAVE__BOOL]) 43 AC_SUBST([HAVE__BOOL])
46]) 44])
47 45
48# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. 46m4_version_prereq([2.72], [], [
49AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
50
51# This version of the macro is needed in autoconf <= 2.68.
52 47
53AC_DEFUN([AC_CHECK_HEADER_STDBOOL], 48AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
54 [AC_CACHE_CHECK([for stdbool.h that conforms to C99], 49 [AC_CHECK_TYPES([_Bool])
50 AC_CACHE_CHECK([for stdbool.h that conforms to C99 or later],
55 [ac_cv_header_stdbool_h], 51 [ac_cv_header_stdbool_h],
56 [AC_COMPILE_IFELSE( 52 [AC_COMPILE_IFELSE(
57 [AC_LANG_PROGRAM( 53 [AC_LANG_PROGRAM(
58 [[ 54 [[#include <stdbool.h>
59 #include <stdbool.h> 55
60 56 /* "true" and "false" should be usable in #if expressions and
61 #ifdef __cplusplus 57 integer constant expressions, and "bool" should be a valid
62 typedef bool Bool; 58 type name.
63 #else 59
64 typedef _Bool Bool; 60 Although C 1999 requires bool, true, and false to be macros,
65 #ifndef bool 61 C 2023 and C++ 2011 overrule that, so do not test for that.
66 "error: bool is not defined" 62 Although C 1999 requires __bool_true_false_are_defined and
67 #endif 63 _Bool, C 2023 says they are obsolescent, so do not require
68 #ifndef false 64 them. */
69 "error: false is not defined" 65
70 #endif 66 #if !true
71 #if false 67 #error "'true' is not true"
72 "error: false is not 0" 68 #endif
73 #endif 69 #if true != 1
74 #ifndef true 70 #error "'true' is not equal to 1"
75 "error: true is not defined"
76 #endif
77 #if true != 1
78 "error: true is not 1"
79 #endif
80 #endif 71 #endif
72 char b[true == 1 ? 1 : -1];
73 char c[true];
81 74
82 #ifndef __bool_true_false_are_defined 75 #if false
83 "error: __bool_true_false_are_defined is not defined" 76 #error "'false' is not false"
77 #endif
78 #if false != 0
79 #error "'false' is not equal to 0"
84 #endif 80 #endif
81 char d[false == 0 ? 1 : -1];
82
83 enum { e = false, f = true, g = false * true, h = true * 256 };
84
85 char i[(bool) 0.5 == true ? 1 : -1];
86 char j[(bool) 0.0 == false ? 1 : -1];
87 char k[sizeof (bool) > 0 ? 1 : -1];
88
89 struct sb { bool s: 1; bool t; } s;
90 char l[sizeof s.t > 0 ? 1 : -1];
85 91
86 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
87
88 char a[true == 1 ? 1 : -1];
89 char b[false == 0 ? 1 : -1];
90 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
91 char d[(bool) 0.5 == true ? 1 : -1];
92 /* See body of main program for 'e'. */
93 char f[(Bool) 0.0 == false ? 1 : -1];
94 char g[true];
95 char h[sizeof (Bool)];
96 char i[sizeof s.t];
97 enum { j = false, k = true, l = false * true, m = true * 256 };
98 /* The following fails for 92 /* The following fails for
99 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ 93 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
100 Bool n[m]; 94 bool m[h];
101 char o[sizeof n == m * sizeof n[0] ? 1 : -1]; 95 char n[sizeof m == h * sizeof m[0] ? 1 : -1];
102 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; 96 char o[-1 - (bool) 0 < 0 ? 1 : -1];
103 /* Catch a bug in an HP-UX C compiler. See 97 /* Catch a bug in an HP-UX C compiler. See
104 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html 98 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
105 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html 99 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
106 */ 100 */
107 Bool q = true; 101 bool p = true;
108 Bool *pq = &q; 102 bool *pp = &p;
109 bool *qq = &q;
110 ]], 103 ]],
111 [[ 104 [[
112 bool e = &s; 105 bool ps = &s;
113 *pq |= q; *pq |= ! q; 106 *pp |= p;
114 *qq |= q; *qq |= ! q; 107 *pp |= ! p;
115 /* Refer to every declared value, to avoid compiler optimizations. */ 108
116 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l 109 /* Refer to every declared value, so they cannot be
117 + !m + !n + !o + !p + !q + !pq + !qq); 110 discarded as unused. */
111 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
112 + !l + !m + !n + !o + !p + !pp + !ps);
118 ]])], 113 ]])],
119 [ac_cv_header_stdbool_h=yes], 114 [ac_cv_header_stdbool_h=yes],
120 [ac_cv_header_stdbool_h=no])]) 115 [ac_cv_header_stdbool_h=no])])
121 AC_CHECK_TYPES([_Bool]) 116])# AC_CHECK_HEADER_STDBOOL
122]) 117
118]) # m4_version_prereq 2.72
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 1303d2e..abfd203 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
1# stddef_h.m4 serial 11 1# stddef_h.m4 serial 12
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
14 dnl Persuade OpenBSD <stddef.h> to declare max_align_t. 14 dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) 15 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
16 16
17 STDDEF_H= 17 GL_GENERATE_STDDEF_H=false
18 18
19 dnl Test whether the type max_align_t exists and whether its alignment 19 dnl Test whether the type max_align_t exists and whether its alignment
20 dnl "is as great as is supported by the implementation in all contexts". 20 dnl "is as great as is supported by the implementation in all contexts".
@@ -41,12 +41,12 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
41 ]) 41 ])
42 if test $gl_cv_type_max_align_t = no; then 42 if test $gl_cv_type_max_align_t = no; then
43 HAVE_MAX_ALIGN_T=0 43 HAVE_MAX_ALIGN_T=0
44 STDDEF_H=stddef.h 44 GL_GENERATE_STDDEF_H=true
45 fi 45 fi
46 46
47 if test $gt_cv_c_wchar_t = no; then 47 if test $gt_cv_c_wchar_t = no; then
48 HAVE_WCHAR_T=0 48 HAVE_WCHAR_T=0
49 STDDEF_H=stddef.h 49 GL_GENERATE_STDDEF_H=true
50 fi 50 fi
51 51
52 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], 52 AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
@@ -58,12 +58,10 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
58 [gl_cv_decl_null_works=no])]) 58 [gl_cv_decl_null_works=no])])
59 if test $gl_cv_decl_null_works = no; then 59 if test $gl_cv_decl_null_works = no; then
60 REPLACE_NULL=1 60 REPLACE_NULL=1
61 STDDEF_H=stddef.h 61 GL_GENERATE_STDDEF_H=true
62 fi 62 fi
63 63
64 AC_SUBST([STDDEF_H]) 64 if $GL_GENERATE_STDDEF_H; then
65 AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"])
66 if test -n "$STDDEF_H"; then
67 gl_NEXT_HEADERS([stddef.h]) 65 gl_NEXT_HEADERS([stddef.h])
68 fi 66 fi
69]) 67])
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 2eb1652..c3f0894 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
1# stdint.m4 serial 60 1# stdint.m4 serial 61
2dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -296,7 +296,7 @@ static const char *macro_values[] =
296 HAVE_C99_STDINT_H=0 296 HAVE_C99_STDINT_H=0
297 HAVE_SYS_BITYPES_H=0 297 HAVE_SYS_BITYPES_H=0
298 HAVE_SYS_INTTYPES_H=0 298 HAVE_SYS_INTTYPES_H=0
299 STDINT_H=stdint.h 299 GL_GENERATE_STDINT_H=true
300 case "$gl_cv_header_working_stdint_h" in 300 case "$gl_cv_header_working_stdint_h" in
301 *yes) 301 *yes)
302 HAVE_C99_STDINT_H=1 302 HAVE_C99_STDINT_H=1
@@ -341,7 +341,7 @@ int32_t i32 = INT32_C (0x7fffffff);
341 ]])], 341 ]])],
342 [gl_cv_header_stdint_width=yes])]) 342 [gl_cv_header_stdint_width=yes])])
343 if test "$gl_cv_header_stdint_width" = yes; then 343 if test "$gl_cv_header_stdint_width" = yes; then
344 STDINT_H= 344 GL_GENERATE_STDINT_H=false
345 fi 345 fi
346 ;; 346 ;;
347 *) 347 *)
@@ -364,8 +364,6 @@ int32_t i32 = INT32_C (0x7fffffff);
364 AC_SUBST([HAVE_C99_STDINT_H]) 364 AC_SUBST([HAVE_C99_STDINT_H])
365 AC_SUBST([HAVE_SYS_BITYPES_H]) 365 AC_SUBST([HAVE_SYS_BITYPES_H])
366 AC_SUBST([HAVE_SYS_INTTYPES_H]) 366 AC_SUBST([HAVE_SYS_INTTYPES_H])
367 AC_SUBST([STDINT_H])
368 AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
369]) 367])
370 368
371dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) 369dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index 18aa50a..b8684b6 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
1# stdint_h.m4 serial 9 1# stdint_h.m4 serial 9
2dnl Copyright (C) 1997-2004, 2006, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index e704383..42e9607 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,5 +1,5 @@
1# stdio_h.m4 serial 56 1# stdio_h.m4 serial 59
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -40,41 +40,32 @@ AC_DEFUN_ONCE([gl_STDIO_H],
40 attribute "__gnu_printf__" instead of "__printf__"]) 40 attribute "__gnu_printf__" instead of "__printf__"])
41 fi 41 fi
42 42
43 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c" 43 dnl This ifdef is an optimization, to avoid performing a configure check whose
44 dnl "expected source file, required through AC_LIBSOURCES, not found". It is 44 dnl result is not used. But it does not make the test of
45 dnl also an optimization, to avoid performing a configure check whose result 45 dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
46 dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
47 dnl or GNULIB_NONBLOCKING redundant.
48 m4_ifdef([gl_NONBLOCKING_IO], [ 46 m4_ifdef([gl_NONBLOCKING_IO], [
49 gl_NONBLOCKING_IO 47 gl_NONBLOCKING_IO
50 if test $gl_cv_have_nonblocking != yes; then 48 if test $gl_cv_have_nonblocking != yes; then
51 REPLACE_STDIO_READ_FUNCS=1 49 REPLACE_STDIO_READ_FUNCS=1
52 AC_LIBOBJ([stdio-read])
53 fi 50 fi
54 ]) 51 ])
55 52
56 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" 53 dnl This ifdef is an optimization, to avoid performing a configure check whose
57 dnl "expected source file, required through AC_LIBSOURCES, not found". It is 54 dnl result is not used. But it does not make the test of
58 dnl also an optimization, to avoid performing a configure check whose result 55 dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
59 dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or
60 dnl GNULIB_SIGPIPE redundant.
61 m4_ifdef([gl_SIGNAL_SIGPIPE], [ 56 m4_ifdef([gl_SIGNAL_SIGPIPE], [
62 gl_SIGNAL_SIGPIPE 57 gl_SIGNAL_SIGPIPE
63 if test $gl_cv_header_signal_h_SIGPIPE != yes; then 58 if test $gl_cv_header_signal_h_SIGPIPE != yes; then
64 REPLACE_STDIO_WRITE_FUNCS=1 59 REPLACE_STDIO_WRITE_FUNCS=1
65 AC_LIBOBJ([stdio-write])
66 fi 60 fi
67 ]) 61 ])
68 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" 62 dnl This ifdef is an optimization, to avoid performing a configure check whose
69 dnl "expected source file, required through AC_LIBSOURCES, not found". It is 63 dnl result is not used. But it does not make the test of
70 dnl also an optimization, to avoid performing a configure check whose result 64 dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
71 dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING
72 dnl or GNULIB_NONBLOCKING redundant.
73 m4_ifdef([gl_NONBLOCKING_IO], [ 65 m4_ifdef([gl_NONBLOCKING_IO], [
74 gl_NONBLOCKING_IO 66 gl_NONBLOCKING_IO
75 if test $gl_cv_have_nonblocking != yes; then 67 if test $gl_cv_have_nonblocking != yes; then
76 REPLACE_STDIO_WRITE_FUNCS=1 68 REPLACE_STDIO_WRITE_FUNCS=1
77 AC_LIBOBJ([stdio-write])
78 fi 69 fi
79 ]) 70 ])
80 71
@@ -119,6 +110,7 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
119 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) 110 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC])
120 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) 111 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS])
121 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) 112 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN])
113 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN_GNU])
122 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) 114 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF])
123 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) 115 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX])
124 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) 116 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE])
@@ -202,6 +194,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
202 REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) 194 REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN])
203 REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) 195 REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
204 REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) 196 REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
197 REPLACE_FOPEN_FOR_FOPEN_GNU=0; AC_SUBST([REPLACE_FOPEN_FOR_FOPEN_GNU])
205 REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) 198 REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
206 REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) 199 REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE])
207 REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) 200 REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 9c1d1c7..9e20969 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
1# stdlib_h.m4 serial 63 1# stdlib_h.m4 serial 66
2dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -68,12 +68,14 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
68 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) 68 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT])
69 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) 69 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC])
70 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) 70 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL])
71 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_GNU])
71 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) 72 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX])
72 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) 73 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME])
73 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) 74 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX])
74 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) 75 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
75 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) 76 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
76 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) 77 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
78 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU])
77 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) 79 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
78 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) 80 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
79 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) 81 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
@@ -90,6 +92,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
90 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) 92 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
91 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) 93 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
92 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) 94 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
95 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU])
93 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) 96 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
94 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) 97 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
95 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) 98 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
@@ -164,11 +167,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
164 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) 167 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
165 HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) 168 HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
166 REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC]) 169 REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC])
167 REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) 170 REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU])
171 REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX])
168 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) 172 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
169 REPLACE_FREE=0; AC_SUBST([REPLACE_FREE]) 173 REPLACE_FREE=0; AC_SUBST([REPLACE_FREE])
170 REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE]) 174 REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE])
171 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) 175 REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU])
176 REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX])
172 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) 177 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
173 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) 178 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
174 REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN]) 179 REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN])
@@ -178,7 +183,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
178 REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) 183 REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R])
179 REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM]) 184 REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM])
180 REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) 185 REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
181 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) 186 REPLACE_REALLOC_FOR_REALLOC_GNU=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU])
187 REPLACE_REALLOC_FOR_REALLOC_POSIX=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX])
182 REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY]) 188 REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY])
183 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) 189 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
184 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) 190 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
index ea88283..d1ffaba 100644
--- a/gl/m4/strcase.m4
+++ b/gl/m4/strcase.m4
@@ -1,5 +1,5 @@
1# strcase.m4 serial 12 1# strcase.m4 serial 12
2dnl Copyright (C) 2002, 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4
index 6939144..6344b7e 100644
--- a/gl/m4/strcasestr.m4
+++ b/gl/m4/strcasestr.m4
@@ -1,5 +1,5 @@
1# strcasestr.m4 serial 28 1# strcasestr.m4 serial 28
2dnl Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 438ba92..4716649 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
1# strerror.m4 serial 22 1# strerror.m4 serial 23
2dnl Copyright (C) 2002, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_STRERROR],
13 m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [ 13 m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
14 AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS]) 14 AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
15 ]) 15 ])
16 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 16 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
17 AC_CACHE_CHECK([for working strerror function], 17 AC_CACHE_CHECK([for working strerror function],
18 [gl_cv_func_working_strerror], 18 [gl_cv_func_working_strerror],
19 [AC_RUN_IFELSE( 19 [AC_RUN_IFELSE(
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index e88ac9c..9e09b96 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,6 +1,6 @@
1# Configure a GNU-like replacement for <string.h>. 1# Configure a GNU-like replacement for <string.h>.
2 2
3# Copyright (C) 2007-2021 Free Software Foundation, Inc. 3# Copyright (C) 2007-2022 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index 69de32a..6965b7c 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,7 +1,7 @@
1# Configure a replacement for <strings.h>. 1# Configure a replacement for <strings.h>.
2# serial 9 2# serial 9
3 3
4# Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. 4# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved. 7# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4
index 8743f05..602f96a 100644
--- a/gl/m4/strsep.m4
+++ b/gl/m4/strsep.m4
@@ -1,5 +1,5 @@
1# strsep.m4 serial 11 1# strsep.m4 serial 11
2dnl Copyright (C) 2002-2004, 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strstr.m4 b/gl/m4/strstr.m4
index a32e9c1..6cc2072 100644
--- a/gl/m4/strstr.m4
+++ b/gl/m4/strstr.m4
@@ -1,5 +1,5 @@
1# strstr.m4 serial 24 1# strstr.m4 serial 24
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 5676a0d..ba3ae68 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
1# sys_socket_h.m4 serial 28 1# sys_socket_h.m4 serial 29
2dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -22,6 +22,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
22 ;; 22 ;;
23 esac 23 esac
24 24
25 GL_GENERATE_SYS_SOCKET_H=false
25 AC_CACHE_CHECK([whether <sys/socket.h> is self-contained], 26 AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
26 [gl_cv_header_sys_socket_h_selfcontained], 27 [gl_cv_header_sys_socket_h_selfcontained],
27 [ 28 [
@@ -44,7 +45,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
44 [gl_cv_header_sys_socket_h_shut=no]) 45 [gl_cv_header_sys_socket_h_shut=no])
45 ]) 46 ])
46 if test $gl_cv_header_sys_socket_h_shut = no; then 47 if test $gl_cv_header_sys_socket_h_shut = no; then
47 SYS_SOCKET_H='sys/socket.h' 48 GL_GENERATE_SYS_SOCKET_H=true
48 fi 49 fi
49 fi 50 fi
50 fi 51 fi
@@ -83,7 +84,7 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
83 fi 84 fi
84 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ 85 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
85 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then 86 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
86 SYS_SOCKET_H='sys/socket.h' 87 GL_GENERATE_SYS_SOCKET_H=true
87 fi 88 fi
88 gl_PREREQ_SYS_H_WINSOCK2 89 gl_PREREQ_SYS_H_WINSOCK2
89 90
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index ac91d42..2adbfde 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
1# sys_stat_h.m4 serial 41 -*- Autoconf -*- 1# sys_stat_h.m4 serial 42 -*- Autoconf -*-
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -46,7 +46,7 @@ AC_DEFUN_ONCE([gl_SYS_STAT_H],
46 dnl Check for declarations of anything we want to poison if the 46 dnl Check for declarations of anything we want to poison if the
47 dnl corresponding gnulib module is not in use. 47 dnl corresponding gnulib module is not in use.
48 gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h> 48 gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
49 ]], [fchmodat fstat fstatat futimens getumask lchmod lstat 49 ]], [chmod fchmodat fstat fstatat futimens getumask lchmod lstat
50 mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) 50 mkdirat mkfifo mkfifoat mknod mknodat stat utimensat])
51 51
52 AC_REQUIRE([AC_C_RESTRICT]) 52 AC_REQUIRE([AC_C_RESTRICT])
@@ -72,6 +72,7 @@ AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS],
72[ 72[
73 m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [ 73 m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAULTS], [
74 gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR 74 gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR
75 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHMOD])
75 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT]) 76 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT])
76 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT]) 77 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT])
77 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT]) 78 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT])
@@ -112,6 +113,7 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
112 HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) 113 HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
113 HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) 114 HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
114 HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) 115 HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
116 REPLACE_CHMOD=0; AC_SUBST([REPLACE_CHMOD])
115 REPLACE_FCHMODAT=0; AC_SUBST([REPLACE_FCHMODAT]) 117 REPLACE_FCHMODAT=0; AC_SUBST([REPLACE_FCHMODAT])
116 REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) 118 REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
117 REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) 119 REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index 6dd6fee..a5bef22 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
1# sys_types_h.m4 serial 13 1# sys_types_h.m4 serial 13
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index fa176e0..36f55ea 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
1# sys_uio_h.m4 serial 3 1# sys_uio_h.m4 serial 3
2dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index 6b43bbd..ecb4970 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,5 +1,5 @@
1# threadlib.m4 serial 32 1# threadlib.m4 serial 32
2dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index b57474b..98d7b6e 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,8 +1,8 @@
1# Configure a more-standard replacement for <time.h>. 1# Configure a more-standard replacement for <time.h>.
2 2
3# Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation, Inc. 3# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
4 4
5# serial 18 5# serial 19
6 6
7# This file is free software; the Free Software Foundation 7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it, 8# gives unlimited permission to copy and/or distribute it,
@@ -133,6 +133,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
133 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) 133 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
134 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) 134 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
135 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) 135 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
136 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES])
136 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) 137 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R])
137 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) 138 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ])
138 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) 139 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET])
@@ -151,6 +152,7 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
151 HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) 152 HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME])
152 HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) 153 HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM])
153 HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET]) 154 HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET])
155 HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES])
154 dnl Even GNU libc does not have timezone_t yet. 156 dnl Even GNU libc does not have timezone_t yet.
155 HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) 157 HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
156 dnl If another module says to replace or to not replace, do that. 158 dnl If another module says to replace or to not replace, do that.
diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4
index 2d49b64..8a1ad9d 100644
--- a/gl/m4/time_r.m4
+++ b/gl/m4/time_r.m4
@@ -1,6 +1,6 @@
1dnl Reentrant time functions: localtime_r, gmtime_r. 1dnl Reentrant time functions: localtime_r, gmtime_r.
2 2
3dnl Copyright (C) 2003, 2006-2021 Free Software Foundation, Inc. 3dnl Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/timegm.m4 b/gl/m4/timegm.m4
index 58123be..f189394 100644
--- a/gl/m4/timegm.m4
+++ b/gl/m4/timegm.m4
@@ -1,5 +1,5 @@
1# timegm.m4 serial 13 1# timegm.m4 serial 13
2dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index dd5d1dd..12a1099 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,5 +1,5 @@
1# ungetc.m4 serial 10 1# ungetc.m4 serial 10
2dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 0ce4ea4..4c66ccc 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
1# unistd_h.m4 serial 89 1# unistd_h.m4 serial 90
2dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -112,6 +112,7 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
112 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) 112 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX])
113 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) 113 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE])
114 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) 114 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS])
115 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS_GNU])
115 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) 116 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL])
116 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) 117 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER])
117 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) 118 gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY])
@@ -170,98 +171,100 @@ AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS],
170AC_DEFUN([gl_UNISTD_H_DEFAULTS], 171AC_DEFUN([gl_UNISTD_H_DEFAULTS],
171[ 172[
172 dnl Assume proper GNU behavior unless another module says otherwise. 173 dnl Assume proper GNU behavior unless another module says otherwise.
173 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) 174 HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
174 HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE]) 175 HAVE_COPY_FILE_RANGE=1; AC_SUBST([HAVE_COPY_FILE_RANGE])
175 HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) 176 HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
176 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) 177 HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
177 HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE]) 178 HAVE_EXECVPE=1; AC_SUBST([HAVE_EXECVPE])
178 HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) 179 HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
179 HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) 180 HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR])
180 HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) 181 HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
181 HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) 182 HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC])
182 HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) 183 HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
183 HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) 184 HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
184 HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) 185 HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
185 HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY]) 186 HAVE_GETENTROPY=1; AC_SUBST([HAVE_GETENTROPY])
186 HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) 187 HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
187 HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) 188 HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
188 HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) 189 HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
189 HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) 190 HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
190 HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) 191 HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS])
191 HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) 192 HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER])
192 HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) 193 HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
193 HAVE_LINK=1; AC_SUBST([HAVE_LINK]) 194 HAVE_LINK=1; AC_SUBST([HAVE_LINK])
194 HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) 195 HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
195 HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) 196 HAVE_PIPE=1; AC_SUBST([HAVE_PIPE])
196 HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) 197 HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
197 HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) 198 HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
198 HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) 199 HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
199 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) 200 HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
200 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) 201 HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
201 HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) 202 HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME])
202 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) 203 HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
203 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) 204 HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
204 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) 205 HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
205 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) 206 HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
206 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) 207 HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
207 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) 208 HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
208 HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE]) 209 HAVE_DECL_EXECVPE=1; AC_SUBST([HAVE_DECL_EXECVPE])
209 HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) 210 HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
210 HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) 211 HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
211 HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) 212 HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
212 HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) 213 HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN])
213 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) 214 HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
214 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) 215 HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
215 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) 216 HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
216 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) 217 HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME])
217 HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) 218 HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE])
218 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) 219 HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R])
219 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) 220 HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
220 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) 221 HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
221 REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS]) 222 REPLACE_ACCESS=0; AC_SUBST([REPLACE_ACCESS])
222 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) 223 REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
223 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) 224 REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
224 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) 225 REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE])
225 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) 226 REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
226 REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL]) 227 REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
227 REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE]) 228 REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL])
228 REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP]) 229 REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE])
229 REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV]) 230 REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP])
230 REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE]) 231 REPLACE_EXECV=0; AC_SUBST([REPLACE_EXECV])
231 REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP]) 232 REPLACE_EXECVE=0; AC_SUBST([REPLACE_EXECVE])
232 REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE]) 233 REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP])
233 REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) 234 REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE])
234 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) 235 REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
235 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) 236 REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
236 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) 237 REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
237 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) 238 REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
238 REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) 239 REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
239 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) 240 REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
240 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) 241 REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
241 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) 242 REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
242 REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) 243 REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
243 REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) 244 REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
244 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) 245 REPLACE_GETPASS_FOR_GETPASS_GNU=0; AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU])
245 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) 246 REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
246 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) 247 REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
247 REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) 248 REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
248 REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) 249 REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
249 REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) 250 REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
250 REPLACE_READ=0; AC_SUBST([REPLACE_READ]) 251 REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
251 REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) 252 REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
252 REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) 253 REPLACE_READ=0; AC_SUBST([REPLACE_READ])
253 REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) 254 REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
254 REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) 255 REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
255 REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) 256 REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
256 REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) 257 REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
257 REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) 258 REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
258 REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) 259 REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
259 REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) 260 REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE])
260 REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) 261 REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
261 REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) 262 REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
262 REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) 263 REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
263 UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H]) 264 REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
264 UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) 265 REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
266 UNISTD_H_HAVE_SYS_RANDOM_H=0; AC_SUBST([UNISTD_H_HAVE_SYS_RANDOM_H])
267 UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
265 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; 268 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
266 AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) 269 AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
267]) 270])
diff --git a/gl/m4/unlocked-io.m4 b/gl/m4/unlocked-io.m4
index b689020..d42c95c 100644
--- a/gl/m4/unlocked-io.m4
+++ b/gl/m4/unlocked-io.m4
@@ -1,6 +1,6 @@
1# unlocked-io.m4 serial 16 1# unlocked-io.m4 serial 16
2 2
3# Copyright (C) 1998-2006, 2009-2021 Free Software Foundation, Inc. 3# Copyright (C) 1998-2006, 2009-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/vararrays.m4 b/gl/m4/vararrays.m4
new file mode 100644
index 0000000..28e22a4
--- /dev/null
+++ b/gl/m4/vararrays.m4
@@ -0,0 +1,72 @@
1# Check for variable-length arrays.
2
3# serial 6
4
5# From Paul Eggert
6
7# Copyright (C) 2001, 2009-2022 Free Software Foundation, Inc.
8# This file is free software; the Free Software Foundation
9# gives unlimited permission to copy and/or distribute it,
10# with or without modifications, as long as this notice is preserved.
11
12m4_version_prereq([2.70], [], [
13
14# AC_C_VARARRAYS
15# --------------
16# Check whether the C compiler supports variable-length arrays.
17AC_DEFUN([AC_C_VARARRAYS],
18[
19 AC_CACHE_CHECK([for variable-length arrays],
20 ac_cv_c_vararrays,
21 [AC_EGREP_CPP([defined],
22 [#ifdef __STDC_NO_VLA__
23 defined
24 #endif
25 ],
26 [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
27 [AC_COMPILE_IFELSE(
28 [AC_LANG_PROGRAM(
29 [[/* Test for VLA support. This test is partly inspired
30 from examples in the C standard. Use at least two VLA
31 functions to detect the GCC 3.4.3 bug described in:
32 https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
33 */
34 #ifdef __STDC_NO_VLA__
35 syntax error;
36 #else
37 extern int n;
38 int B[100];
39 int fvla (int m, int C[m][m]);
40
41 int
42 simple (int count, int all[static count])
43 {
44 return all[count - 1];
45 }
46
47 int
48 fvla (int m, int C[m][m])
49 {
50 typedef int VLA[m][m];
51 VLA x;
52 int D[m];
53 static int (*q)[m] = &B;
54 int (*s)[n] = q;
55 return C && &x[0][0] == &D[0] && &D[0] == s[0];
56 }
57 #endif
58 ]])],
59 [ac_cv_c_vararrays=yes],
60 [ac_cv_c_vararrays=no])])])
61 if test "$ac_cv_c_vararrays" = yes; then
62 dnl This is for compatibility with Autoconf 2.61-2.69.
63 AC_DEFINE([HAVE_C_VARARRAYS], 1,
64 [Define to 1 if C supports variable-length arrays.])
65 elif test "$ac_cv_c_vararrays" = no; then
66 AC_DEFINE([__STDC_NO_VLA__], 1,
67 [Define to 1 if C does not support variable-length arrays, and
68 if the compiler does not already define this.])
69 fi
70])
71
72])
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index 483bba9..afdece7 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
1# vasnprintf.m4 serial 38 1# vasnprintf.m4 serial 38
2dnl Copyright (C) 2002-2004, 2006-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index a26de84..b92977b 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,5 +1,5 @@
1# vasprintf.m4 serial 6 1# vasprintf.m4 serial 6
2dnl Copyright (C) 2002-2003, 2006-2007, 2009-2021 Free Software Foundation, 2dnl Copyright (C) 2002-2003, 2006-2007, 2009-2022 Free Software Foundation,
3dnl Inc. 3dnl Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index d161bd7..4a212a4 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
1# visibility.m4 serial 8 1# visibility.m4 serial 8
2dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2008, 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index 5f5375e..02b448f 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
1# vsnprintf.m4 serial 7 1# vsnprintf.m4 serial 7
2dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index 04edfe8..d43355a 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
1# warn-on-use.m4 serial 9 1# warn-on-use.m4 serial 9
2dnl Copyright (C) 2010-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 9529cdd..4baba1a 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,6 +1,6 @@
1dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues. 1dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
2 2
3dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. 3dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index 34db10e..268e3e5 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
1# wchar_t.m4 serial 4 (gettext-0.18.2) 1# wchar_t.m4 serial 4 (gettext-0.18.2)
2dnl Copyright (C) 2002-2003, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index cd96f11..fee21d7 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
1# wcrtomb.m4 serial 17 1# wcrtomb.m4 serial 17
2dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index 7d74212..702cb39 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -2,7 +2,7 @@
2 2
3dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. 3dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
4 4
5dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. 5dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
6dnl This file is free software; the Free Software Foundation 6dnl This file is free software; the Free Software Foundation
7dnl gives unlimited permission to copy and/or distribute it, 7dnl gives unlimited permission to copy and/or distribute it,
8dnl with or without modifications, as long as this notice is preserved. 8dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index a49c508..adc5866 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
1# wint_t.m4 serial 11 1# wint_t.m4 serial 11
2dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4
index 8fabf1c..17a9c06 100644
--- a/gl/m4/xalloc.m4
+++ b/gl/m4/xalloc.m4
@@ -1,5 +1,5 @@
1# xalloc.m4 serial 18 1# xalloc.m4 serial 18
2dnl Copyright (C) 2002-2006, 2009-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 64e8a4f..0109049 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
1# xsize.m4 serial 5 1# xsize.m4 serial 5
2dnl Copyright (C) 2003-2004, 2008-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2003-2004, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/year2038.m4 b/gl/m4/year2038.m4
index da0f8d7..2e4427e 100644
--- a/gl/m4/year2038.m4
+++ b/gl/m4/year2038.m4
@@ -1,5 +1,5 @@
1# year2038.m4 serial 7 1# year2038.m4 serial 8
2dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -7,6 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
7dnl Attempt to ensure that 'time_t' can go past the year 2038 and that 7dnl Attempt to ensure that 'time_t' can go past the year 2038 and that
8dnl the functions 'time', 'stat', etc. work with post-2038 timestamps. 8dnl the functions 'time', 'stat', etc. work with post-2038 timestamps.
9 9
10m4_ifdef([AC_SYS_YEAR2038], [
11 AC_DEFUN([gl_YEAR2038_EARLY])
12 AC_DEFUN([gl_YEAR2038], [AC_SYS_YEAR2038])
13 AC_DEFUN([gl_YEAR2038_BODY], [_AC_SYS_YEAR2038])
14], [
15
10AC_DEFUN([gl_YEAR2038_EARLY], 16AC_DEFUN([gl_YEAR2038_EARLY],
11[ 17[
12 AC_REQUIRE([AC_CANONICAL_HOST]) 18 AC_REQUIRE([AC_CANONICAL_HOST])
@@ -122,3 +128,5 @@ AC_DEFUN([gl_YEAR2038],
122[ 128[
123 gl_YEAR2038_BODY([require-year2038-safe]) 129 gl_YEAR2038_BODY([require-year2038-safe])
124]) 130])
131
132]) # m4_ifndef AC_SYS_YEAR2038
diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4
index b953384..fd73a20 100644
--- a/gl/m4/zzgnulib.m4
+++ b/gl/m4/zzgnulib.m4
@@ -1,5 +1,5 @@
1# zzgnulib.m4 serial 1 1# zzgnulib.m4 serial 1
2dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. 2dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/malloc.c b/gl/malloc.c
index 0d8b359..f334dd6 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
1/* malloc() function that is glibc compatible. 1/* malloc() function that is glibc compatible.
2 2
3 Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/malloc/.deps/.dirstamp b/gl/malloc/.deps/.dirstamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gl/malloc/.deps/.dirstamp
diff --git a/gl/malloc/.deps/dynarray-skeleton.Po b/gl/malloc/.deps/dynarray-skeleton.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/gl/malloc/.deps/dynarray-skeleton.Po
@@ -0,0 +1 @@
# dummy
diff --git a/gl/malloc/.deps/dynarray_at_failure.Po b/gl/malloc/.deps/dynarray_at_failure.Po
new file mode 100644
index 0000000..a5b1cb9
--- /dev/null
+++ b/gl/malloc/.deps/dynarray_at_failure.Po
@@ -0,0 +1,232 @@
1malloc/dynarray_at_failure.o: malloc/dynarray_at_failure.c libc-config.h \
2 ../config.h \
3 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \
4 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \
5 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \
6 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \
7 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \
8 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \
9 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \
10 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \
11 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \
12 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \
13 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \
14 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \
15 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \
16 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \
17 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \
18 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \
19 cdefs.h stdlib.h \
20 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \
21 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \
22 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \
23 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \
24 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \
25 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \
26 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \
27 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \
28 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \
29 sys/types.h \
30 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \
31 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \
32 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \
33 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \
34 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \
35 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \
36 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \
37 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \
38 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \
39 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \
40 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \
41 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \
42 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \
43 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \
44 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \
45 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \
46 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \
47 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \
48 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \
49 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \
50 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \
51 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \
52 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
53 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \
54 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \
55 alloca.h \
56 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \
57 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h \
58 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \
59 dynarray.h malloc/dynarray.h \
60 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \
61 string.h \
62 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \
63 strings.h \
64 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \
65 stdio.h \
66 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdio.h \
67 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdarg.h \
68 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos_t.h \
69 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__mbstate_t.h \
70 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos64_t.h \
71 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__FILE.h \
72 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/FILE.h \
73 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_FILE.h \
74 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h \
75 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio_lim.h \
76 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio.h
77
78libc-config.h:
79
80../config.h:
81
82/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h:
83
84/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h:
85
86/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h:
87
88/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h:
89
90/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h:
91
92/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h:
93
94/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:
95
96/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h:
97
98/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h:
99
100/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h:
101
102/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h:
103
104/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h:
105
106/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h:
107
108/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h:
109
110/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h:
111
112/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h:
113
114cdefs.h:
115
116stdlib.h:
117
118/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h:
119
120/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h:
121
122/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h:
123
124/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h:
125
126/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h:
127
128/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h:
129
130/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h:
131
132/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h:
133
134/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h:
135
136sys/types.h:
137
138/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h:
139
140/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h:
141
142/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h:
143
144/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h:
145
146/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h:
147
148/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h:
149
150/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h:
151
152/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h:
153
154/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h:
155
156/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h:
157
158/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h:
159
160/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h:
161
162/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h:
163
164/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h:
165
166/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h:
167
168/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h:
169
170/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h:
171
172/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h:
173
174/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h:
175
176/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h:
177
178/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h:
179
180/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h:
181
182/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h:
183
184/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h:
185
186/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h:
187
188alloca.h:
189
190/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h:
191
192/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h:
193
194/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h:
195
196dynarray.h:
197
198malloc/dynarray.h:
199
200/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h:
201
202string.h:
203
204/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h:
205
206strings.h:
207
208/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h:
209
210stdio.h:
211
212/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdio.h:
213
214/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdarg.h:
215
216/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos_t.h:
217
218/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__mbstate_t.h:
219
220/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__fpos64_t.h:
221
222/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__FILE.h:
223
224/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/FILE.h:
225
226/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_FILE.h:
227
228/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h:
229
230/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio_lim.h:
231
232/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdio.h:
diff --git a/gl/malloc/.deps/dynarray_emplace_enlarge.Po b/gl/malloc/.deps/dynarray_emplace_enlarge.Po
new file mode 100644
index 0000000..652de97
--- /dev/null
+++ b/gl/malloc/.deps/dynarray_emplace_enlarge.Po
@@ -0,0 +1,231 @@
1malloc/dynarray_emplace_enlarge.o: malloc/dynarray_emplace_enlarge.c \
2 libc-config.h ../config.h \
3 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \
4 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \
5 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \
6 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \
7 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \
8 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \
9 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \
10 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \
11 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \
12 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \
13 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \
14 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \
15 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \
16 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \
17 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \
18 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \
19 cdefs.h dynarray.h malloc/dynarray.h \
20 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \
21 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \
22 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \
23 string.h \
24 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \
25 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \
26 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \
27 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \
28 strings.h \
29 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \
30 intprops.h limits.h \
31 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h \
32 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h \
33 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h \
34 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h \
35 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h \
36 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h \
37 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h \
38 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h \
39 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h \
40 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h \
41 stdlib.h \
42 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \
43 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \
44 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \
45 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \
46 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \
47 sys/types.h \
48 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \
49 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \
50 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \
51 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \
52 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \
53 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \
54 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \
55 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \
56 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \
57 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \
58 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \
59 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \
60 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \
61 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \
62 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \
63 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \
64 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \
65 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \
66 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \
67 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \
68 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \
69 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \
70 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
71 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \
72 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \
73 alloca.h \
74 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \
75 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h
76
77libc-config.h:
78
79../config.h:
80
81/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h:
82
83/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h:
84
85/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h:
86
87/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h:
88
89/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h:
90
91/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h:
92
93/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:
94
95/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h:
96
97/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h:
98
99/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h:
100
101/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h:
102
103/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h:
104
105/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h:
106
107/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h:
108
109/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h:
110
111/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h:
112
113cdefs.h:
114
115dynarray.h:
116
117malloc/dynarray.h:
118
119/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h:
120
121/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h:
122
123/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h:
124
125string.h:
126
127/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h:
128
129/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h:
130
131/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h:
132
133/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h:
134
135strings.h:
136
137/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h:
138
139intprops.h:
140
141limits.h:
142
143/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h:
144
145/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h:
146
147/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h:
148
149/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h:
150
151/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h:
152
153/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h:
154
155/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h:
156
157/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h:
158
159/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h:
160
161/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h:
162
163stdlib.h:
164
165/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h:
166
167/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h:
168
169/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h:
170
171/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h:
172
173/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h:
174
175sys/types.h:
176
177/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h:
178
179/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h:
180
181/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h:
182
183/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h:
184
185/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h:
186
187/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h:
188
189/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h:
190
191/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h:
192
193/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h:
194
195/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h:
196
197/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h:
198
199/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h:
200
201/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h:
202
203/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h:
204
205/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h:
206
207/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h:
208
209/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h:
210
211/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h:
212
213/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h:
214
215/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h:
216
217/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h:
218
219/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h:
220
221/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h:
222
223/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h:
224
225/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h:
226
227alloca.h:
228
229/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h:
230
231/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h:
diff --git a/gl/malloc/.deps/dynarray_finalize.Po b/gl/malloc/.deps/dynarray_finalize.Po
new file mode 100644
index 0000000..d7356c0
--- /dev/null
+++ b/gl/malloc/.deps/dynarray_finalize.Po
@@ -0,0 +1,196 @@
1malloc/dynarray_finalize.o: malloc/dynarray_finalize.c libc-config.h \
2 ../config.h \
3 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \
4 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \
5 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \
6 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \
7 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \
8 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \
9 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \
10 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \
11 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \
12 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \
13 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \
14 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \
15 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \
16 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \
17 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \
18 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \
19 cdefs.h dynarray.h malloc/dynarray.h \
20 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \
21 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \
22 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \
23 string.h \
24 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \
25 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \
26 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \
27 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \
28 strings.h \
29 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \
30 stdlib.h \
31 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \
32 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \
33 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \
34 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \
35 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \
36 sys/types.h \
37 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \
38 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \
39 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \
40 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \
41 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \
42 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \
43 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \
44 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \
45 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \
46 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \
47 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \
48 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \
49 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \
50 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \
51 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \
52 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \
53 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \
54 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \
55 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \
56 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \
57 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \
58 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \
59 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
60 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \
61 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \
62 alloca.h \
63 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \
64 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h
65
66libc-config.h:
67
68../config.h:
69
70/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h:
71
72/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h:
73
74/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h:
75
76/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h:
77
78/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h:
79
80/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h:
81
82/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:
83
84/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h:
85
86/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h:
87
88/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h:
89
90/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h:
91
92/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h:
93
94/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h:
95
96/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h:
97
98/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h:
99
100/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h:
101
102cdefs.h:
103
104dynarray.h:
105
106malloc/dynarray.h:
107
108/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h:
109
110/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h:
111
112/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h:
113
114string.h:
115
116/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h:
117
118/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h:
119
120/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h:
121
122/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h:
123
124strings.h:
125
126/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h:
127
128stdlib.h:
129
130/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h:
131
132/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h:
133
134/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h:
135
136/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h:
137
138/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h:
139
140sys/types.h:
141
142/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h:
143
144/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h:
145
146/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h:
147
148/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h:
149
150/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h:
151
152/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h:
153
154/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h:
155
156/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h:
157
158/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h:
159
160/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h:
161
162/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h:
163
164/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h:
165
166/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h:
167
168/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h:
169
170/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h:
171
172/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h:
173
174/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h:
175
176/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h:
177
178/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h:
179
180/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h:
181
182/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h:
183
184/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h:
185
186/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h:
187
188/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h:
189
190/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h:
191
192alloca.h:
193
194/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h:
195
196/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h:
diff --git a/gl/malloc/.deps/dynarray_resize.Po b/gl/malloc/.deps/dynarray_resize.Po
new file mode 100644
index 0000000..6ad6711
--- /dev/null
+++ b/gl/malloc/.deps/dynarray_resize.Po
@@ -0,0 +1,231 @@
1malloc/dynarray_resize.o: malloc/dynarray_resize.c libc-config.h \
2 ../config.h \
3 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \
4 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \
5 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \
6 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \
7 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \
8 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \
9 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \
10 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \
11 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \
12 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \
13 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \
14 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \
15 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \
16 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \
17 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \
18 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \
19 cdefs.h dynarray.h malloc/dynarray.h \
20 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \
21 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \
22 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \
23 string.h \
24 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \
25 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \
26 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \
27 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \
28 strings.h \
29 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h \
30 intprops.h limits.h \
31 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h \
32 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h \
33 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h \
34 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h \
35 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h \
36 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h \
37 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h \
38 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h \
39 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h \
40 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h \
41 stdlib.h \
42 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h \
43 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h \
44 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h \
45 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h \
46 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h \
47 sys/types.h \
48 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h \
49 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h \
50 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h \
51 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h \
52 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h \
53 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h \
54 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h \
55 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h \
56 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h \
57 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h \
58 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h \
59 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h \
60 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h \
61 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h \
62 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h \
63 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h \
64 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h \
65 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h \
66 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h \
67 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h \
68 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h \
69 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h \
70 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \
71 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h \
72 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h \
73 alloca.h \
74 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h \
75 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h
76
77libc-config.h:
78
79../config.h:
80
81/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h:
82
83/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h:
84
85/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h:
86
87/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h:
88
89/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h:
90
91/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h:
92
93/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:
94
95/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h:
96
97/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h:
98
99/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h:
100
101/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h:
102
103/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h:
104
105/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h:
106
107/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h:
108
109/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h:
110
111/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h:
112
113cdefs.h:
114
115dynarray.h:
116
117malloc/dynarray.h:
118
119/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h:
120
121/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h:
122
123/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h:
124
125string.h:
126
127/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h:
128
129/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h:
130
131/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h:
132
133/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h:
134
135strings.h:
136
137/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h:
138
139intprops.h:
140
141limits.h:
142
143/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/limits.h:
144
145/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/limits.h:
146
147/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix1_lim.h:
148
149/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/local_lim.h:
150
151/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/limits.h:
152
153/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h:
154
155/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthread_stack_min.h:
156
157/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/posix2_lim.h:
158
159/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/xopen_lim.h:
160
161/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uio_lim.h:
162
163stdlib.h:
164
165/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdlib.h:
166
167/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitflags.h:
168
169/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/waitstatus.h:
170
171/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/floatn.h:
172
173/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/floatn-common.h:
174
175sys/types.h:
176
177/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/types.h:
178
179/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types.h:
180
181/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h:
182
183/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/time64.h:
184
185/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clock_t.h:
186
187/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/clockid_t.h:
188
189/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/time_t.h:
190
191/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/timer_t.h:
192
193/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdint-intn.h:
194
195/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/endian.h:
196
197/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/endian.h:
198
199/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/endianness.h:
200
201/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/byteswap.h:
202
203/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/uintn-identity.h:
204
205/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/select.h:
206
207/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/select.h:
208
209/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/sigset_t.h:
210
211/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__sigset_t.h:
212
213/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timeval.h:
214
215/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/struct_timespec.h:
216
217/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/pthreadtypes.h:
218
219/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/thread-shared-types.h:
220
221/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h:
222
223/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_mutex.h:
224
225/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/struct_rwlock.h:
226
227alloca.h:
228
229/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-bsearch.h:
230
231/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/stdlib-float.h:
diff --git a/gl/malloc/.deps/dynarray_resize_clear.Po b/gl/malloc/.deps/dynarray_resize_clear.Po
new file mode 100644
index 0000000..207fa9d
--- /dev/null
+++ b/gl/malloc/.deps/dynarray_resize_clear.Po
@@ -0,0 +1,91 @@
1malloc/dynarray_resize_clear.o: malloc/dynarray_resize_clear.c \
2 libc-config.h ../config.h \
3 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h \
4 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h \
5 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h \
6 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h \
7 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h \
8 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h \
9 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h \
10 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h \
11 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h \
12 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h \
13 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h \
14 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h \
15 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h \
16 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h \
17 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h \
18 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h \
19 cdefs.h dynarray.h malloc/dynarray.h \
20 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h \
21 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h \
22 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h \
23 string.h \
24 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h \
25 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h \
26 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h \
27 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h \
28 strings.h \
29 /home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h
30
31libc-config.h:
32
33../config.h:
34
35/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/errno.h:
36
37/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features.h:
38
39/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/features-time64.h:
40
41/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/wordsize.h:
42
43/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/timesize.h:
44
45/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/stdc-predef.h:
46
47/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/sys/cdefs.h:
48
49/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/bits/long-double.h:
50
51/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs.h:
52
53/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h:
54
55/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/errno.h:
56
57/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/linux/errno.h:
58
59/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm/errno.h:
60
61/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno.h:
62
63/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/any-linux-any/asm-generic/errno-base.h:
64
65/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/error_t.h:
66
67cdefs.h:
68
69dynarray.h:
70
71malloc/dynarray.h:
72
73/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stdbool.h:
74
75/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/stddef.h:
76
77/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/include/__stddef_max_align_t.h:
78
79string.h:
80
81/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/string.h:
82
83/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/libc-header-start.h:
84
85/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/locale_t.h:
86
87/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/bits/types/__locale_t.h:
88
89strings.h:
90
91/home/rincewind/Downloads/zig/zig-linux-x86_64-0.9.1/lib/libc/include/generic-glibc/strings.h:
diff --git a/gl/malloc/.dirstamp b/gl/malloc/.dirstamp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gl/malloc/.dirstamp
diff --git a/gl/malloc/dynarray-skeleton.c b/gl/malloc/dynarray-skeleton.c
index 48210e3..bad548a 100644
--- a/gl/malloc/dynarray-skeleton.c
+++ b/gl/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
1/* Type-safe arrays which grow dynamically. 1/* Type-safe arrays which grow dynamically.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray.h b/gl/malloc/dynarray.h
index 638c33f..f16fd95 100644
--- a/gl/malloc/dynarray.h
+++ b/gl/malloc/dynarray.h
@@ -1,5 +1,5 @@
1/* Type-safe arrays which grow dynamically. Shared definitions. 1/* Type-safe arrays which grow dynamically. Shared definitions.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_at_failure.c b/gl/malloc/dynarray_at_failure.c
index 8dd6850..062ab70 100644
--- a/gl/malloc/dynarray_at_failure.c
+++ b/gl/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
1/* Report an dynamic array index out of bounds condition. 1/* Report an dynamic array index out of bounds condition.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_emplace_enlarge.c b/gl/malloc/dynarray_emplace_enlarge.c
index 0f8baf9..0cff2e7 100644
--- a/gl/malloc/dynarray_emplace_enlarge.c
+++ b/gl/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
1/* Increase the size of a dynamic array in preparation of an emplace operation. 1/* Increase the size of a dynamic array in preparation of an emplace operation.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_finalize.c b/gl/malloc/dynarray_finalize.c
index c33da41..3f360c3 100644
--- a/gl/malloc/dynarray_finalize.c
+++ b/gl/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
1/* Copy the dynamically-allocated area to an explicitly-sized heap allocation. 1/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_resize.c b/gl/malloc/dynarray_resize.c
index 5a57166..8d1922e 100644
--- a/gl/malloc/dynarray_resize.c
+++ b/gl/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
1/* Increase the size of a dynamic array. 1/* Increase the size of a dynamic array.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_resize_clear.c b/gl/malloc/dynarray_resize_clear.c
index 9c43b00..8cf1b0d 100644
--- a/gl/malloc/dynarray_resize_clear.c
+++ b/gl/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
1/* Increase the size of a dynamic array and clear the new part. 1/* Increase the size of a dynamic array and clear the new part.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
5 The GNU C Library is free software; you can redistribute it and/or 5 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloca.c b/gl/malloca.c
index b488423..183783a 100644
--- a/gl/malloca.c
+++ b/gl/malloca.c
@@ -1,5 +1,5 @@
1/* Safe automatic memory allocation. 1/* Safe automatic memory allocation.
2 Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2003, 2006-2007, 2009-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2003, 2018. 3 Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
@@ -21,8 +21,9 @@
21/* Specification. */ 21/* Specification. */
22#include "malloca.h" 22#include "malloca.h"
23 23
24#include <stdckdint.h>
25
24#include "idx.h" 26#include "idx.h"
25#include "intprops.h"
26#include "verify.h" 27#include "verify.h"
27 28
28/* The speed critical point in this file is freea() applied to an alloca() 29/* The speed critical point in this file is freea() applied to an alloca()
@@ -50,17 +51,16 @@ mmalloca (size_t n)
50 uintptr_t alignment2_mask = 2 * sa_alignment_max - 1; 51 uintptr_t alignment2_mask = 2 * sa_alignment_max - 1;
51 int plus = sizeof (small_t) + alignment2_mask; 52 int plus = sizeof (small_t) + alignment2_mask;
52 idx_t nplus; 53 idx_t nplus;
53 if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1)) 54 if (!ckd_add (&nplus, n, plus) && !xalloc_oversized (nplus, 1))
54 { 55 {
55 char *mem = (char *) malloc (nplus); 56 char *mem = (char *) malloc (nplus);
56 57
57 if (mem != NULL) 58 if (mem != NULL)
58 { 59 {
59 uintptr_t umem = (uintptr_t)mem, umemplus; 60 uintptr_t umem = (uintptr_t)mem, umemplus;
60 /* The INT_ADD_WRAPV avoids signed integer overflow on 61 /* The ckd_add avoids signed integer overflow on
61 theoretical platforms where UINTPTR_MAX <= INT_MAX. */ 62 theoretical platforms where UINTPTR_MAX <= INT_MAX. */
62 INT_ADD_WRAPV (umem, sizeof (small_t) + sa_alignment_max - 1, 63 ckd_add (&umemplus, umem, sizeof (small_t) + sa_alignment_max - 1);
63 &umemplus);
64 idx_t offset = ((umemplus & ~alignment2_mask) 64 idx_t offset = ((umemplus & ~alignment2_mask)
65 + sa_alignment_max - umem); 65 + sa_alignment_max - umem);
66 void *vp = mem + offset; 66 void *vp = mem + offset;
diff --git a/gl/malloca.h b/gl/malloca.h
index 7eb63d2..7ec235f 100644
--- a/gl/malloca.h
+++ b/gl/malloca.h
@@ -1,5 +1,5 @@
1/* Safe automatic memory allocation. 1/* Safe automatic memory allocation.
2 Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2003. 3 Written by Bruno Haible <bruno@clisp.org>, 2003.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/math.c b/gl/math.c
index 3ffd1d7..1502a1f 100644
--- a/gl/math.c
+++ b/gl/math.c
@@ -1,6 +1,6 @@
1/* Inline functions for <math.h>. 1/* Inline functions for <math.h>.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/math.in.h b/gl/math.in.h
index c87cc12..a74a95d 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <math.h>. 1/* A GNU-like <math.h>.
2 2
3 Copyright (C) 2002-2003, 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -2433,6 +2433,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
2433 functions. */ 2433 functions. */
2434_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) 2434_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
2435# define isfinite rpl_isfinite 2435# define isfinite rpl_isfinite
2436# define GNULIB_NAMESPACE_LACKS_ISFINITE 1
2436# else 2437# else
2437_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool) 2438_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, isfinite, bool)
2438# endif 2439# endif
@@ -2467,6 +2468,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
2467 functions. */ 2468 functions. */
2468_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) 2469_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
2469# define isinf rpl_isinf 2470# define isinf rpl_isinf
2471# define GNULIB_NAMESPACE_LACKS_ISINF 1
2470# else 2472# else
2471_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool) 2473_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, isinf, bool)
2472# endif 2474# endif
@@ -2594,6 +2596,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
2594 functions. */ 2596 functions. */
2595_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) 2597_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
2596# define isnan rpl_isnan 2598# define isnan rpl_isnan
2599# define GNULIB_NAMESPACE_LACKS_ISNAN 1
2597# else 2600# else
2598_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) 2601_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool)
2599# endif 2602# endif
@@ -2677,6 +2680,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
2677 functions. */ 2680 functions. */
2678_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) 2681_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)
2679# define signbit rpl_signbit 2682# define signbit rpl_signbit
2683# define GNULIB_NAMESPACE_LACKS_SIGNBIT 1
2680# else 2684# else
2681_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool) 2685_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, signbit, bool)
2682# endif 2686# endif
diff --git a/gl/mbrtowc-impl-utf8.h b/gl/mbrtowc-impl-utf8.h
index 330fb10..8e5ac14 100644
--- a/gl/mbrtowc-impl-utf8.h
+++ b/gl/mbrtowc-impl-utf8.h
@@ -1,5 +1,5 @@
1/* Convert multibyte character to wide character. 1/* Convert multibyte character to wide character.
2 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/mbrtowc-impl.h b/gl/mbrtowc-impl.h
index bc3e688..65538e7 100644
--- a/gl/mbrtowc-impl.h
+++ b/gl/mbrtowc-impl.h
@@ -1,5 +1,5 @@
1/* Convert multibyte character to wide character. 1/* Convert multibyte character to wide character.
2 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/mbrtowc.c b/gl/mbrtowc.c
index 8832f6e..4b164ed 100644
--- a/gl/mbrtowc.c
+++ b/gl/mbrtowc.c
@@ -1,5 +1,5 @@
1/* Convert multibyte character to wide character. 1/* Convert multibyte character to wide character.
2 Copyright (C) 1999-2002, 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/mbsinit.c b/gl/mbsinit.c
index f440155..9621def 100644
--- a/gl/mbsinit.c
+++ b/gl/mbsinit.c
@@ -1,5 +1,5 @@
1/* Test for initial conversion state. 1/* Test for initial conversion state.
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/mbtowc-impl.h b/gl/mbtowc-impl.h
index 30d715d..2b27baf 100644
--- a/gl/mbtowc-impl.h
+++ b/gl/mbtowc-impl.h
@@ -1,5 +1,5 @@
1/* Convert multibyte character to wide character. 1/* Convert multibyte character to wide character.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011. 3 Written by Bruno Haible <bruno@clisp.org>, 2011.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/mbtowc-lock.c b/gl/mbtowc-lock.c
index 0f7ae6c..06d3224 100644
--- a/gl/mbtowc-lock.c
+++ b/gl/mbtowc-lock.c
@@ -1,5 +1,5 @@
1/* Return the internal lock used by mbrtowc and mbrtoc32. 1/* Return the internal lock used by mbrtowc and mbrtoc32.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/mbtowc-lock.h b/gl/mbtowc-lock.h
index d31b0b6..ecfd44e 100644
--- a/gl/mbtowc-lock.h
+++ b/gl/mbtowc-lock.h
@@ -1,5 +1,5 @@
1/* Use the internal lock used by mbrtowc and mbrtoc32. 1/* Use the internal lock used by mbrtowc and mbrtoc32.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/mbtowc.c b/gl/mbtowc.c
index 47b431a..a9a7995 100644
--- a/gl/mbtowc.c
+++ b/gl/mbtowc.c
@@ -1,5 +1,5 @@
1/* Convert multibyte character to wide character. 1/* Convert multibyte character to wide character.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011. 3 Written by Bruno Haible <bruno@clisp.org>, 2011.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/memchr.c b/gl/memchr.c
index 56fd59d..0ca7b30 100644
--- a/gl/memchr.c
+++ b/gl/memchr.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2021 1/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2022
2 Free Software Foundation, Inc. 2 Free Software Foundation, Inc.
3 3
4 Based on strlen implementation by Torbjorn Granlund (tege@sics.se), 4 Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gl/memchr.valgrind b/gl/memchr.valgrind
index 4f16481..cb0f351 100644
--- a/gl/memchr.valgrind
+++ b/gl/memchr.valgrind
@@ -1,6 +1,6 @@
1# Suppress a valgrind message about use of uninitialized memory in memchr(). 1# Suppress a valgrind message about use of uninitialized memory in memchr().
2 2
3# Copyright (C) 2009-2021 Free Software Foundation, Inc. 3# Copyright (C) 2009-2022 Free Software Foundation, Inc.
4# 4#
5# This file is free software: you can redistribute it and/or modify 5# This file is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Lesser General Public License as 6# it under the terms of the GNU Lesser General Public License as
diff --git a/gl/minmax.h b/gl/minmax.h
index a03361b..b4b1345 100644
--- a/gl/minmax.h
+++ b/gl/minmax.h
@@ -1,5 +1,5 @@
1/* MIN, MAX macros. 1/* MIN, MAX macros.
2 Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software 2 Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/mktime-internal.h b/gl/mktime-internal.h
index 7386625..170764e 100644
--- a/gl/mktime-internal.h
+++ b/gl/mktime-internal.h
@@ -1,5 +1,5 @@
1/* Internals of mktime and related functions 1/* Internals of mktime and related functions
2 Copyright 2016-2021 Free Software Foundation, Inc. 2 Copyright 2016-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Paul Eggert <eggert@cs.ucla.edu>. 4 Contributed by Paul Eggert <eggert@cs.ucla.edu>.
5 5
diff --git a/gl/mktime.c b/gl/mktime.c
index ae721c7..7dc9d67 100644
--- a/gl/mktime.c
+++ b/gl/mktime.c
@@ -1,5 +1,5 @@
1/* Convert a 'struct tm' to a time_t value. 1/* Convert a 'struct tm' to a time_t value.
2 Copyright (C) 1993-2021 Free Software Foundation, Inc. 2 Copyright (C) 1993-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Paul Eggert <eggert@twinsun.com>. 4 Contributed by Paul Eggert <eggert@twinsun.com>.
5 5
@@ -429,8 +429,13 @@ __mktime_internal (struct tm *tp,
429 time with the right value, and use its UTC offset. 429 time with the right value, and use its UTC offset.
430 430
431 Heuristic: probe the adjacent timestamps in both directions, 431 Heuristic: probe the adjacent timestamps in both directions,
432 looking for the desired isdst. This should work for all real 432 looking for the desired isdst. If none is found within a
433 time zone histories in the tz database. */ 433 reasonable duration bound, assume a one-hour DST difference.
434 This should work for all real time zone histories in the tz
435 database. */
436
437 /* +1 if we wanted standard time but got DST, -1 if the reverse. */
438 int dst_difference = (isdst == 0) - (tm.tm_isdst == 0);
434 439
435 /* Distance between probes when looking for a DST boundary. In 440 /* Distance between probes when looking for a DST boundary. In
436 tzdata2003a, the shortest period of DST is 601200 seconds 441 tzdata2003a, the shortest period of DST is 601200 seconds
@@ -441,12 +446,14 @@ __mktime_internal (struct tm *tp,
441 periods when probing. */ 446 periods when probing. */
442 int stride = 601200; 447 int stride = 601200;
443 448
444 /* The longest period of DST in tzdata2003a is 536454000 seconds 449 /* In TZDB 2021e, the longest period of DST (or of non-DST), in
445 (e.g., America/Jujuy starting 1946-10-01 01:00). The longest 450 which the DST (or adjacent DST) difference is not one hour,
446 period of non-DST is much longer, but it makes no real sense 451 is 457243209 seconds: e.g., America/Cambridge_Bay with leap
447 to search for more than a year of non-DST, so use the DST 452 seconds, starting 1965-10-31 00:00 in a switch from
448 max. */ 453 double-daylight time (-05) to standard time (-07), and
449 int duration_max = 536454000; 454 continuing to 1980-04-27 02:00 in a switch from standard time
455 (-07) to daylight time (-06). */
456 int duration_max = 457243209;
450 457
451 /* Search in both directions, so the maximum distance is half 458 /* Search in both directions, so the maximum distance is half
452 the duration; add the stride to avoid off-by-1 problems. */ 459 the duration; add the stride to avoid off-by-1 problems. */
@@ -483,6 +490,11 @@ __mktime_internal (struct tm *tp,
483 } 490 }
484 } 491 }
485 492
493 /* No unusual DST offset was found nearby. Assume one-hour DST. */
494 t += 60 * 60 * dst_difference;
495 if (mktime_min <= t && t <= mktime_max && convert_time (convert, t, &tm))
496 goto offset_found;
497
486 __set_errno (EOVERFLOW); 498 __set_errno (EOVERFLOW);
487 return -1; 499 return -1;
488 } 500 }
diff --git a/gl/mountlist.c b/gl/mountlist.c
index 352b35f..fac5c45 100644
--- a/gl/mountlist.c
+++ b/gl/mountlist.c
@@ -1,10 +1,10 @@
1/* mountlist.c -- return a list of mounted file systems 1/* mountlist.c -- return a list of mounted file systems
2 2
3 Copyright (C) 1991-1992, 1997-2021 Free Software Foundation, Inc. 3 Copyright (C) 1991-1992, 1997-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/gl/mountlist.h b/gl/mountlist.h
index fbad124..6edac12 100644
--- a/gl/mountlist.h
+++ b/gl/mountlist.h
@@ -1,11 +1,11 @@
1/* mountlist.h -- declarations for list of mounted file systems 1/* mountlist.h -- declarations for list of mounted file systems
2 2
3 Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2021 Free Software 3 Copyright (C) 1991-1992, 1998, 2000-2005, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This program is free software: you can redistribute it and/or modify 6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c
index a23dac9..d6651ca 100644
--- a/gl/msvc-inval.c
+++ b/gl/msvc-inval.c
@@ -1,5 +1,5 @@
1/* Invalid parameter handler for MSVC runtime libraries. 1/* Invalid parameter handler for MSVC runtime libraries.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h
index e115a35..1230b89 100644
--- a/gl/msvc-inval.h
+++ b/gl/msvc-inval.h
@@ -1,5 +1,5 @@
1/* Invalid parameter handler for MSVC runtime libraries. 1/* Invalid parameter handler for MSVC runtime libraries.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c
index d3c1f54..aa06964 100644
--- a/gl/msvc-nothrow.c
+++ b/gl/msvc-nothrow.c
@@ -1,6 +1,6 @@
1/* Wrappers that don't throw invalid parameter notifications 1/* Wrappers that don't throw invalid parameter notifications
2 with MSVC runtime libraries. 2 with MSVC runtime libraries.
3 Copyright (C) 2011-2021 Free Software Foundation, Inc. 3 Copyright (C) 2011-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h
index 057b5dd..5345155 100644
--- a/gl/msvc-nothrow.h
+++ b/gl/msvc-nothrow.h
@@ -1,6 +1,6 @@
1/* Wrappers that don't throw invalid parameter notifications 1/* Wrappers that don't throw invalid parameter notifications
2 with MSVC runtime libraries. 2 with MSVC runtime libraries.
3 Copyright (C) 2011-2021 Free Software Foundation, Inc. 3 Copyright (C) 2011-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/netdb.in.h b/gl/netdb.in.h
index eb5c960..e05cf4b 100644
--- a/gl/netdb.in.h
+++ b/gl/netdb.in.h
@@ -1,5 +1,5 @@
1/* Provide a netdb.h header file for systems lacking it (read: MinGW). 1/* Provide a netdb.h header file for systems lacking it (read: MinGW).
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Simon Josefsson. 3 Written by Simon Josefsson.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h
index 21f3a64..e23807c 100644
--- a/gl/netinet_in.in.h
+++ b/gl/netinet_in.in.h
@@ -1,5 +1,5 @@
1/* Substitute for <netinet/in.h>. 1/* Substitute for <netinet/in.h>.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/nl_langinfo-lock.c b/gl/nl_langinfo-lock.c
index fcdf56d..c36882d 100644
--- a/gl/nl_langinfo-lock.c
+++ b/gl/nl_langinfo-lock.c
@@ -1,5 +1,5 @@
1/* Return the internal lock used by nl_langinfo. 1/* Return the internal lock used by nl_langinfo.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/nl_langinfo.c b/gl/nl_langinfo.c
index b481f20..3fa4782 100644
--- a/gl/nl_langinfo.c
+++ b/gl/nl_langinfo.c
@@ -1,6 +1,6 @@
1/* nl_langinfo() replacement: query locale dependent information. 1/* nl_langinfo() replacement: query locale dependent information.
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/open.c b/gl/open.c
index 372cda8..170bff1 100644
--- a/gl/open.c
+++ b/gl/open.c
@@ -1,5 +1,5 @@
1/* Open a descriptor to a file. 1/* Open a descriptor to a file.
2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/pathmax.h b/gl/pathmax.h
index 716f4a9..19b93d7 100644
--- a/gl/pathmax.h
+++ b/gl/pathmax.h
@@ -1,5 +1,5 @@
1/* Define PATH_MAX somehow. Requires sys/types.h. 1/* Define PATH_MAX somehow. Requires sys/types.h.
2 Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software 2 Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/printf-args.c b/gl/printf-args.c
index b822682..669c24a 100644
--- a/gl/printf-args.c
+++ b/gl/printf-args.c
@@ -1,5 +1,5 @@
1/* Decomposed printf argument list. 1/* Decomposed printf argument list.
2 Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2021 Free Software 2 Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/printf-args.h b/gl/printf-args.h
index c8d9174..553fe96 100644
--- a/gl/printf-args.h
+++ b/gl/printf-args.h
@@ -1,5 +1,5 @@
1/* Decomposed printf argument list. 1/* Decomposed printf argument list.
2 Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2021 Free Software 2 Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/printf-parse.c b/gl/printf-parse.c
index f21cc17..aab02dc 100644
--- a/gl/printf-parse.c
+++ b/gl/printf-parse.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 1999-2000, 2002-2003, 2006-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999-2000, 2002-2003, 2006-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/printf-parse.h b/gl/printf-parse.h
index 77b7409..b12ccea 100644
--- a/gl/printf-parse.h
+++ b/gl/printf-parse.h
@@ -1,5 +1,5 @@
1/* Parse printf format string. 1/* Parse printf format string.
2 Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2021 Free Software 2 Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2022 Free Software
3 Foundation, Inc. 3 Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/realloc.c b/gl/realloc.c
index af03f0c..c878381 100644
--- a/gl/realloc.c
+++ b/gl/realloc.c
@@ -1,6 +1,6 @@
1/* realloc() function that is glibc compatible. 1/* realloc() function that is glibc compatible.
2 2
3 Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software 3 Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/reallocarray.c b/gl/reallocarray.c
index 1fb2f3c..70c1b47 100644
--- a/gl/reallocarray.c
+++ b/gl/reallocarray.c
@@ -1,6 +1,6 @@
1/* reallocarray function that is glibc compatible. 1/* reallocarray function that is glibc compatible.
2 2
3 Copyright (C) 2017-2021 Free Software Foundation, Inc. 3 Copyright (C) 2017-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -19,16 +19,15 @@
19 19
20#include <config.h> 20#include <config.h>
21 21
22#include <stdckdint.h>
22#include <stdlib.h> 23#include <stdlib.h>
23#include <errno.h> 24#include <errno.h>
24 25
25#include "intprops.h"
26
27void * 26void *
28reallocarray (void *ptr, size_t nmemb, size_t size) 27reallocarray (void *ptr, size_t nmemb, size_t size)
29{ 28{
30 size_t nbytes; 29 size_t nbytes;
31 if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes)) 30 if (ckd_mul (&nbytes, nmemb, size))
32 { 31 {
33 errno = ENOMEM; 32 errno = ENOMEM;
34 return NULL; 33 return NULL;
diff --git a/gl/regcomp.c b/gl/regcomp.c
index 887e5b5..122c3de 100644
--- a/gl/regcomp.c
+++ b/gl/regcomp.c
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
@@ -27,14 +27,10 @@ static void re_compile_fastmap_iter (regex_t *bufp,
27 const re_dfastate_t *init_state, 27 const re_dfastate_t *init_state,
28 char *fastmap); 28 char *fastmap);
29static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); 29static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
30#ifdef RE_ENABLE_I18N
31static void free_charset (re_charset_t *cset); 30static void free_charset (re_charset_t *cset);
32#endif /* RE_ENABLE_I18N */
33static void free_workarea_compile (regex_t *preg); 31static void free_workarea_compile (regex_t *preg);
34static reg_errcode_t create_initial_state (re_dfa_t *dfa); 32static reg_errcode_t create_initial_state (re_dfa_t *dfa);
35#ifdef RE_ENABLE_I18N
36static void optimize_utf8 (re_dfa_t *dfa); 33static void optimize_utf8 (re_dfa_t *dfa);
37#endif
38static reg_errcode_t analyze (regex_t *preg); 34static reg_errcode_t analyze (regex_t *preg);
39static reg_errcode_t preorder (bin_tree_t *root, 35static reg_errcode_t preorder (bin_tree_t *root,
40 reg_errcode_t (fn (void *, bin_tree_t *)), 36 reg_errcode_t (fn (void *, bin_tree_t *)),
@@ -89,7 +85,6 @@ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
89static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, 85static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
90 re_string_t *regexp, 86 re_string_t *regexp,
91 re_token_t *token); 87 re_token_t *token);
92#ifdef RE_ENABLE_I18N
93static reg_errcode_t build_equiv_class (bitset_t sbcset, 88static reg_errcode_t build_equiv_class (bitset_t sbcset,
94 re_charset_t *mbcset, 89 re_charset_t *mbcset,
95 Idx *equiv_class_alloc, 90 Idx *equiv_class_alloc,
@@ -100,14 +95,6 @@ static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
100 Idx *char_class_alloc, 95 Idx *char_class_alloc,
101 const char *class_name, 96 const char *class_name,
102 reg_syntax_t syntax); 97 reg_syntax_t syntax);
103#else /* not RE_ENABLE_I18N */
104static reg_errcode_t build_equiv_class (bitset_t sbcset,
105 const unsigned char *name);
106static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
107 bitset_t sbcset,
108 const char *class_name,
109 reg_syntax_t syntax);
110#endif /* not RE_ENABLE_I18N */
111static bin_tree_t *build_charclass_op (re_dfa_t *dfa, 98static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
112 RE_TRANSLATE_TYPE trans, 99 RE_TRANSLATE_TYPE trans,
113 const char *class_name, 100 const char *class_name,
@@ -279,8 +266,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp)
279} 266}
280weak_alias (__re_compile_fastmap, re_compile_fastmap) 267weak_alias (__re_compile_fastmap, re_compile_fastmap)
281 268
282static inline void 269static __always_inline void
283__attribute__ ((always_inline))
284re_set_fastmap (char *fastmap, bool icase, int ch) 270re_set_fastmap (char *fastmap, bool icase, int ch)
285{ 271{
286 fastmap[ch] = 1; 272 fastmap[ch] = 1;
@@ -306,7 +292,6 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
306 if (type == CHARACTER) 292 if (type == CHARACTER)
307 { 293 {
308 re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); 294 re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
309#ifdef RE_ENABLE_I18N
310 if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) 295 if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
311 { 296 {
312 unsigned char buf[MB_LEN_MAX]; 297 unsigned char buf[MB_LEN_MAX];
@@ -327,7 +312,6 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
327 != (size_t) -1)) 312 != (size_t) -1))
328 re_set_fastmap (fastmap, false, buf[0]); 313 re_set_fastmap (fastmap, false, buf[0]);
329 } 314 }
330#endif
331 } 315 }
332 else if (type == SIMPLE_BRACKET) 316 else if (type == SIMPLE_BRACKET)
333 { 317 {
@@ -341,13 +325,12 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
341 re_set_fastmap (fastmap, icase, ch); 325 re_set_fastmap (fastmap, icase, ch);
342 } 326 }
343 } 327 }
344#ifdef RE_ENABLE_I18N
345 else if (type == COMPLEX_BRACKET) 328 else if (type == COMPLEX_BRACKET)
346 { 329 {
347 re_charset_t *cset = dfa->nodes[node].opr.mbcset; 330 re_charset_t *cset = dfa->nodes[node].opr.mbcset;
348 Idx i; 331 Idx i;
349 332
350# ifdef _LIBC 333#ifdef _LIBC
351 /* See if we have to try all bytes which start multiple collation 334 /* See if we have to try all bytes which start multiple collation
352 elements. 335 elements.
353 e.g. In da_DK, we want to catch 'a' since "aa" is a valid 336 e.g. In da_DK, we want to catch 'a' since "aa" is a valid
@@ -363,7 +346,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
363 if (table[i] < 0) 346 if (table[i] < 0)
364 re_set_fastmap (fastmap, icase, i); 347 re_set_fastmap (fastmap, icase, i);
365 } 348 }
366# endif /* _LIBC */ 349#endif /* _LIBC */
367 350
368 /* See if we have to start the match at all multibyte characters, 351 /* See if we have to start the match at all multibyte characters,
369 i.e. where we would not find an invalid sequence. This only 352 i.e. where we would not find an invalid sequence. This only
@@ -371,9 +354,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
371 sets, the SIMPLE_BRACKET again suffices. */ 354 sets, the SIMPLE_BRACKET again suffices. */
372 if (dfa->mb_cur_max > 1 355 if (dfa->mb_cur_max > 1
373 && (cset->nchar_classes || cset->non_match || cset->nranges 356 && (cset->nchar_classes || cset->non_match || cset->nranges
374# ifdef _LIBC 357#ifdef _LIBC
375 || cset->nequiv_classes 358 || cset->nequiv_classes
376# endif /* _LIBC */ 359#endif /* _LIBC */
377 )) 360 ))
378 { 361 {
379 unsigned char c = 0; 362 unsigned char c = 0;
@@ -406,12 +389,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
406 } 389 }
407 } 390 }
408 } 391 }
409#endif /* RE_ENABLE_I18N */ 392 else if (type == OP_PERIOD || type == OP_UTF8_PERIOD || type == END_OF_RE)
410 else if (type == OP_PERIOD
411#ifdef RE_ENABLE_I18N
412 || type == OP_UTF8_PERIOD
413#endif /* RE_ENABLE_I18N */
414 || type == END_OF_RE)
415 { 393 {
416 memset (fastmap, '\1', sizeof (char) * SBC_MAX); 394 memset (fastmap, '\1', sizeof (char) * SBC_MAX);
417 if (type == END_OF_RE) 395 if (type == END_OF_RE)
@@ -550,7 +528,6 @@ regerror (int errcode, const regex_t *__restrict preg, char *__restrict errbuf,
550weak_alias (__regerror, regerror) 528weak_alias (__regerror, regerror)
551 529
552 530
553#ifdef RE_ENABLE_I18N
554/* This static array is used for the map to single-byte characters when 531/* This static array is used for the map to single-byte characters when
555 UTF-8 is used. Otherwise we would allocate memory just to initialize 532 UTF-8 is used. Otherwise we would allocate memory just to initialize
556 it the same all the time. UTF-8 is the preferred encoding so this is 533 it the same all the time. UTF-8 is the preferred encoding so this is
@@ -558,25 +535,24 @@ weak_alias (__regerror, regerror)
558static const bitset_t utf8_sb_map = 535static const bitset_t utf8_sb_map =
559{ 536{
560 /* Set the first 128 bits. */ 537 /* Set the first 128 bits. */
561# if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__ 538#if (defined __GNUC__ || __clang_major__ >= 4) && !defined __STRICT_ANSI__
562 [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX 539 [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
563# else 540#else
564# if 4 * BITSET_WORD_BITS < ASCII_CHARS 541# if 4 * BITSET_WORD_BITS < ASCII_CHARS
565# error "bitset_word_t is narrower than 32 bits" 542# error "bitset_word_t is narrower than 32 bits"
566# elif 3 * BITSET_WORD_BITS < ASCII_CHARS 543# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
567 BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX, 544 BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
568# elif 2 * BITSET_WORD_BITS < ASCII_CHARS 545# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
569 BITSET_WORD_MAX, BITSET_WORD_MAX, 546 BITSET_WORD_MAX, BITSET_WORD_MAX,
570# elif 1 * BITSET_WORD_BITS < ASCII_CHARS 547# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
571 BITSET_WORD_MAX, 548 BITSET_WORD_MAX,
572# endif 549# endif
573 (BITSET_WORD_MAX 550 (BITSET_WORD_MAX
574 >> (SBC_MAX % BITSET_WORD_BITS == 0 551 >> (SBC_MAX % BITSET_WORD_BITS == 0
575 ? 0 552 ? 0
576 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) 553 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
577# endif
578};
579#endif 554#endif
555};
580 556
581 557
582static void 558static void
@@ -614,10 +590,8 @@ free_dfa_content (re_dfa_t *dfa)
614 re_free (entry->array); 590 re_free (entry->array);
615 } 591 }
616 re_free (dfa->state_table); 592 re_free (dfa->state_table);
617#ifdef RE_ENABLE_I18N
618 if (dfa->sb_char != utf8_sb_map) 593 if (dfa->sb_char != utf8_sb_map)
619 re_free (dfa->sb_char); 594 re_free (dfa->sb_char);
620#endif
621 re_free (dfa->subexp_map); 595 re_free (dfa->subexp_map);
622#ifdef DEBUG 596#ifdef DEBUG
623 re_free (dfa->re_str); 597 re_free (dfa->re_str);
@@ -796,11 +770,9 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
796 if (__glibc_unlikely (err != REG_NOERROR)) 770 if (__glibc_unlikely (err != REG_NOERROR))
797 goto re_compile_internal_free_return; 771 goto re_compile_internal_free_return;
798 772
799#ifdef RE_ENABLE_I18N
800 /* If possible, do searching in single byte encoding to speed things up. */ 773 /* If possible, do searching in single byte encoding to speed things up. */
801 if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) 774 if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL)
802 optimize_utf8 (dfa); 775 optimize_utf8 (dfa);
803#endif
804 776
805 /* Then create the initial state of the dfa. */ 777 /* Then create the initial state of the dfa. */
806 err = create_initial_state (dfa); 778 err = create_initial_state (dfa);
@@ -830,11 +802,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
830#ifndef _LIBC 802#ifndef _LIBC
831 const char *codeset_name; 803 const char *codeset_name;
832#endif 804#endif
833#ifdef RE_ENABLE_I18N
834 size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); 805 size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
835#else
836 size_t max_i18n_object_size = 0;
837#endif
838 size_t max_object_size = 806 size_t max_object_size =
839 MAX (sizeof (struct re_state_table_entry), 807 MAX (sizeof (struct re_state_table_entry),
840 MAX (sizeof (re_token_t), 808 MAX (sizeof (re_token_t),
@@ -886,7 +854,6 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
886 dfa->map_notascii = 0; 854 dfa->map_notascii = 0;
887#endif 855#endif
888 856
889#ifdef RE_ENABLE_I18N
890 if (dfa->mb_cur_max > 1) 857 if (dfa->mb_cur_max > 1)
891 { 858 {
892 if (dfa->is_utf8) 859 if (dfa->is_utf8)
@@ -906,14 +873,13 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
906 wint_t wch = __btowc (ch); 873 wint_t wch = __btowc (ch);
907 if (wch != WEOF) 874 if (wch != WEOF)
908 dfa->sb_char[i] |= (bitset_word_t) 1 << j; 875 dfa->sb_char[i] |= (bitset_word_t) 1 << j;
909# ifndef _LIBC 876#ifndef _LIBC
910 if (isascii (ch) && wch != ch) 877 if (isascii (ch) && wch != ch)
911 dfa->map_notascii = 1; 878 dfa->map_notascii = 1;
912# endif 879#endif
913 } 880 }
914 } 881 }
915 } 882 }
916#endif
917 883
918 if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL)) 884 if (__glibc_unlikely (dfa->nodes == NULL || dfa->state_table == NULL))
919 return REG_ESPACE; 885 return REG_ESPACE;
@@ -933,8 +899,6 @@ init_word_char (re_dfa_t *dfa)
933 dfa->word_ops_used = 1; 899 dfa->word_ops_used = 1;
934 if (__glibc_likely (dfa->map_notascii == 0)) 900 if (__glibc_likely (dfa->map_notascii == 0))
935 { 901 {
936 /* Avoid uint32_t and uint64_t as some non-GCC platforms lack
937 them, an issue when this code is used in Gnulib. */
938 bitset_word_t bits0 = 0x00000000; 902 bitset_word_t bits0 = 0x00000000;
939 bitset_word_t bits1 = 0x03ff0000; 903 bitset_word_t bits1 = 0x03ff0000;
940 bitset_word_t bits2 = 0x87fffffe; 904 bitset_word_t bits2 = 0x87fffffe;
@@ -1074,7 +1038,6 @@ create_initial_state (re_dfa_t *dfa)
1074 return REG_NOERROR; 1038 return REG_NOERROR;
1075} 1039}
1076 1040
1077#ifdef RE_ENABLE_I18N
1078/* If it is possible to do searching in single byte encoding instead of UTF-8 1041/* If it is possible to do searching in single byte encoding instead of UTF-8
1079 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change 1042 to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change
1080 DFA nodes where needed. */ 1043 DFA nodes where needed. */
@@ -1154,7 +1117,6 @@ optimize_utf8 (re_dfa_t *dfa)
1154 dfa->is_utf8 = 0; 1117 dfa->is_utf8 = 0;
1155 dfa->has_mb_node = dfa->nbackref > 0 || has_period; 1118 dfa->has_mb_node = dfa->nbackref > 0 || has_period;
1156} 1119}
1157#endif
1158 1120
1159/* Analyze the structure tree, and calculate "first", "next", "edest", 1121/* Analyze the structure tree, and calculate "first", "next", "edest",
1160 "eclosure", and "inveclosure". */ 1122 "eclosure", and "inveclosure". */
@@ -1792,7 +1754,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
1792 token->opr.c = c; 1754 token->opr.c = c;
1793 1755
1794 token->word_char = 0; 1756 token->word_char = 0;
1795#ifdef RE_ENABLE_I18N
1796 token->mb_partial = 0; 1757 token->mb_partial = 0;
1797 if (input->mb_cur_max > 1 1758 if (input->mb_cur_max > 1
1798 && !re_string_first_byte (input, re_string_cur_idx (input))) 1759 && !re_string_first_byte (input, re_string_cur_idx (input)))
@@ -1801,7 +1762,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
1801 token->mb_partial = 1; 1762 token->mb_partial = 1;
1802 return 1; 1763 return 1;
1803 } 1764 }
1804#endif
1805 if (c == '\\') 1765 if (c == '\\')
1806 { 1766 {
1807 unsigned char c2; 1767 unsigned char c2;
@@ -1814,7 +1774,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
1814 c2 = re_string_peek_byte_case (input, 1); 1774 c2 = re_string_peek_byte_case (input, 1);
1815 token->opr.c = c2; 1775 token->opr.c = c2;
1816 token->type = CHARACTER; 1776 token->type = CHARACTER;
1817#ifdef RE_ENABLE_I18N
1818 if (input->mb_cur_max > 1) 1777 if (input->mb_cur_max > 1)
1819 { 1778 {
1820 wint_t wc = re_string_wchar_at (input, 1779 wint_t wc = re_string_wchar_at (input,
@@ -1822,7 +1781,6 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
1822 token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; 1781 token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
1823 } 1782 }
1824 else 1783 else
1825#endif
1826 token->word_char = IS_WORD_CHAR (c2) != 0; 1784 token->word_char = IS_WORD_CHAR (c2) != 0;
1827 1785
1828 switch (c2) 1786 switch (c2)
@@ -1928,14 +1886,12 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
1928 } 1886 }
1929 1887
1930 token->type = CHARACTER; 1888 token->type = CHARACTER;
1931#ifdef RE_ENABLE_I18N
1932 if (input->mb_cur_max > 1) 1889 if (input->mb_cur_max > 1)
1933 { 1890 {
1934 wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); 1891 wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
1935 token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; 1892 token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
1936 } 1893 }
1937 else 1894 else
1938#endif
1939 token->word_char = IS_WORD_CHAR (token->opr.c); 1895 token->word_char = IS_WORD_CHAR (token->opr.c);
1940 1896
1941 switch (c) 1897 switch (c)
@@ -2027,14 +1983,12 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
2027 c = re_string_peek_byte (input, 0); 1983 c = re_string_peek_byte (input, 0);
2028 token->opr.c = c; 1984 token->opr.c = c;
2029 1985
2030#ifdef RE_ENABLE_I18N
2031 if (input->mb_cur_max > 1 1986 if (input->mb_cur_max > 1
2032 && !re_string_first_byte (input, re_string_cur_idx (input))) 1987 && !re_string_first_byte (input, re_string_cur_idx (input)))
2033 { 1988 {
2034 token->type = CHARACTER; 1989 token->type = CHARACTER;
2035 return 1; 1990 return 1;
2036 } 1991 }
2037#endif /* RE_ENABLE_I18N */
2038 1992
2039 if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) 1993 if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)
2040 && re_string_cur_idx (input) + 1 < re_string_length (input)) 1994 && re_string_cur_idx (input) + 1 < re_string_length (input))
@@ -2084,15 +2038,25 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
2084 } 2038 }
2085 switch (c) 2039 switch (c)
2086 { 2040 {
2087 case '-':
2088 token->type = OP_CHARSET_RANGE;
2089 break;
2090 case ']': 2041 case ']':
2091 token->type = OP_CLOSE_BRACKET; 2042 token->type = OP_CLOSE_BRACKET;
2092 break; 2043 break;
2093 case '^': 2044 case '^':
2094 token->type = OP_NON_MATCH_LIST; 2045 token->type = OP_NON_MATCH_LIST;
2095 break; 2046 break;
2047 case '-':
2048 /* In V7 Unix grep and Unix awk and mawk, [...---...]
2049 (3 adjacent minus signs) stands for a single minus sign.
2050 Support that without breaking anything else. */
2051 if (! (re_string_cur_idx (input) + 2 < re_string_length (input)
2052 && re_string_peek_byte (input, 1) == '-'
2053 && re_string_peek_byte (input, 2) == '-'))
2054 {
2055 token->type = OP_CHARSET_RANGE;
2056 break;
2057 }
2058 re_string_skip_bytes (input, 2);
2059 FALLTHROUGH;
2096 default: 2060 default:
2097 token->type = CHARACTER; 2061 token->type = CHARACTER;
2098 } 2062 }
@@ -2256,7 +2220,6 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
2256 *err = REG_ESPACE; 2220 *err = REG_ESPACE;
2257 return NULL; 2221 return NULL;
2258 } 2222 }
2259#ifdef RE_ENABLE_I18N
2260 if (dfa->mb_cur_max > 1) 2223 if (dfa->mb_cur_max > 1)
2261 { 2224 {
2262 while (!re_string_eoi (regexp) 2225 while (!re_string_eoi (regexp)
@@ -2273,7 +2236,6 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
2273 } 2236 }
2274 } 2237 }
2275 } 2238 }
2276#endif
2277 break; 2239 break;
2278 2240
2279 case OP_OPEN_SUBEXP: 2241 case OP_OPEN_SUBEXP:
@@ -2666,40 +2628,30 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
2666 2628
2667#ifndef _LIBC 2629#ifndef _LIBC
2668 2630
2669# ifdef RE_ENABLE_I18N
2670/* Convert the byte B to the corresponding wide character. In a 2631/* Convert the byte B to the corresponding wide character. In a
2671 unibyte locale, treat B as itself. In a multibyte locale, return 2632 unibyte locale, treat B as itself. In a multibyte locale, return
2672 WEOF if B is an encoding error. */ 2633 WEOF if B is an encoding error. */
2673static wint_t 2634static wint_t
2674parse_byte (unsigned char b, re_charset_t *mbcset) 2635parse_byte (unsigned char b, re_dfa_t const *dfa)
2675{ 2636{
2676 return mbcset == NULL ? b : __btowc (b); 2637 return dfa->mb_cur_max > 1 ? __btowc (b) : b;
2677} 2638}
2678# endif
2679 2639
2680 /* Local function for parse_bracket_exp only used in case of NOT _LIBC. 2640/* Local function for parse_bracket_exp used in _LIBC environment.
2681 Build the range expression which starts from START_ELEM, and ends 2641 Build the range expression which starts from START_ELEM, and ends
2682 at END_ELEM. The result are written to MBCSET and SBCSET. 2642 at END_ELEM. The result are written to MBCSET and SBCSET.
2683 RANGE_ALLOC is the allocated size of mbcset->range_starts, and 2643 RANGE_ALLOC is the allocated size of mbcset->range_starts, and
2684 mbcset->range_ends, is a pointer argument since we may 2644 mbcset->range_ends, is a pointer argument since we may
2685 update it. */ 2645 update it. */
2686 2646
2687static reg_errcode_t 2647static reg_errcode_t
2688# ifdef RE_ENABLE_I18N 2648build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc,
2689build_range_exp (const reg_syntax_t syntax, 2649 bracket_elem_t *start_elem, bracket_elem_t *end_elem,
2690 bitset_t sbcset, 2650 re_dfa_t *dfa, reg_syntax_t syntax, uint_fast32_t nrules,
2691 re_charset_t *mbcset, 2651 const unsigned char *collseqmb, const char *collseqwc,
2692 Idx *range_alloc, 2652 int_fast32_t table_size, const void *symb_table,
2693 const bracket_elem_t *start_elem, 2653 const unsigned char *extra)
2694 const bracket_elem_t *end_elem)
2695# else /* not RE_ENABLE_I18N */
2696build_range_exp (const reg_syntax_t syntax,
2697 bitset_t sbcset,
2698 const bracket_elem_t *start_elem,
2699 const bracket_elem_t *end_elem)
2700# endif /* not RE_ENABLE_I18N */
2701{ 2654{
2702 unsigned int start_ch, end_ch;
2703 /* Equivalence Classes and Character Classes can't be a range start/end. */ 2655 /* Equivalence Classes and Character Classes can't be a range start/end. */
2704 if (__glibc_unlikely (start_elem->type == EQUIV_CLASS 2656 if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
2705 || start_elem->type == CHAR_CLASS 2657 || start_elem->type == CHAR_CLASS
@@ -2715,110 +2667,88 @@ build_range_exp (const reg_syntax_t syntax,
2715 && strlen ((char *) end_elem->opr.name) > 1))) 2667 && strlen ((char *) end_elem->opr.name) > 1)))
2716 return REG_ECOLLATE; 2668 return REG_ECOLLATE;
2717 2669
2718# ifdef RE_ENABLE_I18N 2670 unsigned int
2719 {
2720 wchar_t wc;
2721 wint_t start_wc;
2722 wint_t end_wc;
2723
2724 start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch 2671 start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch
2725 : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] 2672 : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
2726 : 0)); 2673 : 0)),
2727 end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch 2674 end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch
2728 : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] 2675 : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
2729 : 0)); 2676 : 0));
2677 wint_t
2730 start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) 2678 start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
2731 ? parse_byte (start_ch, mbcset) : start_elem->opr.wch); 2679 ? parse_byte (start_ch, dfa) : start_elem->opr.wch),
2732 end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) 2680 end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
2733 ? parse_byte (end_ch, mbcset) : end_elem->opr.wch); 2681 ? parse_byte (end_ch, dfa) : end_elem->opr.wch);
2734 if (start_wc == WEOF || end_wc == WEOF)
2735 return REG_ECOLLATE;
2736 else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
2737 && start_wc > end_wc))
2738 return REG_ERANGE;
2739
2740 /* Got valid collation sequence values, add them as a new entry.
2741 However, for !_LIBC we have no collation elements: if the
2742 character set is single byte, the single byte character set
2743 that we build below suffices. parse_bracket_exp passes
2744 no MBCSET if dfa->mb_cur_max == 1. */
2745 if (mbcset)
2746 {
2747 /* Check the space of the arrays. */
2748 if (__glibc_unlikely (*range_alloc == mbcset->nranges))
2749 {
2750 /* There is not enough space, need realloc. */
2751 wchar_t *new_array_start, *new_array_end;
2752 Idx new_nranges;
2753
2754 /* +1 in case of mbcset->nranges is 0. */
2755 new_nranges = 2 * mbcset->nranges + 1;
2756 /* Use realloc since mbcset->range_starts and mbcset->range_ends
2757 are NULL if *range_alloc == 0. */
2758 new_array_start = re_realloc (mbcset->range_starts, wchar_t,
2759 new_nranges);
2760 new_array_end = re_realloc (mbcset->range_ends, wchar_t,
2761 new_nranges);
2762 2682
2763 if (__glibc_unlikely (new_array_start == NULL 2683 if (start_wc == WEOF || end_wc == WEOF)
2764 || new_array_end == NULL)) 2684 return REG_ECOLLATE;
2765 { 2685 else if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
2766 re_free (new_array_start); 2686 && start_wc > end_wc))
2767 re_free (new_array_end); 2687 return REG_ERANGE;
2768 return REG_ESPACE;
2769 }
2770 2688
2771 mbcset->range_starts = new_array_start; 2689 /* Got valid collation sequence values, add them as a new entry.
2772 mbcset->range_ends = new_array_end; 2690 However, for !_LIBC we have no collation elements: if the
2773 *range_alloc = new_nranges; 2691 character set is single byte, the single byte character set
2774 } 2692 that we build below suffices. parse_bracket_exp passes
2693 no MBCSET if dfa->mb_cur_max == 1. */
2694 if (dfa->mb_cur_max > 1)
2695 {
2696 /* Check the space of the arrays. */
2697 if (__glibc_unlikely (*range_alloc == mbcset->nranges))
2698 {
2699 /* There is not enough space, need realloc. */
2700 wchar_t *new_array_start, *new_array_end;
2701 Idx new_nranges;
2775 2702
2776 mbcset->range_starts[mbcset->nranges] = start_wc; 2703 /* +1 in case of mbcset->nranges is 0. */
2777 mbcset->range_ends[mbcset->nranges++] = end_wc; 2704 new_nranges = 2 * mbcset->nranges + 1;
2778 } 2705 /* Use realloc since mbcset->range_starts and mbcset->range_ends
2706 are NULL if *range_alloc == 0. */
2707 new_array_start = re_realloc (mbcset->range_starts, wchar_t,
2708 new_nranges);
2709 new_array_end = re_realloc (mbcset->range_ends, wchar_t,
2710 new_nranges);
2711
2712 if (__glibc_unlikely (new_array_start == NULL
2713 || new_array_end == NULL))
2714 {
2715 re_free (new_array_start);
2716 re_free (new_array_end);
2717 return REG_ESPACE;
2718 }
2719
2720 mbcset->range_starts = new_array_start;
2721 mbcset->range_ends = new_array_end;
2722 *range_alloc = new_nranges;
2723 }
2724
2725 mbcset->range_starts[mbcset->nranges] = start_wc;
2726 mbcset->range_ends[mbcset->nranges++] = end_wc;
2727 }
2728
2729 /* Build the table for single byte characters. */
2730 for (wchar_t wc = 0; wc < SBC_MAX; ++wc)
2731 {
2732 if (start_wc <= wc && wc <= end_wc)
2733 bitset_set (sbcset, wc);
2734 }
2779 2735
2780 /* Build the table for single byte characters. */
2781 for (wc = 0; wc < SBC_MAX; ++wc)
2782 {
2783 if (start_wc <= wc && wc <= end_wc)
2784 bitset_set (sbcset, wc);
2785 }
2786 }
2787# else /* not RE_ENABLE_I18N */
2788 {
2789 unsigned int ch;
2790 start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch
2791 : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
2792 : 0));
2793 end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch
2794 : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
2795 : 0));
2796 if (start_ch > end_ch)
2797 return REG_ERANGE;
2798 /* Build the table for single byte characters. */
2799 for (ch = 0; ch < SBC_MAX; ++ch)
2800 if (start_ch <= ch && ch <= end_ch)
2801 bitset_set (sbcset, ch);
2802 }
2803# endif /* not RE_ENABLE_I18N */
2804 return REG_NOERROR; 2736 return REG_NOERROR;
2805} 2737}
2806#endif /* not _LIBC */ 2738#endif /* not _LIBC */
2807 2739
2808#ifndef _LIBC 2740#ifndef _LIBC
2809/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. 2741/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.
2810 Build the collating element which is represented by NAME. 2742 Build the collating element which is represented by NAME.
2811 The result are written to MBCSET and SBCSET. 2743 The result are written to MBCSET and SBCSET.
2812 COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a 2744 COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
2813 pointer argument since we may update it. */ 2745 pointer argument since we may update it. */
2814 2746
2815static reg_errcode_t 2747static reg_errcode_t
2816# ifdef RE_ENABLE_I18N
2817build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, 2748build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
2818 Idx *coll_sym_alloc, const unsigned char *name) 2749 Idx *coll_sym_alloc, const unsigned char *name,
2819# else /* not RE_ENABLE_I18N */ 2750 uint_fast32_t nrules, int_fast32_t table_size,
2820build_collating_symbol (bitset_t sbcset, const unsigned char *name) 2751 const void *symb_table, const unsigned char *extra)
2821# endif /* not RE_ENABLE_I18N */
2822{ 2752{
2823 size_t name_len = strlen ((const char *) name); 2753 size_t name_len = strlen ((const char *) name);
2824 if (__glibc_unlikely (name_len != 1)) 2754 if (__glibc_unlikely (name_len != 1))
@@ -2831,271 +2761,280 @@ build_collating_symbol (bitset_t sbcset, const unsigned char *name)
2831} 2761}
2832#endif /* not _LIBC */ 2762#endif /* not _LIBC */
2833 2763
2834/* This function parse bracket expression like "[abc]", "[a-c]",
2835 "[[.a-a.]]" etc. */
2836
2837static bin_tree_t *
2838parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
2839 reg_syntax_t syntax, reg_errcode_t *err)
2840{
2841#ifdef _LIBC 2764#ifdef _LIBC
2842 const unsigned char *collseqmb; 2765/* Local function for parse_bracket_exp used in _LIBC environment.
2843 const char *collseqwc; 2766 Seek the collating symbol entry corresponding to NAME.
2844 uint32_t nrules; 2767 Return the index of the symbol in the SYMB_TABLE,
2845 int32_t table_size; 2768 or -1 if not found. */
2846 const int32_t *symb_table; 2769
2847 const unsigned char *extra; 2770static __always_inline int32_t
2848 2771seek_collating_symbol_entry (const unsigned char *name, size_t name_len,
2849 /* Local function for parse_bracket_exp used in _LIBC environment. 2772 const int32_t *symb_table,
2850 Seek the collating symbol entry corresponding to NAME. 2773 int_fast32_t table_size,
2851 Return the index of the symbol in the SYMB_TABLE, 2774 const unsigned char *extra)
2852 or -1 if not found. */ 2775{
2853 2776 int_fast32_t elem;
2854 auto inline int32_t
2855 __attribute__ ((always_inline))
2856 seek_collating_symbol_entry (const unsigned char *name, size_t name_len)
2857 {
2858 int32_t elem;
2859
2860 for (elem = 0; elem < table_size; elem++)
2861 if (symb_table[2 * elem] != 0)
2862 {
2863 int32_t idx = symb_table[2 * elem + 1];
2864 /* Skip the name of collating element name. */
2865 idx += 1 + extra[idx];
2866 if (/* Compare the length of the name. */
2867 name_len == extra[idx]
2868 /* Compare the name. */
2869 && memcmp (name, &extra[idx + 1], name_len) == 0)
2870 /* Yep, this is the entry. */
2871 return elem;
2872 }
2873 return -1;
2874 }
2875 2777
2876 /* Local function for parse_bracket_exp used in _LIBC environment. 2778 for (elem = 0; elem < table_size; elem++)
2877 Look up the collation sequence value of BR_ELEM. 2779 if (symb_table[2 * elem] != 0)
2878 Return the value if succeeded, UINT_MAX otherwise. */ 2780 {
2781 int32_t idx = symb_table[2 * elem + 1];
2782 /* Skip the name of collating element name. */
2783 idx += 1 + extra[idx];
2784 if (/* Compare the length of the name. */
2785 name_len == extra[idx]
2786 /* Compare the name. */
2787 && memcmp (name, &extra[idx + 1], name_len) == 0)
2788 /* Yep, this is the entry. */
2789 return elem;
2790 }
2791 return -1;
2792}
2879 2793
2880 auto inline unsigned int 2794/* Local function for parse_bracket_exp used in _LIBC environment.
2881 __attribute__ ((always_inline)) 2795 Look up the collation sequence value of BR_ELEM.
2882 lookup_collation_sequence_value (bracket_elem_t *br_elem) 2796 Return the value if succeeded, UINT_MAX otherwise. */
2797
2798static __always_inline unsigned int
2799lookup_collation_sequence_value (bracket_elem_t *br_elem, uint32_t nrules,
2800 const unsigned char *collseqmb,
2801 const char *collseqwc,
2802 int_fast32_t table_size,
2803 const int32_t *symb_table,
2804 const unsigned char *extra)
2805{
2806 if (br_elem->type == SB_CHAR)
2883 { 2807 {
2884 if (br_elem->type == SB_CHAR) 2808 /* if (MB_CUR_MAX == 1) */
2885 { 2809 if (nrules == 0)
2886 /* 2810 return collseqmb[br_elem->opr.ch];
2887 if (MB_CUR_MAX == 1) 2811 else
2888 */
2889 if (nrules == 0)
2890 return collseqmb[br_elem->opr.ch];
2891 else
2892 {
2893 wint_t wc = __btowc (br_elem->opr.ch);
2894 return __collseq_table_lookup (collseqwc, wc);
2895 }
2896 }
2897 else if (br_elem->type == MB_CHAR)
2898 { 2812 {
2899 if (nrules != 0) 2813 wint_t wc = __btowc (br_elem->opr.ch);
2900 return __collseq_table_lookup (collseqwc, br_elem->opr.wch); 2814 return __collseq_table_lookup (collseqwc, wc);
2901 } 2815 }
2902 else if (br_elem->type == COLL_SYM) 2816 }
2817 else if (br_elem->type == MB_CHAR)
2818 {
2819 if (nrules != 0)
2820 return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
2821 }
2822 else if (br_elem->type == COLL_SYM)
2823 {
2824 size_t sym_name_len = strlen ((char *) br_elem->opr.name);
2825 if (nrules != 0)
2903 { 2826 {
2904 size_t sym_name_len = strlen ((char *) br_elem->opr.name); 2827 int32_t elem, idx;
2905 if (nrules != 0) 2828 elem = seek_collating_symbol_entry (br_elem->opr.name,
2829 sym_name_len,
2830 symb_table, table_size,
2831 extra);
2832 if (elem != -1)
2906 { 2833 {
2907 int32_t elem, idx; 2834 /* We found the entry. */
2908 elem = seek_collating_symbol_entry (br_elem->opr.name, 2835 idx = symb_table[2 * elem + 1];
2909 sym_name_len); 2836 /* Skip the name of collating element name. */
2910 if (elem != -1) 2837 idx += 1 + extra[idx];
2911 { 2838 /* Skip the byte sequence of the collating element. */
2912 /* We found the entry. */ 2839 idx += 1 + extra[idx];
2913 idx = symb_table[2 * elem + 1]; 2840 /* Adjust for the alignment. */
2914 /* Skip the name of collating element name. */ 2841 idx = (idx + 3) & ~3;
2915 idx += 1 + extra[idx]; 2842 /* Skip the multibyte collation sequence value. */
2916 /* Skip the byte sequence of the collating element. */ 2843 idx += sizeof (unsigned int);
2917 idx += 1 + extra[idx]; 2844 /* Skip the wide char sequence of the collating element. */
2918 /* Adjust for the alignment. */ 2845 idx += sizeof (unsigned int) *
2919 idx = (idx + 3) & ~3; 2846 (1 + *(unsigned int *) (extra + idx));
2920 /* Skip the multibyte collation sequence value. */ 2847 /* Return the collation sequence value. */
2921 idx += sizeof (unsigned int); 2848 return *(unsigned int *) (extra + idx);
2922 /* Skip the wide char sequence of the collating element. */
2923 idx += sizeof (unsigned int) *
2924 (1 + *(unsigned int *) (extra + idx));
2925 /* Return the collation sequence value. */
2926 return *(unsigned int *) (extra + idx);
2927 }
2928 else if (sym_name_len == 1)
2929 {
2930 /* No valid character. Match it as a single byte
2931 character. */
2932 return collseqmb[br_elem->opr.name[0]];
2933 }
2934 } 2849 }
2935 else if (sym_name_len == 1) 2850 else if (sym_name_len == 1)
2936 return collseqmb[br_elem->opr.name[0]]; 2851 {
2852 /* No valid character. Match it as a single byte
2853 character. */
2854 return collseqmb[br_elem->opr.name[0]];
2855 }
2937 } 2856 }
2938 return UINT_MAX; 2857 else if (sym_name_len == 1)
2858 return collseqmb[br_elem->opr.name[0]];
2939 } 2859 }
2860 return UINT_MAX;
2861}
2940 2862
2941 /* Local function for parse_bracket_exp used in _LIBC environment. 2863/* Local function for parse_bracket_exp used in _LIBC environment.
2942 Build the range expression which starts from START_ELEM, and ends 2864 Build the range expression which starts from START_ELEM, and ends
2943 at END_ELEM. The result are written to MBCSET and SBCSET. 2865 at END_ELEM. The result are written to MBCSET and SBCSET.
2944 RANGE_ALLOC is the allocated size of mbcset->range_starts, and 2866 RANGE_ALLOC is the allocated size of mbcset->range_starts, and
2945 mbcset->range_ends, is a pointer argument since we may 2867 mbcset->range_ends, is a pointer argument since we may
2946 update it. */ 2868 update it. */
2869
2870static __always_inline reg_errcode_t
2871build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc,
2872 bracket_elem_t *start_elem, bracket_elem_t *end_elem,
2873 re_dfa_t *dfa, reg_syntax_t syntax, uint32_t nrules,
2874 const unsigned char *collseqmb, const char *collseqwc,
2875 int_fast32_t table_size, const int32_t *symb_table,
2876 const unsigned char *extra)
2877{
2878 unsigned int ch;
2879 uint32_t start_collseq;
2880 uint32_t end_collseq;
2947 2881
2948 auto inline reg_errcode_t 2882 /* Equivalence Classes and Character Classes can't be a range
2949 __attribute__ ((always_inline)) 2883 start/end. */
2950 build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc, 2884 if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
2951 bracket_elem_t *start_elem, bracket_elem_t *end_elem) 2885 || start_elem->type == CHAR_CLASS
2952 { 2886 || end_elem->type == EQUIV_CLASS
2953 unsigned int ch; 2887 || end_elem->type == CHAR_CLASS))
2954 uint32_t start_collseq; 2888 return REG_ERANGE;
2955 uint32_t end_collseq;
2956
2957 /* Equivalence Classes and Character Classes can't be a range
2958 start/end. */
2959 if (__glibc_unlikely (start_elem->type == EQUIV_CLASS
2960 || start_elem->type == CHAR_CLASS
2961 || end_elem->type == EQUIV_CLASS
2962 || end_elem->type == CHAR_CLASS))
2963 return REG_ERANGE;
2964 2889
2965 /* FIXME: Implement rational ranges here, too. */ 2890 /* FIXME: Implement rational ranges here, too. */
2966 start_collseq = lookup_collation_sequence_value (start_elem); 2891 start_collseq = lookup_collation_sequence_value (start_elem, nrules, collseqmb, collseqwc,
2967 end_collseq = lookup_collation_sequence_value (end_elem); 2892 table_size, symb_table, extra);
2968 /* Check start/end collation sequence values. */ 2893 end_collseq = lookup_collation_sequence_value (end_elem, nrules, collseqmb, collseqwc,
2969 if (__glibc_unlikely (start_collseq == UINT_MAX 2894 table_size, symb_table, extra);
2970 || end_collseq == UINT_MAX)) 2895 /* Check start/end collation sequence values. */
2971 return REG_ECOLLATE; 2896 if (__glibc_unlikely (start_collseq == UINT_MAX
2972 if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES) 2897 || end_collseq == UINT_MAX))
2973 && start_collseq > end_collseq)) 2898 return REG_ECOLLATE;
2974 return REG_ERANGE; 2899 if (__glibc_unlikely ((syntax & RE_NO_EMPTY_RANGES)
2900 && start_collseq > end_collseq))
2901 return REG_ERANGE;
2975 2902
2976 /* Got valid collation sequence values, add them as a new entry. 2903 /* Got valid collation sequence values, add them as a new entry.
2977 However, if we have no collation elements, and the character set 2904 However, if we have no collation elements, and the character set
2978 is single byte, the single byte character set that we 2905 is single byte, the single byte character set that we
2979 build below suffices. */ 2906 build below suffices. */
2980 if (nrules > 0 || dfa->mb_cur_max > 1) 2907 if (nrules > 0 || dfa->mb_cur_max > 1)
2908 {
2909 /* Check the space of the arrays. */
2910 if (__glibc_unlikely (*range_alloc == mbcset->nranges))
2981 { 2911 {
2982 /* Check the space of the arrays. */ 2912 /* There is not enough space, need realloc. */
2983 if (__glibc_unlikely (*range_alloc == mbcset->nranges)) 2913 uint32_t *new_array_start;
2984 { 2914 uint32_t *new_array_end;
2985 /* There is not enough space, need realloc. */ 2915 int new_nranges;
2986 uint32_t *new_array_start;
2987 uint32_t *new_array_end;
2988 Idx new_nranges;
2989
2990 /* +1 in case of mbcset->nranges is 0. */
2991 new_nranges = 2 * mbcset->nranges + 1;
2992 new_array_start = re_realloc (mbcset->range_starts, uint32_t,
2993 new_nranges);
2994 new_array_end = re_realloc (mbcset->range_ends, uint32_t,
2995 new_nranges);
2996
2997 if (__glibc_unlikely (new_array_start == NULL
2998 || new_array_end == NULL))
2999 return REG_ESPACE;
3000 2916
3001 mbcset->range_starts = new_array_start; 2917 /* +1 in case of mbcset->nranges is 0. */
3002 mbcset->range_ends = new_array_end; 2918 new_nranges = 2 * mbcset->nranges + 1;
3003 *range_alloc = new_nranges; 2919 new_array_start = re_realloc (mbcset->range_starts, uint32_t,
3004 } 2920 new_nranges);
2921 new_array_end = re_realloc (mbcset->range_ends, uint32_t,
2922 new_nranges);
3005 2923
3006 mbcset->range_starts[mbcset->nranges] = start_collseq; 2924 if (__glibc_unlikely (new_array_start == NULL
3007 mbcset->range_ends[mbcset->nranges++] = end_collseq; 2925 || new_array_end == NULL))
3008 } 2926 return REG_ESPACE;
3009 2927
3010 /* Build the table for single byte characters. */ 2928 mbcset->range_starts = new_array_start;
3011 for (ch = 0; ch < SBC_MAX; ch++) 2929 mbcset->range_ends = new_array_end;
3012 { 2930 *range_alloc = new_nranges;
3013 uint32_t ch_collseq;
3014 /*
3015 if (MB_CUR_MAX == 1)
3016 */
3017 if (nrules == 0)
3018 ch_collseq = collseqmb[ch];
3019 else
3020 ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
3021 if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
3022 bitset_set (sbcset, ch);
3023 } 2931 }
3024 return REG_NOERROR; 2932
2933 mbcset->range_starts[mbcset->nranges] = start_collseq;
2934 mbcset->range_ends[mbcset->nranges++] = end_collseq;
3025 } 2935 }
3026 2936
3027 /* Local function for parse_bracket_exp used in _LIBC environment. 2937 /* Build the table for single byte characters. */
3028 Build the collating element which is represented by NAME. 2938 for (ch = 0; ch < SBC_MAX; ch++)
3029 The result are written to MBCSET and SBCSET. 2939 {
3030 COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a 2940 uint32_t ch_collseq;
3031 pointer argument since we may update it. */ 2941 /* if (MB_CUR_MAX == 1) */
2942 if (nrules == 0)
2943 ch_collseq = collseqmb[ch];
2944 else
2945 ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
2946 if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
2947 bitset_set (sbcset, ch);
2948 }
2949 return REG_NOERROR;
2950}
3032 2951
3033 auto inline reg_errcode_t 2952/* Local function for parse_bracket_exp used in _LIBC environment.
3034 __attribute__ ((always_inline)) 2953 Build the collating element which is represented by NAME.
3035 build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, 2954 The result are written to MBCSET and SBCSET.
3036 Idx *coll_sym_alloc, const unsigned char *name) 2955 COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
2956 pointer argument since we may update it. */
2957
2958static __always_inline reg_errcode_t
2959build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
2960 Idx *coll_sym_alloc, const unsigned char *name,
2961 uint_fast32_t nrules, int_fast32_t table_size,
2962 const int32_t *symb_table, const unsigned char *extra)
2963{
2964 int32_t elem, idx;
2965 size_t name_len = strlen ((const char *) name);
2966 if (nrules != 0)
3037 { 2967 {
3038 int32_t elem, idx; 2968 elem = seek_collating_symbol_entry (name, name_len, symb_table,
3039 size_t name_len = strlen ((const char *) name); 2969 table_size, extra);
3040 if (nrules != 0) 2970 if (elem != -1)
3041 { 2971 {
3042 elem = seek_collating_symbol_entry (name, name_len); 2972 /* We found the entry. */
3043 if (elem != -1) 2973 idx = symb_table[2 * elem + 1];
3044 { 2974 /* Skip the name of collating element name. */
3045 /* We found the entry. */ 2975 idx += 1 + extra[idx];
3046 idx = symb_table[2 * elem + 1]; 2976 }
3047 /* Skip the name of collating element name. */ 2977 else if (name_len == 1)
3048 idx += 1 + extra[idx]; 2978 {
3049 } 2979 /* No valid character, treat it as a normal
3050 else if (name_len == 1) 2980 character. */
3051 { 2981 bitset_set (sbcset, name[0]);
3052 /* No valid character, treat it as a normal
3053 character. */
3054 bitset_set (sbcset, name[0]);
3055 return REG_NOERROR;
3056 }
3057 else
3058 return REG_ECOLLATE;
3059
3060 /* Got valid collation sequence, add it as a new entry. */
3061 /* Check the space of the arrays. */
3062 if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms))
3063 {
3064 /* Not enough, realloc it. */
3065 /* +1 in case of mbcset->ncoll_syms is 0. */
3066 Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
3067 /* Use realloc since mbcset->coll_syms is NULL
3068 if *alloc == 0. */
3069 int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
3070 new_coll_sym_alloc);
3071 if (__glibc_unlikely (new_coll_syms == NULL))
3072 return REG_ESPACE;
3073 mbcset->coll_syms = new_coll_syms;
3074 *coll_sym_alloc = new_coll_sym_alloc;
3075 }
3076 mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
3077 return REG_NOERROR; 2982 return REG_NOERROR;
3078 } 2983 }
3079 else 2984 else
2985 return REG_ECOLLATE;
2986
2987 /* Got valid collation sequence, add it as a new entry. */
2988 /* Check the space of the arrays. */
2989 if (__glibc_unlikely (*coll_sym_alloc == mbcset->ncoll_syms))
3080 { 2990 {
3081 if (__glibc_unlikely (name_len != 1)) 2991 /* Not enough, realloc it. */
3082 return REG_ECOLLATE; 2992 /* +1 in case of mbcset->ncoll_syms is 0. */
3083 else 2993 int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
3084 { 2994 /* Use realloc since mbcset->coll_syms is NULL
3085 bitset_set (sbcset, name[0]); 2995 if *alloc == 0. */
3086 return REG_NOERROR; 2996 int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
3087 } 2997 new_coll_sym_alloc);
2998 if (__glibc_unlikely (new_coll_syms == NULL))
2999 return REG_ESPACE;
3000 mbcset->coll_syms = new_coll_syms;
3001 *coll_sym_alloc = new_coll_sym_alloc;
3088 } 3002 }
3003 mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
3004 return REG_NOERROR;
3089 } 3005 }
3090#endif 3006 else
3007 {
3008 if (__glibc_unlikely (name_len != 1))
3009 return REG_ECOLLATE;
3010 else
3011 {
3012 bitset_set (sbcset, name[0]);
3013 return REG_NOERROR;
3014 }
3015 }
3016}
3017#endif /* _LIBC */
3018
3019/* This function parse bracket expression like "[abc]", "[a-c]",
3020 "[[.a-a.]]" etc. */
3021
3022static bin_tree_t *
3023parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3024 reg_syntax_t syntax, reg_errcode_t *err)
3025{
3026 const unsigned char *collseqmb = NULL;
3027 const char *collseqwc = NULL;
3028 uint_fast32_t nrules = 0;
3029 int_fast32_t table_size = 0;
3030 const void *symb_table = NULL;
3031 const unsigned char *extra = NULL;
3091 3032
3092 re_token_t br_token; 3033 re_token_t br_token;
3093 re_bitset_ptr_t sbcset; 3034 re_bitset_ptr_t sbcset;
3094#ifdef RE_ENABLE_I18N
3095 re_charset_t *mbcset; 3035 re_charset_t *mbcset;
3096 Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; 3036 Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
3097 Idx equiv_class_alloc = 0, char_class_alloc = 0; 3037 Idx equiv_class_alloc = 0, char_class_alloc = 0;
3098#endif /* not RE_ENABLE_I18N */
3099 bool non_match = false; 3038 bool non_match = false;
3100 bin_tree_t *work_tree; 3039 bin_tree_t *work_tree;
3101 int token_len; 3040 int token_len;
@@ -3111,26 +3050,17 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3111 */ 3050 */
3112 collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); 3051 collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
3113 table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); 3052 table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB);
3114 symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, 3053 symb_table = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB);
3115 _NL_COLLATE_SYMB_TABLEMB);
3116 extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, 3054 extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
3117 _NL_COLLATE_SYMB_EXTRAMB); 3055 _NL_COLLATE_SYMB_EXTRAMB);
3118 } 3056 }
3119#endif 3057#endif
3120 sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); 3058 sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
3121#ifdef RE_ENABLE_I18N
3122 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); 3059 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
3123#endif /* RE_ENABLE_I18N */
3124#ifdef RE_ENABLE_I18N
3125 if (__glibc_unlikely (sbcset == NULL || mbcset == NULL)) 3060 if (__glibc_unlikely (sbcset == NULL || mbcset == NULL))
3126#else
3127 if (__glibc_unlikely (sbcset == NULL))
3128#endif /* RE_ENABLE_I18N */
3129 { 3061 {
3130 re_free (sbcset); 3062 re_free (sbcset);
3131#ifdef RE_ENABLE_I18N
3132 re_free (mbcset); 3063 re_free (mbcset);
3133#endif
3134 *err = REG_ESPACE; 3064 *err = REG_ESPACE;
3135 return NULL; 3065 return NULL;
3136 } 3066 }
@@ -3143,9 +3073,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3143 } 3073 }
3144 if (token->type == OP_NON_MATCH_LIST) 3074 if (token->type == OP_NON_MATCH_LIST)
3145 { 3075 {
3146#ifdef RE_ENABLE_I18N
3147 mbcset->non_match = 1; 3076 mbcset->non_match = 1;
3148#endif /* not RE_ENABLE_I18N */
3149 non_match = true; 3077 non_match = true;
3150 if (syntax & RE_HAT_LISTS_NOT_NEWLINE) 3078 if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
3151 bitset_set (sbcset, '\n'); 3079 bitset_set (sbcset, '\n');
@@ -3228,18 +3156,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3228 3156
3229 token_len = peek_token_bracket (token, regexp, syntax); 3157 token_len = peek_token_bracket (token, regexp, syntax);
3230 3158
3231#ifdef _LIBC
3232 *err = build_range_exp (sbcset, mbcset, &range_alloc, 3159 *err = build_range_exp (sbcset, mbcset, &range_alloc,
3233 &start_elem, &end_elem); 3160 &start_elem, &end_elem,
3234#else 3161 dfa, syntax, nrules, collseqmb, collseqwc,
3235# ifdef RE_ENABLE_I18N 3162 table_size, symb_table, extra);
3236 *err = build_range_exp (syntax, sbcset,
3237 dfa->mb_cur_max > 1 ? mbcset : NULL,
3238 &range_alloc, &start_elem, &end_elem);
3239# else
3240 *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem);
3241# endif
3242#endif /* RE_ENABLE_I18N */
3243 if (__glibc_unlikely (*err != REG_NOERROR)) 3163 if (__glibc_unlikely (*err != REG_NOERROR))
3244 goto parse_bracket_exp_free_return; 3164 goto parse_bracket_exp_free_return;
3245 } 3165 }
@@ -3250,7 +3170,6 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3250 case SB_CHAR: 3170 case SB_CHAR:
3251 bitset_set (sbcset, start_elem.opr.ch); 3171 bitset_set (sbcset, start_elem.opr.ch);
3252 break; 3172 break;
3253#ifdef RE_ENABLE_I18N
3254 case MB_CHAR: 3173 case MB_CHAR:
3255 /* Check whether the array has enough space. */ 3174 /* Check whether the array has enough space. */
3256 if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars)) 3175 if (__glibc_unlikely (mbchar_alloc == mbcset->nmbchars))
@@ -3268,30 +3187,24 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3268 } 3187 }
3269 mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; 3188 mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
3270 break; 3189 break;
3271#endif /* RE_ENABLE_I18N */
3272 case EQUIV_CLASS: 3190 case EQUIV_CLASS:
3273 *err = build_equiv_class (sbcset, 3191 *err = build_equiv_class (sbcset,
3274#ifdef RE_ENABLE_I18N
3275 mbcset, &equiv_class_alloc, 3192 mbcset, &equiv_class_alloc,
3276#endif /* RE_ENABLE_I18N */
3277 start_elem.opr.name); 3193 start_elem.opr.name);
3278 if (__glibc_unlikely (*err != REG_NOERROR)) 3194 if (__glibc_unlikely (*err != REG_NOERROR))
3279 goto parse_bracket_exp_free_return; 3195 goto parse_bracket_exp_free_return;
3280 break; 3196 break;
3281 case COLL_SYM: 3197 case COLL_SYM:
3282 *err = build_collating_symbol (sbcset, 3198 *err = build_collating_symbol (sbcset,
3283#ifdef RE_ENABLE_I18N
3284 mbcset, &coll_sym_alloc, 3199 mbcset, &coll_sym_alloc,
3285#endif /* RE_ENABLE_I18N */ 3200 start_elem.opr.name,
3286 start_elem.opr.name); 3201 nrules, table_size, symb_table, extra);
3287 if (__glibc_unlikely (*err != REG_NOERROR)) 3202 if (__glibc_unlikely (*err != REG_NOERROR))
3288 goto parse_bracket_exp_free_return; 3203 goto parse_bracket_exp_free_return;
3289 break; 3204 break;
3290 case CHAR_CLASS: 3205 case CHAR_CLASS:
3291 *err = build_charclass (regexp->trans, sbcset, 3206 *err = build_charclass (regexp->trans, sbcset,
3292#ifdef RE_ENABLE_I18N
3293 mbcset, &char_class_alloc, 3207 mbcset, &char_class_alloc,
3294#endif /* RE_ENABLE_I18N */
3295 (const char *) start_elem.opr.name, 3208 (const char *) start_elem.opr.name,
3296 syntax); 3209 syntax);
3297 if (__glibc_unlikely (*err != REG_NOERROR)) 3210 if (__glibc_unlikely (*err != REG_NOERROR))
@@ -3317,7 +3230,6 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3317 if (non_match) 3230 if (non_match)
3318 bitset_not (sbcset); 3231 bitset_not (sbcset);
3319 3232
3320#ifdef RE_ENABLE_I18N
3321 /* Ensure only single byte characters are set. */ 3233 /* Ensure only single byte characters are set. */
3322 if (dfa->mb_cur_max > 1) 3234 if (dfa->mb_cur_max > 1)
3323 bitset_mask (sbcset, dfa->sb_char); 3235 bitset_mask (sbcset, dfa->sb_char);
@@ -3361,11 +3273,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3361 } 3273 }
3362 } 3274 }
3363 else 3275 else
3364#endif /* not RE_ENABLE_I18N */
3365 { 3276 {
3366#ifdef RE_ENABLE_I18N
3367 free_charset (mbcset); 3277 free_charset (mbcset);
3368#endif
3369 /* Build a tree for simple bracket. */ 3278 /* Build a tree for simple bracket. */
3370 br_token.type = SIMPLE_BRACKET; 3279 br_token.type = SIMPLE_BRACKET;
3371 br_token.opr.sbcset = sbcset; 3280 br_token.opr.sbcset = sbcset;
@@ -3379,9 +3288,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
3379 *err = REG_ESPACE; 3288 *err = REG_ESPACE;
3380 parse_bracket_exp_free_return: 3289 parse_bracket_exp_free_return:
3381 re_free (sbcset); 3290 re_free (sbcset);
3382#ifdef RE_ENABLE_I18N
3383 free_charset (mbcset); 3291 free_charset (mbcset);
3384#endif /* RE_ENABLE_I18N */
3385 return NULL; 3292 return NULL;
3386} 3293}
3387 3294
@@ -3392,7 +3299,6 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
3392 re_token_t *token, int token_len, re_dfa_t *dfa, 3299 re_token_t *token, int token_len, re_dfa_t *dfa,
3393 reg_syntax_t syntax, bool accept_hyphen) 3300 reg_syntax_t syntax, bool accept_hyphen)
3394{ 3301{
3395#ifdef RE_ENABLE_I18N
3396 int cur_char_size; 3302 int cur_char_size;
3397 cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); 3303 cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
3398 if (cur_char_size > 1) 3304 if (cur_char_size > 1)
@@ -3402,7 +3308,6 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
3402 re_string_skip_bytes (regexp, cur_char_size); 3308 re_string_skip_bytes (regexp, cur_char_size);
3403 return REG_NOERROR; 3309 return REG_NOERROR;
3404 } 3310 }
3405#endif /* RE_ENABLE_I18N */
3406 re_string_skip_bytes (regexp, token_len); /* Skip a token. */ 3311 re_string_skip_bytes (regexp, token_len); /* Skip a token. */
3407 if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS 3312 if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
3408 || token->type == OP_OPEN_EQUIV_CLASS) 3313 || token->type == OP_OPEN_EQUIV_CLASS)
@@ -3475,12 +3380,8 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
3475 is a pointer argument since we may update it. */ 3380 is a pointer argument since we may update it. */
3476 3381
3477static reg_errcode_t 3382static reg_errcode_t
3478#ifdef RE_ENABLE_I18N
3479build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, 3383build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
3480 Idx *equiv_class_alloc, const unsigned char *name) 3384 Idx *equiv_class_alloc, const unsigned char *name)
3481#else /* not RE_ENABLE_I18N */
3482build_equiv_class (bitset_t sbcset, const unsigned char *name)
3483#endif /* not RE_ENABLE_I18N */
3484{ 3385{
3485#ifdef _LIBC 3386#ifdef _LIBC
3486 uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); 3387 uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
@@ -3560,14 +3461,9 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
3560 is a pointer argument since we may update it. */ 3461 is a pointer argument since we may update it. */
3561 3462
3562static reg_errcode_t 3463static reg_errcode_t
3563#ifdef RE_ENABLE_I18N
3564build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, 3464build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
3565 re_charset_t *mbcset, Idx *char_class_alloc, 3465 re_charset_t *mbcset, Idx *char_class_alloc,
3566 const char *class_name, reg_syntax_t syntax) 3466 const char *class_name, reg_syntax_t syntax)
3567#else /* not RE_ENABLE_I18N */
3568build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
3569 const char *class_name, reg_syntax_t syntax)
3570#endif /* not RE_ENABLE_I18N */
3571{ 3467{
3572 int i; 3468 int i;
3573 const char *name = class_name; 3469 const char *name = class_name;
@@ -3578,7 +3474,6 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
3578 && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) 3474 && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
3579 name = "alpha"; 3475 name = "alpha";
3580 3476
3581#ifdef RE_ENABLE_I18N
3582 /* Check the space of the arrays. */ 3477 /* Check the space of the arrays. */
3583 if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes)) 3478 if (__glibc_unlikely (*char_class_alloc == mbcset->nchar_classes))
3584 { 3479 {
@@ -3594,7 +3489,6 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
3594 *char_class_alloc = new_char_class_alloc; 3489 *char_class_alloc = new_char_class_alloc;
3595 } 3490 }
3596 mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); 3491 mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
3597#endif /* RE_ENABLE_I18N */
3598 3492
3599#define BUILD_CHARCLASS_LOOP(ctype_func) \ 3493#define BUILD_CHARCLASS_LOOP(ctype_func) \
3600 do { \ 3494 do { \
@@ -3649,10 +3543,8 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3649 reg_errcode_t *err) 3543 reg_errcode_t *err)
3650{ 3544{
3651 re_bitset_ptr_t sbcset; 3545 re_bitset_ptr_t sbcset;
3652#ifdef RE_ENABLE_I18N
3653 re_charset_t *mbcset; 3546 re_charset_t *mbcset;
3654 Idx alloc = 0; 3547 Idx alloc = 0;
3655#endif /* not RE_ENABLE_I18N */
3656 reg_errcode_t ret; 3548 reg_errcode_t ret;
3657 bin_tree_t *tree; 3549 bin_tree_t *tree;
3658 3550
@@ -3662,7 +3554,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3662 *err = REG_ESPACE; 3554 *err = REG_ESPACE;
3663 return NULL; 3555 return NULL;
3664 } 3556 }
3665#ifdef RE_ENABLE_I18N
3666 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); 3557 mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
3667 if (__glibc_unlikely (mbcset == NULL)) 3558 if (__glibc_unlikely (mbcset == NULL))
3668 { 3559 {
@@ -3671,21 +3562,14 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3671 return NULL; 3562 return NULL;
3672 } 3563 }
3673 mbcset->non_match = non_match; 3564 mbcset->non_match = non_match;
3674#endif /* RE_ENABLE_I18N */
3675 3565
3676 /* We don't care the syntax in this case. */ 3566 /* We don't care the syntax in this case. */
3677 ret = build_charclass (trans, sbcset, 3567 ret = build_charclass (trans, sbcset, mbcset, &alloc, class_name, 0);
3678#ifdef RE_ENABLE_I18N
3679 mbcset, &alloc,
3680#endif /* RE_ENABLE_I18N */
3681 class_name, 0);
3682 3568
3683 if (__glibc_unlikely (ret != REG_NOERROR)) 3569 if (__glibc_unlikely (ret != REG_NOERROR))
3684 { 3570 {
3685 re_free (sbcset); 3571 re_free (sbcset);
3686#ifdef RE_ENABLE_I18N
3687 free_charset (mbcset); 3572 free_charset (mbcset);
3688#endif /* RE_ENABLE_I18N */
3689 *err = ret; 3573 *err = ret;
3690 return NULL; 3574 return NULL;
3691 } 3575 }
@@ -3697,11 +3581,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3697 if (non_match) 3581 if (non_match)
3698 bitset_not (sbcset); 3582 bitset_not (sbcset);
3699 3583
3700#ifdef RE_ENABLE_I18N
3701 /* Ensure only single byte characters are set. */ 3584 /* Ensure only single byte characters are set. */
3702 if (dfa->mb_cur_max > 1) 3585 if (dfa->mb_cur_max > 1)
3703 bitset_mask (sbcset, dfa->sb_char); 3586 bitset_mask (sbcset, dfa->sb_char);
3704#endif
3705 3587
3706 /* Build a tree for simple bracket. */ 3588 /* Build a tree for simple bracket. */
3707 re_token_t br_token = { .type = SIMPLE_BRACKET, .opr.sbcset = sbcset }; 3589 re_token_t br_token = { .type = SIMPLE_BRACKET, .opr.sbcset = sbcset };
@@ -3709,7 +3591,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3709 if (__glibc_unlikely (tree == NULL)) 3591 if (__glibc_unlikely (tree == NULL))
3710 goto build_word_op_espace; 3592 goto build_word_op_espace;
3711 3593
3712#ifdef RE_ENABLE_I18N
3713 if (dfa->mb_cur_max > 1) 3594 if (dfa->mb_cur_max > 1)
3714 { 3595 {
3715 bin_tree_t *mbc_tree; 3596 bin_tree_t *mbc_tree;
@@ -3730,15 +3611,10 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
3730 free_charset (mbcset); 3611 free_charset (mbcset);
3731 return tree; 3612 return tree;
3732 } 3613 }
3733#else /* not RE_ENABLE_I18N */
3734 return tree;
3735#endif /* not RE_ENABLE_I18N */
3736 3614
3737 build_word_op_espace: 3615 build_word_op_espace:
3738 re_free (sbcset); 3616 re_free (sbcset);
3739#ifdef RE_ENABLE_I18N
3740 free_charset (mbcset); 3617 free_charset (mbcset);
3741#endif /* RE_ENABLE_I18N */
3742 *err = REG_ESPACE; 3618 *err = REG_ESPACE;
3743 return NULL; 3619 return NULL;
3744} 3620}
@@ -3771,21 +3647,19 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
3771 return num; 3647 return num;
3772} 3648}
3773 3649
3774#ifdef RE_ENABLE_I18N
3775static void 3650static void
3776free_charset (re_charset_t *cset) 3651free_charset (re_charset_t *cset)
3777{ 3652{
3778 re_free (cset->mbchars); 3653 re_free (cset->mbchars);
3779# ifdef _LIBC 3654#ifdef _LIBC
3780 re_free (cset->coll_syms); 3655 re_free (cset->coll_syms);
3781 re_free (cset->equiv_classes); 3656 re_free (cset->equiv_classes);
3782# endif 3657#endif
3783 re_free (cset->range_starts); 3658 re_free (cset->range_starts);
3784 re_free (cset->range_ends); 3659 re_free (cset->range_ends);
3785 re_free (cset->char_classes); 3660 re_free (cset->char_classes);
3786 re_free (cset); 3661 re_free (cset);
3787} 3662}
3788#endif /* RE_ENABLE_I18N */
3789 3663
3790/* Functions for binary tree operation. */ 3664/* Functions for binary tree operation. */
3791 3665
@@ -3851,13 +3725,10 @@ mark_opt_subexp (void *extra, bin_tree_t *node)
3851static void 3725static void
3852free_token (re_token_t *node) 3726free_token (re_token_t *node)
3853{ 3727{
3854#ifdef RE_ENABLE_I18N
3855 if (node->type == COMPLEX_BRACKET && node->duplicated == 0) 3728 if (node->type == COMPLEX_BRACKET && node->duplicated == 0)
3856 free_charset (node->opr.mbcset); 3729 free_charset (node->opr.mbcset);
3857 else 3730 else if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
3858#endif /* RE_ENABLE_I18N */ 3731 re_free (node->opr.sbcset);
3859 if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
3860 re_free (node->opr.sbcset);
3861} 3732}
3862 3733
3863/* Worker function for tree walking. Free the allocated memory inside NODE 3734/* Worker function for tree walking. Free the allocated memory inside NODE
diff --git a/gl/regex.c b/gl/regex.c
index d328639..ff11767 100644
--- a/gl/regex.c
+++ b/gl/regex.c
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
diff --git a/gl/regex.h b/gl/regex.h
index adb6976..a7e0bd0 100644
--- a/gl/regex.h
+++ b/gl/regex.h
@@ -1,6 +1,6 @@
1/* Definitions for data structures and routines for the regular 1/* Definitions for data structures and routines for the regular
2 expression library. 2 expression library.
3 Copyright (C) 1985, 1989-2021 Free Software Foundation, Inc. 3 Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc.
4 This file is part of the GNU C Library. 4 This file is part of the GNU C Library.
5 5
6 The GNU C Library is free software; you can redistribute it and/or 6 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/regex_internal.c b/gl/regex_internal.c
index aefcfa2..0e6919f 100644
--- a/gl/regex_internal.c
+++ b/gl/regex_internal.c
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
@@ -30,10 +30,8 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
30 re_hashval_t hash); 30 re_hashval_t hash);
31static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, 31static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
32 Idx new_buf_len); 32 Idx new_buf_len);
33#ifdef RE_ENABLE_I18N
34static void build_wcs_buffer (re_string_t *pstr); 33static void build_wcs_buffer (re_string_t *pstr);
35static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr); 34static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr);
36#endif /* RE_ENABLE_I18N */
37static void build_upper_buffer (re_string_t *pstr); 35static void build_upper_buffer (re_string_t *pstr);
38static void re_string_translate_buffer (re_string_t *pstr); 36static void re_string_translate_buffer (re_string_t *pstr);
39static unsigned int re_string_context_at (const re_string_t *input, Idx idx, 37static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
@@ -91,7 +89,6 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
91 89
92 if (icase) 90 if (icase)
93 { 91 {
94#ifdef RE_ENABLE_I18N
95 if (dfa->mb_cur_max > 1) 92 if (dfa->mb_cur_max > 1)
96 { 93 {
97 while (1) 94 while (1)
@@ -109,16 +106,13 @@ re_string_construct (re_string_t *pstr, const char *str, Idx len,
109 } 106 }
110 } 107 }
111 else 108 else
112#endif /* RE_ENABLE_I18N */
113 build_upper_buffer (pstr); 109 build_upper_buffer (pstr);
114 } 110 }
115 else 111 else
116 { 112 {
117#ifdef RE_ENABLE_I18N
118 if (dfa->mb_cur_max > 1) 113 if (dfa->mb_cur_max > 1)
119 build_wcs_buffer (pstr); 114 build_wcs_buffer (pstr);
120 else 115 else
121#endif /* RE_ENABLE_I18N */
122 { 116 {
123 if (trans != NULL) 117 if (trans != NULL)
124 re_string_translate_buffer (pstr); 118 re_string_translate_buffer (pstr);
@@ -139,7 +133,6 @@ static reg_errcode_t
139__attribute_warn_unused_result__ 133__attribute_warn_unused_result__
140re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) 134re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
141{ 135{
142#ifdef RE_ENABLE_I18N
143 if (pstr->mb_cur_max > 1) 136 if (pstr->mb_cur_max > 1)
144 { 137 {
145 wint_t *new_wcs; 138 wint_t *new_wcs;
@@ -162,7 +155,6 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
162 pstr->offsets = new_offsets; 155 pstr->offsets = new_offsets;
163 } 156 }
164 } 157 }
165#endif /* RE_ENABLE_I18N */
166 if (pstr->mbs_allocated) 158 if (pstr->mbs_allocated)
167 { 159 {
168 unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, 160 unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
@@ -194,7 +186,6 @@ re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
194 pstr->raw_stop = pstr->stop; 186 pstr->raw_stop = pstr->stop;
195} 187}
196 188
197#ifdef RE_ENABLE_I18N
198 189
199/* Build wide character buffer PSTR->WCS. 190/* Build wide character buffer PSTR->WCS.
200 If the byte sequence of the string are: 191 If the byte sequence of the string are:
@@ -530,7 +521,6 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
530 *last_wc = wc; 521 *last_wc = wc;
531 return rawbuf_idx; 522 return rawbuf_idx;
532} 523}
533#endif /* RE_ENABLE_I18N */
534 524
535/* Build the buffer PSTR->MBS, and apply the translation if we need. 525/* Build the buffer PSTR->MBS, and apply the translation if we need.
536 This function is used in case of REG_ICASE. */ 526 This function is used in case of REG_ICASE. */
@@ -585,10 +575,8 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
585 else 575 else
586 { 576 {
587 /* Reset buffer. */ 577 /* Reset buffer. */
588#ifdef RE_ENABLE_I18N
589 if (pstr->mb_cur_max > 1) 578 if (pstr->mb_cur_max > 1)
590 memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); 579 memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
591#endif /* RE_ENABLE_I18N */
592 pstr->len = pstr->raw_len; 580 pstr->len = pstr->raw_len;
593 pstr->stop = pstr->raw_stop; 581 pstr->stop = pstr->raw_stop;
594 pstr->valid_len = 0; 582 pstr->valid_len = 0;
@@ -608,7 +596,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
608 if (__glibc_likely (offset < pstr->valid_raw_len)) 596 if (__glibc_likely (offset < pstr->valid_raw_len))
609 { 597 {
610 /* Yes, move them to the front of the buffer. */ 598 /* Yes, move them to the front of the buffer. */
611#ifdef RE_ENABLE_I18N
612 if (__glibc_unlikely (pstr->offsets_needed)) 599 if (__glibc_unlikely (pstr->offsets_needed))
613 { 600 {
614 Idx low = 0, high = pstr->valid_len, mid; 601 Idx low = 0, high = pstr->valid_len, mid;
@@ -672,15 +659,12 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
672 } 659 }
673 } 660 }
674 else 661 else
675#endif
676 { 662 {
677 pstr->tip_context = re_string_context_at (pstr, offset - 1, 663 pstr->tip_context = re_string_context_at (pstr, offset - 1,
678 eflags); 664 eflags);
679#ifdef RE_ENABLE_I18N
680 if (pstr->mb_cur_max > 1) 665 if (pstr->mb_cur_max > 1)
681 memmove (pstr->wcs, pstr->wcs + offset, 666 memmove (pstr->wcs, pstr->wcs + offset,
682 (pstr->valid_len - offset) * sizeof (wint_t)); 667 (pstr->valid_len - offset) * sizeof (wint_t));
683#endif /* RE_ENABLE_I18N */
684 if (__glibc_unlikely (pstr->mbs_allocated)) 668 if (__glibc_unlikely (pstr->mbs_allocated))
685 memmove (pstr->mbs, pstr->mbs + offset, 669 memmove (pstr->mbs, pstr->mbs + offset,
686 pstr->valid_len - offset); 670 pstr->valid_len - offset);
@@ -691,7 +675,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
691 } 675 }
692 else 676 else
693 { 677 {
694#ifdef RE_ENABLE_I18N
695 /* No, skip all characters until IDX. */ 678 /* No, skip all characters until IDX. */
696 Idx prev_valid_len = pstr->valid_len; 679 Idx prev_valid_len = pstr->valid_len;
697 680
@@ -701,9 +684,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
701 pstr->stop = pstr->raw_stop - idx + offset; 684 pstr->stop = pstr->raw_stop - idx + offset;
702 pstr->offsets_needed = 0; 685 pstr->offsets_needed = 0;
703 } 686 }
704#endif
705 pstr->valid_len = 0; 687 pstr->valid_len = 0;
706#ifdef RE_ENABLE_I18N
707 if (pstr->mb_cur_max > 1) 688 if (pstr->mb_cur_max > 1)
708 { 689 {
709 Idx wcs_idx; 690 Idx wcs_idx;
@@ -787,7 +768,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
787 pstr->valid_raw_len = pstr->valid_len; 768 pstr->valid_raw_len = pstr->valid_len;
788 } 769 }
789 else 770 else
790#endif /* RE_ENABLE_I18N */
791 { 771 {
792 int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; 772 int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
793 pstr->valid_raw_len = 0; 773 pstr->valid_raw_len = 0;
@@ -807,7 +787,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
807 pstr->stop -= offset; 787 pstr->stop -= offset;
808 788
809 /* Then build the buffers. */ 789 /* Then build the buffers. */
810#ifdef RE_ENABLE_I18N
811 if (pstr->mb_cur_max > 1) 790 if (pstr->mb_cur_max > 1)
812 { 791 {
813 if (pstr->icase) 792 if (pstr->icase)
@@ -820,7 +799,6 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
820 build_wcs_buffer (pstr); 799 build_wcs_buffer (pstr);
821 } 800 }
822 else 801 else
823#endif /* RE_ENABLE_I18N */
824 if (__glibc_unlikely (pstr->mbs_allocated)) 802 if (__glibc_unlikely (pstr->mbs_allocated))
825 { 803 {
826 if (pstr->icase) 804 if (pstr->icase)
@@ -846,28 +824,22 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
846 if (__glibc_likely (!pstr->mbs_allocated)) 824 if (__glibc_likely (!pstr->mbs_allocated))
847 return re_string_peek_byte (pstr, idx); 825 return re_string_peek_byte (pstr, idx);
848 826
849#ifdef RE_ENABLE_I18N
850 if (pstr->mb_cur_max > 1 827 if (pstr->mb_cur_max > 1
851 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) 828 && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
852 return re_string_peek_byte (pstr, idx); 829 return re_string_peek_byte (pstr, idx);
853#endif
854 830
855 off = pstr->cur_idx + idx; 831 off = pstr->cur_idx + idx;
856#ifdef RE_ENABLE_I18N
857 if (pstr->offsets_needed) 832 if (pstr->offsets_needed)
858 off = pstr->offsets[off]; 833 off = pstr->offsets[off];
859#endif
860 834
861 ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; 835 ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
862 836
863#ifdef RE_ENABLE_I18N
864 /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I 837 /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I
865 this function returns CAPITAL LETTER I instead of first byte of 838 this function returns CAPITAL LETTER I instead of first byte of
866 DOTLESS SMALL LETTER I. The latter would confuse the parser, 839 DOTLESS SMALL LETTER I. The latter would confuse the parser,
867 since peek_byte_case doesn't advance cur_idx in any way. */ 840 since peek_byte_case doesn't advance cur_idx in any way. */
868 if (pstr->offsets_needed && !isascii (ch)) 841 if (pstr->offsets_needed && !isascii (ch))
869 return re_string_peek_byte (pstr, idx); 842 return re_string_peek_byte (pstr, idx);
870#endif
871 843
872 return ch; 844 return ch;
873} 845}
@@ -878,7 +850,6 @@ re_string_fetch_byte_case (re_string_t *pstr)
878 if (__glibc_likely (!pstr->mbs_allocated)) 850 if (__glibc_likely (!pstr->mbs_allocated))
879 return re_string_fetch_byte (pstr); 851 return re_string_fetch_byte (pstr);
880 852
881#ifdef RE_ENABLE_I18N
882 if (pstr->offsets_needed) 853 if (pstr->offsets_needed)
883 { 854 {
884 Idx off; 855 Idx off;
@@ -904,7 +875,6 @@ re_string_fetch_byte_case (re_string_t *pstr)
904 re_string_char_size_at (pstr, pstr->cur_idx)); 875 re_string_char_size_at (pstr, pstr->cur_idx));
905 return ch; 876 return ch;
906 } 877 }
907#endif
908 878
909 return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; 879 return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++];
910} 880}
@@ -912,10 +882,8 @@ re_string_fetch_byte_case (re_string_t *pstr)
912static void 882static void
913re_string_destruct (re_string_t *pstr) 883re_string_destruct (re_string_t *pstr)
914{ 884{
915#ifdef RE_ENABLE_I18N
916 re_free (pstr->wcs); 885 re_free (pstr->wcs);
917 re_free (pstr->offsets); 886 re_free (pstr->offsets);
918#endif /* RE_ENABLE_I18N */
919 if (pstr->mbs_allocated) 887 if (pstr->mbs_allocated)
920 re_free (pstr->mbs); 888 re_free (pstr->mbs);
921} 889}
@@ -933,7 +901,6 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
933 if (__glibc_unlikely (idx == input->len)) 901 if (__glibc_unlikely (idx == input->len))
934 return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF 902 return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
935 : CONTEXT_NEWLINE | CONTEXT_ENDBUF); 903 : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
936#ifdef RE_ENABLE_I18N
937 if (input->mb_cur_max > 1) 904 if (input->mb_cur_max > 1)
938 { 905 {
939 wint_t wc; 906 wint_t wc;
@@ -953,7 +920,6 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
953 ? CONTEXT_NEWLINE : 0); 920 ? CONTEXT_NEWLINE : 0);
954 } 921 }
955 else 922 else
956#endif
957 { 923 {
958 c = re_string_byte_at (input, idx); 924 c = re_string_byte_at (input, idx);
959 if (bitset_contain (input->word_char, c)) 925 if (bitset_contain (input->word_char, c))
@@ -1430,32 +1396,28 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
1430 if (__glibc_unlikely (new_nodes == NULL)) 1396 if (__glibc_unlikely (new_nodes == NULL))
1431 return -1; 1397 return -1;
1432 dfa->nodes = new_nodes; 1398 dfa->nodes = new_nodes;
1399 dfa->nodes_alloc = new_nodes_alloc;
1433 new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); 1400 new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
1401 if (new_nexts != NULL)
1402 dfa->nexts = new_nexts;
1434 new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); 1403 new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
1404 if (new_indices != NULL)
1405 dfa->org_indices = new_indices;
1435 new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); 1406 new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
1407 if (new_edests != NULL)
1408 dfa->edests = new_edests;
1436 new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); 1409 new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
1410 if (new_eclosures != NULL)
1411 dfa->eclosures = new_eclosures;
1437 if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL 1412 if (__glibc_unlikely (new_nexts == NULL || new_indices == NULL
1438 || new_edests == NULL || new_eclosures == NULL)) 1413 || new_edests == NULL || new_eclosures == NULL))
1439 { 1414 return -1;
1440 re_free (new_nexts);
1441 re_free (new_indices);
1442 re_free (new_edests);
1443 re_free (new_eclosures);
1444 return -1;
1445 }
1446 dfa->nexts = new_nexts;
1447 dfa->org_indices = new_indices;
1448 dfa->edests = new_edests;
1449 dfa->eclosures = new_eclosures;
1450 dfa->nodes_alloc = new_nodes_alloc;
1451 } 1415 }
1452 dfa->nodes[dfa->nodes_len] = token; 1416 dfa->nodes[dfa->nodes_len] = token;
1453 dfa->nodes[dfa->nodes_len].constraint = 0; 1417 dfa->nodes[dfa->nodes_len].constraint = 0;
1454#ifdef RE_ENABLE_I18N
1455 dfa->nodes[dfa->nodes_len].accept_mb = 1418 dfa->nodes[dfa->nodes_len].accept_mb =
1456 ((token.type == OP_PERIOD && dfa->mb_cur_max > 1) 1419 ((token.type == OP_PERIOD && dfa->mb_cur_max > 1)
1457 || token.type == COMPLEX_BRACKET); 1420 || token.type == COMPLEX_BRACKET);
1458#endif
1459 dfa->nexts[dfa->nodes_len] = -1; 1421 dfa->nexts[dfa->nodes_len] = -1;
1460 re_node_set_init_empty (dfa->edests + dfa->nodes_len); 1422 re_node_set_init_empty (dfa->edests + dfa->nodes_len);
1461 re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); 1423 re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
@@ -1651,9 +1613,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1651 re_token_type_t type = node->type; 1613 re_token_type_t type = node->type;
1652 if (type == CHARACTER && !node->constraint) 1614 if (type == CHARACTER && !node->constraint)
1653 continue; 1615 continue;
1654#ifdef RE_ENABLE_I18N
1655 newstate->accept_mb |= node->accept_mb; 1616 newstate->accept_mb |= node->accept_mb;
1656#endif /* RE_ENABLE_I18N */
1657 1617
1658 /* If the state has the halt node, the state is a halt state. */ 1618 /* If the state has the halt node, the state is a halt state. */
1659 if (type == END_OF_RE) 1619 if (type == END_OF_RE)
@@ -1705,9 +1665,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
1705 1665
1706 if (type == CHARACTER && !constraint) 1666 if (type == CHARACTER && !constraint)
1707 continue; 1667 continue;
1708#ifdef RE_ENABLE_I18N
1709 newstate->accept_mb |= node->accept_mb; 1668 newstate->accept_mb |= node->accept_mb;
1710#endif /* RE_ENABLE_I18N */
1711 1669
1712 /* If the state has the halt node, the state is a halt state. */ 1670 /* If the state has the halt node, the state is a halt state. */
1713 if (type == END_OF_RE) 1671 if (type == END_OF_RE)
diff --git a/gl/regex_internal.h b/gl/regex_internal.h
index 1245e78..57a455b 100644
--- a/gl/regex_internal.h
+++ b/gl/regex_internal.h
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
@@ -116,10 +116,6 @@
116# define gettext_noop(String) String 116# define gettext_noop(String) String
117#endif 117#endif
118 118
119#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE) || _LIBC
120# define RE_ENABLE_I18N
121#endif
122
123/* Number of ASCII characters. */ 119/* Number of ASCII characters. */
124#define ASCII_CHARS 0x80 120#define ASCII_CHARS 0x80
125 121
@@ -150,6 +146,11 @@
150# define __regfree regfree 146# define __regfree regfree
151#endif /* not _LIBC */ 147#endif /* not _LIBC */
152 148
149/* Types related to integers. Unless protected by #ifdef _LIBC, the
150 regex code should avoid exact-width types like int32_t and uint64_t
151 as some non-GCC platforms lack them, an issue when this code is
152 used in Gnulib. */
153
153#ifndef SSIZE_MAX 154#ifndef SSIZE_MAX
154# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) 155# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
155#endif 156#endif
@@ -246,10 +247,8 @@ typedef enum
246 SIMPLE_BRACKET = 3, 247 SIMPLE_BRACKET = 3,
247 OP_BACK_REF = 4, 248 OP_BACK_REF = 4,
248 OP_PERIOD = 5, 249 OP_PERIOD = 5,
249#ifdef RE_ENABLE_I18N
250 COMPLEX_BRACKET = 6, 250 COMPLEX_BRACKET = 6,
251 OP_UTF8_PERIOD = 7, 251 OP_UTF8_PERIOD = 7,
252#endif /* RE_ENABLE_I18N */
253 252
254 /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used 253 /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used
255 when the debugger shows values of this enum type. */ 254 when the debugger shows values of this enum type. */
@@ -287,30 +286,29 @@ typedef enum
287 286
288} re_token_type_t; 287} re_token_type_t;
289 288
290#ifdef RE_ENABLE_I18N
291typedef struct 289typedef struct
292{ 290{
293 /* Multibyte characters. */ 291 /* Multibyte characters. */
294 wchar_t *mbchars; 292 wchar_t *mbchars;
295 293
294#ifdef _LIBC
296 /* Collating symbols. */ 295 /* Collating symbols. */
297# ifdef _LIBC
298 int32_t *coll_syms; 296 int32_t *coll_syms;
299# endif 297#endif
300 298
299#ifdef _LIBC
301 /* Equivalence classes. */ 300 /* Equivalence classes. */
302# ifdef _LIBC
303 int32_t *equiv_classes; 301 int32_t *equiv_classes;
304# endif 302#endif
305 303
306 /* Range expressions. */ 304 /* Range expressions. */
307# ifdef _LIBC 305#ifdef _LIBC
308 uint32_t *range_starts; 306 uint32_t *range_starts;
309 uint32_t *range_ends; 307 uint32_t *range_ends;
310# else /* not _LIBC */ 308#else
311 wchar_t *range_starts; 309 wchar_t *range_starts;
312 wchar_t *range_ends; 310 wchar_t *range_ends;
313# endif /* not _LIBC */ 311#endif
314 312
315 /* Character classes. */ 313 /* Character classes. */
316 wctype_t *char_classes; 314 wctype_t *char_classes;
@@ -333,7 +331,6 @@ typedef struct
333 /* # of character classes. */ 331 /* # of character classes. */
334 Idx nchar_classes; 332 Idx nchar_classes;
335} re_charset_t; 333} re_charset_t;
336#endif /* RE_ENABLE_I18N */
337 334
338typedef struct 335typedef struct
339{ 336{
@@ -341,9 +338,7 @@ typedef struct
341 { 338 {
342 unsigned char c; /* for CHARACTER */ 339 unsigned char c; /* for CHARACTER */
343 re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ 340 re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */
344#ifdef RE_ENABLE_I18N
345 re_charset_t *mbcset; /* for COMPLEX_BRACKET */ 341 re_charset_t *mbcset; /* for COMPLEX_BRACKET */
346#endif /* RE_ENABLE_I18N */
347 Idx idx; /* for BACK_REF */ 342 Idx idx; /* for BACK_REF */
348 re_context_type ctx_type; /* for ANCHOR */ 343 re_context_type ctx_type; /* for ANCHOR */
349 } opr; 344 } opr;
@@ -355,12 +350,10 @@ typedef struct
355 unsigned int constraint : 10; /* context constraint */ 350 unsigned int constraint : 10; /* context constraint */
356 unsigned int duplicated : 1; 351 unsigned int duplicated : 1;
357 unsigned int opt_subexp : 1; 352 unsigned int opt_subexp : 1;
358#ifdef RE_ENABLE_I18N
359 unsigned int accept_mb : 1; 353 unsigned int accept_mb : 1;
360 /* These 2 bits can be moved into the union if needed (e.g. if running out 354 /* These 2 bits can be moved into the union if needed (e.g. if running out
361 of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ 355 of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */
362 unsigned int mb_partial : 1; 356 unsigned int mb_partial : 1;
363#endif
364 unsigned int word_char : 1; 357 unsigned int word_char : 1;
365} re_token_t; 358} re_token_t;
366 359
@@ -375,12 +368,10 @@ struct re_string_t
375 REG_ICASE, upper cases of the string are stored, otherwise MBS points 368 REG_ICASE, upper cases of the string are stored, otherwise MBS points
376 the same address that RAW_MBS points. */ 369 the same address that RAW_MBS points. */
377 unsigned char *mbs; 370 unsigned char *mbs;
378#ifdef RE_ENABLE_I18N
379 /* Store the wide character string which is corresponding to MBS. */ 371 /* Store the wide character string which is corresponding to MBS. */
380 wint_t *wcs; 372 wint_t *wcs;
381 Idx *offsets; 373 Idx *offsets;
382 mbstate_t cur_state; 374 mbstate_t cur_state;
383#endif
384 /* Index in RAW_MBS. Each character mbs[i] corresponds to 375 /* Index in RAW_MBS. Each character mbs[i] corresponds to
385 raw_mbs[raw_mbs_idx + i]. */ 376 raw_mbs[raw_mbs_idx + i]. */
386 Idx raw_mbs_idx; 377 Idx raw_mbs_idx;
@@ -779,7 +770,6 @@ bitset_mask (bitset_t dest, const bitset_t src)
779 dest[bitset_i] &= src[bitset_i]; 770 dest[bitset_i] &= src[bitset_i];
780} 771}
781 772
782#ifdef RE_ENABLE_I18N
783/* Functions for re_string. */ 773/* Functions for re_string. */
784static int 774static int
785__attribute__ ((pure, unused)) 775__attribute__ ((pure, unused))
@@ -803,15 +793,15 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx)
803 return (wint_t) pstr->wcs[idx]; 793 return (wint_t) pstr->wcs[idx];
804} 794}
805 795
806# ifdef _LIBC 796#ifdef _LIBC
807# include <locale/weight.h> 797# include <locale/weight.h>
808# endif 798#endif
809 799
810static int 800static int
811__attribute__ ((pure, unused)) 801__attribute__ ((pure, unused))
812re_string_elem_size_at (const re_string_t *pstr, Idx idx) 802re_string_elem_size_at (const re_string_t *pstr, Idx idx)
813{ 803{
814# ifdef _LIBC 804#ifdef _LIBC
815 const unsigned char *p, *extra; 805 const unsigned char *p, *extra;
816 const int32_t *table, *indirect; 806 const int32_t *table, *indirect;
817 uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); 807 uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
@@ -827,11 +817,10 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
827 findidx (table, indirect, extra, &p, pstr->len - idx); 817 findidx (table, indirect, extra, &p, pstr->len - idx);
828 return p - pstr->mbs - idx; 818 return p - pstr->mbs - idx;
829 } 819 }
830 else 820#endif /* _LIBC */
831# endif /* _LIBC */ 821
832 return 1; 822 return 1;
833} 823}
834#endif /* RE_ENABLE_I18N */
835 824
836#ifdef _LIBC 825#ifdef _LIBC
837# if __GNUC__ >= 7 826# if __GNUC__ >= 7
diff --git a/gl/regexec.c b/gl/regexec.c
index 6aeba3c..521cb02 100644
--- a/gl/regexec.c
+++ b/gl/regexec.c
@@ -1,5 +1,5 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 5
@@ -67,11 +67,9 @@ static reg_errcode_t set_regs (const regex_t *preg,
67 bool fl_backtrack); 67 bool fl_backtrack);
68static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs); 68static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs);
69 69
70#ifdef RE_ENABLE_I18N
71static int sift_states_iter_mb (const re_match_context_t *mctx, 70static int sift_states_iter_mb (const re_match_context_t *mctx,
72 re_sift_context_t *sctx, 71 re_sift_context_t *sctx,
73 Idx node_idx, Idx str_idx, Idx max_str_idx); 72 Idx node_idx, Idx str_idx, Idx max_str_idx);
74#endif /* RE_ENABLE_I18N */
75static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, 73static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
76 re_sift_context_t *sctx); 74 re_sift_context_t *sctx);
77static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, 75static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
@@ -123,10 +121,8 @@ static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
123 re_match_context_t *mctx, 121 re_match_context_t *mctx,
124 re_dfastate_t *pstate); 122 re_dfastate_t *pstate);
125#endif 123#endif
126#ifdef RE_ENABLE_I18N
127static reg_errcode_t transit_state_mb (re_match_context_t *mctx, 124static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
128 re_dfastate_t *pstate); 125 re_dfastate_t *pstate);
129#endif /* RE_ENABLE_I18N */
130static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, 126static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
131 const re_node_set *nodes); 127 const re_node_set *nodes);
132static reg_errcode_t get_subexp (re_match_context_t *mctx, 128static reg_errcode_t get_subexp (re_match_context_t *mctx,
@@ -156,14 +152,12 @@ static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
156 re_node_set *cur_nodes, Idx cur_str, 152 re_node_set *cur_nodes, Idx cur_str,
157 Idx subexp_num, int type); 153 Idx subexp_num, int type);
158static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state); 154static bool build_trtable (const re_dfa_t *dfa, re_dfastate_t *state);
159#ifdef RE_ENABLE_I18N
160static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, 155static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
161 const re_string_t *input, Idx idx); 156 const re_string_t *input, Idx idx);
162# ifdef _LIBC 157#ifdef _LIBC
163static unsigned int find_collation_sequence_value (const unsigned char *mbs, 158static unsigned int find_collation_sequence_value (const unsigned char *mbs,
164 size_t name_len); 159 size_t name_len);
165# endif /* _LIBC */ 160#endif
166#endif /* RE_ENABLE_I18N */
167static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, 161static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
168 const re_dfastate_t *state, 162 const re_dfastate_t *state,
169 re_node_set *states_node, 163 re_node_set *states_node,
@@ -779,12 +773,10 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
779 if (__glibc_unlikely (err != REG_NOERROR)) 773 if (__glibc_unlikely (err != REG_NOERROR))
780 goto free_return; 774 goto free_return;
781 775
782#ifdef RE_ENABLE_I18N 776 /* Don't consider this char as a possible match start if it part,
783 /* Don't consider this char as a possible match start if it part, 777 yet isn't the head, of a multibyte character. */
784 yet isn't the head, of a multibyte character. */
785 if (!sb && !re_string_first_byte (&mctx.input, 0)) 778 if (!sb && !re_string_first_byte (&mctx.input, 0))
786 continue; 779 continue;
787#endif
788 780
789 /* It seems to be appropriate one, then use the matcher. */ 781 /* It seems to be appropriate one, then use the matcher. */
790 /* We assume that the matching starts from 0. */ 782 /* We assume that the matching starts from 0. */
@@ -858,7 +850,6 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
858 for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) 850 for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
859 if (pmatch[reg_idx].rm_so != -1) 851 if (pmatch[reg_idx].rm_so != -1)
860 { 852 {
861#ifdef RE_ENABLE_I18N
862 if (__glibc_unlikely (mctx.input.offsets_needed != 0)) 853 if (__glibc_unlikely (mctx.input.offsets_needed != 0))
863 { 854 {
864 pmatch[reg_idx].rm_so = 855 pmatch[reg_idx].rm_so =
@@ -870,9 +861,6 @@ re_search_internal (const regex_t *preg, const char *string, Idx length,
870 ? mctx.input.valid_raw_len 861 ? mctx.input.valid_raw_len
871 : mctx.input.offsets[pmatch[reg_idx].rm_eo]); 862 : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
872 } 863 }
873#else
874 DEBUG_ASSERT (mctx.input.offsets_needed == 0);
875#endif
876 pmatch[reg_idx].rm_so += match_first; 864 pmatch[reg_idx].rm_so += match_first;
877 pmatch[reg_idx].rm_eo += match_first; 865 pmatch[reg_idx].rm_eo += match_first;
878 } 866 }
@@ -996,8 +984,7 @@ prune_impossible_nodes (re_match_context_t *mctx)
996 We must select appropriate initial state depending on the context, 984 We must select appropriate initial state depending on the context,
997 since initial states may have constraints like "\<", "^", etc.. */ 985 since initial states may have constraints like "\<", "^", etc.. */
998 986
999static inline re_dfastate_t * 987static __always_inline re_dfastate_t *
1000__attribute__ ((always_inline))
1001acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, 988acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
1002 Idx idx) 989 Idx idx)
1003{ 990{
@@ -1261,12 +1248,9 @@ proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
1261 Idx naccepted = 0; 1248 Idx naccepted = 0;
1262 re_token_type_t type = dfa->nodes[node].type; 1249 re_token_type_t type = dfa->nodes[node].type;
1263 1250
1264#ifdef RE_ENABLE_I18N
1265 if (dfa->nodes[node].accept_mb) 1251 if (dfa->nodes[node].accept_mb)
1266 naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); 1252 naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx);
1267 else 1253 else if (type == OP_BACK_REF)
1268#endif /* RE_ENABLE_I18N */
1269 if (type == OP_BACK_REF)
1270 { 1254 {
1271 Idx subexp_idx = dfa->nodes[node].opr.idx + 1; 1255 Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
1272 if (subexp_idx < nregs) 1256 if (subexp_idx < nregs)
@@ -1324,8 +1308,8 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
1324 re_node_set *eps_via_nodes) 1308 re_node_set *eps_via_nodes)
1325{ 1309{
1326 reg_errcode_t err; 1310 reg_errcode_t err;
1327 Idx num = fs->num++; 1311 Idx num = fs->num;
1328 if (fs->num == fs->alloc) 1312 if (num == fs->alloc)
1329 { 1313 {
1330 struct re_fail_stack_ent_t *new_array; 1314 struct re_fail_stack_ent_t *new_array;
1331 new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t, 1315 new_array = re_realloc (fs->stack, struct re_fail_stack_ent_t,
@@ -1340,6 +1324,7 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
1340 fs->stack[num].regs = re_malloc (regmatch_t, 2 * nregs); 1324 fs->stack[num].regs = re_malloc (regmatch_t, 2 * nregs);
1341 if (fs->stack[num].regs == NULL) 1325 if (fs->stack[num].regs == NULL)
1342 return REG_ESPACE; 1326 return REG_ESPACE;
1327 fs->num = num + 1;
1343 memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); 1328 memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
1344 memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * nregs); 1329 memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * nregs);
1345 err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); 1330 err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
@@ -1634,12 +1619,10 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
1634 bool ok; 1619 bool ok;
1635 DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[prev_node].type)); 1620 DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[prev_node].type));
1636 1621
1637#ifdef RE_ENABLE_I18N
1638 /* If the node may accept "multi byte". */ 1622 /* If the node may accept "multi byte". */
1639 if (dfa->nodes[prev_node].accept_mb) 1623 if (dfa->nodes[prev_node].accept_mb)
1640 naccepted = sift_states_iter_mb (mctx, sctx, prev_node, 1624 naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
1641 str_idx, sctx->last_str_idx); 1625 str_idx, sctx->last_str_idx);
1642#endif /* RE_ENABLE_I18N */
1643 1626
1644 /* We don't check backreferences here. 1627 /* We don't check backreferences here.
1645 See update_cur_sifted_state(). */ 1628 See update_cur_sifted_state(). */
@@ -1688,6 +1671,7 @@ clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
1688 1671
1689 if (top < next_state_log_idx) 1672 if (top < next_state_log_idx)
1690 { 1673 {
1674 DEBUG_ASSERT (mctx->state_log != NULL);
1691 memset (mctx->state_log + top + 1, '\0', 1675 memset (mctx->state_log + top + 1, '\0',
1692 sizeof (re_dfastate_t *) * (next_state_log_idx - top)); 1676 sizeof (re_dfastate_t *) * (next_state_log_idx - top));
1693 mctx->state_log_top = next_state_log_idx; 1677 mctx->state_log_top = next_state_log_idx;
@@ -2176,7 +2160,6 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
2176} 2160}
2177 2161
2178 2162
2179#ifdef RE_ENABLE_I18N
2180static int 2163static int
2181sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, 2164sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
2182 Idx node_idx, Idx str_idx, Idx max_str_idx) 2165 Idx node_idx, Idx str_idx, Idx max_str_idx)
@@ -2196,8 +2179,6 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
2196 'naccepted' bytes input. */ 2179 'naccepted' bytes input. */
2197 return naccepted; 2180 return naccepted;
2198} 2181}
2199#endif /* RE_ENABLE_I18N */
2200
2201 2182
2202/* Functions for state transition. */ 2183/* Functions for state transition. */
2203 2184
@@ -2215,7 +2196,6 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
2215 re_dfastate_t **trtable; 2196 re_dfastate_t **trtable;
2216 unsigned char ch; 2197 unsigned char ch;
2217 2198
2218#ifdef RE_ENABLE_I18N
2219 /* If the current state can accept multibyte. */ 2199 /* If the current state can accept multibyte. */
2220 if (__glibc_unlikely (state->accept_mb)) 2200 if (__glibc_unlikely (state->accept_mb))
2221 { 2201 {
@@ -2223,7 +2203,6 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
2223 if (__glibc_unlikely (*err != REG_NOERROR)) 2203 if (__glibc_unlikely (*err != REG_NOERROR))
2224 return NULL; 2204 return NULL;
2225 } 2205 }
2226#endif /* RE_ENABLE_I18N */
2227 2206
2228 /* Then decide the next state with the single byte. */ 2207 /* Then decide the next state with the single byte. */
2229#if 0 2208#if 0
@@ -2444,7 +2423,6 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
2444} 2423}
2445#endif 2424#endif
2446 2425
2447#ifdef RE_ENABLE_I18N
2448static reg_errcode_t 2426static reg_errcode_t
2449transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) 2427transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
2450{ 2428{
@@ -2512,7 +2490,6 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
2512 } 2490 }
2513 return REG_NOERROR; 2491 return REG_NOERROR;
2514} 2492}
2515#endif /* RE_ENABLE_I18N */
2516 2493
2517static reg_errcode_t 2494static reg_errcode_t
2518transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) 2495transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
@@ -3002,9 +2979,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
3002 const re_dfa_t *const dfa = mctx->dfa; 2979 const re_dfa_t *const dfa = mctx->dfa;
3003 bool ok; 2980 bool ok;
3004 Idx cur_idx; 2981 Idx cur_idx;
3005#ifdef RE_ENABLE_I18N
3006 reg_errcode_t err = REG_NOERROR; 2982 reg_errcode_t err = REG_NOERROR;
3007#endif
3008 re_node_set union_set; 2983 re_node_set union_set;
3009 re_node_set_init_empty (&union_set); 2984 re_node_set_init_empty (&union_set);
3010 for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) 2985 for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
@@ -3013,7 +2988,6 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
3013 Idx cur_node = cur_nodes->elems[cur_idx]; 2988 Idx cur_node = cur_nodes->elems[cur_idx];
3014 DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[cur_node].type)); 2989 DEBUG_ASSERT (!IS_EPSILON_NODE (dfa->nodes[cur_node].type));
3015 2990
3016#ifdef RE_ENABLE_I18N
3017 /* If the node may accept "multi byte". */ 2991 /* If the node may accept "multi byte". */
3018 if (dfa->nodes[cur_node].accept_mb) 2992 if (dfa->nodes[cur_node].accept_mb)
3019 { 2993 {
@@ -3051,7 +3025,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
3051 } 3025 }
3052 } 3026 }
3053 } 3027 }
3054#endif /* RE_ENABLE_I18N */ 3028
3055 if (naccepted 3029 if (naccepted
3056 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) 3030 || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
3057 { 3031 {
@@ -3475,18 +3449,15 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3475 } 3449 }
3476 else if (type == OP_PERIOD) 3450 else if (type == OP_PERIOD)
3477 { 3451 {
3478#ifdef RE_ENABLE_I18N
3479 if (dfa->mb_cur_max > 1) 3452 if (dfa->mb_cur_max > 1)
3480 bitset_merge (accepts, dfa->sb_char); 3453 bitset_merge (accepts, dfa->sb_char);
3481 else 3454 else
3482#endif
3483 bitset_set_all (accepts); 3455 bitset_set_all (accepts);
3484 if (!(dfa->syntax & RE_DOT_NEWLINE)) 3456 if (!(dfa->syntax & RE_DOT_NEWLINE))
3485 bitset_clear (accepts, '\n'); 3457 bitset_clear (accepts, '\n');
3486 if (dfa->syntax & RE_DOT_NOT_NULL) 3458 if (dfa->syntax & RE_DOT_NOT_NULL)
3487 bitset_clear (accepts, '\0'); 3459 bitset_clear (accepts, '\0');
3488 } 3460 }
3489#ifdef RE_ENABLE_I18N
3490 else if (type == OP_UTF8_PERIOD) 3461 else if (type == OP_UTF8_PERIOD)
3491 { 3462 {
3492 if (ASCII_CHARS % BITSET_WORD_BITS == 0) 3463 if (ASCII_CHARS % BITSET_WORD_BITS == 0)
@@ -3498,7 +3469,6 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3498 if (dfa->syntax & RE_DOT_NOT_NULL) 3469 if (dfa->syntax & RE_DOT_NOT_NULL)
3499 bitset_clear (accepts, '\0'); 3470 bitset_clear (accepts, '\0');
3500 } 3471 }
3501#endif
3502 else 3472 else
3503 continue; 3473 continue;
3504 3474
@@ -3529,12 +3499,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3529 bitset_empty (accepts); 3499 bitset_empty (accepts);
3530 continue; 3500 continue;
3531 } 3501 }
3532#ifdef RE_ENABLE_I18N
3533 if (dfa->mb_cur_max > 1) 3502 if (dfa->mb_cur_max > 1)
3534 for (j = 0; j < BITSET_WORDS; ++j) 3503 for (j = 0; j < BITSET_WORDS; ++j)
3535 any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); 3504 any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
3536 else 3505 else
3537#endif
3538 for (j = 0; j < BITSET_WORDS; ++j) 3506 for (j = 0; j < BITSET_WORDS; ++j)
3539 any_set |= (accepts[j] &= dfa->word_char[j]); 3507 any_set |= (accepts[j] &= dfa->word_char[j]);
3540 if (!any_set) 3508 if (!any_set)
@@ -3548,12 +3516,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3548 bitset_empty (accepts); 3516 bitset_empty (accepts);
3549 continue; 3517 continue;
3550 } 3518 }
3551#ifdef RE_ENABLE_I18N
3552 if (dfa->mb_cur_max > 1) 3519 if (dfa->mb_cur_max > 1)
3553 for (j = 0; j < BITSET_WORDS; ++j) 3520 for (j = 0; j < BITSET_WORDS; ++j)
3554 any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); 3521 any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
3555 else 3522 else
3556#endif
3557 for (j = 0; j < BITSET_WORDS; ++j) 3523 for (j = 0; j < BITSET_WORDS; ++j)
3558 any_set |= (accepts[j] &= ~dfa->word_char[j]); 3524 any_set |= (accepts[j] &= ~dfa->word_char[j]);
3559 if (!any_set) 3525 if (!any_set)
@@ -3630,7 +3596,6 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3630 return -1; 3596 return -1;
3631} 3597}
3632 3598
3633#ifdef RE_ENABLE_I18N
3634/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. 3599/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts.
3635 Return the number of the bytes the node accepts. 3600 Return the number of the bytes the node accepts.
3636 STR_IDX is the current index of the input string. 3601 STR_IDX is the current index of the input string.
@@ -3639,9 +3604,9 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
3639 one collating element like '.', '[a-z]', opposite to the other nodes 3604 one collating element like '.', '[a-z]', opposite to the other nodes
3640 can only accept one byte. */ 3605 can only accept one byte. */
3641 3606
3642# ifdef _LIBC 3607#ifdef _LIBC
3643# include <locale/weight.h> 3608# include <locale/weight.h>
3644# endif 3609#endif
3645 3610
3646static int 3611static int
3647check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, 3612check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
@@ -3725,12 +3690,12 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
3725 if (node->type == COMPLEX_BRACKET) 3690 if (node->type == COMPLEX_BRACKET)
3726 { 3691 {
3727 const re_charset_t *cset = node->opr.mbcset; 3692 const re_charset_t *cset = node->opr.mbcset;
3728# ifdef _LIBC 3693#ifdef _LIBC
3729 const unsigned char *pin 3694 const unsigned char *pin
3730 = ((const unsigned char *) re_string_get_buffer (input) + str_idx); 3695 = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
3731 Idx j; 3696 Idx j;
3732 uint32_t nrules; 3697 uint32_t nrules;
3733# endif /* _LIBC */ 3698#endif
3734 int match_len = 0; 3699 int match_len = 0;
3735 wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) 3700 wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
3736 ? re_string_wchar_at (input, str_idx) : 0); 3701 ? re_string_wchar_at (input, str_idx) : 0);
@@ -3753,7 +3718,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
3753 } 3718 }
3754 } 3719 }
3755 3720
3756# ifdef _LIBC 3721#ifdef _LIBC
3757 nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); 3722 nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
3758 if (nrules != 0) 3723 if (nrules != 0)
3759 { 3724 {
@@ -3842,7 +3807,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
3842 } 3807 }
3843 } 3808 }
3844 else 3809 else
3845# endif /* _LIBC */ 3810#endif /* _LIBC */
3846 { 3811 {
3847 /* match with range expression? */ 3812 /* match with range expression? */
3848 for (i = 0; i < cset->nranges; ++i) 3813 for (i = 0; i < cset->nranges; ++i)
@@ -3868,7 +3833,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
3868 return 0; 3833 return 0;
3869} 3834}
3870 3835
3871# ifdef _LIBC 3836#ifdef _LIBC
3872static unsigned int 3837static unsigned int
3873find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) 3838find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
3874{ 3839{
@@ -3926,8 +3891,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
3926 return UINT_MAX; 3891 return UINT_MAX;
3927 } 3892 }
3928} 3893}
3929# endif /* _LIBC */ 3894#endif /* _LIBC */
3930#endif /* RE_ENABLE_I18N */
3931 3895
3932/* Check whether the node accepts the byte which is IDX-th 3896/* Check whether the node accepts the byte which is IDX-th
3933 byte of the INPUT. */ 3897 byte of the INPUT. */
@@ -3950,12 +3914,10 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
3950 return false; 3914 return false;
3951 break; 3915 break;
3952 3916
3953#ifdef RE_ENABLE_I18N
3954 case OP_UTF8_PERIOD: 3917 case OP_UTF8_PERIOD:
3955 if (ch >= ASCII_CHARS) 3918 if (ch >= ASCII_CHARS)
3956 return false; 3919 return false;
3957 FALLTHROUGH; 3920 FALLTHROUGH;
3958#endif
3959 case OP_PERIOD: 3921 case OP_PERIOD:
3960 if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) 3922 if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
3961 || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) 3923 || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL)))
@@ -4016,7 +3978,6 @@ extend_buffers (re_match_context_t *mctx, int min_len)
4016 /* Then reconstruct the buffers. */ 3978 /* Then reconstruct the buffers. */
4017 if (pstr->icase) 3979 if (pstr->icase)
4018 { 3980 {
4019#ifdef RE_ENABLE_I18N
4020 if (pstr->mb_cur_max > 1) 3981 if (pstr->mb_cur_max > 1)
4021 { 3982 {
4022 ret = build_wcs_upper_buffer (pstr); 3983 ret = build_wcs_upper_buffer (pstr);
@@ -4024,16 +3985,13 @@ extend_buffers (re_match_context_t *mctx, int min_len)
4024 return ret; 3985 return ret;
4025 } 3986 }
4026 else 3987 else
4027#endif /* RE_ENABLE_I18N */
4028 build_upper_buffer (pstr); 3988 build_upper_buffer (pstr);
4029 } 3989 }
4030 else 3990 else
4031 { 3991 {
4032#ifdef RE_ENABLE_I18N
4033 if (pstr->mb_cur_max > 1) 3992 if (pstr->mb_cur_max > 1)
4034 build_wcs_buffer (pstr); 3993 build_wcs_buffer (pstr);
4035 else 3994 else
4036#endif /* RE_ENABLE_I18N */
4037 { 3995 {
4038 if (pstr->trans != NULL) 3996 if (pstr->trans != NULL)
4039 re_string_translate_buffer (pstr); 3997 re_string_translate_buffer (pstr);
diff --git a/gl/setenv.c b/gl/setenv.c
index 3ad3477..ebfd4e5 100644
--- a/gl/setenv.c
+++ b/gl/setenv.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1992, 1995-2003, 2005-2021 Free Software Foundation, Inc. 1/* Copyright (C) 1992, 1995-2003, 2005-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library. 2 This file is part of the GNU C Library.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
diff --git a/gl/setlocale-lock.c b/gl/setlocale-lock.c
index 53e231c..4e7540e 100644
--- a/gl/setlocale-lock.c
+++ b/gl/setlocale-lock.c
@@ -1,5 +1,5 @@
1/* Return the internal lock used by setlocale_null_r. 1/* Return the internal lock used by setlocale_null_r.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/setlocale_null.c b/gl/setlocale_null.c
index dbfda25..778429b 100644
--- a/gl/setlocale_null.c
+++ b/gl/setlocale_null.c
@@ -1,5 +1,5 @@
1/* Query the name of the current global locale. 1/* Query the name of the current global locale.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/setlocale_null.h b/gl/setlocale_null.h
index 00c42e2..d1921b0 100644
--- a/gl/setlocale_null.h
+++ b/gl/setlocale_null.h
@@ -1,5 +1,5 @@
1/* Query the name of the current global locale. 1/* Query the name of the current global locale.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc. 2 Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sha1-stream.c b/gl/sha1-stream.c
index fbf8c7b..0ba0435 100644
--- a/gl/sha1-stream.c
+++ b/gl/sha1-stream.c
@@ -1,7 +1,7 @@
1/* sha1.c - Functions to compute SHA1 message digest of files or 1/* sha1.c - Functions to compute SHA1 message digest of files or
2 memory blocks according to the NIST specification FIPS-180-1. 2 memory blocks according to the NIST specification FIPS-180-1.
3 3
4 Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundation, Inc. 4 Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sha1.c b/gl/sha1.c
index 52b1020..79e50ba 100644
--- a/gl/sha1.c
+++ b/gl/sha1.c
@@ -1,7 +1,7 @@
1/* sha1.c - Functions to compute SHA1 message digest of files or 1/* sha1.c - Functions to compute SHA1 message digest of files or
2 memory blocks according to the NIST specification FIPS-180-1. 2 memory blocks according to the NIST specification FIPS-180-1.
3 3
4 Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundation, Inc. 4 Copyright (C) 2000-2001, 2003-2006, 2008-2022 Free Software Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as 7 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sha1.h b/gl/sha1.h
index e12a23c..bc3470a 100644
--- a/gl/sha1.h
+++ b/gl/sha1.h
@@ -1,6 +1,6 @@
1/* Declarations of functions and data types used for SHA1 sum 1/* Declarations of functions and data types used for SHA1 sum
2 library functions. 2 library functions.
3 Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2021 Free Software 3 Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
@@ -23,6 +23,9 @@
23# include <stdint.h> 23# include <stdint.h>
24 24
25# if HAVE_OPENSSL_SHA1 25# if HAVE_OPENSSL_SHA1
26# ifndef OPENSSL_API_COMPAT
27# define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */
28# endif
26# include <openssl/sha.h> 29# include <openssl/sha.h>
27# endif 30# endif
28 31
diff --git a/gl/size_max.h b/gl/size_max.h
index 1186ba9..dee2b8e 100644
--- a/gl/size_max.h
+++ b/gl/size_max.h
@@ -1,5 +1,5 @@
1/* size_max.h -- declare SIZE_MAX through system headers 1/* size_max.h -- declare SIZE_MAX through system headers
2 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
3 Written by Simon Josefsson. 3 Written by Simon Josefsson.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/snprintf.c b/gl/snprintf.c
index a589cf1..3d87854 100644
--- a/gl/snprintf.c
+++ b/gl/snprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. 2 Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc.
3 Written by Simon Josefsson and Paul Eggert. 3 Written by Simon Josefsson and Paul Eggert.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/sockets.c b/gl/sockets.c
index f7846b3..31b4302 100644
--- a/gl/sockets.c
+++ b/gl/sockets.c
@@ -1,6 +1,6 @@
1/* sockets.c --- wrappers for Windows socket functions 1/* sockets.c --- wrappers for Windows socket functions
2 2
3 Copyright (C) 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sockets.h b/gl/sockets.h
index e70c2bb..75e49fc 100644
--- a/gl/sockets.h
+++ b/gl/sockets.h
@@ -1,6 +1,6 @@
1/* sockets.h - wrappers for Windows socket functions 1/* sockets.h - wrappers for Windows socket functions
2 2
3 Copyright (C) 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stat-time.c b/gl/stat-time.c
index 7b92792..3d48a2b 100644
--- a/gl/stat-time.c
+++ b/gl/stat-time.c
@@ -1,6 +1,6 @@
1/* stat-related time functions. 1/* stat-related time functions.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stat-time.h b/gl/stat-time.h
index 6b2cc68..6b0088e 100644
--- a/gl/stat-time.h
+++ b/gl/stat-time.h
@@ -1,6 +1,6 @@
1/* stat-related time functions. 1/* stat-related time functions.
2 2
3 Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stat-w32.c b/gl/stat-w32.c
index 4164199..c1a2923 100644
--- a/gl/stat-w32.c
+++ b/gl/stat-w32.c
@@ -1,5 +1,5 @@
1/* Core of implementation of fstat and stat for native Windows. 1/* Core of implementation of fstat and stat for native Windows.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stat-w32.h b/gl/stat-w32.h
index 5b56c09..0f79d61 100644
--- a/gl/stat-w32.h
+++ b/gl/stat-w32.h
@@ -1,5 +1,5 @@
1/* Core of implementation of fstat and stat for native Windows. 1/* Core of implementation of fstat and stat for native Windows.
2 Copyright (C) 2017-2021 Free Software Foundation, Inc. 2 Copyright (C) 2017-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stat.c b/gl/stat.c
index bc9a767..574489a 100644
--- a/gl/stat.c
+++ b/gl/stat.c
@@ -1,5 +1,5 @@
1/* Work around platform bugs in stat. 1/* Work around platform bugs in stat.
2 Copyright (C) 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stdalign.in.h b/gl/stdalign.in.h
index 592d58e..3b117df 100644
--- a/gl/stdalign.in.h
+++ b/gl/stdalign.in.h
@@ -1,6 +1,6 @@
1/* A substitute for ISO C11 <stdalign.h>. 1/* A substitute for ISO C11 <stdalign.h>.
2 2
3 Copyright 2011-2021 Free Software Foundation, Inc. 3 Copyright 2011-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stdbool.in.h b/gl/stdbool.in.h
index 2a1992d..2fa4672 100644
--- a/gl/stdbool.in.h
+++ b/gl/stdbool.in.h
@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2003, 2006-2021 Free Software Foundation, Inc. 1/* Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc.
2 Written by Bruno Haible <haible@clisp.cons.org>, 2001. 2 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
@@ -58,27 +58,11 @@
58 58
59/* 7.16. Boolean type and values */ 59/* 7.16. Boolean type and values */
60 60
61/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
62 definitions below, but temporarily we have to #undef them. */
63#if defined __BEOS__ && !defined __HAIKU__
64# include <OS.h> /* defines bool but not _Bool */
65# undef false
66# undef true
67#endif
68
69#ifdef __cplusplus 61#ifdef __cplusplus
70# define _Bool bool 62# define _Bool bool
71# define bool bool 63# define bool bool
72#else 64#else
73# if defined __BEOS__ && !defined __HAIKU__ 65# if !defined __GNUC__
74 /* A compiler known to have 'bool'. */
75 /* If the compiler already has both 'bool' and '_Bool', we can assume they
76 are the same types. */
77# if !@HAVE__BOOL@
78typedef bool _Bool;
79# endif
80# else
81# if !defined __GNUC__
82 /* If @HAVE__BOOL@: 66 /* If @HAVE__BOOL@:
83 Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when 67 Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
84 the built-in _Bool type is used. See 68 the built-in _Bool type is used. See
@@ -98,10 +82,10 @@ typedef bool _Bool;
98 "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. 82 "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
99 The only benefit of the enum, debuggability, is not important 83 The only benefit of the enum, debuggability, is not important
100 with these compilers. So use 'signed char' and no enum. */ 84 with these compilers. So use 'signed char' and no enum. */
101# define _Bool signed char 85# define _Bool signed char
102# else 86# else
103 /* With this compiler, trust the _Bool type if the compiler has it. */ 87 /* With this compiler, trust the _Bool type if the compiler has it. */
104# if !@HAVE__BOOL@ 88# if !@HAVE__BOOL@
105 /* For the sake of symbolic names in gdb, define true and false as 89 /* For the sake of symbolic names in gdb, define true and false as
106 enum constants, not only as macros. 90 enum constants, not only as macros.
107 It is tempting to write 91 It is tempting to write
@@ -112,7 +96,6 @@ typedef bool _Bool;
112 (see ISO C 99 6.3.1.1.(2)). So add a negative value to the 96 (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
113 enum; this ensures that '_Bool' promotes to 'int'. */ 97 enum; this ensures that '_Bool' promotes to 'int'. */
114typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; 98typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
115# endif
116# endif 99# endif
117# endif 100# endif
118# define bool _Bool 101# define bool _Bool
diff --git a/gl/stdckdint.in.h b/gl/stdckdint.in.h
new file mode 100644
index 0000000..90fa62e
--- /dev/null
+++ b/gl/stdckdint.in.h
@@ -0,0 +1,37 @@
1/* stdckdint.h -- checked integer arithmetic
2
3 Copyright 2022 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published
7 by the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18#ifndef _GL_STDCKDINT_H
19#define _GL_STDCKDINT_H
20
21#include "intprops-internal.h"
22
23#include <stdbool.h>
24
25/* Store into *R the low-order bits of A + B, A - B, A * B, respectively.
26 Return 1 if the result overflows, 0 otherwise.
27 A, B, and *R can have any integer type other than char, bool, a
28 bit-precise integer type, or an enumeration type.
29
30 These are like the standard macros introduced in C23, except that
31 arguments should not have side effects. */
32
33#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r))
34#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r))
35#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r))
36
37#endif /* _GL_STDCKDINT_H */
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index 42290d4..5c9a747 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -1,6 +1,6 @@
1/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues. 1/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
2 2
3 Copyright (C) 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index 85c5418..eaa7874 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
1/* Copyright (C) 2001-2002, 2004-2021 Free Software Foundation, Inc. 1/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc.
2 Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. 2 Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
3 This file is part of gnulib. 3 This file is part of gnulib.
4 4
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h
index 3fa94b4..ed32e69 100644
--- a/gl/stdio-impl.h
+++ b/gl/stdio-impl.h
@@ -1,5 +1,5 @@
1/* Implementation details of FILE streams. 1/* Implementation details of FILE streams.
2 Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. 2 Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stdio-read.c b/gl/stdio-read.c
new file mode 100644
index 0000000..85efa0d
--- /dev/null
+++ b/gl/stdio-read.c
@@ -0,0 +1,168 @@
1/* POSIX compatible FILE stream read function.
2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2011.
4
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18#include <config.h>
19
20/* Specification. */
21#include <stdio.h>
22
23/* Replace these functions only if module 'nonblocking' is requested. */
24#if GNULIB_NONBLOCKING
25
26/* On native Windows platforms, when read() is called on a non-blocking pipe
27 with an empty buffer, ReadFile() fails with error GetLastError() =
28 ERROR_NO_DATA, and read() in consequence fails with error EINVAL. This
29 read() function is at the basis of the function which fills the buffer of
30 a FILE stream. */
31
32# if defined _WIN32 && ! defined __CYGWIN__
33
34# include <errno.h>
35# include <io.h>
36
37# define WIN32_LEAN_AND_MEAN /* avoid including junk */
38# include <windows.h>
39
40# if GNULIB_MSVC_NOTHROW
41# include "msvc-nothrow.h"
42# else
43# include <io.h>
44# endif
45
46/* Don't assume that UNICODE is not defined. */
47# undef GetNamedPipeHandleState
48# define GetNamedPipeHandleState GetNamedPipeHandleStateA
49
50# define CALL_WITH_ERRNO_FIX(RETTYPE, EXPRESSION, FAILED) \
51 if (ferror (stream)) \
52 return (EXPRESSION); \
53 else \
54 { \
55 RETTYPE ret; \
56 SetLastError (0); \
57 ret = (EXPRESSION); \
58 if (FAILED) \
59 { \
60 if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \
61 { \
62 int fd = fileno (stream); \
63 if (fd >= 0) \
64 { \
65 HANDLE h = (HANDLE) _get_osfhandle (fd); \
66 if (GetFileType (h) == FILE_TYPE_PIPE) \
67 { \
68 /* h is a pipe or socket. */ \
69 DWORD state; \
70 if (GetNamedPipeHandleState (h, &state, NULL, NULL, \
71 NULL, NULL, 0) \
72 && (state & PIPE_NOWAIT) != 0) \
73 /* h is a pipe in non-blocking mode. \
74 Change errno from EINVAL to EAGAIN. */ \
75 errno = EAGAIN; \
76 } \
77 } \
78 } \
79 } \
80 return ret; \
81 }
82
83/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
84 Otherwise we get a function definition conflict with mingw64's <stdio.h>. */
85# if GNULIB_SCANF
86int
87scanf (const char *format, ...)
88{
89 int retval;
90 va_list args;
91
92 va_start (args, format);
93 retval = vfscanf (stdin, format, args);
94 va_end (args);
95
96 return retval;
97}
98# endif
99
100/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
101 Otherwise we get a function definition conflict with mingw64's <stdio.h>. */
102# if GNULIB_FSCANF
103int
104fscanf (FILE *stream, const char *format, ...)
105{
106 int retval;
107 va_list args;
108
109 va_start (args, format);
110 retval = vfscanf (stream, format, args);
111 va_end (args);
112
113 return retval;
114}
115# endif
116
117/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
118 Otherwise we get a function definition conflict with mingw64's <stdio.h>. */
119# if GNULIB_VSCANF
120int
121vscanf (const char *format, va_list args)
122{
123 return vfscanf (stdin, format, args);
124}
125# endif
126
127/* Enable this function definition only if gnulib's <stdio.h> has prepared it.
128 Otherwise we get a function definition conflict with mingw64's <stdio.h>. */
129# if GNULIB_VFSCANF
130int
131vfscanf (FILE *stream, const char *format, va_list args)
132#undef vfscanf
133{
134 CALL_WITH_ERRNO_FIX (int, vfscanf (stream, format, args), ret == EOF)
135}
136# endif
137
138int
139getchar (void)
140{
141 return fgetc (stdin);
142}
143
144int
145fgetc (FILE *stream)
146#undef fgetc
147{
148 CALL_WITH_ERRNO_FIX (int, fgetc (stream), ret == EOF)
149}
150
151char *
152fgets (char *s, int n, FILE *stream)
153#undef fgets
154{
155 CALL_WITH_ERRNO_FIX (char *, fgets (s, n, stream), ret == NULL)
156}
157
158/* We intentionally don't bother to fix gets. */
159
160size_t
161fread (void *ptr, size_t s, size_t n, FILE *stream)
162#undef fread
163{
164 CALL_WITH_ERRNO_FIX (size_t, fread (ptr, s, n, stream), ret < n)
165}
166
167# endif
168#endif
diff --git a/gl/stdio-write.c b/gl/stdio-write.c
new file mode 100644
index 0000000..82facf5
--- /dev/null
+++ b/gl/stdio-write.c
@@ -0,0 +1,206 @@
1/* POSIX compatible FILE stream write function.
2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
9
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17
18#include <config.h>
19
20/* Specification. */
21#include <stdio.h>
22
23/* Replace these functions only if module 'nonblocking' or module 'sigpipe' is
24 requested. */
25#if GNULIB_NONBLOCKING || GNULIB_SIGPIPE
26
27/* On native Windows platforms, SIGPIPE does not exist. When write() is
28 called on a pipe with no readers, WriteFile() fails with error
29 GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
30 error EINVAL. This write() function is at the basis of the function
31 which flushes the buffer of a FILE stream. */
32
33# if defined _WIN32 && ! defined __CYGWIN__
34
35# include <errno.h>
36# include <signal.h>
37# include <io.h>
38
39# define WIN32_LEAN_AND_MEAN /* avoid including junk */
40# include <windows.h>
41
42# if GNULIB_MSVC_NOTHROW
43# include "msvc-nothrow.h"
44# else
45# include <io.h>
46# endif
47
48/* Don't assume that UNICODE is not defined. */
49# undef GetNamedPipeHandleState
50# define GetNamedPipeHandleState GetNamedPipeHandleStateA
51
52# if GNULIB_NONBLOCKING
53# define CLEAR_ERRNO \
54 errno = 0;
55# define HANDLE_ENOSPC \
56 if (errno == ENOSPC && ferror (stream)) \
57 { \
58 int fd = fileno (stream); \
59 if (fd >= 0) \
60 { \
61 HANDLE h = (HANDLE) _get_osfhandle (fd); \
62 if (GetFileType (h) == FILE_TYPE_PIPE) \
63 { \
64 /* h is a pipe or socket. */ \
65 DWORD state; \
66 if (GetNamedPipeHandleState (h, &state, NULL, NULL, \
67 NULL, NULL, 0) \
68 && (state & PIPE_NOWAIT) != 0) \
69 /* h is a pipe in non-blocking mode. \
70 Change errno from ENOSPC to EAGAIN. */ \
71 errno = EAGAIN; \
72 } \
73 } \
74 } \
75 else
76# else
77# define CLEAR_ERRNO
78# define HANDLE_ENOSPC
79# endif
80
81# if GNULIB_SIGPIPE
82# define CLEAR_LastError \
83 SetLastError (0);
84# define HANDLE_ERROR_NO_DATA \
85 if (GetLastError () == ERROR_NO_DATA && ferror (stream)) \
86 { \
87 int fd = fileno (stream); \
88 if (fd >= 0 \
89 && GetFileType ((HANDLE) _get_osfhandle (fd)) \
90 == FILE_TYPE_PIPE) \
91 { \
92 /* Try to raise signal SIGPIPE. */ \
93 raise (SIGPIPE); \
94 /* If it is currently blocked or ignored, change errno from \
95 EINVAL to EPIPE. */ \
96 errno = EPIPE; \
97 } \
98 } \
99 else
100# else
101# define CLEAR_LastError
102# define HANDLE_ERROR_NO_DATA
103# endif
104
105# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
106 if (ferror (stream)) \
107 return (EXPRESSION); \
108 else \
109 { \
110 RETTYPE ret; \
111 CLEAR_ERRNO \
112 CLEAR_LastError \
113 ret = (EXPRESSION); \
114 if (FAILED) \
115 { \
116 HANDLE_ENOSPC \
117 HANDLE_ERROR_NO_DATA \
118 ; \
119 } \
120 return ret; \
121 }
122
123# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
124int
125printf (const char *format, ...)
126{
127 int retval;
128 va_list args;
129
130 va_start (args, format);
131 retval = vfprintf (stdout, format, args);
132 va_end (args);
133
134 return retval;
135}
136# endif
137
138# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
139int
140fprintf (FILE *stream, const char *format, ...)
141{
142 int retval;
143 va_list args;
144
145 va_start (args, format);
146 retval = vfprintf (stream, format, args);
147 va_end (args);
148
149 return retval;
150}
151# endif
152
153# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
154int
155vprintf (const char *format, va_list args)
156{
157 return vfprintf (stdout, format, args);
158}
159# endif
160
161# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
162int
163vfprintf (FILE *stream, const char *format, va_list args)
164#undef vfprintf
165{
166 CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
167}
168# endif
169
170int
171putchar (int c)
172{
173 return fputc (c, stdout);
174}
175
176int
177fputc (int c, FILE *stream)
178#undef fputc
179{
180 CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
181}
182
183int
184fputs (const char *string, FILE *stream)
185#undef fputs
186{
187 CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
188}
189
190int
191puts (const char *string)
192#undef puts
193{
194 FILE *stream = stdout;
195 CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
196}
197
198size_t
199fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
200#undef fwrite
201{
202 CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
203}
204
205# endif
206#endif
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 0ca2c8e..7b36dac 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <stdio.h>. 1/* A GNU-like <stdio.h>.
2 2
3 Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -399,7 +399,8 @@ _GL_CXXALIASWARN (fileno);
399#endif 399#endif
400 400
401#if @GNULIB_FOPEN@ 401#if @GNULIB_FOPEN@
402# if @REPLACE_FOPEN@ 402# if (@GNULIB_FOPEN@ && @REPLACE_FOPEN@) \
403 || (@GNULIB_FOPEN_GNU@ && @REPLACE_FOPEN_FOR_FOPEN_GNU@)
403# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 404# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
404# undef fopen 405# undef fopen
405# define fopen rpl_fopen 406# define fopen rpl_fopen
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 0855112..a86643c 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <stdlib.h>. 1/* A GNU-like <stdlib.h>.
2 2
3 Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, Inc. 3 Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -184,7 +184,11 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
184# undef free 184# undef free
185# define free rpl_free 185# define free rpl_free
186# endif 186# endif
187# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
188_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ());
189# else
187_GL_FUNCDECL_RPL (free, void, (void *ptr)); 190_GL_FUNCDECL_RPL (free, void, (void *ptr));
191# endif
188_GL_CXXALIAS_RPL (free, void, (void *ptr)); 192_GL_CXXALIAS_RPL (free, void, (void *ptr));
189# else 193# else
190_GL_CXXALIAS_SYS (free, void, (void *ptr)); 194_GL_CXXALIAS_SYS (free, void, (void *ptr));
@@ -260,7 +264,8 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
260#endif 264#endif
261 265
262#if @GNULIB_CALLOC_POSIX@ 266#if @GNULIB_CALLOC_POSIX@
263# if @REPLACE_CALLOC@ 267# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \
268 || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@)
264# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 269# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
265# undef calloc 270# undef calloc
266# define calloc rpl_calloc 271# define calloc rpl_calloc
@@ -474,7 +479,8 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
474 by never specifying a zero size), so it does not need malloc or 479 by never specifying a zero size), so it does not need malloc or
475 realloc to be redefined. */ 480 realloc to be redefined. */
476#if @GNULIB_MALLOC_POSIX@ 481#if @GNULIB_MALLOC_POSIX@
477# if @REPLACE_MALLOC@ 482# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \
483 || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@)
478# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ 484# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
479 || _GL_USE_STDLIB_ALLOC) 485 || _GL_USE_STDLIB_ALLOC)
480# undef malloc 486# undef malloc
@@ -828,29 +834,35 @@ _GL_CXXALIASWARN (putenv);
828/* Sort an array of NMEMB elements, starting at address BASE, each element 834/* Sort an array of NMEMB elements, starting at address BASE, each element
829 occupying SIZE bytes, in ascending order according to the comparison 835 occupying SIZE bytes, in ascending order according to the comparison
830 function COMPARE. */ 836 function COMPARE. */
837# ifdef __cplusplus
838extern "C" {
839# endif
840# if !GNULIB_defined_qsort_r_fn_types
841typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *);
842# define GNULIB_defined_qsort_r_fn_types 1
843# endif
844# ifdef __cplusplus
845}
846# endif
831# if @REPLACE_QSORT_R@ 847# if @REPLACE_QSORT_R@
832# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 848# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
833# undef qsort_r 849# undef qsort_r
834# define qsort_r rpl_qsort_r 850# define qsort_r rpl_qsort_r
835# endif 851# endif
836_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, 852_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
837 int (*compare) (void const *, void const *, 853 _gl_qsort_r_compar_fn compare,
838 void *),
839 void *arg) _GL_ARG_NONNULL ((1, 4))); 854 void *arg) _GL_ARG_NONNULL ((1, 4)));
840_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, 855_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
841 int (*compare) (void const *, void const *, 856 _gl_qsort_r_compar_fn compare,
842 void *),
843 void *arg)); 857 void *arg));
844# else 858# else
845# if !@HAVE_QSORT_R@ 859# if !@HAVE_QSORT_R@
846_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, 860_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
847 int (*compare) (void const *, void const *, 861 _gl_qsort_r_compar_fn compare,
848 void *),
849 void *arg) _GL_ARG_NONNULL ((1, 4))); 862 void *arg) _GL_ARG_NONNULL ((1, 4)));
850# endif 863# endif
851_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, 864_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
852 int (*compare) (void const *, void const *, 865 _gl_qsort_r_compar_fn compare,
853 void *),
854 void *arg)); 866 void *arg));
855# endif 867# endif
856_GL_CXXALIASWARN (qsort_r); 868_GL_CXXALIASWARN (qsort_r);
@@ -1101,7 +1113,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1101 1113
1102 1114
1103#if @GNULIB_REALLOC_POSIX@ 1115#if @GNULIB_REALLOC_POSIX@
1104# if @REPLACE_REALLOC@ 1116# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \
1117 || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@)
1105# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ 1118# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1106 || _GL_USE_STDLIB_ALLOC) 1119 || _GL_USE_STDLIB_ALLOC)
1107# undef realloc 1120# undef realloc
diff --git a/gl/str-two-way.h b/gl/str-two-way.h
index fc2db03..b00017c 100644
--- a/gl/str-two-way.h
+++ b/gl/str-two-way.h
@@ -1,5 +1,5 @@
1/* Byte-wise substring search, using the Two-Way algorithm. 1/* Byte-wise substring search, using the Two-Way algorithm.
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Written by Eric Blake <ebb9@byu.net>, 2008. 4 Written by Eric Blake <ebb9@byu.net>, 2008.
5 5
@@ -231,7 +231,7 @@ critical_factorization (const unsigned char *needle, size_t needle_len,
231 most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. 231 most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
232 If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * 232 If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
233 HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ 233 HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */
234static RETURN_TYPE 234static RETURN_TYPE _GL_ATTRIBUTE_PURE
235two_way_short_needle (const unsigned char *haystack, size_t haystack_len, 235two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
236 const unsigned char *needle, size_t needle_len) 236 const unsigned char *needle, size_t needle_len)
237{ 237{
@@ -325,7 +325,7 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
325 If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * 325 If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
326 HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and 326 HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
327 sublinear performance is not possible. */ 327 sublinear performance is not possible. */
328static RETURN_TYPE 328static RETURN_TYPE _GL_ATTRIBUTE_PURE
329two_way_long_needle (const unsigned char *haystack, size_t haystack_len, 329two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
330 const unsigned char *needle, size_t needle_len) 330 const unsigned char *needle, size_t needle_len)
331{ 331{
diff --git a/gl/strcasecmp.c b/gl/strcasecmp.c
index c714270..a85a2b1 100644
--- a/gl/strcasecmp.c
+++ b/gl/strcasecmp.c
@@ -1,5 +1,5 @@
1/* Case-insensitive string comparison function. 1/* Case-insensitive string comparison function.
2 Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/strcasestr.c b/gl/strcasestr.c
index 1935967..b36f409 100644
--- a/gl/strcasestr.c
+++ b/gl/strcasestr.c
@@ -1,5 +1,5 @@
1/* Case-insensitive searching in a string. 1/* Case-insensitive searching in a string.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2005. 3 Written by Bruno Haible <bruno@clisp.org>, 2005.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/streq.h b/gl/streq.h
index adabd15..49f73c1 100644
--- a/gl/streq.h
+++ b/gl/streq.h
@@ -1,5 +1,5 @@
1/* Optimized string comparison. 1/* Optimized string comparison.
2 Copyright (C) 2001-2002, 2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/strerror-override.c b/gl/strerror-override.c
index e76d55d..6be1afd 100644
--- a/gl/strerror-override.c
+++ b/gl/strerror-override.c
@@ -1,6 +1,6 @@
1/* strerror-override.c --- POSIX compatible system error routine 1/* strerror-override.c --- POSIX compatible system error routine
2 2
3 Copyright (C) 2010-2021 Free Software Foundation, Inc. 3 Copyright (C) 2010-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/strerror-override.h b/gl/strerror-override.h
index 9cfc5ad..d010d27 100644
--- a/gl/strerror-override.h
+++ b/gl/strerror-override.h
@@ -1,6 +1,6 @@
1/* strerror-override.h --- POSIX compatible system error routine 1/* strerror-override.h --- POSIX compatible system error routine
2 2
3 Copyright (C) 2010-2021 Free Software Foundation, Inc. 3 Copyright (C) 2010-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/strerror.c b/gl/strerror.c
index 83926df..67c5216 100644
--- a/gl/strerror.c
+++ b/gl/strerror.c
@@ -1,6 +1,6 @@
1/* strerror.c --- POSIX compatible system error routine 1/* strerror.c --- POSIX compatible system error routine
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/string.in.h b/gl/string.in.h
index afe7350..3996da9 100644
--- a/gl/string.in.h
+++ b/gl/string.in.h
@@ -1,6 +1,6 @@
1/* A GNU-like <string.h>. 1/* A GNU-like <string.h>.
2 2
3 Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc. 3 Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -112,13 +112,43 @@
112 112
113/* The definition of _GL_WARN_ON_USE is copied here. */ 113/* The definition of _GL_WARN_ON_USE is copied here. */
114 114
115/* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ 115/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have
116_GL_EXTERN_C void free (void *); 116 been included yet. */
117#if @GNULIB_FREE_POSIX@ 117#if @GNULIB_FREE_POSIX@
118# if (@REPLACE_FREE@ && !defined free \ 118# if (@REPLACE_FREE@ && !defined free \
119 && !(defined __cplusplus && defined GNULIB_NAMESPACE)) 119 && !(defined __cplusplus && defined GNULIB_NAMESPACE))
120# define free rpl_free 120/* We can't do '#define free rpl_free' here. */
121_GL_EXTERN_C void rpl_free (void *);
122# undef _GL_ATTRIBUTE_DEALLOC_FREE
123# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
124# else
125# if defined _MSC_VER && !defined free
126_GL_EXTERN_C
127# if defined _DLL
128 __declspec (dllimport)
129# endif
130 void __cdecl free (void *);
131# else
132# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
133_GL_EXTERN_C void free (void *) throw ();
134# else
121_GL_EXTERN_C void free (void *); 135_GL_EXTERN_C void free (void *);
136# endif
137# endif
138# endif
139#else
140# if defined _MSC_VER && !defined free
141_GL_EXTERN_C
142# if defined _DLL
143 __declspec (dllimport)
144# endif
145 void __cdecl free (void *);
146# else
147# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
148_GL_EXTERN_C void free (void *) throw ();
149# else
150_GL_EXTERN_C void free (void *);
151# endif
122# endif 152# endif
123#endif 153#endif
124 154
@@ -216,10 +246,11 @@ _GL_CXXALIAS_SYS_CAST2 (memchr,
216 void const *, (void const *__s, int __c, size_t __n)); 246 void const *, (void const *__s, int __c, size_t __n));
217# endif 247# endif
218# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 248# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
219 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 249 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
220_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); 250 || defined __clang__)
251_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ());
221_GL_CXXALIASWARN1 (memchr, void const *, 252_GL_CXXALIASWARN1 (memchr, void const *,
222 (void const *__s, int __c, size_t __n)); 253 (void const *__s, int __c, size_t __n) throw ());
223# elif __GLIBC__ >= 2 254# elif __GLIBC__ >= 2
224_GL_CXXALIASWARN (memchr); 255_GL_CXXALIASWARN (memchr);
225# endif 256# endif
@@ -301,9 +332,10 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
301 void *, (void const *, int, size_t), 332 void *, (void const *, int, size_t),
302 void const *, (void const *, int, size_t)); 333 void const *, (void const *, int, size_t));
303# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 334# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
304 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 335 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
305_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); 336 || defined __clang__)
306_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); 337_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
338_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
307# else 339# else
308_GL_CXXALIASWARN (memrchr); 340_GL_CXXALIASWARN (memrchr);
309# endif 341# endif
@@ -331,9 +363,11 @@ _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
331 void *, (void const *__s, int __c_in), 363 void *, (void const *__s, int __c_in),
332 void const *, (void const *__s, int __c_in)); 364 void const *, (void const *__s, int __c_in));
333# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 365# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
334 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 366 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
335_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); 367 || defined __clang__)
336_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); 368_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ());
369_GL_CXXALIASWARN1 (rawmemchr, void const *,
370 (void const *__s, int __c_in) throw ());
337# else 371# else
338_GL_CXXALIASWARN (rawmemchr); 372_GL_CXXALIASWARN (rawmemchr);
339# endif 373# endif
@@ -435,9 +469,11 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
435 char const *, (char const *__s, int __c_in)); 469 char const *, (char const *__s, int __c_in));
436# endif 470# endif
437# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 471# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
438 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 472 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
439_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); 473 || defined __clang__)
440_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); 474_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
475_GL_CXXALIASWARN1 (strchrnul, char const *,
476 (char const *__s, int __c_in) throw ());
441# else 477# else
442_GL_CXXALIASWARN (strchrnul); 478_GL_CXXALIASWARN (strchrnul);
443# endif 479# endif
@@ -549,22 +585,35 @@ _GL_WARN_ON_USE (strncat, "strncat is unportable - "
549# undef strndup 585# undef strndup
550# define strndup rpl_strndup 586# define strndup rpl_strndup
551# endif 587# endif
552_GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n) 588_GL_FUNCDECL_RPL (strndup, char *,
553 _GL_ARG_NONNULL ((1))); 589 (char const *__s, size_t __n)
590 _GL_ARG_NONNULL ((1))
591 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
554_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); 592_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
555# else 593# else
556# if ! @HAVE_DECL_STRNDUP@ 594# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup)
557_GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) 595_GL_FUNCDECL_SYS (strndup, char *,
558 _GL_ARG_NONNULL ((1))); 596 (char const *__s, size_t __n)
597 _GL_ARG_NONNULL ((1))
598 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
559# endif 599# endif
560_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); 600_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
561# endif 601# endif
562_GL_CXXALIASWARN (strndup); 602_GL_CXXALIASWARN (strndup);
563#elif defined GNULIB_POSIXCHECK 603#else
564# undef strndup 604# if __GNUC__ >= 11 && !defined strndup
565# if HAVE_RAW_DECL_STRNDUP 605/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */
606_GL_FUNCDECL_SYS (strndup, char *,
607 (char const *__s, size_t __n)
608 _GL_ARG_NONNULL ((1))
609 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
610# endif
611# if defined GNULIB_POSIXCHECK
612# undef strndup
613# if HAVE_RAW_DECL_STRNDUP
566_GL_WARN_ON_USE (strndup, "strndup is unportable - " 614_GL_WARN_ON_USE (strndup, "strndup is unportable - "
567 "use gnulib module strndup for portability"); 615 "use gnulib module strndup for portability");
616# endif
568# endif 617# endif
569#endif 618#endif
570 619
@@ -624,10 +673,11 @@ _GL_CXXALIAS_SYS_CAST2 (strpbrk,
624 char *, (char const *__s, char const *__accept), 673 char *, (char const *__s, char const *__accept),
625 const char *, (char const *__s, char const *__accept)); 674 const char *, (char const *__s, char const *__accept));
626# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 675# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
627 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 676 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
628_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); 677 || defined __clang__)
678_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ());
629_GL_CXXALIASWARN1 (strpbrk, char const *, 679_GL_CXXALIASWARN1 (strpbrk, char const *,
630 (char const *__s, char const *__accept)); 680 (char const *__s, char const *__accept) throw ());
631# elif __GLIBC__ >= 2 681# elif __GLIBC__ >= 2
632_GL_CXXALIASWARN (strpbrk); 682_GL_CXXALIASWARN (strpbrk);
633# endif 683# endif
@@ -732,10 +782,12 @@ _GL_CXXALIAS_SYS_CAST2 (strstr,
732 const char *, (const char *haystack, const char *needle)); 782 const char *, (const char *haystack, const char *needle));
733# endif 783# endif
734# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 784# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
735 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 785 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
736_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); 786 || defined __clang__)
787_GL_CXXALIASWARN1 (strstr, char *,
788 (char *haystack, const char *needle) throw ());
737_GL_CXXALIASWARN1 (strstr, const char *, 789_GL_CXXALIASWARN1 (strstr, const char *,
738 (const char *haystack, const char *needle)); 790 (const char *haystack, const char *needle) throw ());
739# elif __GLIBC__ >= 2 791# elif __GLIBC__ >= 2
740_GL_CXXALIASWARN (strstr); 792_GL_CXXALIASWARN (strstr);
741# endif 793# endif
@@ -781,10 +833,12 @@ _GL_CXXALIAS_SYS_CAST2 (strcasestr,
781 const char *, (const char *haystack, const char *needle)); 833 const char *, (const char *haystack, const char *needle));
782# endif 834# endif
783# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 835# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
784 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 836 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \
785_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); 837 || defined __clang__)
838_GL_CXXALIASWARN1 (strcasestr, char *,
839 (char *haystack, const char *needle) throw ());
786_GL_CXXALIASWARN1 (strcasestr, const char *, 840_GL_CXXALIASWARN1 (strcasestr, const char *,
787 (const char *haystack, const char *needle)); 841 (const char *haystack, const char *needle) throw ());
788# else 842# else
789_GL_CXXALIASWARN (strcasestr); 843_GL_CXXALIASWARN (strcasestr);
790# endif 844# endif
diff --git a/gl/strings.in.h b/gl/strings.in.h
index 07aed18..2c31d2e 100644
--- a/gl/strings.in.h
+++ b/gl/strings.in.h
@@ -1,6 +1,6 @@
1/* A substitute <strings.h>. 1/* A substitute <strings.h>.
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/stripslash.c b/gl/stripslash.c
index 99bfbe6..aee89b7 100644
--- a/gl/stripslash.c
+++ b/gl/stripslash.c
@@ -1,6 +1,6 @@
1/* stripslash.c -- remove redundant trailing slashes from a file name 1/* stripslash.c -- remove redundant trailing slashes from a file name
2 2
3 Copyright (C) 1990, 2001, 2003-2006, 2009-2021 Free Software Foundation, 3 Copyright (C) 1990, 2001, 2003-2006, 2009-2022 Free Software Foundation,
4 Inc. 4 Inc.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/strncasecmp.c b/gl/strncasecmp.c
index ccc0170..35d215b 100644
--- a/gl/strncasecmp.c
+++ b/gl/strncasecmp.c
@@ -1,5 +1,5 @@
1/* strncasecmp.c -- case insensitive string comparator 1/* strncasecmp.c -- case insensitive string comparator
2 Copyright (C) 1998-1999, 2005-2007, 2009-2021 Free Software Foundation, Inc. 2 Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/strsep.c b/gl/strsep.c
index 3bd89f4..c05d7eb 100644
--- a/gl/strsep.c
+++ b/gl/strsep.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 2004, 2007, 2009-2021 Free Software Foundation, Inc. 1/* Copyright (C) 2004, 2007, 2009-2022 Free Software Foundation, Inc.
2 2
3 Written by Yoann Vandoorselaere <yoann@prelude-ids.org>. 3 Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
4 4
diff --git a/gl/strstr.c b/gl/strstr.c
index 2f62ce4..6236915 100644
--- a/gl/strstr.c
+++ b/gl/strstr.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2021 Free Software 1/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free Software
2 Foundation, Inc. 2 Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 4
diff --git a/gl/sys-limits.h b/gl/sys-limits.h
index 2d9784d..d154f0b 100644
--- a/gl/sys-limits.h
+++ b/gl/sys-limits.h
@@ -1,6 +1,6 @@
1/* System call limits 1/* System call limits
2 2
3 Copyright 2018-2021 Free Software Foundation, Inc. 3 Copyright 2018-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sys_socket.c b/gl/sys_socket.c
index d90b32c..0bfd60f 100644
--- a/gl/sys_socket.c
+++ b/gl/sys_socket.c
@@ -1,6 +1,6 @@
1/* Inline functions for <sys/socket.h>. 1/* Inline functions for <sys/socket.h>.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index 0a2c57d..acdf7ee 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -1,6 +1,6 @@
1/* Provide a sys/socket header file for systems lacking it (read: MinGW) 1/* Provide a sys/socket header file for systems lacking it (read: MinGW)
2 and for systems where it is incomplete. 2 and for systems where it is incomplete.
3 Copyright (C) 2005-2021 Free Software Foundation, Inc. 3 Copyright (C) 2005-2022 Free Software Foundation, Inc.
4 Written by Simon Josefsson. 4 Written by Simon Josefsson.
5 5
6 This file is free software: you can redistribute it and/or modify 6 This file is free software: you can redistribute it and/or modify
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index babe3db..714c3cb 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -1,5 +1,5 @@
1/* Provide a more complete sys/stat.h header file. 1/* Provide a more complete sys/stat.h header file.
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -391,7 +391,33 @@ struct stat
391#endif 391#endif
392 392
393 393
394#if @GNULIB_MDA_CHMOD@ 394#if @GNULIB_CHMOD@
395# if @REPLACE_CHMOD@
396# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
397# undef chmod
398# define chmod rpl_chmod
399# endif
400_GL_FUNCDECL_RPL (chmod, int, (const char *filename, mode_t mode)
401 _GL_ARG_NONNULL ((1)));
402_GL_CXXALIAS_RPL (chmod, int, (const char *filename, mode_t mode));
403# elif defined _WIN32 && !defined __CYGWIN__
404# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
405# undef chmod
406# define chmod _chmod
407# endif
408/* Need to cast, because in mingw the last argument is 'int mode'. */
409_GL_CXXALIAS_MDA_CAST (chmod, int, (const char *filename, mode_t mode));
410# else
411_GL_CXXALIAS_SYS (chmod, int, (const char *filename, mode_t mode));
412# endif
413_GL_CXXALIASWARN (chmod);
414#elif defined GNULIB_POSIXCHECK
415# undef chmod
416# if HAVE_RAW_DECL_CHMOD
417_GL_WARN_ON_USE (chmod, "chmod has portability problems - "
418 "use gnulib module chmod for portability");
419# endif
420#elif @GNULIB_MDA_CHMOD@
395/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not 421/* On native Windows, map 'chmod' to '_chmod', so that -loldnames is not
396 required. In C++ with GNULIB_NAMESPACE, avoid differences between 422 required. In C++ with GNULIB_NAMESPACE, avoid differences between
397 platforms by defining GNULIB_NAMESPACE::chmod always. */ 423 platforms by defining GNULIB_NAMESPACE::chmod always. */
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index 2079d72..698e88d 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -1,6 +1,6 @@
1/* Provide a more complete sys/types.h. 1/* Provide a more complete sys/types.h.
2 2
3 Copyright (C) 2011-2021 Free Software Foundation, Inc. 3 Copyright (C) 2011-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/sys_uio.in.h b/gl/sys_uio.in.h
index 507ab01..788d461 100644
--- a/gl/sys_uio.in.h
+++ b/gl/sys_uio.in.h
@@ -1,5 +1,5 @@
1/* Substitute for <sys/uio.h>. 1/* Substitute for <sys/uio.h>.
2 Copyright (C) 2011-2021 Free Software Foundation, Inc. 2 Copyright (C) 2011-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/time.in.h b/gl/time.in.h
index a73fe59..6d4c771 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -1,6 +1,6 @@
1/* A more-standard <time.h>. 1/* A more-standard <time.h>.
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -120,6 +120,17 @@ _GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
120_GL_CXXALIASWARN (timespec_get); 120_GL_CXXALIASWARN (timespec_get);
121# endif 121# endif
122 122
123/* Set *TS to the current time resolution, and return BASE.
124 Upon failure, return 0. */
125# if @GNULIB_TIMESPEC_GETRES@
126# if ! @HAVE_TIMESPEC_GETRES@
127_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base)
128 _GL_ARG_NONNULL ((1)));
129# endif
130_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
131_GL_CXXALIASWARN (timespec_getres);
132# endif
133
123/* Sleep for at least RQTP seconds unless interrupted, If interrupted, 134/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
124 return -1 and store the remaining time into RMTP. See 135 return -1 and store the remaining time into RMTP. See
125 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */ 136 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */
diff --git a/gl/time_r.c b/gl/time_r.c
index 88d3c1c..d4b2275 100644
--- a/gl/time_r.c
+++ b/gl/time_r.c
@@ -1,6 +1,6 @@
1/* Reentrant time functions like localtime_r. 1/* Reentrant time functions like localtime_r.
2 2
3 Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2006-2007, 2010-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/timegm.c b/gl/timegm.c
index 7e723e1..a1b19ef 100644
--- a/gl/timegm.c
+++ b/gl/timegm.c
@@ -1,6 +1,6 @@
1/* Convert UTC calendar time to simple time. Like mktime but assumes UTC. 1/* Convert UTC calendar time to simple time. Like mktime but assumes UTC.
2 2
3 Copyright (C) 1994-2021 Free Software Foundation, Inc. 3 Copyright (C) 1994-2022 Free Software Foundation, Inc.
4 This file is part of the GNU C Library. 4 This file is part of the GNU C Library.
5 5
6 The GNU C Library is free software; you can redistribute it and/or 6 The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/unistd.c b/gl/unistd.c
index 0763456..95978e6 100644
--- a/gl/unistd.c
+++ b/gl/unistd.c
@@ -1,6 +1,6 @@
1/* Inline functions for <unistd.h>. 1/* Inline functions for <unistd.h>.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index 73c882f..57df09e 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
1/* Substitute for and wrapper around <unistd.h>. 1/* Substitute for and wrapper around <unistd.h>.
2 Copyright (C) 2003-2021 Free Software Foundation, Inc. 2 Copyright (C) 2003-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -415,16 +415,30 @@ _GL_CXXALIASWARN (close);
415 415
416 416
417#if @GNULIB_COPY_FILE_RANGE@ 417#if @GNULIB_COPY_FILE_RANGE@
418# if !@HAVE_COPY_FILE_RANGE@ 418# if @REPLACE_COPY_FILE_RANGE@
419# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
420# undef copy_file_range
421# define copy_file_range rpl_copy_file_range
422# endif
423_GL_FUNCDECL_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos,
424 int ofd, off_t *opos,
425 size_t len, unsigned flags));
426_GL_CXXALIAS_RPL (copy_file_range, ssize_t, (int ifd, off_t *ipos,
427 int ofd, off_t *opos,
428 size_t len, unsigned flags));
429# else
430# if !@HAVE_COPY_FILE_RANGE@
419_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, 431_GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
420 int ofd, off_t *opos, 432 int ofd, off_t *opos,
421 size_t len, unsigned flags)); 433 size_t len, unsigned flags));
434# endif
422_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos, 435_GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
423 int ofd, off_t *opos, 436 int ofd, off_t *opos,
424 size_t len, unsigned flags)); 437 size_t len, unsigned flags));
425# endif 438# endif
426_GL_CXXALIASWARN (copy_file_range); 439_GL_CXXALIASWARN (copy_file_range);
427#elif defined GNULIB_POSIXCHECK 440#elif defined GNULIB_POSIXCHECK
441# undef copy_file_range
428# if HAVE_RAW_DECL_COPY_FILE_RANGE 442# if HAVE_RAW_DECL_COPY_FILE_RANGE
429_GL_WARN_ON_USE (copy_file_range, 443_GL_WARN_ON_USE (copy_file_range,
430 "copy_file_range is unportable - " 444 "copy_file_range is unportable - "
@@ -1409,7 +1423,8 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
1409 Read a password from /dev/tty or stdin. 1423 Read a password from /dev/tty or stdin.
1410 Function getpass() from module 'getpass-gnu': 1424 Function getpass() from module 'getpass-gnu':
1411 Read a password of arbitrary length from /dev/tty or stdin. */ 1425 Read a password of arbitrary length from /dev/tty or stdin. */
1412# if @REPLACE_GETPASS@ 1426# if (@GNULIB_GETPASS@ && @REPLACE_GETPASS@) \
1427 || (@GNULIB_GETPASS_GNU@ && @REPLACE_GETPASS_FOR_GETPASS_GNU@)
1413# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1428# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1414# undef getpass 1429# undef getpass
1415# define getpass rpl_getpass 1430# define getpass rpl_getpass
diff --git a/gl/unlocked-io.h b/gl/unlocked-io.h
index ca184b3..7461d74 100644
--- a/gl/unlocked-io.h
+++ b/gl/unlocked-io.h
@@ -1,10 +1,10 @@
1/* Prefer faster, non-thread-safe stdio functions if available. 1/* Prefer faster, non-thread-safe stdio functions if available.
2 2
3 Copyright (C) 2001-2004, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2001-2004, 2009-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/gl/unsetenv.c b/gl/unsetenv.c
index b2e910e..07eac6f 100644
--- a/gl/unsetenv.c
+++ b/gl/unsetenv.c
@@ -1,4 +1,4 @@
1/* Copyright (C) 1992, 1995-2002, 2005-2021 Free Software Foundation, Inc. 1/* Copyright (C) 1992, 1995-2002, 2005-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library. 2 This file is part of the GNU C Library.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index d9b669d..285c674 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -1,5 +1,5 @@
1/* vsprintf with automatic memory allocation. 1/* vsprintf with automatic memory allocation.
2 Copyright (C) 1999, 2002-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2002-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -915,8 +915,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
915 q_ptr[q_len++] = 1; 915 q_ptr[q_len++] = 1;
916 } 916 }
917 keep_q: 917 keep_q:
918 if (tmp_roomptr != NULL) 918 free (tmp_roomptr);
919 free (tmp_roomptr);
920 q->limbs = q_ptr; 919 q->limbs = q_ptr;
921 q->nlimbs = q_len; 920 q->nlimbs = q_len;
922 return roomptr; 921 return roomptr;
@@ -1873,11 +1872,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
1873 free (a.arg); 1872 free (a.arg);
1874 1873
1875 if (PRINTF_FETCHARGS (args, &a) < 0) 1874 if (PRINTF_FETCHARGS (args, &a) < 0)
1876 { 1875 goto fail_1_with_EINVAL;
1877 CLEANUP ();
1878 errno = EINVAL;
1879 return NULL;
1880 }
1881 1876
1882 { 1877 {
1883 size_t buf_neededlength; 1878 size_t buf_neededlength;
@@ -1913,19 +1908,12 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
1913 buf_malloced = buf; 1908 buf_malloced = buf;
1914 } 1909 }
1915 1910
1916 if (resultbuf != NULL) 1911 result = resultbuf;
1917 { 1912 allocated = (resultbuf != NULL ? *lengthp : 0);
1918 result = resultbuf;
1919 allocated = *lengthp;
1920 }
1921 else
1922 {
1923 result = NULL;
1924 allocated = 0;
1925 }
1926 length = 0; 1913 length = 0;
1927 /* Invariants: 1914 /* Invariants:
1928 result is either == resultbuf or == NULL or malloc-allocated. 1915 result is either == resultbuf or malloc-allocated.
1916 If result == NULL, resultbuf is == NULL as well.
1929 If length > 0, then result != NULL. */ 1917 If length > 0, then result != NULL. */
1930 1918
1931 /* Ensures that allocated >= needed. Aborts through a jump to 1919 /* Ensures that allocated >= needed. Aborts through a jump to
@@ -1942,7 +1930,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
1942 memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ 1930 memory_size = xtimes (allocated, sizeof (DCHAR_T)); \
1943 if (size_overflow_p (memory_size)) \ 1931 if (size_overflow_p (memory_size)) \
1944 oom_statement \ 1932 oom_statement \
1945 if (result == resultbuf || result == NULL) \ 1933 if (result == resultbuf) \
1946 memory = (DCHAR_T *) malloc (memory_size); \ 1934 memory = (DCHAR_T *) malloc (memory_size); \
1947 else \ 1935 else \
1948 memory = (DCHAR_T *) realloc (result, memory_size); \ 1936 memory = (DCHAR_T *) realloc (result, memory_size); \
@@ -2112,15 +2100,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2112 if (count == 0) 2100 if (count == 0)
2113 break; 2101 break;
2114 if (count < 0) 2102 if (count < 0)
2115 { 2103 goto fail_with_EILSEQ;
2116 if (!(result == resultbuf || result == NULL))
2117 free (result);
2118 if (buf_malloced != NULL)
2119 free (buf_malloced);
2120 CLEANUP ();
2121 errno = EILSEQ;
2122 return NULL;
2123 }
2124 arg_end += count; 2104 arg_end += count;
2125 characters++; 2105 characters++;
2126 } 2106 }
@@ -2137,15 +2117,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2137 if (count == 0) 2117 if (count == 0)
2138 break; 2118 break;
2139 if (count < 0) 2119 if (count < 0)
2140 { 2120 goto fail_with_EILSEQ;
2141 if (!(result == resultbuf || result == NULL))
2142 free (result);
2143 if (buf_malloced != NULL)
2144 free (buf_malloced);
2145 CLEANUP ();
2146 errno = EILSEQ;
2147 return NULL;
2148 }
2149 arg_end += count; 2121 arg_end += count;
2150 characters++; 2122 characters++;
2151 } 2123 }
@@ -2191,14 +2163,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2191 converted, &converted_len); 2163 converted, &converted_len);
2192# endif 2164# endif
2193 if (converted == NULL) 2165 if (converted == NULL)
2194 { 2166 goto fail_with_errno;
2195 if (!(result == resultbuf || result == NULL))
2196 free (result);
2197 if (buf_malloced != NULL)
2198 free (buf_malloced);
2199 CLEANUP ();
2200 return NULL;
2201 }
2202 if (converted != result + length) 2167 if (converted != result + length)
2203 { 2168 {
2204 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), 2169 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
@@ -2237,15 +2202,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2237 if (count == 0) 2202 if (count == 0)
2238 break; 2203 break;
2239 if (count < 0) 2204 if (count < 0)
2240 { 2205 goto fail_with_EILSEQ;
2241 if (!(result == resultbuf || result == NULL))
2242 free (result);
2243 if (buf_malloced != NULL)
2244 free (buf_malloced);
2245 CLEANUP ();
2246 errno = EILSEQ;
2247 return NULL;
2248 }
2249 arg_end += count; 2206 arg_end += count;
2250 characters++; 2207 characters++;
2251 } 2208 }
@@ -2262,15 +2219,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2262 if (count == 0) 2219 if (count == 0)
2263 break; 2220 break;
2264 if (count < 0) 2221 if (count < 0)
2265 { 2222 goto fail_with_EILSEQ;
2266 if (!(result == resultbuf || result == NULL))
2267 free (result);
2268 if (buf_malloced != NULL)
2269 free (buf_malloced);
2270 CLEANUP ();
2271 errno = EILSEQ;
2272 return NULL;
2273 }
2274 arg_end += count; 2223 arg_end += count;
2275 characters++; 2224 characters++;
2276 } 2225 }
@@ -2316,14 +2265,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2316 converted, &converted_len); 2265 converted, &converted_len);
2317# endif 2266# endif
2318 if (converted == NULL) 2267 if (converted == NULL)
2319 { 2268 goto fail_with_errno;
2320 if (!(result == resultbuf || result == NULL))
2321 free (result);
2322 if (buf_malloced != NULL)
2323 free (buf_malloced);
2324 CLEANUP ();
2325 return NULL;
2326 }
2327 if (converted != result + length) 2269 if (converted != result + length)
2328 { 2270 {
2329 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), 2271 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
@@ -2362,15 +2304,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2362 if (count == 0) 2304 if (count == 0)
2363 break; 2305 break;
2364 if (count < 0) 2306 if (count < 0)
2365 { 2307 goto fail_with_EILSEQ;
2366 if (!(result == resultbuf || result == NULL))
2367 free (result);
2368 if (buf_malloced != NULL)
2369 free (buf_malloced);
2370 CLEANUP ();
2371 errno = EILSEQ;
2372 return NULL;
2373 }
2374 arg_end += count; 2308 arg_end += count;
2375 characters++; 2309 characters++;
2376 } 2310 }
@@ -2387,15 +2321,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2387 if (count == 0) 2321 if (count == 0)
2388 break; 2322 break;
2389 if (count < 0) 2323 if (count < 0)
2390 { 2324 goto fail_with_EILSEQ;
2391 if (!(result == resultbuf || result == NULL))
2392 free (result);
2393 if (buf_malloced != NULL)
2394 free (buf_malloced);
2395 CLEANUP ();
2396 errno = EILSEQ;
2397 return NULL;
2398 }
2399 arg_end += count; 2325 arg_end += count;
2400 characters++; 2326 characters++;
2401 } 2327 }
@@ -2441,14 +2367,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2441 converted, &converted_len); 2367 converted, &converted_len);
2442# endif 2368# endif
2443 if (converted == NULL) 2369 if (converted == NULL)
2444 { 2370 goto fail_with_errno;
2445 if (!(result == resultbuf || result == NULL))
2446 free (result);
2447 if (buf_malloced != NULL)
2448 free (buf_malloced);
2449 CLEANUP ();
2450 return NULL;
2451 }
2452 if (converted != result + length) 2371 if (converted != result + length)
2453 { 2372 {
2454 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len), 2373 ENSURE_ALLOCATION_ELSE (xsum (length, converted_len),
@@ -2590,16 +2509,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2590 /* Found the terminating NUL. */ 2509 /* Found the terminating NUL. */
2591 break; 2510 break;
2592 if (count < 0) 2511 if (count < 0)
2593 { 2512 /* Invalid or incomplete multibyte character. */
2594 /* Invalid or incomplete multibyte character. */ 2513 goto fail_with_EILSEQ;
2595 if (!(result == resultbuf || result == NULL))
2596 free (result);
2597 if (buf_malloced != NULL)
2598 free (buf_malloced);
2599 CLEANUP ();
2600 errno = EILSEQ;
2601 return NULL;
2602 }
2603 arg_end += count; 2514 arg_end += count;
2604 characters++; 2515 characters++;
2605 } 2516 }
@@ -2626,16 +2537,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2626 /* Found the terminating NUL. */ 2537 /* Found the terminating NUL. */
2627 break; 2538 break;
2628 if (count < 0) 2539 if (count < 0)
2629 { 2540 /* Invalid or incomplete multibyte character. */
2630 /* Invalid or incomplete multibyte character. */ 2541 goto fail_with_EILSEQ;
2631 if (!(result == resultbuf || result == NULL))
2632 free (result);
2633 if (buf_malloced != NULL)
2634 free (buf_malloced);
2635 CLEANUP ();
2636 errno = EILSEQ;
2637 return NULL;
2638 }
2639 arg_end += count; 2542 arg_end += count;
2640 characters++; 2543 characters++;
2641 } 2544 }
@@ -2752,16 +2655,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2752 break; 2655 break;
2753 count = local_wcrtomb (cbuf, *arg_end, &state); 2656 count = local_wcrtomb (cbuf, *arg_end, &state);
2754 if (count < 0) 2657 if (count < 0)
2755 { 2658 /* Cannot convert. */
2756 /* Cannot convert. */ 2659 goto fail_with_EILSEQ;
2757 if (!(result == resultbuf || result == NULL))
2758 free (result);
2759 if (buf_malloced != NULL)
2760 free (buf_malloced);
2761 CLEANUP ();
2762 errno = EILSEQ;
2763 return NULL;
2764 }
2765 if (precision < (unsigned int) count) 2660 if (precision < (unsigned int) count)
2766 break; 2661 break;
2767 arg_end++; 2662 arg_end++;
@@ -2793,16 +2688,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2793 break; 2688 break;
2794 count = local_wcrtomb (cbuf, *arg_end, &state); 2689 count = local_wcrtomb (cbuf, *arg_end, &state);
2795 if (count < 0) 2690 if (count < 0)
2796 { 2691 /* Cannot convert. */
2797 /* Cannot convert. */ 2692 goto fail_with_EILSEQ;
2798 if (!(result == resultbuf || result == NULL))
2799 free (result);
2800 if (buf_malloced != NULL)
2801 free (buf_malloced);
2802 CLEANUP ();
2803 errno = EILSEQ;
2804 return NULL;
2805 }
2806 arg_end++; 2693 arg_end++;
2807 characters += count; 2694 characters += count;
2808 } 2695 }
@@ -2859,12 +2746,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2859 if (tmpdst == NULL) 2746 if (tmpdst == NULL)
2860 { 2747 {
2861 free (tmpsrc); 2748 free (tmpsrc);
2862 if (!(result == resultbuf || result == NULL)) 2749 goto fail_with_errno;
2863 free (result);
2864 if (buf_malloced != NULL)
2865 free (buf_malloced);
2866 CLEANUP ();
2867 return NULL;
2868 } 2750 }
2869 free (tmpsrc); 2751 free (tmpsrc);
2870# endif 2752# endif
@@ -2938,16 +2820,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
2938 abort (); 2820 abort ();
2939 count = local_wcrtomb (cbuf, *arg, &state); 2821 count = local_wcrtomb (cbuf, *arg, &state);
2940 if (count <= 0) 2822 if (count <= 0)
2941 { 2823 /* Cannot convert. */
2942 /* Cannot convert. */ 2824 goto fail_with_EILSEQ;
2943 if (!(result == resultbuf || result == NULL))
2944 free (result);
2945 if (buf_malloced != NULL)
2946 free (buf_malloced);
2947 CLEANUP ();
2948 errno = EILSEQ;
2949 return NULL;
2950 }
2951 ENSURE_ALLOCATION (xsum (length, count)); 2825 ENSURE_ALLOCATION (xsum (length, count));
2952 memcpy (result + length, cbuf, count); 2826 memcpy (result + length, cbuf, count);
2953 length += count; 2827 length += count;
@@ -3083,14 +2957,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
3083 NULL, 2957 NULL,
3084 NULL, &tmpdst_len); 2958 NULL, &tmpdst_len);
3085 if (tmpdst == NULL) 2959 if (tmpdst == NULL)
3086 { 2960 goto fail_with_errno;
3087 if (!(result == resultbuf || result == NULL))
3088 free (result);
3089 if (buf_malloced != NULL)
3090 free (buf_malloced);
3091 CLEANUP ();
3092 return NULL;
3093 }
3094# endif 2961# endif
3095 2962
3096 if (has_width) 2963 if (has_width)
@@ -5463,13 +5330,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
5463 errno = EINVAL; 5330 errno = EINVAL;
5464 } 5331 }
5465 5332
5466 if (!(result == resultbuf || result == NULL)) 5333 goto fail_with_errno;
5467 free (result);
5468 if (buf_malloced != NULL)
5469 free (buf_malloced);
5470 CLEANUP ();
5471
5472 return NULL;
5473 } 5334 }
5474 5335
5475#if USE_SNPRINTF 5336#if USE_SNPRINTF
@@ -5603,14 +5464,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
5603 NULL, 5464 NULL,
5604 NULL, &tmpdst_len); 5465 NULL, &tmpdst_len);
5605 if (tmpdst == NULL) 5466 if (tmpdst == NULL)
5606 { 5467 goto fail_with_errno;
5607 if (!(result == resultbuf || result == NULL))
5608 free (result);
5609 if (buf_malloced != NULL)
5610 free (buf_malloced);
5611 CLEANUP ();
5612 return NULL;
5613 }
5614 ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len), 5468 ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
5615 { free (tmpdst); goto out_of_memory; }); 5469 { free (tmpdst); goto out_of_memory; });
5616 DCHAR_CPY (result + length, tmpdst, tmpdst_len); 5470 DCHAR_CPY (result + length, tmpdst, tmpdst_len);
@@ -5835,25 +5689,40 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
5835 5689
5836#if USE_SNPRINTF 5690#if USE_SNPRINTF
5837 overflow: 5691 overflow:
5838 if (!(result == resultbuf || result == NULL))
5839 free (result);
5840 if (buf_malloced != NULL)
5841 free (buf_malloced);
5842 CLEANUP ();
5843 errno = EOVERFLOW; 5692 errno = EOVERFLOW;
5844 return NULL; 5693 goto fail_with_errno;
5845#endif 5694#endif
5846 5695
5847 out_of_memory: 5696 out_of_memory:
5848 if (!(result == resultbuf || result == NULL)) 5697 errno = ENOMEM;
5698 goto fail_with_errno;
5699
5700#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T)
5701 fail_with_EILSEQ:
5702 errno = EILSEQ;
5703 goto fail_with_errno;
5704#endif
5705
5706 fail_with_errno:
5707 if (result != resultbuf)
5849 free (result); 5708 free (result);
5850 if (buf_malloced != NULL) 5709 if (buf_malloced != NULL)
5851 free (buf_malloced); 5710 free (buf_malloced);
5852 out_of_memory_1:
5853 CLEANUP (); 5711 CLEANUP ();
5854 errno = ENOMEM;
5855 return NULL; 5712 return NULL;
5856 } 5713 }
5714
5715 out_of_memory_1:
5716 errno = ENOMEM;
5717 goto fail_1_with_errno;
5718
5719 fail_1_with_EINVAL:
5720 errno = EINVAL;
5721 goto fail_1_with_errno;
5722
5723 fail_1_with_errno:
5724 CLEANUP ();
5725 return NULL;
5857} 5726}
5858 5727
5859#undef MAX_ROOM_NEEDED 5728#undef MAX_ROOM_NEEDED
diff --git a/gl/vasnprintf.h b/gl/vasnprintf.h
index 9b02cdf..27cf54c 100644
--- a/gl/vasnprintf.h
+++ b/gl/vasnprintf.h
@@ -1,5 +1,5 @@
1/* vsprintf with automatic memory allocation. 1/* vsprintf with automatic memory allocation.
2 Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. 2 Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/vasprintf.c b/gl/vasprintf.c
index fe8b14f..218275f 100644
--- a/gl/vasprintf.c
+++ b/gl/vasprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 1999, 2002, 2006-2021 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2002, 2006-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/verify.h b/gl/verify.h
index a8ca59b..47b6ee6 100644
--- a/gl/verify.h
+++ b/gl/verify.h
@@ -1,6 +1,6 @@
1/* Compile-time assert-like macros. 1/* Compile-time assert-like macros.
2 2
3 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. 3 Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -34,7 +34,7 @@
34#ifndef __cplusplus 34#ifndef __cplusplus
35# if (201112L <= __STDC_VERSION__ \ 35# if (201112L <= __STDC_VERSION__ \
36 || (!defined __STRICT_ANSI__ \ 36 || (!defined __STRICT_ANSI__ \
37 && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 4 <= __clang_major__))) 37 && (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__)))
38# define _GL_HAVE__STATIC_ASSERT 1 38# define _GL_HAVE__STATIC_ASSERT 1
39# endif 39# endif
40# if (202000L <= __STDC_VERSION__ \ 40# if (202000L <= __STDC_VERSION__ \
@@ -215,6 +215,9 @@ template <int w>
215# define _GL_VERIFY(R, DIAGNOSTIC, ...) \ 215# define _GL_VERIFY(R, DIAGNOSTIC, ...) \
216 extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ 216 extern int (*_GL_GENSYM (_gl_verify_function) (void)) \
217 [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] 217 [_GL_VERIFY_TRUE (R, DIAGNOSTIC)]
218# if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
219# pragma GCC diagnostic ignored "-Wnested-externs"
220# endif
218#endif 221#endif
219 222
220/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ 223/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
@@ -300,13 +303,16 @@ template <int w>
300# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) 303# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
301#elif 1200 <= _MSC_VER 304#elif 1200 <= _MSC_VER
302# define assume(R) __assume (R) 305# define assume(R) __assume (R)
306#elif 202311L <= __STDC_VERSION__
307# include <stddef.h>
308# define assume(R) ((R) ? (void) 0 : unreachable ())
303#elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP 309#elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP
304 /* Doing it this way helps various packages when configured with 310 /* Doing it this way helps various packages when configured with
305 --enable-gcc-warnings, which compiles with -Dlint. It's nicer 311 --enable-gcc-warnings, which compiles with -Dlint. It's nicer
306 when 'assume' silences warnings even with older GCCs. */ 312 if 'assume' silences warnings with GCC 3.4 through GCC 4.4.7 (2012). */
307# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) 313# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
308#else 314#else
309 /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */ 315 /* Some older tools grok NOTREACHED, e.g., Oracle Studio 12.6 (2017). */
310# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0) 316# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
311#endif 317#endif
312 318
diff --git a/gl/vsnprintf.c b/gl/vsnprintf.c
index 4a0a3dc..80999e9 100644
--- a/gl/vsnprintf.c
+++ b/gl/vsnprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 2004, 2006-2021 Free Software Foundation, Inc. 2 Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc.
3 Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. 3 Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/w32sock.h b/gl/w32sock.h
index 635a1b2..17db3f1 100644
--- a/gl/w32sock.h
+++ b/gl/w32sock.h
@@ -1,6 +1,6 @@
1/* w32sock.h --- internal auxiliary functions for Windows socket functions 1/* w32sock.h --- internal auxiliary functions for Windows socket functions
2 2
3 Copyright (C) 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 20315dd..835ddbe 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -1,6 +1,6 @@
1/* A substitute for ISO C99 <wchar.h>, for platforms that have issues. 1/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
2 2
3 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 Copyright (C) 2007-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
@@ -175,13 +175,43 @@ typedef int rpl_mbstate_t;
175# endif 175# endif
176#endif 176#endif
177 177
178/* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ 178/* Make _GL_ATTRIBUTE_DEALLOC_FREE work, even though <stdlib.h> may not have
179_GL_EXTERN_C void free (void *); 179 been included yet. */
180#if @GNULIB_FREE_POSIX@ 180#if @GNULIB_FREE_POSIX@
181# if (@REPLACE_FREE@ && !defined free \ 181# if (@REPLACE_FREE@ && !defined free \
182 && !(defined __cplusplus && defined GNULIB_NAMESPACE)) 182 && !(defined __cplusplus && defined GNULIB_NAMESPACE))
183# define free rpl_free 183/* We can't do '#define free rpl_free' here. */
184_GL_EXTERN_C void rpl_free (void *);
185# undef _GL_ATTRIBUTE_DEALLOC_FREE
186# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
187# else
188# if defined _MSC_VER && !defined free
189_GL_EXTERN_C
190# if defined _DLL
191 __declspec (dllimport)
192# endif
193 void __cdecl free (void *);
194# else
195# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
196_GL_EXTERN_C void free (void *) throw ();
197# else
198_GL_EXTERN_C void free (void *);
199# endif
200# endif
201# endif
202#else
203# if defined _MSC_VER && !defined free
204_GL_EXTERN_C
205# if defined _DLL
206 __declspec (dllimport)
207# endif
208 void __cdecl free (void *);
209# else
210# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
211_GL_EXTERN_C void free (void *) throw ();
212# else
184_GL_EXTERN_C void free (void *); 213_GL_EXTERN_C void free (void *);
214# endif
185# endif 215# endif
186#endif 216#endif
187 217
diff --git a/gl/wcrtomb.c b/gl/wcrtomb.c
index 5c9fd79..e14d802 100644
--- a/gl/wcrtomb.c
+++ b/gl/wcrtomb.c
@@ -1,5 +1,5 @@
1/* Convert wide character to multibyte character. 1/* Convert wide character to multibyte character.
2 Copyright (C) 2008-2021 Free Software Foundation, Inc. 2 Copyright (C) 2008-2022 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2008. 3 Written by Bruno Haible <bruno@clisp.org>, 2008.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
diff --git a/gl/wctype-h.c b/gl/wctype-h.c
index 150221d..1278143 100644
--- a/gl/wctype-h.c
+++ b/gl/wctype-h.c
@@ -1,6 +1,6 @@
1/* Inline functions for <wctype.h>. 1/* Inline functions for <wctype.h>.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/wctype.in.h b/gl/wctype.in.h
index 652d811..98cafee 100644
--- a/gl/wctype.in.h
+++ b/gl/wctype.in.h
@@ -1,6 +1,6 @@
1/* A substitute for ISO C99 <wctype.h>, for platforms that lack it. 1/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
2 2
3 Copyright (C) 2006-2021 Free Software Foundation, Inc. 3 Copyright (C) 2006-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-initguard.h b/gl/windows-initguard.h
index 7999b23..a29d7e9 100644
--- a/gl/windows-initguard.h
+++ b/gl/windows-initguard.h
@@ -1,5 +1,5 @@
1/* Init guards, somewhat like spinlocks (native Windows implementation). 1/* Init guards, somewhat like spinlocks (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-mutex.c b/gl/windows-mutex.c
index 2edfeaa..28e429c 100644
--- a/gl/windows-mutex.c
+++ b/gl/windows-mutex.c
@@ -1,5 +1,5 @@
1/* Plain mutexes (native Windows implementation). 1/* Plain mutexes (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-mutex.h b/gl/windows-mutex.h
index 5ecf9f8..7aedfdf 100644
--- a/gl/windows-mutex.h
+++ b/gl/windows-mutex.h
@@ -1,5 +1,5 @@
1/* Plain mutexes (native Windows implementation). 1/* Plain mutexes (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-once.c b/gl/windows-once.c
index 8dcd37c..deea548 100644
--- a/gl/windows-once.c
+++ b/gl/windows-once.c
@@ -1,5 +1,5 @@
1/* Once-only control (native Windows implementation). 1/* Once-only control (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-once.h b/gl/windows-once.h
index 58632f9..85534c9 100644
--- a/gl/windows-once.h
+++ b/gl/windows-once.h
@@ -1,5 +1,5 @@
1/* Once-only control (native Windows implementation). 1/* Once-only control (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-recmutex.c b/gl/windows-recmutex.c
index cfc94b4..d8087ac 100644
--- a/gl/windows-recmutex.c
+++ b/gl/windows-recmutex.c
@@ -1,5 +1,5 @@
1/* Plain recursive mutexes (native Windows implementation). 1/* Plain recursive mutexes (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-recmutex.h b/gl/windows-recmutex.h
index 174fe73..746e75c 100644
--- a/gl/windows-recmutex.h
+++ b/gl/windows-recmutex.h
@@ -1,5 +1,5 @@
1/* Plain recursive mutexes (native Windows implementation). 1/* Plain recursive mutexes (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-rwlock.c b/gl/windows-rwlock.c
index d63936c..d186e03 100644
--- a/gl/windows-rwlock.c
+++ b/gl/windows-rwlock.c
@@ -1,5 +1,5 @@
1/* Read-write locks (native Windows implementation). 1/* Read-write locks (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/windows-rwlock.h b/gl/windows-rwlock.h
index 280c9f2..65c5ab4 100644
--- a/gl/windows-rwlock.h
+++ b/gl/windows-rwlock.h
@@ -1,5 +1,5 @@
1/* Read-write locks (native Windows implementation). 1/* Read-write locks (native Windows implementation).
2 Copyright (C) 2005-2021 Free Software Foundation, Inc. 2 Copyright (C) 2005-2022 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/xalloc-die.c b/gl/xalloc-die.c
index 1bf0a9e..5b947f1 100644
--- a/gl/xalloc-die.c
+++ b/gl/xalloc-die.c
@@ -1,11 +1,11 @@
1/* Report a memory allocation failure and exit. 1/* Report a memory allocation failure and exit.
2 2
3 Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2021 Free Software 3 Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2022 Free Software
4 Foundation, Inc. 4 Foundation, Inc.
5 5
6 This program is free software: you can redistribute it and/or modify 6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
diff --git a/gl/xalloc-oversized.h b/gl/xalloc-oversized.h
index 4184f33..aefa6fd 100644
--- a/gl/xalloc-oversized.h
+++ b/gl/xalloc-oversized.h
@@ -1,6 +1,6 @@
1/* xalloc-oversized.h -- memory allocation size checking 1/* xalloc-oversized.h -- memory allocation size checking
2 2
3 Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc. 3 Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/xalloc.h b/gl/xalloc.h
index 7f2c3fb..9f4bf8d 100644
--- a/gl/xalloc.h
+++ b/gl/xalloc.h
@@ -1,10 +1,10 @@
1/* xalloc.h -- malloc with out-of-memory checking 1/* xalloc.h -- malloc with out-of-memory checking
2 2
3 Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc. 3 Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
diff --git a/gl/xmalloc.c b/gl/xmalloc.c
index d5def0b..3c3cb20 100644
--- a/gl/xmalloc.c
+++ b/gl/xmalloc.c
@@ -1,10 +1,10 @@
1/* xmalloc.c -- malloc with out of memory checking 1/* xmalloc.c -- malloc with out of memory checking
2 2
3 Copyright (C) 1990-2000, 2002-2006, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 1990-2000, 2002-2006, 2008-2022 Free Software Foundation, Inc.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
@@ -22,9 +22,9 @@
22#include "xalloc.h" 22#include "xalloc.h"
23 23
24#include "ialloc.h" 24#include "ialloc.h"
25#include "intprops.h"
26#include "minmax.h" 25#include "minmax.h"
27 26
27#include <stdckdint.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <string.h> 29#include <string.h>
30 30
@@ -195,7 +195,7 @@ x2nrealloc (void *p, size_t *pn, size_t s)
195 else 195 else
196 { 196 {
197 /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0. */ 197 /* Set N = floor (1.5 * N) + 1 to make progress even if N == 0. */
198 if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n)) 198 if (ckd_add (&n, n, (n >> 1) + 1))
199 xalloc_die (); 199 xalloc_die ();
200 } 200 }
201 201
@@ -236,7 +236,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
236 N_MAX, and what the C language can represent safely. */ 236 N_MAX, and what the C language can represent safely. */
237 237
238 idx_t n; 238 idx_t n;
239 if (INT_ADD_WRAPV (n0, n0 >> 1, &n)) 239 if (ckd_add (&n, n0, n0 >> 1))
240 n = IDX_MAX; 240 n = IDX_MAX;
241 if (0 <= n_max && n_max < n) 241 if (0 <= n_max && n_max < n)
242 n = n_max; 242 n = n_max;
@@ -251,7 +251,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
251 size_t nbytes; 251 size_t nbytes;
252#endif 252#endif
253 idx_t adjusted_nbytes 253 idx_t adjusted_nbytes
254 = (INT_MULTIPLY_WRAPV (n, s, &nbytes) 254 = (ckd_mul (&nbytes, n, s)
255 ? MIN (IDX_MAX, SIZE_MAX) 255 ? MIN (IDX_MAX, SIZE_MAX)
256 : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0); 256 : nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
257 if (adjusted_nbytes) 257 if (adjusted_nbytes)
@@ -263,9 +263,9 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
263 if (! pa) 263 if (! pa)
264 *pn = 0; 264 *pn = 0;
265 if (n - n0 < n_incr_min 265 if (n - n0 < n_incr_min
266 && (INT_ADD_WRAPV (n0, n_incr_min, &n) 266 && (ckd_add (&n, n0, n_incr_min)
267 || (0 <= n_max && n_max < n) 267 || (0 <= n_max && n_max < n)
268 || INT_MULTIPLY_WRAPV (n, s, &nbytes))) 268 || ckd_mul (&nbytes, n, s)))
269 xalloc_die (); 269 xalloc_die ();
270 pa = xrealloc (pa, nbytes); 270 pa = xrealloc (pa, nbytes);
271 *pn = n; 271 *pn = n;
diff --git a/gl/xsize.c b/gl/xsize.c
index b3d73a2..761e343 100644
--- a/gl/xsize.c
+++ b/gl/xsize.c
@@ -1,6 +1,6 @@
1/* Checked size_t computations. 1/* Checked size_t computations.
2 2
3 Copyright (C) 2012-2021 Free Software Foundation, Inc. 3 Copyright (C) 2012-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as
diff --git a/gl/xsize.h b/gl/xsize.h
index 91fa877..0bfa4c8 100644
--- a/gl/xsize.h
+++ b/gl/xsize.h
@@ -1,6 +1,6 @@
1/* xsize.h -- Checked size_t computations. 1/* xsize.h -- Checked size_t computations.
2 2
3 Copyright (C) 2003, 2008-2021 Free Software Foundation, Inc. 3 Copyright (C) 2003, 2008-2022 Free Software Foundation, Inc.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as 6 it under the terms of the GNU Lesser General Public License as